source: WorldVistAEHR/trunk/r/SURGERY-SR/SROWRQ.m@ 1096

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1SROWRQ ;B'HAM ISC/MAM - REQUESTS BY WARD ; 07/08/88 08:11
2 ;;3.0; Surgery ;**37**;24 Jun 93
3BEG R !!,"Do you wish to print the requests for all wards ? NO// ",SRALL:DTIME G:'$T!(SRALL="^") END I SRALL["?" D HELP G BEG
4 S SRALL=$E(SRALL) S:SRALL="" SRALL="N" I "YyNn"'[SRALL D HELP G BEG
5 I "Yy"'[SRALL W ! S DIC=42,DIC(0)="QEAMZ",DIC("A")="Print Requests for which ward ? " D ^DIC G:Y<1 END S SRWARD=$P(Y(0),"^")
6 S:'$D(SRWARD) SRWARD=""
7DEVICE W ! K %ZIS,IOP,POP,IO("Q") S %ZIS="Q",%ZIS("A")="Print Requests on which Device: " D ^%ZIS G:POP END
8 I $D(IO("Q")) K IO("Q") S ZTDESC="REQUESTS BY WARD",ZTSAVE("SRWARD")=SRWARD,ZTRTN="SROWRQ1" D ^%ZTLOAD G END
9 G ^SROWRQ1
10HELP W !!,"Answer 'YES' if you want to print the requests for all wards, or RETURN",!,"if you want a specific ward."
11 Q
12END D ^SRSKILL K SRTN W @IOF
13 Q
14HDR I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRQ=1 Q
15 W:$Y @IOF W !,?28,"Requests for Operations",! F LINE=1:1:80 W "="
16 W !,?33,"Ward: "_SRWARD,! F I=1:1:80 W "="
17 Q
18CON ; print concurrent case
19 K SROPS,MM,MMM S SROPER=$P(^SRF(SRSCC,"OP"),"^") S:$L(SROPER)<60 SROPS(1)=SROPER I $L(SROPER)>59 S SROPER=SROPER_" " F M=1:1 D LOOP Q:MMM=""
20 W !," Procedure: ",?15,SROPS(1) I $D(SROPS(2)) W !,?15,SROPS(2) I $D(SROPS(3)) W !,?15,SROPS(3) I $D(SROPS(4)) W !,?15,SROPS(4)
21 W !!,"Comments:" S COMMENT=0 F S COMMENT=$O(^SRF(SRSCC,5,COMMENT)) Q:'COMMENT W !," "_^SRF(SRSCC,5,COMMENT,0)
22 Q
23LOOP ; break procedure if greater than 60 characters
24 S SROPS(M)="" F LOOP=1:1 S MM=$P(SROPER," "),MMM=$P(SROPER," ",2,200) Q:MMM="" Q:$L(SROPS(M))+$L(MM)'<60 S SROPS(M)=SROPS(M)_MM_" ",SROPER=MMM
25 Q
Note: See TracBrowser for help on using the repository browser.