source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LARAPMT.m@ 1722

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1LARAPMT ;SLC/DLG - RAPIMAT URINE PAD ROUTINE ;7/20/90 10:04 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3LA1 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
4 Q:'$D(^LA(TSK,"I",0))
5 S MISCREEN="MICROSCOPIC EXAMINATION NOT INDICATED"
6 K LATOP D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP") S:'$D(LALCT) LALCT="" Q:LALCT="N"
7LA2 K TV,TY,Y,MICFLAG S TOUT=0,A=1,RMK="" D IN G QUIT:TOUT D QC
8 S (TOUT,BAD)=0
9 S V=+$E(IN,2,11) D NUM S (ID,IDE,CUP)=V,TRAY=1
10 F A=2:1 D IN Q:+$E(IN,2,11)'=CUP D QC
11X S ^LA(TSK,"I",0)=CNT-1 F A=0:0 S A=$O(Y(A)) Q:A<1!(A>80) S X=Y(A) X TC(A,2) S:$D(V) @TC(A,1)=V
12LA3 X LAGEN G LA2:'ISQN
13 F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
14 I $D(MICFLAG)=0 S RMK=MISCREEN
15 I $D(RMK),$L(RMK) D RMK^LASET
16 G LA2
17QC ;QC TESTING HERE; S BAD=1 IF DONT STORE
18 S V=$E(IN,33,34) D NUM S TN=V,V=$E(IN,41,55) D NUM,RNUM S Y(TN)=V Q
19 ;S Y(A)=IN Q
20NUM S X="" F JJ=1:1:$L(V) S:$A(V,JJ)>32 X=X_$E(V,JJ)
21 S V=X Q
22IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1,IN="" Q:TOUT>9 H 5 G IN
23 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0 G IN:$E(IN,1)'="D" G IN:+$E(IN,2,11)<1
24 Q
25QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP("LA",$J)
26 Q
27TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
28RNUM ;PUT TOGETHER EXPONENT AND VALUE OF TEST DCN/BUF 31 AUG 87
29 I $P(V,"E",2)=0 Q
30 S EXP=$P(V,"E",2),FACTOR=$S(EXP="01":10,EXP="02":100,EXP="03":1000,EXP="-01":.1,EXP="-02":.01,1:1)
31 S V=V*FACTOR Q
32COLOR ;THIS AREA SETS THE VALUES FOR URINE COLOR
33 S V=$S(X=1:"COLORLESS",X=2:"STRAW",X=3:"YELLOW",X=4:"AMBER",X=5:"BROWN",X=6:"ORANGE",X=7:"RED",X=8:"BLUE",X=9:"BLACK",X=10:"OTHER",1:"") Q
34APPEAR ;THIS AREA SETS THE VALUE FOR URINE APPEARANCE
35 S V=$S(X=1:"CLEAR",X=2:"HAZY",X=3:"SL. CLOUDY",X=4:"CLOUDY",X=5:"TURBID",X=6:"FLOCCULATED",X=7:"MILKY",X=8:"MUCOID",X=9:"OTHER",1:"") S:V'="CLEAR" MICFLAG=1 Q
36MICRO ;THIS SECTION IS USED TO DETERMINE MICROSCOPIC VALUES
37 S V=$S(X=0:"",X=9:"NONE",X=10:"1+",X=11:"2+",X=12:"3+",X=13:"4+",X<9:"RANGE",1:"")
38 I A=17 S V=$S(X=1:"0-2",X=2:"3-10",X=3:"11-20",X=4:"21-50",X=5:">50",1:"")
39 I A=18 S V=$S(X=1:"0-5",X=2:"6-10",X=3:"11-20",X=4:"21-50",X=5:">50",1:"")
40 I A=19 S V=$S(X=10:"0-2",X=11:"3-10",X=12:"11-25",X=13:">26",1:"")
41 I (A>30)&(A<55) S V=$S(X=10:"0-2",X=11:"3-10",X=12:"11-25",X=13:">26",1:"")
Note: See TracBrowser for help on using the repository browser.