ABME5BHT ; IHS/ASDST/DMJ - 837 BHT Segment ;
;;2.6;IHS Third Party Billing System;**6**;NOV 12, 2009
;Beginning of Hierarchical Transaction
;
START ;START HERE
K ABMREC("BHT"),ABMR("BHT")
S ABME("RTYPE")="BHT"
D LOOP
K ABME,ABM
K ABMCREM ;5010 837P
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("BHT"))'="" S ABMREC("BHT")=ABMREC("BHT")_"*"
.S ABMREC("BHT")=$G(ABMREC("BHT"))_ABMR("BHT",I)
Q
10 ;segment
S ABMR("BHT",10)="BHT"
Q
20 ;BHT01 - Hierarchical Structure Code
S ABMR("BHT",20)="0019"
Q
30 ;BHT02 - Transaction Set Purpose Code
S ABMR("BHT",30)="00"
Q
40 ;BHT03 - Reference Identification
S ABMR("BHT",40)=$$TCN^ABMERUTL(ABMPXMIT)
Q
50 ;BHT04 - Date
S ABMR("BHT",50)=$$Y2KD2^ABMDUTL(DT)
Q
60 ;BHT05 - Time
D NOW^%DTC
S ABMR("BHT",60)=$P(%,".",2)
S ABMR("BHT",60)=$$FMT^ABMERUTL(ABMR("BHT",60),"4N")
Q
70 ;BHT06 - Transaction Type Code
S ABMR("BHT",70)="CH"
I $P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),0)),U,25)="Y" S ABMR("BHT",70)="RP" ;abm*2.6*6 5010
Q
ABME5BHT ; IHS/ASDST/DMJ - 837 BHT Segment ;
+1 ;;2.6;IHS Third Party Billing System;**6**;NOV 12, 2009
+2 ;Beginning of Hierarchical Transaction
+3 ;
START ;START HERE
+1 KILL ABMREC("BHT"),ABMR("BHT")
+2 SET ABME("RTYPE")="BHT"
+3 DO LOOP
+4 KILL ABME,ABM
+5 ;5010 837P
KILL ABMCREM
+6 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("BHT"))'=""
SET ABMREC("BHT")=ABMREC("BHT")_"*"
+5 SET ABMREC("BHT")=$GET(ABMREC("BHT"))_ABMR("BHT",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("BHT",10)="BHT"
+2 QUIT
20 ;BHT01 - Hierarchical Structure Code
+1 SET ABMR("BHT",20)="0019"
+2 QUIT
30 ;BHT02 - Transaction Set Purpose Code
+1 SET ABMR("BHT",30)="00"
+2 QUIT
40 ;BHT03 - Reference Identification
+1 SET ABMR("BHT",40)=$$TCN^ABMERUTL(ABMPXMIT)
+2 QUIT
50 ;BHT04 - Date
+1 SET ABMR("BHT",50)=$$Y2KD2^ABMDUTL(DT)
+2 QUIT
60 ;BHT05 - Time
+1 DO NOW^%DTC
+2 SET ABMR("BHT",60)=$PIECE(%,".",2)
+3 SET ABMR("BHT",60)=$$FMT^ABMERUTL(ABMR("BHT",60),"4N")
+4 QUIT
70 ;BHT06 - Transaction Type Code
+1 SET ABMR("BHT",70)="CH"
+2 ;abm*2.6*6 5010
IF $PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),0)),U,25)="Y"
SET ABMR("BHT",70)="RP"
+3 QUIT