ABMDTDER ; IHS/ASDST/DMJ - PRINT REPORT OF 3P ERROR CODES ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
START ;START HERE
W !!! S %ZIS="NQ" D ^%ZIS Q:POP
I IO'=IO(0) D QUE,HOME^%ZIS Q
I $D(IO("S")) S IOP=ION D ^%ZIS
LOOP ;LOOP HERE
S ABM("PAGE")=0,$P(ABM("EQ"),"=",80)="" D HDR
S DA=0 F S DA=$O(^ABMDERR(DA)) Q:'DA!($G(ABMQUIT)) D
.S ABM("E#")=$E("00",1,3-$L(DA))_DA
.W !,ABM("E#")
.W ?6,$S($P($G(^ABMDERR(DA,31,DUZ(2),0)),"^",3)="E":"ERROR",$P($G(^(0)),"^",3)="W":"WARNING",1:"NONE")
.W ?16,$P(^ABMDERR(DA,0),U)
.I $Y+6>IOSL D
..I $E(IOST)="C" W ! S DIR(0)="E" D ^DIR K DIR I 'Y S ABMQUIT=1
..Q:$G(ABMQUIT)
..D HDR
I $D(IO("S")) D ^%ZISC
W $$EN^ABMVDF("IOF")
K ABM,ABMQUIT Q
QUE ;QUE HERE
S ZTRTN="LOOP^ABMDTDER",ZTDESC="3P ERROR CODE LIST"
K ZTSK D ^%ZTLOAD W:$D(ZTSK) !,"Task # ",ZTSK," queued.",!
Q
HDR ;REPORT HEADER
S ABM("PAGE")=ABM("PAGE")+1
W $$EN^ABMVDF("IOF"),!,?5,"ERROR CODE LIST: ",$P(^AUTTLOC(DUZ(2),0),"^",2),?70,"Page: ",ABM("PAGE")
W !!,"E# STATUS NARRATIVE"
W !,ABM("EQ"),!
Q
ABMDTDER ; IHS/ASDST/DMJ - PRINT REPORT OF 3P ERROR CODES ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
START ;START HERE
+1 WRITE !!!
SET %ZIS="NQ"
DO ^%ZIS
IF POP
QUIT
+2 IF IO'=IO(0)
DO QUE
DO HOME^%ZIS
QUIT
+3 IF $DATA(IO("S"))
SET IOP=ION
DO ^%ZIS
LOOP ;LOOP HERE
+1 SET ABM("PAGE")=0
SET $PIECE(ABM("EQ"),"=",80)=""
DO HDR
+2 SET DA=0
FOR
SET DA=$ORDER(^ABMDERR(DA))
IF 'DA!($GET(ABMQUIT))
QUIT
Begin DoDot:1
+3 SET ABM("E#")=$EXTRACT("00",1,3-$LENGTH(DA))_DA
+4 WRITE !,ABM("E#")
+5 WRITE ?6,$SELECT($PIECE($GET(^ABMDERR(DA,31,DUZ(2),0)),"^",3)="E":"ERROR",$PIECE($GET(^(0)),"^",3)="W":"WARNING",1:"NONE")
+6 WRITE ?16,$PIECE(^ABMDERR(DA,0),U)
+7 IF $Y+6>IOSL
Begin DoDot:2
+8 IF $EXTRACT(IOST)="C"
WRITE !
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF 'Y
SET ABMQUIT=1
+9 IF $GET(ABMQUIT)
QUIT
+10 DO HDR
End DoDot:2
End DoDot:1
+11 IF $DATA(IO("S"))
DO ^%ZISC
+12 WRITE $$EN^ABMVDF("IOF")
+13 KILL ABM,ABMQUIT
QUIT
QUE ;QUE HERE
+1 SET ZTRTN="LOOP^ABMDTDER"
SET ZTDESC="3P ERROR CODE LIST"
+2 KILL ZTSK
DO ^%ZTLOAD
IF $DATA(ZTSK)
WRITE !,"Task # ",ZTSK," queued.",!
+3 QUIT
HDR ;REPORT HEADER
+1 SET ABM("PAGE")=ABM("PAGE")+1
+2 WRITE $$EN^ABMVDF("IOF"),!,?5,"ERROR CODE LIST: ",$PIECE(^AUTTLOC(DUZ(2),0),"^",2),?70,"Page: ",ABM("PAGE")
+3 WRITE !!,"E# STATUS NARRATIVE"
+4 WRITE !,ABM("EQ"),!
+5 QUIT