nHapi icon indicating copy to clipboard operation
nHapi copied to clipboard

Cannot get ODS segment using terser, when I write a full path

Open zigh-code opened this issue 2 years ago • 3 comments

Describe the bug

Cannot get ODS segments in ORDER_DIET group using terser, when I write a full path

Screenshots image

Sample HL7 /.ORDER_DIET(0)/DIET/ODS(0)-1

zigh-code avatar Jul 20 '22 07:07 zigh-code

@zigh-code do you could you provide some more information? sample hl7, hl7v2 version, perhaps even a unit test or code example?

milkshakeuk avatar Jul 20 '22 07:07 milkshakeuk

I'm using the last version of the package. The version of Hl7 in my case is 2.5 (string data),

image If I try for the TQ1 segment, it work

image But when I try with ODS, there is an issue

Data Test:

 string omdText = "MSH|^~\\&|EDITE|TEST|TEST|TEST|20210519141200||OMD^O03^OMD_O03|202105191412001|P|2.5|||||FRA|8859/1\r" +
        "PID|1|465 306 5961||407623|Wood^Patrick^^^MR||19700101|1|||High Street^^Oxford^^Ox1 4DP~George St ^^Oxford^^Ox1 5AP|||||||\r" +
        "ORC|NW|1254481^EDITEUR|||||^^^20210519143000||20210519143000|611014333^PRESCRIPTEUR^TEST1^^^^^^EDITEUR^^^^ADELI~10002129790^PRESCRIPTEUR^TEST1 ^^^^^^EDITEUR ^^^^RPPS~1027^PRESCRIPTEUR^TEST1^^^^^^EDITEUR^^^^EI||||||||||||||||||||\r" +
        "TQ1|1||||||20210519143000|\r" +
        "ODS|R||SANSSEL^Sans sel^EDITEUR|";

zigh-code avatar Jul 20 '22 14:07 zigh-code

@zigh-code thanks for the extra info, will take a look when I can.

milkshakeuk avatar Jul 20 '22 15:07 milkshakeuk

@zigh-code sorry for the long delay in getting back to you, I think I found the issue, its related to how java and dotnet use regex slightly differently so basically a bug in the port.

I will hopefully have a PR for this in the coming days.

milkshakeuk avatar Aug 26 '22 14:08 milkshakeuk

@zigh-code I have put up a PR to fix this and included a unit test to prove it works. https://github.com/nHapiNET/nHapi/pull/340/files#diff-df1d6e800460c0e8224b40b0c6417ef59b0ab102f231d72a4f38e635921cbe4aR239 is the fix

milkshakeuk avatar Aug 29 '22 14:08 milkshakeuk

@zigh-code this fix will go out in the next release, hoping to get a few more changes in first though

milkshakeuk avatar Sep 01 '22 14:09 milkshakeuk

@zigh-code this change is in the latest 3.2.0 version.

milkshakeuk avatar Jan 20 '23 13:01 milkshakeuk