I'm using HAPI 0.6 and trying to get to the doctors on the PV1 record. All
of my attempts are returning null. I'm not sure where the problem lies and
any assistance would be appreciated. I can extract the doctor information
out of the OBR record.
Below is an a snippet of code, results and data set.
<code>
public void dump(Message message) throws Exception {
ORU_R01 oru = null;
if (message instanceof ORU_R01) {
oru = (ORU_R01) message;
}
System.out.println("Message date: " + getMessageDate(oru));
int results = oru.getPATIENT_RESULTReps();
for (int i = 0; i < results; i++) {
ORU_R01_PATIENT_RESULT patientResult = oru.getPATIENT_RESULT(i);
System.out.println(patientResult.getPATIENT().getPV1().getAdmittingDoctor().getFamilyName().getValue());
System.out.println(patientResult.getPATIENT().getPV1().getReferringDoctor().getFamilyName().getValue());
System.out.println(patientResult.getPATIENT().getPV1().getConsultingDoctor()[0].getFamilyName().getValue());
</code>
Message date: Tue Dec 22 07:42:00 CST 2009
null
null
something bad happened java.lang.ArrayIndexOutOfBoundsException: 0
MSH|^~\&|LA01|L||L|200912220742|RESULTR01OUT|ORU^R01|093560659333|P|2.2|||AL|NE||||||2.2b
PID|1|02025655^^^ST01|0001666338^^^L^MR~HNE65422344^^^NE^PE||REFSYS^FEMALE||197701010000|F||||||||||0933500001^^^L|999991478
PD1||||200001^NO^FAMILY DR
PV1|1|B|EA2^EA2240801^01^L^OCC|IP|||105452^TESTING^PHYSICIAN|200006^NO^REFERRING||MED|||||||105452^TESTING^PHYSICIAN|IOL||METRO||||||||||||||||||||||||200912010753
ORC|RE|093560131127^LA01|093560131127^LA01|RE0034162^LA01|CM||1^^^200912200707^^1||200912220742|LAB
TECH||105452^TESTING^PHYSICIAN|L||200912220742||EA2^^SF
OBR|1|093560131127^LA01|093560131127^LA01|30320^Acetylcholinesterase,
Amniotic Fluid^LA01^ACHE AF^^LA01|1||200912200707|||LAB
TECH||||200912220732|AMNIOTIC&AMNIOTIC^^^^^STERILE&STERILE|105452^TESTING^PHYSICIAN||||||200912220742||GENZMYE|F||1^^^200912200707^^1||||^^I9||||||||^^^^1
OBX|1|ST|3020820^Acetylcholinesterase
Amniotic^LA01|1|Negative||Negative||||F|||200912220742|TECH^TECH
Genetics|LAB TECH|L TECH^^^M~N
ZOM|1||||R093560001||||||AAAAA||||||R093560001|1|H|||200912220719|||||||||||||||||S||||||093560131127^LA01|||||ALL||||||L
TECH|A|D|||||||||||||^^MRO|IOL|N||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||N|||||||||N
ZCA|||EA2|||||||||||||||||||||||||||||||||||||02025655^^^ST01^PI~HNE65422344^^^NE^PE|||Production|$ReleaseId:
12.3.0.0$|$Id: pwic.pad,v 1.180.1.37.1.2, 2009-07-23 20:23:33Z$;$ReleaseId:
12.3.0.0$;$St|$Date: 7/23/2009 3:23:33
PM$||||197701010600+0000|CST6CDT||||EA2^EA-2 Mother/Baby
L|||||EA2240801^EA2-2408-01|EA2^^SF
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel