Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRARCR3B

LRARCR3B.m

Go to the documentation of this file.
  1. LRARCR3B ;DALISC/CKA - ARCHIVEDWKLD REP GENERATOR-PRINT 2 ;
  1. ;;5.2;LAB SERVICE;**59**;Aug 31, 1995
  1. EN ;CALLED FROM LRARCR3A
  1. STAT ;
  1. Q:'$D(^TMP("LRAR",$J,"TST/URG"))
  1. D:(LRIOPAT["A")!($L(LRIOPAT)>1) STAT1
  1. D:'LREND STAT2
  1. Q
  1. STAT1 ; Combined patient type totals
  1. S LRPTYP="A"
  1. S LRSUBH1="TOTAL TESTS by 'STAT' URGENCY for ALL PATIENTS: % of GRAND TOTAL"_" ( "_LRSUM_" )"
  1. I $Y+9>IOSL D PAUSE^LRARCR4 Q:LREND W @IOF D HDR1^LRARCR4
  1. W !!!?((80-$L(LRSUBH1))/2),LRSUBH1
  1. W !?((80-$L(LRSUBH1))/2),$E(LRDSH,1,$L(LRSUBH1))
  1. I '$D(^TMP("LRAR",$J,"TST/URG",LRPTYP)) W !!,?30,"NONE FOUND" Q
  1. S LRURG=""
  1. F S LRURG=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG)) Q:(LRURG="")!(LREND) S LRURGCNT=^(LRURG) D
  1. . I $Y+6>IOSL D UP1^LRARCR4 Q:LREND
  1. . W !!,LRURG," =",$J(LRURGCNT,5)," "
  1. . W $J($FN($S(LRSUM:LRURGCNT/LRSUM,1:0)*100,"",2),5)_"%"
  1. . S LRTEST=""
  1. . F I=0:1 S LRTEST=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST)) Q:(LRTEST="")!(LREND) D
  1. . . S X=I#2 W:'X !
  1. . . W ?X*40+1,$E(LRTEST_" ",1,8)," = "
  1. . . W $J(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST),5)," "
  1. . . W $J($FN($S(LRURGCNT:^(LRTEST)/LRURGCNT,1:0)*100,"",2),5)_"%"
  1. . . I X,$Y+6>IOSL D UP1^LRARCR4 Q:LREND
  1. Q
  1. STAT2 ; Individual patient type totals
  1. F LRPTYP="I","O","R" Q:LREND D
  1. . 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_" )"
  1. . I $Y+9>IOSL D PAUSE^LRARCR4 Q:LREND W @IOF D HDR1^LRARCR4
  1. . W !!!?((80-$L(LRSUBH1))/2),LRSUBH1
  1. . W !?((80-$L(LRSUBH1))/2),$E(LRDSH,1,$L(LRSUBH1))
  1. . I '$D(^TMP("LRAR",$J,"TST/URG",LRPTYP)) W !!,?30,"NONE FOUND" Q
  1. . S LRURG=""
  1. . F S LRURG=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG)) Q:(LRURG="")!(LREND) S LRURGCNT=^(LRURG) D
  1. . . I $Y+6>IOSL D UP1^LRARCR4 Q:LREND
  1. . . W !!,LRURG," =",$J(LRURGCNT,5)," "
  1. . . W $J($FN($S(LRSUM:LRURGCNT/LRSUM,1:0)*100,"",2),5)_"%"
  1. . . S LRTEST=""
  1. . . F I=0:1 S LRTEST=$O(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST)) Q:(LRTEST="")!(LREND) D
  1. . . . S X=I#2 W:'X !
  1. . . . W ?X*40+1,$E(LRTEST_" ",1,8)," = "
  1. . . . W $J(^TMP("LRAR",$J,"TST/URG",LRPTYP,LRURG,LRTEST),5)," "
  1. . . . W $J($FN($S(LRURGCNT:^(LRTEST)/LRURGCNT,1:0)*100,"",2),5)_"%"
  1. . . . I X,$Y+6>IOSL D UP1^LRARCR4 Q:LREND
  1. Q