- ABMMUPVP ;IHS/SD/SDR - MU Patient Volume EP Report ;
- ;;2.6;IHS 3P BILLING SYSTEM;**7,8,10,11,12**;NOV 12, 2009;Build 187
- ;
- I $P($G(^ABMMUPRM(1,0)),U,2)="" D Q
- .W !!,"Setup has not been done. Please do MUP option prior to running any reports",!
- .S DIR(0)="E",DIR("A")="Enter RETURN to Continue" D ^DIR K DIR
- ;
- ;
- EN ;
- K ABMF,ABMPRVDR,ABMY,ABM
- D FAC Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)!'$D(ABMF)
- ;
- W !!,"The SEL report determines if INDIVIDUAL Eligible Professionals have met the"
- W !,"minimum patient volume requirements on their own patient encounters during a"
- W !,"continuous 90-day period in order to be eligible for the Medicaid EHR Incentive"
- W !,"Program (Meaningful Use EHR Incentive Program)."
- ;
- W !!,"The GRP report may be used for EPs who wish to use encounters of all providers"
- W !,"at a facility to meet the minimum patient volume requirements during a"
- W !,"continuous 90-day period in order to be eligible for the Medicaid EHR Incentive"
- W !,"Program (Meaningful Use EHR Incentive Program). When used, all EPs at the"
- W !,"facility must use the Group Method. All provider encounters for the entire"
- W !,"facility are included in the calculation."
- W !!
- D RTYPE
- ;I ABMY("RTYP")="GRP" W !!,"GRP not available at this time...defaulting to SEL" S ABMY("RTYP")="SEL" ;abm*2.6*8
- Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ;abm*2.6*8
- I ABMY("RTYP")="SEL" D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)!'$D(ABMPRVDR)
- .D PRVDR Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)!'$D(ABMPRVDR)
- D PARTYR Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- ;start new code abm*2.6*11 MU4
- I (ABMY("PYR")>2012) D Q
- .W !!?5,"**NOTE** For CY 2013+, you should use report options within menu "
- .W !?15,"MUS2 PARTICIPATION CY 2013+ PATIENT VOLUME REPORTS"
- .W ! S DIR(0)="E",DIR("A")="Enter RETURN to Continue" D ^DIR K DIR
- ;end new code MU4
- D 90DAY Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- D RFORMAT Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- D SUMMARY
- D ^XBFMK
- S DIR(0)="S^P:Print Report;R:Return to Selection Criteria -Erases ALL previous selections"
- S DIR("A")="<P> to Print or <R> to Reselect"
- D ^DIR K DIR Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- ;I $P(Y,U)="R" K ABMY,ABMPRVDR,ABMF G EN ;abm*2.6*8
- I $P(Y,U)="R" K ABMY,ABMPRVDR,ABMF,ABMP,ABMPRV G EN ;abm*2.6*8
- W !!,"Note: This report will take a while to run based on the amount of data you have"
- S ABMQ("RX")="POUT^ABMDRUTL"
- S ABMQ("NS")="ABM"
- S ABMQ("RP")="COMPUTE^ABMMUPV1"
- D ^ABMDRDBQ
- Q
- ;
- RTYPE ;
- K ^XTMP("ABM-PVP",$J)
- D ^XBFMK
- ;S DIR(0)="S^SEL:Encounter method for each EP;GRP:Group method for facilities (not available at this time)" ;abm*2.6*8
- S DIR(0)="S^SEL:Encounter method for each EP;GRP:Group method for facilities" ;abm*2.6*8
- S DIR("A")="Select report type"
- D ^DIR K DIR
- Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- S ABMY("RTYP")=Y
- Q
- PRVDR ;EP
- W !
- F D Q:(+Y<0)
- .D ^XBFMK
- .S DIC="^VA(200,"
- .S DIC(0)="AEMQ"
- .D ^DIC
- .S ABMPRV=+Y
- .I +Y<0 Q ;nothing selected
- .I +$$GET1^DIQ(200,ABMPRV,53.5,"I")=0 D Q
- ..W !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" does not have a Provider Class so they can't be"
- ..W !,"considered for this report"
- ..W !,"Please enter a different Eligible Professional's name.",!!
- .;
- .I '$D(^ABMMUPRM(1,2,"B",$$GET1^DIQ(200,ABMPRV,53.5,"I"))) D Q
- ..W !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" ("_$$GET1^DIQ(200,ABMPRV,53.5,"E")_")"
- ..W !,"is not an Eligible Professional for the Medicaid MU EHR Program"
- ..W !,"Please enter a different Eligible Professional's name.",!!
- .;
- .I $$GET1^DIQ(200,ABMPRV,53.5,"E")="PHYSICIAN ASSISTANT" D Q:ABMPAFLG=0
- ..S ABMPAFLG=0
- ..I $D(^ABMMUPRM(1,1,"B")) D
- ...S ABMFQ=0
- ...F S ABMFQ=$O(^ABMMUPRM(1,1,ABMFQ)) Q:'ABMFQ D
- ....I $P($G(^ABMMUPRM(1,1,ABMFQ,0)),U,2)=1 S ABMPAFLG=1
- ..Q:ABMPAFLG=1
- ..W !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" ("_$$GET1^DIQ(200,ABMPRV,53.5,"E")_")"
- ..W !,"can't be included because the facility has to be led by a PA for a PA"
- ..W !,"to qualify"
- .S ABMPRVDR(ABMPRV)=""
- M ABMP=ABMPRVDR
- Q
- FAC ;
- D GETFACS^ABMMUMUP ;get list of facilities
- W !!
- K ABMFANS,ABMF
- F D Q:+$G(Y)<0!(Y=ABMTOT)!$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) ;they didn't answer or ALL was selected
- .D ^XBFMK
- .D FACLST
- .S DIR(0)="SO^"_$G(ABMDIR)
- .S:'$D(ABMF) DIR(0)="S^"_$G(ABMDIR)
- .I ABMFQHC=1 D
- ..;S DIR("A",1)="Note: you cannot select a combination of FQHC/RHC and non-FQHC/RHC data on" ;abm*2.6*10 HEAT61752
- ..S DIR("A",1)="Note: you cannot select a combination of FQHC/RHC/Tribal and non-FQHC/RHC/Tribal" ;abm*2.6*10 HEAT61752
- ..S DIR("A",2)="data on this report"
- ..S DIR("A",3)=""
- .S DIR("A")="Select one or more facilities to use for calculating patient volume"
- .D ^DIR K DIR
- .Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- .S ABMFANS=Y
- .;I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC>1),'$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only FQHCs are allowed based on your first selection" H 1 Q ;abm*2.6*10 HEAT61752
- .I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC>1),'$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only FQHC/RHC/Tribals are allowed based on your first selection" H 1 Q ;abm*2.6*10 HEAT61752
- .;I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC=1),$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only non-FQHCs are allowed based on your first selection" H 1 Q ;abm*1.6*10 HEAT61501
- .I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC=0),$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only non-FQHC/RHC/Tribal clinics are allowed based on your first selection" H 1 Q ;abm*1.6*10 HEAT61501, HEAT61752
- .I ABMFANS'=ABMTOT,$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) S ABMFQHC=2
- .I ABMFANS'=(ABMTOT) S ABMF($G(ABMFLIST(ABMFANS)))=""
- .I ABMFANS=(ABMTOT) D
- ..S ABMCNT=0
- ..F S ABMCNT=$O(ABMFLIST(ABMCNT)) Q:'ABMCNT S ABMF($G(ABMFLIST(ABMCNT)))=""
- Q:+$G(Y)<0!(Y=ABMTOT)!$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- K ABMFQHC
- Q
- FACLST ;
- S ABMCNT=0,ABMDIR="",ABMFQHC=0,ABMNFQHC=0
- F S ABMCNT=$O(ABMFLIST(ABMCNT)) Q:'ABMCNT D
- .S:ABMDIR'="" ABMDIR=ABMDIR_";"_ABMCNT_":"_$$GET1^DIQ(9999999.06,$G(ABMFLIST(ABMCNT)),.01,"E")
- .S:ABMDIR="" ABMDIR=ABMCNT_":"_$$GET1^DIQ(9999999.06,$G(ABMFLIST(ABMCNT)),.01,"E")
- .;S ABMDIR=ABMDIR_$S($D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))):" (FQHC/RHC)",1:"") ;abm*2.6*10 HEAT61752
- .S ABMDIR=ABMDIR_$S($D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))):" (FQHC/RHC/Tribal)",1:"") ;abm*2.6*10 HEAT61752
- .S ABMDIR=ABMDIR_$S($D(ABMF($G(ABMFLIST(ABMCNT)))):" *",1:"")
- .I $D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))) S ABMFQHC=1
- .I '$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))) S ABMNFQHC=1
- S ABMCNT=$O(ABMFLIST(99999),-1) ;get last entry#
- S (ABMCNT,ABMTOT)=ABMCNT+1
- ;I ABMFQHC=0!(ABMCNT<2) S ABMDIR=ABMDIR_";"_ABMCNT_":All facilities"
- I ((ABMFQHC=0&(ABMNFQHC=1))!((ABMFQHC=1)&(ABMNFQHC=0)))!(ABMCNT<2) S ABMDIR=ABMDIR_";"_ABMCNT_":All facilities"
- Q
- PARTYR ;
- I ABMY("RTYP")="SEL"!(ABMY("RTYP")="GRP") D
- .W !!!,"For EPs, the Participation year is a calendar year."
- .W !!,"Note: The qualification year is the year prior to the participation year."
- .W !,"Patient Volume is calculated on encounters that occurred in the qualification"
- .W !,"year, which is the year prior to the participation year. To view volume for"
- .W !,"the current year, select next year as the participation year.",!
- D ^XBFMK
- S DIR(0)="NA^1960:2030"
- S DIR("A")="Enter the Participation year for this report: "
- I ABMY("RTYP")="HOS" S DIR("A")="Enter the Participation Fiscal year for this report: " ;abm*2.6*8
- D ^DIR K DIR
- Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- S ABMY("PYR")=+Y
- S ABMY("QYR")=ABMY("PYR")-1
- Q
- 90DAY ;
- W !!,"Report will be run for a 90-day reporting period. The 90-day period may be "
- W !,"automatically calculated or user may select a specific start date.",!
- W !,"The automated calculation will return the first 90-day period in the "
- W ABMY("PYR")_" year"
- W !,"in which required patient volumes are met or the 90-day period with the"
- W !,"highest volume percentage (first occurrence in the year)."
- D ^XBFMK
- S DIR(0)="S^A:Automated 90-Day Report;B:Specific 90-Day Report Period;C:User specified Report Period"
- S DIR("A",1)=""
- S DIR("A")="Enter selection"
- D ^DIR K DIR
- Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- S ABMY("90")=$P(Y,U)
- I ABMY("90")="B"!(ABMY("90")="C") D
- .D ^XBFMK
- .S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
- .I ABMY("RTYP")="HOS" S DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
- .S DIR("A",1)=""
- .S DIR("A",2)="Select a specific start date in the calendar year"
- .I ABMY("90")="B" S DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
- .I ABMY("RTYP")="HOS" S DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
- .S DIR("A",3)="Note: End Date must not be after December 31."
- .I ABMY("RTYP")="HOS" S DIR("A",3)="Note: End Date must not be after September 30."
- .S DIR("A",4)=""
- .S DIR("A")="Enter first day of reporting period for "_ABMY("QYR")
- .D ^DIR K DIR
- .S (ABMY("SDT"),ABMP("SDT"))=Y
- .I ABMY("90")="C" D
- ..D ^XBFMK
- ..S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
- ..I ABMY("RTYP")="HOS" S DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
- ..S DIR("A",1)=""
- ..S DIR("A",2)="Select a specific end date in the calendar year"
- ..I ABMY("90")="B" S DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
- ..I ABMY("RTYP")="HOS" S DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
- ..S DIR("A",3)="Note: End Date must not be after December 31."
- ..S DIR("A",4)=""
- ..S DIR("A")="Enter last day of reporting period for "_ABMY("QYR")
- ..D ^DIR K DIR
- ..S (ABMY("EDT"),ABMP("EDT"))=Y
- Q
- RFORMAT ;
- D ^XBFMK
- S DIR(0)="S^S:Summary Report;A:Abbreviated Summary Report;P:Patient List"
- S DIR("A",1)=""
- S DIR("A")="Enter Report Format Choice"
- D ^DIR K DIR
- Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- S ABMY("RFMT")=$P(Y,U)
- I ABMY("RFMT")="A" D
- . D ^XBFMK
- .S DIR(0)="N"
- .S DIR("A",1)=""
- .S DIR("A",2)="Specify the number of top volume dates to display if minimum thresholds are not met"
- .S DIR("A")="Enter Number (1-275)"
- .D ^DIR K DIR
- .Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
- .S ABMY("TVDTS")=+Y
- Q
- SUMMARY ;
- D EN^ABMVDF("IOF")
- W !
- D CENTER^ABMUCUTL("SUMMARY OF PATIENT VOLUME REPORT TO BE GENERATED")
- W !!!,"Report Name: "
- I ABMY("RTYP")="SEL" W "Patient Volume Report for Eligible Professionals"
- I ABMY("RTYP")="GRP" W "Patient Volume Report for Group Practice" ;abm*2.6*8
- I ABMY("RTYP")="HOS" W "Patient Volume Report for Eligible Hospitals"
- W !,"The date ranges for this report are:"
- W !?3,"Participation Year: ",ABMY("PYR")
- W !?3,"Qualification Year: ",ABMY("QYR")
- W !,"Reporting Period: "
- I ABMY("90")="A" W "Automated 90-day"
- I ABMY("90")="B" W "90-day beginning ",$$SDT^ABMDUTL(ABMY("SDT"))
- I ABMY("90")="C" W $$SDT^ABMDUTL(ABMY("SDT"))_" thru "_$$SDT^ABMDUTL(ABMY("EDT"))
- W:$G(ABMY("TVDTS")) !!,"Number of top volume dates to display if minimum thresholds are not met: ",ABMY("TVDTS")
- W !!,"Report Method Type: "
- W:ABMY("RTYP")="SEL" "Individual"
- W:ABMY("RTYP")="GRP" "Group" ;abm*2.6*8
- W:ABMY("RTYP")="HOS" "Hospital/ER"
- I ABMY("RTYP")="SEL" D
- .W !!,"Eligible Professional(s):"
- .S ABMPRV=0
- .F S ABMPRV=$O(ABMPRVDR(ABMPRV)) Q:'ABMPRV D
- ..W !?3,$$GET1^DIQ(200,ABMPRV,".01")_" ("_$$GET1^DIQ(7,$$GET1^DIQ(200,ABMPRV,53.5,"I"),.01,"E")_")"
- W !
- W !,"Facility(s):"
- S ABMFC=0
- F S ABMFC=$O(ABMF(ABMFC)) Q:'ABMFC D
- .W !?3,$$GET1^DIQ(9999999.06,ABMFC,".01","E")
- .;I $D(^ABMMUPRM(1,1,"B",ABMFC)) W " (FQHC/RHC)" ;abm*2.6*10 HEAT61752
- .I $D(^ABMMUPRM(1,1,"B",ABMFC)) W " (FQHC/RHC/Tribal)" ;abm*2.6*10 HEAT61752
- Q
- ABMMUPVP ;IHS/SD/SDR - MU Patient Volume EP Report ;
- +1 ;;2.6;IHS 3P BILLING SYSTEM;**7,8,10,11,12**;NOV 12, 2009;Build 187
- +2 ;
- +3 IF $PIECE($GET(^ABMMUPRM(1,0)),U,2)=""
- Begin DoDot:1
- +4 WRITE !!,"Setup has not been done. Please do MUP option prior to running any reports",!
- +5 SET DIR(0)="E"
- SET DIR("A")="Enter RETURN to Continue"
- DO ^DIR
- KILL DIR
- End DoDot:1
- QUIT
- +6 ;
- +7 ;
- EN ;
- +1 KILL ABMF,ABMPRVDR,ABMY,ABM
- +2 DO FAC
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)!'$DATA(ABMF)
- QUIT
- +3 ;
- +4 WRITE !!,"The SEL report determines if INDIVIDUAL Eligible Professionals have met the"
- +5 WRITE !,"minimum patient volume requirements on their own patient encounters during a"
- +6 WRITE !,"continuous 90-day period in order to be eligible for the Medicaid EHR Incentive"
- +7 WRITE !,"Program (Meaningful Use EHR Incentive Program)."
- +8 ;
- +9 WRITE !!,"The GRP report may be used for EPs who wish to use encounters of all providers"
- +10 WRITE !,"at a facility to meet the minimum patient volume requirements during a"
- +11 WRITE !,"continuous 90-day period in order to be eligible for the Medicaid EHR Incentive"
- +12 WRITE !,"Program (Meaningful Use EHR Incentive Program). When used, all EPs at the"
- +13 WRITE !,"facility must use the Group Method. All provider encounters for the entire"
- +14 WRITE !,"facility are included in the calculation."
- +15 WRITE !!
- +16 DO RTYPE
- +17 ;I ABMY("RTYP")="GRP" W !!,"GRP not available at this time...defaulting to SEL" S ABMY("RTYP")="SEL" ;abm*2.6*8
- +18 ;abm*2.6*8
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
- QUIT
- +19 IF ABMY("RTYP")="SEL"
- Begin DoDot:1
- +20 DO PRVDR
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)!'$DATA(ABMPRVDR)
- QUIT
- End DoDot:1
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)!'$DATA(ABMPRVDR)
- QUIT
- +21 DO PARTYR
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +22 ;start new code abm*2.6*11 MU4
- +23 IF (ABMY("PYR")>2012)
- Begin DoDot:1
- +24 WRITE !!?5,"**NOTE** For CY 2013+, you should use report options within menu "
- +25 WRITE !?15,"MUS2 PARTICIPATION CY 2013+ PATIENT VOLUME REPORTS"
- +26 WRITE !
- SET DIR(0)="E"
- SET DIR("A")="Enter RETURN to Continue"
- DO ^DIR
- KILL DIR
- End DoDot:1
- QUIT
- +27 ;end new code MU4
- +28 DO 90DAY
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +29 DO RFORMAT
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +30 DO SUMMARY
- +31 DO ^XBFMK
- +32 SET DIR(0)="S^P:Print Report;R:Return to Selection Criteria -Erases ALL previous selections"
- +33 SET DIR("A")="<P> to Print or <R> to Reselect"
- +34 DO ^DIR
- KILL DIR
- IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +35 ;I $P(Y,U)="R" K ABMY,ABMPRVDR,ABMF G EN ;abm*2.6*8
- +36 ;abm*2.6*8
- IF $PIECE(Y,U)="R"
- KILL ABMY,ABMPRVDR,ABMF,ABMP,ABMPRV
- GOTO EN
- +37 WRITE !!,"Note: This report will take a while to run based on the amount of data you have"
- +38 SET ABMQ("RX")="POUT^ABMDRUTL"
- +39 SET ABMQ("NS")="ABM"
- +40 SET ABMQ("RP")="COMPUTE^ABMMUPV1"
- +41 DO ^ABMDRDBQ
- +42 QUIT
- +43 ;
- RTYPE ;
- +1 KILL ^XTMP("ABM-PVP",$JOB)
- +2 DO ^XBFMK
- +3 ;S DIR(0)="S^SEL:Encounter method for each EP;GRP:Group method for facilities (not available at this time)" ;abm*2.6*8
- +4 ;abm*2.6*8
- SET DIR(0)="S^SEL:Encounter method for each EP;GRP:Group method for facilities"
- +5 SET DIR("A")="Select report type"
- +6 DO ^DIR
- KILL DIR
- +7 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +8 SET ABMY("RTYP")=Y
- +9 QUIT
- PRVDR ;EP
- +1 WRITE !
- +2 FOR
- Begin DoDot:1
- +3 DO ^XBFMK
- +4 SET DIC="^VA(200,"
- +5 SET DIC(0)="AEMQ"
- +6 DO ^DIC
- +7 SET ABMPRV=+Y
- +8 ;nothing selected
- IF +Y<0
- QUIT
- +9 IF +$$GET1^DIQ(200,ABMPRV,53.5,"I")=0
- Begin DoDot:2
- +10 WRITE !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" does not have a Provider Class so they can't be"
- +11 WRITE !,"considered for this report"
- +12 WRITE !,"Please enter a different Eligible Professional's name.",!!
- End DoDot:2
- QUIT
- +13 ;
- +14 IF '$DATA(^ABMMUPRM(1,2,"B",$$GET1^DIQ(200,ABMPRV,53.5,"I")))
- Begin DoDot:2
- +15 WRITE !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" ("_$$GET1^DIQ(200,ABMPRV,53.5,"E")_")"
- +16 WRITE !,"is not an Eligible Professional for the Medicaid MU EHR Program"
- +17 WRITE !,"Please enter a different Eligible Professional's name.",!!
- End DoDot:2
- QUIT
- +18 ;
- +19 IF $$GET1^DIQ(200,ABMPRV,53.5,"E")="PHYSICIAN ASSISTANT"
- Begin DoDot:2
- +20 SET ABMPAFLG=0
- +21 IF $DATA(^ABMMUPRM(1,1,"B"))
- Begin DoDot:3
- +22 SET ABMFQ=0
- +23 FOR
- SET ABMFQ=$ORDER(^ABMMUPRM(1,1,ABMFQ))
- IF 'ABMFQ
- QUIT
- Begin DoDot:4
- +24 IF $PIECE($GET(^ABMMUPRM(1,1,ABMFQ,0)),U,2)=1
- SET ABMPAFLG=1
- End DoDot:4
- End DoDot:3
- +25 IF ABMPAFLG=1
- QUIT
- +26 WRITE !!,"Provider "_$$GET1^DIQ(200,ABMPRV,".01","E")_" ("_$$GET1^DIQ(200,ABMPRV,53.5,"E")_")"
- +27 WRITE !,"can't be included because the facility has to be led by a PA for a PA"
- +28 WRITE !,"to qualify"
- End DoDot:2
- IF ABMPAFLG=0
- QUIT
- +29 SET ABMPRVDR(ABMPRV)=""
- End DoDot:1
- IF (+Y<0)
- QUIT
- +30 MERGE ABMP=ABMPRVDR
- +31 QUIT
- FAC ;
- +1 ;get list of facilities
- DO GETFACS^ABMMUMUP
- +2 WRITE !!
- +3 KILL ABMFANS,ABMF
- +4 ;they didn't answer or ALL was selected
- FOR
- Begin DoDot:1
- +5 DO ^XBFMK
- +6 DO FACLST
- +7 SET DIR(0)="SO^"_$GET(ABMDIR)
- +8 IF '$DATA(ABMF)
- SET DIR(0)="S^"_$GET(ABMDIR)
- +9 IF ABMFQHC=1
- Begin DoDot:2
- +10 ;S DIR("A",1)="Note: you cannot select a combination of FQHC/RHC and non-FQHC/RHC data on" ;abm*2.6*10 HEAT61752
- +11 ;abm*2.6*10 HEAT61752
- SET DIR("A",1)="Note: you cannot select a combination of FQHC/RHC/Tribal and non-FQHC/RHC/Tribal"
- +12 SET DIR("A",2)="data on this report"
- +13 SET DIR("A",3)=""
- End DoDot:2
- +14 SET DIR("A")="Select one or more facilities to use for calculating patient volume"
- +15 DO ^DIR
- KILL DIR
- +16 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +17 SET ABMFANS=Y
- +18 ;I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC>1),'$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only FQHCs are allowed based on your first selection" H 1 Q ;abm*2.6*10 HEAT61752
- +19 ;abm*2.6*10 HEAT61752
- IF ABMFANS'=ABMTOT
- IF $DATA(ABMF)
- IF (ABMFQHC>1)
- IF '$DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS)))
- WRITE !!,"only FQHC/RHC/Tribals are allowed based on your first selection"
- HANG 1
- QUIT
- +20 ;I ABMFANS'=ABMTOT,$D(ABMF),(ABMFQHC=1),$D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS))) W !!,"only non-FQHCs are allowed based on your first selection" H 1 Q ;abm*1.6*10 HEAT61501
- +21 ;abm*1.6*10 HEAT61501, HEAT61752
- IF ABMFANS'=ABMTOT
- IF $DATA(ABMF)
- IF (ABMFQHC=0)
- IF $DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS)))
- WRITE !!,"only non-FQHC/RHC/Tribal clinics are allowed based on your first selection"
- HANG 1
- QUIT
- +22 IF ABMFANS'=ABMTOT
- IF $DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMFANS)))
- SET ABMFQHC=2
- +23 IF ABMFANS'=(ABMTOT)
- SET ABMF($GET(ABMFLIST(ABMFANS)))=""
- +24 IF ABMFANS=(ABMTOT)
- Begin DoDot:2
- +25 SET ABMCNT=0
- +26 FOR
- SET ABMCNT=$ORDER(ABMFLIST(ABMCNT))
- IF 'ABMCNT
- QUIT
- SET ABMF($GET(ABMFLIST(ABMCNT)))=""
- End DoDot:2
- End DoDot:1
- IF +$GET(Y)<0!(Y=ABMTOT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +27 IF +$GET(Y)<0!(Y=ABMTOT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +28 KILL ABMFQHC
- +29 QUIT
- FACLST ;
- +1 SET ABMCNT=0
- SET ABMDIR=""
- SET ABMFQHC=0
- SET ABMNFQHC=0
- +2 FOR
- SET ABMCNT=$ORDER(ABMFLIST(ABMCNT))
- IF 'ABMCNT
- QUIT
- Begin DoDot:1
- +3 IF ABMDIR'=""
- SET ABMDIR=ABMDIR_";"_ABMCNT_":"_$$GET1^DIQ(9999999.06,$GET(ABMFLIST(ABMCNT)),.01,"E")
- +4 IF ABMDIR=""
- SET ABMDIR=ABMCNT_":"_$$GET1^DIQ(9999999.06,$GET(ABMFLIST(ABMCNT)),.01,"E")
- +5 ;S ABMDIR=ABMDIR_$S($D(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))):" (FQHC/RHC)",1:"") ;abm*2.6*10 HEAT61752
- +6 ;abm*2.6*10 HEAT61752
- SET ABMDIR=ABMDIR_$SELECT($DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT))):" (FQHC/RHC/Tribal)",1:"")
- +7 SET ABMDIR=ABMDIR_$SELECT($DATA(ABMF($GET(ABMFLIST(ABMCNT)))):" *",1:"")
- +8 IF $DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT)))
- SET ABMFQHC=1
- +9 IF '$DATA(^ABMMUPRM(1,1,"B",ABMFLIST(ABMCNT)))
- SET ABMNFQHC=1
- End DoDot:1
- +10 ;get last entry#
- SET ABMCNT=$ORDER(ABMFLIST(99999),-1)
- +11 SET (ABMCNT,ABMTOT)=ABMCNT+1
- +12 ;I ABMFQHC=0!(ABMCNT<2) S ABMDIR=ABMDIR_";"_ABMCNT_":All facilities"
- +13 IF ((ABMFQHC=0&(ABMNFQHC=1))!((ABMFQHC=1)&(ABMNFQHC=0)))!(ABMCNT<2)
- SET ABMDIR=ABMDIR_";"_ABMCNT_":All facilities"
- +14 QUIT
- PARTYR ;
- +1 IF ABMY("RTYP")="SEL"!(ABMY("RTYP")="GRP")
- Begin DoDot:1
- +2 WRITE !!!,"For EPs, the Participation year is a calendar year."
- +3 WRITE !!,"Note: The qualification year is the year prior to the participation year."
- +4 WRITE !,"Patient Volume is calculated on encounters that occurred in the qualification"
- +5 WRITE !,"year, which is the year prior to the participation year. To view volume for"
- +6 WRITE !,"the current year, select next year as the participation year.",!
- End DoDot:1
- +7 DO ^XBFMK
- +8 SET DIR(0)="NA^1960:2030"
- +9 SET DIR("A")="Enter the Participation year for this report: "
- +10 ;abm*2.6*8
- IF ABMY("RTYP")="HOS"
- SET DIR("A")="Enter the Participation Fiscal year for this report: "
- +11 DO ^DIR
- KILL DIR
- +12 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +13 SET ABMY("PYR")=+Y
- +14 SET ABMY("QYR")=ABMY("PYR")-1
- +15 QUIT
- 90DAY ;
- +1 WRITE !!,"Report will be run for a 90-day reporting period. The 90-day period may be "
- +2 WRITE !,"automatically calculated or user may select a specific start date.",!
- +3 WRITE !,"The automated calculation will return the first 90-day period in the "
- +4 WRITE ABMY("PYR")_" year"
- +5 WRITE !,"in which required patient volumes are met or the 90-day period with the"
- +6 WRITE !,"highest volume percentage (first occurrence in the year)."
- +7 DO ^XBFMK
- +8 SET DIR(0)="S^A:Automated 90-Day Report;B:Specific 90-Day Report Period;C:User specified Report Period"
- +9 SET DIR("A",1)=""
- +10 SET DIR("A")="Enter selection"
- +11 DO ^DIR
- KILL DIR
- +12 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +13 SET ABMY("90")=$PIECE(Y,U)
- +14 IF ABMY("90")="B"!(ABMY("90")="C")
- Begin DoDot:1
- +15 DO ^XBFMK
- +16 SET DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
- +17 IF ABMY("RTYP")="HOS"
- SET DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
- +18 SET DIR("A",1)=""
- +19 SET DIR("A",2)="Select a specific start date in the calendar year"
- +20 IF ABMY("90")="B"
- SET DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
- +21 IF ABMY("RTYP")="HOS"
- SET DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
- +22 SET DIR("A",3)="Note: End Date must not be after December 31."
- +23 IF ABMY("RTYP")="HOS"
- SET DIR("A",3)="Note: End Date must not be after September 30."
- +24 SET DIR("A",4)=""
- +25 SET DIR("A")="Enter first day of reporting period for "_ABMY("QYR")
- +26 DO ^DIR
- KILL DIR
- +27 SET (ABMY("SDT"),ABMP("SDT"))=Y
- +28 IF ABMY("90")="C"
- Begin DoDot:2
- +29 DO ^XBFMK
- +30 SET DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
- +31 IF ABMY("RTYP")="HOS"
- SET DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
- +32 SET DIR("A",1)=""
- +33 SET DIR("A",2)="Select a specific end date in the calendar year"
- +34 IF ABMY("90")="B"
- SET DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
- +35 IF ABMY("RTYP")="HOS"
- SET DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
- +36 SET DIR("A",3)="Note: End Date must not be after December 31."
- +37 SET DIR("A",4)=""
- +38 SET DIR("A")="Enter last day of reporting period for "_ABMY("QYR")
- +39 DO ^DIR
- KILL DIR
- +40 SET (ABMY("EDT"),ABMP("EDT"))=Y
- End DoDot:2
- End DoDot:1
- +41 QUIT
- RFORMAT ;
- +1 DO ^XBFMK
- +2 SET DIR(0)="S^S:Summary Report;A:Abbreviated Summary Report;P:Patient List"
- +3 SET DIR("A",1)=""
- +4 SET DIR("A")="Enter Report Format Choice"
- +5 DO ^DIR
- KILL DIR
- +6 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +7 SET ABMY("RFMT")=$PIECE(Y,U)
- +8 IF ABMY("RFMT")="A"
- Begin DoDot:1
- +9 DO ^XBFMK
- +10 SET DIR(0)="N"
- +11 SET DIR("A",1)=""
- +12 SET DIR("A",2)="Specify the number of top volume dates to display if minimum thresholds are not met"
- +13 SET DIR("A")="Enter Number (1-275)"
- +14 DO ^DIR
- KILL DIR
- +15 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
- QUIT
- +16 SET ABMY("TVDTS")=+Y
- End DoDot:1
- +17 QUIT
- SUMMARY ;
- +1 DO EN^ABMVDF("IOF")
- +2 WRITE !
- +3 DO CENTER^ABMUCUTL("SUMMARY OF PATIENT VOLUME REPORT TO BE GENERATED")
- +4 WRITE !!!,"Report Name: "
- +5 IF ABMY("RTYP")="SEL"
- WRITE "Patient Volume Report for Eligible Professionals"
- +6 ;abm*2.6*8
- IF ABMY("RTYP")="GRP"
- WRITE "Patient Volume Report for Group Practice"
- +7 IF ABMY("RTYP")="HOS"
- WRITE "Patient Volume Report for Eligible Hospitals"
- +8 WRITE !,"The date ranges for this report are:"
- +9 WRITE !?3,"Participation Year: ",ABMY("PYR")
- +10 WRITE !?3,"Qualification Year: ",ABMY("QYR")
- +11 WRITE !,"Reporting Period: "
- +12 IF ABMY("90")="A"
- WRITE "Automated 90-day"
- +13 IF ABMY("90")="B"
- WRITE "90-day beginning ",$$SDT^ABMDUTL(ABMY("SDT"))
- +14 IF ABMY("90")="C"
- WRITE $$SDT^ABMDUTL(ABMY("SDT"))_" thru "_$$SDT^ABMDUTL(ABMY("EDT"))
- +15 IF $GET(ABMY("TVDTS"))
- WRITE !!,"Number of top volume dates to display if minimum thresholds are not met: ",ABMY("TVDTS")
- +16 WRITE !!,"Report Method Type: "
- +17 IF ABMY("RTYP")="SEL"
- WRITE "Individual"
- +18 ;abm*2.6*8
- IF ABMY("RTYP")="GRP"
- WRITE "Group"
- +19 IF ABMY("RTYP")="HOS"
- WRITE "Hospital/ER"
- +20 IF ABMY("RTYP")="SEL"
- Begin DoDot:1
- +21 WRITE !!,"Eligible Professional(s):"
- +22 SET ABMPRV=0
- +23 FOR
- SET ABMPRV=$ORDER(ABMPRVDR(ABMPRV))
- IF 'ABMPRV
- QUIT
- Begin DoDot:2
- +24 WRITE !?3,$$GET1^DIQ(200,ABMPRV,".01")_" ("_$$GET1^DIQ(7,$$GET1^DIQ(200,ABMPRV,53.5,"I"),.01,"E")_")"
- End DoDot:2
- End DoDot:1
- +25 WRITE !
- +26 WRITE !,"Facility(s):"
- +27 SET ABMFC=0
- +28 FOR
- SET ABMFC=$ORDER(ABMF(ABMFC))
- IF 'ABMFC
- QUIT
- Begin DoDot:1
- +29 WRITE !?3,$$GET1^DIQ(9999999.06,ABMFC,".01","E")
- +30 ;I $D(^ABMMUPRM(1,1,"B",ABMFC)) W " (FQHC/RHC)" ;abm*2.6*10 HEAT61752
- +31 ;abm*2.6*10 HEAT61752
- IF $DATA(^ABMMUPRM(1,1,"B",ABMFC))
- WRITE " (FQHC/RHC/Tribal)"
- End DoDot:1
- +32 QUIT