Given the following message:
MSH|^&|XXX|LIFE|YYY|EFIL|20160804220502.3210+0100||OUL^R22^OUL_R22|HL7Gtw01565728BAF100|P|2.5||||||8859/1
PID|1||11^^^PK^PK15.478.857-3^^^CF^NNITA15478857-3^^^CS^SS2000091931^^^LIS^LIS||TEST@PINO^TEST TEST||19880218|M|||||28888888^PRN^PH^^^^^^^^^28888888|||||15.478.857-3|15478857-3
PV1|1|I|100^^^^^^^^DiagnomedLab||||||||||||||||109101|||||||||||||||||||||||||20160804
SPM|1|2007402901||15^Suero|||||||||||||20160804000000
OBR|1|109101-1|20074029^DN^109101-20074029-201608040000|0302047^GLUCOSA^DN^0302047@1^^DN|||201608040000|||||||||admin241-1||||||||LAB-1|C||^^^201608040000
ORC|SC|109101-1|20074029^DN^109101-20074029-201608040000|109101^DN|CM||^^^201608040000||20160804160500|||admin241-1|||||||||DiagnomedLab^^^^^^FI^^^100
TQ1|1||||||201608040000||R
OBX|1|NM|0302047^GLUCOSA^DN^0302047@1^^DN||85^^Hexoquinasa^false|mg/dL|70 - 100|false||0302047|C|||20160804160300||Utente Demo^Sin RUT
SPM|2|2007402902||15^Suero|||||||||||||20160804000000
OBR|1|109101-2|20074029^DN^109101-20074029-201608040000|0302060^ALBUMINA^DN^0302060@1^^DN|||201608040000|||||||||admin241-1||||||||LAB-1|C||^^^201608040000
ORC|SC|109101-2|20074029^DN^109101-20074029-201608040000|109101^DN|CM||^^^201608040000||20160804160500|||admin241-1|||||||||DiagnomedLab^^^^^^FI^^^100
TQ1|1||||||201608040000||R
OBX|1|NM|0302060^ALBUMINA^DN^0302060@1^^DN||4.5^^BCP Mod.^false|g/dL|3.4 - 5|false||0302060|C|||20160804160300||Utente Demo^Sin RUT
OBR|2|109101-3|20074029^DN^109101-20074029-201608040000|0303024^HORMONA TIROESTIMULANTE^DN^0303024@1^^DN|||201608040000|||||||||admin241-1||||||||LAB-1|C||^^^201608040000
ORC|SC|109101-3|20074029^DN^109101-20074029-201608040000|109101^DN|CM||^^^201608040000||20160804160500|||admin241-1|||||||||DiagnomedLab^^^^^^FI^^^100
TQ1|1||||||201608040000||R
OBX|1|NM|0303024^HORMONA TIROESTIMULANTE^DN^0303024@1^^DN||4.1^^Quimioluminiscencia^false|uUI/mL|0.35 - 5.5|false||0303024|C|||20160804160300||Utente Demo^Sin RUT
OBR|3|109101-4|20074029^DN^109101-20074029-201608040000|0303027^TIROXINA (T4)^DN^0303027@1^^DN|||201608040000|||||||||admin241-1||||||||LAB-1|C||^^^201608040000
ORC|SC|109101-4|20074029^DN^109101-20074029-201608040000|109101^DN|CM||^^^201608040000||20160804160500|||admin241-1|||||||||DiagnomedLab^^^^^^FI^^^100
TQ1|1||||||201608040000||R
OBX|1|NM|0303027^TIROXINA (T4)^DN^0303027@1^^DN||13^^Quimioluminiscencia^false|ug/dL|4.5 - 12.5|false||0303027|C|||20160804160300||Utente Demo^Sin RUT
SPM|3|2007402903||14^Sangre|||||||||||||20160804000000
OBR|1|109101-5|20074029^DN^109101-20074029-201608040000|0301041^HEMOGLOBINA GLICOSILADA^DN^0301041@1^^DN|||201608040000|||||||||admin241-1||||||||LAB-1|C||^^^201608040000
ORC|SC|109101-5|20074029^DN^109101-20074029-201608040000|109101^DN|CM||^^^201608040000||20160804160500|||admin241-1|||||||||DiagnomedLab^^^^^^FI^^^100
TQ1|1||||||201608040000||R
OBX|1|NM|0301041^HEMOGLOBINA GLICOSILADA^DN^0301041@1^^DN||5.3^^HPLC-Tosoh G8^false|%|No Diab\X00E9\tico\X000D.sp\Diab\X00E9\tico bien controlado: <7.0\X000D\.sp\Diab\X00E9\tico medio controlado: 7.00 - 8.00\X000D\.sp\Diab\X00E9\tico mal controlado: >8.00|false||0301041|C|||20160804160300||Utente Demo^Sin RUT
I should get:
1 SPM with 1 ORDER
1 SPM with 2 ORDER
1 SPM with 1 ORDER
But i only get the last SPM and ORDER (hemoglobina)
Im parsing like this:
PipeParser parser = new PipeParser(); IMessage hl7Message = parser.Parse(data);
Then converting it to XML.
DefaultXMLParser xmlParser = new DefaultXMLParser(); string xmlAsString = xmlParser.EncodeDocument(hl7Message).InnerXml;
Im doing something wrong or there is a bug in the api ?
Thanks in advance
Given the following message:
I should get:
1 SPM with 1 ORDER
1 SPM with 2 ORDER
1 SPM with 1 ORDER
But i only get the last SPM and ORDER (hemoglobina)
Im parsing like this:
PipeParser parser = new PipeParser(); IMessage hl7Message = parser.Parse(data);Then converting it to XML.
DefaultXMLParser xmlParser = new DefaultXMLParser(); string xmlAsString = xmlParser.EncodeDocument(hl7Message).InnerXml;Im doing something wrong or there is a bug in the api ?
Thanks in advance