ABMM2PV9 ;IHS/SD/SDR - MU Patient Volume EP Report ;
;;2.6;IHS 3P BILLING SYSTEM;**15**;NOV 12, 2009;Build 251
;IHS/SD/SDR - 2.6*15 - HEAT161159 - Changed PT LST to sort differently so there won't be duplicate vsts on pt lst. Also made
; change so it will correctly report the category for the patient on the pt lst, and added record indicator.
;IHS/SD/SDR - 2.6*15 - HEAT171490 - Added facility NPI and TIN to pt list host file
;IHS/SD/SDR - 2.6*15 - HEAT183289 - Made changes to print tribal self-insured summary line
;
MET ;
S ABM("PG")=1
S ABMSDT=$P($G(^XTMP("ABM-PVP2",$J,"PRV TOP",ABMPRV)),U,2)
D HDR^ABMM2PV3
I $Y+5>IOSL D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
S ABMP("PRV")=0
S ABMNUMT=0 ;abm*2.6*12
F S ABMP("PRV")=$O(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMP("PRV"))) Q:'ABMP("PRV") D Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
.I $Y+5>IOSL D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
.I ABMP("PRV")'=ABMPRV Q
.S ABMVLOC=0
.F S ABMVLOC=$O(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMP("PRV"),ABMVLOC)) Q:'ABMVLOC D
..I $Y+5>IOSL D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
..F ABM=1:1:80 W "-"
..S ABMLOC=$$GET1^DIQ(9999999.06,ABMVLOC,.02,"E")
..S (ABMTENC,ABMDENOM)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMPRV,ABMVLOC))
..S ABMMPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
..S ABMMZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
..S ABMMENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
..S ABMCPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
..S ABMCZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
..S ABMCENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
..S ABMOTHPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"OTHR"))
..I $G(ABMFQHC)=1 D
...S ABMUNCR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,ABMVLOC,"UNCOMP")) ;abm*2.6*12 uncomp care
...S ABMTSI=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,ABMVLOC,"TRIBSI")) ;abm*2.6*15 HEAT183289 tribal self-insured
..S ABMNUMT=+$G(ABMNUMT)+ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$G(ABMUNCR) ;abm*2.6*15 HEAT183289
..;S ABMNUMT=+$G(ABMNUMT)+ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$G(ABMUNCR)+$G(ABMTSI) ;abm*2.6*15 HEAT183289
..;
..W !,"Patient Volume "_ABMLOC_": "_+$P($G(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMSDT,ABMPRV,ABMVLOC)),U)_"%"
..W !!,"Total Patient Encounters (Denominator) "_ABMLOC_": ",?70,$J(ABMTENC,8) ;abm*2.6*12
..W !,"Total Numerator Encounters "_ABMLOC_": ",?70,$J((ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$G(ABMUNCR)),8) ;abm*2.6*12
..W !,"Total Medicaid Paid Encounters "_ABMLOC_": ",?70,$J(ABMMPD,8)
..W !,"Total Medicaid Zero Paid Encounters "_ABMLOC_": ",?70,$J(ABMMZPD,8)
..W !,"Total Medicaid Enrolled (Not Billed) Encounters "_ABMLOC_": ",?70,$J(ABMMENR,8) ;abm*2.6*12
..W !,"Total Kidscare/Chip Paid Encounters "_ABMLOC_": ",?70,$J(ABMCPD,8)
..W !,"Total Kidscare/Chip Zero Paid Encounters "_ABMLOC_": ",?70,$J(ABMCZPD,8)
..W !,"Total Kidscare/Chip Enrolled (Not Billed) Encounters "_ABMLOC_": ",?70,$J(ABMCENR,8) ;abm*2.6*12
..;W !,"Total Paid Other Encounters "_ABMLOC_" (*not included in numerator): ",?70,$J(ABMOTHPD,8) ;abm*2.6*12 ;abm*2.6*15 HEAT183289
..W !,"Total Paid Other Encounters "_ABMLOC_" (*not incl. in numerator): ",?70,$J(ABMOTHPD,8) ;abm*2.6*12 ;abm*2.6*15 HEAT183289
..;W:($G(ABMFQHC)=1) !,"Total Uncompensated Care "_ABMLOC_": ",?70,$J(ABMUNCR,8) ;abm*2.6*12 uncomp care ;abm*2.6*15 HEAT183289
..;start new abm*2.6*15 HEAT183289
..I ($G(ABMFQHC)=1) D
...W !,"Total Uncompensated Care "_ABMLOC_": ",?70,$J(ABMUNCR,8)
...W !,"Total Tribal Self-Insured "_ABMLOC_" (*not incl. in numerator): ",?70,$J(ABMTSI,8)
;end new HEAT183289
W !
F ABM=1:1:80 W "-"
W !,"Patient Volume all calculated Facilities: ",+$P($G(^XTMP("ABM-PVP2",$J,"PRV TOP",ABMPRV)),U)_"%"
W !!,"Total Patient Encounters (Denominator) All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMPRV)),8) ;abm*2.6*12
W !,"Total Numerator Encounters All Facilities Total: ",?70,$J(ABMNUMT,8) ;abm*2.6*12
W !,"Total Medicaid Paid Medicaid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"MCD")),8)
W !,"Total Medicaid Zero Paid Medicaid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"MCD")),8)
;W !,"Total Medicaid Enrolled Medicaid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),8) ;abm*2.6*12
W !,"Total Medicaid Enrolled (Not Billed) Medicaid Encounters All Facs: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),8) ;abm*2.6*12
W !,"Total Kidscare/Chip Paid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"CHIP")),8)
W !,"Total Kidscare/Chip Zero Paid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"CHIP")),8)
W !,"Total Kidscare/Chip Enrolled (Not Billed) Encounters All Facs Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"CHIP")),8) ;abm*2.6*12
W !,"Total Paid Other Encounters All Facs (*not included in numerator): ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"OTHR")),8) ;abm*2.6*12
;W:($G(ABMFQHC)=1) !,"Total Uncompensated Care All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),8) ;abm*2.6*12 uncomp care ;abm*2.6*15 HEAT183289
;start new abm*2.6*15 HEAT183289
I ($G(ABMFQHC)=1) D
.W !,"Total Uncompensated Care All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),8)
.W !,"Total Tribal Self-Insured All Facilities Total (*not incl. in numer.): ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,"TRIBSI")),7)
;end new HEAT183289
W !
Q
ABMM2PV9 ;IHS/SD/SDR - MU Patient Volume EP Report ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**15**;NOV 12, 2009;Build 251
+2 ;IHS/SD/SDR - 2.6*15 - HEAT161159 - Changed PT LST to sort differently so there won't be duplicate vsts on pt lst. Also made
+3 ; change so it will correctly report the category for the patient on the pt lst, and added record indicator.
+4 ;IHS/SD/SDR - 2.6*15 - HEAT171490 - Added facility NPI and TIN to pt list host file
+5 ;IHS/SD/SDR - 2.6*15 - HEAT183289 - Made changes to print tribal self-insured summary line
+6 ;
MET ;
+1 SET ABM("PG")=1
+2 SET ABMSDT=$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV TOP",ABMPRV)),U,2)
+3 DO HDR^ABMM2PV3
+4 IF $Y+5>IOSL
DO HD^ABMM2PV3
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+5 SET ABMP("PRV")=0
+6 ;abm*2.6*12
SET ABMNUMT=0
+7 FOR
SET ABMP("PRV")=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMP("PRV")))
IF 'ABMP("PRV")
QUIT
Begin DoDot:1
+8 IF $Y+5>IOSL
DO HD^ABMM2PV3
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+9 IF ABMP("PRV")'=ABMPRV
QUIT
+10 SET ABMVLOC=0
+11 FOR
SET ABMVLOC=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMP("PRV"),ABMVLOC))
IF 'ABMVLOC
QUIT
Begin DoDot:2
+12 IF $Y+5>IOSL
DO HD^ABMM2PV3
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+13 FOR ABM=1:1:80
WRITE "-"
+14 SET ABMLOC=$$GET1^DIQ(9999999.06,ABMVLOC,.02,"E")
+15 SET (ABMTENC,ABMDENOM)=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMPRV,ABMVLOC))
+16 SET ABMMPD=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
+17 SET ABMMZPD=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
+18 SET ABMMENR=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,ABMVLOC,"MCD"))
+19 SET ABMCPD=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
+20 SET ABMCZPD=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
+21 SET ABMCENR=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,ABMVLOC,"CHIP"))
+22 SET ABMOTHPD=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,ABMVLOC,"OTHR"))
+23 IF $GET(ABMFQHC)=1
Begin DoDot:3
+24 ;abm*2.6*12 uncomp care
SET ABMUNCR=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,ABMVLOC,"UNCOMP"))
+25 ;abm*2.6*15 HEAT183289 tribal self-insured
SET ABMTSI=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,ABMVLOC,"TRIBSI"))
End DoDot:3
+26 ;abm*2.6*15 HEAT183289
SET ABMNUMT=+$GET(ABMNUMT)+ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$GET(ABMUNCR)
+27 ;S ABMNUMT=+$G(ABMNUMT)+ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$G(ABMUNCR)+$G(ABMTSI) ;abm*2.6*15 HEAT183289
+28 ;
+29 WRITE !,"Patient Volume "_ABMLOC_": "_+$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",ABMSDT,ABMPRV,ABMVLOC)),U)_"%"
+30 ;abm*2.6*12
WRITE !!,"Total Patient Encounters (Denominator) "_ABMLOC_": ",?70,$JUSTIFY(ABMTENC,8)
+31 ;abm*2.6*12
WRITE !,"Total Numerator Encounters "_ABMLOC_": ",?70,$JUSTIFY((ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+$GET(ABMUNCR)),8)
+32 WRITE !,"Total Medicaid Paid Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMMPD,8)
+33 WRITE !,"Total Medicaid Zero Paid Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMMZPD,8)
+34 ;abm*2.6*12
WRITE !,"Total Medicaid Enrolled (Not Billed) Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMMENR,8)
+35 WRITE !,"Total Kidscare/Chip Paid Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMCPD,8)
+36 WRITE !,"Total Kidscare/Chip Zero Paid Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMCZPD,8)
+37 ;abm*2.6*12
WRITE !,"Total Kidscare/Chip Enrolled (Not Billed) Encounters "_ABMLOC_": ",?70,$JUSTIFY(ABMCENR,8)
+38 ;W !,"Total Paid Other Encounters "_ABMLOC_" (*not included in numerator): ",?70,$J(ABMOTHPD,8) ;abm*2.6*12 ;abm*2.6*15 HEAT183289
+39 ;abm*2.6*12 ;abm*2.6*15 HEAT183289
WRITE !,"Total Paid Other Encounters "_ABMLOC_" (*not incl. in numerator): ",?70,$JUSTIFY(ABMOTHPD,8)
+40 ;W:($G(ABMFQHC)=1) !,"Total Uncompensated Care "_ABMLOC_": ",?70,$J(ABMUNCR,8) ;abm*2.6*12 uncomp care ;abm*2.6*15 HEAT183289
+41 ;start new abm*2.6*15 HEAT183289
+42 IF ($GET(ABMFQHC)=1)
Begin DoDot:3
+43 WRITE !,"Total Uncompensated Care "_ABMLOC_": ",?70,$JUSTIFY(ABMUNCR,8)
+44 WRITE !,"Total Tribal Self-Insured "_ABMLOC_" (*not incl. in numerator): ",?70,$JUSTIFY(ABMTSI,8)
End DoDot:3
End DoDot:2
End DoDot:1
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+45 ;end new HEAT183289
+46 WRITE !
+47 FOR ABM=1:1:80
WRITE "-"
+48 WRITE !,"Patient Volume all calculated Facilities: ",+$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV TOP",ABMPRV)),U)_"%"
+49 ;abm*2.6*12
WRITE !!,"Total Patient Encounters (Denominator) All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMPRV)),8)
+50 ;abm*2.6*12
WRITE !,"Total Numerator Encounters All Facilities Total: ",?70,$JUSTIFY(ABMNUMT,8)
+51 WRITE !,"Total Medicaid Paid Medicaid Encounters All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,"MCD")),8)
+52 WRITE !,"Total Medicaid Zero Paid Medicaid Encounters All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"MCD")),8)
+53 ;W !,"Total Medicaid Enrolled Medicaid Encounters All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),8) ;abm*2.6*12
+54 ;abm*2.6*12
WRITE !,"Total Medicaid Enrolled (Not Billed) Medicaid Encounters All Facs: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),8)
+55 WRITE !,"Total Kidscare/Chip Paid Encounters All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,"CHIP")),8)
+56 WRITE !,"Total Kidscare/Chip Zero Paid Encounters All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"CHIP")),8)
+57 ;abm*2.6*12
WRITE !,"Total Kidscare/Chip Enrolled (Not Billed) Encounters All Facs Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,"CHIP")),8)
+58 ;abm*2.6*12
WRITE !,"Total Paid Other Encounters All Facs (*not included in numerator): ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,"OTHR")),8)
+59 ;W:($G(ABMFQHC)=1) !,"Total Uncompensated Care All Facilities Total: ",?70,$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),8) ;abm*2.6*12 uncomp care ;abm*2.6*15 HEAT183289
+60 ;start new abm*2.6*15 HEAT183289
+61 IF ($GET(ABMFQHC)=1)
Begin DoDot:1
+62 WRITE !,"Total Uncompensated Care All Facilities Total: ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),8)
+63 WRITE !,"Total Tribal Self-Insured All Facilities Total (*not incl. in numer.): ",?70,$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,"TRIBSI")),7)
End DoDot:1
+64 ;end new HEAT183289
+65 WRITE !
+66 QUIT