001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.r4.model.EnumFactory;
035
036public class V3Hl7PublishingDomainEnumFactory implements EnumFactory<V3Hl7PublishingDomain> {
037
038  public V3Hl7PublishingDomain fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("AB".equals(codeString))
042      return V3Hl7PublishingDomain.AB;
043    if ("AI".equals(codeString))
044      return V3Hl7PublishingDomain.AI;
045    if ("AL".equals(codeString))
046      return V3Hl7PublishingDomain.AL;
047    if ("BB".equals(codeString))
048      return V3Hl7PublishingDomain.BB;
049    if ("CD".equals(codeString))
050      return V3Hl7PublishingDomain.CD;
051    if ("CG".equals(codeString))
052      return V3Hl7PublishingDomain.CG;
053    if ("CI".equals(codeString))
054      return V3Hl7PublishingDomain.CI;
055    if ("CO".equals(codeString))
056      return V3Hl7PublishingDomain.CO;
057    if ("CP".equals(codeString))
058      return V3Hl7PublishingDomain.CP;
059    if ("CR".equals(codeString))
060      return V3Hl7PublishingDomain.CR;
061    if ("CS".equals(codeString))
062      return V3Hl7PublishingDomain.CS;
063    if ("CT".equals(codeString))
064      return V3Hl7PublishingDomain.CT;
065    if ("DD".equals(codeString))
066      return V3Hl7PublishingDomain.DD;
067    if ("DI".equals(codeString))
068      return V3Hl7PublishingDomain.DI;
069    if ("DS".equals(codeString))
070      return V3Hl7PublishingDomain.DS;
071    if ("EM".equals(codeString))
072      return V3Hl7PublishingDomain.EM;
073    if ("II".equals(codeString))
074      return V3Hl7PublishingDomain.II;
075    if ("IZ".equals(codeString))
076      return V3Hl7PublishingDomain.IZ;
077    if ("LB".equals(codeString))
078      return V3Hl7PublishingDomain.LB;
079    if ("ME".equals(codeString))
080      return V3Hl7PublishingDomain.ME;
081    if ("MI".equals(codeString))
082      return V3Hl7PublishingDomain.MI;
083    if ("MM".equals(codeString))
084      return V3Hl7PublishingDomain.MM;
085    if ("MR".equals(codeString))
086      return V3Hl7PublishingDomain.MR;
087    if ("MT".equals(codeString))
088      return V3Hl7PublishingDomain.MT;
089    if ("OB".equals(codeString))
090      return V3Hl7PublishingDomain.OB;
091    if ("OO".equals(codeString))
092      return V3Hl7PublishingDomain.OO;
093    if ("OR".equals(codeString))
094      return V3Hl7PublishingDomain.OR;
095    if ("PA".equals(codeString))
096      return V3Hl7PublishingDomain.PA;
097    if ("PC".equals(codeString))
098      return V3Hl7PublishingDomain.PC;
099    if ("PH".equals(codeString))
100      return V3Hl7PublishingDomain.PH;
101    if ("PM".equals(codeString))
102      return V3Hl7PublishingDomain.PM;
103    if ("QI".equals(codeString))
104      return V3Hl7PublishingDomain.QI;
105    if ("QM".equals(codeString))
106      return V3Hl7PublishingDomain.QM;
107    if ("RG".equals(codeString))
108      return V3Hl7PublishingDomain.RG;
109    if ("RI".equals(codeString))
110      return V3Hl7PublishingDomain.RI;
111    if ("RP".equals(codeString))
112      return V3Hl7PublishingDomain.RP;
113    if ("RR".equals(codeString))
114      return V3Hl7PublishingDomain.RR;
115    if ("RT".equals(codeString))
116      return V3Hl7PublishingDomain.RT;
117    if ("RX".equals(codeString))
118      return V3Hl7PublishingDomain.RX;
119    if ("SC".equals(codeString))
120      return V3Hl7PublishingDomain.SC;
121    if ("SP".equals(codeString))
122      return V3Hl7PublishingDomain.SP;
123    if ("TD".equals(codeString))
124      return V3Hl7PublishingDomain.TD;
125    throw new IllegalArgumentException("Unknown V3Hl7PublishingDomain code '" + codeString + "'");
126  }
127
128  public String toCode(V3Hl7PublishingDomain code) {
129       if (code == V3Hl7PublishingDomain.NULL)
130           return null;
131       if (code == V3Hl7PublishingDomain.AB)
132      return "AB";
133    if (code == V3Hl7PublishingDomain.AI)
134      return "AI";
135    if (code == V3Hl7PublishingDomain.AL)
136      return "AL";
137    if (code == V3Hl7PublishingDomain.BB)
138      return "BB";
139    if (code == V3Hl7PublishingDomain.CD)
140      return "CD";
141    if (code == V3Hl7PublishingDomain.CG)
142      return "CG";
143    if (code == V3Hl7PublishingDomain.CI)
144      return "CI";
145    if (code == V3Hl7PublishingDomain.CO)
146      return "CO";
147    if (code == V3Hl7PublishingDomain.CP)
148      return "CP";
149    if (code == V3Hl7PublishingDomain.CR)
150      return "CR";
151    if (code == V3Hl7PublishingDomain.CS)
152      return "CS";
153    if (code == V3Hl7PublishingDomain.CT)
154      return "CT";
155    if (code == V3Hl7PublishingDomain.DD)
156      return "DD";
157    if (code == V3Hl7PublishingDomain.DI)
158      return "DI";
159    if (code == V3Hl7PublishingDomain.DS)
160      return "DS";
161    if (code == V3Hl7PublishingDomain.EM)
162      return "EM";
163    if (code == V3Hl7PublishingDomain.II)
164      return "II";
165    if (code == V3Hl7PublishingDomain.IZ)
166      return "IZ";
167    if (code == V3Hl7PublishingDomain.LB)
168      return "LB";
169    if (code == V3Hl7PublishingDomain.ME)
170      return "ME";
171    if (code == V3Hl7PublishingDomain.MI)
172      return "MI";
173    if (code == V3Hl7PublishingDomain.MM)
174      return "MM";
175    if (code == V3Hl7PublishingDomain.MR)
176      return "MR";
177    if (code == V3Hl7PublishingDomain.MT)
178      return "MT";
179    if (code == V3Hl7PublishingDomain.OB)
180      return "OB";
181    if (code == V3Hl7PublishingDomain.OO)
182      return "OO";
183    if (code == V3Hl7PublishingDomain.OR)
184      return "OR";
185    if (code == V3Hl7PublishingDomain.PA)
186      return "PA";
187    if (code == V3Hl7PublishingDomain.PC)
188      return "PC";
189    if (code == V3Hl7PublishingDomain.PH)
190      return "PH";
191    if (code == V3Hl7PublishingDomain.PM)
192      return "PM";
193    if (code == V3Hl7PublishingDomain.QI)
194      return "QI";
195    if (code == V3Hl7PublishingDomain.QM)
196      return "QM";
197    if (code == V3Hl7PublishingDomain.RG)
198      return "RG";
199    if (code == V3Hl7PublishingDomain.RI)
200      return "RI";
201    if (code == V3Hl7PublishingDomain.RP)
202      return "RP";
203    if (code == V3Hl7PublishingDomain.RR)
204      return "RR";
205    if (code == V3Hl7PublishingDomain.RT)
206      return "RT";
207    if (code == V3Hl7PublishingDomain.RX)
208      return "RX";
209    if (code == V3Hl7PublishingDomain.SC)
210      return "SC";
211    if (code == V3Hl7PublishingDomain.SP)
212      return "SP";
213    if (code == V3Hl7PublishingDomain.TD)
214      return "TD";
215    return "?";
216   }
217
218  public String toSystem(V3Hl7PublishingDomain code) {
219    return code.getSystem();
220  }
221
222}