001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.r4.model.EnumFactory;
057
058public class V3ActSiteEnumFactory implements EnumFactory<V3ActSite> {
059
060  public V3ActSite fromCode(String codeString) throws IllegalArgumentException {
061    if (codeString == null || "".equals(codeString))
062      return null;
063    if ("_HumanActSite".equals(codeString))
064      return V3ActSite._HUMANACTSITE;
065    if ("_HumanSubstanceAdministrationSite".equals(codeString))
066      return V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE;
067    if ("BE".equals(codeString))
068      return V3ActSite.BE;
069    if ("BN".equals(codeString))
070      return V3ActSite.BN;
071    if ("BU".equals(codeString))
072      return V3ActSite.BU;
073    if ("LA".equals(codeString))
074      return V3ActSite.LA;
075    if ("LAC".equals(codeString))
076      return V3ActSite.LAC;
077    if ("LACF".equals(codeString))
078      return V3ActSite.LACF;
079    if ("LD".equals(codeString))
080      return V3ActSite.LD;
081    if ("LE".equals(codeString))
082      return V3ActSite.LE;
083    if ("LEJ".equals(codeString))
084      return V3ActSite.LEJ;
085    if ("LF".equals(codeString))
086      return V3ActSite.LF;
087    if ("LG".equals(codeString))
088      return V3ActSite.LG;
089    if ("LH".equals(codeString))
090      return V3ActSite.LH;
091    if ("LIJ".equals(codeString))
092      return V3ActSite.LIJ;
093    if ("LLAQ".equals(codeString))
094      return V3ActSite.LLAQ;
095    if ("LLFA".equals(codeString))
096      return V3ActSite.LLFA;
097    if ("LMFA".equals(codeString))
098      return V3ActSite.LMFA;
099    if ("LN".equals(codeString))
100      return V3ActSite.LN;
101    if ("LPC".equals(codeString))
102      return V3ActSite.LPC;
103    if ("LSC".equals(codeString))
104      return V3ActSite.LSC;
105    if ("LT".equals(codeString))
106      return V3ActSite.LT;
107    if ("LUA".equals(codeString))
108      return V3ActSite.LUA;
109    if ("LUAQ".equals(codeString))
110      return V3ActSite.LUAQ;
111    if ("LUFA".equals(codeString))
112      return V3ActSite.LUFA;
113    if ("LVG".equals(codeString))
114      return V3ActSite.LVG;
115    if ("LVL".equals(codeString))
116      return V3ActSite.LVL;
117    if ("OD".equals(codeString))
118      return V3ActSite.OD;
119    if ("OS".equals(codeString))
120      return V3ActSite.OS;
121    if ("OU".equals(codeString))
122      return V3ActSite.OU;
123    if ("PA".equals(codeString))
124      return V3ActSite.PA;
125    if ("PERIN".equals(codeString))
126      return V3ActSite.PERIN;
127    if ("RA".equals(codeString))
128      return V3ActSite.RA;
129    if ("RAC".equals(codeString))
130      return V3ActSite.RAC;
131    if ("RACF".equals(codeString))
132      return V3ActSite.RACF;
133    if ("RD".equals(codeString))
134      return V3ActSite.RD;
135    if ("RE".equals(codeString))
136      return V3ActSite.RE;
137    if ("REJ".equals(codeString))
138      return V3ActSite.REJ;
139    if ("RF".equals(codeString))
140      return V3ActSite.RF;
141    if ("RG".equals(codeString))
142      return V3ActSite.RG;
143    if ("RH".equals(codeString))
144      return V3ActSite.RH;
145    if ("RIJ".equals(codeString))
146      return V3ActSite.RIJ;
147    if ("RLAQ".equals(codeString))
148      return V3ActSite.RLAQ;
149    if ("RLFA".equals(codeString))
150      return V3ActSite.RLFA;
151    if ("RMFA".equals(codeString))
152      return V3ActSite.RMFA;
153    if ("RN".equals(codeString))
154      return V3ActSite.RN;
155    if ("RPC".equals(codeString))
156      return V3ActSite.RPC;
157    if ("RSC".equals(codeString))
158      return V3ActSite.RSC;
159    if ("RT".equals(codeString))
160      return V3ActSite.RT;
161    if ("RUA".equals(codeString))
162      return V3ActSite.RUA;
163    if ("RUAQ".equals(codeString))
164      return V3ActSite.RUAQ;
165    if ("RUFA".equals(codeString))
166      return V3ActSite.RUFA;
167    if ("RVG".equals(codeString))
168      return V3ActSite.RVG;
169    if ("RVL".equals(codeString))
170      return V3ActSite.RVL;
171    throw new IllegalArgumentException("Unknown V3ActSite code '"+codeString+"'");
172  }
173
174  public String toCode(V3ActSite code) {
175    if (code == V3ActSite._HUMANACTSITE)
176      return "_HumanActSite";
177    if (code == V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE)
178      return "_HumanSubstanceAdministrationSite";
179    if (code == V3ActSite.BE)
180      return "BE";
181    if (code == V3ActSite.BN)
182      return "BN";
183    if (code == V3ActSite.BU)
184      return "BU";
185    if (code == V3ActSite.LA)
186      return "LA";
187    if (code == V3ActSite.LAC)
188      return "LAC";
189    if (code == V3ActSite.LACF)
190      return "LACF";
191    if (code == V3ActSite.LD)
192      return "LD";
193    if (code == V3ActSite.LE)
194      return "LE";
195    if (code == V3ActSite.LEJ)
196      return "LEJ";
197    if (code == V3ActSite.LF)
198      return "LF";
199    if (code == V3ActSite.LG)
200      return "LG";
201    if (code == V3ActSite.LH)
202      return "LH";
203    if (code == V3ActSite.LIJ)
204      return "LIJ";
205    if (code == V3ActSite.LLAQ)
206      return "LLAQ";
207    if (code == V3ActSite.LLFA)
208      return "LLFA";
209    if (code == V3ActSite.LMFA)
210      return "LMFA";
211    if (code == V3ActSite.LN)
212      return "LN";
213    if (code == V3ActSite.LPC)
214      return "LPC";
215    if (code == V3ActSite.LSC)
216      return "LSC";
217    if (code == V3ActSite.LT)
218      return "LT";
219    if (code == V3ActSite.LUA)
220      return "LUA";
221    if (code == V3ActSite.LUAQ)
222      return "LUAQ";
223    if (code == V3ActSite.LUFA)
224      return "LUFA";
225    if (code == V3ActSite.LVG)
226      return "LVG";
227    if (code == V3ActSite.LVL)
228      return "LVL";
229    if (code == V3ActSite.OD)
230      return "OD";
231    if (code == V3ActSite.OS)
232      return "OS";
233    if (code == V3ActSite.OU)
234      return "OU";
235    if (code == V3ActSite.PA)
236      return "PA";
237    if (code == V3ActSite.PERIN)
238      return "PERIN";
239    if (code == V3ActSite.RA)
240      return "RA";
241    if (code == V3ActSite.RAC)
242      return "RAC";
243    if (code == V3ActSite.RACF)
244      return "RACF";
245    if (code == V3ActSite.RD)
246      return "RD";
247    if (code == V3ActSite.RE)
248      return "RE";
249    if (code == V3ActSite.REJ)
250      return "REJ";
251    if (code == V3ActSite.RF)
252      return "RF";
253    if (code == V3ActSite.RG)
254      return "RG";
255    if (code == V3ActSite.RH)
256      return "RH";
257    if (code == V3ActSite.RIJ)
258      return "RIJ";
259    if (code == V3ActSite.RLAQ)
260      return "RLAQ";
261    if (code == V3ActSite.RLFA)
262      return "RLFA";
263    if (code == V3ActSite.RMFA)
264      return "RMFA";
265    if (code == V3ActSite.RN)
266      return "RN";
267    if (code == V3ActSite.RPC)
268      return "RPC";
269    if (code == V3ActSite.RSC)
270      return "RSC";
271    if (code == V3ActSite.RT)
272      return "RT";
273    if (code == V3ActSite.RUA)
274      return "RUA";
275    if (code == V3ActSite.RUAQ)
276      return "RUAQ";
277    if (code == V3ActSite.RUFA)
278      return "RUFA";
279    if (code == V3ActSite.RVG)
280      return "RVG";
281    if (code == V3ActSite.RVL)
282      return "RVL";
283    return "?";
284  }
285
286    public String toSystem(V3ActSite code) {
287      return code.getSystem();
288      }
289
290}
291