Softbank to Epic BPAM – ORU^R01 – taking the value of OBX05, if OBX03.1 is UNITN and taking the value of OBX05, if OBX03.1 is UNPRD, then take the two results and concatenate to the OBX04 field.
How would I go about checking the segments for the 2 result values needed, concatenate the values and then make sure they are valued in OBX04 for each segment in that grouping?
Here is what the end result should look like.
Group one
OBX|1|ST|UTYPE^HUMAN READABLE UNIT ABO^SOFTLRR^^^LN| W036311000001- E0336V00|O||||||P|||201911141416||BCH1
OBX|2|ST|URH^HUMAN READABLE UNIT RH^SOFTLRR^^^LN| W036311000001- E0336V00|NEG||||||P|||201911141416||BCH1
OBX|3|ST|UPROD^HUMAN READABLE PRODUCT CODE^SOFTLRR^^^LN| W036311000001- E0336V00|E0336V00||||||P|||201911141416||BCH1
OBX|4|ST|UNITN^UNIT #^SOFTLRR^^^LN| W036311000001- E0336V00|W036311000001||||||P|||201911141416||BCH1
OBX|5|ST|USTAT^UNIT STATUS^SOFTLRR^^^LN| W036311000001– E0336V00|selected||||||P|||201911141416||BCH1
OBX|6|ST|UBPRD^BARCODED PRODUCT CODE^SOFTLRR^^^LN| W036311000001- E0336V00|E0336V00||||||P|||201911141416||BCH1
OBX|7|ST|UBTYP^BARCODED ABORH^SOFTLRR^^^LN| W036311000001- E0336V00|=%9500||||||P|||201911141416||BCH1
OBX|8|ST|UEXP^UNIT EXPIRATION^SOFTLRR^^^LN| W036311000001- E0336V00|201911302359||||||P|||201911141416||BCH1
Group two
OBX|9|ST|UTYPE^HUMAN READABLE UNIT ABO^SOFTLRR^^^LN| W036399111822- E0224V00|O||||||P|||201911201114||CGP1
OBX|10|ST|URH^HUMAN READABLE UNIT RH^SOFTLRR^^^LN| W036399111822- E0224V00|NEG||||||P|||201911201114||CGP1
OBX|11|ST|UPROD^HUMAN READABLE PRODUCT CODE^SOFTLRR^^^LN| W036399111822- E0224V00|R12||||||P|||201911201114||CGP1
OBX|12|ST|UNITN^UNIT #^SOFTLRR^^^LN| W036399111822- E0224V00|W036399111822||||||P|||201911201114||CGP1
OBX|13|ST|USTAT^UNIT STATUS^SOFTLRR^^^LN| W036399111822- E0224V00|selected||||||P|||201911201114||CGP1
OBX|14|ST|UBPRD^BARCODED PRODUCT CODE^SOFTLRR^^^LN| W036399111822- E0224V00|E0224V00||||||P|||201911201114||CGP1
OBX|15|ST|UBTYP^BARCODED ABORH^SOFTLRR^^^LN| W036399111822- E0224V00|=%9500||||||P|||201911201114||CGP1
OBX|16|ST|UEXP^UNIT EXPIRATION^SOFTLRR^^^LN| W036399111822- E0224V00|201912152359||||||P|||201911201114||CGP1