![](/hapi-fhir/images/logos/raccoon-forwards.png)
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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum Surface { 037 038 /** 039 * The surface of a tooth that is closest to the midline (middle) of the face. 040 */ 041 M, 042 /** 043 * The chewing surface of posterior teeth. 044 */ 045 O, 046 /** 047 * The biting edge of anterior teeth. 048 */ 049 I, 050 /** 051 * The surface of a tooth that faces away from the midline of the face. 052 */ 053 D, 054 /** 055 * The surface of a posterior tooth facing the cheeks. 056 */ 057 B, 058 /** 059 * The surface of a tooth facing the lips. 060 */ 061 V, 062 /** 063 * The surface of a tooth facing the tongue. 064 */ 065 L, 066 /** 067 * The Mesioclusal surfaces of a tooth. 068 */ 069 MO, 070 /** 071 * The Distoclusal surfaces of a tooth. 072 */ 073 DO, 074 /** 075 * The Distoincisal surfaces of a tooth. 076 */ 077 DI, 078 /** 079 * The Mesioclusodistal surfaces of a tooth. 080 */ 081 MOD, 082 /** 083 * added to help the parsers 084 */ 085 NULL; 086 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 115 public String toCode() { 116 switch (this) { 117 case M: 118 return "M"; 119 case O: 120 return "O"; 121 case I: 122 return "I"; 123 case D: 124 return "D"; 125 case B: 126 return "B"; 127 case V: 128 return "V"; 129 case L: 130 return "L"; 131 case MO: 132 return "MO"; 133 case DO: 134 return "DO"; 135 case DI: 136 return "DI"; 137 case MOD: 138 return "MOD"; 139 case NULL: 140 return null; 141 default: 142 return "?"; 143 } 144 } 145 146 public String getSystem() { 147 return "http://terminology.hl7.org/CodeSystem/FDI-surface"; 148 } 149 150 public String getDefinition() { 151 switch (this) { 152 case M: 153 return "The surface of a tooth that is closest to the midline (middle) of the face."; 154 case O: 155 return "The chewing surface of posterior teeth."; 156 case I: 157 return "The biting edge of anterior teeth."; 158 case D: 159 return "The surface of a tooth that faces away from the midline of the face."; 160 case B: 161 return "The surface of a posterior tooth facing the cheeks."; 162 case V: 163 return "The surface of a tooth facing the lips."; 164 case L: 165 return "The surface of a tooth facing the tongue."; 166 case MO: 167 return "The Mesioclusal surfaces of a tooth."; 168 case DO: 169 return "The Distoclusal surfaces of a tooth."; 170 case DI: 171 return "The Distoincisal surfaces of a tooth."; 172 case MOD: 173 return "The Mesioclusodistal surfaces of a tooth."; 174 case NULL: 175 return null; 176 default: 177 return "?"; 178 } 179 } 180 181 public String getDisplay() { 182 switch (this) { 183 case M: 184 return "Mesial"; 185 case O: 186 return "Occlusal"; 187 case I: 188 return "Incisal"; 189 case D: 190 return "Distal"; 191 case B: 192 return "Buccal"; 193 case V: 194 return "Ventral"; 195 case L: 196 return "Lingual"; 197 case MO: 198 return "Mesioclusal"; 199 case DO: 200 return "Distoclusal"; 201 case DI: 202 return "Distoincisal"; 203 case MOD: 204 return "Mesioclusodistal"; 205 case NULL: 206 return null; 207 default: 208 return "?"; 209 } 210 } 211 212}