source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRCAPAM6.m@ 1679

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

initial load of FOIAVistA 6/30/08 version

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