001package org.hl7.fhir.r4.model.codesystems; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.r4.model.EnumFactory; 035 036public class V3ObservationInterpretationEnumFactory implements EnumFactory<V3ObservationInterpretation> { 037 038 public V3ObservationInterpretation fromCode(String codeString) throws IllegalArgumentException { 039 if (codeString == null || "".equals(codeString)) 040 return null; 041 if ("_GeneticObservationInterpretation".equals(codeString)) 042 return V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION; 043 if ("CAR".equals(codeString)) 044 return V3ObservationInterpretation.CAR; 045 if ("Carrier".equals(codeString)) 046 return V3ObservationInterpretation.CARRIER; 047 if ("_ObservationInterpretationChange".equals(codeString)) 048 return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE; 049 if ("B".equals(codeString)) 050 return V3ObservationInterpretation.B; 051 if ("D".equals(codeString)) 052 return V3ObservationInterpretation.D; 053 if ("U".equals(codeString)) 054 return V3ObservationInterpretation.U; 055 if ("W".equals(codeString)) 056 return V3ObservationInterpretation.W; 057 if ("_ObservationInterpretationExceptions".equals(codeString)) 058 return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS; 059 if ("<".equals(codeString)) 060 return V3ObservationInterpretation.LESS_THAN; 061 if (">".equals(codeString)) 062 return V3ObservationInterpretation.GREATER_THAN; 063 if ("AC".equals(codeString)) 064 return V3ObservationInterpretation.AC; 065 if ("IE".equals(codeString)) 066 return V3ObservationInterpretation.IE; 067 if ("QCF".equals(codeString)) 068 return V3ObservationInterpretation.QCF; 069 if ("TOX".equals(codeString)) 070 return V3ObservationInterpretation.TOX; 071 if ("_ObservationInterpretationNormality".equals(codeString)) 072 return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY; 073 if ("A".equals(codeString)) 074 return V3ObservationInterpretation.A; 075 if ("AA".equals(codeString)) 076 return V3ObservationInterpretation.AA; 077 if ("HH".equals(codeString)) 078 return V3ObservationInterpretation.HH; 079 if ("LL".equals(codeString)) 080 return V3ObservationInterpretation.LL; 081 if ("H".equals(codeString)) 082 return V3ObservationInterpretation.H; 083 if ("H>".equals(codeString)) 084 return V3ObservationInterpretation.H_; 085 if ("HU".equals(codeString)) 086 return V3ObservationInterpretation.HU; 087 if ("L".equals(codeString)) 088 return V3ObservationInterpretation.L; 089 if ("L<".equals(codeString)) 090 return V3ObservationInterpretation.L_; 091 if ("LU".equals(codeString)) 092 return V3ObservationInterpretation.LU; 093 if ("N".equals(codeString)) 094 return V3ObservationInterpretation.N; 095 if ("_ObservationInterpretationSusceptibility".equals(codeString)) 096 return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY; 097 if ("I".equals(codeString)) 098 return V3ObservationInterpretation.I; 099 if ("MS".equals(codeString)) 100 return V3ObservationInterpretation.MS; 101 if ("NCL".equals(codeString)) 102 return V3ObservationInterpretation.NCL; 103 if ("NS".equals(codeString)) 104 return V3ObservationInterpretation.NS; 105 if ("R".equals(codeString)) 106 return V3ObservationInterpretation.R; 107 if ("SYN-R".equals(codeString)) 108 return V3ObservationInterpretation.SYNR; 109 if ("S".equals(codeString)) 110 return V3ObservationInterpretation.S; 111 if ("SDD".equals(codeString)) 112 return V3ObservationInterpretation.SDD; 113 if ("SYN-S".equals(codeString)) 114 return V3ObservationInterpretation.SYNS; 115 if ("VS".equals(codeString)) 116 return V3ObservationInterpretation.VS; 117 if ("EX".equals(codeString)) 118 return V3ObservationInterpretation.EX; 119 if ("HX".equals(codeString)) 120 return V3ObservationInterpretation.HX; 121 if ("LX".equals(codeString)) 122 return V3ObservationInterpretation.LX; 123 if ("HM".equals(codeString)) 124 return V3ObservationInterpretation.HM; 125 if ("ObservationInterpretationDetection".equals(codeString)) 126 return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION; 127 if ("IND".equals(codeString)) 128 return V3ObservationInterpretation.IND; 129 if ("E".equals(codeString)) 130 return V3ObservationInterpretation.E; 131 if ("NEG".equals(codeString)) 132 return V3ObservationInterpretation.NEG; 133 if ("ND".equals(codeString)) 134 return V3ObservationInterpretation.ND; 135 if ("POS".equals(codeString)) 136 return V3ObservationInterpretation.POS; 137 if ("DET".equals(codeString)) 138 return V3ObservationInterpretation.DET; 139 if ("ObservationInterpretationExpectation".equals(codeString)) 140 return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION; 141 if ("EXP".equals(codeString)) 142 return V3ObservationInterpretation.EXP; 143 if ("UNE".equals(codeString)) 144 return V3ObservationInterpretation.UNE; 145 if ("OBX".equals(codeString)) 146 return V3ObservationInterpretation.OBX; 147 if ("ReactivityObservationInterpretation".equals(codeString)) 148 return V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION; 149 if ("NR".equals(codeString)) 150 return V3ObservationInterpretation.NR; 151 if ("RR".equals(codeString)) 152 return V3ObservationInterpretation.RR; 153 if ("WR".equals(codeString)) 154 return V3ObservationInterpretation.WR; 155 throw new IllegalArgumentException("Unknown V3ObservationInterpretation code '" + codeString + "'"); 156 } 157 158 public String toCode(V3ObservationInterpretation code) { 159 if (code == V3ObservationInterpretation.NULL) 160 return null; 161 if (code == V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION) 162 return "_GeneticObservationInterpretation"; 163 if (code == V3ObservationInterpretation.CAR) 164 return "CAR"; 165 if (code == V3ObservationInterpretation.CARRIER) 166 return "Carrier"; 167 if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE) 168 return "_ObservationInterpretationChange"; 169 if (code == V3ObservationInterpretation.B) 170 return "B"; 171 if (code == V3ObservationInterpretation.D) 172 return "D"; 173 if (code == V3ObservationInterpretation.U) 174 return "U"; 175 if (code == V3ObservationInterpretation.W) 176 return "W"; 177 if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS) 178 return "_ObservationInterpretationExceptions"; 179 if (code == V3ObservationInterpretation.LESS_THAN) 180 return "<"; 181 if (code == V3ObservationInterpretation.GREATER_THAN) 182 return ">"; 183 if (code == V3ObservationInterpretation.AC) 184 return "AC"; 185 if (code == V3ObservationInterpretation.IE) 186 return "IE"; 187 if (code == V3ObservationInterpretation.QCF) 188 return "QCF"; 189 if (code == V3ObservationInterpretation.TOX) 190 return "TOX"; 191 if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY) 192 return "_ObservationInterpretationNormality"; 193 if (code == V3ObservationInterpretation.A) 194 return "A"; 195 if (code == V3ObservationInterpretation.AA) 196 return "AA"; 197 if (code == V3ObservationInterpretation.HH) 198 return "HH"; 199 if (code == V3ObservationInterpretation.LL) 200 return "LL"; 201 if (code == V3ObservationInterpretation.H) 202 return "H"; 203 if (code == V3ObservationInterpretation.H_) 204 return "H>"; 205 if (code == V3ObservationInterpretation.HU) 206 return "HU"; 207 if (code == V3ObservationInterpretation.L) 208 return "L"; 209 if (code == V3ObservationInterpretation.L_) 210 return "L<"; 211 if (code == V3ObservationInterpretation.LU) 212 return "LU"; 213 if (code == V3ObservationInterpretation.N) 214 return "N"; 215 if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY) 216 return "_ObservationInterpretationSusceptibility"; 217 if (code == V3ObservationInterpretation.I) 218 return "I"; 219 if (code == V3ObservationInterpretation.MS) 220 return "MS"; 221 if (code == V3ObservationInterpretation.NCL) 222 return "NCL"; 223 if (code == V3ObservationInterpretation.NS) 224 return "NS"; 225 if (code == V3ObservationInterpretation.R) 226 return "R"; 227 if (code == V3ObservationInterpretation.SYNR) 228 return "SYN-R"; 229 if (code == V3ObservationInterpretation.S) 230 return "S"; 231 if (code == V3ObservationInterpretation.SDD) 232 return "SDD"; 233 if (code == V3ObservationInterpretation.SYNS) 234 return "SYN-S"; 235 if (code == V3ObservationInterpretation.VS) 236 return "VS"; 237 if (code == V3ObservationInterpretation.EX) 238 return "EX"; 239 if (code == V3ObservationInterpretation.HX) 240 return "HX"; 241 if (code == V3ObservationInterpretation.LX) 242 return "LX"; 243 if (code == V3ObservationInterpretation.HM) 244 return "HM"; 245 if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION) 246 return "ObservationInterpretationDetection"; 247 if (code == V3ObservationInterpretation.IND) 248 return "IND"; 249 if (code == V3ObservationInterpretation.E) 250 return "E"; 251 if (code == V3ObservationInterpretation.NEG) 252 return "NEG"; 253 if (code == V3ObservationInterpretation.ND) 254 return "ND"; 255 if (code == V3ObservationInterpretation.POS) 256 return "POS"; 257 if (code == V3ObservationInterpretation.DET) 258 return "DET"; 259 if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION) 260 return "ObservationInterpretationExpectation"; 261 if (code == V3ObservationInterpretation.EXP) 262 return "EXP"; 263 if (code == V3ObservationInterpretation.UNE) 264 return "UNE"; 265 if (code == V3ObservationInterpretation.OBX) 266 return "OBX"; 267 if (code == V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION) 268 return "ReactivityObservationInterpretation"; 269 if (code == V3ObservationInterpretation.NR) 270 return "NR"; 271 if (code == V3ObservationInterpretation.RR) 272 return "RR"; 273 if (code == V3ObservationInterpretation.WR) 274 return "WR"; 275 return "?"; 276 } 277 278 public String toSystem(V3ObservationInterpretation code) { 279 return code.getSystem(); 280 } 281 282}