Skip to main content
Skip table of contents

XML2HL7

The XML2HL7 component is used to parse XML document and convert it to HL7 (Health Level Seven) v2.x format. HL7 v2.x is a messaging standard used to define how information is packaged and communicated between different systems in hospital workflows.

An equivalent XML format (XML Schema) is defined for each HL7 v2.x message format. The component, upon receiving a XML message that confirms to any of the XML Schemas defined, will convert it into an appropriate HL7 v2.x message.

Configuration

Component Configuration

 
Figure 1: Component Configuration panel

Error Handling Configuration

Please refer Error Handling section in Common Configurations page.

Input schema

If the component receives a message of the same format at all times, then XML schema of that message format can be provided here using schema editor which opens upon clicking the ellipsis 

button. The component will convert any valid XML message conforming to XML schemas defined for HL7 messages to respective HL7 v2.x message irrespective of the schema provided here. Defining an XML schema here will only set the schema on the input port of the component so that any required transformations can be defined using the schema.

  • Do not define the Schema here if the component can receive messages in different HL7 format. Instead, the schemas should be loaded manually loaded into the output structure of Mapper tool when defining transformations.
  • XML Schema files for hl7 messages are located at location FIORANO_HOME/xml-catalog/fiorano/hl7.

Enable Input Validation

Refer to the HL72XML section for details.

Input contains multiple messages

Refer to the HL72XML section for details.

Append MLLP characters to Response

Appends configured MLLP characters to the transformed HL7 message before sending it to the output port, for example, ([StartBlock]Message[EndBlock][LastCharacter]).

Expert Properties

Enable the Expert Properties view to configure these properties.

Expert properties are meant for advanced users; use with caution.


Figure 7: Expert properties for Generate sequencer mode

Pre Processing XSL Configuration

Pre Processing XSL configuration can be used to transform request message before processing it. Click the ellipses button against the property to configure the properties.

Refer to the Pre/Post Processing XSL Configuration section under the Common Configurations page for details regarding Pre Processing XSL configuration and Post Processing XSL configuration (below).

Post Processing XSL Configuration 

Post Processing XSL configuration can be used to transform the response message before sending it to the output port.

Process Message Based on Property

The property helps components to skip certain messages from processing.

Refer to the Process Message Based On a Property section under the Common Configurations page.

Threadpool Configuration

This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective. 

Refer to the HL72XML section for details.

Custom HL7 Message Packages

The table contains a Map for a version of HL7Message mapped to the list of provided Custom packages separated by the delimiter ; 


Figure 8: Threadpool Configuration

Elements to Decrypt

Click the ellipsis button to add elements to encrypt/decrypt.

Elements get auto-populated based on the Input/Output Schema provided. Select the elements to encrypt/decrypt and click the arrow button to choose those. These elements will be used for encryption and signing.


Figure 9: Dialog box to add elements for decryption

Add elements to encrypt/decrypt

Some components may not have schema on ports. In that case, semicolon separated XPaths can be provided here.

Namespace Prefixes: A map of prefix versus namespace used in XPaths can be configured here.

Functional Demonstration

Scenario 1

This scenario explains the basic functionality of XML2HL7 component.

Create flow by connecting XML2HL7 to feeder and display components. Send sample input (valid XML message) to check the response(transformed HL7 format). Message in XML format is sent from the feeder and the corresponding message in HL7 v2.x format can be seen in display.


Figure 10: Sample Event Process

Sample Input

Sample Input (Expand to see) provided in Feeder:

XML
<?xml version="1.0" encoding="UTF-8"?>
<ORU_R01 xmlns="urn:hl7-org:v2xml">
    <MSH>
        <MSH.1>|</MSH.1>
        <MSH.2>^~\&amp;</MSH.2>
        <MSH.3>
            <HD.1>GDML</HD.1>
        </MSH.3>
        <MSH.4>
            <HD.1>GDML</HD.1>
        </MSH.4>
        <MSH.7>20140207163234</MSH.7>
        <MSH.9>
            <MSG.1>ORU</MSG.1>
            <MSG.2>R01</MSG.2>
        </MSH.9>
        <MSH.10>3ca92c1f-a566-4868-a704-dcb9d0c1fcd3</MSH.10>
        <MSH.11>
            <PT.1>T</PT.1>
        </MSH.11>
        <MSH.12>
            <VID.1>2.6</VID.1>
        </MSH.12>
        <MSH.19>
            <CWE.1>EN</CWE.1>
        </MSH.19>
    </MSH>
    <ORU_R01.PATIENT_RESULT>
        <ORU_R01.PATIENT>
            <PID>
                <PID.1>1</PID.1>
                <PID.3>
                    <CX.1>NNTV19880113</CX.1>
                    <CX.4>
                        <HD.1>Other</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.3>
                    <CX.1>NNTV88011300</CX.1>
                    <CX.4>
                        <HD.1>CANQC</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.3>
                    <CX.1>NNTV0013</CX.1>
                    <CX.4>
                        <HD.1>Other</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.5>
                    <XPN.1>
                        <FN.1>NNTEST13</FN.1>
                    </XPN.1>
                    <XPN.2>V12TEST13</XPN.2>
                </PID.5>
                <PID.7>19880113</PID.7>
                <PID.8>F</PID.8>
                <PID.11>
                    <XAD.1>
                        <SAD.1>13 STREET</SAD.1>
                    </XAD.1>
                    <XAD.3>ABJOU</XAD.3>
                    <XAD.5>J1K2L3</XAD.5>
                </PID.11>
            </PID>
            <PRT>
                <PRT.1>1</PRT.1>
                <PRT.4>
                    <UNKNOWN.1>OP</UNKNOWN.1>
                    <UNKNOWN.2>Physician</UNKNOWN.2>
                </PRT.4>
                <PRT.5>
                    <UNKNOWN.1>79335</UNKNOWN.1>
                    <UNKNOWN.2>ZAPHIRATOS</UNKNOWN.2>
                    <UNKNOWN.3>THOMAS</UNKNOWN.3>
                </PRT.5>
                <PRT.14>
                    <UNKNOWN.1>202 - 7200 HUTCHISON</UNKNOWN.1>
                    <UNKNOWN.3>MONTRÉAL</UNKNOWN.3>
                    <UNKNOWN.4>Qc</UNKNOWN.4>
                    <UNKNOWN.5>H3N 1Z2</UNKNOWN.5>
                </PRT.14>
                <PRT.15>
                    <UNKNOWN.1>Work</UNKNOWN.1>
                    <UNKNOWN.2>514</UNKNOWN.2>
                    <UNKNOWN.3>4957932</UNKNOWN.3>
                </PRT.15>
            </PRT>
            <PRT>
                <PRT.1>2</PRT.1>
                <PRT.4>
                    <UNKNOWN.1>PO</UNKNOWN.1>
                    <UNKNOWN.2>Lab</UNKNOWN.2>
                </PRT.4>
                <PRT.8>
                    <UNKNOWN.1>ZAPHIRATOS, T. DR.</UNKNOWN.1>
                    <UNKNOWN.6>GDML</UNKNOWN.6>
                    <UNKNOWN.10>LLZAPHIR</UNKNOWN.10>
                </PRT.8>
                <PRT.14>
                    <UNKNOWN.1>7200 Hutchison</UNKNOWN.1>
                    <UNKNOWN.3>MONTREAL</UNKNOWN.3>
                    <UNKNOWN.4>Qc</UNKNOWN.4>
                    <UNKNOWN.5>H3N 1Z2</UNKNOWN.5>
                </PRT.14>
                <PRT.15>
                    <UNKNOWN.1>Work</UNKNOWN.1>
                    <UNKNOWN.2>495</UNKNOWN.2>
                    <UNKNOWN.3>2555</UNKNOWN.3>
                    <UNKNOWN.5>Fax</UNKNOWN.5>
                    <UNKNOWN.6>495</UNKNOWN.6>
                    <UNKNOWN.7>7932</UNKNOWN.7>
                </PRT.15>
            </PRT>
        </ORU_R01.PATIENT>
        <ORU_R01.ORDER_OBSERVATION>
            <ORC>
                <ORC.3>
                    <EI.1>3872090</EI.1>
                </ORC.3>
                <ORC.5>O</ORC.5>
                <ORC.9>20140206163434</ORC.9>
            </ORC>
            <NTE>
                <NTE.1>1</NTE.1>
                <NTE.2>L</NTE.2>
                <NTE.4>
                    <CWE.1>This requisition was edited and resaved on the2014/02/07 12:06:52 (GMT-05:00)</CWE.1>
                </NTE.4>
                <NTE.5>
                    <XCN.1>GR</XCN.1>
                </NTE.5>
            </NTE>
        </ORU_R01.ORDER_OBSERVATION>
        <ORU_R01.ORDER_OBSERVATION>
            <OBR>
                <OBR.1>1</OBR.1>
                <OBR.3>
                    <EI.1>3872090</EI.1>
                </OBR.3>
                <OBR.4>
                    <CWE.1>2054</CWE.1>
                    <CWE.2>GLUCOSE POS 1:2 H</CWE.2>
                    <CWE.3>GDML</CWE.3>
                </OBR.4>
                <OBR.5>R</OBR.5>
                <OBR.7>20140206163434</OBR.7>
                <OBR.25>I</OBR.25>
            </OBR>
            <ORU_R01.SPECIMEN>
                <SPM/>
            </ORU_R01.SPECIMEN>
        </ORU_R01.ORDER_OBSERVATION>
    </ORU_R01.PATIENT_RESULT>
</ORU_R01>

Output


Figure 11: Output generated in Display window for Scenario 1 input

Scenario 2

This scenario includes functionality to include multiple messages. In the XML2HL7 CPS, enable the Input contains multiple messages property, provide the Message Delimeter value as hex value of # and use the following input in the Feeder window.

Sample Input

CODE
<?xml version="1.0" encoding="UTF-8"?>
<ORU_R01 xmlns="urn:hl7-org:v2xml">
    <MSH>
        <MSH.1>|</MSH.1>
        <MSH.2>^~\&amp;</MSH.2>
        <MSH.3>
            <HD.1>GDML</HD.1>
        </MSH.3>
        <MSH.4>
            <HD.1>GDML</HD.1>
        </MSH.4>
        <MSH.7>20140207163234</MSH.7>
        <MSH.9>
            <MSG.1>ORU</MSG.1>
            <MSG.2>R01</MSG.2>
        </MSH.9>
        <MSH.10>3ca92c1f-a566-4868-a704-dcb9d0c1fcd3</MSH.10>
        <MSH.11>
            <PT.1>T</PT.1>
        </MSH.11>
        <MSH.12>
            <VID.1>2.6</VID.1>
        </MSH.12>
        <MSH.19>
            <CWE.1>EN</CWE.1>
        </MSH.19>
    </MSH>
    <ORU_R01.PATIENT_RESULT>
        <ORU_R01.PATIENT>
            <PID>
                <PID.1>1</PID.1>
                <PID.3>
                    <CX.1>NNTV19880113</CX.1>
                    <CX.4>
                        <HD.1>Other</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.3>
                    <CX.1>NNTV88011300</CX.1>
                    <CX.4>
                        <HD.1>CANQC</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.3>
                    <CX.1>NNTV0013</CX.1>
                    <CX.4>
                        <HD.1>Other</HD.1>
                    </CX.4>
                    <CX.5>Other</CX.5>
                    <CX.9>
                        <CWE.1>Other</CWE.1>
                    </CX.9>
                </PID.3>
                <PID.5>
                    <XPN.1>
                        <FN.1>NNTEST13</FN.1>
                    </XPN.1>
                    <XPN.2>V12TEST13</XPN.2>
                </PID.5>
                <PID.7>19880113</PID.7>
                <PID.8>F</PID.8>
                <PID.11>
                    <XAD.1>
                        <SAD.1>13 STREET</SAD.1>
                    </XAD.1>
                    <XAD.3>ABJOU</XAD.3>
                    <XAD.5>J1K2L3</XAD.5>
                </PID.11>
            </PID>
            <PRT>
                <PRT.1>1</PRT.1>
                <PRT.4>
                    <UNKNOWN.1>OP</UNKNOWN.1>
                    <UNKNOWN.2>Physician</UNKNOWN.2>
                </PRT.4>
                <PRT.5>
                    <UNKNOWN.1>79335</UNKNOWN.1>
                    <UNKNOWN.2>ZAPHIRATOS</UNKNOWN.2>
                    <UNKNOWN.3>THOMAS</UNKNOWN.3>
                </PRT.5>
                <PRT.14>
                    <UNKNOWN.1>202 - 7200 HUTCHISON</UNKNOWN.1>
                    <UNKNOWN.3>MONTRÉAL</UNKNOWN.3>
                    <UNKNOWN.4>Qc</UNKNOWN.4>
                    <UNKNOWN.5>H3N 1Z2</UNKNOWN.5>
                </PRT.14>
                <PRT.15>
                    <UNKNOWN.1>Work</UNKNOWN.1>
                    <UNKNOWN.2>514</UNKNOWN.2>
                    <UNKNOWN.3>4957932</UNKNOWN.3>
                </PRT.15>
            </PRT>
            <PRT>
                <PRT.1>2</PRT.1>
                <PRT.4>
                    <UNKNOWN.1>PO</UNKNOWN.1>
                    <UNKNOWN.2>Lab</UNKNOWN.2>
                </PRT.4>
                <PRT.8>
                    <UNKNOWN.1>ZAPHIRATOS, T. DR.</UNKNOWN.1>
                    <UNKNOWN.6>GDML</UNKNOWN.6>
                    <UNKNOWN.10>LLZAPHIR</UNKNOWN.10>
                </PRT.8>
                <PRT.14>
                    <UNKNOWN.1>7200 Hutchison</UNKNOWN.1>
                    <UNKNOWN.3>MONTREAL</UNKNOWN.3>
                    <UNKNOWN.4>Qc</UNKNOWN.4>
                    <UNKNOWN.5>H3N 1Z2</UNKNOWN.5>
                </PRT.14>
                <PRT.15>
                    <UNKNOWN.1>Work</UNKNOWN.1>
                    <UNKNOWN.2>495</UNKNOWN.2>
                    <UNKNOWN.3>2555</UNKNOWN.3>
                    <UNKNOWN.5>Fax</UNKNOWN.5>
                    <UNKNOWN.6>495</UNKNOWN.6>
                    <UNKNOWN.7>7932</UNKNOWN.7>
                </PRT.15>
            </PRT>
        </ORU_R01.PATIENT>
        <ORU_R01.ORDER_OBSERVATION>
            <ORC>
                <ORC.3>
                    <EI.1>3872090</EI.1>
                </ORC.3>
                <ORC.5>O</ORC.5>
                <ORC.9>20140206163434</ORC.9>
            </ORC>
            <NTE>
                <NTE.1>1</NTE.1>
                <NTE.2>L</NTE.2>
                <NTE.4>
                    <CWE.1>This requisition was edited and resaved on the2014/02/07 12:06:52 (GMT-05:00)</CWE.1>
                </NTE.4>
                <NTE.5>
                    <XCN.1>GR</XCN.1>
                </NTE.5>
            </NTE>
        </ORU_R01.ORDER_OBSERVATION>
        <ORU_R01.ORDER_OBSERVATION>
            <OBR>
                <OBR.1>1</OBR.1>
                <OBR.3>
                    <EI.1>3872090</EI.1>
                </OBR.3>
                <OBR.4>
                    <CWE.1>2054</CWE.1>
                    <CWE.2>GLUCOSE POS 1:2 H</CWE.2>
                    <CWE.3>GDML</CWE.3>
                </OBR.4>
                <OBR.5>R</OBR.5>
                <OBR.7>20140206163434</OBR.7>
                <OBR.25>I</OBR.25>
            </OBR>
            <ORU_R01.SPECIMEN>
                <SPM/>
            </ORU_R01.SPECIMEN>
        </ORU_R01.ORDER_OBSERVATION>
    </ORU_R01.PATIENT_RESULT>
</ORU_R01>
#
<?xml version="1.0" encoding="UTF-8"?>
<ADT_A01 xmlns="urn:hl7-org:v2xml">
    <MSH>
        <MSH.1>|</MSH.1>
        <MSH.2>^~\&amp;</MSH.2>
        <MSH.3>
            <HD.1>EPIC</HD.1>
        </MSH.3>
        <MSH.4>
            <HD.1>EPICADT</HD.1>
        </MSH.4>
        <MSH.5>
            <HD.1>SMS</HD.1>
        </MSH.5>
        <MSH.6>
            <HD.1>SMSADT</HD.1>
        </MSH.6>
        <MSH.7>
            <TS.1>199912271408</TS.1>
        </MSH.7>
        <MSH.8>CHARRIS</MSH.8>
        <MSH.9>
            <MSG.1>ADT</MSG.1>
            <MSG.2>A04</MSG.2>
        </MSH.9>
        <MSH.10>1817457</MSH.10>
        <MSH.11>
            <PT.1>D</PT.1>
        </MSH.11>
        <MSH.12>
            <VID.1>2.5</VID.1>
        </MSH.12>
    </MSH>
    <PID>
        <PID.2>
            <CX.1>0493575</CX.1>
            <CX.4>
                <HD.1>2</HD.1>
            </CX.4>
            <CX.5>ID 1</CX.5>
        </PID.2>
        <PID.3>
            <CX.1>454721</CX.1>
        </PID.3>
        <PID.5>
            <XPN.1>
                <FN.1>DOE</FN.1>
            </XPN.1>
            <XPN.2>JOHN</XPN.2>
        </PID.5>
        <PID.6>
            <XPN.1>
                <FN.1>DOE</FN.1>
            </XPN.1>
            <XPN.2>JOHN</XPN.2>
        </PID.6>
        <PID.7>
            <TS.1>19480203</TS.1>
        </PID.7>
        <PID.8>M</PID.8>
        <PID.10>
            <CE.1>B</CE.1>
        </PID.10>
        <PID.11>
            <XAD.1>
                <SAD.1>254 MYSTREET AVE</SAD.1>
            </XAD.1>
            <XAD.3>MYTOWN</XAD.3>
            <XAD.4>OH</XAD.4>
            <XAD.5>44123</XAD.5>
            <XAD.6>USA</XAD.6>
        </PID.11>
        <PID.13>
            <XTN.1>(216)123-4567</XTN.1>
        </PID.13>
        <PID.16>
            <CE.1>M</CE.1>
        </PID.16>
        <PID.17>
            <CE.1>NON</CE.1>
        </PID.17>
        <PID.18>
            <CX.1>400003403</CX.1>
        </PID.18>
        <PID.18>
            <CX.1>1129086</CX.1>
        </PID.18>
    </PID>
    <NK1>
        <NK1.2>
            <XPN.1>
                <FN.1>ROE</FN.1>
            </XPN.1>
            <XPN.2>MARIE</XPN.2>
        </NK1.2>
        <NK1.3>
            <CE.1>SPO</CE.1>
        </NK1.3>
        <NK1.5>
            <XTN.1>(216)123-4567</XTN.1>
        </NK1.5>
        <NK1.7>
            <CE.1>EC</CE.1>
        </NK1.7>
    </NK1>
    <PV1>
        <PV1.2>O</PV1.2>
        <PV1.3>
            <PL.1>168 </PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>219</PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>C</PL.1>
        </PV1.3>
        <PV1.3>
            <PL.1>PMA</PL.1>
        </PV1.3>
        <PV1.7>
            <XCN.1>277</XCN.1>
            <XCN.2>
                <FN.1>ALLEN MYLASTNAME</FN.1>
            </XCN.2>
            <XCN.3>BONNIE</XCN.3>
        </PV1.7>
        <PV1.19>
            <CX.1>2688684</CX.1>
        </PV1.19>
        <PV1.44>
            <TS.1>199912271408</TS.1>
        </PV1.44>
        <PV1.50>
            <CX.1>002376853</CX.1>
        </PV1.50>
    </PV1>
</ADT_A01>

Output


Figure 12: Output generated in the Display window for Scenario 2 input

Useful Tips

Please refer to http://www.hl7.org/ for more information about HL7 messages.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.