source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7UTL1B.m@ 1683

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

initial load of FOIAVistA 6/30/08 version

File size: 6.0 KB
Line 
1LA7UTL1B ;HOIFO/BH - Microbilogy Antibiotics & and Output global arragment ; 3/11/03 10:45am
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**69**;Sep 27, 1994
3 ;
4 ; Pass back field name of Organism Antibiotic field. If the Antibiotic
5 ; field node is lonnger than six characters it is site specific and
6 ; is not returned.
7 ;
8DECODE(VAL) ;
9 N STR,MVAL,M1VAL
10 S STR=""
11 I $E(VAL,1,4)'="2.00" Q ""
12 I 'VAL Q ""
13 I $L(VAL)>6 Q ""
14 S VAL=$P(VAL,".",2)
15 I $L(VAL)=3 D
16 . S MVAL=+VAL
17 . S STR=$P($T(MCODE+MVAL),";;",2)
18 I $L(VAL)=4 D
19 . S M1VAL=+VAL
20 . S STR=$P($T(MCODE1+M1VAL),";;",2)
21 Q STR
22 ;
23MCODE ;
24 ;;2.001^50~CEFAZOLIN^50.1~CEFAZOLIN INTERP^50.2~CEFAZOLIN SCREEN
25 ;;2.002^145~PIPERACILLIN^145.1~PIPERACILLIN INTERP^145.2~PIPERACILLIN SCREEN
26 ;;2.003^150~OXACILLIN^150.1~OXACILLIN INTERP^150.2~OXACILLIN SCREEN
27 ;;2.004^160~TRIMETHOPRIM^160.1~TRIMETHOPRIM INTERP^160.2~TRIMETHOPRIM SCREEN
28 ;
29 ;
30MCODE1 ;
31 ;;2.0001^5~NEOMYCIN^5.1~NEOMYCIN INTERP^5.2~NEOMYCIN SCREEN
32 ;;2.0002^10~BACITRACIN^10.1~BACITRACIN INTERP^10.2~BACITRACIN SCREEN
33 ;;2.0003^15~PENICILLIN^15.1~PENICILLIN INTERP^15.2~PENICILLIN SCREEN
34 ;;2.0004^20~CLINDAMYCIN^20.1~CLINDAMYCIN INTERP^20.2~CLINDAMYCIN SCREEN
35 ;;2.0005^25~METHICILLIN^25.1~METHICILLIN INTERP^25.2~METHICILLIN SCREEN
36 ;;2.0006^30~VANCOMYCIN^30.1~VANCOMYCIN INTERP^30.2~VANCOMYCIN SCREEN
37 ;;2.0007^35~GENTAMICIN^35.1~GENTAMICIN INTERP^35.2~GENTAMICIN SCREEN
38 ;;2.0008^40~CHLORAMPHENICOL^40.1~CHLORAMPHENICOL INTERP^40.2~CHLORAMPHENICOL SCREEN
39 ;;2.0009^45~KANAMYCIN^45.1~KANAMYCIN INTERP^45.2~KANAMYCIN SCREEN
40 ;;
41 ;;2.0011^55~TETRACYCLINE^55.1~TETRACYCLINE INTERP^55.2~TETRACYCLINE SCREEN
42 ;;2.0012^60~AMPICILLIN^60.1~AMPICILLIN INTERP^60.2~AMPICILLIN SCREEN
43 ;;2.0013^65~CARBENICILLIN^65.1~CARBENICILLIN INTERP^65.2~CARBENICILLIN SCREEN
44 ;;2.0014^70~TOBRAMYCIN^70.1~TOBRAMYCIN INTERP^70.2~TOBRAMYCIN SCREEN
45 ;;2.0015^75~TRIMETHAPRIM/SULFAMETHOXAZOLE^75.1~TRIMETHAPRIM/SULFA INTERP^75.2~TRIMETHAPRIM/SULFA SCREEN
46 ;;2.0016^80~AMIKACIN^80.1~AMIKACIN INTERP^80.2~AMIKACIN SCREEN
47 ;;2.0017^85~CEFAMANDOLE^85.1~CEFAMANDOLE INTERP^85.2~CEFAMANDOLE SCREEN
48 ;;2.0018^90~CEFOXITIN^90.1~CEFOXITIN INTERP^90.2~CEFOXITIN SCREEN
49 ;;2.0019^110~ERYTHROMYCIN^110.1~ERYTHROMYCIN INTERP^110.2~ERYTHROMYCIN SCREEN
50 ;;
51 ;;2.0021^95~CEFOTAXIME^95.1~CEFOTAXIME INTERP^95.2~CEFOTAXIME SCREEN
52 ;;2.0022^100~NITROFURANTOIN^100.1~NITROFURANTOIN NTERP^100.2~NITROFURANTOIN SCREEN
53 ;;2.0023^105~POLYMYXIN B^105.1~POLYMYXIN B INTERP^105.2~POLYMYXIN B SCREEN
54 ;;2.0024^115~RIFAMPIN^115.1~RIFAMPIN INTERP^115.2~RIFAMPIN SCREEN
55 ;;2.0025^120~NOVOBIOCIN^120.1~NOVOBIOCIN INTERP^120.2~NOVOBIOCIN SCREEN
56 ;;2.0026^125~CEFOPERAZONE^125.1~CEFOPERAZONE INTERP^125.2~CEFOPERAZONE SCREEN
57 ;;2.0027^130~MEZLOCILLIN^130.1~MEZLOCILLIN INTERP^130.2~MEZLOCILLIN SCREEN
58 ;;2.0028^135~MOXALACTAM^135.1~MOXALACTAM INTERP^135.2~MOXALACTAM SCREEN
59 ;;2.0029^140~NETILMICIN^140.1~NETILMICIN INTERP^140.2~NETILMICIN SCREEN
60 ;;
61 ;;2.0031^151~SULFISOXAZOLE^151.1~SULFISOXAZOLE INTERP^151.2~SULFISOXAZOLE SCREEN
62 ;;2.0032^152~NAFCILLIN^152.1~NAFCILLIN INTERP^152.2~NAFCILLIN SCREEN
63 ;;2.0033^153~NALIDIXIC ACID^153.1~NALIDIXIC ACID INTERP^153.2~NALIDIXIC ACID SCREEN
64 ;;2.0034^154~CEPHALOTHIN^154.1~CEPHALOTHIN INTERP^154.2~CEPHALOTHIN SCREEN
65 ;;2.0035^155~COLISTIN^155.1~COLISTIN INTERP^155.2~COLISTIN SCREEN
66 ;;2.0036^156~METRONIDAZOLE^156.1~METRONIDAZOLE INTERP^156.2~METRONIDAZOLE SCREEN
67 ;;2.0037^157~CEFUROXIME^157.1~CEFUROXIME INTERP^157.2~CEFUROXIME SCREEN
68 ;;2.0038^158~CEFTIZOXIME^158.1~CEFTIZOXIME INTERP^158.2~CEFTIZOXIME SCREEN
69 ;;2.0039^159~SPECTINOMYCIN^159.1~SPECTINOMYCIN INTERP^159.2~SPECTINOMYCIN SCREEN
70 Q
71 ;
72 ;Pass back field name of Mycobacterium Antibiotic field. If the
73 ; Antibiotic field node is lonnger than six characters it is site
74 ; specific and is not returned.
75 ;
76DECODEMB(VAL) ; ---Decode Mycobacterium antibiotics
77 ;
78 N STR,MVAL,M1VAL
79 S STR=""
80 I $E(VAL,1,4)'="2.00" Q ""
81 I 'VAL Q ""
82 I $L(VAL)>6 Q ""
83 S VAL=$P(VAL,".",2)
84 I VAL="001" D
85 . S STR="2.001^50~PYRAZINAMIDE"
86 I $L(VAL)=4 D
87 . S M1VAL=+VAL
88 . S STR=$P($T(MBCODE+M1VAL),";;",2)
89 Q STR
90 ;
91MBCODE ;
92 ;;2.0001^5~STR
93 ;;2.0002^10~PAS
94 ;;2.0003^15~INH
95 ;;2.0004^20~ETH
96 ;;2.0005^25~RIF
97 ;;2.0006^30~KANAMYCIN
98 ;;2.0007^35~CAPREOMYCIN
99 ;;2.0008^40~CYCLOSERINE
100 ;;2.0009^45~ETHIONAMIDE
101 ;;
102 ;;2.0011^55~MIOMYCIN
103 Q
104 ;
105 ;
106 ;
107ARRANGE(LAARRAY,LAARRET) ; Re-set the global to the passed in reference and re-arrage for easier processing.
108 ;
109 F LASET="63.05","63.29","63.3","63.31","63.32","63.33","63.34","63.35","63.351","63.36","63.37","63.372","63.39","63.4","63.43","63.341","63.291","63.371","63.44" D
110 . S LACD=""
111 . F S LACD=$O(@LAARRAY@(LASET,LACD)) Q:LACD="" D
112 . . S LACDFLD=""
113 . . F S LACDFLD=$O(@LAARRAY@(LASET,LACD,LACDFLD)) Q:LACDFLD="" D
114 . . . S LACDTYP=""
115 . . . F S LACDTYP=$O(@LAARRAY@(LASET,LACD,LACDFLD,LACDTYP)) Q:LACDTYP="" D
116 . . . . S LADATA=@LAARRAY@(LASET,LACD,LACDFLD,LACDTYP)
117 . . . . ;
118 . . . . I LASET="63.05" D Q
119 . . . . . S @LAARRET@($P(LACD,",",2),$P(LACD,",",1),"0",LACDFLD,LACDTYP)=LADATA Q
120 . . . . ;
121 . . . . I LASET="63.351" D Q
122 . . . . . S @LAARRET@($P(LACD,",",5),$P(LACD,",",4),"6",$P(LACD,",",3),"1",$P(LACD,",",2),"1",$P(LACD,",",1),"0",LACDFLD,LACDTYP)=LADATA Q
123 . . . . ;
124 . . . . I LASET="63.32" D Q
125 . . . . . S @LAARRET@($P(LACD,",",4),$P(LACD,",",3),3,$P(LACD,",",2),3,$P(LACD,",",1),"0",LACDFLD,LACDTYP)=LADATA Q
126 . . . . ;
127 . . . . I LASET="63.31"!(LASET="63.35")!(LASET="63.372")!(LASET="63.4") D Q
128 . . . . . S LASUB=$S(LASET="63.31":"3",LASET="63.35":"6",LASET="63.372":"9",LASET="63.4":"12",1:"")
129 . . . . . I LASUB="" Q
130 . . . . . S @LAARRET@($P(LACD,",",4),$P(LACD,",",3),LASUB,$P(LACD,",",2),"1",$P(LACD,",",1),"0",LACDFLD,LACDTYP)=LADATA Q
131 . . . . ;
132 . . . . S LASUB=$S(LASET="63.29":"2",LASET="63.3":"3",LASET="63.33":"4",LASET="63.34":"6",LASET="63.36":"7",LASET="63.37":"9",1:"")
133 . . . . I LASUB="" S LASUB=$S(LASET="63.39":"12",LASET="63.43":"17",LASET="63.341":"24",LASET="63.291":"25",LASET="63.371":"15",LASET="63.44":"18",1:"")
134 . . . . I LASUB="" Q
135 . . . . S @LAARRET@($P(LACD,",",3),$P(LACD,",",2),LASUB,$P(LACD,",",1),0,LACDFLD,LACDTYP)=LADATA
136 ;
137 ; - Kill local array
138 K @LAARRAY
139 Q
140 ;
141 ;
Note: See TracBrowser for help on using the repository browser.