source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRCAPAM8.m@ 691

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1LRCAPAM8 ;DALISC/J0 - RCS 14-4 REPORT LMIP PAGE PRINT ;5/10/93
2 ;;5.2;LAB SERVICE;**201**;Sep 27, 1994
3EN ;
4PRNTSUM ;
5 N LRDSHS,LRHDR
6 S $P(LRDSHS,"-",245)="-"
7 S LRMT=0,LRPRD=$TR($$FMTE^XLFDT($$NOW^XLFDT,"1M"),"@"," ")
8 F S LRMT=$O(^TMP($J,"LMIP",LRMT)) Q:LRMT<1 S LRMTP=$$FMTE^XLFDT(LRMT,"1D") D Q:$G(LR("Q"))
9 .W !,"LMIP REPORT printed ",LRPRD
10 .W !,LRHD0
11 .W ?((132-($L(LRMTP)+$L($P(LRDA,U,2)))\2)),$P(LRDA,U,2)_" "_LRMTP
12 .S LRPG=LRPG+1 W ?122,"Page ",LRPG,!
13 .S LRHDR="Pathology Laboratory Medicine Service Workload Summary"
14 .W !!,?(132-$L(LRHDR)\2),LRHDR,!
15 .W !!,"LINE SECTION",?28,"In-patient",?40,"Out-patient"
16 .W ?53,"Non-patient",?70,"Total",?77,"Quality",?87,"Total"
17 .W ?99,"Referred",?113,"Tests",!
18 .W "No.",?30,"Tests",?43,"Tests",?54,"""Other"""
19 .W ?70,"Tests",?77,"Control",?86,"On-site",?101,"Tests"
20 .W ?111,"Performed",?124,"Stat",!
21 .W ?55,"Tests",?67,"(Orderable)",?87,"Tests"
22 .W ?98,"(Send Outs)",?112,"On-site",?124,"Tests",!
23 .W $E(LRDSHS,1,132),!
24 .W "LMIP Data Number",?28," #5 ",?40," #6 "
25 .W ?53," #7 ",?66," #1 ",?86," #2 "
26 .W ?95," #4 ",?111," #3 ",?122," #8 ",!
27 .W $E(LRDSHS,1,132),!
28 .D PRNTNAM
29SUP ;
30 D ^LRCAPAM9
31 Q
32PRNTNAM ;
33 N LRRCNT,LRREC,LRLARE
34 S LRRCNT=0
35 W !,"Anatomic Pathology Division",!,$E(LRDSHS,1,27),!
36 S LRLARE=0
37 F S LRLARE=$O(^TMP($J,"LMIP",LRMT,"AP",LRLARE)) Q:LRLARE="" D
38 .S LRREC=$G(^TMP($J,"LMIP",LRMT,"AP",LRLARE))
39 .S LRRCNT=LRRCNT+1
40 .W LRRCNT,?6,LRLARE
41 .D PRNTREC
42 .W !
43 ;Write AP subtotals
44 S LRLARE="AP subtotal"
45 S LRREC=$G(^TMP($J,"LMIP",LRMT,"AP",0))
46 W ?6,LRLARE
47 D PRNTREC
48 ;
49 W !!,"Clinical Pathology Division",!,$E(LRDSHS,1,27),!
50 S LRLARE=0
51 F S LRLARE=$O(^TMP($J,"LMIP",LRMT,"CP",LRLARE)) Q:LRLARE="" D
52 .S LRREC=$G(^TMP($J,"LMIP",LRMT,"CP",LRLARE))
53 .S LRRCNT=LRRCNT+1
54 .W LRRCNT,?6,LRLARE
55 .D PRNTREC
56 .W !
57 ;Write CP subtotals
58 S LRLARE="CP subtotal"
59 S LRREC=$G(^TMP($J,"LMIP",LRMT,"CP",0))
60 W ?6,LRLARE
61 D PRNTREC
62 ;Write grand totals
63 W !
64 W $E(LRDSHS,1,132),!
65 S LRRCNT=LRRCNT+1,LRLARE="GRAND TOTAL"
66 D EDIT1
67 S LRREC=$G(^TMP($J,"LMIP",LRMT,"TOT-AP/CP"))
68 W ?6,LRLARE
69 D PRNTREC
70 I $E(IOST,1,2)="C-" D M^LRU Q:$G(LR("Q"))
71 W @IOF
72 Q
73PRNTREC ;
74 W ?28,$J($P(LRREC,U),10),?40,$J($P(LRREC,U,2),11)
75 W ?53,$J($P(LRREC,U,3),11),?66,$J($P(LRREC,U,4),9)
76 W ?77,$J($P(LRREC,U,5),7),?86,$J($P(LRREC,U,6),7)
77 W ?95,$J($P(LRREC,U,7),14),?111,$J($P(LRREC,U,8),9)
78 W ?122,$J($P(LRREC,U,9),7),!
79 Q
80EDIT1 ;
81 N I,LRAPSUB,LRCAPSUB,LRGTOT
82 S LRAPSUB=$G(^TMP($J,"LMIP",LRMT,"AP",0))
83 S LRCPSUB=$G(^TMP($J,"LMIP",LRMT,"CP",0))
84 F I=1:1:9 D
85 . S LRGTOT=$P(LRAPSUB,U,I)+$P(LRCPSUB,U,I)
86 . S $P(^TMP($J,"LMIP",LRMT,"TOT-AP/CP"),U,I)=LRGTOT
87 Q
Note: See TracBrowser for help on using the repository browser.