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

SRORUT.m

Go to the documentation of this file.
  1. SRORUT ;B'HAM ISC/MAM - OPERATING ROOM UTILIZATION ; [ 09/22/98 11:36 AM ]
  1. ;;3.0; Surgery ;**34,77,50**;24 Jun 93
  1. S SRSOUT=0
  1. W @IOF,!,"Operating Room Utilization Report",!
  1. DATE 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
  1. S SRSD=+Y,SRSD1=Y-.0001
  1. W ! K %DT S %DT="AEPX",%DT("A")="Print utilization information through which date ? " D ^%DT I Y<0 S SRSOUT=1 G END
  1. I Y<SRSD W !!,"The ending date must be more recent than the starting date." G DATE
  1. S SRED=+Y,SRED1=SRED+.25
  1. N SRINSTP,SRDIV I '$D(^XUSEC("SROCHIEF",+DUZ)) S SRINST=SRSITE("SITE"),(SRDIV,SRINSTP)=SRSITE("DIV")
  1. 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)
  1. D ^SRORIN G:SRSOUT END I "Yy"'[SRYN S SRSOUT=1 G END
  1. ROOMS ; all operating rooms ?
  1. 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
  1. S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
  1. 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
  1. I "Yy"[SRYN G ZIS
  1. 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
  1. S SROR=+Y
  1. W !!,"This report is designed to use a 132 column format, and must be run",!,"on a printer.",!
  1. ZIS 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
  1. I $E(IOST)'="P" W !!,"This report must be run on a printer. Please select another device.",! G ZIS
  1. 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
  1. G EN^SRORUT0
  1. END D ^%ZISC W @IOF D ^SRSKILL
  1. Q