IB 837 TRANSMISSION (138)    IB FORM FIELD CONTENT (364.7)

Name Value
FORM FIELD REFERENCE IB 837 TRANSMISSION
SECURITY LEVEL NATIONAL,NO EDIT
DATA ELEMENT N-PRESCRIPTIONS
PAD CHARACTER NO PAD REQUIRED
FORMAT CODE N Z,Z0,CT K IBXDATA S (Z,CT)=0,Z0=$G(^TMP($J,"IBLCT")) F S Z=$O(IBXSAVE("OUTPT",Z)) S:'Z ^TMP($J,"IBLCT")=Z0+$O(IBXDATA(""),-1) Q:'Z I $D(IBXSAVE("OUTPT",Z,"RX")) S IBXDATA(Z)=Z,CT=CT+1 D:CT>1 ID^IBCEF2(Z,"RX1 ")
FORMAT CODE DESCRIPTION
^TMP($J,"IBLCT") keeps track of the last service line # output.  Data  
element is a group data element so multiple ocurrences of the data element
are possible in the IBXDATA array.  Save the data in the IBXSAVE array for
later use.  For every service line > 1, output the RX1 record id.
If the prescription references a service line already output, use that
service line # to reference this prescription.