source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRAC.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1LRAC ;SLC/DCM/MILW/JMC - CUMULATIVE REPORTS DRIVER ;2/20/91 08:33 ;
2 ;;5.2;LAB SERVICE;**172**;Sep 27, 1994
3 ;Routine has been change to handle separate file room scheduling.
4 ;;Semi-automatic queuing of selected reports can occur by setting-up
5 ;;an action type option: S LRX(x)="" D CLOCK^LRAC
6 ;;Where 'x' is the internal number of the report desired.
7 ;;Fields 200,201,202 of OPTION file should then be filled in.
8 K DIC,LRX
9 ;
10 ;
11 D ^LRPARAM ;---HOAK FOR PRINTER PROBLEMS
12 ;
13 R !,"Print ALL or SELECTED reports? ALL// ",X:DTIME S:X="" X="A" Q:".^"[X
14 I "AaSs"'[$E(X) S X="?"
15 I X["?" W !?5,"Enter 'S' for SELECTED reports ",!?18,"-or-",!?11,"'A' for ALL reports" G LRAC
16 I "Ss"[$E(X,1) D Q:'$D(LRX)
17 . W ! ; Allow user to select reports to print.
18 . S DIC="^LAB(64.5,1,3,",DIC(0)="AEMQ",DIC("A")="Select REPORT NAME: "
19 . ; Screen out file room reports if printing separate file room, use appropiate option.
20 . I $P($G(^LAB(64.5,1,6)),U,2) S DIC("S")="I '$P($G(^LAB(64.5,1,3,Y,.1)),U,3)"
21 . F D ^DIC Q:Y<1 S LRX(+Y)=""
22 . K DIC W !
23 S U="^" D DT^LRX
24 S ZTRTN="CLOCK^LRAC",ZTIO="",ZTDESC="Laboratory cumulative report" S:$D(LRX) ZTSAVE("LRX*")="" D ^%ZTLOAD
25 K LRX,X,ZTSK,ZTSAVE,ZTDESC,ZTIO,ZTRTN
26 Q
27 ;
28CLOCK S:$D(ZTQUEUED) ZTREQ="@" K ZTSK
29CL2 Q:'$D(^LAB(64.5,1,3))!($D(^LAC("LRAC","A")))
30 S LRXLR="LRAC" S:'$D(LRPERM) LRPERM=0
31 S LRFRSEP=$P($G(^LAB(64.5,1,6)),U,2) ; Set flag if printing separate file rooms.
32 I $D(XRTL) S XRTN="LRAC" D T0^%ZOSV ; START RESPONSE TIMING LOG
33 I '$D(LRDT) S %DT="",X="T-1" D ^%DT S LRDT=Y
34 L +^LAB(64.5)
35 ;---last date cime printed--\/
36 S LRLDT=$P(^LAB(64.5,1,0),U,3)
37 ;
38 I $L(LRLDT) D:LRDT'=LRLDT ^LRACK
39 S %DT="",X="T" D ^%DT S LRYDT=Y,U="^",LRBOT=$P(^LAB(64.5,1,0),U,2)
40 I LRDT'=LRLDT D ENT^LRACKL S $P(^LAB(64.5,1,0),U,3)=LRDT,$P(^(0),U,7)=LRLDT
41 L -^LAB(64.5) S LRRE=0
42 I '$D(LRX) D CL3
43 I $D(LRX) D CL4
44 I $D(XRTL),$D(XTR0) S XRTN="LRAC" D T1^%ZOSV ;STOP RESPONSE TIME LOG
45 K LRRE,LRX,LRXLR,X1,X2,Z
46 Q
47CL3 ; Task "ALL" reports except file room if file room on separate schedule.
48 S LRRPTN=0
49 F S LRRPTN=$O(^LAB(64.5,1,3,LRRPTN)) Q:LRRPTN<1 D
50 . S X=$G(^LAB(64.5,1,3,LRRPTN,.1)) Q:$P(X,U,2) ; Don't start "manual" reports.
51 . I LRFRSEP,$P(X,U,3) Q ; Don't start "File Room" report if on separate schedule.
52 . S IOP=$P(X,U,1) D:IOP'="" CL3A
53 K LRBOT,LRDFN,LRDT,LRFRSEP,LRLDT,LRLLOC,LRNM,LRRPTN,LRYDT,X,Y,ZTSAVE,ZTSK
54 Q
55 ;
56CL3A ; Task the actual reports to run.
57 N ZTIO ; Tasked jobs have ZTIO defined, want ZTLOAD to build from IO* variables.
58 S %ZIS="N" D ^%ZIS I POP D ^%ZISC Q
59 S ZTRTN="ENT^LRAC1",ZTDTH=$H,ZTDESC="Laboratory cumulative report" K ZTSK
60 F I="LRPERM","LRXLR","LRDT","LRLDT","LRYDT","LRBOT","LRRE","LRRPTN" S ZTSAVE(I)=""
61 D ^%ZTLOAD,^%ZISC
62 Q
63 ;
64CL4 ; Task selected reports.
65 S LRRPTN=0
66 F S LRRPTN=$O(^LAB(64.5,1,3,LRRPTN)) Q:LRRPTN<1 I $D(LRX(LRRPTN)) D
67 . S X=$G(^LAB(64.5,1,3,LRRPTN,.1))
68 . I LRFRSEP,$P(X,U,3) Q ; Don't start "File Room" report if on separate schedule.
69 . S IOP=$P(X,U,1) D:IOP'="" CL3A
70 K LRBOT,LRDFN,LRDT,LRFRSEP,LRLDT,LRLLOC,LRNM,LRRPTN,LRX,LRYDT,X,Y,ZTSAVE,ZTSK
71 Q
Note: See TracBrowser for help on using the repository browser.