source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRRP7.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1LRRP7 ;DALISC/J0 - MANUAL WKLD STATS REPORT ;8/11/97
2 ;;5.2;LAB SERVICE;**1,63,121**;Sep 27, 1994
3EN ;*** Entry point and control block ***
4 S LREND=0
5 D ASK
6DQ ;
7 D:'LREND INIT
8 D:'LREND BUILD
9 D:'LREND PRNTMAN^LRCAPMR1
10 D CLN
11 Q
12 ;
13INIT ;*** Initialize some variables ***
14 K ^TMP("LR",$J)
15 U IO
16 W:$E(IOST,1,2)="C-" @IOF
17 D PRTINIT^LRCAPU
18 S LRHDR="WORKLOAD STATISTICS BY ACCESSION AREA AND SHIFTS"
19 S LRHDR2=LRDTH
20 Q
21 ;
22CLN ;*** Clean up ***
23 D ^%ZISC,PRTCLN^LRCAPU,WKLDCLN^LRCAPU,CLNMAN^LRCAPMR1
24 K ^TMP("LR",$J)
25 K LRCDT,LRFR,LRFRV,LRFRD,LRTO,LRTOV,LRTOD,LRDTH,LRDSH,LRSTRT,LRSTOP,LRUC
26 K LRCAPS,LRCC,LRCAPNAM,LRCAPNUM,LRCAPFLG,LRCAPIFN,LRA,LRAA,LRCCNT,LRANAM
27 K LRREC,LRTIM,LRRPT,LREND,LRST,LRSTFLG,LRNSFT,LRSHFT,LRIN,LRPCT,LRSCNT
28 K LRACNT,LRGCNT,LRCONT,LRSQRM,LRMNODE,LRGSTND,LRGQC,LRGRPT,LRGMANL,LRDR
29 K LRDATE,LRCOM,LRTCOM,LRCOMM,LRCM
30 K DIC,DIR,X,Y,%ZIS,POP,ZTRTN,ZTDESC,ZTSAVE,ZTSK,DTOUT,DUOUT,DIRUT
31 Q
32ASK ;
33 D INST Q:LREND
34 D DATE^LRCAPR1A S:Y=-1 LREND=1
35 D CAPS Q:LREND
36 D DEVICE Q:LREND
37 Q
38INST ;*** Query for institution ***
39 K DIC
40 W @IOF,!
41 S DIC="^LRO(64.1,",DIC(0)="AQENM" D ^DIC
42 I (+Y<0)!($D(DUOUT))!($D(DTOUT)) S LREND=1 Q
43 S LRIN=+Y
44 Q
45CAPS ;*** Query for CAP codes ***
46 N I S LRCAPS=0 K DIR,X,Y
47 S DIR(0)="S^Y:YES;N:NO",DIR("B")="NO"
48 S DIR("A")="Do you want to select workload codes (YES or NO) "
49 S DIR("?",1)="Enter 'NO' to include ALL workload codes."
50 S DIR("?")="Enter 'YES' to limit report to one or more workload codes."
51 D ^DIR
52 Q:Y="N"
53 I ($D(DTOUT))!($D(DUOUT)) S LREND=1 Q
54 W !
55 S DIC="^LAM(",DIC(0)="AQENM",DIC("A")="Select WKLD code:"
56 F I=1:1 D ^DIC Q:Y=-1 S LRCAPS(+Y)=$P(Y,U),LRCAPS=I
57 S:($D(DTOUT))!($D(DUOUT)) LREND=1
58 Q
59DEVICE ;
60 K %ZIS,POP S %ZIS="Q" D ^%ZIS
61 I POP S LREND=1 Q
62 I $D(IO("Q")) D QUE S LREND=1
63 Q
64QUE ;
65 S ZTSAVE("LR*")="",ZTRTN="DQ^LRRP7",ZTDESC="LR MANUAL WKLD REPORT"
66 D ^%ZTLOAD,^%ZISC
67 W:$G(ZTSK) !!,"TASK ",ZTSK," QUEUED." H 3
68 Q
69BUILD ;
70 N LRGCN,LRCCN,LRDCN,X
71 S ^TMP("LR",$J,0)=0
72 D INITMAN^LRCAPMR1
73 I LRTO>LRFR S X=LRFR,LRFR=LRTO,LRTO=X
74 S LRCDT=LRTO-1
75 F S LRCDT=$O(^LRO(64.1,LRIN,1,LRCDT)) Q:('LRCDT)!(LRCDT>LRFR) D
76 . S LRCC=0
77 . F S LRCC=$O(^LRO(64.1,LRIN,1,LRCDT,1,LRCC)) Q:'LRCC D
78 . . I LRCAPS Q:'$D(LRCAPS(LRCC))
79 . . S LRCAPNAM=$$WKLDNAME^LRCAPU(LRCC)
80 . . D BMPMANL^LRCAPMR1
81 Q
Note: See TracBrowser for help on using the repository browser.