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.r4.model.EnumFactory;
035
036public class TeethEnumFactory implements EnumFactory<Teeth> {
037
038  public Teeth fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("11".equals(codeString))
042      return Teeth._11;
043    if ("12".equals(codeString))
044      return Teeth._12;
045    if ("13".equals(codeString))
046      return Teeth._13;
047    if ("14".equals(codeString))
048      return Teeth._14;
049    if ("15".equals(codeString))
050      return Teeth._15;
051    if ("16".equals(codeString))
052      return Teeth._16;
053    if ("17".equals(codeString))
054      return Teeth._17;
055    if ("18".equals(codeString))
056      return Teeth._18;
057    if ("21".equals(codeString))
058      return Teeth._21;
059    if ("22".equals(codeString))
060      return Teeth._22;
061    if ("23".equals(codeString))
062      return Teeth._23;
063    if ("24".equals(codeString))
064      return Teeth._24;
065    if ("25".equals(codeString))
066      return Teeth._25;
067    if ("26".equals(codeString))
068      return Teeth._26;
069    if ("27".equals(codeString))
070      return Teeth._27;
071    if ("28".equals(codeString))
072      return Teeth._28;
073    if ("31".equals(codeString))
074      return Teeth._31;
075    if ("32".equals(codeString))
076      return Teeth._32;
077    if ("33".equals(codeString))
078      return Teeth._33;
079    if ("34".equals(codeString))
080      return Teeth._34;
081    if ("35".equals(codeString))
082      return Teeth._35;
083    if ("36".equals(codeString))
084      return Teeth._36;
085    if ("37".equals(codeString))
086      return Teeth._37;
087    if ("38".equals(codeString))
088      return Teeth._38;
089    if ("41".equals(codeString))
090      return Teeth._41;
091    if ("42".equals(codeString))
092      return Teeth._42;
093    if ("43".equals(codeString))
094      return Teeth._43;
095    if ("44".equals(codeString))
096      return Teeth._44;
097    if ("45".equals(codeString))
098      return Teeth._45;
099    if ("46".equals(codeString))
100      return Teeth._46;
101    if ("47".equals(codeString))
102      return Teeth._47;
103    if ("48".equals(codeString))
104      return Teeth._48;
105    throw new IllegalArgumentException("Unknown Teeth code '" + codeString + "'");
106  }
107
108  public String toCode(Teeth code) {
109       if (code == Teeth.NULL)
110           return null;
111       if (code == Teeth._11)
112      return "11";
113    if (code == Teeth._12)
114      return "12";
115    if (code == Teeth._13)
116      return "13";
117    if (code == Teeth._14)
118      return "14";
119    if (code == Teeth._15)
120      return "15";
121    if (code == Teeth._16)
122      return "16";
123    if (code == Teeth._17)
124      return "17";
125    if (code == Teeth._18)
126      return "18";
127    if (code == Teeth._21)
128      return "21";
129    if (code == Teeth._22)
130      return "22";
131    if (code == Teeth._23)
132      return "23";
133    if (code == Teeth._24)
134      return "24";
135    if (code == Teeth._25)
136      return "25";
137    if (code == Teeth._26)
138      return "26";
139    if (code == Teeth._27)
140      return "27";
141    if (code == Teeth._28)
142      return "28";
143    if (code == Teeth._31)
144      return "31";
145    if (code == Teeth._32)
146      return "32";
147    if (code == Teeth._33)
148      return "33";
149    if (code == Teeth._34)
150      return "34";
151    if (code == Teeth._35)
152      return "35";
153    if (code == Teeth._36)
154      return "36";
155    if (code == Teeth._37)
156      return "37";
157    if (code == Teeth._38)
158      return "38";
159    if (code == Teeth._41)
160      return "41";
161    if (code == Teeth._42)
162      return "42";
163    if (code == Teeth._43)
164      return "43";
165    if (code == Teeth._44)
166      return "44";
167    if (code == Teeth._45)
168      return "45";
169    if (code == Teeth._46)
170      return "46";
171    if (code == Teeth._47)
172      return "47";
173    if (code == Teeth._48)
174      return "48";
175    return "?";
176   }
177
178  public String toSystem(Teeth code) {
179    return code.getSystem();
180  }
181
182}