ABMDRAP1 ; IHS/ASDST/DMJ - Approved Bills Summary Report ;
;;2.6;IHS 3P BILLING SYSTEM;**21**;NOV 12, 2009;Build 379
;Original;TMD;
;IHS/SD/SDR - 2.6*21 - HEAT166818 - Fix for programming error <UNDEFINED>PRINT+7^ABMDRAP1
;
COMPUTE ;EP - Entry Point for setting up data
K ABMP("APP")
S ABM=0
F S ABM=$O(^ABMDBILL(DUZ(2),"AC","A",ABM)) Q:'ABM D DATA
Q
;
DATA S ABMP("HIT")=0 D ^ABMDRCHK Q:'ABMP("HIT")
Q:"RA"'[$P(^ABMDBILL(DUZ(2),ABM,0),U,4) S ABM("VAR")=$S(ABMP("VAR")=2:$P(^(0),U,8),1:$P(^(0),U,6)),ABM("DT")=$P($G(^(1)),U,5) Q:'ABM("VAR")!'ABM("DT")
S:'$D(ABMP("APP",ABM("VAR"))) ABMP("APP",ABM("VAR"))=""
S $P(ABMP("APP",ABM("VAR")),U)=$P(ABMP("APP",ABM("VAR")),U)+1
S X2=ABM("DT"),X1=DT D ^%DTC
S $P(ABMP("APP",ABM("VAR")),U,2)=$P(ABMP("APP",ABM("VAR")),U,2)+X
S $P(ABMP("APP",ABM("VAR")),U,3)=$P(ABMP("APP",ABM("VAR")),U,3)+$G(^ABMDBILL(DUZ(2),ABM,2))
Q
;
PRINT ;EP for printing data
U IO S ABM("PG")=0
S ABM("TOT")=0
D HDB S ABM("F")="" F S ABM("F")=$O(ABMP("APP",ABM("F"))) Q:'ABM("F") D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.I $Y>(IOSL-7) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.S $P(ABM("TOT"),U)=$P(ABM("TOT"),U)+ABMP("APP",ABM("F"))
.S $P(ABM("TOT"),U,2)=$P(ABM("TOT"),U,2)+$P(ABMP("APP",ABM("F")),U,3)
.I $G(^ABMDEXP(ABM("F"),0))="" Q ;abm*2.6*21 IHS/SD/SDR HEAT166818
.W !?3,$S(ABMP("VAR")=2:$P(^AUTNINS(ABM("F"),0),U),1:$P(^ABMDEXP(ABM("F"),0),U))
.W ?35,$J($FN($P(ABMP("APP",ABM("F")),U),",",0),4)
.W ?45,$J($FN($P(ABMP("APP",ABM("F")),U,2)\+ABMP("APP",ABM("F")),",",0),5)
.W ?56,$J($FN($P(ABMP("APP",ABM("F")),U,3),",",2),10)
W !?35,"=====",?56,"==========="
W !,?35,$J($FN($P(ABM("TOT"),U),",",0),4)
W ?56,$J($FN($P(ABM("TOT"),U,2),",",2),10)
Q
;
HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
HDB S ABM("PG")=ABM("PG")+1,ABM("I")="" D WHD^ABMDRHD
W !?45,"Avg Days"
W !?35,"Number",?45,"Awaiting",?60,"Total"
W !?3,$S(ABMP("VAR")=2:"Insurer",1:"Export Mode"),?35,"Bills",?45," Export",?59,"Charges"
W !,"-------------------------------------------------------------------------------"
Q
ABMDRAP1 ; IHS/ASDST/DMJ - Approved Bills Summary Report ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**21**;NOV 12, 2009;Build 379
+2 ;Original;TMD;
+3 ;IHS/SD/SDR - 2.6*21 - HEAT166818 - Fix for programming error <UNDEFINED>PRINT+7^ABMDRAP1
+4 ;
COMPUTE ;EP - Entry Point for setting up data
+1 KILL ABMP("APP")
+2 SET ABM=0
+3 FOR
SET ABM=$ORDER(^ABMDBILL(DUZ(2),"AC","A",ABM))
IF 'ABM
QUIT
DO DATA
+4 QUIT
+5 ;
DATA SET ABMP("HIT")=0
DO ^ABMDRCHK
IF 'ABMP("HIT")
QUIT
+1 IF "RA"'[$PIECE(^ABMDBILL(DUZ(2),ABM,0),U,4)
QUIT
SET ABM("VAR")=$SELECT(ABMP("VAR")=2:$PIECE(^(0),U,8),1:$PIECE(^(0),U,6))
SET ABM("DT")=$PIECE($GET(^(1)),U,5)
IF 'ABM("VAR")!'ABM("DT")
QUIT
+2 IF '$DATA(ABMP("APP",ABM("VAR")))
SET ABMP("APP",ABM("VAR"))=""
+3 SET $PIECE(ABMP("APP",ABM("VAR")),U)=$PIECE(ABMP("APP",ABM("VAR")),U)+1
+4 SET X2=ABM("DT")
SET X1=DT
DO ^%DTC
+5 SET $PIECE(ABMP("APP",ABM("VAR")),U,2)=$PIECE(ABMP("APP",ABM("VAR")),U,2)+X
+6 SET $PIECE(ABMP("APP",ABM("VAR")),U,3)=$PIECE(ABMP("APP",ABM("VAR")),U,3)+$GET(^ABMDBILL(DUZ(2),ABM,2))
+7 QUIT
+8 ;
PRINT ;EP for printing data
+1 USE IO
SET ABM("PG")=0
+2 SET ABM("TOT")=0
+3 DO HDB
SET ABM("F")=""
FOR
SET ABM("F")=$ORDER(ABMP("APP",ABM("F")))
IF 'ABM("F")
QUIT
Begin DoDot:1
+4 IF $Y>(IOSL-7)
DO HD
IF $DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA(DIROUT)
QUIT
+5 SET $PIECE(ABM("TOT"),U)=$PIECE(ABM("TOT"),U)+ABMP("APP",ABM("F"))
+6 SET $PIECE(ABM("TOT"),U,2)=$PIECE(ABM("TOT"),U,2)+$PIECE(ABMP("APP",ABM("F")),U,3)
+7 ;abm*2.6*21 IHS/SD/SDR HEAT166818
IF $GET(^ABMDEXP(ABM("F"),0))=""
QUIT
+8 WRITE !?3,$SELECT(ABMP("VAR")=2:$PIECE(^AUTNINS(ABM("F"),0),U),1:$PIECE(^ABMDEXP(ABM("F"),0),U))
+9 WRITE ?35,$JUSTIFY($FNUMBER($PIECE(ABMP("APP",ABM("F")),U),",",0),4)
+10 WRITE ?45,$JUSTIFY($FNUMBER($PIECE(ABMP("APP",ABM("F")),U,2)\+ABMP("APP",ABM("F")),",",0),5)
+11 WRITE ?56,$JUSTIFY($FNUMBER($PIECE(ABMP("APP",ABM("F")),U,3),",",2),10)
End DoDot:1
IF $DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA(DIROUT)
QUIT
+12 WRITE !?35,"=====",?56,"==========="
+13 WRITE !,?35,$JUSTIFY($FNUMBER($PIECE(ABM("TOT"),U),",",0),4)
+14 WRITE ?56,$JUSTIFY($FNUMBER($PIECE(ABM("TOT"),U,2),",",2),10)
+15 QUIT
+16 ;
HD DO PAZ^ABMDRUTL
IF $DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA(DIROUT)
QUIT
HDB SET ABM("PG")=ABM("PG")+1
SET ABM("I")=""
DO WHD^ABMDRHD
+1 WRITE !?45,"Avg Days"
+2 WRITE !?35,"Number",?45,"Awaiting",?60,"Total"
+3 WRITE !?3,$SELECT(ABMP("VAR")=2:"Insurer",1:"Export Mode"),?35,"Bills",?45," Export",?59,"Charges"
+4 WRITE !,"-------------------------------------------------------------------------------"
+5 QUIT