I'm not sure what's going on with the parser. It's not parsing out the PID
information correctly. When I've ran the parser to convert from a format that
does look correct to HL7v2, it works, but it seems it hates this format which
is used by one of the largest health systems:
I have the following HL7v2 message:
MSH|^~\\&|SOME_SOURCE|SOME_ORGANIZATION|BCSYSTEM|BCSYSTEM|20130213094112||QBP^Q22^QBP_Q21|46320||2.4
QPD|Q22^IHE PDQ
Query|46320|@PID.3.1^2162973~@PID.3.4~@PID.3.5~@PID.5.1^phsaempifive~@PID.5.2^Helium~@PID.7^19780930000000~@PID.8^F||Exact
RCP|D|25^RD
Running the following code:
PipeParser p = new PipeParser();
Message m = p.parse(hl7Message); //pasted above
XMLParser xmlParser = new DefaultXMLParser();
String ackMessageInXML = xmlParser.encode(m);
System.out.println(ackMessageInXML);
====
I get the XML output which seems incorrect, why are the PID's not
<?xml version="1.0"?>
<QBP_Q21 xmlns="urn:hl7-org:v2xml">
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&</MSH.2>
<MSH.3>
<HD.1>SOME_SOURCE</HD.1>
</MSH.3>
<MSH.4>
<HD.1>SOME_ORGANIZATION</HD.1>
</MSH.4>
<MSH.5>
<HD.1>BCSYSTEM</HD.1>
</MSH.5>
<MSH.6>
<HD.1>BCSYSTEM</HD.1>
</MSH.6>
<MSH.7>
<TS.1>20130213094112</TS.1>
</MSH.7>
<MSH.9>
<MSG.1>QBP</MSG.1>
<MSG.2>Q22</MSG.2>
<MSG.3>QBP_Q21</MSG.3>
</MSH.9>
<MSH.10>46320</MSH.10>
<MSH.12>
<VID.1>2.4</VID.1>
</MSH.12>
</MSH>
<QPD>
<QPD.1>
<CE.1>Q22</CE.1>
<CE.2>IHE PDQ Query</CE.2>
</QPD.1>
<QPD.2>46320</QPD.2>
<QPD.3>
<UNKNOWN.1>@PID.3.1</UNKNOWN.1>
<UNKNOWN.2>2162973</UNKNOWN.2>
</QPD.3>
<QPD.3>@PID.3.4</QPD.3>
<QPD.3>@PID.3.5</QPD.3>
<QPD.3>
<UNKNOWN.1>@PID.5.1</UNKNOWN.1>
<UNKNOWN.2>phsaempifive</UNKNOWN.2>
</QPD.3>
<QPD.3>
<UNKNOWN.1>@PID.5.2</UNKNOWN.1>
<UNKNOWN.2>Helium</UNKNOWN.2>
</QPD.3>
<QPD.3>
<UNKNOWN.1>@PID.7</UNKNOWN.1>
<UNKNOWN.2>19780930000000</UNKNOWN.2>
</QPD.3>
<QPD.3>
<UNKNOWN.1>@PID.8</UNKNOWN.1>
<UNKNOWN.2>F</UNKNOWN.2>
</QPD.3>
<QPD.5>Exact</QPD.5>
</QPD>
<RCP>
<RCP.1>D</RCP.1>
<RCP.2>
<CQ.1>25</CQ.1>
<CQ.2>
<CE.1>RD</CE.1>
</CQ.2>
</RCP.2>
</RCP>
</QBP_Q21>
Any thoughts?
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel