source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACRIT.m@ 1765

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

initial load of FOIAVistA 6/30/08 version

File size: 985 bytes
Line 
1LACRIT ;SLC/RWF - PRINT OUT CRITICAL VALUES AT DATA GATHER TIME ;7/20/90 07:56 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 S Y=$S(DPF=62.3:"Q"_LRDFN,1:"P")
4 F I=1:1:TC Q:'$D(^TMP($J,I)) S X=^(I) D CK
5 Q
6CK S V=@TC(I,1) IF V]"",$L($P(X,U,4,5))>1,(V<$P(X,U,4))!(V>$P(X,U,5)) D TELL
7 IF V]"" S X=$S($D(^TMP($J,Y,I)):^(I),1:""),^(I)=(X+V)_U_($P(X,U,2)+1)
8 Q
9TELL O IO::1 Q:'$T U IO
10 W !,$C(7),"*********************************************************"
11 W !,$C(7)," CRITICAL VALUE ",V," ON TEST ",$P(X,U,1)," FOR ID: ",ID," (",ID,")"
12 W !,$C(7),"*********************************************************"
13 C IO Q
14SET Q
15 Q
16MEAN O IO::1 Q:'$T U IO
17 S J="P" W !!!," AVERAGE PATIENT VALUES" D WR
18 S J="Q" F LX=0:0 S J=$O(^TMP($J,J)) Q:J']"Q" W !!!," AVERAGE ",$S($D(^LAB(62.3,+$P(J,"Q",2),0)):^(0),1:"UNKNOWN")," VALUES" D WR
19 Q
20WR W !,"TEST",?20,"# VALUES",?30,"AVERAGE"
21 F I=1:1:TC W !,$P(^TMP($J,I),U,1),?20 IF $D(^TMP($J,J,I)) S X=^(I),Y=$P(X,U,2) IF Y W Y,?30,$J(X/Y,7,2)
22 Q
Note: See TracBrowser for help on using the repository browser.