Hi Thea,
Your code looks good to me (TestPanel app shows the same terser path),
but you didn't post the "messageText = ... " part.
HL7 messages have carriage return line endings. Did you use that as well?
e.g.
String messageText = "MSH|........\r" +
"PID|....\r" + ...
On 08/09/2020 10:48, Thea Schmidt wrote:
> Hello!
>
> This is my sample message. It ist valid HL7 V2.3
>
> MSH|^~\&|DPS|0|OPL|REHA|20200625075418||ORM^O01|0067164|P|2.3|||AL|NE
> PID|1|3247|3247|92000333|Meyer^Jens^^^^^L|Meyer|19780312|M|||Rosenweg
> 1^^Bergdorf^^24612^DE||||DE|||||||||||||||
> PV1|1|I|S2^Bett6^^PSY^K_KAP||||||^^^^^^^^^L||||||||||3247A1F1|||||||||||||||||||||||||201912031014|202002231430||||||
> ORC|NW|jmWo2
> OBR|1|jmWo2||FAN1^Fango^Heilmittelkatalog|||||||||||||||||||||||6^^^^^^^^^C&2x
> pro Woch.
> ORC|NW|jmWo1
> OBR|2|jmWo1||KG1^KG^Heilmittelkatalog|||||||||||||||||||||||6^^^^^^^^^C&2x
> pro Woch.
> ORC|NW|jmWo4
> OBR|3|jmWo4||Unbekannt^Warmluft^Heilmittelkatalog|||||||||||||||||||||||4^^^^^^^^^C&2x
> pro Woch.
> ORC|NW|jmWo5
> OBR|4|jmWo5||Ergo1^Ergo
> 1^Heilmittelkatalog|||||||||||||||||||||||2^^^^^^^^^C&1x pro Woche
>
> This ist my code
>
> String messageText = .....
> PipeParser pipeParser = new PipeParser();
> this.message = pipeParser.parse(messageText);
> this.terser = new Terser(message);
> .
> .
> .
> .
>
> assertEquals("3", terser.get("/ORDER(3)/ORDER_DETAIL/OBR-1"));
>
> I only get an error: Can't find ORDER as a direct child
>
> Does anybody know what the problem ist here?
>
> Thanks for your help,
>
> Thea
>
>
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
Wbr
Martin Fleurke
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel