web stats
Formar XML Webservice - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2019, 06:44 AM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 45
mberges is on a distinguished road
Default Formar XML Webservice

Hi, good. I need to create an xml with the following order of headers but I can't establish the order. Could you tell me how to make the heading of each segment, the mapping of the fields I have no problem. Thank you

<ORM_O01 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&amp;</MSH.2>
<MSH.3>
<HD.1>xxx</HD.1>
</MSH.3>
<MSH.4>
<HD.1>xxxx</HD.1>
</MSH.4>
<MSH.5>
<HD.1>xxx</HD.1>
</MSH.5>
<MSH.6>
<HD.1>xxx</HD.1>
</MSH.6>
<MSH.7>
<TS.1>2xxx</TS.1>
</MSH.7>
<MSH.8>xxxx</MSH.8>
<MSH.9>
<MSG.1>ORM</MSG.1>
<MSG.2>O01</MSG.2>
</MSH.9>
<MSH.10></MSH.10>
<MSH.11>
<PT.1>P</PT.1>
</MSH.11>
<MSH.12>
<VID.1>2.5</VID.1>
</MSH.12>
</MSH>
<ORM_O01.PATIENT>
<PID>
<PID.1>1</PID.1>
<PID.3>
<CX.1></CX.1>
<CX.4>
<HD.1>CIC</HD.1>
</CX.4>
<CX.5>CIC</CX.5>
</PID.3>
<PID.3>
<CX.1>200213</CX.1>
<CX.4>
<HD.1>NHC</HD.1>
</CX.4>
<CX.5>NHC</CX.5>
</PID.3>
<PID.3>
<CX.1></CX.1>
<CX.4>
<HD.1></HD.1>
</CX.4>
<CX.5></CX.5>
</PID.3>
<PID.5>
<XPN.1>
<FN.1>xxxx</FN.1>
</XPN.1>
<XPN.2>xxxxx</XPN.2>
</PID.5>
<PID.6>
<XPN.1>
<FN.1/>
</XPN.1>
</PID.6>
<PID.7>
<TS.1>19890602</TS.1>
</PID.7>
<PID.8>F</PID.8>
</PID>
</ORM_O01.PATIENT>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1>xxxx</EI.1>
</ORC.2>
<ORC.3>
<EI.1>xxxx</EI.1>
</ORC.3>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191003120000</TS.1>
</ORC.9>
<ORC.12>
<XCN.1/>
<XCN.2>
<FN.1>xxxxx</FN.1>
</XCN.2>
<XCN.3>xxxxxx</XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
<ORC.21>
<XON.8>
<HD.1/>
</XON.8>
</ORC.21>
</ORC>
<ORM_O01.ORDER_DETAIL>
<ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<OBR>
<OBR.2>
<EI.1>xxxxx</EI.1>
</OBR.2>
<OBR.3>
<EI.1>xxxxx</EI.1>
</OBR.3>
<OBR.4>
<CE.1>51</CE.1>
<CE.2>xxxx</CE.2>
</OBR.4>
</OBR>
</ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>1</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>xxx</CE.1>
<CE.2>xxxx</CE.2>
</OBX.3>
<OBX.5>0.76</OBX.5>
<OBX.6>
<CE.1/>
</OBX.6>
<OBX.7/>
<OBX.8/>
<OBX.11>F</OBX.11>
<OBX.14>xxxxxx</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
</ORM_O01.ORDER_DETAIL>
</ORM_O01.ORDER>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1>xxxx</EI.1>
</ORC.2>
<ORC.3>
<EI.1>xxxx</EI.1>
</ORC.3>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191003120000</TS.1>
</ORC.9>
<ORC.12>
<XCN.1/>
<XCN.2>
<FN.1>xxxxx</FN.1>
</XCN.2>
<XCN.3>xxxxxx</XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
<ORC.21>
<XON.8>
<HD.1/>
</XON.8>
</ORC.21>
</ORC>
<ORM_O01.ORDER_DETAIL>
<ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<OBR>
<OBR.2>
<EI.1>xxxxx</EI.1>
</OBR.2>
<OBR.3>
<EI.1>xxxxxx</EI.1>
</OBR.3>
<OBR.4>
<CE.1>52</CE.1>
<CE.2>xxxxx</CE.2>
</OBR.4>
</OBR>
</ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>2</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>52</CE.1>
<CE.2>xxxx</CE.2>
</OBX.3>
<OBX.5>56.5</OBX.5>
<OBX.6>
<CE.1/>
</OBX.6>
<OBX.7/>
<OBX.8/>
<OBX.11>F</OBX.11>
<OBX.14>20191009104519</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
</ORM_O01.ORDER_DETAIL>
</ORM_O01.ORDER>
</ORM_O01>
Reply With Quote
  #2  
Old 10-21-2019, 07:53 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,107
agermano is on a distinguished road
Default

For building the xml, you likely want to use some combination of outbound code templates, appendChild, and insertChildAfter. There isn't enough information in the post to give a more specific answer.

This is also the same xml format that the strict parser produces, so if it's easier to build your hl7 using the default mirth xml layout, you should be able to do that, and then reserialize to this format.
Reply With Quote
  #3  
Old 10-21-2019, 08:06 AM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 45
mberges is on a distinguished road
Default

I have the problem fixing the following tags

<ORM_O01.ORDER>
<ORC>
<ORM_O01.ORDER_DETAIL>
<ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<OBR>
</ORM_O01.OBRRQDRQ1RXOODSODT_SUPPGRP>
<ORM_O01.OBSERVATION>
<OBX>
</ORM_O01.OBSERVATION>
</ORM_O01.ORDER_DETAIL>
</ORM_O01.ORDER>
Reply With Quote
  #4  
Old 10-21-2019, 08:12 AM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 45
mberges is on a distinguished road
Default

Este es el xml que estoy generando. pero las etiquetas de cabecera no se como generarlas

<ORM_O01>
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&amp;</MSH.2>
<MSH.3>
<HD.1></HD.1>
</MSH.3>
<MSH.4>
<HD.1></HD.1>
</MSH.4>
<MSH.5>
<HD.1></HD.1>
</MSH.5>
<MSH.6>
<HD.1>LAB1</HD.1>
</MSH.6>
<MSH.7>
<TS.1>20191021170754</TS.1>
</MSH.7>
<MSH.8></MSH.8>
<MSH.9>
<MSG.1>ORM</MSG.1>
<MSG.2>O01</MSG.2>
</MSH.9>
<MSH.10>8c9e7bb2-d37a-403f-8f45-d80fe5378a7f</MSH.10>
<MSH.11>
<PT.1>P</PT.1>
</MSH.11>
<MSH.12>
<VID.1>2.5</VID.1>
</MSH.12>
</MSH>
<ORM_O01.PATIENT>
<PID>
<PID.1>1</PID.1>
<PID.3>
<CX.1></CX.1>
<CX.4>
<HD.1>CIC</HD.1>
</CX.4>
<CX.5>CIC</CX.5>
</PID.3>
<PID.3>
<CX.1></CX.1>
<CX.4>
<HD.1>NHC</HD.1>
</CX.4>
<CX.5>NHC</CX.5>
</PID.3>
<PID.3>
<CX.1></CX.1>
<CX.4>
<HD.1></HD.1>
</CX.4>
<CX.5></CX.5>
</PID.3>
<PID.5>
<XPN.1>
<FN.1></FN.1>
</XPN.1>
<XPN.2></XPN.2>
</PID.5>
<PID.6>
<XPN.1>
<FN.1/>
</XPN.1>
</PID.6>
<PID.7>
<TS.1></TS.1>
</PID.7>
<PID.8>M</PID.8>
</PID>
</ORM_O01.PATIENT>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1></EI.1>
</ORC.2>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191021170754</TS.1>
</ORC.9>
<ORC.12>
<XCN.2>
<FN.1></FN.1>
</XCN.2>
<XCN.3></XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
</ORC>
</ORM_O01.ORDER>
<ORM_O01.ORDER_DETAIL>
<OBR>
<OBR.2>
<EI.1></EI.1>
</OBR.2>
<OBR.3>
<EI.1></EI.1>
</OBR.3>
<OBR.4>
<CE.1>52</CE.1>
<CE.2></CE.2>
</OBR.4>
</OBR>
</ORM_O01.ORDER_DETAIL>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>1</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>52</CE.1>
<CE.2></CE.2>
</OBX.3>
<OBX.5>6.5</OBX.5>
<OBX.11>F</OBX.11>
<OBX.14>20191021170753</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1></EI.1>
</ORC.2>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191021170754</TS.1>
</ORC.9>
<ORC.12>
<XCN.2>
<FN.1></FN.1>
</XCN.2>
<XCN.3></XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
</ORC>
</ORM_O01.ORDER>
<ORM_O01.ORDER_DETAIL>
<OBR>
<OBR.2>
<EI.1></EI.1>
</OBR.2>
<OBR.3>
<EI.1></EI.1>
</OBR.3>
<OBR.4>
<CE.1>53</CE.1>
<CE.2></CE.2>
</OBR.4>
</OBR>
</ORM_O01.ORDER_DETAIL>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>2</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>53</CE.1>
<CE.2></CE.2>
</OBX.3>
<OBX.5>2</OBX.5>
<OBX.11>F</OBX.11>
<OBX.14>20191021170753</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1></EI.1>
</ORC.2>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191021170754</TS.1>
</ORC.9>
<ORC.12>
<XCN.2>
<FN.1></FN.1>
</XCN.2>
<XCN.3></XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
</ORC>
</ORM_O01.ORDER>
<ORM_O01.ORDER_DETAIL>
<OBR>
<OBR.2>
<EI.1></EI.1>
</OBR.2>
<OBR.3>
<EI.1></EI.1>
</OBR.3>
<OBR.4>
<CE.1>54</CE.1>
<CE.2></CE.2>
</OBR.4>
</OBR>
</ORM_O01.ORDER_DETAIL>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>3</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>54</CE.1>
<CE.2></CE.2>
</OBX.3>
<OBX.5>3</OBX.5>
<OBX.11>F</OBX.11>
<OBX.14>20191021170753</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
<ORM_O01.ORDER>
<ORC>
<ORC.1>NW</ORC.1>
<ORC.2>
<EI.1></EI.1>
</ORC.2>
<ORC.5>A</ORC.5>
<ORC.9>
<TS.1>20191021170754</TS.1>
</ORC.9>
<ORC.12>
<XCN.2>
<FN.1></FN.1>
</XCN.2>
<XCN.3></XCN.3>
<XCN.6>DR</XCN.6>
</ORC.12>
</ORC>
</ORM_O01.ORDER>
<ORM_O01.ORDER_DETAIL>
<OBR>
<OBR.2>
<EI.1></EI.1>
</OBR.2>
<OBR.3>
<EI.1></EI.1>
</OBR.3>
<OBR.4>
<CE.1>60</CE.1>
<CE.2></CE.2>
</OBR.4>
</OBR>
</ORM_O01.ORDER_DETAIL>
<ORM_O01.OBSERVATION>
<OBX>
<OBX.1>4</OBX.1>
<OBX.2>NM</OBX.2>
<OBX.3>
<CE.1>60</CE.1>
<CE.2></CE.2>
</OBX.3>
<OBX.5>2</OBX.5>
<OBX.11>F</OBX.11>
<OBX.14>20191021170753</OBX.14>
</OBX>
</ORM_O01.OBSERVATION>
</ORM_O01>
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 09:30 PM.


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