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 V3ActSiteEnumFactory implements EnumFactory<V3ActSite> {
041
042  public V3ActSite fromCode(String codeString) throws IllegalArgumentException {
043    if (codeString == null || "".equals(codeString))
044      return null;
045    if ("_HumanActSite".equals(codeString))
046      return V3ActSite._HUMANACTSITE;
047    if ("_HumanSubstanceAdministrationSite".equals(codeString))
048      return V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE;
049    if ("BE".equals(codeString))
050      return V3ActSite.BE;
051    if ("BN".equals(codeString))
052      return V3ActSite.BN;
053    if ("BU".equals(codeString))
054      return V3ActSite.BU;
055    if ("LA".equals(codeString))
056      return V3ActSite.LA;
057    if ("LAC".equals(codeString))
058      return V3ActSite.LAC;
059    if ("LACF".equals(codeString))
060      return V3ActSite.LACF;
061    if ("LD".equals(codeString))
062      return V3ActSite.LD;
063    if ("LE".equals(codeString))
064      return V3ActSite.LE;
065    if ("LEJ".equals(codeString))
066      return V3ActSite.LEJ;
067    if ("LF".equals(codeString))
068      return V3ActSite.LF;
069    if ("LG".equals(codeString))
070      return V3ActSite.LG;
071    if ("LH".equals(codeString))
072      return V3ActSite.LH;
073    if ("LIJ".equals(codeString))
074      return V3ActSite.LIJ;
075    if ("LLAQ".equals(codeString))
076      return V3ActSite.LLAQ;
077    if ("LLFA".equals(codeString))
078      return V3ActSite.LLFA;
079    if ("LMFA".equals(codeString))
080      return V3ActSite.LMFA;
081    if ("LN".equals(codeString))
082      return V3ActSite.LN;
083    if ("LPC".equals(codeString))
084      return V3ActSite.LPC;
085    if ("LSC".equals(codeString))
086      return V3ActSite.LSC;
087    if ("LT".equals(codeString))
088      return V3ActSite.LT;
089    if ("LUA".equals(codeString))
090      return V3ActSite.LUA;
091    if ("LUAQ".equals(codeString))
092      return V3ActSite.LUAQ;
093    if ("LUFA".equals(codeString))
094      return V3ActSite.LUFA;
095    if ("LVG".equals(codeString))
096      return V3ActSite.LVG;
097    if ("LVL".equals(codeString))
098      return V3ActSite.LVL;
099    if ("OD".equals(codeString))
100      return V3ActSite.OD;
101    if ("OS".equals(codeString))
102      return V3ActSite.OS;
103    if ("OU".equals(codeString))
104      return V3ActSite.OU;
105    if ("PA".equals(codeString))
106      return V3ActSite.PA;
107    if ("PERIN".equals(codeString))
108      return V3ActSite.PERIN;
109    if ("RA".equals(codeString))
110      return V3ActSite.RA;
111    if ("RAC".equals(codeString))
112      return V3ActSite.RAC;
113    if ("RACF".equals(codeString))
114      return V3ActSite.RACF;
115    if ("RD".equals(codeString))
116      return V3ActSite.RD;
117    if ("RE".equals(codeString))
118      return V3ActSite.RE;
119    if ("REJ".equals(codeString))
120      return V3ActSite.REJ;
121    if ("RF".equals(codeString))
122      return V3ActSite.RF;
123    if ("RG".equals(codeString))
124      return V3ActSite.RG;
125    if ("RH".equals(codeString))
126      return V3ActSite.RH;
127    if ("RIJ".equals(codeString))
128      return V3ActSite.RIJ;
129    if ("RLAQ".equals(codeString))
130      return V3ActSite.RLAQ;
131    if ("RLFA".equals(codeString))
132      return V3ActSite.RLFA;
133    if ("RMFA".equals(codeString))
134      return V3ActSite.RMFA;
135    if ("RN".equals(codeString))
136      return V3ActSite.RN;
137    if ("RPC".equals(codeString))
138      return V3ActSite.RPC;
139    if ("RSC".equals(codeString))
140      return V3ActSite.RSC;
141    if ("RT".equals(codeString))
142      return V3ActSite.RT;
143    if ("RUA".equals(codeString))
144      return V3ActSite.RUA;
145    if ("RUAQ".equals(codeString))
146      return V3ActSite.RUAQ;
147    if ("RUFA".equals(codeString))
148      return V3ActSite.RUFA;
149    if ("RVG".equals(codeString))
150      return V3ActSite.RVG;
151    if ("RVL".equals(codeString))
152      return V3ActSite.RVL;
153    throw new IllegalArgumentException("Unknown V3ActSite code '"+codeString+"'");
154  }
155
156  public String toCode(V3ActSite code) {
157       if (code == V3ActSite.NULL)
158           return null;
159       if (code == V3ActSite._HUMANACTSITE)
160      return "_HumanActSite";
161    if (code == V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE)
162      return "_HumanSubstanceAdministrationSite";
163    if (code == V3ActSite.BE)
164      return "BE";
165    if (code == V3ActSite.BN)
166      return "BN";
167    if (code == V3ActSite.BU)
168      return "BU";
169    if (code == V3ActSite.LA)
170      return "LA";
171    if (code == V3ActSite.LAC)
172      return "LAC";
173    if (code == V3ActSite.LACF)
174      return "LACF";
175    if (code == V3ActSite.LD)
176      return "LD";
177    if (code == V3ActSite.LE)
178      return "LE";
179    if (code == V3ActSite.LEJ)
180      return "LEJ";
181    if (code == V3ActSite.LF)
182      return "LF";
183    if (code == V3ActSite.LG)
184      return "LG";
185    if (code == V3ActSite.LH)
186      return "LH";
187    if (code == V3ActSite.LIJ)
188      return "LIJ";
189    if (code == V3ActSite.LLAQ)
190      return "LLAQ";
191    if (code == V3ActSite.LLFA)
192      return "LLFA";
193    if (code == V3ActSite.LMFA)
194      return "LMFA";
195    if (code == V3ActSite.LN)
196      return "LN";
197    if (code == V3ActSite.LPC)
198      return "LPC";
199    if (code == V3ActSite.LSC)
200      return "LSC";
201    if (code == V3ActSite.LT)
202      return "LT";
203    if (code == V3ActSite.LUA)
204      return "LUA";
205    if (code == V3ActSite.LUAQ)
206      return "LUAQ";
207    if (code == V3ActSite.LUFA)
208      return "LUFA";
209    if (code == V3ActSite.LVG)
210      return "LVG";
211    if (code == V3ActSite.LVL)
212      return "LVL";
213    if (code == V3ActSite.OD)
214      return "OD";
215    if (code == V3ActSite.OS)
216      return "OS";
217    if (code == V3ActSite.OU)
218      return "OU";
219    if (code == V3ActSite.PA)
220      return "PA";
221    if (code == V3ActSite.PERIN)
222      return "PERIN";
223    if (code == V3ActSite.RA)
224      return "RA";
225    if (code == V3ActSite.RAC)
226      return "RAC";
227    if (code == V3ActSite.RACF)
228      return "RACF";
229    if (code == V3ActSite.RD)
230      return "RD";
231    if (code == V3ActSite.RE)
232      return "RE";
233    if (code == V3ActSite.REJ)
234      return "REJ";
235    if (code == V3ActSite.RF)
236      return "RF";
237    if (code == V3ActSite.RG)
238      return "RG";
239    if (code == V3ActSite.RH)
240      return "RH";
241    if (code == V3ActSite.RIJ)
242      return "RIJ";
243    if (code == V3ActSite.RLAQ)
244      return "RLAQ";
245    if (code == V3ActSite.RLFA)
246      return "RLFA";
247    if (code == V3ActSite.RMFA)
248      return "RMFA";
249    if (code == V3ActSite.RN)
250      return "RN";
251    if (code == V3ActSite.RPC)
252      return "RPC";
253    if (code == V3ActSite.RSC)
254      return "RSC";
255    if (code == V3ActSite.RT)
256      return "RT";
257    if (code == V3ActSite.RUA)
258      return "RUA";
259    if (code == V3ActSite.RUAQ)
260      return "RUAQ";
261    if (code == V3ActSite.RUFA)
262      return "RUFA";
263    if (code == V3ActSite.RVG)
264      return "RVG";
265    if (code == V3ActSite.RVL)
266      return "RVL";
267    return "?";
268   }
269
270    public String toSystem(V3ActSite code) {
271      return code.getSystem();
272      }
273
274}