001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 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 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.r5.model.EnumFactory; 056 057public class V3VaccineManufacturerEnumFactory implements EnumFactory<V3VaccineManufacturer> { 058 059 public V3VaccineManufacturer fromCode(String codeString) throws IllegalArgumentException { 060 if (codeString == null || "".equals(codeString)) 061 return null; 062 if ("AB".equals(codeString)) 063 return V3VaccineManufacturer.AB; 064 if ("AD".equals(codeString)) 065 return V3VaccineManufacturer.AD; 066 if ("ALP".equals(codeString)) 067 return V3VaccineManufacturer.ALP; 068 if ("AR".equals(codeString)) 069 return V3VaccineManufacturer.AR; 070 if ("AVI".equals(codeString)) 071 return V3VaccineManufacturer.AVI; 072 if ("BA".equals(codeString)) 073 return V3VaccineManufacturer.BA; 074 if ("BAY".equals(codeString)) 075 return V3VaccineManufacturer.BAY; 076 if ("BP".equals(codeString)) 077 return V3VaccineManufacturer.BP; 078 if ("BPC".equals(codeString)) 079 return V3VaccineManufacturer.BPC; 080 if ("CEN".equals(codeString)) 081 return V3VaccineManufacturer.CEN; 082 if ("CHI".equals(codeString)) 083 return V3VaccineManufacturer.CHI; 084 if ("CON".equals(codeString)) 085 return V3VaccineManufacturer.CON; 086 if ("EVN".equals(codeString)) 087 return V3VaccineManufacturer.EVN; 088 if ("GRE".equals(codeString)) 089 return V3VaccineManufacturer.GRE; 090 if ("IAG".equals(codeString)) 091 return V3VaccineManufacturer.IAG; 092 if ("IM".equals(codeString)) 093 return V3VaccineManufacturer.IM; 094 if ("IUS".equals(codeString)) 095 return V3VaccineManufacturer.IUS; 096 if ("JPN".equals(codeString)) 097 return V3VaccineManufacturer.JPN; 098 if ("KGC".equals(codeString)) 099 return V3VaccineManufacturer.KGC; 100 if ("LED".equals(codeString)) 101 return V3VaccineManufacturer.LED; 102 if ("MA".equals(codeString)) 103 return V3VaccineManufacturer.MA; 104 if ("MED".equals(codeString)) 105 return V3VaccineManufacturer.MED; 106 if ("MIL".equals(codeString)) 107 return V3VaccineManufacturer.MIL; 108 if ("MIP".equals(codeString)) 109 return V3VaccineManufacturer.MIP; 110 if ("MSD".equals(codeString)) 111 return V3VaccineManufacturer.MSD; 112 if ("NAB".equals(codeString)) 113 return V3VaccineManufacturer.NAB; 114 if ("NAV".equals(codeString)) 115 return V3VaccineManufacturer.NAV; 116 if ("NOV".equals(codeString)) 117 return V3VaccineManufacturer.NOV; 118 if ("NYB".equals(codeString)) 119 return V3VaccineManufacturer.NYB; 120 if ("ORT".equals(codeString)) 121 return V3VaccineManufacturer.ORT; 122 if ("OTC".equals(codeString)) 123 return V3VaccineManufacturer.OTC; 124 if ("PD".equals(codeString)) 125 return V3VaccineManufacturer.PD; 126 if ("PMC".equals(codeString)) 127 return V3VaccineManufacturer.PMC; 128 if ("PRX".equals(codeString)) 129 return V3VaccineManufacturer.PRX; 130 if ("SCL".equals(codeString)) 131 return V3VaccineManufacturer.SCL; 132 if ("SI".equals(codeString)) 133 return V3VaccineManufacturer.SI; 134 if ("SKB".equals(codeString)) 135 return V3VaccineManufacturer.SKB; 136 if ("USA".equals(codeString)) 137 return V3VaccineManufacturer.USA; 138 if ("WA".equals(codeString)) 139 return V3VaccineManufacturer.WA; 140 if ("WAL".equals(codeString)) 141 return V3VaccineManufacturer.WAL; 142 throw new IllegalArgumentException("Unknown V3VaccineManufacturer code '"+codeString+"'"); 143 } 144 145 public String toCode(V3VaccineManufacturer code) { 146 if (code == V3VaccineManufacturer.AB) 147 return "AB"; 148 if (code == V3VaccineManufacturer.AD) 149 return "AD"; 150 if (code == V3VaccineManufacturer.ALP) 151 return "ALP"; 152 if (code == V3VaccineManufacturer.AR) 153 return "AR"; 154 if (code == V3VaccineManufacturer.AVI) 155 return "AVI"; 156 if (code == V3VaccineManufacturer.BA) 157 return "BA"; 158 if (code == V3VaccineManufacturer.BAY) 159 return "BAY"; 160 if (code == V3VaccineManufacturer.BP) 161 return "BP"; 162 if (code == V3VaccineManufacturer.BPC) 163 return "BPC"; 164 if (code == V3VaccineManufacturer.CEN) 165 return "CEN"; 166 if (code == V3VaccineManufacturer.CHI) 167 return "CHI"; 168 if (code == V3VaccineManufacturer.CON) 169 return "CON"; 170 if (code == V3VaccineManufacturer.EVN) 171 return "EVN"; 172 if (code == V3VaccineManufacturer.GRE) 173 return "GRE"; 174 if (code == V3VaccineManufacturer.IAG) 175 return "IAG"; 176 if (code == V3VaccineManufacturer.IM) 177 return "IM"; 178 if (code == V3VaccineManufacturer.IUS) 179 return "IUS"; 180 if (code == V3VaccineManufacturer.JPN) 181 return "JPN"; 182 if (code == V3VaccineManufacturer.KGC) 183 return "KGC"; 184 if (code == V3VaccineManufacturer.LED) 185 return "LED"; 186 if (code == V3VaccineManufacturer.MA) 187 return "MA"; 188 if (code == V3VaccineManufacturer.MED) 189 return "MED"; 190 if (code == V3VaccineManufacturer.MIL) 191 return "MIL"; 192 if (code == V3VaccineManufacturer.MIP) 193 return "MIP"; 194 if (code == V3VaccineManufacturer.MSD) 195 return "MSD"; 196 if (code == V3VaccineManufacturer.NAB) 197 return "NAB"; 198 if (code == V3VaccineManufacturer.NAV) 199 return "NAV"; 200 if (code == V3VaccineManufacturer.NOV) 201 return "NOV"; 202 if (code == V3VaccineManufacturer.NYB) 203 return "NYB"; 204 if (code == V3VaccineManufacturer.ORT) 205 return "ORT"; 206 if (code == V3VaccineManufacturer.OTC) 207 return "OTC"; 208 if (code == V3VaccineManufacturer.PD) 209 return "PD"; 210 if (code == V3VaccineManufacturer.PMC) 211 return "PMC"; 212 if (code == V3VaccineManufacturer.PRX) 213 return "PRX"; 214 if (code == V3VaccineManufacturer.SCL) 215 return "SCL"; 216 if (code == V3VaccineManufacturer.SI) 217 return "SI"; 218 if (code == V3VaccineManufacturer.SKB) 219 return "SKB"; 220 if (code == V3VaccineManufacturer.USA) 221 return "USA"; 222 if (code == V3VaccineManufacturer.WA) 223 return "WA"; 224 if (code == V3VaccineManufacturer.WAL) 225 return "WAL"; 226 return "?"; 227 } 228 229 public String toSystem(V3VaccineManufacturer code) { 230 return code.getSystem(); 231 } 232 233} 234