In parsing following message
MSH|^~\&|CIS|F1|LIS|F2|20110516151812.345+0100||OML^O21^OML_O21|123456789|P|2.5.1||||||UTF-8|SL
PID|1||432943^^^^KC_BIS_PAC~045428825^^^^ZZZS_PAC||Testni^Pacient^^^^^L||20001222|F
PV1||I|441030111^NIC-02^POST-01||||||||||||||||12345678.1^^^^KC_BIS_PRM||||||||||||||||||||||||||||||||V
ORC|SN|4565767843^F1||234345456^F1|||||20110914122433||||||||||||KLINIČNI ODDELEK ZA NEONATOLOGIJO HOSPITALNI ODDELEKI -NN:BOLNIŠKI ODDELEK^^^^^^KC_ORG^^^441390114
TQ1|||||||||R
OBR||4565767843^F1||030008^S-Kalij^KC_PEK_LIS_NAR||||||||||||12345^NOVAK KRANJSKI^JANEZ^JOŽE^dr.med.^prim.^^^^^^^BPI_ZDR|^WPN^PH^^^^^^^^^01/555 1234|2348754541
OBX|1|NM|^BODY WEIGHT||31|kg|||||F|||20110914122433
OBX|2|NM|^BODY HEIGHT||1.36|m|||||F|||20110914122433
SPM|1|548985&F1||S^serum||||||||||komentar vzorca|||20110914122333|||||||||2
ORC|SN|4565767844^F1||234345456^F1|||||20110914122433||||||||||||KLINIČNI ODDELEK ZA NEONATOLOGIJO HOSPITALNI ODDELEKI -NN:BOLNIŠKI ODDELEK^^^^^^KC_ORG^^^441390114
TQ1|||||||||R
OBR||4565767844^F1||030013^S-Kalcij^KC_PEK_LIS_NAR||||||||||||12345^NOVAK KRANJSKI^JANEZ^JOŽE^dr.med.^prim.^^^^^^^BPI_ZDR|^WPN^PH^^^^^^^^^01/555 1234|2348754541
OBX|1|NM|^BODY WEIGHT||31|kg|||||F|||20110914122433
OBX|2|NM|^BODY HEIGHT||1.36|m|||||F|||20110914122433
SPM|1|548985&F1||S^serum||||||||||komentar vzorca|||20110914122333|||||||||2
expected parsing result should be ((OML_O21)new PipeParser().parse(msgAbove)).getORDERReps() == 2. Instead there is only 1 ORDER with 1 PRIOR_RESULT. According to HL7 specification, in PRIOR_RESULT group OBR segment is required as is correctly defined in OML_O21_ORDER_PRIOR class. When parser is processing second TQ1 segment, parser should figure it out that in PRIOR_RESULT group should be OBR after ORC, not TQ1 and somehow create new ORDER interation instead.