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 V3Hl7PublishingDomainEnumFactory implements EnumFactory<V3Hl7PublishingDomain> {
059
060  public V3Hl7PublishingDomain fromCode(String codeString) throws IllegalArgumentException {
061    if (codeString == null || "".equals(codeString))
062      return null;
063    if ("AB".equals(codeString))
064      return V3Hl7PublishingDomain.AB;
065    if ("AI".equals(codeString))
066      return V3Hl7PublishingDomain.AI;
067    if ("AL".equals(codeString))
068      return V3Hl7PublishingDomain.AL;
069    if ("BB".equals(codeString))
070      return V3Hl7PublishingDomain.BB;
071    if ("CD".equals(codeString))
072      return V3Hl7PublishingDomain.CD;
073    if ("CG".equals(codeString))
074      return V3Hl7PublishingDomain.CG;
075    if ("CI".equals(codeString))
076      return V3Hl7PublishingDomain.CI;
077    if ("CO".equals(codeString))
078      return V3Hl7PublishingDomain.CO;
079    if ("CP".equals(codeString))
080      return V3Hl7PublishingDomain.CP;
081    if ("CR".equals(codeString))
082      return V3Hl7PublishingDomain.CR;
083    if ("CS".equals(codeString))
084      return V3Hl7PublishingDomain.CS;
085    if ("CT".equals(codeString))
086      return V3Hl7PublishingDomain.CT;
087    if ("DD".equals(codeString))
088      return V3Hl7PublishingDomain.DD;
089    if ("DI".equals(codeString))
090      return V3Hl7PublishingDomain.DI;
091    if ("DS".equals(codeString))
092      return V3Hl7PublishingDomain.DS;
093    if ("EM".equals(codeString))
094      return V3Hl7PublishingDomain.EM;
095    if ("II".equals(codeString))
096      return V3Hl7PublishingDomain.II;
097    if ("IZ".equals(codeString))
098      return V3Hl7PublishingDomain.IZ;
099    if ("LB".equals(codeString))
100      return V3Hl7PublishingDomain.LB;
101    if ("ME".equals(codeString))
102      return V3Hl7PublishingDomain.ME;
103    if ("MI".equals(codeString))
104      return V3Hl7PublishingDomain.MI;
105    if ("MM".equals(codeString))
106      return V3Hl7PublishingDomain.MM;
107    if ("MR".equals(codeString))
108      return V3Hl7PublishingDomain.MR;
109    if ("MT".equals(codeString))
110      return V3Hl7PublishingDomain.MT;
111    if ("OB".equals(codeString))
112      return V3Hl7PublishingDomain.OB;
113    if ("OO".equals(codeString))
114      return V3Hl7PublishingDomain.OO;
115    if ("OR".equals(codeString))
116      return V3Hl7PublishingDomain.OR;
117    if ("PA".equals(codeString))
118      return V3Hl7PublishingDomain.PA;
119    if ("PC".equals(codeString))
120      return V3Hl7PublishingDomain.PC;
121    if ("PH".equals(codeString))
122      return V3Hl7PublishingDomain.PH;
123    if ("PM".equals(codeString))
124      return V3Hl7PublishingDomain.PM;
125    if ("QI".equals(codeString))
126      return V3Hl7PublishingDomain.QI;
127    if ("QM".equals(codeString))
128      return V3Hl7PublishingDomain.QM;
129    if ("RG".equals(codeString))
130      return V3Hl7PublishingDomain.RG;
131    if ("RI".equals(codeString))
132      return V3Hl7PublishingDomain.RI;
133    if ("RP".equals(codeString))
134      return V3Hl7PublishingDomain.RP;
135    if ("RR".equals(codeString))
136      return V3Hl7PublishingDomain.RR;
137    if ("RT".equals(codeString))
138      return V3Hl7PublishingDomain.RT;
139    if ("RX".equals(codeString))
140      return V3Hl7PublishingDomain.RX;
141    if ("SC".equals(codeString))
142      return V3Hl7PublishingDomain.SC;
143    if ("SP".equals(codeString))
144      return V3Hl7PublishingDomain.SP;
145    if ("TD".equals(codeString))
146      return V3Hl7PublishingDomain.TD;
147    throw new IllegalArgumentException("Unknown V3Hl7PublishingDomain code '"+codeString+"'");
148  }
149
150  public String toCode(V3Hl7PublishingDomain code) {
151    if (code == V3Hl7PublishingDomain.AB)
152      return "AB";
153    if (code == V3Hl7PublishingDomain.AI)
154      return "AI";
155    if (code == V3Hl7PublishingDomain.AL)
156      return "AL";
157    if (code == V3Hl7PublishingDomain.BB)
158      return "BB";
159    if (code == V3Hl7PublishingDomain.CD)
160      return "CD";
161    if (code == V3Hl7PublishingDomain.CG)
162      return "CG";
163    if (code == V3Hl7PublishingDomain.CI)
164      return "CI";
165    if (code == V3Hl7PublishingDomain.CO)
166      return "CO";
167    if (code == V3Hl7PublishingDomain.CP)
168      return "CP";
169    if (code == V3Hl7PublishingDomain.CR)
170      return "CR";
171    if (code == V3Hl7PublishingDomain.CS)
172      return "CS";
173    if (code == V3Hl7PublishingDomain.CT)
174      return "CT";
175    if (code == V3Hl7PublishingDomain.DD)
176      return "DD";
177    if (code == V3Hl7PublishingDomain.DI)
178      return "DI";
179    if (code == V3Hl7PublishingDomain.DS)
180      return "DS";
181    if (code == V3Hl7PublishingDomain.EM)
182      return "EM";
183    if (code == V3Hl7PublishingDomain.II)
184      return "II";
185    if (code == V3Hl7PublishingDomain.IZ)
186      return "IZ";
187    if (code == V3Hl7PublishingDomain.LB)
188      return "LB";
189    if (code == V3Hl7PublishingDomain.ME)
190      return "ME";
191    if (code == V3Hl7PublishingDomain.MI)
192      return "MI";
193    if (code == V3Hl7PublishingDomain.MM)
194      return "MM";
195    if (code == V3Hl7PublishingDomain.MR)
196      return "MR";
197    if (code == V3Hl7PublishingDomain.MT)
198      return "MT";
199    if (code == V3Hl7PublishingDomain.OB)
200      return "OB";
201    if (code == V3Hl7PublishingDomain.OO)
202      return "OO";
203    if (code == V3Hl7PublishingDomain.OR)
204      return "OR";
205    if (code == V3Hl7PublishingDomain.PA)
206      return "PA";
207    if (code == V3Hl7PublishingDomain.PC)
208      return "PC";
209    if (code == V3Hl7PublishingDomain.PH)
210      return "PH";
211    if (code == V3Hl7PublishingDomain.PM)
212      return "PM";
213    if (code == V3Hl7PublishingDomain.QI)
214      return "QI";
215    if (code == V3Hl7PublishingDomain.QM)
216      return "QM";
217    if (code == V3Hl7PublishingDomain.RG)
218      return "RG";
219    if (code == V3Hl7PublishingDomain.RI)
220      return "RI";
221    if (code == V3Hl7PublishingDomain.RP)
222      return "RP";
223    if (code == V3Hl7PublishingDomain.RR)
224      return "RR";
225    if (code == V3Hl7PublishingDomain.RT)
226      return "RT";
227    if (code == V3Hl7PublishingDomain.RX)
228      return "RX";
229    if (code == V3Hl7PublishingDomain.SC)
230      return "SC";
231    if (code == V3Hl7PublishingDomain.SP)
232      return "SP";
233    if (code == V3Hl7PublishingDomain.TD)
234      return "TD";
235    return "?";
236  }
237
238    public String toSystem(V3Hl7PublishingDomain code) {
239      return code.getSystem();
240      }
241
242}
243