001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 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 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum Tooth { 058 059 /** 060 * Oral cavity. 061 */ 062 _0, 063 /** 064 * Permanent teeth Maxillary right. 065 */ 066 _1, 067 /** 068 * Permanent teeth Maxillary left. 069 */ 070 _2, 071 /** 072 * Permanent teeth Mandibular right. 073 */ 074 _3, 075 /** 076 * Permanent teeth Mandibular left. 077 */ 078 _4, 079 /** 080 * Deciduous teeth Maxillary right. 081 */ 082 _5, 083 /** 084 * Deciduous teeth Maxillary left. 085 */ 086 _6, 087 /** 088 * Deciduous teeth Mandibular right. 089 */ 090 _7, 091 /** 092 * Deciduous teeth Mandibular left. 093 */ 094 _8, 095 /** 096 * Upper Right Tooth 1 from the central axis, permanent dentition. 097 */ 098 _11, 099 /** 100 * Upper Right Tooth 2 from the central axis, permanent dentition. 101 */ 102 _12, 103 /** 104 * Upper Right Tooth 3 from the central axis, permanent dentition. 105 */ 106 _13, 107 /** 108 * Upper Right Tooth 4 from the central axis, permanent dentition. 109 */ 110 _14, 111 /** 112 * Upper Right Tooth 5 from the central axis, permanent dentition. 113 */ 114 _15, 115 /** 116 * Upper Right Tooth 6 from the central axis, permanent dentition. 117 */ 118 _16, 119 /** 120 * Upper Right Tooth 7 from the central axis, permanent dentition. 121 */ 122 _17, 123 /** 124 * Upper Right Tooth 8 from the central axis, permanent dentition. 125 */ 126 _18, 127 /** 128 * Upper Left Tooth 1 from the central axis, permanent dentition. 129 */ 130 _21, 131 /** 132 * Upper Left Tooth 2 from the central axis, permanent dentition. 133 */ 134 _22, 135 /** 136 * Upper Left Tooth 3 from the central axis, permanent dentition. 137 */ 138 _23, 139 /** 140 * Upper Left Tooth 4 from the central axis, permanent dentition. 141 */ 142 _24, 143 /** 144 * Upper Left Tooth 5 from the central axis, permanent dentition. 145 */ 146 _25, 147 /** 148 * Upper Left Tooth 6 from the central axis, permanent dentition. 149 */ 150 _26, 151 /** 152 * Upper Left Tooth 7 from the central axis, permanent dentition. 153 */ 154 _27, 155 /** 156 * Upper Left Tooth 8 from the central axis, permanent dentition. 157 */ 158 _28, 159 /** 160 * Lower Left Tooth 1 from the central axis, permanent dentition. 161 */ 162 _31, 163 /** 164 * Lower Left Tooth 2 from the central axis, permanent dentition. 165 */ 166 _32, 167 /** 168 * Lower Left Tooth 3 from the central axis, permanent dentition. 169 */ 170 _33, 171 /** 172 * Lower Left Tooth 4 from the central axis, permanent dentition. 173 */ 174 _34, 175 /** 176 * Lower Left Tooth 5 from the central axis, permanent dentition. 177 */ 178 _35, 179 /** 180 * Lower Left Tooth 6 from the central axis, permanent dentition. 181 */ 182 _36, 183 /** 184 * Lower Left Tooth 7 from the central axis, permanent dentition. 185 */ 186 _37, 187 /** 188 * Lower Left Tooth 8 from the central axis, permanent dentition. 189 */ 190 _38, 191 /** 192 * Lower Right Tooth 1 from the central axis, permanent dentition. 193 */ 194 _41, 195 /** 196 * Lower Right Tooth 2 from the central axis, permanent dentition. 197 */ 198 _42, 199 /** 200 * Lower Right Tooth 3 from the central axis, permanent dentition. 201 */ 202 _43, 203 /** 204 * Lower Right Tooth 4 from the central axis, permanent dentition. 205 */ 206 _44, 207 /** 208 * Lower Right Tooth 5 from the central axis, permanent dentition. 209 */ 210 _45, 211 /** 212 * Lower Right Tooth 6 from the central axis, permanent dentition. 213 */ 214 _46, 215 /** 216 * Lower Right Tooth 7 from the central axis, permanent dentition. 217 */ 218 _47, 219 /** 220 * Lower Right Tooth 8 from the central axis, permanent dentition. 221 */ 222 _48, 223 /** 224 * added to help the parsers 225 */ 226 NULL; 227 public static Tooth fromCode(String codeString) throws FHIRException { 228 if (codeString == null || "".equals(codeString)) 229 return null; 230 if ("0".equals(codeString)) 231 return _0; 232 if ("1".equals(codeString)) 233 return _1; 234 if ("2".equals(codeString)) 235 return _2; 236 if ("3".equals(codeString)) 237 return _3; 238 if ("4".equals(codeString)) 239 return _4; 240 if ("5".equals(codeString)) 241 return _5; 242 if ("6".equals(codeString)) 243 return _6; 244 if ("7".equals(codeString)) 245 return _7; 246 if ("8".equals(codeString)) 247 return _8; 248 if ("11".equals(codeString)) 249 return _11; 250 if ("12".equals(codeString)) 251 return _12; 252 if ("13".equals(codeString)) 253 return _13; 254 if ("14".equals(codeString)) 255 return _14; 256 if ("15".equals(codeString)) 257 return _15; 258 if ("16".equals(codeString)) 259 return _16; 260 if ("17".equals(codeString)) 261 return _17; 262 if ("18".equals(codeString)) 263 return _18; 264 if ("21".equals(codeString)) 265 return _21; 266 if ("22".equals(codeString)) 267 return _22; 268 if ("23".equals(codeString)) 269 return _23; 270 if ("24".equals(codeString)) 271 return _24; 272 if ("25".equals(codeString)) 273 return _25; 274 if ("26".equals(codeString)) 275 return _26; 276 if ("27".equals(codeString)) 277 return _27; 278 if ("28".equals(codeString)) 279 return _28; 280 if ("31".equals(codeString)) 281 return _31; 282 if ("32".equals(codeString)) 283 return _32; 284 if ("33".equals(codeString)) 285 return _33; 286 if ("34".equals(codeString)) 287 return _34; 288 if ("35".equals(codeString)) 289 return _35; 290 if ("36".equals(codeString)) 291 return _36; 292 if ("37".equals(codeString)) 293 return _37; 294 if ("38".equals(codeString)) 295 return _38; 296 if ("41".equals(codeString)) 297 return _41; 298 if ("42".equals(codeString)) 299 return _42; 300 if ("43".equals(codeString)) 301 return _43; 302 if ("44".equals(codeString)) 303 return _44; 304 if ("45".equals(codeString)) 305 return _45; 306 if ("46".equals(codeString)) 307 return _46; 308 if ("47".equals(codeString)) 309 return _47; 310 if ("48".equals(codeString)) 311 return _48; 312 throw new FHIRException("Unknown Tooth code '"+codeString+"'"); 313 } 314 public String toCode() { 315 switch (this) { 316 case _0: return "0"; 317 case _1: return "1"; 318 case _2: return "2"; 319 case _3: return "3"; 320 case _4: return "4"; 321 case _5: return "5"; 322 case _6: return "6"; 323 case _7: return "7"; 324 case _8: return "8"; 325 case _11: return "11"; 326 case _12: return "12"; 327 case _13: return "13"; 328 case _14: return "14"; 329 case _15: return "15"; 330 case _16: return "16"; 331 case _17: return "17"; 332 case _18: return "18"; 333 case _21: return "21"; 334 case _22: return "22"; 335 case _23: return "23"; 336 case _24: return "24"; 337 case _25: return "25"; 338 case _26: return "26"; 339 case _27: return "27"; 340 case _28: return "28"; 341 case _31: return "31"; 342 case _32: return "32"; 343 case _33: return "33"; 344 case _34: return "34"; 345 case _35: return "35"; 346 case _36: return "36"; 347 case _37: return "37"; 348 case _38: return "38"; 349 case _41: return "41"; 350 case _42: return "42"; 351 case _43: return "43"; 352 case _44: return "44"; 353 case _45: return "45"; 354 case _46: return "46"; 355 case _47: return "47"; 356 case _48: return "48"; 357 default: return "?"; 358 } 359 } 360 public String getSystem() { 361 return "http://terminology.hl7.org/CodeSystem/ex-tooth"; 362 } 363 public String getDefinition() { 364 switch (this) { 365 case _0: return "Oral cavity."; 366 case _1: return "Permanent teeth Maxillary right."; 367 case _2: return "Permanent teeth Maxillary left."; 368 case _3: return "Permanent teeth Mandibular right."; 369 case _4: return "Permanent teeth Mandibular left."; 370 case _5: return "Deciduous teeth Maxillary right."; 371 case _6: return "Deciduous teeth Maxillary left."; 372 case _7: return "Deciduous teeth Mandibular right."; 373 case _8: return "Deciduous teeth Mandibular left."; 374 case _11: return "Upper Right Tooth 1 from the central axis, permanent dentition."; 375 case _12: return "Upper Right Tooth 2 from the central axis, permanent dentition."; 376 case _13: return "Upper Right Tooth 3 from the central axis, permanent dentition."; 377 case _14: return "Upper Right Tooth 4 from the central axis, permanent dentition."; 378 case _15: return "Upper Right Tooth 5 from the central axis, permanent dentition."; 379 case _16: return "Upper Right Tooth 6 from the central axis, permanent dentition."; 380 case _17: return "Upper Right Tooth 7 from the central axis, permanent dentition."; 381 case _18: return "Upper Right Tooth 8 from the central axis, permanent dentition."; 382 case _21: return "Upper Left Tooth 1 from the central axis, permanent dentition."; 383 case _22: return "Upper Left Tooth 2 from the central axis, permanent dentition."; 384 case _23: return "Upper Left Tooth 3 from the central axis, permanent dentition."; 385 case _24: return "Upper Left Tooth 4 from the central axis, permanent dentition."; 386 case _25: return "Upper Left Tooth 5 from the central axis, permanent dentition."; 387 case _26: return "Upper Left Tooth 6 from the central axis, permanent dentition."; 388 case _27: return "Upper Left Tooth 7 from the central axis, permanent dentition."; 389 case _28: return "Upper Left Tooth 8 from the central axis, permanent dentition."; 390 case _31: return "Lower Left Tooth 1 from the central axis, permanent dentition."; 391 case _32: return "Lower Left Tooth 2 from the central axis, permanent dentition."; 392 case _33: return "Lower Left Tooth 3 from the central axis, permanent dentition."; 393 case _34: return "Lower Left Tooth 4 from the central axis, permanent dentition."; 394 case _35: return "Lower Left Tooth 5 from the central axis, permanent dentition."; 395 case _36: return "Lower Left Tooth 6 from the central axis, permanent dentition."; 396 case _37: return "Lower Left Tooth 7 from the central axis, permanent dentition."; 397 case _38: return "Lower Left Tooth 8 from the central axis, permanent dentition."; 398 case _41: return "Lower Right Tooth 1 from the central axis, permanent dentition."; 399 case _42: return "Lower Right Tooth 2 from the central axis, permanent dentition."; 400 case _43: return "Lower Right Tooth 3 from the central axis, permanent dentition."; 401 case _44: return "Lower Right Tooth 4 from the central axis, permanent dentition."; 402 case _45: return "Lower Right Tooth 5 from the central axis, permanent dentition."; 403 case _46: return "Lower Right Tooth 6 from the central axis, permanent dentition."; 404 case _47: return "Lower Right Tooth 7 from the central axis, permanent dentition."; 405 case _48: return "Lower Right Tooth 8 from the central axis, permanent dentition."; 406 default: return "?"; 407 } 408 } 409 public String getDisplay() { 410 switch (this) { 411 case _0: return "Oral cavity"; 412 case _1: return "1"; 413 case _2: return "2"; 414 case _3: return "3"; 415 case _4: return "4"; 416 case _5: return "5"; 417 case _6: return "6"; 418 case _7: return "7"; 419 case _8: return "8"; 420 case _11: return "11"; 421 case _12: return "12"; 422 case _13: return "13"; 423 case _14: return "14"; 424 case _15: return "15"; 425 case _16: return "16"; 426 case _17: return "17"; 427 case _18: return "18"; 428 case _21: return "21"; 429 case _22: return "22"; 430 case _23: return "23"; 431 case _24: return "24"; 432 case _25: return "25"; 433 case _26: return "26"; 434 case _27: return "27"; 435 case _28: return "28"; 436 case _31: return "31"; 437 case _32: return "32"; 438 case _33: return "33"; 439 case _34: return "34"; 440 case _35: return "35"; 441 case _36: return "36"; 442 case _37: return "37"; 443 case _38: return "38"; 444 case _41: return "41"; 445 case _42: return "42"; 446 case _43: return "43"; 447 case _44: return "44"; 448 case _45: return "45"; 449 case _46: return "46"; 450 case _47: return "47"; 451 case _48: return "48"; 452 default: return "?"; 453 } 454 } 455 456 457} 458