Closed Blackglade closed 2 months ago
@Blackglade
Based on the HL7 v2.3 specification, the OBR segment has a maximum of 43 fields. The field "OBR-44 Procedure Code (CE)" that you're trying to parse does not exist in version 2.3. It was introduced in version 2.3.1 and is available in later versions.
This is why the parse_message function is returning "Field of type None" for OBR-44. The behavior you're observing is consistent with the HL7 v2.3 standard and is not a defect in the parser.
If you need to parse messages with OBR-44, you should consider using a message or version HL7 v2.3.1 or later.
For more information, you can refer to the HL7 v2.3 specification here: HL7 v2.3 Specification.
@Blackglade I'm closing the issue since @germiBest (thanks :) ) already answered
I have this anonymized HL7 message:
Here is my code to parse the message:
The issue is the output I get when I print at the end looks something like this:
OBR 44 keeps getting parsed in the parse_message function as a Field of type None instead of OBR-44. This is confusing because when I run the following code:
It seems to parse and print the procedure code properly. Not sure if this is a bug or am I doing somethign wrong?