source: FOIAVistA/tag/r/SURGERY-SR/SROATT.m@ 1093

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1SROATT ;B'HAM ISC/MAM - ATTENDING SURGEON REPORT ; [ 09/22/98 11:30 AM ]
2 ;;3.0; Surgery ;**77,50**;24 Jun 93
3 S (SRB,SRSOUT)=0 W @IOF,!,"Attending Surgeon Report",!
4DATE D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
5ATT W @IOF,!,"Do you want to print the report for all Attending Surgeons ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
6 S SRYN=$E(SRYN) I SRYN="" S SRYN="Y"
7 I "YyNn"'[SRYN W !!,"Enter RETURN to print the report for all attending surgeons, or 'NO' to select",!,"a specific person.",!!,"Press RETURN to continue " R X:DTIME G ATT
8 I "Nn"[SRYN G ^SROATT0
9REPORT S SRBOTH=0 W @IOF,!,"Attending Surgeon Reports",!!,"1. Attending Surgeon Report",!,"2. Attending Surgeon Cumulative Report",!,"3. Attending Surgeon Report and Attending Surgeon Cumulative Report"
10 W !!!,"Select the number corresponding with the desired report(s): " R X:DTIME I '$T!("^"[X) S SRSOUT=1 G END
11 I X<1!(X>3)!(X'=(X\1)) D HELP W !!,"Press RETURN to continue " R X:DTIME G REPORT
12 S SRBOTH=X
13BREAK I SRBOTH'=2 W ! K DIR S DIR("A")="Start report for each attending surgeon on a new page ? ",DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR S:Y SRB=1 I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 G END
14SPEC W @IOF,!,"Do you want the report for all Surgical Specialties ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
15 S SRSS="",SRYN=$E(SRYN) I SRYN="" S SRYN="Y"
16 I "YyNn"'[SRYN W !!,"Enter 'YES' to print this report for all Surgical Specialties, or 'NO' to ",!,"select a specific specialty.",!!,"Press RETURN to continue " R X:DTIME G SPEC
17 I "Nn"[SRYN D SP I SRSOUT G END
18 I SRBOTH'=2 W !!,"The Attending Surgeon Report was designed to use a 132 column format."
19 I SRBOTH=2 W !!,"The Attending Surgeon Cumulative Report was designed to use an 80 column format."
20 W ! K IOP,POP,IO("Q"),%ZIS S %ZIS="QM",%ZIS("A")="Print the report on which Device ? " D ^%ZIS I POP S SRSOUT=1 G END
21 I $D(IO("Q")) K IO("Q") S ZTDESC="Attending Surgeon Report",ZTRTN="EN^SROATT",(ZTSAVE("SRB"),ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SRSS"),ZTSAVE("SRSITE*"),ZTSAVE("SRBOTH"))="" D ^%ZTLOAD G END
22EN ; entry when queued
23 U IO S SRSOUT=0,SRINST=SRSITE("SITE"),SRINSTP=SRSITE("DIV"),Y=DT X ^DD("DD") S SRPRINT="DATE PRINTED: "_Y S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
24 I SRSS D ^SROATT1 G END
25 D ^SROATT2
26END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
27 W:$E(IOST)="P" @IOF K ^TMP("SRTOT",$J),^TMP("SRTC",$J) I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
28 D ^%ZISC K SRTN W @IOF D ^SRSKILL
29 Q
30SP ; select specialty
31 W ! K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the Report for which Surgical Specialty ? " D ^DIC I Y<0 S SRSOUT=1
32 S SRSS=+Y
33 Q
34HELP ; print help message
35 I X<1!(X>3)!(X'=(X\1)) W !!,"Enter '1' if you want to print the Attending Surgeon Report only. If you only want to print the Attending Surgeon Cumulative Report, enter '2'. Enter '3' to",!,"print both reports."
36 Q
Note: See TracBrowser for help on using the repository browser.