source: FOIAVistA/trunk/r/SURGERY-SR/SRORUT.m@ 1704

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1SRORUT ;B'HAM ISC/MAM - OPERATING ROOM UTILIZATION ; [ 09/22/98 11:36 AM ]
2 ;;3.0; Surgery ;**34,77,50**;24 Jun 93
3 S SRSOUT=0
4 W @IOF,!,"Operating Room Utilization Report",!
5DATE W ! K %DT S %DT="AEPX",%DT("A")="Print utilization information starting with which date ? " D ^%DT I Y<0 S SRSOUT=1 G END
6 S SRSD=+Y,SRSD1=Y-.0001
7 W ! K %DT S %DT="AEPX",%DT("A")="Print utilization information through which date ? " D ^%DT I Y<0 S SRSOUT=1 G END
8 I Y<SRSD W !!,"The ending date must be more recent than the starting date." G DATE
9 S SRED=+Y,SRED1=SRED+.25
10 N SRINSTP,SRDIV I '$D(^XUSEC("SROCHIEF",+DUZ)) S SRINST=SRSITE("SITE"),(SRDIV,SRINSTP)=SRSITE("DIV")
11 I $D(^XUSEC("SROCHIEF",+DUZ)) S SRINST=$$INST^SROUTL0() G:SRINST="^" END S SRINSTP=$P(SRINST,U),SRINST=$S(SRINST["ALL DIVISIONS":SRINST,1:$P(SRINST,U,2)),SRDIV=$S(SRINST["ALL DIVISIONS":SRINST,1:SRINSTP)
12 D ^SRORIN G:SRSOUT END I "Yy"'[SRYN S SRSOUT=1 G END
13ROOMS ; all operating rooms ?
14 S SROR="ALL" W @IOF,!,"Do you want to print the Operating Room Utilization Report for all",!,"operating rooms ? YES// " R SRYN:DTIME I SRYN["^" S SRSOUT=1 G END
15 S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
16 I "YyNn"'[SRYN W !!,"Enter RETURN if you want to print utilization information for every operating",!,"room, or 'NO' to print the report for one particular room.",!!,"Press RETURN to continue " R X:DTIME G ROOMS
17 I "Yy"[SRYN G ZIS
18 W ! K DIC S DIC("S")="I $$ORDIV^SROUTL0(+Y,SRINSTP),('$P(^SRS(+Y,0),U,6))",DIC="^SRS(",DIC(0)="QEAMZ",DIC("A")="Print the report for which Operating Room ? " D ^DIC I Y<0 S SRSOUT=1 G END
19 S SROR=+Y
20 W !!,"This report is designed to use a 132 column format, and must be run",!,"on a printer.",!
21ZIS K %ZIS,IO("Q"),IOP,POP S %ZIS="QM",%ZIS("A")="Print the Operating Room Utilization Report on which Device ? " D ^%ZIS I POP S SRSOUT=1 G END
22 I $E(IOST)'="P" W !!,"This report must be run on a printer. Please select another device.",! G ZIS
23 I $D(IO("Q")) K IO("Q") S ZTDESC="OPERATING ROOM UTILIZATION REPORT",ZTRTN="EN^SRORUT0",(ZTSAVE("SRSD*"),ZTSAVE("SRED*"),ZTSAVE("SROR"),ZTSAVE("SRINST"),ZTSAVE("SRINSTP"),ZTSAVE("SRDIV"))="" D ^%ZTLOAD G END
24 G EN^SRORUT0
25END D ^%ZISC W @IOF D ^SRSKILL
26 Q
Note: See TracBrowser for help on using the repository browser.