Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABMM2PP1

ABMM2PP1.m

Go to the documentation of this file.
  1. ABMM2PP1 ;IHS/SD/SDR - MU Patient Volume EP Report ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;**11,12,15**;NOV 12, 2009;Build 251
  1. ;IHS/SD/SDR - 2.6*15 - Updated 'C' prompt so a complete date (mm/dd/ccyy) must be entered. Was allowing user
  1. ; to enter CCYY only.
  1. ;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
  1. ; calculate end date for each 90-day window. Was printing same date for all start dates.
  1. ;
  1. 90DAY ;
  1. W !!,"Patient Volume is calculated based on a 90-day period. There are two different"
  1. W !,"time frame options that can be utilized to determine patient volume."
  1. W !!?3,"1. Qualification year - This is the year prior to the participation year."
  1. W !?6,"Any 90-day period can be selected within the qualification year to"
  1. W !?6,"determine patient volume."
  1. W !?3,"2. Look-back period - This can be a 90-day period in the previous 12 months"
  1. W !?6,"from attestation."
  1. W !!,"Note: All reports will be run for a 90-day reporting period. The 90-day"
  1. W !,"period may be automatically calculated or user may select a specific start date."
  1. W !,"The automated calculation will return the first 90-day period in which required"
  1. W !,"patient volumes are met or the 90-day period with the highest volume percentage"
  1. W !,"(first occurrence in the year)."
  1. W !!,"Select A or B to run Patient Volume based on the Qualification year time frame"
  1. W !,"Select C to Validate a 90-day or less time frame"
  1. W !,"Select D or E to run Patient Volume based on the Attestation date time frame"
  1. ;
  1. D ^XBFMK
  1. 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)"
  1. 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"
  1. S DIR("L",1)="Select one of the following:"
  1. S DIR("L",2)=""
  1. S DIR("L",3)=" A Automated 90-Day Period (using Qualification Year)"
  1. S DIR("L",4)=" B User Specified Start Date 90-Day Period (using Qualification Year)"
  1. S DIR("L",5)=""
  1. S DIR("L",6)=" C Validation Report - user specified date range (validation)"
  1. S DIR("L",7)=""
  1. S DIR("L",8)=" D Automated 90-Day Period -12 month look back from Attestation Date"
  1. S DIR("L")=" E User Specific 90-Day Period -12 month look back from Attestation Date"
  1. S DIR("A")="Enter selection"
  1. D ^DIR K DIR
  1. Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
  1. S ABMY("90")=$P(Y,U)
  1. I ABMY("90")="D" D Q:+$G(ABMY("SDT"))=0
  1. .D ^XBFMK
  1. .S DIR(0)="D^::EX"
  1. .S DIR("A")="Enter Attestation Date"
  1. .D ^DIR K DIR
  1. .Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
  1. .S (ABMY("QYR"),ABMY("AYR"))=$E($$SDT^ABMDUTL(+Y),7,10)
  1. .S ABMY("ADT")=+Y
  1. .S (ABMY("EDT"),ABMEDT)=Y
  1. .S X1=$P(ABMEDT,".")
  1. .S X2=-365
  1. .D C^%DTC
  1. .S (ABMY("SDT"),ABMP("SDT"))=X
  1. .K ABMY("EDT"),ABMEDT ;abm*2.6*15 HEAT194499
  1. I ABMY("90")="A"!(ABMY("90")="D") D
  1. .D ^XBFMK
  1. .S DIR(0)="S^F:First 90-day period found;H:Highest 90-day period found"
  1. .S DIR("A",1)=""
  1. .S DIR("A")="Enter selection"
  1. .S DIR("B")="F"
  1. .D ^DIR K DIR
  1. .Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
  1. .S ABMY("A90")=$P(Y,U)
  1. I ABMY("90")="B" D
  1. .D ^XBFMK
  1. .S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1231:%DT"
  1. .I ABMY("RTYP")'="HOS",ABMY("90")="B" D
  1. ..S DIR(0)="D^"_(ABMY("QYR")-1700)_"0101:"_(ABMY("QYR")-1700)_"1003:%DT"
  1. .I ABMY("RTYP")="HOS",ABMY("90")="B" D
  1. ..S DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0703:%DT"
  1. .I ABMY("RTYP")="HOS",ABMY("90")'="B" S DIR(0)="D^"_(ABMY("QYR")-1701)_"1001:"_(ABMY("QYR")-1700)_"0930:%DT"
  1. .S DIR("A",1)=""
  1. .S DIR("A",2)="Select a specific start date in the calendar year"
  1. .I ABMY("90")="B" S DIR("A",2)=DIR("A",2)_" for the 90-Day Report Period."
  1. .I ABMY("RTYP")="HOS" S DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
  1. .S DIR("A",3)="Note: End Date must not be after December 31."
  1. .I ABMY("RTYP")="HOS" S DIR("A",3)="Note: End Date must not be after September 30."
  1. .S DIR("A",4)=""
  1. .S DIR("A")="Enter first day of reporting period"_$S(ABMY("90")="B"!(ABMY("90")="C"):" for "_ABMY("QYR"),1:"") ;abm*2.6*12
  1. .D ^DIR K DIR
  1. .S (ABMY("SDT"),ABMP("SDT"))=Y
  1. I ABMY("90")="C" D
  1. .D ^XBFMK
  1. .;S DIR(0)="D^::%DT" ;abm*2.6*15
  1. .S DIR(0)="D^::EX" ;forces date to be mm/dd/ccyy ;abm*2.6*15
  1. .S DIR("A",1)=""
  1. .S DIR("A",2)="Select a specific start date in the calendar year"
  1. .I ABMY("RTYP")="HOS" S DIR("A",2)="Select a specific start date in the fiscal year for the 90-Day Report Period."
  1. .S DIR("A",4)=""
  1. .S DIR("A")="Enter first day of reporting period"
  1. .D ^DIR K DIR
  1. .Q:$D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)
  1. .S (ABMY("SDT"),ABMP("SDT"))=Y
  1. .D ^XBFMK
  1. .S DIR("A",1)=""
  1. .S X1=ABMY("SDT")
  1. .S X2=89
  1. .D C^%DTC
  1. .S ABMDT=X
  1. .;I ABMY("RTYP")'="HOS" I ABMDT>((ABMY("QYR")-1700)_"1231") S ABMDT=((ABMY("QYR")-1700)_"1231")
  1. .;I ABMY("RTYP")="HOS" I ABMDT>((ABMY("QYR")-1700)_"0930") S ABMDT=((ABMY("QYR")-1700)_"0930")
  1. .S DIR(0)="D^"_ABMY("SDT")_":"_ABMDT_":EX"
  1. .S DIR("A")="Select a specific END date"
  1. .D ^DIR K DIR
  1. .S (ABMY("EDT"),ABMP("EDT"))=Y
  1. I ABMY("90")="E" D
  1. .D ^XBFMK
  1. .S DIR(0)="D^"
  1. .S DIR("A",1)=""
  1. .S DIR("A",2)="Select a specific END date"
  1. .S DIR("A",4)=""
  1. .S DIR("A")="Enter last day of 90-day period"
  1. .D ^DIR K DIR
  1. .S (ABMY("EDT"),ABMEDT)=Y
  1. .S X1=$P(ABMEDT,".")
  1. .S X2=-89
  1. .D C^%DTC
  1. .S (ABMY("SDT"),ABMP("SDT"))=X
  1. Q