crs4 / hl7apy

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

hl7apy - It doesn't support ORU^R03 message #92

Closed shamim40 closed 2 years ago

shamim40 commented 3 years ago

Hi, I reviewed for ORU^R03 HL7 message type, and it seems it was supported in version 2.1, and then there is no support in later versions of hl7py: see below: hl7apy/v2_1/messages.py ('ORU_R03_PATIENT_RESULT', GROUPS['ORU_R03_PATIENT_RESULT'], (1, -1), 'GRP'),

I am seeing below error in my application: [20210329134612.125] [427627|139936550291200] processMsg ERROR: Exception occured: (can only concatenate str (not "InvalidName") to str) Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/hl7apy/v2_5/init.py", line 41, in get return ELEMENTS[element_type][name] KeyError: 'ORU_R03'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/hl7apy/core.py", line 550, in get_structure reference = load_reference(element.name, element.classname, element.version) File "/usr/local/lib/python3.8/dist-packages/hl7apy/init.py", line 283, in load_reference ref = lib.get(name, element_type) File "/usr/local/lib/python3.8/dist-packages/hl7apy/v2_5/init.py", line 43, in get raise ChildNotFound(name) hl7apy.exceptions.ChildNotFound: No child named ORU_R03

During handling of the above exception, another exception occurred:

Is there a way i can generate ORU^R03 message, just like ORU^R01?

svituz commented 3 years ago

Hi @shamim40, I checked the specification and ORU_R03 messages are present only in the 2.1 hl7 version. So it is correct you cannot create this message in version 2.5

shamim40 commented 2 years ago

Thanks, Closing this issue.