SRSDISP ;B'HAM ISC/MAM - SELECT GRAPH DISPLAY ; [ 04/03/00 1:33 PM ]
;;3.0; Surgery ;**50,94,165**;24 Jun 93;Build 6
PICK W @IOF,!!,"Display of Available Operating Room Time",!!,"1. Display Availability (12:00 AM - 12:00 PM)",!,"2. Display Availability (06:00 AM - 08:00 PM)",!,"3. Display Availability (12:00 PM - 12:00 AM)"
W !,"4. Do Not Display Availability"
W !!,"Select Number: 2// " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
S:X="" X=2 I X<1!(X>4) D HELP G PICK
S SRDTYPE=X I SRDTYPE<4 D HDR
S SROR=0 F S SROR=$O(^SRS(SROR)) Q:'SROR I '$P(^(SROR,0),"^",6) D:$$ORDIV^SROUTL0(SROR,$G(SRSITE("DIV"))) LINE
Q
HDR W @IOF,!!,"ROOM"
I SRDTYPE=2 W " 6AM 7 8 9 10 11 12 13 14 15 16 17 18 19 20" Q
I SRDTYPE=1 W " 12AM 1 2 3 4 5 6 7 8 9 10 11 12PM" Q
W " 12PM 13 14 15 16 17 18 19 20 21 22 23 24"
Q
LINE ; display graph for each room
I '$D(^SRS(SROR,"S",SRSDATE,1)) D GRAPH
S X2=1,X1=SRSDATE D C^%DTC I '$D(^SRS(SROR,"S",X,1)) S SRDAT=SRSDATE,SRSDATE=X D GRAPH S SRSDATE=SRDAT K SRDAT
I SRDTYPE=4 Q
S X=$P(^SRS(SROR,0),"^"),ROOM=$P(^SC(X,0),"^"),START=$S(SRDTYPE=2:41,SRDTYPE=1:11,1:71),END=$S(SRDTYPE=2:111,SRDTYPE=1:71,1:500)
W !,$E(ROOM,1,8),?8,$E(^SRS(SROR,"S",SRSDATE,1),START,END)
Q
GRAPH ; set graph in ^SRS
S ^SRS(SROR,"S",SRSDATE,0)=SRSDATE,^SRS(SROR,"SS",SRSDATE,0)=SRSDATE
S X=$E(SRSDATE,4,5)_"-"_$E(SRSDATE,6,7)_"-"_$E(SRSDATE,2,3)
S ^SRS(SROR,"S",SRSDATE,1)=X_" |____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|",^SRS(SROR,"SS",SRSDATE,1)=^SRS(SROR,"S",SRSDATE,1)
D DIS1^SRSBUTL ;;3*165-RJS
Q
HELP W !!,"Enter the number corresponding to portion of the display graph of available",!,"operating room time that you want to view. If you are scheduling a case"
W !,"between the hours of 6:00 AM and 8:00 PM, enter '2'. A display of available",!,"operating room time will then appear on your screen. If you do not want to"
W !,"see a display for any time period, enter '4'. You will then be asked to",!,"select an operating room."
W !!,"Press <RET> to continue " R X:DTIME
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSRSDISP 2207 printed Dec 13, 2024@02:47:27 Page 2
SRSDISP ;B'HAM ISC/MAM - SELECT GRAPH DISPLAY ; [ 04/03/00 1:33 PM ]
+1 ;;3.0; Surgery ;**50,94,165**;24 Jun 93;Build 6
PICK WRITE @IOF,!!,"Display of Available Operating Room Time",!!,"1. Display Availability (12:00 AM - 12:00 PM)",!,"2. Display Availability (06:00 AM - 08:00 PM)",!,"3. Display Availability (12:00 PM - 12:00 AM)"
+1 WRITE !,"4. Do Not Display Availability"
+2 WRITE !!,"Select Number: 2// "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+3 if X=""
SET X=2
IF X<1!(X>4)
DO HELP
GOTO PICK
+4 SET SRDTYPE=X
IF SRDTYPE<4
DO HDR
+5 SET SROR=0
FOR
SET SROR=$ORDER(^SRS(SROR))
if 'SROR
QUIT
IF '$PIECE(^(SROR,0),"^",6)
if $$ORDIV^SROUTL0(SROR,$GET(SRSITE("DIV")))
DO LINE
+6 QUIT
HDR WRITE @IOF,!!,"ROOM"
+1 IF SRDTYPE=2
WRITE " 6AM 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
QUIT
+2 IF SRDTYPE=1
WRITE " 12AM 1 2 3 4 5 6 7 8 9 10 11 12PM"
QUIT
+3 WRITE " 12PM 13 14 15 16 17 18 19 20 21 22 23 24"
+4 QUIT
LINE ; display graph for each room
+1 IF '$DATA(^SRS(SROR,"S",SRSDATE,1))
DO GRAPH
+2 SET X2=1
SET X1=SRSDATE
DO C^%DTC
IF '$DATA(^SRS(SROR,"S",X,1))
SET SRDAT=SRSDATE
SET SRSDATE=X
DO GRAPH
SET SRSDATE=SRDAT
KILL SRDAT
+3 IF SRDTYPE=4
QUIT
+4 SET X=$PIECE(^SRS(SROR,0),"^")
SET ROOM=$PIECE(^SC(X,0),"^")
SET START=$SELECT(SRDTYPE=2:41,SRDTYPE=1:11,1:71)
SET END=$SELECT(SRDTYPE=2:111,SRDTYPE=1:71,1:500)
+5 WRITE !,$EXTRACT(ROOM,1,8),?8,$EXTRACT(^SRS(SROR,"S",SRSDATE,1),START,END)
+6 QUIT
GRAPH ; set graph in ^SRS
+1 SET ^SRS(SROR,"S",SRSDATE,0)=SRSDATE
SET ^SRS(SROR,"SS",SRSDATE,0)=SRSDATE
+2 SET X=$EXTRACT(SRSDATE,4,5)_"-"_$EXTRACT(SRSDATE,6,7)_"-"_$EXTRACT(SRSDATE,2,3)
+3 SET ^SRS(SROR,"S",SRSDATE,1)=X_" |____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|____|"
SET ^SRS(SROR,"SS",SRSDATE,1)=^SRS(SROR,"S",SRSDATE,1)
+4 ;;3*165-RJS
DO DIS1^SRSBUTL
+5 QUIT
HELP WRITE !!,"Enter the number corresponding to portion of the display graph of available",!,"operating room time that you want to view. If you are scheduling a case"
+1 WRITE !,"between the hours of 6:00 AM and 8:00 PM, enter '2'. A display of available",!,"operating room time will then appear on your screen. If you do not want to"
+2 WRITE !,"see a display for any time period, enter '4'. You will then be asked to",!,"select an operating room."
+3 WRITE !!,"Press <RET> to continue "
READ X:DTIME
+4 QUIT