ABMM2PP1 ;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*15 - Updated 'C' prompt so a complete date (mm/dd/ccyy) must be entered. Was allowing user
; to enter CCYY only.
;IHS/SD/SDR - 2.6*15 - HEAT194499 - If option D is used need to kill the End date variables that were set so it will
; calculate end date for each 90-day window. Was printing same date for all start dates.
;
90DAY ;
W !!,"Patient Volume is calculated based on a 90-day period. There are two different"
W !,"time frame options that can be utilized to determine patient volume."
W !!?3,"1. Qualification year - This is the year prior to the participation year."
W !?6,"Any 90-day period can be selected within the qualification year to"
W !?6,"determine patient volume."
W !?3,"2. Look-back period - This can be a 90-day period in the previous 12 months"
W !?6,"from attestation."
W !!,"Note: All reports will be run for a 90-day reporting period. The 90-day"
W !,"period may be automatically calculated or user may select a specific start date."
W !,"The automated calculation will return the first 90-day period in which required"
W !,"patient volumes are met or the 90-day period with the highest volume percentage"
W !,"(first occurrence in the year)."
W !!,"Select A or B to run Patient Volume based on the Qualification year time frame"
W !,"Select C to Validate a 90-day or less time frame"
W !,"Select D or E to run Patient Volume based on the Attestation date time frame"
;
D ^XBFMK
S DIR(0)="S^A:Automated 90-Day Period (using Qualification Year);B:User Specified Start Date 90-Day Period (using Qualification Year);C:Validation Report - user specified date range (validation)"
S DIR(0)=DIR(0)_";D:Automated 90-Day Period -12 month look back from Attestation Date;E:User Specific 90-Day Period -12 month look back from Attestation Date"
S DIR("L",1)="Select one of the following:"
S DIR("L",2)=""
S DIR("L",3)=" A Automated 90-Day Period (using Qualification Year)"
S DIR("L",4)=" B User Specified Start Date 90-Day Period (using Qualification Year)"
S DIR("L",5)=""
S DIR("L",6)=" C Validation Report - user specified date range (validation)"
S DIR("L",7)=""
S DIR("L",8)=" D Automated 90-Day Period -12 month look back from Attestation Date"
S DIR("L")=" E User Specific 90-Day Period -12 month look back from Attestation Date"
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")="D" D Q:+$G(ABMY("SDT"))=0
.D ^XBFMK
.S DIR(0)="D^::EX"
.S DIR("A")="Enter Attestation Date"
.D ^DIR K DIR
.Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
.S (ABMY("QYR"),ABMY("AYR"))=$E($$SDT^ABMDUTL(+Y),7,10)
.S ABMY("ADT")=+Y
.S (ABMY("EDT"),ABMEDT)=Y
.S X1=$P(ABMEDT,".")
.S X2=-365
.D C^%DTC
.S (ABMY("SDT"),ABMP("SDT"))=X
.K ABMY("EDT"),ABMEDT ;abm*2.6*15 HEAT194499
I ABMY("90")="A"!(ABMY("90")="D") D
.D ^XBFMK
.S DIR(0)="S^F:First 90-day period found;H:Highest 90-day period found"
.S DIR("A",1)=""
.S DIR("A")="Enter selection"
.S DIR("B")="F"
.D ^DIR K DIR
.Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
.S ABMY("A90")=$P(Y,U)
I ABMY("90")="B" D
.D ^XBFMK
.S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
.I ABMY("RTYP")'="HOS",ABMY("90")="B" D
..S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1003:%DT"
.I ABMY("RTYP")="HOS",ABMY("90")="B" D
..S DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0703:%DT"
.I ABMY("RTYP")="HOS",ABMY("90")'="B" 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"_$S(ABMY("90")="B"!(ABMY("90")="C"):" for "_ABMY("QYR"),1:"") ;abm*2.6*12
.D ^DIR K DIR
.S (ABMY("SDT"),ABMP("SDT"))=Y
I ABMY("90")="C" D
.D ^XBFMK
.;S DIR(0)="D^::%DT" ;abm*2.6*15
.S DIR(0)="D^::EX" ;forces date to be mm/dd/ccyy ;abm*2.6*15
.S DIR("A",1)=""
.S DIR("A",2)="Select a specific start date in the calendar year"
.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",4)=""
.S DIR("A")="Enter first day of reporting period"
.D ^DIR K DIR
.Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
.S (ABMY("SDT"),ABMP("SDT"))=Y
.D ^XBFMK
.S DIR("A",1)=""
.S X1=ABMY("SDT")
.S X2=89
.D C^%DTC
.S ABMDT=X
.;I ABMY("RTYP")'="HOS" I ABMDT>((ABMY("QYR")-1700)_"1231") S ABMDT=((ABMY("QYR")-1700)_"1231")
.;I ABMY("RTYP")="HOS" I ABMDT>((ABMY("QYR")-1700)_"0930") S ABMDT=((ABMY("QYR")-1700)_"0930")
.S DIR(0)="D^"_ABMY("SDT")_":"_ABMDT_":EX"
.S DIR("A")="Select a specific END date"
.D ^DIR K DIR
.S (ABMY("EDT"),ABMP("EDT"))=Y
I ABMY("90")="E" D
.D ^XBFMK
.S DIR(0)="D^"
.S DIR("A",1)=""
.S DIR("A",2)="Select a specific END date"
.S DIR("A",4)=""
.S DIR("A")="Enter last day of 90-day period"
.D ^DIR K DIR
.S (ABMY("EDT"),ABMEDT)=Y
.S X1=$P(ABMEDT,".")
.S X2=-89
.D C^%DTC
.S (ABMY("SDT"),ABMP("SDT"))=X
Q
ABMM2PP1 ;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*15 - Updated 'C' prompt so a complete date (mm/dd/ccyy) must be entered. Was allowing user
+3 ; to enter CCYY only.
+4 ;IHS/SD/SDR - 2.6*15 - HEAT194499 - If option D is used need to kill the End date variables that were set so it will
+5 ; calculate end date for each 90-day window. Was printing same date for all start dates.
+6 ;
90DAY ;
+1 WRITE !!,"Patient Volume is calculated based on a 90-day period. There are two different"
+2 WRITE !,"time frame options that can be utilized to determine patient volume."
+3 WRITE !!?3,"1. Qualification year - This is the year prior to the participation year."
+4 WRITE !?6,"Any 90-day period can be selected within the qualification year to"
+5 WRITE !?6,"determine patient volume."
+6 WRITE !?3,"2. Look-back period - This can be a 90-day period in the previous 12 months"
+7 WRITE !?6,"from attestation."
+8 WRITE !!,"Note: All reports will be run for a 90-day reporting period. The 90-day"
+9 WRITE !,"period may be automatically calculated or user may select a specific start date."
+10 WRITE !,"The automated calculation will return the first 90-day period in which required"
+11 WRITE !,"patient volumes are met or the 90-day period with the highest volume percentage"
+12 WRITE !,"(first occurrence in the year)."
+13 WRITE !!,"Select A or B to run Patient Volume based on the Qualification year time frame"
+14 WRITE !,"Select C to Validate a 90-day or less time frame"
+15 WRITE !,"Select D or E to run Patient Volume based on the Attestation date time frame"
+16 ;
+17 DO ^XBFMK
+18 SET DIR(0)="S^A:Automated 90-Day Period (using Qualification Year);B:User Specified Start Date 90-Day Period (using Qualification Year);C:Validation Report - user specified date range (validation)"
+19 SET DIR(0)=DIR(0)_";D:Automated 90-Day Period -12 month look back from Attestation Date;E:User Specific 90-Day Period -12 month look back from Attestation Date"
+20 SET DIR("L",1)="Select one of the following:"
+21 SET DIR("L",2)=""
+22 SET DIR("L",3)=" A Automated 90-Day Period (using Qualification Year)"
+23 SET DIR("L",4)=" B User Specified Start Date 90-Day Period (using Qualification Year)"
+24 SET DIR("L",5)=""
+25 SET DIR("L",6)=" C Validation Report - user specified date range (validation)"
+26 SET DIR("L",7)=""
+27 SET DIR("L",8)=" D Automated 90-Day Period -12 month look back from Attestation Date"
+28 SET DIR("L")=" E User Specific 90-Day Period -12 month look back from Attestation Date"
+29 SET DIR("A")="Enter selection"
+30 DO ^DIR
KILL DIR
+31 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
QUIT
+32 SET ABMY("90")=$PIECE(Y,U)
+33 IF ABMY("90")="D"
Begin DoDot:1
+34 DO ^XBFMK
+35 SET DIR(0)="D^::EX"
+36 SET DIR("A")="Enter Attestation Date"
+37 DO ^DIR
KILL DIR
+38 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
QUIT
+39 SET (ABMY("QYR"),ABMY("AYR"))=$EXTRACT($$SDT^ABMDUTL(+Y),7,10)
+40 SET ABMY("ADT")=+Y
+41 SET (ABMY("EDT"),ABMEDT)=Y
+42 SET X1=$PIECE(ABMEDT,".")
+43 SET X2=-365
+44 DO C^%DTC
+45 SET (ABMY("SDT"),ABMP("SDT"))=X
+46 ;abm*2.6*15 HEAT194499
KILL ABMY("EDT"),ABMEDT
End DoDot:1
IF +$GET(ABMY("SDT"))=0
QUIT
+47 IF ABMY("90")="A"!(ABMY("90")="D")
Begin DoDot:1
+48 DO ^XBFMK
+49 SET DIR(0)="S^F:First 90-day period found;H:Highest 90-day period found"
+50 SET DIR("A",1)=""
+51 SET DIR("A")="Enter selection"
+52 SET DIR("B")="F"
+53 DO ^DIR
KILL DIR
+54 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
QUIT
+55 SET ABMY("A90")=$PIECE(Y,U)
End DoDot:1
+56 IF ABMY("90")="B"
Begin DoDot:1
+57 DO ^XBFMK
+58 SET DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
+59 IF ABMY("RTYP")'="HOS"
IF ABMY("90")="B"
Begin DoDot:2
+60 SET DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1003:%DT"
End DoDot:2
+61 IF ABMY("RTYP")="HOS"
IF ABMY("90")="B"
Begin DoDot:2
+62 SET DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0703:%DT"
End DoDot:2
+63 IF ABMY("RTYP")="HOS"
IF ABMY("90")'="B"
SET DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
+64 SET DIR("A",1)=""
+65 SET DIR("A",2)="Select a specific start date in the calendar year"
+66 IF ABMY("90")="B"
SET DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
+67 IF ABMY("RTYP")="HOS"
SET DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
+68 SET DIR("A",3)="Note: End Date must not be after December 31."
+69 IF ABMY("RTYP")="HOS"
SET DIR("A",3)="Note: End Date must not be after September 30."
+70 SET DIR("A",4)=""
+71 ;abm*2.6*12
SET DIR("A")="Enter first day of reporting period"_$SELECT(ABMY("90")="B"!(ABMY("90")="C"):" for "_ABMY("QYR"),1:"")
+72 DO ^DIR
KILL DIR
+73 SET (ABMY("SDT"),ABMP("SDT"))=Y
End DoDot:1
+74 IF ABMY("90")="C"
Begin DoDot:1
+75 DO ^XBFMK
+76 ;S DIR(0)="D^::%DT" ;abm*2.6*15
+77 ;forces date to be mm/dd/ccyy ;abm*2.6*15
SET DIR(0)="D^::EX"
+78 SET DIR("A",1)=""
+79 SET DIR("A",2)="Select a specific start date in the calendar year"
+80 IF ABMY("RTYP")="HOS"
SET DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
+81 SET DIR("A",4)=""
+82 SET DIR("A")="Enter first day of reporting period"
+83 DO ^DIR
KILL DIR
+84 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
QUIT
+85 SET (ABMY("SDT"),ABMP("SDT"))=Y
+86 DO ^XBFMK
+87 SET DIR("A",1)=""
+88 SET X1=ABMY("SDT")
+89 SET X2=89
+90 DO C^%DTC
+91 SET ABMDT=X
+92 ;I ABMY("RTYP")'="HOS" I ABMDT>((ABMY("QYR")-1700)_"1231") S ABMDT=((ABMY("QYR")-1700)_"1231")
+93 ;I ABMY("RTYP")="HOS" I ABMDT>((ABMY("QYR")-1700)_"0930") S ABMDT=((ABMY("QYR")-1700)_"0930")
+94 SET DIR(0)="D^"_ABMY("SDT")_":"_ABMDT_":EX"
+95 SET DIR("A")="Select a specific END date"
+96 DO ^DIR
KILL DIR
+97 SET (ABMY("EDT"),ABMP("EDT"))=Y
End DoDot:1
+98 IF ABMY("90")="E"
Begin DoDot:1
+99 DO ^XBFMK
+100 SET DIR(0)="D^"
+101 SET DIR("A",1)=""
+102 SET DIR("A",2)="Select a specific END date"
+103 SET DIR("A",4)=""
+104 SET DIR("A")="Enter last day of 90-day period"
+105 DO ^DIR
KILL DIR
+106 SET (ABMY("EDT"),ABMEDT)=Y
+107 SET X1=$PIECE(ABMEDT,".")
+108 SET X2=-89
+109 DO C^%DTC
+110 SET (ABMY("SDT"),ABMP("SDT"))=X
End DoDot:1
+111 QUIT