web stats
How to create multiple OBR in XML through hl7? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2016, 10:56 PM
ferdinand ferdinand is offline
OBX.1 Kenobi
 
Join Date: Sep 2014
Posts: 34
ferdinand is on a distinguished road
Default How to create multiple OBR in XML through hl7?

Hi to all
Mirth 3.3.2
What I’ve got in the input is an hl7 ORU_R01 message , with multiple OBR records like this:
PHP Code:
OBX|1|ST|^FIO2^I||21.0|%|||||F|||20160916084646||
OBX|2|ST|^K+^M||3.2|mmol/L||N|||F|||||
OBX|3|ST|^p50(act)^C||21.06|mmHg||N|||F|||||
OBX|4|ST|^pH^M||7.304|||N|||F|||||
OBX|5|ST|^pH(T)^M||7.304|||N|||F|||||
OBX|6|ST|^pCO2^M||42.9|mmHg||N|||F|||||
OBX|7|ST|^pCO2(T)^M||42.9|mmHg||N|||F|||||
OBX|8|ST|^HCO3-^C||21.3|mmol/L||N|||F|||||
OBX|9|ST|^ABE^C||-4.9|mmol/L||N|||F|||||
OBX|10|ST|^SBE^C||-5.0|mmol/L||N|||F|||||
OBX|11|ST|^SBC^C||20.0|mmol/L||N|||F||||| 
In the Output, I have an xml (to a webservice) looking like this:
PHP Code:
<OBX.3>
<
CE.1>Codigo Resultado</CE.1>
<
CE.2>Descripcion Resultado</CE.2>
<
CE.4>Insertar</CE.4>
</
OBX.3>
<
OBX.5>Valor Resultado</OBX.5>
<
OBX.6>
<
CE.1>ID Unidad</CE.1>
<
CE.2>Nombre Unidad</CE.2>

</
OBX.6>
<
OBX.11>F</OBX.11>
<
OBX.14>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBX.14>
<
OBX.16>
<
XCN.1>CNP</XCN.1>
<
XCN.2>
<
FN.1>APELLIDO1</FN.1>
</
XCN.2>
<
XCN.3>NOMBRE</XCN.3>
<
XCN.4>APELLIDO2</XCN.4>
</
OBX.16>
</
OBX
My concerns are:
┐How can I read this multi-obr message and create as many OBR in the output as obr fields in the original hl7?
My best guess is to iterate with javascript on a sentence like this:
For each obx in msg.obx {
}
But how can I create all this OBX fields in the xml structure?

Thanks for giving me ideas...
Reply With Quote
  #2  
Old 09-21-2016, 06:31 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

First, I assume you mean "OBX" and not "OBR" as your sample contains OBX. Secondly, do you have a full XML sample message/template you are using (without PHI)?
Reply With Quote
  #3  
Old 09-21-2016, 06:44 AM
ferdinand ferdinand is offline
OBX.1 Kenobi
 
Join Date: Sep 2014
Posts: 34
ferdinand is on a distinguished road
Default

Quote:
Originally Posted by mcalKno View Post
First, I assume you mean "OBX" and not "OBR" as your sample contains OBX. Secondly, do you have a full XML sample message/template you are using (without PHI)?
Yes sorry, I was meaning OBx...

Full xml here (anonymized)

PHP Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sas="http://xxx.Servicios.DE/">
   <
soapenv:Header/>
   <
soapenv:Body>
      <
xxx:xxxxxa>
         <
sas:MensEntrada>
            <
ORU_R01 xmlns="urn:hl7-org:v2xml">
    <
MSH>
<
MSH.1>|</MSH.1>
<
MSH.2>^~\&amp;</MSH.2>
<
MSH.3>
<
HD.1>SistemaOrigen</HD.1>
<
HD.2>xxxxxxxx</HD.2>
</
MSH.3>
<
MSH.4>
<
HD.1>CodUndFuncionalOrigen</HD.1>
<
HD.2>CodCentroOrigen</HD.2>
</
MSH.4>
<
MSH.6>
<
HD.2>CentroDestino</HD.2>
</
MSH.6>
<
MSH.7>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
MSH.7>
<
MSH.8>FirmaTicketMaco</MSH.8>
<
MSH.9>
<
MSG.1>ORU</MSG.1>
<
MSG.2>R01</MSG.2>
<
MSG.3>ORU_R01</MSG.3>
</
MSH.9>
<
MSH.10>GUID</MSH.10>
<
MSH.11>
<
PT.1>T</PT.1>
</
MSH.11>
<
MSH.12>
<
VID.1>2.5</VID.1>
</
MSH.12>
<
MSH.13>1</MSH.13>
<
MSH.17>xxx</MSH.17>
<
MSH.18>UNICODE UTF-8</MSH.18>
</
MSH>
<
ORU_R01.PATIENT_RESULT>
<
ORU_R01.PATIENT>
<
PID>
<
PID.3>
<
CX.1>xxxxx</CX.1>
<
CX.4>

<
HD.1>xxx</HD.1>
</
CX.4>
<
CX.5>xxx</CX.5>
<
CX.9>
<
CWE.1>AN</CWE.1>
<
CWE.3>ISO3166-2</CWE.3>
</
CX.9>
</
PID.3>
<
PID.3>
<
CX.1>NHC_PACIENTE</CX.1>
<
CX.4>
<
HD.1>XX</HD.1>
</
CX.4>
<
CX.5>PI</CX.5>
<
CX.9>
<
CWE.1>ID_HOSPITAL</CWE.1>
<
CWE.3>xxxxxxxxxxxxxxxxx</CWE.3>
</
CX.9>
</
PID.3>
<
PID.5>
<
XPN.1>
<
FN.1>${apellidos}</FN.1>
</
XPN.1>
<
XPN.2>${nombre}</XPN.2>
</
PID.5>
<
PID.6>
<
XPN.1>
<
FN.1>APELLIDO2</FN.1>
</
XPN.1>
</
PID.6>
<
PID.7>
<
TS.1>YYYYMMDD</TS.1>
</
PID.7>
</
PID>
<
ORU_R01.VISIT>
<
PV1>
<
PV1.2>I</PV1.2>
<
PV1.3>
<
PL.1>UnidadFuncional</PL.1>
<
PL.2>Habitacion</PL.2>
<
PL.3>Cama</PL.3>
<
PL.4>
<
HD.1>CentroHospitalario</HD.1>
</
PL.4>
</
PV1.3>
<
PV1.19>
<
CX.1>NumeroEpisodio</CX.1>
<
CX.6>
<
HD.1>IDCentro</HD.1>
</
CX.6>
</
PV1.19>
</
PV1>
</
ORU_R01.VISIT>
</
ORU_R01.PATIENT>
<
ORU_R01.ORDER_OBSERVATION>
<
ORC>
<
ORC.1>OK</ORC.1>
<
ORC.2>
<
EI.1>IdSolicitud</EI.1>
</
ORC.2>
<
ORC.3>
<
EI.1>IdNotificacion</EI.1>
</
ORC.3>
<
ORC.5>CM</ORC.5>
<
ORC.9>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
ORC.9>
<
ORC.12>
<
XCN.2>
<
FN.1>APELLIDO1</FN.1>
</
XCN.2>
<
XCN.3>NOMBRE</XCN.3>
<
XCN.4>APELLIDO2</XCN.4>

</
ORC.12>
<
ORC.21>
<
XON.1>Centro que notifica</XON.1>
</
ORC.21>
<
ORC.29>
<
CWE.1>Caracter_Extraccion</CWE.1>
</
ORC.29>
</
ORC>
<
OBR>
<
OBR.1>1</OBR.1>
<
OBR.2>
<
EI.1>IdPrueba</EI.1>
<
EI.2>UnidadFuncionalPrueba</EI.2>
<
EI.3>CodigoCentroOrigen</EI.3>
</
OBR.2>
<
OBR.4>
<
CE.1>TipoPrueba</CE.1>
<
CE.2>TipoPruebaDesc</CE.2>
<
CE.4>Insertar</CE.4>
<
CE.5>NumeroEpisodio</CE.5>
</
OBR.4>
<
OBR.6>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBR.6>
<
OBR.7>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBR.7>
<
OBR.12>
<
CE.1>CodAlerta</CE.1>
<
CE.2>DescripcionAlerta</CE.2>
</
OBR.12>
<
OBR.13>InformacionRelevante</OBR.13>
<
OBR.19>CodEquipo</OBR.19>
<
OBR.20>IdLaboratorio</OBR.20>
<
OBR.22>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBR.22>
<
OBR.24>RAD</OBR.24>
<
OBR.25>F</OBR.25>
<
OBR.32>
<
NDL.1>
<
CNN.2>${apellidos}</CNN.2>
<
CNN.3>${nombre}</CNN.3>
<
CNN.4>APELLIDO2</CNN.4>
</
NDL.1>
<
NDL.2>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
NDL.2>
</
OBR.32>
<
OBR.33>
<
NDL.1>
<
CNN.2>APELLIDO1</CNN.2>
<
CNN.3></CNN.3>
<
CNN.4>APELLIDO2</CNN.4>
</
NDL.1>
</
OBR.33>
<
OBR.36>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBR.36>
</
OBR>
<
ORU_R01.OBSERVATION>
<
OBX>
<
OBX.1>1</OBX.1>
<
OBX.2>TX</OBX.2>
<
OBX.3>
<
CE.1>Codigo Resultado</CE.1>
<
CE.2>Descripcion Resultado</CE.2>
<
CE.4>Insertar</CE.4>
</
OBX.3>
<
OBX.5>Valor Resultado</OBX.5>
<
OBX.6>
<
CE.1>ID Unidad</CE.1>
<
CE.2>Nombre Unidad</CE.2>

</
OBX.6>
<
OBX.11>F</OBX.11>
<
OBX.14>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
OBX.14>
<
OBX.16>
<
XCN.1>CNP</XCN.1>
<
XCN.2>
<
FN.1>APELLIDO1</FN.1>
</
XCN.2>
<
XCN.3>NOMBRE</XCN.3>
<
XCN.4>APELLIDO2</XCN.4>
</
OBX.16>
</
OBX>
</
ORU_R01.OBSERVATION>
<
ORU_R01.SPECIMEN>
<
SPM>
<
SPM.1>1</SPM.1>
<
SPM.2>
<
EIP.1>
<
EI.1>ID Muestra</EI.1>
<
EI.2>Sistema generador ID</EI.2>
</
EIP.1>
</
SPM.2>
<
SPM.4>
<
CWE.1>BPU</CWE.1>
<
CWE.2>Descripcion Tipo Muestra</CWE.2>
</
SPM.4>
<
SPM.7>
<
CWE.1>BCAE</CWE.1>
<
CWE.2>Descripcion Recogida</CWE.2>
</
SPM.7>
<
SPM.8>
<
CWE.1>Codigo Origen</CWE.1>
<
CWE.2>Descripcion Origen</CWE.2>
</
SPM.8>
<
SPM.17>
<
DR.1>
<
TS.1>YYYYMMDDHHMMSS</TS.1>
</
DR.1>
</
SPM.17>
</
SPM>
</
ORU_R01.SPECIMEN>
</
ORU_R01.ORDER_OBSERVATION>
</
ORU_R01.PATIENT_RESULT>
</
ORU_R01>

         </
sas:MensEntrada>
      </
sas:xxxxxxba>
   </
soapenv:Body>
</
soapenv:Envelope

and sample output

PHP Code:
MSH|^~\&|xxx^xx|xx^xx 90 NEO|||2016091608

PID
|1||5336174||sdf sdf^sdf||20160916|M

OBR
|1||22303^Sample #||||||||O||||Venous^||||||||||F|||

NTE|1|L|293^AvisoHbF detectada y compensada

OBX
|1|ST|^FIO2^I||21.0|%|||||F|||20160916084646||

OBX|2|ST|^K+^M||3.2|mmol/L||N|||F|||||

OBX|3|ST|^p50(act)^C||21.06|mmHg||N|||F|||||

OBX|4|ST|^pH^M||7.304|||N|||F|||||

OBX|5|ST|^pH(T)^M||7.304|||N|||F|||||

OBX|6|ST|^pCO2^M||42.9|mmHg||N|||F|||||

OBX|7|ST|^pCO2(T)^M||42.9|mmHg||N|||F|||||

OBX|8|ST|^HCO3-^C||21.3|mmol/L||N|||F|||||

OBX|9|ST|^ABE^C||-4.9|mmol/L||N|||F|||||

OBX|10|ST|^SBE^C||-5.0|mmol/L||N|||F|||||

OBX|11|ST|^SBC^C||20.0|mmol/L||N|||F|||||

OBX|12|ST|^tCO2(P)^C||22.6|mmol/L||N|||F|||||

OBX|13|ST|^tO2^C||8.7|mmol/L||N|||F|||||

OBX|14|ST|^tHb^M||18.0|g/dL||N|||F|||||

OBX|15|ST|^Cl-^M||102|mmol/L||N|||F|||||

OBX|16|ST|^Anion gap (K+)^C||12.8|mmol/L||N|||F|||||

OBX|17|ST|^Anion gap^C||9.7|mmol/L||N|||F|||||

OBX|18|ST|^T^I||37.0|Cel|||||F|||||

OBX|19|ST|^Glu^M||101|mg/dL||N|||F|||||

OBX|20|ST|^Lac^M||6.1|mmol/L||N|||F|||||

OBX|21|ST|^tBil^M||0.9|mg/dL||N|||F|||||

OBX|22|ST|^mOsm^C||272.3|mmol/kg||N|||F|||||

OBX|23|ST|^RHb^M||19.8|%||N|||F|||||

OBX|24|ST|^O2Hb^M||77.7|%||N|||F|||||

OBX|25|ST|^sO2^M||79.7|%||N|||F|||||

OBX|26|ST|^COHb^M||1.6|%||N|||F|||||

OBX|27|ST|^MetHb^M||0.9|%||N|||F|||||

OBX|28|ST|^HbF^M||94|%||N|||F|||||

OBX|29|ST|^Hct^C||55.1|%||N|||F|||||

OBX|30|ST|^pO2^M||35.4|mmHg||N|||F|||||

OBX|31|ST|^pO2(T)^M||35.4|mmHg||N|||F|||||

OBX|32|ST|^Na+^M||133|mmol/L||N|||F|||||

OBX|33|ST|^Ca++^M||1.30|mmol/L||N|||F||||| 

Thanks
Reply With Quote
  #4  
Old 09-21-2016, 06:48 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

Maybe I'm missing something but I plugged your OBX chunk into a simple channel reader and ran it through.

The transformed message into XML by Mirth Connect (3.2.2.7694) looks like this. Doesn't Mirth already go through all the OBX segments?


PHP Code:
<HL7Message>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>1</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>FIO2</OBX.3.2>
            <
OBX.3.3>I</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>%</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8/>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14>
            <
OBX.14.1>20160916084646</OBX.14.1>
        </
OBX.14>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>2</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>K+</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>3.2</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>3</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>p50(act)</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.06</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>4</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pH</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>7.304</OBX.5.1>
        </
OBX.5>
        <
OBX.6/>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>5</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pH(T)</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>7.304</OBX.5.1>
        </
OBX.5>
        <
OBX.6/>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>6</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pCO2</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>42.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>7</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pCO2(T)</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>42.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>8</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>HCO3-</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.3</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>9</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>ABE</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>-4.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>10</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>SBE</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>-5.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>11</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>SBC</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>20.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
</
HL7Message
Reply With Quote
  #5  
Old 09-21-2016, 06:56 AM
ferdinand ferdinand is offline
OBX.1 Kenobi
 
Join Date: Sep 2014
Posts: 34
ferdinand is on a distinguished road
Default

Quote:
Originally Posted by appsbyaaron View Post
Maybe I'm missing something but I plugged your OBX chunk into a simple channel reader and ran it through.

The transformed message into XML by Mirth Connect (3.2.2.7694) looks like this. Doesn't Mirth already go through all the OBX segments?


PHP Code:
<HL7Message>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>1</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>FIO2</OBX.3.2>
            <
OBX.3.3>I</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>%</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8/>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14>
            <
OBX.14.1>20160916084646</OBX.14.1>
        </
OBX.14>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>2</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>K+</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>3.2</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>3</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>p50(act)</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.06</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>4</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pH</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>7.304</OBX.5.1>
        </
OBX.5>
        <
OBX.6/>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>5</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pH(T)</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>7.304</OBX.5.1>
        </
OBX.5>
        <
OBX.6/>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>6</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pCO2</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>42.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>7</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>pCO2(T)</OBX.3.2>
            <
OBX.3.3>M</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>42.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmHg</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>8</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>HCO3-</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>21.3</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>9</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>ABE</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>-4.9</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>10</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>SBE</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>-5.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
    <
OBX>
        <
OBX.1>
            <
OBX.1.1>11</OBX.1.1>
        </
OBX.1>
        <
OBX.2>
            <
OBX.2.1>ST</OBX.2.1>
        </
OBX.2>
        <
OBX.3>
            <
OBX.3.1/>
            <
OBX.3.2>SBC</OBX.3.2>
            <
OBX.3.3>C</OBX.3.3>
        </
OBX.3>
        <
OBX.4/>
        <
OBX.5>
            <
OBX.5.1>20.0</OBX.5.1>
        </
OBX.5>
        <
OBX.6>
            <
OBX.6.1>mmol/L</OBX.6.1>
        </
OBX.6>
        <
OBX.7/>
        <
OBX.8>
            <
OBX.8.1>N</OBX.8.1>
        </
OBX.8>
        <
OBX.9/>
        <
OBX.10/>
        <
OBX.11>
            <
OBX.11.1>F</OBX.11.1>
        </
OBX.11>
        <
OBX.12/>
        <
OBX.13/>
        <
OBX.14/>
        <
OBX.15/>
        <
OBX.16/>
    </
OBX>
</
HL7Message
To be honest I have never used the transformed output! Thanks for the remark.
but the problem is the transformations I have to make to each obx to fit the xml to my customer. Any idea┐?
Reply With Quote
Reply

Tags
mapping to xml, multiple fields, obr

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 12:06 PM.


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