crs4 / hl7apy

Python library to parse, create and handle HL7 v2 messages.
http://crs4.github.io/hl7apy/
MIT License
224 stars 88 forks source link

fix(fields/v2.7): Fix TQ1_1 defined as sequence instead of leaf (Made… #120

Closed jgarciaroca closed 2 months ago

jgarciaroca commented 3 months ago

… Validation fail)

jgarciaroca commented 2 months ago

@svituz can you check this? Unless this gets corrected, no 2.7 message can be created if it contains TQ1 segment.

hl7apy/core.py", line 582, in _parse_structure for c in children: TypeError: 'NoneType' object is not iterable

As it's defined as 'sequence' intead of 'leaf' it tries to access the children that is None and fails.