nHapiNET / nHapi

nHapi is the .Net port of the original Java project HAPI.
Mozilla Public License 2.0
273 stars 155 forks source link

`ORL_O34` structure definition contains cyclic reference #298

Closed BogiG closed 2 years ago

BogiG commented 2 years ago

Parsing an ORL_O34 Message gets a stackoverflow-exception

See HAPI BUG: https://sourceforge.net/p/hl7api/bugs/150/

For this reason parsing ORL_O34 message cause StackOverflowError.

Current simplified definition (only relevant branch of message strucutre) is:

ORL_O34
└── ORL_O34_RESPONSE
    └── ORL_O34_PATIENT
        └── ORL_O34_SPECIMEN
            └── ORL_O34_ORDER
                └── ORL_O34_OBSERVATION_REQUEST
                    └── ORL_O34_SPECIMEN (!cyclic reference).

Instead of last ORL_O34_SPECIMEN there should be ORL_O34_OBSERVATION_REQUEST_SPECIMEN.

Bug in ORL_O34_OBSERVATION_REQUEST.cs - Line 30

This is problem in v2.5 and v2.5.1.

just try to parse this:

MSH|^~\&|software|LAB Name|LIS|LIS Facility|20220519155702||ORL^O34^ORL_O34|19010ca7-337e-4c97-b8c9-3a325ea4be8d|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE
MSA|AA|eb8b393a-d3e6-47bb-8f85-80f7478cf227

can you confirm?

regards, bernhard

BogiG commented 2 years ago

missing https://hapifhir.github.io/hapi-hl7v2/v251/apidocs/ca/uhn/hl7v2/model/v251/group/ORL_O34_OBSERVATION_REQUEST_SPECIMEN.html

milkshakeuk commented 2 years ago

@BogiG I can confirm this is a bug, will look into this when I can.

milkshakeuk commented 2 years ago

@BogiG I am almost done with the fix for this issue.

milkshakeuk commented 2 years ago

@BogiG this fix will be in the next release.

milkshakeuk commented 1 year ago

@BogiG this change is in the latest 3.2.0 version.