Mike Mills
2017-03-03 04:48:24 UTC
Hi,
I have found a wierd case where calling .encode() on a Hapi message can end
up changing the number of reps returned by the Message object
This code shoudl print out the same console output before and after the
.encode call.
Unfortunately calling .encode() causes some of the reps to indicate that
they have values when in fact they are empty.....
I suspect this is not limited to RDE_O11 either......
final RDE_O11 rde_o11 = new RDE_O11();
rde_o11.parse("MSH|^~\\&|MSH3|MSH4|MSH5|MSH6|20161221133021||RDE^O11|MSH10|P|2.5");
System.out.println(rde_o11.getORDER(0).getRXCReps());
System.out.println(rde_o11.getORDERReps());
System.out.println(rde_o11.getPATIENT().getAL1Reps());
rde_o11.encode();
System.out.println(rde_o11.getORDER(0).getRXCReps());
System.out.println(rde_o11.getORDERReps());
System.out.println(rde_o11.getPATIENT().getAL1Reps());
This prints out 0, 1, 0 before the encode.
But prints out 1, 1,1 after the encode.
This definitely seems like a bug.
-Mike
I have found a wierd case where calling .encode() on a Hapi message can end
up changing the number of reps returned by the Message object
This code shoudl print out the same console output before and after the
.encode call.
Unfortunately calling .encode() causes some of the reps to indicate that
they have values when in fact they are empty.....
I suspect this is not limited to RDE_O11 either......
final RDE_O11 rde_o11 = new RDE_O11();
rde_o11.parse("MSH|^~\\&|MSH3|MSH4|MSH5|MSH6|20161221133021||RDE^O11|MSH10|P|2.5");
System.out.println(rde_o11.getORDER(0).getRXCReps());
System.out.println(rde_o11.getORDERReps());
System.out.println(rde_o11.getPATIENT().getAL1Reps());
rde_o11.encode();
System.out.println(rde_o11.getORDER(0).getRXCReps());
System.out.println(rde_o11.getORDERReps());
System.out.println(rde_o11.getPATIENT().getAL1Reps());
This prints out 0, 1, 0 before the encode.
But prints out 1, 1,1 after the encode.
This definitely seems like a bug.
-Mike