terser.set("/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(" + i + ")/OBX-1", "" + (i + 1));
terser.set("/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(" + i + ")/OBX-3", "ST");
terser.set("/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(" + i + ")/OBX-5", "This is the value for rep " + i);
}
System.out.println(p.encode(oru));
/*
* MSH|^~\&|||||||ORU^R01|||2.5
* OBX|1||ST||This is the value for rep 0
* OBX|2||ST||This is the value for rep 1