source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRARCR3B.m@ 861

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1LRARCR3B ;DALISC/CKA - ARCHIVEDWKLD REP GENERATOR-PRINT 2 ;
2 ;;5.2;LAB SERVICE;**59**;Aug 31, 1995
3EN ;CALLED FROM LRARCR3A
4STAT ;
5 Q:'$D(^TMP("LRAR",$J,"TST/URG"))
6 D:(LRIOPAT["A")!($L(LRIOPAT)>1) STAT1
7 D:'LREND STAT2
8 Q
9STAT1 ; Combined patient type totals
10 S LRPTYP="A"
11 S LRSUBH1="TOTAL TESTS by 'STAT' URGENCY for ALL PATIENTS: % of GRAND TOTAL"_" ( "_LRSUM_" )"
12 I $Y+9>IOSL D PAUSE^LRARCR4 Q:LREND W @IOF D HDR1^LRARCR4
13 W !!!?((80-$L(LRSUBH1))/2),LRSUBH1
14 W !?((80-$L(LRSUBH1))/2),$E(LRDSH,1,$L(LRSUBH1))
15 I '$D(^TMP("LRAR",$J,"TST/URG",LRPTYP)) W !!,?30,"NONE FOUND" Q
16 S LRURG=""
17 F S LRURG=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG)) Q:(LRURG="")!(LREND) S LRURGCNT=^(LRURG) D
18 . I $Y+6>IOSL D UP1^LRARCR4 Q:LREND
19 . W !!,LRURG," =",$J(LRURGCNT,5)," "
20 . W $J($FN($S(LRSUM:LRURGCNT/LRSUM,1:0)*100,"",2),5)_"%"
21 . S LRTEST=""
22 . F I=0:1 S LRTEST=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST)) Q:(LRTEST="")!(LREND) D
23 . . S X=I#2 W:'X !
24 . . W ?X*40+1,$E(LRTEST_" ",1,8)," = "
25 . . W $J(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST),5)," "
26 . . W $J($FN($S(LRURGCNT:^(LRTEST)/LRURGCNT,1:0)*100,"",2),5)_"%"
27 . . I X,$Y+6>IOSL D UP1^LRARCR4 Q:LREND
28 Q
29STAT2 ; Individual patient type totals
30 F LRPTYP="I","O","R" Q:LREND D
31 . S LRSUBH1="TOTAL TESTS by 'STAT' URGENCY for "_$S(LRPTYP="I":"INPATIENTS",LRPTYP="O":"OUTPATIENTS",LRPTYP="R":"OTHER PATIENTS",1:"UNKNOWN PATIENTS")_": % of GRAND TOTAL"_" ( "_LRSUM_" )"
32 . I $Y+9>IOSL D PAUSE^LRARCR4 Q:LREND W @IOF D HDR1^LRARCR4
33 . W !!!?((80-$L(LRSUBH1))/2),LRSUBH1
34 . W !?((80-$L(LRSUBH1))/2),$E(LRDSH,1,$L(LRSUBH1))
35 . I '$D(^TMP("LRAR",$J,"TST/URG",LRPTYP)) W !!,?30,"NONE FOUND" Q
36 . S LRURG=""
37 . F S LRURG=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG)) Q:(LRURG="")!(LREND) S LRURGCNT=^(LRURG) D
38 . . I $Y+6>IOSL D UP1^LRARCR4 Q:LREND
39 . . W !!,LRURG," =",$J(LRURGCNT,5)," "
40 . . W $J($FN($S(LRSUM:LRURGCNT/LRSUM,1:0)*100,"",2),5)_"%"
41 . . S LRTEST=""
42 . . F I=0:1 S LRTEST=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST)) Q:(LRTEST="")!(LREND) D
43 . . . S X=I#2 W:'X !
44 . . . W ?X*40+1,$E(LRTEST_" ",1,8)," = "
45 . . . W $J(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST),5)," "
46 . . . W $J($FN($S(LRURGCNT:^(LRTEST)/LRURGCNT,1:0)*100,"",2),5)_"%"
47 . . . I X,$Y+6>IOSL D UP1^LRARCR4 Q:LREND
48 Q
Note: See TracBrowser for help on using the repository browser.