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 V3VaccineManufacturerEnumFactory implements EnumFactory<V3VaccineManufacturer> {
037
038  public V3VaccineManufacturer fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("AB".equals(codeString))
042      return V3VaccineManufacturer.AB;
043    if ("AD".equals(codeString))
044      return V3VaccineManufacturer.AD;
045    if ("ALP".equals(codeString))
046      return V3VaccineManufacturer.ALP;
047    if ("AR".equals(codeString))
048      return V3VaccineManufacturer.AR;
049    if ("AVI".equals(codeString))
050      return V3VaccineManufacturer.AVI;
051    if ("BA".equals(codeString))
052      return V3VaccineManufacturer.BA;
053    if ("BAY".equals(codeString))
054      return V3VaccineManufacturer.BAY;
055    if ("BP".equals(codeString))
056      return V3VaccineManufacturer.BP;
057    if ("BPC".equals(codeString))
058      return V3VaccineManufacturer.BPC;
059    if ("CEN".equals(codeString))
060      return V3VaccineManufacturer.CEN;
061    if ("CHI".equals(codeString))
062      return V3VaccineManufacturer.CHI;
063    if ("CON".equals(codeString))
064      return V3VaccineManufacturer.CON;
065    if ("EVN".equals(codeString))
066      return V3VaccineManufacturer.EVN;
067    if ("GRE".equals(codeString))
068      return V3VaccineManufacturer.GRE;
069    if ("IAG".equals(codeString))
070      return V3VaccineManufacturer.IAG;
071    if ("IM".equals(codeString))
072      return V3VaccineManufacturer.IM;
073    if ("IUS".equals(codeString))
074      return V3VaccineManufacturer.IUS;
075    if ("JPN".equals(codeString))
076      return V3VaccineManufacturer.JPN;
077    if ("KGC".equals(codeString))
078      return V3VaccineManufacturer.KGC;
079    if ("LED".equals(codeString))
080      return V3VaccineManufacturer.LED;
081    if ("MA".equals(codeString))
082      return V3VaccineManufacturer.MA;
083    if ("MED".equals(codeString))
084      return V3VaccineManufacturer.MED;
085    if ("MIL".equals(codeString))
086      return V3VaccineManufacturer.MIL;
087    if ("MIP".equals(codeString))
088      return V3VaccineManufacturer.MIP;
089    if ("MSD".equals(codeString))
090      return V3VaccineManufacturer.MSD;
091    if ("NAB".equals(codeString))
092      return V3VaccineManufacturer.NAB;
093    if ("NAV".equals(codeString))
094      return V3VaccineManufacturer.NAV;
095    if ("NOV".equals(codeString))
096      return V3VaccineManufacturer.NOV;
097    if ("NYB".equals(codeString))
098      return V3VaccineManufacturer.NYB;
099    if ("ORT".equals(codeString))
100      return V3VaccineManufacturer.ORT;
101    if ("OTC".equals(codeString))
102      return V3VaccineManufacturer.OTC;
103    if ("PD".equals(codeString))
104      return V3VaccineManufacturer.PD;
105    if ("PMC".equals(codeString))
106      return V3VaccineManufacturer.PMC;
107    if ("PRX".equals(codeString))
108      return V3VaccineManufacturer.PRX;
109    if ("SCL".equals(codeString))
110      return V3VaccineManufacturer.SCL;
111    if ("SI".equals(codeString))
112      return V3VaccineManufacturer.SI;
113    if ("SKB".equals(codeString))
114      return V3VaccineManufacturer.SKB;
115    if ("USA".equals(codeString))
116      return V3VaccineManufacturer.USA;
117    if ("WA".equals(codeString))
118      return V3VaccineManufacturer.WA;
119    if ("WAL".equals(codeString))
120      return V3VaccineManufacturer.WAL;
121    throw new IllegalArgumentException("Unknown V3VaccineManufacturer code '" + codeString + "'");
122  }
123
124  public String toCode(V3VaccineManufacturer code) {
125    if (code == V3VaccineManufacturer.AB)
126      return "AB";
127    if (code == V3VaccineManufacturer.AD)
128      return "AD";
129    if (code == V3VaccineManufacturer.ALP)
130      return "ALP";
131    if (code == V3VaccineManufacturer.AR)
132      return "AR";
133    if (code == V3VaccineManufacturer.AVI)
134      return "AVI";
135    if (code == V3VaccineManufacturer.BA)
136      return "BA";
137    if (code == V3VaccineManufacturer.BAY)
138      return "BAY";
139    if (code == V3VaccineManufacturer.BP)
140      return "BP";
141    if (code == V3VaccineManufacturer.BPC)
142      return "BPC";
143    if (code == V3VaccineManufacturer.CEN)
144      return "CEN";
145    if (code == V3VaccineManufacturer.CHI)
146      return "CHI";
147    if (code == V3VaccineManufacturer.CON)
148      return "CON";
149    if (code == V3VaccineManufacturer.EVN)
150      return "EVN";
151    if (code == V3VaccineManufacturer.GRE)
152      return "GRE";
153    if (code == V3VaccineManufacturer.IAG)
154      return "IAG";
155    if (code == V3VaccineManufacturer.IM)
156      return "IM";
157    if (code == V3VaccineManufacturer.IUS)
158      return "IUS";
159    if (code == V3VaccineManufacturer.JPN)
160      return "JPN";
161    if (code == V3VaccineManufacturer.KGC)
162      return "KGC";
163    if (code == V3VaccineManufacturer.LED)
164      return "LED";
165    if (code == V3VaccineManufacturer.MA)
166      return "MA";
167    if (code == V3VaccineManufacturer.MED)
168      return "MED";
169    if (code == V3VaccineManufacturer.MIL)
170      return "MIL";
171    if (code == V3VaccineManufacturer.MIP)
172      return "MIP";
173    if (code == V3VaccineManufacturer.MSD)
174      return "MSD";
175    if (code == V3VaccineManufacturer.NAB)
176      return "NAB";
177    if (code == V3VaccineManufacturer.NAV)
178      return "NAV";
179    if (code == V3VaccineManufacturer.NOV)
180      return "NOV";
181    if (code == V3VaccineManufacturer.NYB)
182      return "NYB";
183    if (code == V3VaccineManufacturer.ORT)
184      return "ORT";
185    if (code == V3VaccineManufacturer.OTC)
186      return "OTC";
187    if (code == V3VaccineManufacturer.PD)
188      return "PD";
189    if (code == V3VaccineManufacturer.PMC)
190      return "PMC";
191    if (code == V3VaccineManufacturer.PRX)
192      return "PRX";
193    if (code == V3VaccineManufacturer.SCL)
194      return "SCL";
195    if (code == V3VaccineManufacturer.SI)
196      return "SI";
197    if (code == V3VaccineManufacturer.SKB)
198      return "SKB";
199    if (code == V3VaccineManufacturer.USA)
200      return "USA";
201    if (code == V3VaccineManufacturer.WA)
202      return "WA";
203    if (code == V3VaccineManufacturer.WAL)
204      return "WAL";
205    return "?";
206  }
207
208  public String toSystem(V3VaccineManufacturer code) {
209    return code.getSystem();
210  }
211
212}