001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum Teeth { 059 060 /** 061 * Upper Right Tooth 1 from the central axis, permanent dentition. 062 */ 063 _11, 064 /** 065 * Upper Right Tooth 2 from the central axis, permanent dentition. 066 */ 067 _12, 068 /** 069 * Upper Right Tooth 3 from the central axis, permanent dentition. 070 */ 071 _13, 072 /** 073 * Upper Right Tooth 4 from the central axis, permanent dentition. 074 */ 075 _14, 076 /** 077 * Upper Right Tooth 5 from the central axis, permanent dentition. 078 */ 079 _15, 080 /** 081 * Upper Right Tooth 6 from the central axis, permanent dentition. 082 */ 083 _16, 084 /** 085 * Upper Right Tooth 7 from the central axis, permanent dentition. 086 */ 087 _17, 088 /** 089 * Upper Right Tooth 8 from the central axis, permanent dentition. 090 */ 091 _18, 092 /** 093 * Upper Left Tooth 1 from the central axis, permanent dentition. 094 */ 095 _21, 096 /** 097 * Upper Left Tooth 2 from the central axis, permanent dentition. 098 */ 099 _22, 100 /** 101 * Upper Left Tooth 3 from the central axis, permanent dentition. 102 */ 103 _23, 104 /** 105 * Upper Left Tooth 4 from the central axis, permanent dentition. 106 */ 107 _24, 108 /** 109 * Upper Left Tooth 5 from the central axis, permanent dentition. 110 */ 111 _25, 112 /** 113 * Upper Left Tooth 6 from the central axis, permanent dentition. 114 */ 115 _26, 116 /** 117 * Upper Left Tooth 7 from the central axis, permanent dentition. 118 */ 119 _27, 120 /** 121 * Upper Left Tooth 8 from the central axis, permanent dentition. 122 */ 123 _28, 124 /** 125 * Lower Left Tooth 1 from the central axis, permanent dentition. 126 */ 127 _31, 128 /** 129 * Lower Left Tooth 2 from the central axis, permanent dentition. 130 */ 131 _32, 132 /** 133 * Lower Left Tooth 3 from the central axis, permanent dentition. 134 */ 135 _33, 136 /** 137 * Lower Left Tooth 4 from the central axis, permanent dentition. 138 */ 139 _34, 140 /** 141 * Lower Left Tooth 5 from the central axis, permanent dentition. 142 */ 143 _35, 144 /** 145 * Lower Left Tooth 6 from the central axis, permanent dentition. 146 */ 147 _36, 148 /** 149 * Lower Left Tooth 7 from the central axis, permanent dentition. 150 */ 151 _37, 152 /** 153 * Lower Left Tooth 8 from the central axis, permanent dentition. 154 */ 155 _38, 156 /** 157 * Lower Right Tooth 1 from the central axis, permanent dentition. 158 */ 159 _41, 160 /** 161 * Lower Right Tooth 2 from the central axis, permanent dentition. 162 */ 163 _42, 164 /** 165 * Lower Right Tooth 3 from the central axis, permanent dentition. 166 */ 167 _43, 168 /** 169 * Lower Right Tooth 4 from the central axis, permanent dentition. 170 */ 171 _44, 172 /** 173 * Lower Right Tooth 5 from the central axis, permanent dentition. 174 */ 175 _45, 176 /** 177 * Lower Right Tooth 6 from the central axis, permanent dentition. 178 */ 179 _46, 180 /** 181 * Lower Right Tooth 7 from the central axis, permanent dentition. 182 */ 183 _47, 184 /** 185 * Lower Right Tooth 8 from the central axis, permanent dentition. 186 */ 187 _48, 188 /** 189 * added to help the parsers 190 */ 191 NULL; 192 public static Teeth fromCode(String codeString) throws FHIRException { 193 if (codeString == null || "".equals(codeString)) 194 return null; 195 if ("11".equals(codeString)) 196 return _11; 197 if ("12".equals(codeString)) 198 return _12; 199 if ("13".equals(codeString)) 200 return _13; 201 if ("14".equals(codeString)) 202 return _14; 203 if ("15".equals(codeString)) 204 return _15; 205 if ("16".equals(codeString)) 206 return _16; 207 if ("17".equals(codeString)) 208 return _17; 209 if ("18".equals(codeString)) 210 return _18; 211 if ("21".equals(codeString)) 212 return _21; 213 if ("22".equals(codeString)) 214 return _22; 215 if ("23".equals(codeString)) 216 return _23; 217 if ("24".equals(codeString)) 218 return _24; 219 if ("25".equals(codeString)) 220 return _25; 221 if ("26".equals(codeString)) 222 return _26; 223 if ("27".equals(codeString)) 224 return _27; 225 if ("28".equals(codeString)) 226 return _28; 227 if ("31".equals(codeString)) 228 return _31; 229 if ("32".equals(codeString)) 230 return _32; 231 if ("33".equals(codeString)) 232 return _33; 233 if ("34".equals(codeString)) 234 return _34; 235 if ("35".equals(codeString)) 236 return _35; 237 if ("36".equals(codeString)) 238 return _36; 239 if ("37".equals(codeString)) 240 return _37; 241 if ("38".equals(codeString)) 242 return _38; 243 if ("41".equals(codeString)) 244 return _41; 245 if ("42".equals(codeString)) 246 return _42; 247 if ("43".equals(codeString)) 248 return _43; 249 if ("44".equals(codeString)) 250 return _44; 251 if ("45".equals(codeString)) 252 return _45; 253 if ("46".equals(codeString)) 254 return _46; 255 if ("47".equals(codeString)) 256 return _47; 257 if ("48".equals(codeString)) 258 return _48; 259 throw new FHIRException("Unknown Teeth code '"+codeString+"'"); 260 } 261 public String toCode() { 262 switch (this) { 263 case _11: return "11"; 264 case _12: return "12"; 265 case _13: return "13"; 266 case _14: return "14"; 267 case _15: return "15"; 268 case _16: return "16"; 269 case _17: return "17"; 270 case _18: return "18"; 271 case _21: return "21"; 272 case _22: return "22"; 273 case _23: return "23"; 274 case _24: return "24"; 275 case _25: return "25"; 276 case _26: return "26"; 277 case _27: return "27"; 278 case _28: return "28"; 279 case _31: return "31"; 280 case _32: return "32"; 281 case _33: return "33"; 282 case _34: return "34"; 283 case _35: return "35"; 284 case _36: return "36"; 285 case _37: return "37"; 286 case _38: return "38"; 287 case _41: return "41"; 288 case _42: return "42"; 289 case _43: return "43"; 290 case _44: return "44"; 291 case _45: return "45"; 292 case _46: return "46"; 293 case _47: return "47"; 294 case _48: return "48"; 295 default: return "?"; 296 } 297 } 298 public String getSystem() { 299 return "http://hl7.org/fhir/ex-fdi"; 300 } 301 public String getDefinition() { 302 switch (this) { 303 case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; 304 case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; 305 case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; 306 case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; 307 case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; 308 case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; 309 case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; 310 case _18: return "Upper Right Tooth 8 from the central axis, permanent dentition."; 311 case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; 312 case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; 313 case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; 314 case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; 315 case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; 316 case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; 317 case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; 318 case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; 319 case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; 320 case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; 321 case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; 322 case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; 323 case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; 324 case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; 325 case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; 326 case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; 327 case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; 328 case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; 329 case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; 330 case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; 331 case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; 332 case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; 333 case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; 334 case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; 335 default: return "?"; 336 } 337 } 338 public String getDisplay() { 339 switch (this) { 340 case _11: return "11"; 341 case _12: return "12"; 342 case _13: return "13"; 343 case _14: return "14"; 344 case _15: return "15"; 345 case _16: return "16"; 346 case _17: return "17"; 347 case _18: return "18"; 348 case _21: return "21"; 349 case _22: return "22"; 350 case _23: return "23"; 351 case _24: return "24"; 352 case _25: return "25"; 353 case _26: return "26"; 354 case _27: return "27"; 355 case _28: return "28"; 356 case _31: return "31"; 357 case _32: return "32"; 358 case _33: return "33"; 359 case _34: return "34"; 360 case _35: return "35"; 361 case _36: return "36"; 362 case _37: return "37"; 363 case _38: return "38"; 364 case _41: return "41"; 365 case _42: return "42"; 366 case _43: return "43"; 367 case _44: return "44"; 368 case _45: return "45"; 369 case _46: return "46"; 370 case _47: return "47"; 371 case _48: return "48"; 372 default: return "?"; 373 } 374 } 375 376 377} 378