source: FOIAVistA/tag/r/SURGERY-SR/SRODLAY.m@ 1550

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1SRODLAY ;B'HAM ISC/MAM - REPORT OF DELAYS ; [ 04/04/00 11:36 AM ]
2 ;;3.0; Surgery ;**77,94**;24 Jun 93
3 S SRSOUT=0 K %DT W @IOF,!,"Report of Delayed Operations",!
4DATE D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
5 N SRINSTP S SRINST=$$INST^SROUTL0() G:SRINST="^" END S SRINSTP=$P(SRINST,U),SRINST=$S(SRINST["ALL DIVISIONS":SRINST,1:$P(SRINST,U,2))
6SPEC W !!!,"Do you want to print the Report of Delayed Operations for all Surgical",!,"Specialties ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
7 S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
8 I "YyNn"'[SRYN W !!,"Enter RETURN to print this report for all surgical specialties, or 'NO' to",!,"select a specific specialty." G SPEC
9 S SRSS="" I "Nn"[SRYN D SP I SRSOUT G END
10 W !!,"This report is designed to use a 132 column format."
11 W ! K %ZIS,IOP,IO("Q"),POP S %ZIS="QM",%ZIS("A")="Print the Report on which Device ? " D ^%ZIS I POP S SRSOUT=1 G END
12 I $D(IO("Q")) K IO("Q") S ZTRTN="EN^SRODLAY",ZTDESC="Report of Delayed Operations",(ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SRINST"),ZTSAVE("SRINSTP"),ZTSAVE("SRSS"))="" D ^%ZTLOAD G END
13EN ; entry when queued
14 U IO N SRFRTO,SRPRNT S SRSOUT=1 K ^TMP("SR",$J)
15 S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y,Y=DT X ^DD("DD") S SRPRNT="DATE PRINTED: "_Y
16 I SRSS D ^SRODLA1 G END
17 D ^SRODLA2
18END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
19 I $E(IOST)="P" W @IOF
20 K ^TMP("SRF",$J),^TMP("SRT",$J) I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
21 D ^%ZISC W @IOF D ^SRSKILL K SRTN
22 Q
23SP W !! K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the Report of Delayed Operations for which Specialty ? " D ^DIC I Y<0 S SRSOUT=1 Q
24 S SRSS=+Y
25 Q
26PAGE I 'SRHDR S SRHDR=1 G HDR
27 S X="" I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
28 I X["?" W !!,"Enter RETURN to continue printing this report, or '^' to exit from this option." G PAGE
29HDR ; print heading
30 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
31 S PAGE=PAGE+1 I $Y W @IOF
32 I $E(IOST)="P" W !,?(132-$L(SRINST)\2),SRINST,?120,"PAGE: "_PAGE,!,?58,"SURGICAL SERVICE",?100,"REVIEWED BY:",!,?52,"REPORT OF DELAYED OPERATIONS",?100,"DATE REVIEWED:"
33 W:$D(SPEC) !,?(132-$L(SPEC)\2),SPEC W !,?(132-$L(SRFRTO)\2),SRFRTO I $E(IOST)="P" W ?100,SRPRNT
34 W !!,"DATE",?12,"PATIENT",?44,"ATTENDING SURGEON",?84,"DELAY COMMENTS",!,"DELAY TIME",?14,"ID #",?44,"OPERATION(S)"
35 W ! F LINE=1:1:132 W "="
36 S SRHDR=1
37 Q
Note: See TracBrowser for help on using the repository browser.