ABME5DN1 ; IHS/SD/SDR - 837 DN1 Segment
;;2.6;IHS Third Party Billing System;**11**;NOV 12, 2009;Build 133
;Transaction Set Header
;
EP ;START HERE
K ABMREC("DN1"),ABMR("DN1")
S ABME("RTYPE")="DN1"
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("DN1"))'="" S ABMREC("DN1")=ABMREC("DN1")_"*"
.S ABMREC("DN1")=$G(ABMREC("DN1"))_ABMR("DN1",I)
Q
10 ;segment
S ABMR("DN1",10)="DN1"
Q
20 ;DN101 - Quantity - Treatment Months Count
S ABMR("DN1",20)=""
I $P(ABMB4,U,5)'="" D
S X1=ABMP("VDT")
S X2=$P(ABMB4,U,5)
D ^%DTC
S ABMR("DN1",20)=(X\30)
I +$P(ABMB4,U,13)>0 S ABMR("DN1",20)=+$G(ABMR("DN1",20))+$P(ABMB4,U,13)
Q
30 ;DN102 - Quantity - Treatment Months Remaining Count
S ABMR("DN1",30)=""
S ABMR("DN1",30)=$P(ABMB4,U,13)
Q
40 ;DN103 - Yes/No Conditon or Response Code - Not Used
S ABMR("DN1",40)=""
Q
50 ;DN104 - Description - Orthodontic Treatment Indicator
S ABMR("DN1",50)=""
Q
ABME5DN1 ; IHS/SD/SDR - 837 DN1 Segment
+1 ;;2.6;IHS Third Party Billing System;**11**;NOV 12, 2009;Build 133
+2 ;Transaction Set Header
+3 ;
EP ;START HERE
+1 KILL ABMREC("DN1"),ABMR("DN1")
+2 SET ABME("RTYPE")="DN1"
+3 DO LOOP
+4 KILL ABME,ABM
+5 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("DN1"))'=""
SET ABMREC("DN1")=ABMREC("DN1")_"*"
+5 SET ABMREC("DN1")=$GET(ABMREC("DN1"))_ABMR("DN1",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("DN1",10)="DN1"
+2 QUIT
20 ;DN101 - Quantity - Treatment Months Count
+1 SET ABMR("DN1",20)=""
+2 IF $PIECE(ABMB4,U,5)'=""
Begin DoDot:1
End DoDot:1
+3 SET X1=ABMP("VDT")
+4 SET X2=$PIECE(ABMB4,U,5)
+5 DO ^%DTC
+6 SET ABMR("DN1",20)=(X\30)
+7 IF +$PIECE(ABMB4,U,13)>0
SET ABMR("DN1",20)=+$GET(ABMR("DN1",20))+$PIECE(ABMB4,U,13)
+8 QUIT
30 ;DN102 - Quantity - Treatment Months Remaining Count
+1 SET ABMR("DN1",30)=""
+2 SET ABMR("DN1",30)=$PIECE(ABMB4,U,13)
+3 QUIT
40 ;DN103 - Yes/No Conditon or Response Code - Not Used
+1 SET ABMR("DN1",40)=""
+2 QUIT
50 ;DN104 - Description - Orthodontic Treatment Indicator
+1 SET ABMR("DN1",50)=""
+2 QUIT