source: FOIAVistA/trunk/r/SURGERY-SR/SROSPEC.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1SROSPEC ;B'HAM ISC/MAM - CASES WITHOUT SPECIMENS ; [ 09/22/98 11:36 AM ]
2 ;;3.0; Surgery ;**77,50**;24 Jun 93
3 S (SRSOUT,SRSP)=0,SRORD=1 W @IOF,!,"Report of Cases Without Specimens",!
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))
6SORT G:SRSOUT END W @IOF,!,"Do you want the report sorted by Surgical Specialty ? NO// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
7 S SRYN=$E(SRYN) S:SRYN="" SRYN="N"
8 I "YyNn"'[SRYN W !!,"Enter 'YES' to print this report sorted by surgical specialty or enter RETURN",!,"to not sort by surgical specialty.",!!,"Press RETURN to continue, or '^' to quit: " R X:DTIME S:'$T!(X["^") SRSOUT=1 G SORT
9 I "Nn"[SRYN S SRORD=0 G DEV
10SPEC W !!,"Do you want the report for a specific Surgical Specialty ? NO// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
11 S SRYN=$E(SRYN) I SRYN="" S SRYN="N"
12 I "YyNn"'[SRYN W !!,"Enter 'YES' to print this report for a specific surgical specialty, or RETURN",!,"to print the report, sorted by the date of operation, for all specialties.",!!,"Press RETURN to continue " R X:DTIME G SPEC
13 I "Yy"[SRYN D SP I SRSOUT G END
14DEV W !!,"This report is designed to use a 132 column format."
15 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
16 I $D(IO("Q")) K IO("Q") S ZTDESC="Cases Without Specimens",ZTRTN="EN^SROSPEC",(ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SRORD"),ZTSAVE("SRSP*"),ZTSAVE("SRINST"),ZTSAVE("SRINSTP"))="" D ^%ZTLOAD G END
17EN ; entry when queued
18 U IO N SRFRTO S 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
19 I SRORD D ^SROSPSS G END
20 D ^SROSPC1
21END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
22 W:$E(IOST)="P" @IOF I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
23 D ^%ZISC K SRTN D ^SRSKILL W @IOF
24 Q
25SP ; select specialty
26 W ! S SRSP=1 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the Report of Cases Without Specimens for which Specialty ? " D ^DIC I Y<0 S SRSOUT=1 Q
27 S SRSP(+Y)=+Y
28MORE ; more specialties?
29 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 SRSP(+Y)=+Y G MORE
30 Q
Note: See TracBrowser for help on using the repository browser.