source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRNORMAL.m@ 1789

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

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1LRNORMAL ;SLC/RWF - TO RETURN TEST NORMALS ;2/6/91 08:54 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3L Q:'$D(LRTST) S U="^",LRLN=0,LRTOP=$S($D(LRTOP):LRTOP,1:LRSERUM)
4 F LRLI=1:1 S LRLLT=$P(LRTST,U,LRLI) Q:LRLLT="" D LR1
5 Q
6LR1 IF +LRLLT'=LRLLT S LRLLT=$O(^LAB(60,"B",LRLLT,0))
7 Q:'$D(^LAB(60,LRLLT,0)) S LRLN=LRLN+1,LRLNM=$P(^(.1),U,1)
8 S X=$P(^LAB(60,LRLLT,0),U,5) IF $D(LRLOC) S LRLL(LRLI)=X
9 Q:X="" S X=$O(^LAB(60,"C",X,0)) Q:'$D(^LAB(60,X,1,LRTOP,0))
10 IF $D(LRUTLITY) S ^TMP($J,LRLI)=LRLNM_"^"_$P(^LAB(60,X,1,LRTOP,0),U,2,99) Q
11 S LRLN(LRLI)=LRLNM_"^"_$P(^LAB(60,X,1,LRTOP,0),U,2,99) Q
12LOHI S SEX=$S($D(SEX):SEX,1:"M"),LRLI=0 F S LRLI=$O(LRLN(LRLI)) Q:LRLI<1 S %=$P(LRLN(LRLI),U,2),%=$S($L(%):%,1:""""""),@("%="_%),LRLO(LRLI)=%,@("LRHI("_LRLI_")="_$S($L($P(LRLN(LRLI),U,3)):$P(LRLN(LRLI),U,3),1:""""""))
13 Q
14LOC ;from LRGVG1
15 F I=1:1:LRLN S X=LRLL(I),LRLL(I)="$S($D(^("_$P(X,";",2)_")):$P(^("_$P(X,";",2)_"),U,"_$P(X,";",3)_"),1:"""")"
16 Q
17GET ;from LRGVG1
18 D L,LOHI Q
19SERUM S LRTOP=LRSERUM D L,LOHI Q
20BLOOD S LRTOP=LRBLOOD D L,LOHI Q
21URINE S LRTOP=LRURINE D L,LOHI Q
22 ;CALL WITH LRTST A LIST OF TEST NUMBERS, LRTOP SPEC TYPE
23 ;LRLOC IF WANT DATA LOCATION
Note: See TracBrowser for help on using the repository browser.