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