source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRRP6B1.m@ 1604

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1LRRP6B1 ;DALISC/J0 - WORKLOAD CODE SUMMARY REPORT-BUILD ;11/27/92
2 ;;5.2;LAB SERVICE;**201**;Sep 27, 1994
3EN ;
4DQ ;
5 D INIT S:$D(ZTQUEUED) ZTREQ="@" K ZTSK
6 D PROCESS
7 D PRINT
8 D:$D(ZTQUEUED) WRAPUP^LRRP6
9 Q
10INIT ;
11 S:$D(ZTQUEUED) ZTREQ="@" K ZTSK U IO
12 K ^TMP("LR",$J)
13 S LRDAT=$$Y2K^LRX(DT),(LRPAG,LREND)=0
14 S LRV657=$$WKLDNAME^LRCAPU(657)
15 S:'$L(LRV657) LRV657="VENIPUNCTURE -- 657"
16 S LRV658=$$WKLDNAME^LRCAPU(658)
17 S:'$L(LRV658) LRV658="VENIPUNCTURE -- 658"
18 Q
19PROCESS ;
20 I $D(LRDIVSEL) D
21 . S LRDIV=""
22 . F S LRDIV=$O(LRDIVSEL(LRDIV)) Q:LRDIV="" D WKLD
23 I '$D(LRDIVSEL) D
24 . S LRDIV=0
25 . F S LRDIV=$O(^LRO(64.1,LRDIV)) Q:'LRDIV D WKLD
26 Q
27WKLD ;
28 S LRDT=LRSDT
29 F S LRDT=$O(^LRO(64.1,LRDIV,1,LRDT)) Q:('LRDT)!(LRDT>LREDT) D
30 . S LRCPN=0
31 . F S LRCPN=$O(^LRO(64.1,LRDIV,1,LRDT,1,LRCPN)) Q:'LRCPN D
32 . . S LRCAPNAM=$E($$WKLDNAME^LRCAPU(LRCPN),1,60)
33 . . Q:('$L(LRCAPNAM))!('LRCAPNUM)
34 . . S LRCC(LRCAPNAM)=LRCAPNUM
35 . . D TEST
36 . D VENI
37 Q
38TEST ;
39 S LRTST=0
40 F S LRTST=$O(^LRO(64.1,LRDIV,1,LRDT,1,LRCPN,1,LRTST)) Q:'LRTST D
41 . S LRTSTREC=$G(^LRO(64.1,LRDIV,1,LRDT,1,LRCPN,1,LRTST,0))
42 . Q:'$L(LRTSTREC)!($P(LRTSTREC,U,7)'=LRAA)
43 . S LRTN=$P(LRTSTREC,U,2)
44 . S LRTNAM=$P($G(^LAB(60,LRTN,0)),U) Q:'$L(LRTNAM)
45 . S LRTMULT=$S(+$P(LRTSTREC,U,3):+$P(LRTSTREC,U,3),1:1)
46 . S LRAN=$P(LRTSTREC,U,9)
47 . D BMPTOTS
48 Q
49BMPTOTS ;
50 S:'$D(^TMP("LR",$J,"WKLD"))#2 ^("WKLD")=0
51 S ^("WKLD")=^TMP("LR",$J,"WKLD")+LRTMULT
52 S:'$D(^TMP("LR",$J,"WKLD",LRCAPNAM))#2 ^(LRCAPNAM)=0
53 S ^(LRCAPNAM)=^TMP("LR",$J,"WKLD",LRCAPNAM)+LRTMULT
54 S:'$D(^TMP("LR",$J,"TST"))#2 ^("TST")=0
55 S ^("TST")=^TMP("LR",$J,"TST")+LRTMULT
56 S:'$D(^TMP("LR",$J,"TST",LRTNAM))#2 ^(LRTNAM)=0
57 S ^(LRTNAM)=^TMP("LR",$J,"TST",LRTNAM)+LRTMULT
58 S:'$D(^TMP("LR",$J,"WKLD/TST",LRCAPNAM))#2 ^(LRCAPNAM)=0
59 S ^(LRCAPNAM)=^TMP("LR",$J,"WKLD/TST",LRCAPNAM)+LRTMULT
60 S:'$D(^TMP("LR",$J,"WKLD/TST",LRCAPNAM,LRTNAM))#2 ^(LRTNAM)=0
61 S ^(LRTNAM)=^TMP("LR",$J,"WKLD/TST",LRCAPNAM,LRTNAM)+LRTMULT
62 Q
63VENI ; ** VENIPUNCTURE SUMMARY **
64 S LRSUM=+$P($G(^LRO(64.1,LRDIV,1,LRDT,1,657,"S")),U,4)
65 I LRSUM S LRCAPNAM=LRV657 D BMPVENI
66 S LRSUM=+$P($G(^LRO(64.1,LRDIV,1,LRDT,1,658,"S")),U,4)
67 I LRSUM S LRCAPNAM=LRV658 D BMPVENI
68 Q
69BMPVENI ;
70 S:'$D(^TMP("LR",$J,"VENI"))#2 ^("VENI")=0
71 S ^("VENI")=^TMP("LR",$J,"VENI")+LRSUM
72 S:'$D(^TMP("LR",$J,"VENI",LRCAPNAM))#2 ^(LRCAPNAM)=0
73 S ^(LRCAPNAM)=^TMP("LR",$J,"VENI",LRCAPNAM)+LRSUM
74 Q
75PRINT ;
76 W:$E(IOST,1,2)="C-" @IOF
77 S $P(LRDASH,"-",IOM)="",$P(LRSTAR,"*",IOM)=""
78 I '$D(^TMP("LR",$J)) D NOTHING Q
79 D:LRREPTYP="D" DET^LRRP6B3 Q:LREND
80 D COND^LRRP6B2
81 Q
82NOTHING ;
83 S LRPAG=LRPAG+1
84 W LRDASH
85 W !,"Workload Code Summary for ",LRDATRNG
86 W ?62,LRDAT,?72,"PAGE ",$J(LRPAG,3)
87 W !!,LRSTAR
88 W !!?18,"*** NO DATA FOR REPORT OPTIONS SELECTED ***"
89 I $D(LRDIVSEL) D
90 . W !!,"DIVISIONS SELECTED",!,$E(LRDASH,1,18)
91 . S LRDIV=""
92 . F S LRDIV=$O(LRDIVSEL(LRDIV)) Q:LRDIV="" W !,LRDIVSEL(LRDIV)
93 Q
Note: See TracBrowser for help on using the repository browser.