source: WorldVistAEHR/trunk/r/SURGERY-SR/SROCRAT.m@ 632

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1SROCRAT ;B'HAM ISC/MAM - CANCELLATION RATES ; [ 04/06/00 10:19 AM ]
2 ;;3.0; Surgery ;**77,94**;24 Jun 93
3 S (SRSOUT,SROTOT)=0 K %DT W @IOF,!,"Report of Cancellation Rates",!
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 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 I 'SRSS D ALL I SRSOUT G END
11 W ! K %ZIS,IOP,IO("Q"),POP S %ZIS="Q",%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^SROCRAT",ZTDESC="Cancellation Rate Report",(ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SRINST"),ZTSAVE("SRINSTP"),ZTSAVE("SRSS*"),ZTSAVE("SROTOT"))="" D ^%ZTLOAD G END
13EN ; entry when queued
14 U IO S SRSOUT=1 K ^TMP("SR",$J)
15 I SRSS D ^SRORAT1 G END
16 D ^SRORAT2
17END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
18 I $E(IOST)="P" W @IOF
19 K ^TMP("SRT",$J) I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
20 D ^%ZISC W @IOF D ^SRSKILL K SRTN
21 Q
22SP W !! S SRSS=1 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the report for which Specialty ? " D ^DIC I Y<0 S SRSOUT=1 Q
23 S SRCT=+Y,SRSS(SRCT)=+Y D MORE
24 Q
25ALL ; display for each specialty ?
26 W !!,"Do you want to display the cancellation reasons for each Surgical",!,"Specialty ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 Q
27 S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
28 I "YyNn"'[SRYN W !!,"Enter RETURN to display cancellation rates for each specialty along with the",!,"cancellation rates for the entire medical center. If you only want to display"
29 I "YyNn"'[SRYN W !,"the rates for the entire medical center, enter 'NO'." G ALL
30 I "Nn"[SRYN S SROTOT=1
31 Q
32MORE ; ask for more surgical specialties
33 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Select An Additional Specialty: " D ^DIC I Y>0 S SRCT=+Y,SRSS(SRCT)=+Y G MORE
34 Q
Note: See TracBrowser for help on using the repository browser.