From: Gabi <ga...@id...> - 2013-07-19 10:22:21
|
Hello I'm a beginner here, I've started trying to read the date in an appointment message. I've started with the typical code in the example: HapiContext context = new DefaultHapiContext(); Parser p = context.getGenericParser(); Message hapiMsg=null; try { hapiMsg = p.parse(msg); } catch (EncodingNotSupportedException e) { e.printStackTrace(); return; } catch (HL7Exception e) { e.printStackTrace(); return; } And then: SIU_S13 siuMsg = (SIU_S13)hapiMsg; SCH sch=siuMsg.getSCH(); The message is SIU^S13, it's version 2.3, and after doing SCH sch=siuMsg.getSCH(); , whatever field I try to get is empty, but this part of the HL7 message is not empty, it's something like: SCH|23702095|23702095||||||WC-NP|||^^^20130717150000^20130717153000^^^^| sch.getSch11_AppointmentTimingQuantity() or anything under sch.getSchXX is emprty or null. What I'm doing wrong? Regards. John. |