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