24 lines
1.1 KiB
Mathematica
24 lines
1.1 KiB
Mathematica
|
LRNORMAL ;SLC/RWF - TO RETURN TEST NORMALS ;2/6/91 08:54 ;
|
||
|
;;5.2;LAB SERVICE;;Sep 27, 1994
|
||
|
L Q:'$D(LRTST) S U="^",LRLN=0,LRTOP=$S($D(LRTOP):LRTOP,1:LRSERUM)
|
||
|
F LRLI=1:1 S LRLLT=$P(LRTST,U,LRLI) Q:LRLLT="" D LR1
|
||
|
Q
|
||
|
LR1 IF +LRLLT'=LRLLT S LRLLT=$O(^LAB(60,"B",LRLLT,0))
|
||
|
Q:'$D(^LAB(60,LRLLT,0)) S LRLN=LRLN+1,LRLNM=$P(^(.1),U,1)
|
||
|
S X=$P(^LAB(60,LRLLT,0),U,5) IF $D(LRLOC) S LRLL(LRLI)=X
|
||
|
Q:X="" S X=$O(^LAB(60,"C",X,0)) Q:'$D(^LAB(60,X,1,LRTOP,0))
|
||
|
IF $D(LRUTLITY) S ^TMP($J,LRLI)=LRLNM_"^"_$P(^LAB(60,X,1,LRTOP,0),U,2,99) Q
|
||
|
S LRLN(LRLI)=LRLNM_"^"_$P(^LAB(60,X,1,LRTOP,0),U,2,99) Q
|
||
|
LOHI 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:""""""))
|
||
|
Q
|
||
|
LOC ;from LRGVG1
|
||
|
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:"""")"
|
||
|
Q
|
||
|
GET ;from LRGVG1
|
||
|
D L,LOHI Q
|
||
|
SERUM S LRTOP=LRSERUM D L,LOHI Q
|
||
|
BLOOD S LRTOP=LRBLOOD D L,LOHI Q
|
||
|
URINE S LRTOP=LRURINE D L,LOHI Q
|
||
|
;CALL WITH LRTST A LIST OF TEST NUMBERS, LRTOP SPEC TYPE
|
||
|
;LRLOC IF WANT DATA LOCATION
|