source: FOIAVistA/tag/r/SURGERY-SR/SRORHRS.m@ 1550

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1SRORHRS ;B'HAM ISC/ADM - O.R. NORMAL WORKING HOURS ; [ 09/22/98 11:36 AM ]
2 ;;3.0; Surgery ;**77,50**;24 Jun 93
3 S SRSOUT=0 W @IOF,!,"Operating Room Normal Working Hours Report",!
4DATE W ! K %DT S %DT="AEPX",%DT("A")="Print normal working hours starting with which date ? " D ^%DT I Y<0 S SRSOUT=1 G END
5 S SRSD=+Y
6 W ! K %DT S %DT="AEPX",%DT("A")="Print normal working hours through which date ? " D ^%DT I Y<0 S SRSOUT=1 G END
7 I Y<SRSD W !!,"The ending date must be more recent than the starting date." G DATE
8 S SRED=+Y
9ROOMS ; all operating rooms ?
10 S SROR="ALL" W @IOF,!,"Do you want to print the Operating Room Normal Working Hours Report for all",!,"operating rooms ? YES// " R SRYN:DTIME I SRYN["^" S SRSOUT=1 G END
11 S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
12 I "YyNn"'[SRYN W !!,"Enter RETURN if you want to print the normal working hours for every operating",!,"room, or 'NO' to print the report for one particular room.",!!,"Press RETURN to continue " R X:DTIME G ROOMS
13 I "Yy"[SRYN G ZIS
14 W ! K DIC S DIC("S")="I $$ORDIV^SROUTL0(+Y,$G(SRSITE(""DIV""))),('$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
15 S SROR=+Y
16ZIS W ! K IOP,%ZIS,POP,IO("Q") S %ZIS("A")="Print the report on which Device: ",%ZIS="Q" D ^%ZIS G:POP END
17 I $D(IO("Q")) K IO("Q") S ZTDESC="O.R. Normal Working Hours Report",ZTRTN="EN^SRORHRS",(ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SROR"),ZTSAVE("SRSITE*"))="" D ^%ZTLOAD G END
18EN ; entry when queued
19 N SRFRTO S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
20 D ^SRORHRS0
21END I 'SRSOUT,$E(IOST)'="P" W !!,"Press RETURN to continue " R X:DTIME
22 W:$E(IOST)="P" @IOF I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
23 D ^%ZISC,^SRSKILL W @IOF
24 Q
25HDR ; print heading
26 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
27 I SRHDR,$E(IOST)'="P" W !!,"Press RETURN to continue " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
28 W:$Y @IOF W ! W:$E(IOST)="P" ?(80-$L(SRINST)\2),SRINST,?76,"PAGE",!,?31,"SURGICAL SERVICE",?78,SRPAGE,! W ?22,"OPERATING ROOM NORMAL WORKING HOURS"
29 W !,?(80-$L(SRFRTO)\2),SRFRTO
30 W !!,$S(SROR="ALL":"OPERATING ROOM",1:"DATE"),?20,"START TIME",?35,"END TIME",?62,"TOTAL TIME",! F LINE=1:1:80 W "-"
31 I SRHDR,SROR="ALL" W !,?31,"** "_SRDT_" **",!!
32 I SROR'="ALL" W !,?(80-$L("** OPERATING ROOM: "_$P(^SC($P(^SRS(SROR,0),"^"),0),"^")_" **")\2),"** OPERATING ROOM: "_$P(^SC($P(^SRS(SROR,0),"^"),0),"^")_" **",!!
33 S SRHDR=1,SRPAGE=SRPAGE+1
34 Q
Note: See TracBrowser for help on using the repository browser.