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

FBNHRCS.m

Go to the documentation of this file.
  1. FBNHRCS ;ACAMPUS/dmk-RCS 10-0168 (18-3)
  1. ;;3.5;FEE BASIS;;JAN 30, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;this routine will output data needed to complete the CNH codesheet
  1. ;it is a quarterly report. user will select first, second, third or
  1. ;fourth quarter and fiscal year.
  1. ;
  1. D SITEP^FBAAUTL Q:$G(FBPOP)
  1. W !!?17,"COMMUNITY NURSING HOME REPORT 10-0168",!!
  1. SELECT ;select quarter
  1. S DIR(0)="SM^1:First Quarter;2:Second Quarter;3:Third Quarter;4:Fourth Quarter"
  1. S DIR("?")="Select the reporting quarter"
  1. D ^DIR K DIR Q:$D(DIRUT)
  1. Q:'Y S FBQTR=+Y
  1. ;
  1. ;select fiscal year for report
  1. S DIR(0)="D^::AE",DIR("A")="Fiscal Year: "
  1. S DIR("?",1)="Examples of Valid Dates:"
  1. S DIR("?",2)=" 1994 or 94 or 1/94 or an exact date"
  1. S DIR("?")=" If you enter an exact date the Fiscal Year for that date will be used."
  1. D ^DIR K DIR Q:$D(DIRUT)!('Y) S FBFY=+Y D
  1. . ; set FBBEG = beginning date of selected quarter and fiscal year
  1. . ; set FBEND = ending date of selected quarter and fiscal year
  1. . ;
  1. . S FBBEG=$E(FBFY,1,3)-$S(FBQTR=1:1,1:0)_$P($P($T(DATES+FBQTR),";;",2),"^")
  1. . S FBEND=$E(FBFY,1,3)-$S(FBQTR=1:1,1:0)_$P($P($T(DATES+FBQTR),";;",2),"^",2)
  1. ;
  1. CODE I $$VERSION^XPDUTL("GEC")>1.6 W !,"Do you want to generate code sheets for these Nursing Homes?" S DIR(0)="Y",DIR("B")="No" D ^DIR K DIR Q:$D(DTOUT)!($D(DUOUT)) S:Y FBGECS=1
  1. ;
  1. W !!,"The CNH 10-0168 (RCS 18-3) will be compiled for the following date range:"
  1. W !?5,"FROM DATE: ",$$DATX^FBAAUTL(FBBEG)," TO DATE: ",$$DATX^FBAAUTL(FBEND)
  1. ;want to continue
  1. S DIR(0)="Y",DIR("A")="Want to continue",DIR("B")="Yes" D ^DIR K DIR
  1. G END:$D(DIRUT)!('Y)
  1. ;
  1. S PGM="START^FBNHRCS",VAR="FBBEG^FBEND^FBGECS^FBSITE(1)" D ZIS^FBAAUTL G:FBPOP END
  1. ;
  1. START D START^FBNHRCS1,^FBNHRCS3 G END:$G(FBOUT) I $G(FBGECS) D ^FBNHRCS4
  1. ;
  1. END K DTOUT,DIRUT,DUOUT,I,J,JJ,K,FB,FBD,FBHIGH,FBLOW,FBI,FBV,FBPOP,FBY,FBSITE,FBQTR,FBBEG,FBEND,FBFY,^TMP($J),VNAM,CNT,FBAASN,FBSN,FBGECS
  1. D CLOSE^FBAAUTL Q
  1. ;
  1. DATES ;store date ranges for each quarter (format mmdd $T(DATES)+FBQTR)
  1. ;;1001^1231
  1. ;;0101^0331
  1. ;;0401^0630
  1. ;;0701^0930
  1. Q