SROSCH2 ;B'HAM ISC/MAM - QUEUE SCHEDULE TO ALL LOCATIONS ; [ 07/27/98 2:33 PM ]
;;3.0; Surgery ;**34,48,50,108**;24 Jun 93
DEVICE S SRDEV=0 F I=0:0 S SRDEV=$O(^SRO(133,SRSITE,1,SRDEV)) Q:'SRDEV S IOP=$P(^SRO(133,SRSITE,1,SRDEV,0),"^") D QUEUE
Q
QUEUE ; queue report to device
K %ZIS,POP S %ZIS="QN" D ^%ZIS Q:POP
S ZTDESC="SCHEDULE OF OPERATIONS",ZTRTN="SROSCH",(ZTSAVE("SRDT"),ZTSAVE("SRDT1"),ZTSAVE("SRSITE*"))="",ZTDTH=$H D ^%ZTLOAD
Q
PRINT ; print variables
D:$Y+10>IOSL ASK^SROSCH1 Q:SRQ
W:SX=1 !!,"OPERATING ROOM: ",SROOM,!
W !,SRNM,?24,SROPD,?40,SRDIAG,?92,SRANES,?115,SRSUR,!,VA("PID"),?16,AGE,?24,SRSST,?40,SROPS(1),?92,SRAN1,?115,SRFST
W !,SRSLOC,?24,SRSET W:$D(SROPS(2)) ?40,SROPS(2) W ?92,SRAN2,?115,SRATT I $D(SROPS(3)) W !,?40,SROPS(3)
I $D(SROPS(4)) W !,?40,SROPS(4) I $D(SROPS(5)) W !,?40,SROPS(5) I $D(SROPS(6)) W !,?40,SROPS(6)
I $D(^SRF(SRTN,"CON")),$P(^("CON"),"^")'="" S SRCON=+^("CON") D CON^SROSCH1
W !,"Case # "_SRTN D PRINT^SROBLOD W !,SRPREAD
S SR("1.0")=$S($D(^SRF(SRTN,"1.0")):^("1.0"),1:"")
S SRFROZ=$P(SR("1.0"),"^",2),SRXRAY1=$P(SR("1.0"),"^",3),SRXRAY2=$P(SR("1.0"),"^",5)
I SRXRAY1'=""!(SRXRAY2'="N") D XRAY
I SRFROZ="Y" W ?24,"FROZEN SECTION TESTS REQUIRED",!
Q
XRAY ; print x-rays
I SRXRAY1'="" W ?24,"PREOPERATIVE XRAYS: "_SRXRAY1 W:SRXRAY2="Y" " INTRAOPERATIVE X-RAYS REQUESTED" W:SRXRAY2="C" " C-ARM REQUESTED" W ! Q
I SRXRAY2="Y" W ?24,"INTRAOPERATIVE X-RAYS REQUESTED",! Q
I SRXRAY2="C" W ?24,"C-ARM REQUESTED"
W !
Q
SROSCH2 ;B'HAM ISC/MAM - QUEUE SCHEDULE TO ALL LOCATIONS ; [ 07/27/98 2:33 PM ]
+1 ;;3.0; Surgery ;**34,48,50,108**;24 Jun 93
DEVICE SET SRDEV=0
FOR I=0:0
SET SRDEV=$ORDER(^SRO(133,SRSITE,1,SRDEV))
IF 'SRDEV
QUIT
SET IOP=$PIECE(^SRO(133,SRSITE,1,SRDEV,0),"^")
DO QUEUE
+1 QUIT
QUEUE ; queue report to device
+1 KILL %ZIS,POP
SET %ZIS="QN"
DO ^%ZIS
IF POP
QUIT
+2 SET ZTDESC="SCHEDULE OF OPERATIONS"
SET ZTRTN="SROSCH"
SET (ZTSAVE("SRDT"),ZTSAVE("SRDT1"),ZTSAVE("SRSITE*"))=""
SET ZTDTH=$HOROLOG
DO ^%ZTLOAD
+3 QUIT
PRINT ; print variables
+1 IF $Y+10>IOSL
DO ASK^SROSCH1
IF SRQ
QUIT
+2 IF SX=1
WRITE !!,"OPERATING ROOM: ",SROOM,!
+3 WRITE !,SRNM,?24,SROPD,?40,SRDIAG,?92,SRANES,?115,SRSUR,!,VA("PID"),?16,AGE,?24,SRSST,?40,SROPS(1),?92,SRAN1,?115,SRFST
+4 WRITE !,SRSLOC,?24,SRSET
IF $DATA(SROPS(2))
WRITE ?40,SROPS(2)
WRITE ?92,SRAN2,?115,SRATT
IF $DATA(SROPS(3))
WRITE !,?40,SROPS(3)
+5 IF $DATA(SROPS(4))
WRITE !,?40,SROPS(4)
IF $DATA(SROPS(5))
WRITE !,?40,SROPS(5)
IF $DATA(SROPS(6))
WRITE !,?40,SROPS(6)
+6 IF $DATA(^SRF(SRTN,"CON"))
IF $PIECE(^("CON"),"^")'=""
SET SRCON=+^("CON")
DO CON^SROSCH1
+7 WRITE !,"Case # "_SRTN
DO PRINT^SROBLOD
WRITE !,SRPREAD
+8 SET SR("1.0")=$SELECT($DATA(^SRF(SRTN,"1.0")):^("1.0"),1:"")
+9 SET SRFROZ=$PIECE(SR("1.0"),"^",2)
SET SRXRAY1=$PIECE(SR("1.0"),"^",3)
SET SRXRAY2=$PIECE(SR("1.0"),"^",5)
+10 IF SRXRAY1'=""!(SRXRAY2'="N")
DO XRAY
+11 IF SRFROZ="Y"
WRITE ?24,"FROZEN SECTION TESTS REQUIRED",!
+12 QUIT
XRAY ; print x-rays
+1 IF SRXRAY1'=""
WRITE ?24,"PREOPERATIVE XRAYS: "_SRXRAY1
IF SRXRAY2="Y"
WRITE " INTRAOPERATIVE X-RAYS REQUESTED"
IF SRXRAY2="C"
WRITE " C-ARM REQUESTED"
WRITE !
QUIT
+2 IF SRXRAY2="Y"
WRITE ?24,"INTRAOPERATIVE X-RAYS REQUESTED",!
QUIT
+3 IF SRXRAY2="C"
WRITE ?24,"C-ARM REQUESTED"
+4 WRITE !
+5 QUIT