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

LRAC5.m

Go to the documentation of this file.
LRAC5 ;SLC/DCM - PRINT CUMULATIVE REPORT ; 12/23/87  11:13 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
TS2 S LRCW=$P(^LAB(64.5,1,1,LRMH,1,LRSH,1,I(I),0),U,2) Q:(IOM-LRCL)<LRCW  S LRCL=LRCL+LRCW,A=$L($P(^LAB(64.5,"A",1,LRMH,LRSH,I(I)),U,7))\2,B=LRCW\2 W $J($P(^(I(I)),U,7),(A+B)),?LRCL S LRFALT=0
 Q
TS1 F I=J:1:LRJS I $D(I(I)) S LRCW=$P(^LAB(64.5,1,1,LRMH,1,LRSH,1,I(I),0),U,2),LRCL=LRCL+LRCW D LRLO^LRAC9 S A=$L(LRLOHI)\2,B=LRCW\2 W $J(LRLOHI,(A+B)),?LRCL
 Q
TS ;from LRAC3
 I LRACT'=0 D EQUALS^LRX
 K I S I=0,LRII=0 F  S LRII=$O(^LAB(64.5,1,1,LRMH,1,LRSH,1,LRII)) Q:LRII<1  S I=I+1,I(I)=LRII
 S LRFALT=0,LRCTR=0,LRACT=LRACT+1,J=LRJS+1,LRCL=$S($D(LRCALE(LRMH,LRSH)):24,1:20)
 I J'>LRSHD W !! W:$D(LRCALE(LRMH,LRSH)) "Locale  " W LRTOPP,?LRCL
 F I=J:1:LRSHD I $D(I(I)) S Z=^LAB(64.5,1,1,LRMH,1,LRSH,1,I(I),0),LRCW=$P(Z,U,2) Q:(IOM-LRCL)<LRCW  S LRCL=LRCL+LRCW,A=$L($P(Z,U,3))\2,B=LRCW\2 W $J($E($P(Z,U,3),1,(LRCW-1)),(A+B)),?LRCL
 S LRJS=(I-1) S:LRACT=LRPL LRJS=LRJS+1
 F I=J:1:LRJS I $D(I(I)) Q:'$D(^LAB(64.5,"A",1,LRMH,LRSH,I(I)))  S Z=^(I(I)) S:$L($P(Z,U,2))!$L($P(Z,U,11)) LRFALT=1
 S LRCL=$S($D(LRCALE(LRMH,LRSH)):24,1:20)
 I LRFALT W ! W:$D(LRCALE(LRMH,LRSH)) ?8 W $S($L($P(^LAB(64.5,"A",1,LRMH,LRSH,I(J)),U,11)):"Therapeutic",1:"Ref range"),?LRCL D TS1
 F I=J:1:LRJS I $D(I(I)) Q:'$D(^LAB(64.5,"A",1,LRMH,LRSH,I(I)))  S:$L($P(^(I(I)),U,7)) LRFALT=1
 I LRFALT S LRCL=$S($D(LRCALE(LRMH,LRSH)):24,1:20) W !?LRCL F I=J:1:LRJS I $D(I(I)) D TS2
 S LRFALT=0 D DASH^LRX
LRFDT K A,B S:LRNP LRFFDT=LRFDT,LRNP=0 S LRFDT=$O(^LAC(LRXLR,LRDFN,1,LRMH,1,LRSH,1,LRFDT)) G:LRFDT<1 LOOP^LRAC3 S Z1=^(LRFDT,0)
 S LRTLOC=$P(Z1,U,2),^TMP($J,"K",LRSH,LRFDT,0)=LRSH_U_$P(Z1,U,1)_U_$P(Z1,U,5) S:LRFDT>LRLFDT LRLFDT=LRFDT
 I $D(DUZ("AG")),$L(DUZ("AG")),"ARMYAFN"[DUZ("AG"),LRDPF=2 D REG^LRAC9
GOUT D QRS^LRAC9 I LRCTR>LRLNS&(LRACT'<LRPL) S LRFULL=1 D TXT1^LRAC9 G:$O(^LAC(LRXLR,LRDFN,1,LRMH,1,LRSH,1,LRLFDT))<1 LRSH^LRAC3 D HEAD1^LRAC6,HEAD^LRAC6,LRLNS^LRAC3 S LRFULL=0,LRFDT=LRLFDT G TS
 I LRCTR>LRLNS&(LRACT<LRPL) S LRFDT=LRFFDT G TS
 G LRFDT