Dear All,
Have you ever faced this strange behaviour?
Here is a piece of code:
ca.uhn.hl7v2.model.Message msg = wrappIDXChargeBatch(...);//filling a
ca.uhn.hl7v2.model.v24.message.DFT_P03 message
1. The code:
XMLParser xmlParser = new DefaultXMLParser();
System.out.println( xmlParser.encode( msg ) );
PRINTS:
<?xml version="1.0"?>
<DFT_P03 xmlns="urn:hl7-org:v2xml">
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&</MSH.2>
<MSH.3>
<HD.1>CHARGER</HD.1>
</MSH.3>
<MSH.5>
<HD.1>IDX_TES_CHG</HD.1>
</MSH.5>
<MSH.7>
<TS.1>200704111946</TS.1>
</MSH.7>
<MSH.9>
<MSG.1>DFT^P03</MSG.1>
</MSH.9>
<MSH.10>1176309970171</MSH.10>
<MSH.11>
<PT.1>P^T</PT.1>
</MSH.11>
<MSH.12>
<VID.1>2.3</VID.1>
</MSH.12>
<MSH.18>ASCII</MSH.18>
</MSH>
<EVN>
<EVN.1>DFT_P03</EVN.1>
<EVN.6>
<TS.1>200704111946</TS.1>
</EVN.6>
</EVN>
<PID>
<PID.1>0001</PID.1>
<PID.3>
<CX.1>3620923</CX.1>
<CX.2>6</CX.2>
<CX.3>MRN</CX.3>
</PID.3>
<PID.5>
<XPN.1>
<FN.1>Doe</FN.1>
</XPN.1>
<XPN.2>John</XPN.2>
<XPN.3>X</XPN.3>
</PID.5>
<PID.7>
<TS.1>19341115</TS.1>
</PID.7>
</PID>
<PV1>
<PV1.1>0001</PV1.1>
<PV1.8>
<XCN.2>
<FN.1>DOCTOR, DON</FN.1>
</XCN.2>
</PV1.8>
</PV1>
<DFT_P03.FINANCIAL>
<FT1>
<FT1.1>0001</FT1.1>
<FT1.4>
<TS.1>20070124</TS.1>
</FT1.4>
<FT1.6>CG</FT1.6>
<FT1.10>1</FT1.10>
<FT1.13>
<CE.1>62104</CE.1>
</FT1.13>
<FT1.16>
<PL.1>1</PL.1>
</FT1.16>
<FT1.19>
<CE.1>959.9</CE.1>
<CE.2>OTHER AND UNSPECIFIED INJURY TO UNSPECIFIED
SITE</CE.2>
</FT1.19>
<FT1.20>
<XCN.1>65189</XCN.1>
</FT1.20>
<FT1.25>
<CE.1>99214</CE.1>
</FT1.25>
<FT1.26>
<CE.1>GC</CE.1>
</FT1.26>
<FT1.26>
<CE.1>25</CE.1>
</FT1.26>
</FT1>
</DFT_P03.FINANCIAL>
<DFT_P03.FINANCIAL>
<FT1>
<FT1.1>0001</FT1.1>
<FT1.4>
<TS.1>20070124</TS.1>
</FT1.4>
<FT1.6>CG</FT1.6>
<FT1.10>1</FT1.10>
<FT1.13>
<CE.1>62104</CE.1>
</FT1.13>
<FT1.16>
<PL.1>1</PL.1>
</FT1.16>
<FT1.20>
<XCN.1>65189</XCN.1>
</FT1.20>
<FT1.25>
<CE.1>76942</CE.1>
</FT1.25>
<FT1.26>
<CE.1>GC</CE.1>
</FT1.26>
<FT1.26>
<CE.1>25</CE.1>
</FT1.26>
</FT1>
</DFT_P03.FINANCIAL>
</DFT_P03>
2. And the code:
PipeParser pipeParser = new PipeParser();
System.out.println(pipeParser.encode( msg ));
PRINTS ONLY:
FT1|0001|||20070124||CG||||1|||62104|||1||||65189|||||76942|GC~25IFIED
INJURY TO UNSPECIFIED SITE|65189|||||99214|GC~25
As you can see the PiperParser not only that misses segments but messes the
output big time.
Is there any explanation for this? Am I doing something wrong?
Thanks All,
Constantin Mitocaru
--
View this message in context:
http://www.nabble.com/PipeParser-encoding-corrupted--tf3560506.html#a9943443
Sent from the hl7api-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel