Thanks for pointing that out, I have fixed it and re uploaded the screenshot. Also I have pasted below a sample source message that I have been testing with, this is a sample message, all the values in the message are fake -
MSH|^~\&|EMR|Main Hospital|LIS|Hospital Lab|20250609140000||OML^O21^OML_O21|MSG12345|P|2.5|||||||
PID|1||123456789^^^Hospital^MR||Doe^John^A||19800515|M|||123 Main St^^Anytown^ST^12345^USA||(555)123-4567||S||12345678|123-45-6789|||||||||||
PV1|1|I|ICU^101^A|E|||12345^Smith^Jane^M^MD^|12345^Smith^Jane^M^MD^||||19|||12345^Smith^Jane^M^MD^|INP|12345||||||||||||||||||||20250609120000|||||||
ORC|NW|ORD12345|ORD12345||SC||^^^20250609140000^^R|20250609140000|||12345^Johnson^Mary^L^MD^|||||20250609140000|Hospital Lab|123 Lab St^^Anytown^ST^12345^USA|(555)555-1234|
OBR|1|ORD12345||CBC^Complete Blood Count^L|||20250609140000|||||||A|12345^Johnson^Mary^L^MD^|(555)555-1234||||||||||||||||20250609140000|
NTE|1|L|Patient has history of anemia. Please check CBC.|
ORC|NW|ORD12346|ORD12346||SC||^^^20250609140500^^R|20250609140500|||12345^Johnson^Mary^L^MD^|||||20250609140500|Hospital Lab|123 Lab St^^Anytown^ST^12345^USA|(555)555-1234|
OBR|1|ORD12346||CMP^Comprehensive Metabolic Panel^L|||20250609140500|||||||A|12345^Johnson^Mary^L^MD^|(555)555-1234||||||||||||||||20250609140500|
NTE|1|L|Patient on diuretics - monitor electrolytes.|
ORC|NW|ORD12347|ORD12347||SC||^^^20250609141000^^R|20250609141000|||12345^Johnson^Mary^L^MD^|||||20250609141000|Hospital Lab|123 Lab St^^Anytown^ST^12345^USA|(555)555-1234|
OBR|1|ORD12347||LIPID^Lipid Panel^L|||20250609141000|||||||A|12345^Johnson^Mary^L^MD^|(555)555-1234||||||||||||||||20250609141000|
NTE|1|L|Fasting sample required. Patient NPO since midnight.|
ORC|NW|ORD12348|ORD12348||SC||^^^20250609141500^^R|20250609141500|||67890^Williams^Robert^K^MD^|||||20250609141500|Hospital Lab|123 Lab St^^Anytown^ST^12345^USA|(555)555-1234|
OBR|1|ORD12348||UA^Urinalysis^L|||20250609141500|||||||A|67890^Williams^Robert^K^MD^|(555)555-1234||||||||||||||||20250609141500|
NTE|1|L|Clean catch midstream specimen.|
ORC|NW|ORD12349|ORD12349||SC||^^^20250609142000^^S|20250609142000|||12345^Johnson^Mary^L^MD^|||||20250609142000|Hospital Lab|123 Lab St^^Anytown^ST^12345^USA|(555)555-1234|
OBR|1|ORD12349||PT^Prothrombin Time^L|||20250609142000|||||||S|12345^Johnson^Mary^L^MD^|(555)555-1234||||||||||||||||20250609142000|
NTE|1|L|Patient on warfarin therapy. STAT order for bleeding.|
Hi Jeffery,
Thanks for the insight.
I tired testing by filling in the required fields in the test message.
The main issue still remains which is it is unable to loop over ORC segments. It looks like there's a nested
PIDgrpgrp()
underORCgrp().OBRgrp()
that contains a subordinateORCgrp()
. For some reason, the system is unable to loop over theORC
group in this structure. Interestingly, when I removed the OBR()
, from the message structure the system was able to successfully loop over multipleORC
segments. Also, if I remove this optionalPIDgrpgrp()
from the message specification, the issue appears to be resolved.I’m not sure why that nested structure exists. Is it standard for HL7 OML^O21? If it is, Intersystems should ideally provide a clearer error message to help us troubleshoot this more effectively.