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