hl7apy
hl7apy copied to clipboard
<CRLF> at the end of a file with find_groups=false will throw a "Segment not found" error
When attempting to parse a message, with find_groups=False, files with "\r\n" on the final line will fail as the final segment will be "\n", which is then stripped to "".
This causes an key not found exception when attempting to retrieve the element name for that "segment".
HL7 spec version used: 2.3.1 Message type: ORU_R01
You'll need to replace the sequence '\n'r' to '\r' before parsing the message with the library