ABME8QTY ; IHS/ASDST/DMJ - 837 QTY Segment
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Transaction Set Header
;
EP(X) ;EP
;x=qualifier
K ABMREC("QTY"),ABMR("QTY")
S ABMEIC=X
S ABME("RTYPE")="QTY"
D LOOP
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:50 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
.I $G(ABMREC("QTY"))'="" S ABMREC("QTY")=ABMREC("QTY")_"*"
.S ABMREC("QTY")=$G(ABMREC("QTY"))_ABMR("QTY",I)
Q
10 ;segment
S ABMR("QTY",10)="QTY"
Q
20 ;QTY01 - Quantity Qualifier
S ABMR("QTY",20)=ABMEIC
Q
30 ;QTY02 - Quantity
S ABMR("QTY",30)=""
I ABMEIC="NA" D
.S ABMR("QTY",30)=$P(ABMB6,"^",6)
I ABMEIC="CA" D
.S ABMR("QTY",30)=$P(ABMB7,"^",3)
Q
40 ;QTY03 - Composite Unit of Measure
S ABMR("QTY",40)="DA"
Q
50 ;QTY04 - Free-Form Message
S ABMR("QTY",50)=""
Q
ABME8QTY ; IHS/ASDST/DMJ - 837 QTY Segment
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Transaction Set Header
+3 ;
EP(X) ;EP
+1 ;x=qualifier
+2 KILL ABMREC("QTY"),ABMR("QTY")
+3 SET ABMEIC=X
+4 SET ABME("RTYPE")="QTY"
+5 DO LOOP
+6 KILL ABME,ABM
+7 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:50
Begin DoDot:1
+2 DO @I
+3 IF $DATA(^ABMEXLM("AA",+$GET(ABMP("INS")),+$GET(ABMP("EXP")),ABME("RTYPE"),I))
DO @(^(I))
+4 IF $GET(ABMREC("QTY"))'=""
SET ABMREC("QTY")=ABMREC("QTY")_"*"
+5 SET ABMREC("QTY")=$GET(ABMREC("QTY"))_ABMR("QTY",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("QTY",10)="QTY"
+2 QUIT
20 ;QTY01 - Quantity Qualifier
+1 SET ABMR("QTY",20)=ABMEIC
+2 QUIT
30 ;QTY02 - Quantity
+1 SET ABMR("QTY",30)=""
+2 IF ABMEIC="NA"
Begin DoDot:1
+3 SET ABMR("QTY",30)=$PIECE(ABMB6,"^",6)
End DoDot:1
+4 IF ABMEIC="CA"
Begin DoDot:1
+5 SET ABMR("QTY",30)=$PIECE(ABMB7,"^",3)
End DoDot:1
+6 QUIT
40 ;QTY03 - Composite Unit of Measure
+1 SET ABMR("QTY",40)="DA"
+2 QUIT
50 ;QTY04 - Free-Form Message
+1 SET ABMR("QTY",50)=""
+2 QUIT