001package org.hl7.fhir.dstu3.model.codesystems; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0 036 037 038import org.hl7.fhir.dstu3.model.EnumFactory; 039 040public class V3ReligiousAffiliationEnumFactory implements EnumFactory<V3ReligiousAffiliation> { 041 042 public V3ReligiousAffiliation fromCode(String codeString) throws IllegalArgumentException { 043 if (codeString == null || "".equals(codeString)) 044 return null; 045 if ("1001".equals(codeString)) 046 return V3ReligiousAffiliation._1001; 047 if ("1002".equals(codeString)) 048 return V3ReligiousAffiliation._1002; 049 if ("1003".equals(codeString)) 050 return V3ReligiousAffiliation._1003; 051 if ("1004".equals(codeString)) 052 return V3ReligiousAffiliation._1004; 053 if ("1005".equals(codeString)) 054 return V3ReligiousAffiliation._1005; 055 if ("1006".equals(codeString)) 056 return V3ReligiousAffiliation._1006; 057 if ("1007".equals(codeString)) 058 return V3ReligiousAffiliation._1007; 059 if ("1008".equals(codeString)) 060 return V3ReligiousAffiliation._1008; 061 if ("1009".equals(codeString)) 062 return V3ReligiousAffiliation._1009; 063 if ("1010".equals(codeString)) 064 return V3ReligiousAffiliation._1010; 065 if ("1011".equals(codeString)) 066 return V3ReligiousAffiliation._1011; 067 if ("1012".equals(codeString)) 068 return V3ReligiousAffiliation._1012; 069 if ("1013".equals(codeString)) 070 return V3ReligiousAffiliation._1013; 071 if ("1014".equals(codeString)) 072 return V3ReligiousAffiliation._1014; 073 if ("1015".equals(codeString)) 074 return V3ReligiousAffiliation._1015; 075 if ("1016".equals(codeString)) 076 return V3ReligiousAffiliation._1016; 077 if ("1017".equals(codeString)) 078 return V3ReligiousAffiliation._1017; 079 if ("1018".equals(codeString)) 080 return V3ReligiousAffiliation._1018; 081 if ("1019".equals(codeString)) 082 return V3ReligiousAffiliation._1019; 083 if ("1020".equals(codeString)) 084 return V3ReligiousAffiliation._1020; 085 if ("1021".equals(codeString)) 086 return V3ReligiousAffiliation._1021; 087 if ("1022".equals(codeString)) 088 return V3ReligiousAffiliation._1022; 089 if ("1023".equals(codeString)) 090 return V3ReligiousAffiliation._1023; 091 if ("1024".equals(codeString)) 092 return V3ReligiousAffiliation._1024; 093 if ("1025".equals(codeString)) 094 return V3ReligiousAffiliation._1025; 095 if ("1026".equals(codeString)) 096 return V3ReligiousAffiliation._1026; 097 if ("1027".equals(codeString)) 098 return V3ReligiousAffiliation._1027; 099 if ("1028".equals(codeString)) 100 return V3ReligiousAffiliation._1028; 101 if ("1029".equals(codeString)) 102 return V3ReligiousAffiliation._1029; 103 if ("1030".equals(codeString)) 104 return V3ReligiousAffiliation._1030; 105 if ("1031".equals(codeString)) 106 return V3ReligiousAffiliation._1031; 107 if ("1032".equals(codeString)) 108 return V3ReligiousAffiliation._1032; 109 if ("1033".equals(codeString)) 110 return V3ReligiousAffiliation._1033; 111 if ("1034".equals(codeString)) 112 return V3ReligiousAffiliation._1034; 113 if ("1035".equals(codeString)) 114 return V3ReligiousAffiliation._1035; 115 if ("1036".equals(codeString)) 116 return V3ReligiousAffiliation._1036; 117 if ("1037".equals(codeString)) 118 return V3ReligiousAffiliation._1037; 119 if ("1038".equals(codeString)) 120 return V3ReligiousAffiliation._1038; 121 if ("1039".equals(codeString)) 122 return V3ReligiousAffiliation._1039; 123 if ("1040".equals(codeString)) 124 return V3ReligiousAffiliation._1040; 125 if ("1041".equals(codeString)) 126 return V3ReligiousAffiliation._1041; 127 if ("1042".equals(codeString)) 128 return V3ReligiousAffiliation._1042; 129 if ("1043".equals(codeString)) 130 return V3ReligiousAffiliation._1043; 131 if ("1044".equals(codeString)) 132 return V3ReligiousAffiliation._1044; 133 if ("1045".equals(codeString)) 134 return V3ReligiousAffiliation._1045; 135 if ("1046".equals(codeString)) 136 return V3ReligiousAffiliation._1046; 137 if ("1047".equals(codeString)) 138 return V3ReligiousAffiliation._1047; 139 if ("1048".equals(codeString)) 140 return V3ReligiousAffiliation._1048; 141 if ("1049".equals(codeString)) 142 return V3ReligiousAffiliation._1049; 143 if ("1050".equals(codeString)) 144 return V3ReligiousAffiliation._1050; 145 if ("1051".equals(codeString)) 146 return V3ReligiousAffiliation._1051; 147 if ("1052".equals(codeString)) 148 return V3ReligiousAffiliation._1052; 149 if ("1053".equals(codeString)) 150 return V3ReligiousAffiliation._1053; 151 if ("1054".equals(codeString)) 152 return V3ReligiousAffiliation._1054; 153 if ("1055".equals(codeString)) 154 return V3ReligiousAffiliation._1055; 155 if ("1056".equals(codeString)) 156 return V3ReligiousAffiliation._1056; 157 if ("1057".equals(codeString)) 158 return V3ReligiousAffiliation._1057; 159 if ("1058".equals(codeString)) 160 return V3ReligiousAffiliation._1058; 161 if ("1059".equals(codeString)) 162 return V3ReligiousAffiliation._1059; 163 if ("1060".equals(codeString)) 164 return V3ReligiousAffiliation._1060; 165 if ("1061".equals(codeString)) 166 return V3ReligiousAffiliation._1061; 167 if ("1062".equals(codeString)) 168 return V3ReligiousAffiliation._1062; 169 if ("1063".equals(codeString)) 170 return V3ReligiousAffiliation._1063; 171 if ("1064".equals(codeString)) 172 return V3ReligiousAffiliation._1064; 173 if ("1065".equals(codeString)) 174 return V3ReligiousAffiliation._1065; 175 if ("1066".equals(codeString)) 176 return V3ReligiousAffiliation._1066; 177 if ("1067".equals(codeString)) 178 return V3ReligiousAffiliation._1067; 179 if ("1068".equals(codeString)) 180 return V3ReligiousAffiliation._1068; 181 if ("1069".equals(codeString)) 182 return V3ReligiousAffiliation._1069; 183 if ("1070".equals(codeString)) 184 return V3ReligiousAffiliation._1070; 185 if ("1071".equals(codeString)) 186 return V3ReligiousAffiliation._1071; 187 if ("1072".equals(codeString)) 188 return V3ReligiousAffiliation._1072; 189 if ("1073".equals(codeString)) 190 return V3ReligiousAffiliation._1073; 191 if ("1074".equals(codeString)) 192 return V3ReligiousAffiliation._1074; 193 if ("1075".equals(codeString)) 194 return V3ReligiousAffiliation._1075; 195 if ("1076".equals(codeString)) 196 return V3ReligiousAffiliation._1076; 197 if ("1077".equals(codeString)) 198 return V3ReligiousAffiliation._1077; 199 if ("1078".equals(codeString)) 200 return V3ReligiousAffiliation._1078; 201 if ("1079".equals(codeString)) 202 return V3ReligiousAffiliation._1079; 203 if ("1080".equals(codeString)) 204 return V3ReligiousAffiliation._1080; 205 if ("1081".equals(codeString)) 206 return V3ReligiousAffiliation._1081; 207 if ("1082".equals(codeString)) 208 return V3ReligiousAffiliation._1082; 209 throw new IllegalArgumentException("Unknown V3ReligiousAffiliation code '"+codeString+"'"); 210 } 211 212 public String toCode(V3ReligiousAffiliation code) { 213 if (code == V3ReligiousAffiliation.NULL) 214 return null; 215 if (code == V3ReligiousAffiliation._1001) 216 return "1001"; 217 if (code == V3ReligiousAffiliation._1002) 218 return "1002"; 219 if (code == V3ReligiousAffiliation._1003) 220 return "1003"; 221 if (code == V3ReligiousAffiliation._1004) 222 return "1004"; 223 if (code == V3ReligiousAffiliation._1005) 224 return "1005"; 225 if (code == V3ReligiousAffiliation._1006) 226 return "1006"; 227 if (code == V3ReligiousAffiliation._1007) 228 return "1007"; 229 if (code == V3ReligiousAffiliation._1008) 230 return "1008"; 231 if (code == V3ReligiousAffiliation._1009) 232 return "1009"; 233 if (code == V3ReligiousAffiliation._1010) 234 return "1010"; 235 if (code == V3ReligiousAffiliation._1011) 236 return "1011"; 237 if (code == V3ReligiousAffiliation._1012) 238 return "1012"; 239 if (code == V3ReligiousAffiliation._1013) 240 return "1013"; 241 if (code == V3ReligiousAffiliation._1014) 242 return "1014"; 243 if (code == V3ReligiousAffiliation._1015) 244 return "1015"; 245 if (code == V3ReligiousAffiliation._1016) 246 return "1016"; 247 if (code == V3ReligiousAffiliation._1017) 248 return "1017"; 249 if (code == V3ReligiousAffiliation._1018) 250 return "1018"; 251 if (code == V3ReligiousAffiliation._1019) 252 return "1019"; 253 if (code == V3ReligiousAffiliation._1020) 254 return "1020"; 255 if (code == V3ReligiousAffiliation._1021) 256 return "1021"; 257 if (code == V3ReligiousAffiliation._1022) 258 return "1022"; 259 if (code == V3ReligiousAffiliation._1023) 260 return "1023"; 261 if (code == V3ReligiousAffiliation._1024) 262 return "1024"; 263 if (code == V3ReligiousAffiliation._1025) 264 return "1025"; 265 if (code == V3ReligiousAffiliation._1026) 266 return "1026"; 267 if (code == V3ReligiousAffiliation._1027) 268 return "1027"; 269 if (code == V3ReligiousAffiliation._1028) 270 return "1028"; 271 if (code == V3ReligiousAffiliation._1029) 272 return "1029"; 273 if (code == V3ReligiousAffiliation._1030) 274 return "1030"; 275 if (code == V3ReligiousAffiliation._1031) 276 return "1031"; 277 if (code == V3ReligiousAffiliation._1032) 278 return "1032"; 279 if (code == V3ReligiousAffiliation._1033) 280 return "1033"; 281 if (code == V3ReligiousAffiliation._1034) 282 return "1034"; 283 if (code == V3ReligiousAffiliation._1035) 284 return "1035"; 285 if (code == V3ReligiousAffiliation._1036) 286 return "1036"; 287 if (code == V3ReligiousAffiliation._1037) 288 return "1037"; 289 if (code == V3ReligiousAffiliation._1038) 290 return "1038"; 291 if (code == V3ReligiousAffiliation._1039) 292 return "1039"; 293 if (code == V3ReligiousAffiliation._1040) 294 return "1040"; 295 if (code == V3ReligiousAffiliation._1041) 296 return "1041"; 297 if (code == V3ReligiousAffiliation._1042) 298 return "1042"; 299 if (code == V3ReligiousAffiliation._1043) 300 return "1043"; 301 if (code == V3ReligiousAffiliation._1044) 302 return "1044"; 303 if (code == V3ReligiousAffiliation._1045) 304 return "1045"; 305 if (code == V3ReligiousAffiliation._1046) 306 return "1046"; 307 if (code == V3ReligiousAffiliation._1047) 308 return "1047"; 309 if (code == V3ReligiousAffiliation._1048) 310 return "1048"; 311 if (code == V3ReligiousAffiliation._1049) 312 return "1049"; 313 if (code == V3ReligiousAffiliation._1050) 314 return "1050"; 315 if (code == V3ReligiousAffiliation._1051) 316 return "1051"; 317 if (code == V3ReligiousAffiliation._1052) 318 return "1052"; 319 if (code == V3ReligiousAffiliation._1053) 320 return "1053"; 321 if (code == V3ReligiousAffiliation._1054) 322 return "1054"; 323 if (code == V3ReligiousAffiliation._1055) 324 return "1055"; 325 if (code == V3ReligiousAffiliation._1056) 326 return "1056"; 327 if (code == V3ReligiousAffiliation._1057) 328 return "1057"; 329 if (code == V3ReligiousAffiliation._1058) 330 return "1058"; 331 if (code == V3ReligiousAffiliation._1059) 332 return "1059"; 333 if (code == V3ReligiousAffiliation._1060) 334 return "1060"; 335 if (code == V3ReligiousAffiliation._1061) 336 return "1061"; 337 if (code == V3ReligiousAffiliation._1062) 338 return "1062"; 339 if (code == V3ReligiousAffiliation._1063) 340 return "1063"; 341 if (code == V3ReligiousAffiliation._1064) 342 return "1064"; 343 if (code == V3ReligiousAffiliation._1065) 344 return "1065"; 345 if (code == V3ReligiousAffiliation._1066) 346 return "1066"; 347 if (code == V3ReligiousAffiliation._1067) 348 return "1067"; 349 if (code == V3ReligiousAffiliation._1068) 350 return "1068"; 351 if (code == V3ReligiousAffiliation._1069) 352 return "1069"; 353 if (code == V3ReligiousAffiliation._1070) 354 return "1070"; 355 if (code == V3ReligiousAffiliation._1071) 356 return "1071"; 357 if (code == V3ReligiousAffiliation._1072) 358 return "1072"; 359 if (code == V3ReligiousAffiliation._1073) 360 return "1073"; 361 if (code == V3ReligiousAffiliation._1074) 362 return "1074"; 363 if (code == V3ReligiousAffiliation._1075) 364 return "1075"; 365 if (code == V3ReligiousAffiliation._1076) 366 return "1076"; 367 if (code == V3ReligiousAffiliation._1077) 368 return "1077"; 369 if (code == V3ReligiousAffiliation._1078) 370 return "1078"; 371 if (code == V3ReligiousAffiliation._1079) 372 return "1079"; 373 if (code == V3ReligiousAffiliation._1080) 374 return "1080"; 375 if (code == V3ReligiousAffiliation._1081) 376 return "1081"; 377 if (code == V3ReligiousAffiliation._1082) 378 return "1082"; 379 return "?"; 380 } 381 382 public String toSystem(V3ReligiousAffiliation code) { 383 return code.getSystem(); 384 } 385 386}