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 V3RoleClassEnumFactory implements EnumFactory<V3RoleClass> { 041 042 public V3RoleClass fromCode(String codeString) throws IllegalArgumentException { 043 if (codeString == null || "".equals(codeString)) 044 return null; 045 if ("ROL".equals(codeString)) 046 return V3RoleClass.ROL; 047 if ("_RoleClassAssociative".equals(codeString)) 048 return V3RoleClass._ROLECLASSASSOCIATIVE; 049 if ("_RoleClassMutualRelationship".equals(codeString)) 050 return V3RoleClass._ROLECLASSMUTUALRELATIONSHIP; 051 if ("_RoleClassRelationshipFormal".equals(codeString)) 052 return V3RoleClass._ROLECLASSRELATIONSHIPFORMAL; 053 if ("AFFL".equals(codeString)) 054 return V3RoleClass.AFFL; 055 if ("AGNT".equals(codeString)) 056 return V3RoleClass.AGNT; 057 if ("ASSIGNED".equals(codeString)) 058 return V3RoleClass.ASSIGNED; 059 if ("COMPAR".equals(codeString)) 060 return V3RoleClass.COMPAR; 061 if ("SGNOFF".equals(codeString)) 062 return V3RoleClass.SGNOFF; 063 if ("CON".equals(codeString)) 064 return V3RoleClass.CON; 065 if ("ECON".equals(codeString)) 066 return V3RoleClass.ECON; 067 if ("NOK".equals(codeString)) 068 return V3RoleClass.NOK; 069 if ("GUARD".equals(codeString)) 070 return V3RoleClass.GUARD; 071 if ("CIT".equals(codeString)) 072 return V3RoleClass.CIT; 073 if ("COVPTY".equals(codeString)) 074 return V3RoleClass.COVPTY; 075 if ("CLAIM".equals(codeString)) 076 return V3RoleClass.CLAIM; 077 if ("NAMED".equals(codeString)) 078 return V3RoleClass.NAMED; 079 if ("DEPEN".equals(codeString)) 080 return V3RoleClass.DEPEN; 081 if ("INDIV".equals(codeString)) 082 return V3RoleClass.INDIV; 083 if ("SUBSCR".equals(codeString)) 084 return V3RoleClass.SUBSCR; 085 if ("PROG".equals(codeString)) 086 return V3RoleClass.PROG; 087 if ("CRINV".equals(codeString)) 088 return V3RoleClass.CRINV; 089 if ("CRSPNSR".equals(codeString)) 090 return V3RoleClass.CRSPNSR; 091 if ("EMP".equals(codeString)) 092 return V3RoleClass.EMP; 093 if ("MIL".equals(codeString)) 094 return V3RoleClass.MIL; 095 if ("GUAR".equals(codeString)) 096 return V3RoleClass.GUAR; 097 if ("INVSBJ".equals(codeString)) 098 return V3RoleClass.INVSBJ; 099 if ("CASEBJ".equals(codeString)) 100 return V3RoleClass.CASEBJ; 101 if ("RESBJ".equals(codeString)) 102 return V3RoleClass.RESBJ; 103 if ("LIC".equals(codeString)) 104 return V3RoleClass.LIC; 105 if ("NOT".equals(codeString)) 106 return V3RoleClass.NOT; 107 if ("PROV".equals(codeString)) 108 return V3RoleClass.PROV; 109 if ("PAT".equals(codeString)) 110 return V3RoleClass.PAT; 111 if ("PAYEE".equals(codeString)) 112 return V3RoleClass.PAYEE; 113 if ("PAYOR".equals(codeString)) 114 return V3RoleClass.PAYOR; 115 if ("POLHOLD".equals(codeString)) 116 return V3RoleClass.POLHOLD; 117 if ("QUAL".equals(codeString)) 118 return V3RoleClass.QUAL; 119 if ("SPNSR".equals(codeString)) 120 return V3RoleClass.SPNSR; 121 if ("STD".equals(codeString)) 122 return V3RoleClass.STD; 123 if ("UNDWRT".equals(codeString)) 124 return V3RoleClass.UNDWRT; 125 if ("CAREGIVER".equals(codeString)) 126 return V3RoleClass.CAREGIVER; 127 if ("PRS".equals(codeString)) 128 return V3RoleClass.PRS; 129 if ("SELF".equals(codeString)) 130 return V3RoleClass.SELF; 131 if ("_RoleClassPassive".equals(codeString)) 132 return V3RoleClass._ROLECLASSPASSIVE; 133 if ("ACCESS".equals(codeString)) 134 return V3RoleClass.ACCESS; 135 if ("ADJY".equals(codeString)) 136 return V3RoleClass.ADJY; 137 if ("CONC".equals(codeString)) 138 return V3RoleClass.CONC; 139 if ("BOND".equals(codeString)) 140 return V3RoleClass.BOND; 141 if ("CONY".equals(codeString)) 142 return V3RoleClass.CONY; 143 if ("ADMM".equals(codeString)) 144 return V3RoleClass.ADMM; 145 if ("BIRTHPL".equals(codeString)) 146 return V3RoleClass.BIRTHPL; 147 if ("DEATHPLC".equals(codeString)) 148 return V3RoleClass.DEATHPLC; 149 if ("DST".equals(codeString)) 150 return V3RoleClass.DST; 151 if ("RET".equals(codeString)) 152 return V3RoleClass.RET; 153 if ("EXLOC".equals(codeString)) 154 return V3RoleClass.EXLOC; 155 if ("SDLOC".equals(codeString)) 156 return V3RoleClass.SDLOC; 157 if ("DSDLOC".equals(codeString)) 158 return V3RoleClass.DSDLOC; 159 if ("ISDLOC".equals(codeString)) 160 return V3RoleClass.ISDLOC; 161 if ("EXPR".equals(codeString)) 162 return V3RoleClass.EXPR; 163 if ("HLD".equals(codeString)) 164 return V3RoleClass.HLD; 165 if ("HLTHCHRT".equals(codeString)) 166 return V3RoleClass.HLTHCHRT; 167 if ("IDENT".equals(codeString)) 168 return V3RoleClass.IDENT; 169 if ("MANU".equals(codeString)) 170 return V3RoleClass.MANU; 171 if ("THER".equals(codeString)) 172 return V3RoleClass.THER; 173 if ("MNT".equals(codeString)) 174 return V3RoleClass.MNT; 175 if ("OWN".equals(codeString)) 176 return V3RoleClass.OWN; 177 if ("RGPR".equals(codeString)) 178 return V3RoleClass.RGPR; 179 if ("TERR".equals(codeString)) 180 return V3RoleClass.TERR; 181 if ("USED".equals(codeString)) 182 return V3RoleClass.USED; 183 if ("WRTE".equals(codeString)) 184 return V3RoleClass.WRTE; 185 if ("_RoleClassOntological".equals(codeString)) 186 return V3RoleClass._ROLECLASSONTOLOGICAL; 187 if ("EQUIV".equals(codeString)) 188 return V3RoleClass.EQUIV; 189 if ("SAME".equals(codeString)) 190 return V3RoleClass.SAME; 191 if ("SUBY".equals(codeString)) 192 return V3RoleClass.SUBY; 193 if ("GEN".equals(codeString)) 194 return V3RoleClass.GEN; 195 if ("GRIC".equals(codeString)) 196 return V3RoleClass.GRIC; 197 if ("INST".equals(codeString)) 198 return V3RoleClass.INST; 199 if ("SUBS".equals(codeString)) 200 return V3RoleClass.SUBS; 201 if ("_RoleClassPartitive".equals(codeString)) 202 return V3RoleClass._ROLECLASSPARTITIVE; 203 if ("CONT".equals(codeString)) 204 return V3RoleClass.CONT; 205 if ("EXPAGTCAR".equals(codeString)) 206 return V3RoleClass.EXPAGTCAR; 207 if ("EXPVECTOR".equals(codeString)) 208 return V3RoleClass.EXPVECTOR; 209 if ("FOMITE".equals(codeString)) 210 return V3RoleClass.FOMITE; 211 if ("INGR".equals(codeString)) 212 return V3RoleClass.INGR; 213 if ("ACTI".equals(codeString)) 214 return V3RoleClass.ACTI; 215 if ("ACTIB".equals(codeString)) 216 return V3RoleClass.ACTIB; 217 if ("ACTIM".equals(codeString)) 218 return V3RoleClass.ACTIM; 219 if ("ACTIR".equals(codeString)) 220 return V3RoleClass.ACTIR; 221 if ("ADJV".equals(codeString)) 222 return V3RoleClass.ADJV; 223 if ("ADTV".equals(codeString)) 224 return V3RoleClass.ADTV; 225 if ("BASE".equals(codeString)) 226 return V3RoleClass.BASE; 227 if ("CNTM".equals(codeString)) 228 return V3RoleClass.CNTM; 229 if ("IACT".equals(codeString)) 230 return V3RoleClass.IACT; 231 if ("COLR".equals(codeString)) 232 return V3RoleClass.COLR; 233 if ("FLVR".equals(codeString)) 234 return V3RoleClass.FLVR; 235 if ("PRSV".equals(codeString)) 236 return V3RoleClass.PRSV; 237 if ("STBL".equals(codeString)) 238 return V3RoleClass.STBL; 239 if ("MECH".equals(codeString)) 240 return V3RoleClass.MECH; 241 if ("LOCE".equals(codeString)) 242 return V3RoleClass.LOCE; 243 if ("STOR".equals(codeString)) 244 return V3RoleClass.STOR; 245 if ("MBR".equals(codeString)) 246 return V3RoleClass.MBR; 247 if ("PART".equals(codeString)) 248 return V3RoleClass.PART; 249 if ("ACTM".equals(codeString)) 250 return V3RoleClass.ACTM; 251 if ("SPEC".equals(codeString)) 252 return V3RoleClass.SPEC; 253 if ("ALQT".equals(codeString)) 254 return V3RoleClass.ALQT; 255 if ("ISLT".equals(codeString)) 256 return V3RoleClass.ISLT; 257 if ("CHILD".equals(codeString)) 258 return V3RoleClass.CHILD; 259 if ("CRED".equals(codeString)) 260 return V3RoleClass.CRED; 261 if ("NURPRAC".equals(codeString)) 262 return V3RoleClass.NURPRAC; 263 if ("NURS".equals(codeString)) 264 return V3RoleClass.NURS; 265 if ("PA".equals(codeString)) 266 return V3RoleClass.PA; 267 if ("PHYS".equals(codeString)) 268 return V3RoleClass.PHYS; 269 throw new IllegalArgumentException("Unknown V3RoleClass code '"+codeString+"'"); 270 } 271 272 public String toCode(V3RoleClass code) { 273 if (code == V3RoleClass.NULL) 274 return null; 275 if (code == V3RoleClass.ROL) 276 return "ROL"; 277 if (code == V3RoleClass._ROLECLASSASSOCIATIVE) 278 return "_RoleClassAssociative"; 279 if (code == V3RoleClass._ROLECLASSMUTUALRELATIONSHIP) 280 return "_RoleClassMutualRelationship"; 281 if (code == V3RoleClass._ROLECLASSRELATIONSHIPFORMAL) 282 return "_RoleClassRelationshipFormal"; 283 if (code == V3RoleClass.AFFL) 284 return "AFFL"; 285 if (code == V3RoleClass.AGNT) 286 return "AGNT"; 287 if (code == V3RoleClass.ASSIGNED) 288 return "ASSIGNED"; 289 if (code == V3RoleClass.COMPAR) 290 return "COMPAR"; 291 if (code == V3RoleClass.SGNOFF) 292 return "SGNOFF"; 293 if (code == V3RoleClass.CON) 294 return "CON"; 295 if (code == V3RoleClass.ECON) 296 return "ECON"; 297 if (code == V3RoleClass.NOK) 298 return "NOK"; 299 if (code == V3RoleClass.GUARD) 300 return "GUARD"; 301 if (code == V3RoleClass.CIT) 302 return "CIT"; 303 if (code == V3RoleClass.COVPTY) 304 return "COVPTY"; 305 if (code == V3RoleClass.CLAIM) 306 return "CLAIM"; 307 if (code == V3RoleClass.NAMED) 308 return "NAMED"; 309 if (code == V3RoleClass.DEPEN) 310 return "DEPEN"; 311 if (code == V3RoleClass.INDIV) 312 return "INDIV"; 313 if (code == V3RoleClass.SUBSCR) 314 return "SUBSCR"; 315 if (code == V3RoleClass.PROG) 316 return "PROG"; 317 if (code == V3RoleClass.CRINV) 318 return "CRINV"; 319 if (code == V3RoleClass.CRSPNSR) 320 return "CRSPNSR"; 321 if (code == V3RoleClass.EMP) 322 return "EMP"; 323 if (code == V3RoleClass.MIL) 324 return "MIL"; 325 if (code == V3RoleClass.GUAR) 326 return "GUAR"; 327 if (code == V3RoleClass.INVSBJ) 328 return "INVSBJ"; 329 if (code == V3RoleClass.CASEBJ) 330 return "CASEBJ"; 331 if (code == V3RoleClass.RESBJ) 332 return "RESBJ"; 333 if (code == V3RoleClass.LIC) 334 return "LIC"; 335 if (code == V3RoleClass.NOT) 336 return "NOT"; 337 if (code == V3RoleClass.PROV) 338 return "PROV"; 339 if (code == V3RoleClass.PAT) 340 return "PAT"; 341 if (code == V3RoleClass.PAYEE) 342 return "PAYEE"; 343 if (code == V3RoleClass.PAYOR) 344 return "PAYOR"; 345 if (code == V3RoleClass.POLHOLD) 346 return "POLHOLD"; 347 if (code == V3RoleClass.QUAL) 348 return "QUAL"; 349 if (code == V3RoleClass.SPNSR) 350 return "SPNSR"; 351 if (code == V3RoleClass.STD) 352 return "STD"; 353 if (code == V3RoleClass.UNDWRT) 354 return "UNDWRT"; 355 if (code == V3RoleClass.CAREGIVER) 356 return "CAREGIVER"; 357 if (code == V3RoleClass.PRS) 358 return "PRS"; 359 if (code == V3RoleClass.SELF) 360 return "SELF"; 361 if (code == V3RoleClass._ROLECLASSPASSIVE) 362 return "_RoleClassPassive"; 363 if (code == V3RoleClass.ACCESS) 364 return "ACCESS"; 365 if (code == V3RoleClass.ADJY) 366 return "ADJY"; 367 if (code == V3RoleClass.CONC) 368 return "CONC"; 369 if (code == V3RoleClass.BOND) 370 return "BOND"; 371 if (code == V3RoleClass.CONY) 372 return "CONY"; 373 if (code == V3RoleClass.ADMM) 374 return "ADMM"; 375 if (code == V3RoleClass.BIRTHPL) 376 return "BIRTHPL"; 377 if (code == V3RoleClass.DEATHPLC) 378 return "DEATHPLC"; 379 if (code == V3RoleClass.DST) 380 return "DST"; 381 if (code == V3RoleClass.RET) 382 return "RET"; 383 if (code == V3RoleClass.EXLOC) 384 return "EXLOC"; 385 if (code == V3RoleClass.SDLOC) 386 return "SDLOC"; 387 if (code == V3RoleClass.DSDLOC) 388 return "DSDLOC"; 389 if (code == V3RoleClass.ISDLOC) 390 return "ISDLOC"; 391 if (code == V3RoleClass.EXPR) 392 return "EXPR"; 393 if (code == V3RoleClass.HLD) 394 return "HLD"; 395 if (code == V3RoleClass.HLTHCHRT) 396 return "HLTHCHRT"; 397 if (code == V3RoleClass.IDENT) 398 return "IDENT"; 399 if (code == V3RoleClass.MANU) 400 return "MANU"; 401 if (code == V3RoleClass.THER) 402 return "THER"; 403 if (code == V3RoleClass.MNT) 404 return "MNT"; 405 if (code == V3RoleClass.OWN) 406 return "OWN"; 407 if (code == V3RoleClass.RGPR) 408 return "RGPR"; 409 if (code == V3RoleClass.TERR) 410 return "TERR"; 411 if (code == V3RoleClass.USED) 412 return "USED"; 413 if (code == V3RoleClass.WRTE) 414 return "WRTE"; 415 if (code == V3RoleClass._ROLECLASSONTOLOGICAL) 416 return "_RoleClassOntological"; 417 if (code == V3RoleClass.EQUIV) 418 return "EQUIV"; 419 if (code == V3RoleClass.SAME) 420 return "SAME"; 421 if (code == V3RoleClass.SUBY) 422 return "SUBY"; 423 if (code == V3RoleClass.GEN) 424 return "GEN"; 425 if (code == V3RoleClass.GRIC) 426 return "GRIC"; 427 if (code == V3RoleClass.INST) 428 return "INST"; 429 if (code == V3RoleClass.SUBS) 430 return "SUBS"; 431 if (code == V3RoleClass._ROLECLASSPARTITIVE) 432 return "_RoleClassPartitive"; 433 if (code == V3RoleClass.CONT) 434 return "CONT"; 435 if (code == V3RoleClass.EXPAGTCAR) 436 return "EXPAGTCAR"; 437 if (code == V3RoleClass.EXPVECTOR) 438 return "EXPVECTOR"; 439 if (code == V3RoleClass.FOMITE) 440 return "FOMITE"; 441 if (code == V3RoleClass.INGR) 442 return "INGR"; 443 if (code == V3RoleClass.ACTI) 444 return "ACTI"; 445 if (code == V3RoleClass.ACTIB) 446 return "ACTIB"; 447 if (code == V3RoleClass.ACTIM) 448 return "ACTIM"; 449 if (code == V3RoleClass.ACTIR) 450 return "ACTIR"; 451 if (code == V3RoleClass.ADJV) 452 return "ADJV"; 453 if (code == V3RoleClass.ADTV) 454 return "ADTV"; 455 if (code == V3RoleClass.BASE) 456 return "BASE"; 457 if (code == V3RoleClass.CNTM) 458 return "CNTM"; 459 if (code == V3RoleClass.IACT) 460 return "IACT"; 461 if (code == V3RoleClass.COLR) 462 return "COLR"; 463 if (code == V3RoleClass.FLVR) 464 return "FLVR"; 465 if (code == V3RoleClass.PRSV) 466 return "PRSV"; 467 if (code == V3RoleClass.STBL) 468 return "STBL"; 469 if (code == V3RoleClass.MECH) 470 return "MECH"; 471 if (code == V3RoleClass.LOCE) 472 return "LOCE"; 473 if (code == V3RoleClass.STOR) 474 return "STOR"; 475 if (code == V3RoleClass.MBR) 476 return "MBR"; 477 if (code == V3RoleClass.PART) 478 return "PART"; 479 if (code == V3RoleClass.ACTM) 480 return "ACTM"; 481 if (code == V3RoleClass.SPEC) 482 return "SPEC"; 483 if (code == V3RoleClass.ALQT) 484 return "ALQT"; 485 if (code == V3RoleClass.ISLT) 486 return "ISLT"; 487 if (code == V3RoleClass.CHILD) 488 return "CHILD"; 489 if (code == V3RoleClass.CRED) 490 return "CRED"; 491 if (code == V3RoleClass.NURPRAC) 492 return "NURPRAC"; 493 if (code == V3RoleClass.NURS) 494 return "NURS"; 495 if (code == V3RoleClass.PA) 496 return "PA"; 497 if (code == V3RoleClass.PHYS) 498 return "PHYS"; 499 return "?"; 500 } 501 502 public String toSystem(V3RoleClass code) { 503 return code.getSystem(); 504 } 505 506}