source: FOIAVistA/trunk/r/SURGERY-SR/SROABCH.m@ 1166

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1SROABCH ;BIR/MAM - BATCH PRINT ASSESSMENTS ;11/28/07
2 ;;3.0; Surgery ;**77,166**;24 Jun 93;Build 6
3DATE ; get dates
4 S (SRSOUT,SRSP)=0 W @IOF,!!,"This report will print all completed or transmitted assessments that have a",!,"date of operation within the date range selected.",!
5 D DATE^SROUTL(.SRASTDT,.SRAENDT,.SRSOUT) G:SRSOUT END
6 D SPEC
7 W !!,"Depending on the date range entered, this report may be very long. You should",!,"QUEUE this report to the selected printer.",!
8 K %ZIS,IOP,POP,IO("Q") S %ZIS="Q",%ZIS("A")="Print on which Device: " D ^%ZIS S:POP SRSOUT=1 G:POP END
9 I $D(IO("Q")) K IO("Q") S ZTRTN="EN^SROABCH",(ZTSAVE("SRSITE*"),ZTSAVE("SRASTDT"),ZTSAVE("SRAENDT"),ZTSAVE("SRSP"))="",ZTDESC="Batch Print Risk Assessments" D ^%ZTLOAD S SRSOUT=1 G END
10EN ; entry when queued
11 S SRSOUT=0,SRABATCH=1
12 U IO S SRAENDT=SRAENDT+.9999,SDATE=SRASTDT-.0001 F S SDATE=$O(^SRF("AC",SDATE)) Q:'SDATE!(SDATE>SRAENDT)!SRSOUT S SRTN=0 F S SRTN=$O(^SRF("AC",SDATE,SRTN)) Q:'SRTN!SRSOUT D STUFF
13END I $D(ZTQUEUED) Q:$G(ZTSTOP) S ZTREQ="@" Q
14 D ^%ZISC K SRTN W @IOF D ^SRSKILL
15 Q
16STUFF ;
17 I SRSP,$P(^SRF(SRTN,0),"^",4)'=SRSP Q
18 S DATE=$P(^SRF(SRTN,0),"^",9)
19 S SR("RA")=$G(^SRF(SRTN,"RA")),X=$P(SR("RA"),"^") I X'="T",X'="C" Q
20 I $P(SR("RA"),"^",6)'="Y" Q
21 K SRA D ^SROAPAS
22 Q
23SPEC ; select specialty
24 W ! K DIR S DIR(0)="YA",DIR("A")="Print report for ALL surgical specialties ? ",DIR("B")="YES"
25 S DIR("?",1)="Enter YES to print the report for all surgical specialties, or NO to",DIR("?")="print the report for a specific surgical specialty."
26 D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
27 I 'Y W ! K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC("A")="Print the Report for which Surgical Specialty: ",DIC=137.45,DIC(0)="QEAMZ" D ^DIC K DIC S:Y<0 SRSOUT=1 Q:Y<0 S SRSP=+Y
28 Q
Note: See TracBrowser for help on using the repository browser.