ABME8MEA ; IHS/SD/SDR - 837 MEA Segment
;;2.6;IHS 3P BILLING SYSTEM;**3**;NOV 12, 2009
;
EP ;EP - START HERE
K ABMREC("MEA"),ABMR("MEA")
S ABME("RTYPE")="MEA"
D LOOP
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:40 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
.I $G(ABMREC("MEA"))'="" S ABMREC("MEA")=ABMREC("MEA")_"*"
.S ABMREC("MEA")=$G(ABMREC("MEA"))_ABMR("MEA",I)
Q
10 ;segment
S ABMR("MEA",10)="MEA"
Q
20 ;MEA01 - Measurement Reference ID code
S ABMR("MEA",20)="TR"
Q
30 ;MEA02 - Measurement Qualifier
S ABMR("MEA",30)=""
S ABMR("MEA",30)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),37,ABMJ,0)),U,19)
Q
40 ;MEA03 - Measurement Value
S ABMR("MEA",40)=""
S ABMR("MEA",40)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),37,ABMJ,0)),U,21)
Q
ABME8MEA ; IHS/SD/SDR - 837 MEA Segment
+1 ;;2.6;IHS 3P BILLING SYSTEM;**3**;NOV 12, 2009
+2 ;
EP ;EP - START HERE
+1 KILL ABMREC("MEA"),ABMR("MEA")
+2 SET ABME("RTYPE")="MEA"
+3 DO LOOP
+4 KILL ABME,ABM
+5 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:40
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("MEA"))'=""
SET ABMREC("MEA")=ABMREC("MEA")_"*"
+5 SET ABMREC("MEA")=$GET(ABMREC("MEA"))_ABMR("MEA",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("MEA",10)="MEA"
+2 QUIT
20 ;MEA01 - Measurement Reference ID code
+1 SET ABMR("MEA",20)="TR"
+2 QUIT
30 ;MEA02 - Measurement Qualifier
+1 SET ABMR("MEA",30)=""
+2 SET ABMR("MEA",30)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),37,ABMJ,0)),U,19)
+3 QUIT
40 ;MEA03 - Measurement Value
+1 SET ABMR("MEA",40)=""
+2 SET ABMR("MEA",40)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),37,ABMJ,0)),U,21)
+3 QUIT