ABME8CN1 ; IHS/ASDST/DMJ - 837 CN1 Segment
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Transaction Set Header
;
START ;START HERE
K ABMREC("CN1"),ABMR("CN1")
S ABME("RTYPE")="CN1"
D LOOP
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:70 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
.I $G(ABMREC("CN1"))'="" S ABMREC("CN1")=ABMREC("CN1")_"*"
.S ABMREC("CN1")=$G(ABMREC("CN1"))_ABMR("CN1",I)
Q
10 ;segment
S ABMR("CN1",10)="CN1"
Q
20 ;CN101 - Contract Type Code
S ABMR("CN1",20)=""
S ABMR("CN1",20)=$P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,11)
Q
30 ;CN102 - Monetary Amount
S ABMR("CN1",30)=""
Q
40 ;CN103 - Percent
S ABMR("CN1",40)=""
Q
50 ;CN104 - Reference Identification
S ABMR("CN1",50)=""
S ABMR("CN1",50)=$P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,12)
Q
60 ;CN105 - Terms Discount Percent
S ABMR("CN1",60)=""
Q
70 ;CN106 - Version Identifier
S ABMR("CN1",70)=""
Q
ABME8CN1 ; IHS/ASDST/DMJ - 837 CN1 Segment
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Transaction Set Header
+3 ;
START ;START HERE
+1 KILL ABMREC("CN1"),ABMR("CN1")
+2 SET ABME("RTYPE")="CN1"
+3 DO LOOP
+4 KILL ABME,ABM
+5 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:70
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("CN1"))'=""
SET ABMREC("CN1")=ABMREC("CN1")_"*"
+5 SET ABMREC("CN1")=$GET(ABMREC("CN1"))_ABMR("CN1",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("CN1",10)="CN1"
+2 QUIT
20 ;CN101 - Contract Type Code
+1 SET ABMR("CN1",20)=""
+2 SET ABMR("CN1",20)=$PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,11)
+3 QUIT
30 ;CN102 - Monetary Amount
+1 SET ABMR("CN1",30)=""
+2 QUIT
40 ;CN103 - Percent
+1 SET ABMR("CN1",40)=""
+2 QUIT
50 ;CN104 - Reference Identification
+1 SET ABMR("CN1",50)=""
+2 SET ABMR("CN1",50)=$PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,12)
+3 QUIT
60 ;CN105 - Terms Discount Percent
+1 SET ABMR("CN1",60)=""
+2 QUIT
70 ;CN106 - Version Identifier
+1 SET ABMR("CN1",70)=""
+2 QUIT