Re: [HAPI-devel] HL7 parsing question

2010-06-17 Thread Sharma, Niranjan K (GE Healthcare)
Just note with regards to Terser and method based call - When you know the location upfront and it is going to stay that way ..then use the object.getXXX() semantics. When the path for the location of data value is dynamic..Terser is your tool. It is powerful. So choose your tool.

Re: [HAPI-devel] HL7 parsing question

2010-06-17 Thread Éamonn Ó Nualláin
Thanks for that, it works (though PID-3 instead of PID-1) I'll use the terser version, On Thu, Jun 17, 2010 at 4:38 PM, christian ohr wrote: > > Hi > > try > > String value = terser.get("/PATIENT(0)/PID-1") // > value = terser.get("/PATIENT(0)/MRG-1") // > > cheers > Christia

[HAPI-devel] Hl7 Parsing question (solved)

2010-06-17 Thread Éamonn Ó Nualláin
Hi Christian, Thanks for your quick reply, I got it to work, see below, but I'll try your terser way though, looks nice and short ADT_A39_PATIENT adtMessage = (ADT_A39_PATIENT) _message.get("PATIENT"); PID pid = (PID) adtMessage.getPID(); MRG mrg = (MRG) adtMessage.getMRG(); String id1 = mrg.ge

Re: [HAPI-devel] HL7 parsing question

2010-06-17 Thread christian ohr
Hi try String value = terser.get("/PATIENT(0)/PID-1") // value = terser.get("/PATIENT(0)/MRG-1") // 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 follow

[HAPI-devel] HL7 parsing question

2010-06-17 Thread Éamonn Ó Nualláin
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|MSG1|P|2.4||UNICODE UTF-8 EVN||20100617095832 PID|||PATIENT-ID123||SURNAME^FIRSTNAME MRG| I've been t