source: FOIAVistA/trunk/r/SURGERY-SR/SRSWL4.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SRSWL4 ;B'HAM ISC/MAM - WAITING LIST, EXTENDED-ONE SPECIALTY ; 17 OCT 1989 7:35 AM [ 09/12/94 1:00 PM ]
2 ;;3.0; Surgery ;**34**;24 Jun 93
3 W ! K %ZIS,POP,IOP,IO("Q") S %ZIS("A")="Print the Waiting List on which Device: ",%ZIS="Q" D ^%ZIS Q:POP
4 I $D(IO("Q")) K IO("Q") S ZTDESC="SURGERY WAITING LIST",ZTRTN="BEG^SRSWL4",(ZTSAVE("SRSS"),ZTSAVE("SRSNM"))="" D ^%ZTLOAD G END
5BEG ; entry when queued
6 U IO S SRSOUT=0 D NOW^%DTC S Y=% D D^DIQ S SRTIME=$E(Y,1,12)_" at "_$E(Y,14,18) D HDR
7 S SRSDT=0 F S SRSDT=$O(^SRO(133.8,"AWL",SRSS,SRSDT)) Q:'SRSDT!(SRSOUT) S SROFN=0 F S SROFN=$O(^SRO(133.8,"AWL",SRSS,SRSDT,SROFN)) Q:'SROFN!(SRSOUT) D PRINT
8END I $E(IOST)="P" S SRSOUT=1 W @IOF
9 I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
10 I 'SRSOUT W !!,"Press RETURN to continue " R X:DTIME W @IOF
11 D ^%ZISC,^SRSKILL K SRTN
12 Q
13HDR ; print heading
14 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
15 W:$Y @IOF W !,"Surgery Waiting List for "_SRSNM,!,"Printed "_SRTIME,! F LINE=1:1:80 W "="
16 Q
17PRINT ; print information
18 I $Y+20>IOSL D PAGE Q:SRSOUT
19 S SRW=^SRO(133.8,SRSS,1,SROFN,0),DFN=$P(SRW,"^") D DEM^VADPT S SRSDPT=VADM(1)_" ("_VA("PID")_")",SROPER=$P(SRW,"^",2),Y=SRSDT D D^DIQ S SRDT=$E(Y,1,12)_" "_$E(Y,14,18)
20 D OUT^SRSWL3
21 Q
22LOOP ; break operation if greater than 59 characters
23 S SROPS(M)="" F LOOP=1:1 S MM=$P(SROPER," "),MMM=$P(SROPER," ",2,200) Q:MMM="" Q:$L(SROPS(M))+$L(MM)'<59 S SROPS(M)=SROPS(M)_MM_" ",SROPER=MMM
24 Q
25PAGE ; end of page
26 I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
27 D HDR
28 Q
Note: See TracBrowser for help on using the repository browser.