From: <twh...@th...> - 2005-11-10 18:41:40
|
James, Yes, the structuring and path def make perfect sense - thanks for the info. My bad for not digging deeper before I posted. You wrote: "To access the PID segment, use notation like: terser.get("/SIU_S12_PIDPV1PV2OBXDG1/PID-3");" Is this returning a Segment object, or the string value one of the segment's fields? Seems like the latter. What I really need help with is how do I get the string value either using terser or not. However, seemingly no combination of path information returns anything but null. PipeParser parser = new PipeParser(); Message message = parser.parse(sMessage); Terser terser = new Terser(message); String sMRN = terser.get("/SIU_S12_PIDPV1PV2OBXDG1/PID-3"); sMRN is always null; Beyond that, I tried all combinations of using Groups, PIDs, CXs, etc and still seem to come up empty handed - even if I had figured that out, it seems to be alot of jumping thru hoops to get a simple string value so I'll assume it's the wrong direction. Again, thanks in advance for your help, Tom James Wrote--------- Hi Tom, The SIU_S12_.. structure is actually a segment group. Chapter 3 of the HL7 spec defines the SIU messages as containing the following structure: [ { PID [PD1] [PV1] [PV2] [{OBX}] [{DG1}] } ] which basically means that the entire chunk of segments is optional (as indicated by the surrounding [ ]) and can repeat as a group (as indicated by the surrounding { }). To access the PID segment, use notation like: terser.get("/SIU_S12_PIDPV1PV2OBXDG1/PID-3"); This long name actually maps to a HAPI class by the same name. Does this make sense? Cheers, James Agnew |