OTD Marshalling Exception : Array index out of range
I am working on an interface and using JAVACAPS 5.1.2
I had a OTD defined. The HL7 input had segments not in order, so i had the parent node order as any.
I am trying to test the OTD using the standard tester on OTD Editor.
Here is the sample input file i am using
MSH|^~\&|COMLAB|ACL|IDX|ACERN|20070128073654||ORU^R01|179|P|2.2|||||
PID|1||26185983||COX^DEARL||19570828|M||||||0107057794A||||35584050|227964986|| ||||||
PV1||O|LSF^N/A^N/A^N/A||||055335|||||||||||||||||||||||||||||||||||||||||||
ORC|RE|522019040|522019040C002239892|||||||||055335|||||||
OBR|1|522019040|522019040C002239892|ROCS^ROCS|||200701250000|||999||||200701251 155|ULC,TOE,LT^ULCER TOE LEFT|055335||IDX||C002239892||||70MICRO|F||^^^^^R|||||||||
OBX|1|TX|SOURCE^SPECIMEN DESCRIPTION:|1|SPECIMEN DESCRIPTION: ULCER TOE LEFT||||||F|||200701250000|MAIN||
OBX|2|TX|GS^GRAM STAIN:|1|GRAM STAIN: NO POLYMORPHONUCLEAR CELLS SEEN||||||F|||200701250000|MAIN||
OBR|3|522019040|522019040C002239892|NC22^MIC|||200701250000||||||||ULC,TOE,LT^U LCER TOE LEFT|LSF||||||20070128073600||70MICRO|F|ROCS&ROCS^4^SMAR&SERRATIA MARCESCENS|||522019040^522019040C002239892|C002239892644380||||||
OBX|3|TX|GS^GRAM STAIN:|1|GRAM STAIN: NO ORGANISMS SEEN||||||F|||200701250000|MAIN||
OBX|4|TX|FR^CULTURE:|1|CULTURE: MODERATE STAPHYLOCOCCUS AUREUS||||||F|||200701250000|MAIN||
OBX|5|TX|FR^CULTURE:|1|CULTURE: RARE SERRATIA MARCESCENS||||||F|||200701250000|MAIN||
OBR|2|522019040|522019040C002239892|PC21^MIC|||200701250000||||||||ULC,TOE,LT^U LCER TOE LEFT|LSF||||||20070128073600||70MICRO|F|ROCS&ROCS^2^SAUR&STAPHYLOCOCCUS AUREUS|||522019040^522019040C002239892|C002239892644380||||||
OBX|1|ST|AUG^AMOXICIL/CLAVULANATE|2|<=4/2|||SS|||F|||200701250000|MAIN|
OBX|2|ST|CLIN^CLINDAMYCIN|2|<=.25|||SS|||F|||200701250000|MAIN|
There are 3 OBR's but when i unmarshal it takes in as 4 OBR's with OBR[3] as null.
This is causing the problem. when i tried marshalling the same, it gives Array index out of range: 2
Any idea what could be problem?
Thank You
Rajesh

