Question
· 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):

MSH|^~\&|OF|Chemistry|AM|Automation|200309060825||OML^O21^OML_O21|msgOF101|T|2.5|123||||USA||EN
PID|1||12345^5^M10^Memphis_Hosp^PI||EVERYMAN^ADAM^^JR^^^L|19800101|M 2320
PV1|1|O|Ward|||||||||||||||12345
ORC|NW|||666^gastric|||||200309060824|222221^NURSE^NANCY|||||||||||Entero-gastric^^^^^^FI^^^EG02
TQ1|||||||||A
OBR||555_1^chemistry||GLUC^GLUCOSE^L||||||1234^BLEEDER|S|||||222222^PHYSICIAN^^^^DR|822325 1
SPM|1|123456781^gastric ||SER|||||||P||||||200309060735|200309060821||||||||1
ORC|NW|||666^gastric|||||200309060710|222221^NURSE^NANCY|||||||||||Entero-gastric^^^^^^FI^^^EG02
TQ1|||||||||A 2330
OBR||555_2^chemistry||GLUC^GLUCOSE^L||||||1234^BLEEDER|S||||| 222222^PHYSICIAN^^^^DR|821
SPM|1|123456782^gastric||SER|||||||P||||||200309060755|200309060821||||||||1

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().

Thank you, Jeffrey, I had eventually resolved it this way. However, I didn't like using this method; in fact, the system is declaring a document that is actually valid and standard as invalid. Creating a custom schema to handle a standard HL7 honestly doesn't appeal to me much. Anyway, thank you very much for the response; indeed, that's exactly what I did, and it's working! :)