source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRRP8B.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1LRRP8B ;DALISC/TNN/J0 - WKLD STATS REPORT BY SHIFT ; 4/9/93
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3 W !!,"ENTRY POINT IS AT EN^LRRP8." H 3 QUIT
4 ;
5BUILD ;
6 N LRGCN,LRCCN,LRDCN
7 S ^TMP("LR",$J,0)=0
8 D INITMAN^LRCAPMR1
9 D GENCOM^LRCAPMR1,CAPCOM^LRCAPMR1
10 S LRCDT=LRFR-1
11 F S LRCDT=$O(^LRO(64.1,LRIN,1,LRCDT)) Q:('LRCDT)!(LRCDT>LRTO) D
12 . D DATCOM^LRCAPMR1
13 . S LRCC=0
14 . F S LRCC=$O(^LRO(64.1,LRIN,1,LRCDT,1,LRCC)) Q:'LRCC D
15 . . I LRCAPS Q:'$D(LRCAPS(LRCC))
16 . . S LRCAPNAM=$$WKLDNAME^LRCAPU(LRCC)
17 . . D SHIFT
18 . . D BMPMANL^LRCAPMR1
19 Q
20SHIFT ;*** If shift, setup start and stop time ranges for each shift ***
21 N I2
22 I LRSTFLG=0 S LRNSFT=1,LRST(1)=LRSTRT_"^"_LRSTOP
23 F I2=1:1:LRNSFT D
24 . S LRSTRT=$P(LRST(I2),"^"),LRSTOP=$P(LRST(I2),"^",2)
25 . S LRTIM=LRSTRT-.000001
26 . F S LRTIM=$O(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,LRTIM)) Q:('LRTIM)!(LRTIM>LRSTOP) D
27 . . S LRREC=$G(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,LRTIM,0)) Q:'$L(LRREC)
28 . . S LRUC=+$P(LRREC,U,3) S:'LRUC LRUC=1
29 . . S LRA=$P(LRREC,U,7) Q:'LRA
30 . . I LRAA Q:'$D(LRAA(LRA))
31 . . S LRANAM=$P($G(^LRO(68,LRA,0)),U) S:LRANAM="" LRANAM="UNKN - "_LRA
32 . . S ^(0)=^TMP("LR",$J,0)+LRUC
33 . . S:'$D(^TMP("LR",$J,"AA",LRA,0)) ^(0)=0 S ^(0)=^(0)+LRUC
34 . . S:'$D(^TMP("LR",$J,"AA",LRA,"SHFT",I2,0)) ^(0)=0 S ^(0)=^(0)+LRUC
35 . . S:'$D(^TMP("LR",$J,"AA",LRA,"SHFT",I2,"CCN",LRCAPNAM,0)) ^(0)=0_U_LRCAPNUM S $P(^(0),U)=^(0)+LRUC
36 . . S:'$D(^TMP("LR",$J,"AA",LRA,"CCN",LRCAPNAM,0)) ^(0)=0_U_LRCAPNUM S $P(^(0),U)=^(0)+LRUC
37 Q
Note: See TracBrowser for help on using the repository browser.