Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NonGreedyMode causing issues parsing ORU^R01 #105

Open
milkshakeuk opened this issue Oct 17, 2023 · 0 comments
Open

NonGreedyMode causing issues parsing ORU^R01 #105

milkshakeuk opened this issue Oct 17, 2023 · 0 comments

Comments

@milkshakeuk
Copy link

milkshakeuk commented Oct 17, 2023

Hi @jamesagnew @ohr someone has created a discussion on nhapi for this, with nhapi being a port of hapi the exact same thing happens.

given the following er7.

MSH|^~\&|APL|CMFL|APL2|CMFL|20230908152100||ORU^R01|055eec95-3ac9-4d1a-95d8-e09e8e223e8b|P|2.5|||AL
PID||1092902|1092902^^^CB^NS|^^^N_BI|ROSA^ABEL JOÃO^||19411015|M|||AV JOÃO PAULO II LT 544 3 D^^N/A^^1900-000^||^^^^^^|^^^^^^||||||||||||||||N
NTE|1|O|teste|1R
PV1||Consultas|||||||||null||||||||V.OP000002511|||S
ORC|SC|TH70|TCMFL2023000005||CM||1.000
OBR||TH70|TCMFL2023000005|26390-5^Rx Mão - direita, 2incidências|||20230908152100|||||||||||TCMFL2023000005|||CR|||CR|||1^^^|||||228549868|228549868|228549868&&medicoteste||||||||||||TCMFL2023000005^^ACCESSION_NUMBER
OBX|1|ST|^SR Instance UID||2.25.1890683.1.1||||||F||||||

When parsed with NonGreedyMode set to true the following exception occurs in nhapi:
image

and the same in hapi.

image

It looks like the NonGreedyMode mode in this instance is removing the outer ORDER_OBSERVATION structure from PATIENT_RESULT which doesn't make any sense to me, if anything the segment which this should have an impact on would be the OBX since there are 2 which appear under ORDER_OBSERVATION?

image

image

Is this a known issue?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant