Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SROCRAT

SROCRAT.m

Go to the documentation of this file.
  1. SROCRAT ;B'HAM ISC/MAM - CANCELLATION RATES ; [ 04/06/00 10:19 AM ]
  1. ;;3.0; Surgery ;**77,94**;24 Jun 93
  1. S (SRSOUT,SROTOT)=0 K %DT W @IOF,!,"Report of Cancellation Rates",!
  1. DATE D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
  1. 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))
  1. SPEC W !!!,"Do you want to print the report for all Surgical Specialties ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
  1. S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
  1. I "YyNn"'[SRYN W !!,"Enter RETURN to print this report for all surgical specialties, or 'NO' to",!,"select a specific specialty." G SPEC
  1. S SRSS="" I "Nn"[SRYN D SP I SRSOUT G END
  1. I 'SRSS D ALL I SRSOUT G END
  1. 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
  1. 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
  1. EN ; entry when queued
  1. U IO S SRSOUT=1 K ^TMP("SR",$J)
  1. I SRSS D ^SRORAT1 G END
  1. D ^SRORAT2
  1. END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
  1. I $E(IOST)="P" W @IOF
  1. K ^TMP("SRT",$J) I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
  1. D ^%ZISC W @IOF D ^SRSKILL K SRTN
  1. Q
  1. SP 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
  1. S SRCT=+Y,SRSS(SRCT)=+Y D MORE
  1. Q
  1. ALL ; display for each specialty ?
  1. W !!,"Do you want to display the cancellation reasons for each Surgical",!,"Specialty ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 Q
  1. S SRYN=$E(SRYN) S:SRYN="" SRYN="Y"
  1. 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"
  1. I "YyNn"'[SRYN W !,"the rates for the entire medical center, enter 'NO'." G ALL
  1. I "Nn"[SRYN S SROTOT=1
  1. Q
  1. MORE ; ask for more surgical specialties
  1. 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
  1. Q