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