HL7 DataFormatPage edited by Martin KrasserHL7 DataFormatThe HL7 component ships with a HL7 data format that can be used to format between String and HL7 model objects.
To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder: DataFormat hl7 = new HL7DataFormat(); ... from("direct:hl7in").marshal(hl7).to("jms:queue:hl7out"); In the sample above, the HL7 is marshalled from a HAPI Message object to a byte stream and put on a JMS queue. DataFormat hl7 = new HL7DataFormat(); ... from("jms:queue:hl7out").unmarshal(hl7).to("patientLookupService"); Here we unmarshal the byte stream into a HAPI Message object that is passed to our patient lookup service.
Camel 2.0
All headers are String types. If a header value is missing, its value is null. OptionsThe HL7 Data Format supports the following options:
DependenciesTo use HL7 in your camel routes you need to add a dependency on camel-hl7, which implements this data format. If you use Maven, you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions). <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-hl7</artifactId> <version>1.6.0</version> </dependency> Camel 2.3: The HAPI library version 0.6 has been split into a base library and several structures libraries, one for each HL7v2 message version:
By default camel-hl7 only references the HAPI base library. Applications are responsible for including structures libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added: <dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-structures-v24</artifactId> <version>0.6</version> </dependency> <dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-structures-v25</artifactId> <version>0.6</version> </dependency>
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Camel > HL7 DataFormat confluence
- [CONF] Apache Camel > HL7 DataFormat confluence
- [CONF] Apache Camel > HL7 DataFormat confluence
- [CONF] Apache Camel > HL7 DataFormat confluence