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