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