|
From: Nico V. <ni...@sk...> - 2006-09-07 20:25:12
|
Hi,
Since the PID segment is part of a group in the ORU^R01 message structure
you should add a "." to have Terser look in the underlying groups.
Terser t = new Terser(in);
String patientid = t.get("/.PID-3-1");
Please check out Bryan's post from August 25 with subject ORF_R04 for more
details.
Regards
Nico
At 7/09/2006, =?ISO-8859-9?Q?An=FDl_S=FDnac=FD?= wrote:
>Hi,
>
>I am using pipeparser to parse the below string. When i try to get the
>patientID with terser.get("PID-3-1") I get the below exception.
>Could you kindly help me out?
>Thank you.
>
>ANIL
>
>Exception :
>ca.uhn.hl7v2.HL7Exception: Can't find PID as a direct child
> at
> ca.uhn.hl7v2.util.SegmentFinder.getStructure(SegmentFinder.java:137)
> at ca.uhn.hl7v2.util.SegmentFinder.getSegment(SegmentFinder.java
> :104)
> at ca.uhn.hl7v2.util.Terser.getSegment(Terser.java:233)
> at ca.uhn.hl7v2.util.Terser.get(Terser.java:194)
>
>Message String :
>"MSH|^~\\&|ORIGatewayInc^ACDE48234567ABCD^EUI-64||||20060713095730-0400" +
> "||ORU^R01^ORU_R01|MSGID1233456789|P|2.5|2||NE|AL|||||IHE PCD
> ORU-R01" +
> "2006^HL7^2.16.840.1.113883.9.n.m^HL7\r" +
> "PID|||12345^^^^PI^Downtown
> Campus||Doe^John^Joseph^JR^^^L^A|||M\r" +
> "OBR|1|AB12345^ORIGatewayInc
> ICU-04^ACDE48234567ABCD^EUI-64|CD12345^ORIGatewayInc ICU-" +
>
>"04^ACDE48234567ABCD^EUI-64|149538^MDC_PLETH_PULS_RATE^MDC|||20060713095715-0400\r"
>+
>
>"OBX|1|NM|149538^MDC_PLETH_PULS_RATE^MDC|1.1.1.1|83|264896^MDC_DIM_PULS_PER_MIN^MDC|||||R|||20060"
>+
> "713095715-0400|||264896^MDC_UPEXT_FINGER^MDC\r";
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Hl7api-devel mailing list
>Hl7...@li...
>https://lists.sourceforge.net/lists/listinfo/hl7api-devel
|