ABMCHRPT ; IHS/SD/SDR - Clearing House report ;
;;2.6;IHS 3P BILLING SYSTEM;**6**;NOV 12, 2009
;
START ;start
W !!,"This report will print all Clearinghouse entries and their associated insurers,"
W !,"as well as any fields that have been populated for that Clearinghouse."
;
SEL ;
S ABM("HD",0)="CLEARINGHOUSE LISTING"
S ABM("PG")=0
D ^ABMDRHD
S ABMQ("RC")="COMPUTE^ABMCHRPT",ABMQ("RX")="POUT^ABMDRUTL",ABMQ("NS")="ABM"
S ABMQ("RP")="PRINT^ABMCHRPT"
D ^ABMDRDBQ
Q
;
COMPUTE ;EP - Entry Point for Setting up Data
Q
PRINT ;EP for printing data
S ABMCHIEN=0
D HDB
F S ABMCHIEN=$O(^ABMRECVR(ABMCHIEN)) Q:'ABMCHIEN D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.I $Y>(IOSL-5) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) W " (cont)"
.S ABMCH=$P($G(^ABMRECVR(ABMCHIEN,0)),U)
.S ABMPAYID=$P($G(^ABMRECVR(ABMCHIEN,0)),U,2)
.W !,ABMCH_" PAYER ID: ",ABMPAYID
.S ABMINS=0
.F S ABMINS=$O(^ABMRECVR(ABMCHIEN,1,ABMINS)) Q:'ABMINS D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
..I $Y>(IOSL-5) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) W " (cont)"
..S ABMINSN=$P($G(^AUTNINS(ABMINS,0)),U)
..S ABMIPYID=$P($G(^ABMRECVR(ABMCHIEN,1,ABMINS,0)),U,2)
..S ABMCONTN=$P($G(^AUTNINS(ABMINS,0)),U,8)
..S ABMEMCID=$P($G(^ABMNINS(DUZ(2),ABMINS,0)),U,2)
..W !,?3,ABMINSN
..W ?32,ABMIPYID
..W ?42
..W ?50,ABMCONTN
..W ?69,ABMEMCID
.W !
Q:$D(DIROUT)!($D(DUOUT))!($D(DTOUT))
Q
;
HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
HDB S ABM("PG")=ABM("PG")+1 D WHD^ABMDRHD
W !,"Clearinghouse"
W !?3,"Insurer",?32,"Payer ID",?42,"EXP",?50,"AO CONTROL#",?69,"EMC SUB ID"
S $P(ABM("LINE"),"-",80)="" W !,ABM("LINE") K ABM("LINE")
Q
ABMCHRPT ; IHS/SD/SDR - Clearing House report ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**6**;NOV 12, 2009
+2 ;
START ;start
+1 WRITE !!,"This report will print all Clearinghouse entries and their associated insurers,"
+2 WRITE !,"as well as any fields that have been populated for that Clearinghouse."
+3 ;
SEL ;
+1 SET ABM("HD",0)="CLEARINGHOUSE LISTING"
+2 SET ABM("PG")=0
+3 DO ^ABMDRHD
+4 SET ABMQ("RC")="COMPUTE^ABMCHRPT"
SET ABMQ("RX")="POUT^ABMDRUTL"
SET ABMQ("NS")="ABM"
+5 SET ABMQ("RP")="PRINT^ABMCHRPT"
+6 DO ^ABMDRDBQ
+7 QUIT
+8 ;
COMPUTE ;EP - Entry Point for Setting up Data
+1 QUIT
PRINT ;EP for printing data
+1 SET ABMCHIEN=0
+2 DO HDB
+3 FOR
SET ABMCHIEN=$ORDER(^ABMRECVR(ABMCHIEN))
IF 'ABMCHIEN
QUIT
Begin DoDot:1
+4 IF $Y>(IOSL-5)
DO HD
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
WRITE " (cont)"
+5 SET ABMCH=$PIECE($GET(^ABMRECVR(ABMCHIEN,0)),U)
+6 SET ABMPAYID=$PIECE($GET(^ABMRECVR(ABMCHIEN,0)),U,2)
+7 WRITE !,ABMCH_" PAYER ID: ",ABMPAYID
+8 SET ABMINS=0
+9 FOR
SET ABMINS=$ORDER(^ABMRECVR(ABMCHIEN,1,ABMINS))
IF 'ABMINS
QUIT
Begin DoDot:2
+10 IF $Y>(IOSL-5)
DO HD
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
WRITE " (cont)"
+11 SET ABMINSN=$PIECE($GET(^AUTNINS(ABMINS,0)),U)
+12 SET ABMIPYID=$PIECE($GET(^ABMRECVR(ABMCHIEN,1,ABMINS,0)),U,2)
+13 SET ABMCONTN=$PIECE($GET(^AUTNINS(ABMINS,0)),U,8)
+14 SET ABMEMCID=$PIECE($GET(^ABMNINS(DUZ(2),ABMINS,0)),U,2)
+15 WRITE !,?3,ABMINSN
+16 WRITE ?32,ABMIPYID
+17 WRITE ?42
+18 WRITE ?50,ABMCONTN
+19 WRITE ?69,ABMEMCID
End DoDot:2
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+20 WRITE !
End DoDot:1
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+21 IF $DATA(DIROUT)!($DATA(DUOUT))!($DATA(DTOUT))
QUIT
+22 QUIT
+23 ;
HD DO PAZ^ABMDRUTL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
HDB SET ABM("PG")=ABM("PG")+1
DO WHD^ABMDRHD
+1 WRITE !,"Clearinghouse"
+2 WRITE !?3,"Insurer",?32,"Payer ID",?42,"EXP",?50,"AO CONTROL#",?69,"EMC SUB ID"
+3 SET $PIECE(ABM("LINE"),"-",80)=""
WRITE !,ABM("LINE")
KILL ABM("LINE")
+4 QUIT