Hi
try
String value = terser.get("/PATIENT(0)/PID-1") // 22222222
value = terser.get("/PATIENT(0)/MRG-1") // 11111111
cheers
Christian
Éamonn Ó Nualláin wrote:
>
> Hi,
>
> I'm using HAPI1-0 and am trying to parse a 'merge patient' message. How
> can
> I get the PID and MGR from the following?
>
> MSH|^~\&|AAA|BBB|CCC|DDD|20100617093730||ADT^A40|MSG00001|P|2.4||||||UNICODE
> UTF-8
> EVN||20100617095832
> PID|22222222||PATIENT-ID123||SURNAME^FIRSTNAME
> MRG|11111111
>
> I've been trying the following to get at the PID (22222222 in this case)
> no
> avail,
> I'm also stuch with the MRG field (get at 11111111)
>
> Parser parser = new GenericParser();
> Message message = parser.parse(<above HL7 block>);
> Terser terser = new Terser(message);
> String value = terser.get("ADT_A40.PATIENT_ID");
> Any tip appreciated!
>
> Thanks
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
--
View this message in context:
http://old.nabble.com/HL7-parsing-question-tp28914338p28916036.html
Sent from the hl7api-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel