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