source: WorldVistAEHR/trunk/r/SURGERY-SR/SROPRIT.m@ 1006

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1SROPRIT ;B'HAM ISC/MAM - TOTAL OPERATIONS (BY PRIORITY) ; [ 09/22/98 11:36 AM ]
2 ;;3.0; Surgery ;**77,50**;24 Jun 93
3BEG W @IOF,!,"Report of Surgical Priorities",!
4DATE D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
5 S SRD=SRSD-.0001
6CHOICE W !!,"Do you want to review this information sorted by Surgical Specialty ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
7 S SRYN=$E(SRYN) I "YyNn"'[SRYN W !!,"Enter RETURN if you want the totals for each Surgical Specialty, or 'NO' to",!,"display the total cases sorted by surgical priority for the entire Medical",!,"Center." G CHOICE
8 S SRSS="" I "Yy"[SRYN S SRSS="ALL" D SPEC I SRSOUT G END
9 W ! K IOP,%ZIS,POP,IO("Q") S %ZIS("A")="Print the Report on which Device: ",%ZIS="Q" D ^%ZIS G:POP END
10 I $D(IO("Q")) K IO("Q") S ZTDESC="LIST OF OPERATIONS",ZTRTN="EN^SROPRIT",(ZTSAVE("SRD"),ZTSAVE("SRED"),ZTSAVE("SRSD"),ZTSAVE("SRSITE*"),ZTSAVE("SRSS"))="",%ZIS="QM" D ^%ZTLOAD G END
11EN ; entry when queued
12 N SRFRTO 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 SRPRINT="DATE PRINTED: "_Y
13 S SRINST=SRSITE("SITE"),SRD=SRSD-.0001,SRED1=SRED+.9999,SRSOUT=0
14 I SRSS D ^SROPRI1 G END
15 D ^SROPRI2
16END I $E(IOST)="P" W @IOF
17 K ^TMP("SRLIST",$J) I $D(ZTQUEUED) Q:$G(ZTSTOP) S ZTREQ="@" Q
18 D ^%ZISC W @IOF D ^SRSKILL K SRTN
19 Q
20PLIST ;; get list of priorities
21 N SRLIST,SRC,SRP,I,J,X,Y D HELP^DIE(130,"",.035,"S","SRLIST")
22 F I=2:1:SRLIST("DIHELP") S X=SRLIST("DIHELP",I),Y=$F(X," "),SRC=$E(X,1,Y-2) F J=Y:1 I $E(X,J)'=" " S SRP=$E(X,J,99),SRCODE(SRC)=SRP Q
23 S SRCODE("ZZ")="PRIORITY NOT ENTERED"
24 S X="",Y=1 F S X=$O(SRCODE(X)) Q:X="" S SRCODE(X)=Y_". "_SRCODE(X),Y=Y+1
25 Q
26SPEC ; select specialty
27 W !!,"Do you want to print this report for all Surgical Specialties ? YES// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 Q
28 S SRYN=$E(SRYN) I "YyNn"'[SRYN W !!,"Enter 'YES' to print this report for all specialties, or 'NO' to select a",!,"specific specialty." G SPEC
29 I "Yy"[SRYN Q
30 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the report for which Surgical Specialty ? " W ! D ^DIC I Y<0 S SRSOUT=1 Q
31 S SRSS=+Y
32 Q
Note: See TracBrowser for help on using the repository browser.