source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRMIXR3.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1LRMIXR3 ;SLC/BA - ANTIBIOTIC INTERPRETATION ^LAB(62.06,"AI", X-REF ; 4/4/87 21:05 ;
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3ALT ;sets "AI" x-ref alternate interpretation when ALTERNATE INTERPRETATION, ORGANISM (INTRP), or SPECIMEN (INTRP) is entered
4 S K0=DA(2),K1=DA(1),K2=DA,J4=X I $L($P(^LAB(62.06,K0,0),U,2)) S J0=$P(^(0),U,2),J1=$P(^LAB(62.06,K0,1,K1,0),U) I $D(^LAB(62.06,K0,1,K1,2,K2,0)),$L($P(^(0),U,2)),$L($P(^(0),U,3)) S J2=$P(^(0),U,2),J3=$P(^(0),U,3) D SETUP
5 K J0,J1,J2,J3,J4,J9,K0,K1,K2
6 Q
7ALTO ;sets "AI" x-ref alternate interpretation when ORGANISM (INTRP) is entered
8 S K0=DA(2),K1=DA(1),K2=DA,J2=X I $L($P(^LAB(62.06,K0,0),U,2)) S J0=$P(^(0),U,2),J1=$P(^LAB(62.06,K0,1,K1,0),U) I $D(^LAB(62.06,K0,1,K1,2,K2,0)),$L($P(^(0),U,3)) S J3=$P(^(0),U,3),J4=$P(^(0),U) D SETUP
9 K J0,J1,J2,J3,J4,K0,K1,K2
10 Q
11ALTS ;sets "AI" x-ref alternate interpretation when SPECIMEN (INTRP) is entered
12 S K0=DA(2),K1=DA(1),K2=DA,J3=X I $L($P(^LAB(62.06,K0,0),U,2)) S J0=$P(^(0),U,2),J1=$P(^LAB(62.06,K0,1,K1,0),U) I $D(^LAB(62.06,K0,1,K1,2,K2,0)),$L($P(^(0),U,2)) S J2=$P(^(0),U,2),J4=$P(^(0),U) D SETUP
13 K J0,J1,J2,J3,J4,K0,K1,K2
14 Q
15KALT ;kills "AI" x-ref alternate interpretation when ALTERNATE INTERPRETATION, ORGANISM (INTRP), or SPECIMEN (INTRP) are deleted
16 I $L($P(^LAB(62.06,DA(2),0),U,2)) S J0=$P(^(0),U,2),J1=$P(^LAB(62.06,DA(2),1,DA(1),0),U) I $L($P(^LAB(62.06,DA(2),1,DA(1),2,DA,0),U,2)),$L($P(^(0),U,3)) S J2=$P(^(0),U,2),J3=$P(^(0),U,3) D SWITCH K ^LAB(62.06,"AI",J0,J1,J2,J3)
17 K J0,J1,J2,J3
18 Q
19BUGNODE ;sets "AI" x-ref when entering BUG NODE
20 S K0=DA,J0=+X,^LAB(62.06,"AI",J0)=K0_U_$P(^LAB(62.06,K0,0),U,5)
21 S K1=0 F I=0:0 S K1=+$O(^LAB(62.06,K0,1,K1)) Q:K1<1 I $D(^(K1,0)),$L($P(^(0),U)) S J1=$P(^(0),U),^LAB(62.06,"AI",+X,J1)=$P(^(0),U,2) D RESULT
22 K K0,K1,K2,J0,J1,J2,J3,J9
23 Q
24RESULT S K2=0 F I=0:0 S K2=+$O(^LAB(62.06,K0,1,K1,2,K2)) Q:K2<1 I $D(^(K2,0)),$L($P(^(0),U,2)),$L($P(^(0),U,3)) S J2=$P(^(0),U,2),J3=$P(^(0),U,3),J4=$P(^(0),U) D SETUP
25 Q
26SETUP D SWITCH S ^LAB(62.06,"AI",J0,J1,J2,J3)=J4
27 Q
28SWITCH S J9=$P(^LAB(61.2,J2,0),U),J2=$S(J9["UNKNOWN":"ANY",J9["GRAM POS":"GRAM POS",J9["GRAM NEG":"GRAM NEG",1:J2),J9=$P(^LAB(61,J3,0),U),J3=$S(J9["UNKNOWN":"ANY",1:J3)
29 Q
Note: See TracBrowser for help on using the repository browser.