ABMM2PV5 ;IHS/SD/SDR - MU Patient Volume EP Report ;
;;2.6;IHS 3P BILLING SYSTEM;**11,12,15**;NOV 12, 2009;Build 251
;IHS/SD/SDR - 2.6*12 - Updated FQHC/RHC/Tribal to include Urban
;IHS/SD/SDR - 2.6*12 - Made changes for uncompensated care; uncompensated should be a separate detail line
; and should be included in the patient volume total, not as a separate line. Also initialized ABMFQHC variable.
;IHS/SD/SDR - 2.6*15 - HEAT183289 - Tribal self-insured added to not-met report
;
NOTMET ;EP
S ABMCNT=0
K ABMLN
S ABMSDT=$P($G(^XTMP("ABM-PVP2",$J,"PRV TOP",ABMPRV)),U,2)
;
I +$G(ABMY("TVDTS"))'=0 D
.S ABMCNT=0
.S ABMDT=0
.F S ABMDT=$O(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMDT)) Q:'ABMDT D
..S ABMP("PRV")=0
..F S ABMP("PRV")=$O(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMDT,ABMP("PRV"))) Q:'ABMP("PRV") D
...I ABMP("PRV")'=ABMPRV Q
...S ABMCNT=ABMCNT+1
...;S ABMPRC($G(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMDT,ABMPRV)),ABMCNT)=ABMDT ;abm*2.6*12 HEAT136326
...S ABMPRC(+$G(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMDT,ABMPRV)),ABMCNT)=ABMDT ;abm*2.6*12 HEAT136326
.S ABMP=""
.S ABMSAV=ABMCNT-ABMY("TVDTS")
.F S ABMP=$O(ABMPRC(ABMP)) Q:ABMP="" D
..S ABMCNT=0,ABMC=0
..F S ABMCNT=$O(ABMPRC(ABMP,ABMCNT)) Q:'ABMCNT D Q:(ABMC=ABMSAV)
...K ^XTMP("ABM-PVP2",$J,"PRV PERCENT",$G(ABMPRC(ABMP,ABMCNT))),ABMP("PRV")
...S ABMC=ABMC+1
;
S ABM("PG")=1
S ABMSDT=$P($G(^XTMP("ABM-PVP2",$J,"PRV TOP",ABMPRV)),U,2)
I +ABMSDT=0 S ABMSDT=ABMY("SDT")
D HDR
W !,"The Patient Volume Threshold (30% for EPs, or 20% for Pediatricians) was not"
W !,"met for the "_$S(("^A^B^C^"[("^"_ABMY("90")_"^")):"timeframe entered",1:"MU Qualification year")_"."
W !,"Details for the volumes that were achieved are provided for your information.",!
W !,"Highest Patient Volume Met: ",+$P($G(^XTMP("ABM-PVP2",$J,"PRV TOP",ABMPRV)),U)_"%"
W !,"First Day Highest Patient Volume Achieved: ",$$SDT^ABMDUTL(ABMSDT)
;
I $Y+5>IOSL D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
S ABMTHPV=0
S:ABMSDT ABMTHPV=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMPRV))
S ABMMHPV=0
S:ABMSDT ABMMHPV=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM",ABMSDT,ABMPRV))
W !!,"Total Patient Encounters of First Highest Patient Volume Period: ",ABMTHPV,!
S ABMU("TXT")="Total Medicaid"_$S(+$G(ABMFQHC)=1:"/Needy Individual",1:"")
S ABMU("TXT")=ABMU("TXT")_" Encounters of First Highest Patient Volume Period: "_ABMMHPV
S ABMU("LM")=0,ABMU("RM")=80,ABMU("LNG")=80
D ^ABMDWRAP
D NMHDR
;
S ABMSDT=0,ABMCNT=0
S ABMDTCNT=0
F S ABMSDT=$O(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT)) Q:'ABMSDT D
.;I ABMY("90")'="A"&(ABMY("SDT")'=ABMSDT) Q ;only calculate whole year for automated ;abm*2.6*12 uncomp care
.I "^A^D^"'[("^"_ABMY("90")_"^")&(ABMY("SDT")'=ABMSDT) Q ;only whole year for automated ;abm*2.6*12 uncomp care
.;start new code abm*2.6*12 HEAT134048
.S X1=ABMY("SDT")
.S X2=275
.D C^%DTC
.I "^A^D^"[("^"_ABMY("90")_"^")&(ABMSDT>X) Q ;275 days after start won't contain 90 days anymore
.;end new code HEAT134048
.S ABMDTCNT=+$G(ABMDTCNT)+1
.;
.I $Y+5>IOSL D HD^ABMM2PV3,NMHDR Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
.S ABMP("PRV")=0
.F S ABMP("PRV")=$O(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMP("PRV"))) Q:'ABMP("PRV") D
..I $Y+5>IOSL D HD^ABMM2PV3,NMHDR Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
..I ABMP("PRV")'=ABMPRV Q
..;I +$G(ABMY("EDT"))=0 D
..;.S X1=ABMSDT
..;.S X2=89
..;.D C^%DTC
..;.S ABMEDT=X
..;I +$G(ABMY("EDT"))'=0 S ABMEDT=ABMY("EDT")
..S X1=ABMSDT
..S X2=89
..D C^%DTC
..S ABMEDT=X
..S ABMPD=$TR($P($$MDT^ABMDUTL(ABMSDT),"-",1,2),"-"," ")_"-"_$TR($P($$MDT^ABMDUTL(ABMEDT),"-",1,2),"-"," ") ;report period
..S ABMRT=$J($G(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMSDT,ABMPRV)),5)_"%" ;rate
..S ABMDEN=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMPRV)),6) ;denominator
..S ABMNUM=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM",ABMSDT,ABMPRV)),6) ;numerator
..S ABMMCDPD=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"MCD")),6)
..S ABMSCHPD=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"CHIP")),5)
..S ABMMCDZP=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"MCD")),6)
..S ABMMCDEN=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),6)
..S ABMSCHZP=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"CHIP")),5)
..S ABMSCHEN=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"CHIP")),5)
..;S ABMUNCOM=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),6) ;abm*2.6*12 ;abm*2.6*15 HEAT183289
..S ABMUNCOM=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),4) ;abm*2.6*15 HEAT183289 shortened to make room for tribal self-insured
..S ABMTSI=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,"TRIBSI")),2) ;abm*2.6*15 HEAT183289 tribal self-insured not met
..;W !,ABMPD,?15,ABMRT,?20,ABMDEN,?28,ABMNUM,?35,ABMMCDPD,?41,ABMMCDZP,?50,ABMMCDEN,?57,ABMSCHPD,?63,ABMSCHZP,?73,ABMSCHEN ;abm*2.6*12
..W !,ABMPD,?13,ABMRT,?20,ABMDEN,?27,ABMNUM,?34,ABMMCDPD,?41,ABMMCDZP,?48,ABMMCDEN,?55,ABMSCHPD,?62,ABMSCHZP,?67,ABMSCHEN ;abm*2.6*12
..;I ABMFQHC=1 W ?74,ABMUNCOM ;abm*2.6*12 ;abm*2.6*15 HEAT183289
..I ABMFQHC=1 W ?74,ABMUNCOM,?78,ABMTSI ;abm*2.6*15 HEAT183289
I ABMDTCNT=0 D
.W !!, "<< NO DATA FOUND FOR SELECTION >>"
Q
NMHDR ;EP
W !
F ABM=1:1:80 W "="
W !,"MEDICAID"_$S($G(ABMFQHC)=1:"/NEEDY INDIVIDUAL",1:"")_" PATIENT VOLUME"_$S($G(ABMY("ADT"))="":" - QUALIFICATION YEAR "_ABMY("QYR"),1:"")
;start old code abm*2.6*12 uncomp care
;W !,"Report Period",?15,"Rate",?21,"Denom-",?30,"Numer-",?38,"Mcd",?44,"Mcd",?52,"Mcd",?58,"Schip",?64,"Schip",?73,"Schip"
;W !?21,"inator",?30,"ator",?37,"Paid",?42,"ZeroPd",?49,"Enrolled",?59,"Paid",?64,"ZeroPd",?71,"Enrolled"
;end old start new uncomp care
W !?20,"Denom-",?28,"Numer-",?34,"| --Medicaid-- | --- Schip --- |"
;I ABMFQHC=1 W ?73,"Uncomp-" ;abm*2.6*15 HEAT183289 tribal self-insured
I ABMFQHC=1 W ?73,"Un- |T" ;abm*2.6*15 HEAT183289 tribal self-insured
W !,"Report Period",?15,"Rate",?20,"inator",?28,"ator",?34,"|",?38,"Pd",?44,"ZP",?51,"En",?55,"|",?57,"Pd",?63,"ZP",?69,"En|"
;I ABMFQHC=1 W ?73,"ensated" ;abm*2.6*15 HEAT183289 tribal self-insured
I ABMFQHC=1 W ?73,"Comp|SI" ;abm*2.6*15 HEAT183289 tribal self-insured
;end new uncomp care
W !
F ABM=1:1:80 W "="
Q
HDR ;EP
S:ABMSDT="" ABMSDT=ABMY("SDT")
I ABMY(90)="A"!(ABMY(90)="B") D
.S X1=ABMSDT
.S X2=89
.D C^%DTC
.S ABMEDT=X
I ABMY(90)="C" S ABMEDT=ABMY("EDT")
D EN^ABMVDF("IOF")
W !
I ABMY("RFMT")="P" D CENTER^ABMUCUTL("CONFIDENTIAL PATIENT INFORMATIONCOVERED BY THE PRIVACY ACT") W !
I ABMY("RTYP")="SEL" D CENTER^ABMUCUTL("IHS Meaningful Use Patient Volume Report - Eligible Professional Page "_ABM("PG"))
I ABMY("RTYP")="GRP" D CENTER^ABMUCUTL("IHS Meaningful Use Patient Volume Report - Group Practice Page "_ABM("PG"))
I ABMY("RTYP")="HOS" D CENTER^ABMUCUTL(" IHS Meaningful Use Patient Volume Report - Hospital Page "_ABM("PG"))
I ABMY("RFMT")'="P",+$G(ABMPMET)=0 W ! D CENTER^ABMUCUTL("Minimum Patient Volume NOT Achieved")
I ABMY("RFMT")="P" W ! D CENTER^ABMUCUTL("PATIENT LIST")
W !
D NOW^%DTC
D CENTER^ABMUCUTL("Report Run Date: "_$$CDT^ABMDUTL(%))
W !
D CENTER^ABMUCUTL("Report Generated by: "_$$GET1^DIQ(200,DUZ,.01,"E"))
I ABM("PG")=1 D
.S ABMFQHC=0 ;abm*2.6*12
.I ABMY("RTYP")'="HOS" D
..W !!,"Participation Year: ",ABMY("PYR")
..W:("^A^B^C^"[("^"_ABMY("90")_"^")) !,"Qualification Year: ",ABMY("QYR")
..W:$G(ABMY("ADT")) !,"Attestation Date: ",$$SDT^ABMDUTL(ABMY("ADT"))
.I ABMY("RTYP")="HOS" D
..W !!,"Participation Federal fiscal year: ",ABMY("PYR")
..W:("^A^B^C^"[("^"_ABMY("90")_"^")) !,"Qualification Year: ",ABMY("QYR")
..W:$G(ABMY("AYR")) !,"Attestation Federal fiscal year: ",ABMY("AYR")
.I ("^F^H^"[("^"_$G(ABMY("A90"))_"^")) D
..W !,$S($G(ABMY("A90"))="F":"First",1:"Highest")_" Reporting Period Identified: "
..W $S(ABMSDT:$$SDT^ABMDUTL(ABMSDT),1:"")
..;start new abm*2.6*12
..S X1=$P(ABMSDT,".")
..S X2=+89
..D C^%DTC
..W " thru "_$$SDT^ABMDUTL(X)
..;end new abm*2.6*12
.I ("^D^E^"[("^"_ABMY("90")_"^")) W !,$S($G(ABMY("90"))="D":"Automated",1:"Specified")_" 90-Day Period in last 12 months "
.;I ("^A^D^E^"'[("^"_ABMY("90")_"^")) W !,"Reporting Period Identified: ",$S(ABMSDT:$$SDT^ABMDUTL(ABMSDT)_" thru "_$$SDT^ABMDUTL(ABMEDT),ABMY("SDT"):$$SDT^ABMDUTL(ABMY("SDT"))_" thru "_$$SDT^ABMDUTL(ABMEDT),1:"NONE FOUND") ;abm*2.6*12 HEAT134048
.;below line new abm*2.6*12 HEAT134048
.I ("^F^H^"'[("^"_$G(ABMY("A90"))_"^")) W !,"Reporting Period Identified: ",$S(ABMSDT:$$SDT^ABMDUTL(ABMSDT)_" thru "_$$SDT^ABMDUTL(ABMEDT),ABMY("SDT"):$$SDT^ABMDUTL(ABMY("SDT"))_" thru "_$$SDT^ABMDUTL(ABMEDT),1:"NONE FOUND")
.I ABMY("RTYP")'="HOS" D
..W !,"Facility(s): ",!
..S ABML=0
..;F S ABML=$O(ABMF(ABML)) Q:'ABML W ?10,$$GET1^DIQ(9999999.06,ABML,.01,"E"),$S($D(^ABMMUPRM(1,1,"B",ABML)):" (FQHC/RHC/Tribal)",1:""),! I $D(^ABMMUPRM(1,1,"B",ABML)) S ABMFQHC=1 ;abm*2.6*12 include Urban
..F S ABML=$O(ABMF(ABML)) Q:'ABML W ?10,$$GET1^DIQ(9999999.06,ABML,.01,"E"),$S($D(^ABMMUPRM(1,1,"B",ABML)):" (FQHC/RHC/Tribal/Urban)",1:""),! I $D(^ABMMUPRM(1,1,"B",ABML)) S ABMFQHC=1 ;abm*2.6*12 include Urban
.;
.;start old code abm*2.6*12 uncomp care
.;I $G(ABMFQHC)=1 D
.;.S ABMMPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"MCD"))
.;.S ABMMZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"MCD"))
.;.S ABMMENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD"))
.;.S ABMCPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,ABMPRV,"CHIP"))
.;.S ABMCZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"CHIP"))
.;.S ABMCENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,ABMPRV,"CHIP"))
.;.S ABMOTHPD=+$G(^XTMP("ABM-PVP2",$J,"PRV ENC CNT",ABMSDT,ABMPRV,"OTHR"))
.;.S (ABMTENC,ABMDENOM)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT,ABMPRV))
.;.I ABMY("RTYP")="GRP" D
.;..S ABMMPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,"MCD"))
.;..S ABMMZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,"MCD"))
.;..S ABMMENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,"MCD"))
.;..S ABMCPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMSDT,"CHIP"))
.;..S ABMCZPD=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMSDT,"CHIP"))
.;..S ABMCENR=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ENR",ABMSDT,"CHIP"))
.;..S ABMOTHPD=+$G(^XTMP("ABM-PVP2",$J,"PRV ENC CNT",ABMSDT,"OTHR"))
.;..S (ABMTENC,ABMDENOM)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMSDT))
.;.S ABMUNCOM=ABMTENC-ABMMPD-ABMMZPD-ABMMENR-ABMCPD-ABMCZPD-ABMCENR-ABMOTHPD
.;.S ABMNUMER=ABMMPD+ABMMZPD+ABMMENR+ABMCPD+ABMCZPD+ABMCENR+ABMUNCOM
.;.S ABMTUNCR=$S(+$G(ABMDENOM)>0:(ABMNUMER/ABMDENOM),1:0)
.;.W !,"Uncompensated Care: ",$J(ABMTUNCR*100,0,1)_"%"
.;end old code uncomp care
.;
.W !!,"SCHIP insurers included:"
.I '$D(ABMI) W !?3,"<NONE>"
.S ABMINS=0
.F S ABMINS=$O(ABMI("INS",ABMINS)) Q:'ABMINS D
..W !?5,$$GET1^DIQ(9999999.18,ABMINS,".01","E")
;
I +$G(ABMY("TVDTS"))'=0 W !!,"Number of top volume dates to display if minimum thresholds are not met: ",$J(ABMY("TVDTS"),3),!
I ABMY("RFMT")="P",ABM("PG")'=1 W !
I ABMY("RTYP")="SEL" W !,"Eligible Professional: ",$$GET1^DIQ(200,ABMPRV,".01")_" ("_$$GET1^DIQ(7,$$DOCLASS^ABMDVST2(ABMPRV),.01,"E")_")"
I ABMY("RTYP")="GRP" D
.Q:ABM("PG")'=1 ;only print on first page
.W !!,"Eligible Professionals: "
.I '$D(ABMPRV("E")) W !?3,"<NONE>"
.S ABMPRV=0
.F S ABMPRV=$O(ABMPRV("E",ABMPRV)) Q:'ABMPRV D
..I $Y+5>IOSL,IOST["C" D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
..W !?3,$$GET1^DIQ(200,ABMPRV,".01")_" ("_$$GET1^DIQ(7,$$DOCLASS^ABMDVST2(ABMPRV),.01,"E")_")"
.W !!,"Other Professionals: "
.I '$D(ABMPRV("O")) W !?3,"<NONE>"
.S ABMPRV=0
.F S ABMPRV=$O(ABMPRV("O",ABMPRV)) Q:'ABMPRV D
..I $Y+5>IOSL,IOST["C" D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
..W !?3,$$GET1^DIQ(200,ABMPRV,".01")_" ("_$$GET1^DIQ(7,$$DOCLASS^ABMDVST2(ABMPRV),.01,"E")_")"
.I IOST["C" D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
;
W !
I ABMY("RFMT")="P" D
.W !
.Q:ABM("PG")'=1
.S ABMU("TXT")="This Patient List is provided for Eligible "_$S(ABMY("RTYP")="HOS":"Hospitals",1:"Professionals")_" to evaluate their "
.S ABMU("TXT")=ABMU("TXT")_"Medicaid"_$S($G(ABMFQHC)=1:"/Needy Individual",1:"")_" Patient Volume Encounters during the Report Period"
.S ABMU("TXT")=ABMU("TXT")_" for participation in the Medicaid EHR Incentive program."
.S ABMU("LM")=0,ABMU("RM")=80,ABMU("LNG")=80
.D ^ABMDWRAP
.W !
I $Y+5>IOSL,IOST["C" D HD^ABMM2PV3 Q:(IOST["C")&((+$G(Y)=0)!($D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)))
;
Q
ABMM2PV5 ;IHS/SD/SDR - MU Patient Volume EP Report ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**11,12,15**;NOV 12, 2009;Build 251
+2 ;IHS/SD/SDR - 2.6*12 - Updated FQHC/RHC/Tribal to include Urban
+3 ;IHS/SD/SDR - 2.6*12 - Made changes for uncompensated care; uncompensated should be a separate detail line
+4 ; and should be included in the patient volume total, not as a separate line. Also initialized ABMFQHC variable.
+5 ;IHS/SD/SDR - 2.6*15 - HEAT183289 - Tribal self-insured added to not-met report
+6 ;
NOTMET ;EP
+1 SET ABMCNT=0
+2 KILL ABMLN
+3 SET ABMSDT=$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV TOP",ABMPRV)),U,2)
+4 ;
+5 IF +$GET(ABMY("TVDTS"))'=0
Begin DoDot:1
+6 SET ABMCNT=0
+7 SET ABMDT=0
+8 FOR
SET ABMDT=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",ABMDT))
IF 'ABMDT
QUIT
Begin DoDot:2
+9 SET ABMP("PRV")=0
+10 FOR
SET ABMP("PRV")=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",ABMDT,ABMP("PRV")))
IF 'ABMP("PRV")
QUIT
Begin DoDot:3
+11 IF ABMP("PRV")'=ABMPRV
QUIT
+12 SET ABMCNT=ABMCNT+1
+13 ;S ABMPRC($G(^XTMP("ABM-PVP2",$J,"PRV PERCENT",ABMDT,ABMPRV)),ABMCNT)=ABMDT ;abm*2.6*12 HEAT136326
+14 ;abm*2.6*12 HEAT136326
SET ABMPRC(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",ABMDT,ABMPRV)),ABMCNT)=ABMDT
End DoDot:3
End DoDot:2
+15 SET ABMP=""
+16 SET ABMSAV=ABMCNT-ABMY("TVDTS")
+17 FOR
SET ABMP=$ORDER(ABMPRC(ABMP))
IF ABMP=""
QUIT
Begin DoDot:2
+18 SET ABMCNT=0
SET ABMC=0
+19 FOR
SET ABMCNT=$ORDER(ABMPRC(ABMP,ABMCNT))
IF 'ABMCNT
QUIT
Begin DoDot:3
+20 KILL ^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",$GET(ABMPRC(ABMP,ABMCNT))),ABMP("PRV")
+21 SET ABMC=ABMC+1
End DoDot:3
IF (ABMC=ABMSAV)
QUIT
End DoDot:2
End DoDot:1
+22 ;
+23 SET ABM("PG")=1
+24 SET ABMSDT=$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV TOP",ABMPRV)),U,2)
+25 IF +ABMSDT=0
SET ABMSDT=ABMY("SDT")
+26 DO HDR
+27 WRITE !,"The Patient Volume Threshold (30% for EPs, or 20% for Pediatricians) was not"
+28 WRITE !,"met for the "_$SELECT(("^A^B^C^"[("^"_ABMY("90")_"^")):"timeframe entered",1:"MU Qualification year")_"."
+29 WRITE !,"Details for the volumes that were achieved are provided for your information.",!
+30 WRITE !,"Highest Patient Volume Met: ",+$PIECE($GET(^XTMP("ABM-PVP2",$JOB,"PRV TOP",ABMPRV)),U)_"%"
+31 WRITE !,"First Day Highest Patient Volume Achieved: ",$$SDT^ABMDUTL(ABMSDT)
+32 ;
+33 IF $Y+5>IOSL
DO HD^ABMM2PV3
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+34 SET ABMTHPV=0
+35 IF ABMSDT
SET ABMTHPV=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMPRV))
+36 SET ABMMHPV=0
+37 IF ABMSDT
SET ABMMHPV=+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM",ABMSDT,ABMPRV))
+38 WRITE !!,"Total Patient Encounters of First Highest Patient Volume Period: ",ABMTHPV,!
+39 SET ABMU("TXT")="Total Medicaid"_$SELECT(+$GET(ABMFQHC)=1:"/Needy Individual",1:"")
+40 SET ABMU("TXT")=ABMU("TXT")_" Encounters of First Highest Patient Volume Period: "_ABMMHPV
+41 SET ABMU("LM")=0
SET ABMU("RM")=80
SET ABMU("LNG")=80
+42 DO ^ABMDWRAP
+43 DO NMHDR
+44 ;
+45 SET ABMSDT=0
SET ABMCNT=0
+46 SET ABMDTCNT=0
+47 FOR
SET ABMSDT=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT))
IF 'ABMSDT
QUIT
Begin DoDot:1
+48 ;I ABMY("90")'="A"&(ABMY("SDT")'=ABMSDT) Q ;only calculate whole year for automated ;abm*2.6*12 uncomp care
+49 ;only whole year for automated ;abm*2.6*12 uncomp care
IF "^A^D^"'[("^"_ABMY("90")_"^")&(ABMY("SDT")'=ABMSDT)
QUIT
+50 ;start new code abm*2.6*12 HEAT134048
+51 SET X1=ABMY("SDT")
+52 SET X2=275
+53 DO C^%DTC
+54 ;275 days after start won't contain 90 days anymore
IF "^A^D^"[("^"_ABMY("90")_"^")&(ABMSDT>X)
QUIT
+55 ;end new code HEAT134048
+56 SET ABMDTCNT=+$GET(ABMDTCNT)+1
+57 ;
+58 IF $Y+5>IOSL
DO HD^ABMM2PV3
DO NMHDR
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+59 SET ABMP("PRV")=0
+60 FOR
SET ABMP("PRV")=$ORDER(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMP("PRV")))
IF 'ABMP("PRV")
QUIT
Begin DoDot:2
+61 IF $Y+5>IOSL
DO HD^ABMM2PV3
DO NMHDR
IF (IOST["C")&((+$GET(Y)=0)!($DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)))
QUIT
+62 IF ABMP("PRV")'=ABMPRV
QUIT
+63 ;I +$G(ABMY("EDT"))=0 D
+64 ;.S X1=ABMSDT
+65 ;.S X2=89
+66 ;.D C^%DTC
+67 ;.S ABMEDT=X
+68 ;I +$G(ABMY("EDT"))'=0 S ABMEDT=ABMY("EDT")
+69 SET X1=ABMSDT
+70 SET X2=89
+71 DO C^%DTC
+72 SET ABMEDT=X
+73 ;report period
SET ABMPD=$TRANSLATE($PIECE($$MDT^ABMDUTL(ABMSDT),"-",1,2),"-"," ")_"-"_$TRANSLATE($PIECE($$MDT^ABMDUTL(ABMEDT),"-",1,2),"-"," ")
+74 ;rate
SET ABMRT=$JUSTIFY($GET(^XTMP("ABM-PVP2",$JOB,"PRV PERCENT",ABMSDT,ABMPRV)),5)_"%"
+75 ;denominator
SET ABMDEN=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-DENOM",ABMSDT,ABMPRV)),6)
+76 ;numerator
SET ABMNUM=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM",ABMSDT,ABMPRV)),6)
+77 SET ABMMCDPD=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,"MCD")),6)
+78 SET ABMSCHPD=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM PD",ABMSDT,ABMPRV,"CHIP")),5)
+79 SET ABMMCDZP=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"MCD")),6)
+80 SET ABMMCDEN=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,"MCD")),6)
+81 SET ABMSCHZP=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ZEROPD",ABMSDT,ABMPRV,"CHIP")),5)
+82 SET ABMSCHEN=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM ENR",ABMSDT,ABMPRV,"CHIP")),5)
+83 ;S ABMUNCOM=$J(+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),6) ;abm*2.6*12 ;abm*2.6*15 HEAT183289
+84 ;abm*2.6*15 HEAT183289 shortened to make room for tribal self-insured
SET ABMUNCOM=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM UNCOMP",ABMSDT,ABMPRV,"UNCOMP")),4)
+85 ;abm*2.6*15 HEAT183289 tribal self-insured not met
SET ABMTSI=$JUSTIFY(+$GET(^XTMP("ABM-PVP2",$JOB,"PRV-NUM TRIBSI",ABMSDT,ABMPRV,"TRIBSI")),2)
+86 ;W !,ABMPD,?15,ABMRT,?20,ABMDEN,?28,ABMNUM,?35,ABMMCDPD,?41,ABMMCDZP,?50,ABMMCDEN,?57,ABMSCHPD,?63,ABMSCHZP,?73,ABMSCHEN ;abm*2.6*12
+87 ;abm*2.6*12
WRITE !,ABMPD,?13,ABMRT,?20,ABMDEN,?27,ABMNUM,?34,ABMMCDPD,?41,ABMMCDZP,?48,ABMMCDEN,?55,ABMSCHPD,?62,ABMSCHZP,?67,ABMSCHEN
+88 ;I ABMFQHC=1 W ?74,ABMUNCOM ;abm*2.6*12 ;abm*2.6*15 HEAT183289
+89 ;abm*2.6*15 HEAT183289
IF ABMFQHC=1
WRITE ?74,ABMUNCOM,?78,ABMTSI
End DoDot:2
End DoDot:1
+90 IF ABMDTCNT=0
Begin DoDot:1
+91 WRITE !!,