Menu

#27 Error in Parsing Non repeatable segments

open
nobody
0.5 (8)
5
2014-07-12
2007-12-17
Anonymous
No

Hello,

while parsing an ORM_O01 message i found what i think is an error.
I parse it first with the PipeParser and after that with the DefaultXMLParser.

here is the message:

MSH|^~\\&|VERBENA|PRAEZISION|RIS|SYNCROMED|20070828135556+0000||ORM^O01|5366|P|2.5| PID|||410379^^^SILVANI||GONZI^||19200202000000+0000|F|||VIA MARZO, 13 ^BG^MARCO^BG24027100^M^ITALIA016144~VIA MARZO, 13 ^BG^MARCO^BG24027100^H^ITALIA016144~^BG^MARCO^BG^^100^B^ITALIA016144|||||||AAAAAAAAAAAAAAAA|228PP272||||016144|||100^ITALIA|\r" PD1|||ASL DELLA PROVINCIA DI BERGAMO^^^^^^^^^301030| PV1||E|||||133429^ROSSI^ENRICO|9PRZMARK^VERDI^MARCO^^^^^^^^^^9||114||||||||||||||||||||||||||||||||A02|||||||||V| ORC|NW|67262|5189|2007100059|PR||1.000000^^^20070828135500+0000||20070828135500+0000|||9PRZMARK^VERDI^MARCO|||||114^PRONTO SOCCORSO|
OBR|1|67262|5189|1223^RX PELVI (bacino)||||||||3|RRR|||9PRZMARK^VERDI||||||||1|||1.000000^^^20070828135500+0000|
OBR|2|67262|5189|1220^RX SPALLA||||||||3|RRR|||9PRZMARK^VERDI||||||||1|||1.000000^^^20070828135500+0000| OBR|2|67262|5189|1220^RX SPALLA||||||||3|RRR|||9PRZMARK^VERDI||||||||1|||1.000000^^^20070828135500+0000| ORC|NW|67262|5190|2007100059|PR||1.000000^^^20070828135500+0000||20070828135500+0000|||9PRZMARK^VERDI^MARCO|||||114^PRONTO SOCCORSO|
OBR|1|67262|5190|8001^TAC CAPO||||||||3|RRR|||9PRZMARK^VERDI||||||||7|||1.000000^^^20070828135500+0000|\r" ZDS|1.2.300.4005|a^b^c|Application|DICOM|";

I know that OBR is Not Repeatable, and it is configured as Not Repeatable on the model. So i expect that, if i have 3 OBR Segments after an ORC in my message, the HAPI PipeParser will throw an exception.

Instead of this i find 1 OBR inside the ORDER_DETAIL Group, which is correct, and the remaining 2 instances of OBR are found inside the group OBSERVATION which is , on my opinion, wrong. Wrong because in the model OBR segment is only allowed inside the ORDER_DETAIL group.
In the OBSERVATION group only OBX and NTE are allowed, not OBR.

Can you please tell me if this is correct or not?
And can you give me an idea on how to solve this problem?

Greetings,
Fabio

Here the result after parsing.

<ORM_O01.ORDER_DETAIL>
<OBR>
<OBR.1>1</OBR.1>
<OBR.2>
<EI.1>67262</EI.1>
</OBR.2>
<OBR.3>
<EI.1>5189</EI.1>
</OBR.3>
<OBR.4>
<CE.1>1223</CE.1>
<CE.2>RX PELVI (bacino)</CE.2>
</OBR.4>
<OBR.12>
<CE.1>3</CE.1>
</OBR.12>
<OBR.13>RRR</OBR.13>
<OBR.16>
<XCN.1>9PRZMARK</XCN.1>
<XCN.2>
<FN.1>VERDI</FN.1>
</XCN.2>
</OBR.16>
<OBR.24>1</OBR.24>
<OBR.27>
<TQ.1>
<CQ.1>1.000000</CQ.1>
</TQ.1>
<TQ.4>
<TS.1>20070828135500+0000</TS.1>
</TQ.4>
</OBR.27>
</OBR>
<RQD/>
<RQ1/>
<RXO/>
<ODS/>
<ODT/>
<NTE/>
<CTD/>
<DG1/>
<ORM_O01.OBSERVATION>
<OBX/>
<NTE/>
<OBR>
<OBR.1>2</OBR.1>
<OBR.2>
<EI.1>67262</EI.1>
</OBR.2>
<OBR.3>
<EI.1>5189</EI.1>
</OBR.3>
<OBR.4>
<CE.1>1220</CE.1>
<CE.2>RX SPALLA</CE.2>
</OBR.4>
<OBR.12>
<CE.1>3</CE.1>
</OBR.12>
<OBR.13>RRR</OBR.13>
<OBR.16>
<XCN.1>9PRZMARK</XCN.1>
<XCN.2>
<FN.1>VERDI</FN.1>
</XCN.2>
</OBR.16>
<OBR.24>1</OBR.24>
<OBR.27>
<TQ.1>
<CQ.1>1.000000</CQ.1>
</TQ.1>
<TQ.4>
<TS.1>20070828135500+0000</TS.1>
</TQ.4>
</OBR.27>
</OBR>
<OBR>
<OBR.1>2</OBR.1>
<OBR.2>
<EI.1>67262</EI.1>
</OBR.2>
<OBR.3>
<EI.1>5189</EI.1>
</OBR.3>
<OBR.4>
<CE.1>1220</CE.1>
<CE.2>RX SPALLA</CE.2>
</OBR.4>
<OBR.12>
<CE.1>3</CE.1>
</OBR.12>
<OBR.13>RRR</OBR.13>
<OBR.16>
<XCN.1>9PRZMARK</XCN.1>
<XCN.2>
<FN.1>VERDI</FN.1>
</XCN.2>
</OBR.16>
<OBR.24>1</OBR.24>
<OBR.27>
<TQ.1>
<CQ.1>1.000000</CQ.1>
</TQ.1>
<TQ.4>
<TS.1>20070828135500+0000</TS.1>
</TQ.4>
</OBR.27>
</OBR>
</ORM_O01.OBSERVATION>
</ORM_O01.ORDER_DETAIL>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.