· May 24

Cannot parse valid HL7 message

I'm having problems with an HL7 message that is not properly parsed by IRIS (any version, including Ensemble).

The message is a OML_O21 and is valid, in fact is similar of what is described in the document "IHE Laboratory Technical Framework, Volume 2a (LAB TF-2a) version 6.0".
This is the sample from the IHE document (paragraph 2315):

PID|1||12345^5^M10^Memphis_Hosp^PI||EVERYMAN^ADAM^^JR^^^L|19800101|M 2320
OBR||555_1^chemistry||GLUC^GLUCOSE^L||||||1234^BLEEDER|S|||||222222^PHYSICIAN^^^^DR|822325 1
SPM|1|123456781^gastric ||SER|||||||P||||||200309060735|200309060821||||||||1
TQ1|||||||||A 2330
OBR||555_2^chemistry||GLUC^GLUCOSE^L||||||1234^BLEEDER|S||||| 222222^PHYSICIAN^^^^DR|821

The result in IRIS is:

Is the IHE document sample an invalid message?
Because of this issue I cannot handle this message in rules and DTL

Discussion (6)4
Log in or sign up to continue

Looking through the HL7 2.5 OML_O21 structure as supplied by InterSystems, you'll find that there's a nested PIDgrpgrp() under ORCgrp().OBRgrp() that has a subordinate ORCgrp(). It looks like the parse is attempting to match on the required OBR segment in the nested PIDgrpgrp().ORCgrp().

You have a couple of options ... both of which require a custom schema to match your message. The first is to make the OBR segment in the PIDGrpgrp().ORCgrp() optional; the second is to remove the PIDgrpgrp() grouping entirely in the custom schema.

EDIT: The first option doesn't work since the ORC matches on the optional ORC segment in the nested PIDgrpgrp.ORCgrp(), which makes it attempt to match on the required PIDgrpgrp.ORCgrp().OBXgrp().