web stats
Help with XML to HL7 format - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-03-2020, 01:24 PM
jg12345 jg12345 is offline
OBX.3 Kenobi
 
Join Date: Oct 2012
Posts: 106
jg12345 is on a distinguished road
Default Help with XML to HL7 format

I successfully used "Web Service Sender" SOAP to get XML data and routeMessage to different channel. XML data contains many <PatientData> fields which I want to output each into separate messages. Listed below is a sample that includes two patientData records. I set Data Type Inbound for XML and Outbound for HL7 v2.x, but the output does not parse nicely as fields overlap between pipes. What is the best way to convert this to HL7 format?

Code:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header/>
    <s:Body>
        <GetPatientsResponse xmlns="http://www.BLABLA.com/api/schemas/">
            <GetPatientsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <ErrorResponse>
                    <ErrorMessage i:nil="true"/>
                    <IsError>false</IsError>
                    <StackTrace i:nil="true"/>
                </ErrorResponse>
                <SecurityResponse>
                    <Authenticated>true</Authenticated>
                    <Authorized>true</Authorized>
                    <CustomerId>11111</CustomerId>
                    <CustomerKeyValid>true</CustomerKeyValid>
                    <PermissionsMissing>
                        <Permission xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                    </PermissionsMissing>
                    <PracticesAuthorized>
                        <PracticeID xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                            <a:int>1</a:int>
                        </PracticeID>
                    </PracticesAuthorized>
                    <SecurityResult>Success</SecurityResult>
                    <SecurityResultSuccess>true</SecurityResultSuccess>
                </SecurityResponse>
                <Patients>
                    <PatientData>
                        <AddressLine1>123 Love St</AddressLine1>
                        <AddressLine2/>2B
                        <City>SEAFORD</City>
                        <DOB>06/28/1938</DOB>
                        <FirstName>TestFirst1</FirstName>
                        <Gender>F</Gender>
                        <HomePhone>(555) 666-1234</HomePhone>
                        <ID>1670</ID>
                        <LastName>Testlast1</LastName>
                        <MiddleName/>
                        <PracticeId>1</PracticeId>
                        <State>NY</State>
                        <ZipCode>11783</ZipCode>
                    </PatientData>
                    <PatientData>
                        <AddressLine1>666 SMITH STREET</AddressLine1>
                        <AddressLine2/>
                        <City>HICKSVILLE</City>
                        <DOB>11/18/1956</DOB>
                        <FirstName>TestFirst1</FirstName>
                        <Gender>M</Gender>
                        <HomePhone>(666) 555-1212</HomePhone>
                        <ID>135</ID>
                        <LastName>Testlast2</LastName>
                        <MiddleName/>
                        <PracticeId>1</PracticeId>
                        <State>NY</State>
                        <ZipCode>11801</ZipCode>
                    </PatientData>
                </Patients>
            </GetPatientsResult>
        </GetPatientsResponse>
    </s:Body>
</s:Envelope>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation