source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRARCAM6.m@ 1306

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1LRARCAM6 ;DALISC/CKA - ARCHIVED RCS 14-4 REPORT PART 2
2 ;;5.2;LAB SERVICE;**59**;Aug 31, 1995
3 ;same as LRCAPAM6 except archived wkld file
4EN ;
5 S (LR("Q"),LRPG)=0
6 D:(LRRTYP=1)!(LRRTYP=3) CDR Q:$G(LR("Q"))
7 D:$G(LRRTYP)=2 PRNTSUM^LRARCAM8
8 Q
9CDR ;
10 S (LRTOT,LRMT)=0,LRFIRST=1
11 F S LRMT=$O(^TMP($J,"RCS14-4",LRMT)) Q:LRMT<1!($G(LR("Q"))) I $D(^(LRMT,3))#2 S LRTOT=LRTOT+$G(^(3))
12 S LRMT=0 F S LRMT=$O(^TMP($J,"RCS14-4",LRMT)) Q:LRMT<1!($G(LR("Q"))) S LRMTP=$$DTF^LRAFUNC1(LRMT) D Q:$G(LR("Q")) D:$G(LRRPT)=1 DETAIL Q:$G(LR("Q"))
13 .S N0=^TMP($J,"RCS14-4",LRMT,0),LRGTOT=0 F I=2,3,4,9 S LRGTOT=LRGTOT+$P(N0,U,I)
14 .D HEAD Q:$G(LR("Q"))
15 .S LRLINE="PTF Treating Specialty" W !!?(IOM-$L(LRLINE)\2),LRLINE,!!
16 .S LRTRE=5 F S LRTRE=$O(^TMP($J,"RCS14-4",LRMT,LRTRE)) Q:LRTRE="" S LRTRET=^(LRTRE) W !?10,LRTRE," = ",LRTRET,?60,$J(($S(LRTOT:LRTRET/LRTOT,1:0)*100),8,1)_" %"
17 .D HEAD Q:$G(LR("Q")) S LRLINE="Service Listing" W !!?(IOM-$L(LRLINE)\2),LRLINE,!!
18 .S LRTRE="" F S LRTRE=$O(^TMP($J,"RCS14-4",LRMT,3,LRTRE)) Q:LRTRE=""!($G(LR("Q"))) S LRTRET=^(LRTRE) W !?15,LRTRE," = ",LRTRET,?60,$J(($S(LRTOT:LRTRET/LRTOT,1:0)*100),8,1)_" %"
19 .D HEAD Q:$G(LR("Q")) S LRLINE="Billing Bed Section" W !!?(IOM-$L(LRLINE)\2),LRLINE,!!
20 .S LRTRE="" F S LRTRE=$O(^TMP($J,"RCS14-4",LRMT,5,LRTRE)) Q:LRTRE=""!($G(LR("Q"))) S LRTRET=^(LRTRE) W !?20,LRTRE," = ",LRTRET,?60,$J(($S(LRTOT:LRTRET/LRTOT,1:0)*100),8,1)_" %"
21 .W !
22 I $E(IOST)="C-",'$G(LR("Q")) D M^LRU Q:$G(LR("Q"))
23 W @IOF
24 Q
25DETAIL ;
26 S LRCAP="" F S LRCAP=$O(^TMP($J,"RCS14-4",LRMT,1,LRCAP)) Q:LRCAP=""!($G(LR("Q"))) I $D(^(LRCAP,0))#2 S LRCAPT=^(0) D
27 .Q:$G(LR("Q")) S LRCAPTOT=0 F I=2,3,4,9 S LRCAPTOT=LRCAPTOT+$P(LRCAPT,U,I)
28 .D:(IOSL-$Y)<6 HEAD Q:$G(LR("Q")) W !!,LRCAP," CNT = ",LRCAPTOT
29 .S LRTRE1=0 F S LRTRE1=$O(^TMP($J,"RCS14-4",LRMT,1,LRCAP,LRTRE1)) Q:LRTRE1=""!($G(LR("Q"))) S LRTRE1T=^(LRTRE1) D W !?5,LRTRE1,?45,LRTRE1T,?55,$J(($S(LRCAPTOT:LRTRE1T/LRCAPTOT,1:0)*100),8,1)_" %"
30 ..Q:$G(LR("Q")) Q:(IOSL-$Y)>4 D HEAD Q:$G(LR("Q")) W !!?14,LRCAP," CNT = ",LRCAPTOT
31 W !!
32 Q
33HEAD ;
34 I $E(IOST)="C" D M^LRU Q:$G(LR("Q"))
35 W:('LRFIRST)!($E(IOST)="C") @IOF
36 S:LRFIRST LRFIRST=0
37 S LRLINE=" Total Count for Report = "
38 W !,"ARCHIVED RCS-CDR/LMIP REPORT"
39 W !,LRHD0
40 W ?((IOM-($L(LRMTP)+$L($P(LRDA,U,2)))\2)),$P(LRDA,U,2)_" "_LRMTP
41 S LRPG=LRPG+1 W ?(IOM-10),"Page ",LRPG
42 W !!?(IOM-$L(LRLINE)\2),LRLINE,LRTOT,!
43 Q:'$G(LRERR) W !,LRERR_" Errors were found in Data Base "
44 W !,"Review Detail Report for Specifics",!!
45 Q
Note: See TracBrowser for help on using the repository browser.