VistA-FOIAVistA/r/SURGERY-SR/SROSCH2.m

28 lines
1.5 KiB
Mathematica

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