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._11)
110      return "11";
111    if (code == Teeth._12)
112      return "12";
113    if (code == Teeth._13)
114      return "13";
115    if (code == Teeth._14)
116      return "14";
117    if (code == Teeth._15)
118      return "15";
119    if (code == Teeth._16)
120      return "16";
121    if (code == Teeth._17)
122      return "17";
123    if (code == Teeth._18)
124      return "18";
125    if (code == Teeth._21)
126      return "21";
127    if (code == Teeth._22)
128      return "22";
129    if (code == Teeth._23)
130      return "23";
131    if (code == Teeth._24)
132      return "24";
133    if (code == Teeth._25)
134      return "25";
135    if (code == Teeth._26)
136      return "26";
137    if (code == Teeth._27)
138      return "27";
139    if (code == Teeth._28)
140      return "28";
141    if (code == Teeth._31)
142      return "31";
143    if (code == Teeth._32)
144      return "32";
145    if (code == Teeth._33)
146      return "33";
147    if (code == Teeth._34)
148      return "34";
149    if (code == Teeth._35)
150      return "35";
151    if (code == Teeth._36)
152      return "36";
153    if (code == Teeth._37)
154      return "37";
155    if (code == Teeth._38)
156      return "38";
157    if (code == Teeth._41)
158      return "41";
159    if (code == Teeth._42)
160      return "42";
161    if (code == Teeth._43)
162      return "43";
163    if (code == Teeth._44)
164      return "44";
165    if (code == Teeth._45)
166      return "45";
167    if (code == Teeth._46)
168      return "46";
169    if (code == Teeth._47)
170      return "47";
171    if (code == Teeth._48)
172      return "48";
173    return "?";
174  }
175
176  public String toSystem(Teeth code) {
177    return code.getSystem();
178  }
179
180}