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 V3ActSiteEnumFactory implements EnumFactory<V3ActSite> { 058 059 public V3ActSite fromCode(String codeString) throws IllegalArgumentException { 060 if (codeString == null || "".equals(codeString)) 061 return null; 062 if ("_HumanActSite".equals(codeString)) 063 return V3ActSite._HUMANACTSITE; 064 if ("_HumanSubstanceAdministrationSite".equals(codeString)) 065 return V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE; 066 if ("BE".equals(codeString)) 067 return V3ActSite.BE; 068 if ("BN".equals(codeString)) 069 return V3ActSite.BN; 070 if ("BU".equals(codeString)) 071 return V3ActSite.BU; 072 if ("LA".equals(codeString)) 073 return V3ActSite.LA; 074 if ("LAC".equals(codeString)) 075 return V3ActSite.LAC; 076 if ("LACF".equals(codeString)) 077 return V3ActSite.LACF; 078 if ("LD".equals(codeString)) 079 return V3ActSite.LD; 080 if ("LE".equals(codeString)) 081 return V3ActSite.LE; 082 if ("LEJ".equals(codeString)) 083 return V3ActSite.LEJ; 084 if ("LF".equals(codeString)) 085 return V3ActSite.LF; 086 if ("LG".equals(codeString)) 087 return V3ActSite.LG; 088 if ("LH".equals(codeString)) 089 return V3ActSite.LH; 090 if ("LIJ".equals(codeString)) 091 return V3ActSite.LIJ; 092 if ("LLAQ".equals(codeString)) 093 return V3ActSite.LLAQ; 094 if ("LLFA".equals(codeString)) 095 return V3ActSite.LLFA; 096 if ("LMFA".equals(codeString)) 097 return V3ActSite.LMFA; 098 if ("LN".equals(codeString)) 099 return V3ActSite.LN; 100 if ("LPC".equals(codeString)) 101 return V3ActSite.LPC; 102 if ("LSC".equals(codeString)) 103 return V3ActSite.LSC; 104 if ("LT".equals(codeString)) 105 return V3ActSite.LT; 106 if ("LUA".equals(codeString)) 107 return V3ActSite.LUA; 108 if ("LUAQ".equals(codeString)) 109 return V3ActSite.LUAQ; 110 if ("LUFA".equals(codeString)) 111 return V3ActSite.LUFA; 112 if ("LVG".equals(codeString)) 113 return V3ActSite.LVG; 114 if ("LVL".equals(codeString)) 115 return V3ActSite.LVL; 116 if ("OD".equals(codeString)) 117 return V3ActSite.OD; 118 if ("OS".equals(codeString)) 119 return V3ActSite.OS; 120 if ("OU".equals(codeString)) 121 return V3ActSite.OU; 122 if ("PA".equals(codeString)) 123 return V3ActSite.PA; 124 if ("PERIN".equals(codeString)) 125 return V3ActSite.PERIN; 126 if ("RA".equals(codeString)) 127 return V3ActSite.RA; 128 if ("RAC".equals(codeString)) 129 return V3ActSite.RAC; 130 if ("RACF".equals(codeString)) 131 return V3ActSite.RACF; 132 if ("RD".equals(codeString)) 133 return V3ActSite.RD; 134 if ("RE".equals(codeString)) 135 return V3ActSite.RE; 136 if ("REJ".equals(codeString)) 137 return V3ActSite.REJ; 138 if ("RF".equals(codeString)) 139 return V3ActSite.RF; 140 if ("RG".equals(codeString)) 141 return V3ActSite.RG; 142 if ("RH".equals(codeString)) 143 return V3ActSite.RH; 144 if ("RIJ".equals(codeString)) 145 return V3ActSite.RIJ; 146 if ("RLAQ".equals(codeString)) 147 return V3ActSite.RLAQ; 148 if ("RLFA".equals(codeString)) 149 return V3ActSite.RLFA; 150 if ("RMFA".equals(codeString)) 151 return V3ActSite.RMFA; 152 if ("RN".equals(codeString)) 153 return V3ActSite.RN; 154 if ("RPC".equals(codeString)) 155 return V3ActSite.RPC; 156 if ("RSC".equals(codeString)) 157 return V3ActSite.RSC; 158 if ("RT".equals(codeString)) 159 return V3ActSite.RT; 160 if ("RUA".equals(codeString)) 161 return V3ActSite.RUA; 162 if ("RUAQ".equals(codeString)) 163 return V3ActSite.RUAQ; 164 if ("RUFA".equals(codeString)) 165 return V3ActSite.RUFA; 166 if ("RVG".equals(codeString)) 167 return V3ActSite.RVG; 168 if ("RVL".equals(codeString)) 169 return V3ActSite.RVL; 170 throw new IllegalArgumentException("Unknown V3ActSite code '"+codeString+"'"); 171 } 172 173 public String toCode(V3ActSite code) { 174 if (code == V3ActSite._HUMANACTSITE) 175 return "_HumanActSite"; 176 if (code == V3ActSite._HUMANSUBSTANCEADMINISTRATIONSITE) 177 return "_HumanSubstanceAdministrationSite"; 178 if (code == V3ActSite.BE) 179 return "BE"; 180 if (code == V3ActSite.BN) 181 return "BN"; 182 if (code == V3ActSite.BU) 183 return "BU"; 184 if (code == V3ActSite.LA) 185 return "LA"; 186 if (code == V3ActSite.LAC) 187 return "LAC"; 188 if (code == V3ActSite.LACF) 189 return "LACF"; 190 if (code == V3ActSite.LD) 191 return "LD"; 192 if (code == V3ActSite.LE) 193 return "LE"; 194 if (code == V3ActSite.LEJ) 195 return "LEJ"; 196 if (code == V3ActSite.LF) 197 return "LF"; 198 if (code == V3ActSite.LG) 199 return "LG"; 200 if (code == V3ActSite.LH) 201 return "LH"; 202 if (code == V3ActSite.LIJ) 203 return "LIJ"; 204 if (code == V3ActSite.LLAQ) 205 return "LLAQ"; 206 if (code == V3ActSite.LLFA) 207 return "LLFA"; 208 if (code == V3ActSite.LMFA) 209 return "LMFA"; 210 if (code == V3ActSite.LN) 211 return "LN"; 212 if (code == V3ActSite.LPC) 213 return "LPC"; 214 if (code == V3ActSite.LSC) 215 return "LSC"; 216 if (code == V3ActSite.LT) 217 return "LT"; 218 if (code == V3ActSite.LUA) 219 return "LUA"; 220 if (code == V3ActSite.LUAQ) 221 return "LUAQ"; 222 if (code == V3ActSite.LUFA) 223 return "LUFA"; 224 if (code == V3ActSite.LVG) 225 return "LVG"; 226 if (code == V3ActSite.LVL) 227 return "LVL"; 228 if (code == V3ActSite.OD) 229 return "OD"; 230 if (code == V3ActSite.OS) 231 return "OS"; 232 if (code == V3ActSite.OU) 233 return "OU"; 234 if (code == V3ActSite.PA) 235 return "PA"; 236 if (code == V3ActSite.PERIN) 237 return "PERIN"; 238 if (code == V3ActSite.RA) 239 return "RA"; 240 if (code == V3ActSite.RAC) 241 return "RAC"; 242 if (code == V3ActSite.RACF) 243 return "RACF"; 244 if (code == V3ActSite.RD) 245 return "RD"; 246 if (code == V3ActSite.RE) 247 return "RE"; 248 if (code == V3ActSite.REJ) 249 return "REJ"; 250 if (code == V3ActSite.RF) 251 return "RF"; 252 if (code == V3ActSite.RG) 253 return "RG"; 254 if (code == V3ActSite.RH) 255 return "RH"; 256 if (code == V3ActSite.RIJ) 257 return "RIJ"; 258 if (code == V3ActSite.RLAQ) 259 return "RLAQ"; 260 if (code == V3ActSite.RLFA) 261 return "RLFA"; 262 if (code == V3ActSite.RMFA) 263 return "RMFA"; 264 if (code == V3ActSite.RN) 265 return "RN"; 266 if (code == V3ActSite.RPC) 267 return "RPC"; 268 if (code == V3ActSite.RSC) 269 return "RSC"; 270 if (code == V3ActSite.RT) 271 return "RT"; 272 if (code == V3ActSite.RUA) 273 return "RUA"; 274 if (code == V3ActSite.RUAQ) 275 return "RUAQ"; 276 if (code == V3ActSite.RUFA) 277 return "RUFA"; 278 if (code == V3ActSite.RVG) 279 return "RVG"; 280 if (code == V3ActSite.RVL) 281 return "RVL"; 282 return "?"; 283 } 284 285 public String toSystem(V3ActSite code) { 286 return code.getSystem(); 287 } 288 289} 290