source: FOIAVistA/trunk/r/INTERIM_MANAGEMENT_SUPPORT-ECT/ECTPFYR.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1ECTPFYR ;B'ham ISC/PTD-VAMC Staffing Report by Fiscal Year ;01/29/91 08:00
2V ;;1.05;INTERIM MANAGEMENT SUPPORT;;
3 I '$D(^ECT(731)) W *7,!!?29,"OPTION IS UNAVAILABLE!",!,"The 'VAMC Management' File - #731 is not loaded on your system.",!! S XQUIT="" Q
4 I '$O(^ECT(731,0)) W *7,!!,"'VAMC Management' File - #731 has not been populated on your system.",!! S XQUIT="" Q
5 W !,"You may select the fiscal year RANGE for this report.",!,"(Up to 5 years of data may be displayed.)",!!
6BYR S %DT="AE",%DT("A")="Enter BEGINNING fiscal year: ",%DT(0)=2700000 D ^%DT K %DT G:$D(DTOUT)!("^"[X) EXIT S BYRDA=$E(Y,1,3)
7EYR S %DT="AE",%DT("A")="Enter ENDING fiscal year: ",%DT(0)=BYRDA_"0000" D ^%DT K %DT G:$D(DTOUT)!("^"[X) EXIT S EYRDA=$E(Y,1,3)
8 I EYRDA-BYRDA>4 W *7,!!,"Only a 5 year range may be shown on one report!",!! K BYRDA,EYRDA,X,Y G BYR
9 S FLG=0 F YR=BYRDA:1:EYRDA I $D(^ECT(731,YR,10,0)) S FLG=1
10 I FLG=0 W *7,!!,"There is NO DATA in the file for the selected date range!",!! G EXIT
11DEV K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G EXIT
12 I $D(IO("Q")) K IO("Q") S ZTRTN="ENQ^ECTPFYR",ZTDESC="VAMC Staffing Report by Fiscal Year",ZTSAVE("BYRDA")="",ZTSAVE("EYRDA")=""
13 I D ^%ZTLOAD K ZTSK G EXIT
14 U IO
15 ;
16ENQ ;ENTRY POINT WHEN QUEUED
17 K ^TMP($J) S CNT=0 F YR=BYRDA:1:EYRDA S SRV=0,CNT=CNT+1 F J=0:0 S SRV=$O(^ECT(731,YR,10,SRV)) Q:'SRV S FTEE=$P(^ECT(731,YR,10,SRV,0),"^",2),^TMP($J,SRV,YR)=FTEE
18 S PGCT=1,QFLG="",$P(LN,"-",80)="" D HDR
19SRV F SRV=0:0 S SRV=$O(^TMP($J,SRV)) Q:'SRV D WRTLN G:QFLG EXIT
20 ;
21EXIT K ^TMP($J),%,%H,%I,BYRDA,CNT,COL,CT,DTOUT,DIR,EYRDA,FLG,FTEE,INCR,J,LN,PGCT,POP,QFLG,SRV,X,Y,YEAR,YR,ZTDESC,ZTRTN,ZTSAVE,ZTSK
22 D ^%ZISC I IO="" S IOP="HOME" D ^%ZIS
23 Q
24 ;
25HDR ;PRINT REPORT MAIN HEADER
26 W @IOF,!?25,"VAMC STAFFING TRENDS BY SERVICE",!?21,"ASSIGNED FTEE FOR FY: "_(1700+BYRDA)_" TO FY: "_(1700+EYRDA) D NOW^%DTC S Y=$E(%,1,12) X ^DD("DD") W !!?45,Y,?70,"PAGE ",PGCT S PGCT=PGCT+1
27 W !!?10,"SERVICE" S CT=0,INCR=9,COL=27 F YR=BYRDA:1:EYRDA S CT=CT+1,COL=COL+INCR W:CT'>CNT ?COL,"FY "_$E(((BYRDA-1)+CT),2,3)
28 W !,LN
29 Q
30 ;
31WRTLN D:$Y+5>IOSL PRTCHK Q:QFLG W !,$P(^ECC(730,SRV,0),"^") S CT=0,INCR=9,COL=25
32 F YEAR=BYRDA:1:EYRDA S CT=CT+1,COL=COL+INCR D FTEE W:CT'>CNT ?COL,$S(FTEE="":"NO DATA",1:$J(FTEE,8,3))
33 Q
34 ;
35FTEE I '$D(^TMP($J,SRV,YEAR)) S FTEE="" Q
36 S FTEE=$P(^TMP($J,SRV,YEAR),"^")
37 Q
38 ;
39PRTCHK I $E(IOST)="C" S DIR(0)="E" D ^DIR I Y=0 S QFLG=1 Q
40 D HDR
41 Q
42 ;
Note: See TracBrowser for help on using the repository browser.