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 Tooth { 059 060 /** 061 * Oral cavity. 062 */ 063 _0, 064 /** 065 * Permanent teeth Maxillary right. 066 */ 067 _1, 068 /** 069 * Permanent teeth Maxillary left. 070 */ 071 _2, 072 /** 073 * Permanent teeth Mandibular right. 074 */ 075 _3, 076 /** 077 * Permanent teeth Mandibular left. 078 */ 079 _4, 080 /** 081 * Deciduous teeth Maxillary right. 082 */ 083 _5, 084 /** 085 * Deciduous teeth Maxillary left. 086 */ 087 _6, 088 /** 089 * Deciduous teeth Mandibular right. 090 */ 091 _7, 092 /** 093 * Deciduous teeth Mandibular left. 094 */ 095 _8, 096 /** 097 * Upper Right Tooth 1 from the central axis, permanent dentition. 098 */ 099 _11, 100 /** 101 * Upper Right Tooth 2 from the central axis, permanent dentition. 102 */ 103 _12, 104 /** 105 * Upper Right Tooth 3 from the central axis, permanent dentition. 106 */ 107 _13, 108 /** 109 * Upper Right Tooth 4 from the central axis, permanent dentition. 110 */ 111 _14, 112 /** 113 * Upper Right Tooth 5 from the central axis, permanent dentition. 114 */ 115 _15, 116 /** 117 * Upper Right Tooth 6 from the central axis, permanent dentition. 118 */ 119 _16, 120 /** 121 * Upper Right Tooth 7 from the central axis, permanent dentition. 122 */ 123 _17, 124 /** 125 * Upper Right Tooth 8 from the central axis, permanent dentition. 126 */ 127 _18, 128 /** 129 * Upper Left Tooth 1 from the central axis, permanent dentition. 130 */ 131 _21, 132 /** 133 * Upper Left Tooth 2 from the central axis, permanent dentition. 134 */ 135 _22, 136 /** 137 * Upper Left Tooth 3 from the central axis, permanent dentition. 138 */ 139 _23, 140 /** 141 * Upper Left Tooth 4 from the central axis, permanent dentition. 142 */ 143 _24, 144 /** 145 * Upper Left Tooth 5 from the central axis, permanent dentition. 146 */ 147 _25, 148 /** 149 * Upper Left Tooth 6 from the central axis, permanent dentition. 150 */ 151 _26, 152 /** 153 * Upper Left Tooth 7 from the central axis, permanent dentition. 154 */ 155 _27, 156 /** 157 * Upper Left Tooth 8 from the central axis, permanent dentition. 158 */ 159 _28, 160 /** 161 * Lower Left Tooth 1 from the central axis, permanent dentition. 162 */ 163 _31, 164 /** 165 * Lower Left Tooth 2 from the central axis, permanent dentition. 166 */ 167 _32, 168 /** 169 * Lower Left Tooth 3 from the central axis, permanent dentition. 170 */ 171 _33, 172 /** 173 * Lower Left Tooth 4 from the central axis, permanent dentition. 174 */ 175 _34, 176 /** 177 * Lower Left Tooth 5 from the central axis, permanent dentition. 178 */ 179 _35, 180 /** 181 * Lower Left Tooth 6 from the central axis, permanent dentition. 182 */ 183 _36, 184 /** 185 * Lower Left Tooth 7 from the central axis, permanent dentition. 186 */ 187 _37, 188 /** 189 * Lower Left Tooth 8 from the central axis, permanent dentition. 190 */ 191 _38, 192 /** 193 * Lower Right Tooth 1 from the central axis, permanent dentition. 194 */ 195 _41, 196 /** 197 * Lower Right Tooth 2 from the central axis, permanent dentition. 198 */ 199 _42, 200 /** 201 * Lower Right Tooth 3 from the central axis, permanent dentition. 202 */ 203 _43, 204 /** 205 * Lower Right Tooth 4 from the central axis, permanent dentition. 206 */ 207 _44, 208 /** 209 * Lower Right Tooth 5 from the central axis, permanent dentition. 210 */ 211 _45, 212 /** 213 * Lower Right Tooth 6 from the central axis, permanent dentition. 214 */ 215 _46, 216 /** 217 * Lower Right Tooth 7 from the central axis, permanent dentition. 218 */ 219 _47, 220 /** 221 * Lower Right Tooth 8 from the central axis, permanent dentition. 222 */ 223 _48, 224 /** 225 * added to help the parsers 226 */ 227 NULL; 228 public static Tooth fromCode(String codeString) throws FHIRException { 229 if (codeString == null || "".equals(codeString)) 230 return null; 231 if ("0".equals(codeString)) 232 return _0; 233 if ("1".equals(codeString)) 234 return _1; 235 if ("2".equals(codeString)) 236 return _2; 237 if ("3".equals(codeString)) 238 return _3; 239 if ("4".equals(codeString)) 240 return _4; 241 if ("5".equals(codeString)) 242 return _5; 243 if ("6".equals(codeString)) 244 return _6; 245 if ("7".equals(codeString)) 246 return _7; 247 if ("8".equals(codeString)) 248 return _8; 249 if ("11".equals(codeString)) 250 return _11; 251 if ("12".equals(codeString)) 252 return _12; 253 if ("13".equals(codeString)) 254 return _13; 255 if ("14".equals(codeString)) 256 return _14; 257 if ("15".equals(codeString)) 258 return _15; 259 if ("16".equals(codeString)) 260 return _16; 261 if ("17".equals(codeString)) 262 return _17; 263 if ("18".equals(codeString)) 264 return _18; 265 if ("21".equals(codeString)) 266 return _21; 267 if ("22".equals(codeString)) 268 return _22; 269 if ("23".equals(codeString)) 270 return _23; 271 if ("24".equals(codeString)) 272 return _24; 273 if ("25".equals(codeString)) 274 return _25; 275 if ("26".equals(codeString)) 276 return _26; 277 if ("27".equals(codeString)) 278 return _27; 279 if ("28".equals(codeString)) 280 return _28; 281 if ("31".equals(codeString)) 282 return _31; 283 if ("32".equals(codeString)) 284 return _32; 285 if ("33".equals(codeString)) 286 return _33; 287 if ("34".equals(codeString)) 288 return _34; 289 if ("35".equals(codeString)) 290 return _35; 291 if ("36".equals(codeString)) 292 return _36; 293 if ("37".equals(codeString)) 294 return _37; 295 if ("38".equals(codeString)) 296 return _38; 297 if ("41".equals(codeString)) 298 return _41; 299 if ("42".equals(codeString)) 300 return _42; 301 if ("43".equals(codeString)) 302 return _43; 303 if ("44".equals(codeString)) 304 return _44; 305 if ("45".equals(codeString)) 306 return _45; 307 if ("46".equals(codeString)) 308 return _46; 309 if ("47".equals(codeString)) 310 return _47; 311 if ("48".equals(codeString)) 312 return _48; 313 throw new FHIRException("Unknown Tooth code '"+codeString+"'"); 314 } 315 public String toCode() { 316 switch (this) { 317 case _0: return "0"; 318 case _1: return "1"; 319 case _2: return "2"; 320 case _3: return "3"; 321 case _4: return "4"; 322 case _5: return "5"; 323 case _6: return "6"; 324 case _7: return "7"; 325 case _8: return "8"; 326 case _11: return "11"; 327 case _12: return "12"; 328 case _13: return "13"; 329 case _14: return "14"; 330 case _15: return "15"; 331 case _16: return "16"; 332 case _17: return "17"; 333 case _18: return "18"; 334 case _21: return "21"; 335 case _22: return "22"; 336 case _23: return "23"; 337 case _24: return "24"; 338 case _25: return "25"; 339 case _26: return "26"; 340 case _27: return "27"; 341 case _28: return "28"; 342 case _31: return "31"; 343 case _32: return "32"; 344 case _33: return "33"; 345 case _34: return "34"; 346 case _35: return "35"; 347 case _36: return "36"; 348 case _37: return "37"; 349 case _38: return "38"; 350 case _41: return "41"; 351 case _42: return "42"; 352 case _43: return "43"; 353 case _44: return "44"; 354 case _45: return "45"; 355 case _46: return "46"; 356 case _47: return "47"; 357 case _48: return "48"; 358 default: return "?"; 359 } 360 } 361 public String getSystem() { 362 return "http://terminology.hl7.org/CodeSystem/ex-tooth"; 363 } 364 public String getDefinition() { 365 switch (this) { 366 case _0: return "Oral cavity."; 367 case _1: return "Permanent teeth Maxillary right."; 368 case _2: return "Permanent teeth Maxillary left."; 369 case _3: return "Permanent teeth Mandibular right."; 370 case _4: return "Permanent teeth Mandibular left."; 371 case _5: return "Deciduous teeth Maxillary right."; 372 case _6: return "Deciduous teeth Maxillary left."; 373 case _7: return "Deciduous teeth Mandibular right."; 374 case _8: return "Deciduous teeth Mandibular left."; 375 case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; 376 case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; 377 case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; 378 case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; 379 case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; 380 case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; 381 case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; 382 case _18: return "Upper Right Tooth 8 from the central axis, permanent dentition."; 383 case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; 384 case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; 385 case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; 386 case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; 387 case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; 388 case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; 389 case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; 390 case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; 391 case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; 392 case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; 393 case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; 394 case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; 395 case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; 396 case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; 397 case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; 398 case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; 399 case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; 400 case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; 401 case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; 402 case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; 403 case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; 404 case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; 405 case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; 406 case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; 407 default: return "?"; 408 } 409 } 410 public String getDisplay() { 411 switch (this) { 412 case _0: return "Oral cavity"; 413 case _1: return "1"; 414 case _2: return "2"; 415 case _3: return "3"; 416 case _4: return "4"; 417 case _5: return "5"; 418 case _6: return "6"; 419 case _7: return "7"; 420 case _8: return "8"; 421 case _11: return "11"; 422 case _12: return "12"; 423 case _13: return "13"; 424 case _14: return "14"; 425 case _15: return "15"; 426 case _16: return "16"; 427 case _17: return "17"; 428 case _18: return "18"; 429 case _21: return "21"; 430 case _22: return "22"; 431 case _23: return "23"; 432 case _24: return "24"; 433 case _25: return "25"; 434 case _26: return "26"; 435 case _27: return "27"; 436 case _28: return "28"; 437 case _31: return "31"; 438 case _32: return "32"; 439 case _33: return "33"; 440 case _34: return "34"; 441 case _35: return "35"; 442 case _36: return "36"; 443 case _37: return "37"; 444 case _38: return "38"; 445 case _41: return "41"; 446 case _42: return "42"; 447 case _43: return "43"; 448 case _44: return "44"; 449 case _45: return "45"; 450 case _46: return "46"; 451 case _47: return "47"; 452 case _48: return "48"; 453 default: return "?"; 454 } 455 } 456 457 458} 459