source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRULEN.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1LRULEN ;AVAMC/REG - BYTE COUNT FOR ACCESSIONS ;5/9/91 18:19 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3 W !!?20,"Byte count for accessions"
4 S DIC=68,DIC(0)="AEMOQZ",DIC("S")="I ""SPCYEM""[$P(^(0),U,2)&($P(^(0),U,2)]"""")" D ^DIC K DIC G:Y<1 END S LRAA(1)=$P(Y,U,2),LRAA=+Y,LRSS=$P(Y(0),U,2) D XR^LRU
5 D B^LRU G:Y<0 END
6 S ZTRTN="QUE^LRULEN" D BEG^LRUTL G:POP!($D(ZTSK)) END
7QUE U IO S (C,S)=0,LRSDT=LRSDT-.0001,LRLDT=LRLDT+.9
8 F LRSDT=LRSDT:0 S LRSDT=$O(^LR(LRXR,LRSDT)) Q:'LRSDT!(LRSDT>LRLDT) F LRDFN=0:0 S LRDFN=$O(^LR(LRXR,LRSDT,LRDFN)) Q:'LRDFN F A=0:0 S A=$O(^LR(LRXR,LRSDT,LRDFN,A)) Q:'A D A
9 W !!,"ACCESSIONS: ",S," BYTES: ",C," AVERAGE BYTES/ACCESSION: ",$S(C:C\S,1:0),!,"From ",LRSTR," to ",LRLST
10 D END^LRUTL,END Q
11A S S=S+1,C=C+$L(^LR(LRDFN,LRSS,A,0))
12 I $D(^LR(LRDFN,LRSS,A,2,0)) S C=C+$L(^(0)) F T=0:0 S T=$O(^LR(LRDFN,LRSS,A,2,T)) Q:'T S C=C+$L(^(T,0)) D M
13 Q
14M I $D(^LR(LRDFN,LRSS,A,2,T,2,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,2,M)) Q:'M S C=C+$L(^(M,0)) D E
15 F B=1,3,4 I $D(^LR(LRDFN,LRSS,A,2,T,B,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,B,M)) Q:'M S C=C+$L(^(M,0))
16 I $D(^LR(LRDFN,LRSS,A,2,T,5,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,5,M)) Q:'M S C=C+$L(^(M,0)) I $D(^LR(LRDFN,LRSS,A,2,T,5,M,1,0)) S C=C+$L(^(0)) D N
17 Q
18E I $D(^LR(LRDFN,LRSS,A,2,T,2,M,1,0)) S C=C+$L(^(0)) F E=0:0 S E=$O(^LR(LRDFN,LRSS,A,2,T,2,M,1,E)) Q:'E S C=C+$L(^(E,0))
19 Q
20N F N=0:0 S N=$O(^LR(LRDFN,LRSS,A,2,T,5,M,1,N)) Q:'N S C=C+$L(^(0))
21 Q
22 ;
23END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.