Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

HL7 Encoding Transformer

This transformer allows you to convert an HL7 message to and from the following formats:

  • HL7 XML

  • HL7 ER7

  • HAPI Message Object

When configuring this transformer, you define the HL7 message encoding for the output message only. The transformer automatically detects the format of the incoming message and applies the conversion accordingly.

You can use this transformer as a building block in your flow or as a Global Element, which you define once and then reference from your building blocks.

The HL7 Encoding transformer is part of the Mule Healthcare Toolkit, which includes transformers, components and endpoints for receiving, processing and sending HL7 messages. For details and a full list of available tools, consult the Toolkit’s  main documentation page .

XML Element

hl7:hl7-encoding-transformer

Sample Complete XML

<hl7:hl7-encoding-transformer name="toHAPI" doc:name="HL7 Encoding Transformer" hl7Encoding="XML" validation="WEAK" ignoreBadInput="true" mimeType="text/plain"/>
<hl7:hl7-encoding-transformer name="toHAPI" hl7Encoding="XML" validation="WEAK" ignoreBadInput="true"/>

Configuration For Studio and XML

General

hl7-encoding

Name Description XML

Display Name

The name of the building block as it appears in the flow.

[source] ---- doc:name="HL7 Encoding Transformer" ----

Name

A unique name for this transformer. This is necessary when using this transformer as a Global Element.

[source] ---- name="toHAPI" ----

Return Class

Class of the message returned by the transformer. Note that if you need to specify an array type you must postfix the class name with brackets ( [ ] ). For example, to return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[]

[source] ---- returnClass="ClassName" ----

Ignore Bad Input

(Boolean) If this transformer is part of a chain, and it does not support the class of the message it receives, it continues processing the message through the flow. If unchecked (set to false), the chain ends at this point, and Mule stores the message.

[source] ---- ignoreBadInput="true" ----

Encoding

Character encoding for transformer output.

[source] ---- encoding="UTF-8" ----

MIME Type

MIME Type for transformer output.

[source] ---- mimeType="text/plain" ----

HL7 Message Encoding

Format of the output HL7 message.

[source] ---- hl7Encoding="HAPI" ----

Strong / Weak Validation

Allows you to select between STRONG or WEAK HL7 message validation (leave blank for no validation).

* STRONG: Checks that all message structure components are present, and that the message is well-formed. * WEAK: Only checks that the message is well-formed.

[source] ---- validation="STRONG" ----

To access the Studio XML Editor, click the Configuration XML tab under the canvas.

The table below describes all configurable parameters for this building block.

Name Description XML

Display Name

The name of the building block as it appears in the flow.

[source] ---- doc:name="HL7 Encoding Transformer" ----

Name

A unique name for this transformer. This is necessary when using this transformer as a Global Element.

[source] ---- name="toHAPI" ----

Return Class

Class of the message returned by the transformer. Note that if you need to specify an array type you must postfix the class name with brackets ( [ ] ). For example, to return an Orange[], set the return class to org.mule.tck.testmodels.fruit.Orange[].

[source] ---- returnClass="ClassName" ----

Ignore Bad Input

(Boolean) If this transformer is part of a chain, and it does not support the class of the message it receives, it continues processing the message through the flow. If unchecked (set to false), the chain ends at this point, and Mule stores the message.

[source] ---- ignoreBadInput="true" ----

Encoding

Character encoding for transformer output.

[source] ---- encoding="UTF-8" ----

MIME Type

MIME Type for transformer output.

[source] ---- mimeType="text/plain" ----

HL7 Message Encoding

Format of the output HL7 message.

[source] ---- hl7Encoding="HAPI" ----

Strong / Weak Validation

Allows you to select between STRONG or WEAK HL7 message validation (leave blank for no validation).

* STRONG: Checks that all message structure components are present, and that the message is well-formed. * WEAK: Only checks that the message is well-formed.

[source] ---- validation="STRONG" ----

HL7 Encoding Transformer Attributes

Name

Type/Allowed values

Required

Default

Description

hl7Encoding

* ER7 * XML * HAPI

Yes

-

Encoding of the HL7 message output by the transformer. Can be a string in HL7 pipe-delimited format (ER7) or XML; or a HAPI object.

validation

* WEAK * STRONG

No

WEAK

Enable/disable default HAPI HL7 message validation during sending/receiving:

* STRONG: Validation enabled * WEAK: validation disabled

The HL7 Encoding Transformer also accepts all attributes configurable for transformers. See the Transformers Configuration Reference for details.

Namespace and Syntax

http://www.mulesoft.org/schema/mule/hl7

XML Schema Location

http://www.mulesoft.org/schema/mule/hl7/mule-hl7.xsd