K IBXDATA N Z S Z="" F S Z=$O(IBXSAVE("OUTPT",Z)) Q:'Z I $D(IBXSAVE("OUTPT",Z,"RX")),$P(IBXSAVE("OUTPT",Z,"RX"),U,3)'="" S IBXDATA(Z)="N4"
FORMAT CODE DESCRIPTION
This is a group data element so more than 1 occurrence of a value is
possible for the data element in the previously extract IBXSAVE array.
Changes the internal code into a valid X12 837 code (N1,N2,N3,N4).