001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
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/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.r4.model.EnumFactory;
057
058public class TeethEnumFactory implements EnumFactory<Teeth> {
059
060  public Teeth fromCode(String codeString) throws IllegalArgumentException {
061    if (codeString == null || "".equals(codeString))
062      return null;
063    if ("11".equals(codeString))
064      return Teeth._11;
065    if ("12".equals(codeString))
066      return Teeth._12;
067    if ("13".equals(codeString))
068      return Teeth._13;
069    if ("14".equals(codeString))
070      return Teeth._14;
071    if ("15".equals(codeString))
072      return Teeth._15;
073    if ("16".equals(codeString))
074      return Teeth._16;
075    if ("17".equals(codeString))
076      return Teeth._17;
077    if ("18".equals(codeString))
078      return Teeth._18;
079    if ("21".equals(codeString))
080      return Teeth._21;
081    if ("22".equals(codeString))
082      return Teeth._22;
083    if ("23".equals(codeString))
084      return Teeth._23;
085    if ("24".equals(codeString))
086      return Teeth._24;
087    if ("25".equals(codeString))
088      return Teeth._25;
089    if ("26".equals(codeString))
090      return Teeth._26;
091    if ("27".equals(codeString))
092      return Teeth._27;
093    if ("28".equals(codeString))
094      return Teeth._28;
095    if ("31".equals(codeString))
096      return Teeth._31;
097    if ("32".equals(codeString))
098      return Teeth._32;
099    if ("33".equals(codeString))
100      return Teeth._33;
101    if ("34".equals(codeString))
102      return Teeth._34;
103    if ("35".equals(codeString))
104      return Teeth._35;
105    if ("36".equals(codeString))
106      return Teeth._36;
107    if ("37".equals(codeString))
108      return Teeth._37;
109    if ("38".equals(codeString))
110      return Teeth._38;
111    if ("41".equals(codeString))
112      return Teeth._41;
113    if ("42".equals(codeString))
114      return Teeth._42;
115    if ("43".equals(codeString))
116      return Teeth._43;
117    if ("44".equals(codeString))
118      return Teeth._44;
119    if ("45".equals(codeString))
120      return Teeth._45;
121    if ("46".equals(codeString))
122      return Teeth._46;
123    if ("47".equals(codeString))
124      return Teeth._47;
125    if ("48".equals(codeString))
126      return Teeth._48;
127    throw new IllegalArgumentException("Unknown Teeth code '"+codeString+"'");
128  }
129
130  public String toCode(Teeth code) {
131    if (code == Teeth._11)
132      return "11";
133    if (code == Teeth._12)
134      return "12";
135    if (code == Teeth._13)
136      return "13";
137    if (code == Teeth._14)
138      return "14";
139    if (code == Teeth._15)
140      return "15";
141    if (code == Teeth._16)
142      return "16";
143    if (code == Teeth._17)
144      return "17";
145    if (code == Teeth._18)
146      return "18";
147    if (code == Teeth._21)
148      return "21";
149    if (code == Teeth._22)
150      return "22";
151    if (code == Teeth._23)
152      return "23";
153    if (code == Teeth._24)
154      return "24";
155    if (code == Teeth._25)
156      return "25";
157    if (code == Teeth._26)
158      return "26";
159    if (code == Teeth._27)
160      return "27";
161    if (code == Teeth._28)
162      return "28";
163    if (code == Teeth._31)
164      return "31";
165    if (code == Teeth._32)
166      return "32";
167    if (code == Teeth._33)
168      return "33";
169    if (code == Teeth._34)
170      return "34";
171    if (code == Teeth._35)
172      return "35";
173    if (code == Teeth._36)
174      return "36";
175    if (code == Teeth._37)
176      return "37";
177    if (code == Teeth._38)
178      return "38";
179    if (code == Teeth._41)
180      return "41";
181    if (code == Teeth._42)
182      return "42";
183    if (code == Teeth._43)
184      return "43";
185    if (code == Teeth._44)
186      return "44";
187    if (code == Teeth._45)
188      return "45";
189    if (code == Teeth._46)
190      return "46";
191    if (code == Teeth._47)
192      return "47";
193    if (code == Teeth._48)
194      return "48";
195    return "?";
196  }
197
198    public String toSystem(Teeth code) {
199      return code.getSystem();
200      }
201
202}
203