Skip to content
Advertisement

How to correctly parse an HL7 message using python HL7Apy?

Here is my code:

JavaScript

result:

JavaScript

It shows only the first segment, seems simple but I don’t know what i’m doing wrong.

I’ve tried from a text file, passing the message directly or even with another HL7 message, but always got same results.

Here is the message:

JavaScript

Here is my message in notepad++ where all characters are shown: Message in notepad++

Advertisement

Answer

by disabling find_groups like this msg = parser.parse_message(hl7, find_groups=False) My messages are now parsed correctly.

Thx to @sqlab and @badger0053 for help, i was able to make a progression.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement