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