Skip to content

Commit

Permalink
#414: update camel and fhir libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Ohr committed Mar 13, 2024
1 parent 618e436 commit 7724f75
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pam.v25.segment;

import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.v25.datatype.*;
Expand Down Expand Up @@ -43,19 +42,15 @@ public class ZBE extends AbstractSegment {
public ZBE(Group parent, ModelClassFactory factory) {
super(parent, factory);
var message = getMessage();
try {
add(EI.class, true, 0, 427, new Object[] { message }, "Movement ID");
add(TS.class, true, 1, 26, new Object[] { message }, "Start Movement Date/Time");
add(TS.class, false, 1, 26, new Object[] { message }, "End Movement Date/Time");
add(ST.class, true, 1, 6, new Object[] { message }, "Movement Action");
add(ID.class, true, 1, 1, new Object[] { message }, "Historical Movement Indicator");
add(ID.class, false, 1, 3, new Object[] { message }, "Original trigger event code");
add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Ward");
add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Nursing Ward");
add(CWE.class, false, 1, 3, new Object[] { message }, "Movement Scope");
} catch(HL7Exception e) {
log.error("Unexpected error creating ZBE - this is probably a bug in the source code generator.", e);
}
add(EI.class, true, 0, 427, new Object[] { message }, "Movement ID");
add(TS.class, true, 1, 26, new Object[] { message }, "Start Movement Date/Time");
add(TS.class, false, 1, 26, new Object[] { message }, "End Movement Date/Time");
add(ST.class, true, 1, 6, new Object[] { message }, "Movement Action");
add(ID.class, true, 1, 1, new Object[] { message }, "Historical Movement Indicator");
add(ID.class, false, 1, 3, new Object[] { message }, "Original trigger event code");
add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Ward");
add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Nursing Ward");
add(CWE.class, false, 1, 3, new Object[] { message }, "Movement Scope");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.v25.datatype.*;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import org.openehealth.ipf.modules.hl7.HL7v2Exception;


/**
Expand All @@ -47,18 +46,14 @@ public class QPD extends AbstractSegment {
public QPD(Group parentGroup, ModelClassFactory modelFactory) {
super(parentGroup, modelFactory);
var msg = getMessage();
try {
add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name");
add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag");
add(QIP.class, true, 0, 256, new Object[]{msg}, "Demographics Fields");
add(NM.class, false, 1, 16, new Object[]{msg}, "Search Confidence Threshold");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Name");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Version");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Description");
add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned");
} catch (HL7Exception e) {
throw new HL7v2Exception(e);
}
add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name");
add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag");
add(QIP.class, true, 0, 256, new Object[]{msg}, "Demographics Fields");
add(NM.class, false, 1, 16, new Object[]{msg}, "Search Confidence Threshold");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Name");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Version");
add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Description");
add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
*/
package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pix.v25.segment;

import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.v25.datatype.CE;
import ca.uhn.hl7v2.model.v25.datatype.CX;
import ca.uhn.hl7v2.model.v25.datatype.ST;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import org.openehealth.ipf.modules.hl7.HL7v2Exception;


/**
Expand All @@ -44,14 +42,10 @@ public class QPD extends AbstractSegment {
public QPD(Group parentGroup, ModelClassFactory modelFactory) {
super(parentGroup, modelFactory);
var msg = getMessage();
try {
add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name");
add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag");
add(CX.class, true, 1, 256, new Object[]{msg}, "Person Identifier");
add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned");
} catch (HL7Exception e) {
throw new HL7v2Exception(e);
}
add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name");
add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag");
add(CX.class, true, 1, 256, new Object[]{msg}, "Person Identifier");
add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<gpg-plugin-version>1.6</gpg-plugin-version>
<bouncycastle-version>1.76</bouncycastle-version>
<brave-version>5.16.0</brave-version>
<camel-version>4.3.0</camel-version>
<camel-version>4.4.0</camel-version>
<!-- resolve dependency convergence between guava and hapi caffeine -->
<checker-qual-version>3.19.0</checker-qual-version>
<cxf-version>4.0.3</cxf-version>
Expand All @@ -21,7 +21,7 @@
<equinox-common.version>3.6.200-v20130402-1505</equinox-common.version>
<groovy-version>4.0.18</groovy-version>
<hapi-version>2.5.1</hapi-version>
<hapi-fhir-version>7.0.0-SNAPSHOT</hapi-fhir-version>
<hapi-fhir-version>7.0.0</hapi-fhir-version>
<herasaf-version>3.0.2</herasaf-version>
<ipf-gazelle-version>3.0-SNAPSHOT</ipf-gazelle-version>
<ipf-oht-mdht-version>1.2.0.201212201425</ipf-oht-mdht-version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* Copyright 2008 the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -15,7 +15,6 @@
*/
package org.openehealth.ipf.modules.hl7.parser.test.hl7v2.def.v25.segment;

import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.v25.datatype.EI;
Expand All @@ -33,7 +32,7 @@
* The segment is defined by the German Patient Management Profile and extended
* by the "Historic Movement" option of the IHE ITI Supplement Patient
* Administration Framework (PAM) Integration Profile.
*
*
* @author Christian Ohr
*/
public class ZBE extends AbstractSegment {
Expand All @@ -45,19 +44,15 @@ public class ZBE extends AbstractSegment {
public ZBE(Group parent, ModelClassFactory factory) {
super(parent, factory);
var message = getMessage();
try {
add(EI.class, true, 0, 999, new Object[] { message }, null);
add(TS.class, true, 1, 26, new Object[] { message }, null);
add(TS.class, false, 1, 26, new Object[] { message }, null);
add(ST.class, true, 1, 10, new Object[] { message }, null);
} catch(HL7Exception e) {
log.error("Unexpected error creating ZBE - this is probably a bug in the source code generator.", e);
}
add(EI.class, true, 0, 999, new Object[]{message}, null);
add(TS.class, true, 1, 26, new Object[]{message}, null);
add(TS.class, false, 1, 26, new Object[]{message}, null);
add(ST.class, true, 1, 10, new Object[]{message}, null);
}

/**
* Returns movement ID (ZBE-1).
*
*
* @param rep index of repeating field
* @return movement ID
*/
Expand All @@ -67,7 +62,7 @@ public EI getMovementID(int rep) {

/**
* Returns movement IDs (ZBE-1).
*
*
* @return movement IDs
*/
public EI[] getMovementID() {
Expand All @@ -76,7 +71,7 @@ public EI[] getMovementID() {

/**
* Returns movement start date (ZBE-2).
*
*
* @return movement start date (required)
*/
public TS getStartMovementDateTime() {
Expand All @@ -85,7 +80,7 @@ public TS getStartMovementDateTime() {

/**
* Returns movement end date (ZBE-3).
*
*
* @return movement end date (optional)
*/
public TS getStartMovementEndTime() {
Expand All @@ -94,7 +89,7 @@ public TS getStartMovementEndTime() {

/**
* Returns movement action (ZBE-4).
*
*
* @return movement action (required, one of INSERT, DELETE, UPDATE, REFERENCE)
*/
public ST getAction() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
package org.openehealth.ipf.modules.hl7.parser.groovytest.hl7v2.def.v24.segment

import org.openehealth.ipf.modules.hl7.HL7v2Exception

import ca.uhn.hl7v2.HL7Exception
import ca.uhn.hl7v2.model.AbstractSegment
import ca.uhn.hl7v2.model.Group
import ca.uhn.hl7v2.model.Message
Expand All @@ -36,7 +33,7 @@ import ca.uhn.hl7v2.parser.ModelClassFactory
* The segment is defined by the German Patient Management Profile and extended
* by the "Historic Movement" option of the IHE ITI Supplement Patient
* Administration Framework (PAM) Integration Profile.
*
*
* This custom segment is compiled and loaded at runtime (unlike Java custom
* segments, which are already available as .class file. Take care to load required
* custom types in the same way. For this purpose the HapiModelExtension provides
Expand All @@ -45,69 +42,65 @@ import ca.uhn.hl7v2.parser.ModelClassFactory
*
* @author Christian Ohr
*/
public class ZBE extends AbstractSegment {
class ZBE extends AbstractSegment {

/**
* @param parent
* @param factory
*/
public ZBE(Group parent, ModelClassFactory factory) {
super(parent, factory)
Message message = getMessage()
try {
add(EI, true, 0, 999, [ message ] as Object[], null)
add(TS, true, 1, 26, [ message ] as Object[], null)
add(TS, false, 1, 26, [ message ] as Object[], null)
add(ST, true, 1, 10, [ message ] as Object[], null)
} catch (HL7Exception he) {
throw new HL7v2Exception(he)
}
}
/**
* @param parent
* @param factory
*/
ZBE(Group parent, ModelClassFactory factory) {
super(parent, factory)
Message message = getMessage()
add(EI, true, 0, 999, [message] as Object[], null)
add(TS, true, 1, 26, [message] as Object[], null)
add(TS, false, 1, 26, [message] as Object[], null)
add(ST, true, 1, 10, [message] as Object[], null)
}

/**
* Returns movement ID (ZBE-1).
*
* @param rep index of repeating field
* @return movement ID
*/
public EI getMovementID(int rep) {
return getTypedField(1, rep)
}
/**
* Returns movement ID (ZBE-1).
*
* @param rep index of repeating field
* @return movement ID
*/
EI getMovementID(int rep) {
return getTypedField(1, rep)
}

/**
* Returns movement IDs (ZBE-1).
*
* @return movement IDs
*/
public EI[] getMovementID() {
/**
* Returns movement IDs (ZBE-1).
*
* @return movement IDs
*/
EI[] getMovementID() {
return getTypedField(1, new EI[0])
}
}

/**
* Returns movement start date (ZBE-2).
*
* @return movement start date (required)
*/
public TS getStartMovementDateTime() {
return getTypedField(2, 0)
}
/**
* Returns movement start date (ZBE-2).
*
* @return movement start date (required)
*/
TS getStartMovementDateTime() {
return getTypedField(2, 0)
}

/**
* Returns movement end date (ZBE-3).
*
* @return movement end date (optional)
*/
public TS getStartMovementEndTime() {
return getTypedField(3, 0)
}
/**
* Returns movement end date (ZBE-3).
*
* @return movement end date (optional)
*/
TS getStartMovementEndTime() {
return getTypedField(3, 0)
}

/**
* Returns movement action (ZBE-4).
*
* @return movement action (required, one of INSERT, DELETE, UPDATE, REFERENCE)
*/
public ST getAction() {
return getTypedField(4, 0)
}
/**
* Returns movement action (ZBE-4).
*
* @return movement action (required, one of INSERT, DELETE, UPDATE, REFERENCE)
*/
ST getAction() {
return getTypedField(4, 0)
}

}
Loading

0 comments on commit 7724f75

Please sign in to comment.