Hi,

I am trying to parse an OMG message containing several orders for image 
diagnostics.

Unfortunately it seems that there is ambiguity in the OMG structure.

My message looks like this:

MSH|^~\&|MYAPP|MY_FACILITY|RADIOLOGY_APP|RADIOLOGY_DEPARTMENT|20091027143626||OMG^O19|1235|P|2.5.1|||AL|AL
PID|||0405771234||Doe^John
ORC|SC|ORD_1234567890|SIEM_2345|REQ_1234123|SC
TQ1|||||||200910301530||R^Routine
OBR||||UXMA00^MR scan of cerebrum||201205081530
ORC|SC|ORD_1234568234||REQ_1234123|SC
TQ1|||||||200910301530||R^Routine
OBR||||UXMB10^MR scan of thyroid gland||201205081530

Instead of interpreting this as two ORDER structures, the second set of ORC,TQ1 
and OBR segments are interpreted as a prior result structure.

MSH
[PATIENT
   PID
]
[ORDER
   ORC
   [TIMING
      TQ1
   ]
   OBR
   [PRIOR_RESULT
      [ORDER_PRIOR
         ORC
         [TIMING_PRIOR
            TQ1
         ]
      ]
      [ORDER_PRIOR
         OBR
      ]
   ]
]

If I insert a bogus BLG segment to finish the first order structure I get the 
desired result

MSH|^~\&|MYAPP|MY_FACILITY|RADIOLOGY_APP|RADIOLOGY_DEPARTMENT|20091027143626||OMG^O19|1235|P|2.5.1|||AL|AL
PID|||0405771234||Doe^John
ORC|SC|ORD_1234567890|SIEM_2345|REQ_1234123|SC
TQ1|||||||200910301530||R^Routine
OBR||||UXMA00^MR scan of cerebrum||201205081530
BLG
ORC|SC|ORD_1234568234||REQ_1234123|SC
TQ1|||||||200910301530||R^Routine
OBR||||UXMB10^MR scan of thyroid gland||201205081530

MSH
[PATIENT
   PID
]
[ORDER
   ORC
   [TIMING
      TQ1
   ]
   OBR
   BLG
]
[ORDER
   ORC
   [TIMING
      TQ1
   ]
   OBR
]

Is bogus segments the way to go or are there better ways to circumvent the 
ambiguity in messages with HAPI?


Kind regards
Søren Therkildsen
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to