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 Surface {
038
039        /**
040         * The surface of a tooth that is closest to the midline (middle) of the face.
041         */
042        M, 
043        /**
044         * The chewing surface of posterior teeth.
045         */
046        O, 
047        /**
048         * The biting edge of anterior teeth.
049         */
050        I, 
051        /**
052         * The surface of a tooth that faces away from the midline of the face.
053         */
054        D, 
055        /**
056         * The surface of a posterior tooth facing the cheeks.
057         */
058        B, 
059        /**
060         * The surface of a tooth facing the lips.
061         */
062        V, 
063        /**
064         * The surface of a tooth facing the tongue.
065         */
066        L, 
067        /**
068         * The Mesioclusal surfaces of a tooth.
069         */
070        MO, 
071        /**
072         * The Distoclusal surfaces of a tooth.
073         */
074        DO, 
075        /**
076         * The Distoincisal surfaces of a tooth.
077         */
078        DI, 
079        /**
080         * The Mesioclusodistal surfaces of a tooth.
081         */
082        MOD, 
083        /**
084         * added to help the parsers
085         */
086        NULL;
087        public static Surface fromCode(String codeString) throws FHIRException {
088            if (codeString == null || "".equals(codeString))
089                return null;
090        if ("M".equals(codeString))
091          return M;
092        if ("O".equals(codeString))
093          return O;
094        if ("I".equals(codeString))
095          return I;
096        if ("D".equals(codeString))
097          return D;
098        if ("B".equals(codeString))
099          return B;
100        if ("V".equals(codeString))
101          return V;
102        if ("L".equals(codeString))
103          return L;
104        if ("MO".equals(codeString))
105          return MO;
106        if ("DO".equals(codeString))
107          return DO;
108        if ("DI".equals(codeString))
109          return DI;
110        if ("MOD".equals(codeString))
111          return MOD;
112        throw new FHIRException("Unknown Surface code '"+codeString+"'");
113        }
114        public String toCode() {
115          switch (this) {
116            case M: return "M";
117            case O: return "O";
118            case I: return "I";
119            case D: return "D";
120            case B: return "B";
121            case V: return "V";
122            case L: return "L";
123            case MO: return "MO";
124            case DO: return "DO";
125            case DI: return "DI";
126            case MOD: return "MOD";
127            default: return "?";
128          }
129        }
130        public String getSystem() {
131          return "http://hl7.org/fhir/FDI-surface";
132        }
133        public String getDefinition() {
134          switch (this) {
135            case M: return "The surface of a tooth that is closest to the midline (middle) of the face.";
136            case O: return "The chewing surface of posterior teeth.";
137            case I: return "The biting edge of anterior teeth.";
138            case D: return "The surface of a tooth that faces away from the midline of the face.";
139            case B: return "The surface of a posterior tooth facing the cheeks.";
140            case V: return "The surface of a tooth facing the lips.";
141            case L: return "The surface of a tooth facing the tongue.";
142            case MO: return "The Mesioclusal surfaces of a tooth.";
143            case DO: return "The Distoclusal surfaces of a tooth.";
144            case DI: return "The Distoincisal surfaces of a tooth.";
145            case MOD: return "The Mesioclusodistal surfaces of a tooth.";
146            default: return "?";
147          }
148        }
149        public String getDisplay() {
150          switch (this) {
151            case M: return "Mesial";
152            case O: return "Occlusal";
153            case I: return "Incisal";
154            case D: return "Distal";
155            case B: return "Buccal";
156            case V: return "Ventral";
157            case L: return "Lingual";
158            case MO: return "Mesioclusal";
159            case DO: return "Distoclusal";
160            case DI: return "Distoincisal";
161            case MOD: return "Mesioclusodistal";
162            default: return "?";
163          }
164    }
165
166
167}
168