ABME8NTE ; IHS/ASDST/DMJ - 837 NTE Segment
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Transaction Set Header
;
; IHS/SD/SDR - v2.5 p9 - IM15435
; Only send 80 characters for note
;
; IHS/SD/SDR - v2.5 p9 - IM19203
; Check Block 19 for data
;
EP(X) ;EP - start here
;x=parameter
K ABMREC("NTE"),ABMR("NTE")
S ABME("RTYPE")="NTE"
S ABMEIC=X
D LOOP
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:30 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
.I $G(ABMREC("NTE"))'="" S ABMREC("NTE")=ABMREC("NTE")_"*"
.S ABMREC("NTE")=$G(ABMREC("NTE"))_ABMR("NTE",I)
Q
10 ;segment
S ABMR("NTE",10)="NTE"
Q
20 ;NTE01 - Note Reference Code
S ABMR("NTE",20)=ABMEIC
Q
30 ;NTE02 - Description
S ABMR("NTE",30)=""
I ABMEIC="ADD" D
.S ABMR("NTE",30)=$G(^ABMDBILL(DUZ(2),ABMP("BDFN"),61,1,0))
.Q:'$D(^ABMDBILL(DUZ(2),ABMP("BDFN"),61,2,0))
.S ABMR("NTE",30)=ABMR("NTE",30)_" "_^ABMDBILL(DUZ(2),ABMP("BDFN"),61,2,0)
S ABMR("NTE",30)=$TR(ABMR("NTE",30),":","-")
I ABMR("NTE",30)="" D
.S ABMR("NTE",30)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),10)),U)
S ABMR("NTE",30)=$E(ABMR("NTE",30),1,80)
Q
ABME8NTE ; IHS/ASDST/DMJ - 837 NTE Segment
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Transaction Set Header
+3 ;
+4 ; IHS/SD/SDR - v2.5 p9 - IM15435
+5 ; Only send 80 characters for note
+6 ;
+7 ; IHS/SD/SDR - v2.5 p9 - IM19203
+8 ; Check Block 19 for data
+9 ;
EP(X) ;EP - start here
+1 ;x=parameter
+2 KILL ABMREC("NTE"),ABMR("NTE")
+3 SET ABME("RTYPE")="NTE"
+4 SET ABMEIC=X
+5 DO LOOP
+6 KILL ABME,ABM
+7 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:30
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("NTE"))'=""
SET ABMREC("NTE")=ABMREC("NTE")_"*"
+5 SET ABMREC("NTE")=$GET(ABMREC("NTE"))_ABMR("NTE",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("NTE",10)="NTE"
+2 QUIT
20 ;NTE01 - Note Reference Code
+1 SET ABMR("NTE",20)=ABMEIC
+2 QUIT
30 ;NTE02 - Description
+1 SET ABMR("NTE",30)=""
+2 IF ABMEIC="ADD"
Begin DoDot:1
+3 SET ABMR("NTE",30)=$GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),61,1,0))
+4 IF '$DATA(^ABMDBILL(DUZ(2),ABMP("BDFN"),61,2,0))
QUIT
+5 SET ABMR("NTE",30)=ABMR("NTE",30)_" "_^ABMDBILL(DUZ(2),ABMP("BDFN"),61,2,0)
End DoDot:1
+6 SET ABMR("NTE",30)=$TRANSLATE(ABMR("NTE",30),":","-")
+7 IF ABMR("NTE",30)=""
Begin DoDot:1
+8 SET ABMR("NTE",30)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),10)),U)
End DoDot:1
+9 SET ABMR("NTE",30)=$EXTRACT(ABMR("NTE",30),1,80)
+10 QUIT