Menu

Home

FiveO

Usage of HL7X:

public String transformHL7toXML(String hl7) throws Exception {
    HL7X hl7x = new HL7X();
    String xml = hl7x.toXML(hl7);
    return xml;
}

HL7X transforms any HL7. Example:

MSH|^~\&|||||20121116122025||ADT^A01|5730224|P|2.5||||||UNICODE UTF-8
EVN|A01|20130120151827
PID||0|123||Name^Firstname^^^^||193106170000|w
PV1||E|

to such XML:

<?xml version="1.0" encoding="UTF-8"?>
<HL7X>
    <HL7X>
        <MSH>
            <MSH.1>^~\&amp;</MSH.1>
            <MSH.6>20121116122025</MSH.6>
            <MSH.8>
                <MSH.8.1>ADT</MSH.8.1>
                <MSH.8.2>A01</MSH.8.2>
            </MSH.8>
            <MSH.9>5730224</MSH.9>
            <MSH.10>P</MSH.10>
            <MSH.11>2.5</MSH.11>
            <MSH.17>UNICODE UTF-8</MSH.17>
        </MSH>
        <EVN>
            <EVN.1>A01</EVN.1>
            <EVN.2>20130120151827</EVN.2>
        </EVN>
        <PID>
            <PID.2>0</PID.2>
            <PID.3>123</PID.3>    
            <PID.5>
                <PID.5.1>Name</PID.5.1>
                <PID.5.2>Firstname</PID.5.2>
            </PID.5>
            <PID.7>193106170000</PID.7>
            <PID.8>F</PID.8>
        </PID>
        <PV1>
            <PV1.2>E</PV1.2>            
        </PV1>
    </HL7X>
</HL7X>

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.