ABMDPST3 ; IHS/SD/SDR - Pending Claims Status Report ; JUN 29, 2005
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
PRINT ;EP for printing data
K ABM("LOC TEMP"),ABM("PSU TEMP"),ABM("VT TEMP")
K ABM("CLIN TEMP"),ABM("ACTIVE INS TEMP")
S ABM("PG")=0
D HDB
S ABM("SUBCNT")=0
S ABM("TOTALCNT")=0
S (ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON"))=""
F S ABM("LOC NAME")=$O(ABM("ST",ABM("LOC NAME"))) Q:$G(ABM("LOC NAME"))="" D
.S ABM("PSUIEN")=""
.F S ABM("PSUIEN")=$O(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"))) Q:$G(ABM("PSUIEN"))="" D
..S ABM("SORT")=""
..F S ABM("SORT")=$O(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"))) Q:$G(ABM("SORT"))="" D
...S ABM("I")=""
...F S ABM("I")=$O(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"))) Q:$G(ABM("I"))="" D
....S ABM("REASON")=""
....F S ABM("REASON")=$O(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON"))) Q:$G(ABM("REASON"))="" D
.....S ABM("PSU")=$P($G(^VA(200,ABM("PSUIEN"),0)),U)
.....;DO SUB HEADERS
.....I $G(ABM("LOC TEMP"))'=ABM("LOC NAME") D:$G(ABM("LOC TEMP"))'="" SUBHDR,TOTHDR W !?3,"Visit Location: ",$G(ABM("LOC NAME")) S ABM("LOC TEMP")=ABM("LOC NAME")
.....I $G(ABM("PSU TEMP"))'=ABM("PSU") W !?6,"Status Updater: ",$G(ABM("PSU")) S ABM("PSU TEMP")=ABM("PSU")
.....I ABMY("SORT")="V" I $G(ABM("SORT TEMP"))'=ABM("SORT") D:$G(ABM("SORT TEMP"))'="" SUBHDR W !?5,"Visit Type: "_$P(^ABMDVTYP(ABM("SORT"),0),U) S ABM("SORT TEMP")=ABM("SORT")
.....I ABMY("SORT")="C" I $G(ABM("SORT TEMP"))'=ABM("SORT") D:$G(ABM("SORT TEMP"))'="" SUBHDR W !?5," Clinic: "_$G(ABM("SORT")) S ABM("SORT TEMP")=ABM("SORT")
.....I $G(ABM("ACTIVE INS TEMP"))'=$G(ABM("I")) W !?11,"Active Insurer: ",$P($G(^AUTNINS(ABM("I"),0)),U) S ABM("ACTIVE INS TEMP")=ABM("I")
.....W !!,?2,$G(ABM("REASON"))
.....W ?60,ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")),!
.....S ABM("SUBCNT")=$G(ABM("SUBCNT"))+$G(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")))
.....S ABM("TOTALCNT")=$G(ABM("TOTALCNT"))+$G(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")))
D SUBHDR
D TOTHDR
D PAZ^ABMDRUTL
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 !,?60,"Number of"
W !?2,"Reason",?60,"Claims"
W !,"-------------------------------------------------------------------------------"
Q
;
SUBHDR Q:'ABM("SUBCNT")
W !?27,"------"
W !?16,"Subtotal:",?60,ABM("SUBCNT"),!
S ABM("SUBCNT")=0
Q
;
TOTHDR Q:'ABM("TOTALCNT")
W !?27,"------"
W !?19,"Total:",?60,ABM("TOTALCNT")
S ABM("TOTALCNT")=0
Q
XIT ;EXIT POINT
K ^TMP("ABM-ICS",$J)
Q
ABMDPST3 ; IHS/SD/SDR - Pending Claims Status Report ; JUN 29, 2005
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
PRINT ;EP for printing data
+1 KILL ABM("LOC TEMP"),ABM("PSU TEMP"),ABM("VT TEMP")
+2 KILL ABM("CLIN TEMP"),ABM("ACTIVE INS TEMP")
+3 SET ABM("PG")=0
+4 DO HDB
+5 SET ABM("SUBCNT")=0
+6 SET ABM("TOTALCNT")=0
+7 SET (ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON"))=""
+8 FOR
SET ABM("LOC NAME")=$ORDER(ABM("ST",ABM("LOC NAME")))
IF $GET(ABM("LOC NAME"))=""
QUIT
Begin DoDot:1
+9 SET ABM("PSUIEN")=""
+10 FOR
SET ABM("PSUIEN")=$ORDER(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN")))
IF $GET(ABM("PSUIEN"))=""
QUIT
Begin DoDot:2
+11 SET ABM("SORT")=""
+12 FOR
SET ABM("SORT")=$ORDER(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT")))
IF $GET(ABM("SORT"))=""
QUIT
Begin DoDot:3
+13 SET ABM("I")=""
+14 FOR
SET ABM("I")=$ORDER(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I")))
IF $GET(ABM("I"))=""
QUIT
Begin DoDot:4
+15 SET ABM("REASON")=""
+16 FOR
SET ABM("REASON")=$ORDER(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")))
IF $GET(ABM("REASON"))=""
QUIT
Begin DoDot:5
+17 SET ABM("PSU")=$PIECE($GET(^VA(200,ABM("PSUIEN"),0)),U)
+18 ;DO SUB HEADERS
+19 IF $GET(ABM("LOC TEMP"))'=ABM("LOC NAME")
IF $GET(ABM("LOC TEMP"))'=""
DO SUBHDR
DO TOTHDR
WRITE !?3,"Visit Location: ",$GET(ABM("LOC NAME"))
SET ABM("LOC TEMP")=ABM("LOC NAME")
+20 IF $GET(ABM("PSU TEMP"))'=ABM("PSU")
WRITE !?6,"Status Updater: ",$GET(ABM("PSU"))
SET ABM("PSU TEMP")=ABM("PSU")
+21 IF ABMY("SORT")="V"
IF $GET(ABM("SORT TEMP"))'=ABM("SORT")
IF $GET(ABM("SORT TEMP"))'=""
DO SUBHDR
WRITE !?5,"Visit Type: "_$PIECE(^ABMDVTYP(ABM("SORT"),0),U)
SET ABM("SORT TEMP")=ABM("SORT")
+22 IF ABMY("SORT")="C"
IF $GET(ABM("SORT TEMP"))'=ABM("SORT")
IF $GET(ABM("SORT TEMP"))'=""
DO SUBHDR
WRITE !?5," Clinic: "_$GET(ABM("SORT"))
SET ABM("SORT TEMP")=ABM("SORT")
+23 IF $GET(ABM("ACTIVE INS TEMP"))'=$GET(ABM("I"))
WRITE !?11,"Active Insurer: ",$PIECE($GET(^AUTNINS(ABM("I"),0)),U)
SET ABM("ACTIVE INS TEMP")=ABM("I")
+24 WRITE !!,?2,$GET(ABM("REASON"))
+25 WRITE ?60,ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")),!
+26 SET ABM("SUBCNT")=$GET(ABM("SUBCNT"))+$GET(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")))
+27 SET ABM("TOTALCNT")=$GET(ABM("TOTALCNT"))+$GET(ABM("ST",ABM("LOC NAME"),ABM("PSUIEN"),ABM("SORT"),ABM("I"),ABM("REASON")))
End DoDot:5
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+28 DO SUBHDR
+29 DO TOTHDR
+30 DO PAZ^ABMDRUTL
+31 QUIT
+32 ;
HD DO PAZ^ABMDRUTL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
HDB SET ABM("PG")=ABM("PG")+1
SET ABM("I")=""
DO WHD^ABMDRHD
+1 WRITE !,?60,"Number of"
+2 WRITE !?2,"Reason",?60,"Claims"
+3 WRITE !,"-------------------------------------------------------------------------------"
+4 QUIT
+5 ;
SUBHDR IF 'ABM("SUBCNT")
QUIT
+1 WRITE !?27,"------"
+2 WRITE !?16,"Subtotal:",?60,ABM("SUBCNT"),!
+3 SET ABM("SUBCNT")=0
+4 QUIT
+5 ;
TOTHDR IF 'ABM("TOTALCNT")
QUIT
+1 WRITE !?27,"------"
+2 WRITE !?19,"Total:",?60,ABM("TOTALCNT")
+3 SET ABM("TOTALCNT")=0
+4 QUIT
XIT ;EXIT POINT
+1 KILL ^TMP("ABM-ICS",$JOB)
+2 QUIT