001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.utilities.Utilities; 039 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044 045/** 046 * Describes a comparison of an immunization event against published 047 * recommendations to determine if the administration is "valid" in relation to 048 * those recommendations. 049 */ 050@ResourceDef(name = "ImmunizationEvaluation", profile = "http://hl7.org/fhir/StructureDefinition/ImmunizationEvaluation") 051public class ImmunizationEvaluation extends DomainResource { 052 053 public enum ImmunizationEvaluationStatus { 054 /** 055 * null 056 */ 057 COMPLETED, 058 /** 059 * null 060 */ 061 ENTEREDINERROR, 062 /** 063 * added to help the parsers with the generic types 064 */ 065 NULL; 066 067 public static ImmunizationEvaluationStatus fromCode(String codeString) throws FHIRException { 068 if (codeString == null || "".equals(codeString)) 069 return null; 070 if ("completed".equals(codeString)) 071 return COMPLETED; 072 if ("entered-in-error".equals(codeString)) 073 return ENTEREDINERROR; 074 if (Configuration.isAcceptInvalidEnums()) 075 return null; 076 else 077 throw new FHIRException("Unknown ImmunizationEvaluationStatus code '" + codeString + "'"); 078 } 079 080 public String toCode() { 081 switch (this) { 082 case COMPLETED: 083 return "completed"; 084 case ENTEREDINERROR: 085 return "entered-in-error"; 086 case NULL: 087 return null; 088 default: 089 return "?"; 090 } 091 } 092 093 public String getSystem() { 094 switch (this) { 095 case COMPLETED: 096 return "http://terminology.hl7.org/CodeSystem/medication-admin-status"; 097 case ENTEREDINERROR: 098 return "http://terminology.hl7.org/CodeSystem/medication-admin-status"; 099 case NULL: 100 return null; 101 default: 102 return "?"; 103 } 104 } 105 106 public String getDefinition() { 107 switch (this) { 108 case COMPLETED: 109 return ""; 110 case ENTEREDINERROR: 111 return ""; 112 case NULL: 113 return null; 114 default: 115 return "?"; 116 } 117 } 118 119 public String getDisplay() { 120 switch (this) { 121 case COMPLETED: 122 return "completed"; 123 case ENTEREDINERROR: 124 return "entered-in-error"; 125 case NULL: 126 return null; 127 default: 128 return "?"; 129 } 130 } 131 } 132 133 public static class ImmunizationEvaluationStatusEnumFactory implements EnumFactory<ImmunizationEvaluationStatus> { 134 public ImmunizationEvaluationStatus fromCode(String codeString) throws IllegalArgumentException { 135 if (codeString == null || "".equals(codeString)) 136 if (codeString == null || "".equals(codeString)) 137 return null; 138 if ("completed".equals(codeString)) 139 return ImmunizationEvaluationStatus.COMPLETED; 140 if ("entered-in-error".equals(codeString)) 141 return ImmunizationEvaluationStatus.ENTEREDINERROR; 142 throw new IllegalArgumentException("Unknown ImmunizationEvaluationStatus code '" + codeString + "'"); 143 } 144 145 public Enumeration<ImmunizationEvaluationStatus> fromType(PrimitiveType<?> code) throws FHIRException { 146 if (code == null) 147 return null; 148 if (code.isEmpty()) 149 return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.NULL, code); 150 String codeString = code.asStringValue(); 151 if (codeString == null || "".equals(codeString)) 152 return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.NULL, code); 153 if ("completed".equals(codeString)) 154 return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.COMPLETED, code); 155 if ("entered-in-error".equals(codeString)) 156 return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.ENTEREDINERROR, code); 157 throw new FHIRException("Unknown ImmunizationEvaluationStatus code '" + codeString + "'"); 158 } 159 160 public String toCode(ImmunizationEvaluationStatus code) { 161 if (code == ImmunizationEvaluationStatus.COMPLETED) 162 return "completed"; 163 if (code == ImmunizationEvaluationStatus.ENTEREDINERROR) 164 return "entered-in-error"; 165 return "?"; 166 } 167 168 public String toSystem(ImmunizationEvaluationStatus code) { 169 return code.getSystem(); 170 } 171 } 172 173 /** 174 * A unique identifier assigned to this immunization evaluation record. 175 */ 176 @Child(name = "identifier", type = { 177 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 178 @Description(shortDefinition = "Business identifier", formalDefinition = "A unique identifier assigned to this immunization evaluation record.") 179 protected List<Identifier> identifier; 180 181 /** 182 * Indicates the current status of the evaluation of the vaccination 183 * administration event. 184 */ 185 @Child(name = "status", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = true, summary = true) 186 @Description(shortDefinition = "completed | entered-in-error", formalDefinition = "Indicates the current status of the evaluation of the vaccination administration event.") 187 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-evaluation-status") 188 protected Enumeration<ImmunizationEvaluationStatus> status; 189 190 /** 191 * The individual for whom the evaluation is being done. 192 */ 193 @Child(name = "patient", type = { Patient.class }, order = 2, min = 1, max = 1, modifier = false, summary = true) 194 @Description(shortDefinition = "Who this evaluation is for", formalDefinition = "The individual for whom the evaluation is being done.") 195 protected Reference patient; 196 197 /** 198 * The actual object that is the target of the reference (The individual for 199 * whom the evaluation is being done.) 200 */ 201 protected Patient patientTarget; 202 203 /** 204 * The date the evaluation of the vaccine administration event was performed. 205 */ 206 @Child(name = "date", type = { DateTimeType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 207 @Description(shortDefinition = "Date evaluation was performed", formalDefinition = "The date the evaluation of the vaccine administration event was performed.") 208 protected DateTimeType date; 209 210 /** 211 * Indicates the authority who published the protocol (e.g. ACIP). 212 */ 213 @Child(name = "authority", type = { 214 Organization.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 215 @Description(shortDefinition = "Who is responsible for publishing the recommendations", formalDefinition = "Indicates the authority who published the protocol (e.g. ACIP).") 216 protected Reference authority; 217 218 /** 219 * The actual object that is the target of the reference (Indicates the 220 * authority who published the protocol (e.g. ACIP).) 221 */ 222 protected Organization authorityTarget; 223 224 /** 225 * The vaccine preventable disease the dose is being evaluated against. 226 */ 227 @Child(name = "targetDisease", type = { 228 CodeableConcept.class }, order = 5, min = 1, max = 1, modifier = false, summary = true) 229 @Description(shortDefinition = "Evaluation target disease", formalDefinition = "The vaccine preventable disease the dose is being evaluated against.") 230 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-evaluation-target-disease") 231 protected CodeableConcept targetDisease; 232 233 /** 234 * The vaccine administration event being evaluated. 235 */ 236 @Child(name = "immunizationEvent", type = { 237 Immunization.class }, order = 6, min = 1, max = 1, modifier = false, summary = true) 238 @Description(shortDefinition = "Immunization being evaluated", formalDefinition = "The vaccine administration event being evaluated.") 239 protected Reference immunizationEvent; 240 241 /** 242 * The actual object that is the target of the reference (The vaccine 243 * administration event being evaluated.) 244 */ 245 protected Immunization immunizationEventTarget; 246 247 /** 248 * Indicates if the dose is valid or not valid with respect to the published 249 * recommendations. 250 */ 251 @Child(name = "doseStatus", type = { 252 CodeableConcept.class }, order = 7, min = 1, max = 1, modifier = false, summary = true) 253 @Description(shortDefinition = "Status of the dose relative to published recommendations", formalDefinition = "Indicates if the dose is valid or not valid with respect to the published recommendations.") 254 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status") 255 protected CodeableConcept doseStatus; 256 257 /** 258 * Provides an explanation as to why the vaccine administration event is valid 259 * or not relative to the published recommendations. 260 */ 261 @Child(name = "doseStatusReason", type = { 262 CodeableConcept.class }, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 263 @Description(shortDefinition = "Reason for the dose status", formalDefinition = "Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.") 264 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status-reason") 265 protected List<CodeableConcept> doseStatusReason; 266 267 /** 268 * Additional information about the evaluation. 269 */ 270 @Child(name = "description", type = { 271 StringType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 272 @Description(shortDefinition = "Evaluation notes", formalDefinition = "Additional information about the evaluation.") 273 protected StringType description; 274 275 /** 276 * One possible path to achieve presumed immunity against a disease - within the 277 * context of an authority. 278 */ 279 @Child(name = "series", type = { StringType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false) 280 @Description(shortDefinition = "Name of vaccine series", formalDefinition = "One possible path to achieve presumed immunity against a disease - within the context of an authority.") 281 protected StringType series; 282 283 /** 284 * Nominal position in a series. 285 */ 286 @Child(name = "doseNumber", type = { PositiveIntType.class, 287 StringType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false) 288 @Description(shortDefinition = "Dose number within series", formalDefinition = "Nominal position in a series.") 289 protected Type doseNumber; 290 291 /** 292 * The recommended number of doses to achieve immunity. 293 */ 294 @Child(name = "seriesDoses", type = { PositiveIntType.class, 295 StringType.class }, order = 12, min = 0, max = 1, modifier = false, summary = false) 296 @Description(shortDefinition = "Recommended number of doses for immunity", formalDefinition = "The recommended number of doses to achieve immunity.") 297 protected Type seriesDoses; 298 299 private static final long serialVersionUID = 1248741226L; 300 301 /** 302 * Constructor 303 */ 304 public ImmunizationEvaluation() { 305 super(); 306 } 307 308 /** 309 * Constructor 310 */ 311 public ImmunizationEvaluation(Enumeration<ImmunizationEvaluationStatus> status, Reference patient, 312 CodeableConcept targetDisease, Reference immunizationEvent, CodeableConcept doseStatus) { 313 super(); 314 this.status = status; 315 this.patient = patient; 316 this.targetDisease = targetDisease; 317 this.immunizationEvent = immunizationEvent; 318 this.doseStatus = doseStatus; 319 } 320 321 /** 322 * @return {@link #identifier} (A unique identifier assigned to this 323 * immunization evaluation record.) 324 */ 325 public List<Identifier> getIdentifier() { 326 if (this.identifier == null) 327 this.identifier = new ArrayList<Identifier>(); 328 return this.identifier; 329 } 330 331 /** 332 * @return Returns a reference to <code>this</code> for easy method chaining 333 */ 334 public ImmunizationEvaluation setIdentifier(List<Identifier> theIdentifier) { 335 this.identifier = theIdentifier; 336 return this; 337 } 338 339 public boolean hasIdentifier() { 340 if (this.identifier == null) 341 return false; 342 for (Identifier item : this.identifier) 343 if (!item.isEmpty()) 344 return true; 345 return false; 346 } 347 348 public Identifier addIdentifier() { // 3 349 Identifier t = new Identifier(); 350 if (this.identifier == null) 351 this.identifier = new ArrayList<Identifier>(); 352 this.identifier.add(t); 353 return t; 354 } 355 356 public ImmunizationEvaluation addIdentifier(Identifier t) { // 3 357 if (t == null) 358 return this; 359 if (this.identifier == null) 360 this.identifier = new ArrayList<Identifier>(); 361 this.identifier.add(t); 362 return this; 363 } 364 365 /** 366 * @return The first repetition of repeating field {@link #identifier}, creating 367 * it if it does not already exist 368 */ 369 public Identifier getIdentifierFirstRep() { 370 if (getIdentifier().isEmpty()) { 371 addIdentifier(); 372 } 373 return getIdentifier().get(0); 374 } 375 376 /** 377 * @return {@link #status} (Indicates the current status of the evaluation of 378 * the vaccination administration event.). This is the underlying object 379 * with id, value and extensions. The accessor "getStatus" gives direct 380 * access to the value 381 */ 382 public Enumeration<ImmunizationEvaluationStatus> getStatusElement() { 383 if (this.status == null) 384 if (Configuration.errorOnAutoCreate()) 385 throw new Error("Attempt to auto-create ImmunizationEvaluation.status"); 386 else if (Configuration.doAutoCreate()) 387 this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory()); // bb 388 return this.status; 389 } 390 391 public boolean hasStatusElement() { 392 return this.status != null && !this.status.isEmpty(); 393 } 394 395 public boolean hasStatus() { 396 return this.status != null && !this.status.isEmpty(); 397 } 398 399 /** 400 * @param value {@link #status} (Indicates the current status of the evaluation 401 * of the vaccination administration event.). This is the 402 * underlying object with id, value and extensions. The accessor 403 * "getStatus" gives direct access to the value 404 */ 405 public ImmunizationEvaluation setStatusElement(Enumeration<ImmunizationEvaluationStatus> value) { 406 this.status = value; 407 return this; 408 } 409 410 /** 411 * @return Indicates the current status of the evaluation of the vaccination 412 * administration event. 413 */ 414 public ImmunizationEvaluationStatus getStatus() { 415 return this.status == null ? null : this.status.getValue(); 416 } 417 418 /** 419 * @param value Indicates the current status of the evaluation of the 420 * vaccination administration event. 421 */ 422 public ImmunizationEvaluation setStatus(ImmunizationEvaluationStatus value) { 423 if (this.status == null) 424 this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory()); 425 this.status.setValue(value); 426 return this; 427 } 428 429 /** 430 * @return {@link #patient} (The individual for whom the evaluation is being 431 * done.) 432 */ 433 public Reference getPatient() { 434 if (this.patient == null) 435 if (Configuration.errorOnAutoCreate()) 436 throw new Error("Attempt to auto-create ImmunizationEvaluation.patient"); 437 else if (Configuration.doAutoCreate()) 438 this.patient = new Reference(); // cc 439 return this.patient; 440 } 441 442 public boolean hasPatient() { 443 return this.patient != null && !this.patient.isEmpty(); 444 } 445 446 /** 447 * @param value {@link #patient} (The individual for whom the evaluation is 448 * being done.) 449 */ 450 public ImmunizationEvaluation setPatient(Reference value) { 451 this.patient = value; 452 return this; 453 } 454 455 /** 456 * @return {@link #patient} The actual object that is the target of the 457 * reference. The reference library doesn't populate this, but you can 458 * use it to hold the resource if you resolve it. (The individual for 459 * whom the evaluation is being done.) 460 */ 461 public Patient getPatientTarget() { 462 if (this.patientTarget == null) 463 if (Configuration.errorOnAutoCreate()) 464 throw new Error("Attempt to auto-create ImmunizationEvaluation.patient"); 465 else if (Configuration.doAutoCreate()) 466 this.patientTarget = new Patient(); // aa 467 return this.patientTarget; 468 } 469 470 /** 471 * @param value {@link #patient} The actual object that is the target of the 472 * reference. The reference library doesn't use these, but you can 473 * use it to hold the resource if you resolve it. (The individual 474 * for whom the evaluation is being done.) 475 */ 476 public ImmunizationEvaluation setPatientTarget(Patient value) { 477 this.patientTarget = value; 478 return this; 479 } 480 481 /** 482 * @return {@link #date} (The date the evaluation of the vaccine administration 483 * event was performed.). This is the underlying object with id, value 484 * and extensions. The accessor "getDate" gives direct access to the 485 * value 486 */ 487 public DateTimeType getDateElement() { 488 if (this.date == null) 489 if (Configuration.errorOnAutoCreate()) 490 throw new Error("Attempt to auto-create ImmunizationEvaluation.date"); 491 else if (Configuration.doAutoCreate()) 492 this.date = new DateTimeType(); // bb 493 return this.date; 494 } 495 496 public boolean hasDateElement() { 497 return this.date != null && !this.date.isEmpty(); 498 } 499 500 public boolean hasDate() { 501 return this.date != null && !this.date.isEmpty(); 502 } 503 504 /** 505 * @param value {@link #date} (The date the evaluation of the vaccine 506 * administration event was performed.). This is the underlying 507 * object with id, value and extensions. The accessor "getDate" 508 * gives direct access to the value 509 */ 510 public ImmunizationEvaluation setDateElement(DateTimeType value) { 511 this.date = value; 512 return this; 513 } 514 515 /** 516 * @return The date the evaluation of the vaccine administration event was 517 * performed. 518 */ 519 public Date getDate() { 520 return this.date == null ? null : this.date.getValue(); 521 } 522 523 /** 524 * @param value The date the evaluation of the vaccine administration event was 525 * performed. 526 */ 527 public ImmunizationEvaluation setDate(Date value) { 528 if (value == null) 529 this.date = null; 530 else { 531 if (this.date == null) 532 this.date = new DateTimeType(); 533 this.date.setValue(value); 534 } 535 return this; 536 } 537 538 /** 539 * @return {@link #authority} (Indicates the authority who published the 540 * protocol (e.g. ACIP).) 541 */ 542 public Reference getAuthority() { 543 if (this.authority == null) 544 if (Configuration.errorOnAutoCreate()) 545 throw new Error("Attempt to auto-create ImmunizationEvaluation.authority"); 546 else if (Configuration.doAutoCreate()) 547 this.authority = new Reference(); // cc 548 return this.authority; 549 } 550 551 public boolean hasAuthority() { 552 return this.authority != null && !this.authority.isEmpty(); 553 } 554 555 /** 556 * @param value {@link #authority} (Indicates the authority who published the 557 * protocol (e.g. ACIP).) 558 */ 559 public ImmunizationEvaluation setAuthority(Reference value) { 560 this.authority = value; 561 return this; 562 } 563 564 /** 565 * @return {@link #authority} The actual object that is the target of the 566 * reference. The reference library doesn't populate this, but you can 567 * use it to hold the resource if you resolve it. (Indicates the 568 * authority who published the protocol (e.g. ACIP).) 569 */ 570 public Organization getAuthorityTarget() { 571 if (this.authorityTarget == null) 572 if (Configuration.errorOnAutoCreate()) 573 throw new Error("Attempt to auto-create ImmunizationEvaluation.authority"); 574 else if (Configuration.doAutoCreate()) 575 this.authorityTarget = new Organization(); // aa 576 return this.authorityTarget; 577 } 578 579 /** 580 * @param value {@link #authority} The actual object that is the target of the 581 * reference. The reference library doesn't use these, but you can 582 * use it to hold the resource if you resolve it. (Indicates the 583 * authority who published the protocol (e.g. ACIP).) 584 */ 585 public ImmunizationEvaluation setAuthorityTarget(Organization value) { 586 this.authorityTarget = value; 587 return this; 588 } 589 590 /** 591 * @return {@link #targetDisease} (The vaccine preventable disease the dose is 592 * being evaluated against.) 593 */ 594 public CodeableConcept getTargetDisease() { 595 if (this.targetDisease == null) 596 if (Configuration.errorOnAutoCreate()) 597 throw new Error("Attempt to auto-create ImmunizationEvaluation.targetDisease"); 598 else if (Configuration.doAutoCreate()) 599 this.targetDisease = new CodeableConcept(); // cc 600 return this.targetDisease; 601 } 602 603 public boolean hasTargetDisease() { 604 return this.targetDisease != null && !this.targetDisease.isEmpty(); 605 } 606 607 /** 608 * @param value {@link #targetDisease} (The vaccine preventable disease the dose 609 * is being evaluated against.) 610 */ 611 public ImmunizationEvaluation setTargetDisease(CodeableConcept value) { 612 this.targetDisease = value; 613 return this; 614 } 615 616 /** 617 * @return {@link #immunizationEvent} (The vaccine administration event being 618 * evaluated.) 619 */ 620 public Reference getImmunizationEvent() { 621 if (this.immunizationEvent == null) 622 if (Configuration.errorOnAutoCreate()) 623 throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent"); 624 else if (Configuration.doAutoCreate()) 625 this.immunizationEvent = new Reference(); // cc 626 return this.immunizationEvent; 627 } 628 629 public boolean hasImmunizationEvent() { 630 return this.immunizationEvent != null && !this.immunizationEvent.isEmpty(); 631 } 632 633 /** 634 * @param value {@link #immunizationEvent} (The vaccine administration event 635 * being evaluated.) 636 */ 637 public ImmunizationEvaluation setImmunizationEvent(Reference value) { 638 this.immunizationEvent = value; 639 return this; 640 } 641 642 /** 643 * @return {@link #immunizationEvent} The actual object that is the target of 644 * the reference. The reference library doesn't populate this, but you 645 * can use it to hold the resource if you resolve it. (The vaccine 646 * administration event being evaluated.) 647 */ 648 public Immunization getImmunizationEventTarget() { 649 if (this.immunizationEventTarget == null) 650 if (Configuration.errorOnAutoCreate()) 651 throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent"); 652 else if (Configuration.doAutoCreate()) 653 this.immunizationEventTarget = new Immunization(); // aa 654 return this.immunizationEventTarget; 655 } 656 657 /** 658 * @param value {@link #immunizationEvent} The actual object that is the target 659 * of the reference. The reference library doesn't use these, but 660 * you can use it to hold the resource if you resolve it. (The 661 * vaccine administration event being evaluated.) 662 */ 663 public ImmunizationEvaluation setImmunizationEventTarget(Immunization value) { 664 this.immunizationEventTarget = value; 665 return this; 666 } 667 668 /** 669 * @return {@link #doseStatus} (Indicates if the dose is valid or not valid with 670 * respect to the published recommendations.) 671 */ 672 public CodeableConcept getDoseStatus() { 673 if (this.doseStatus == null) 674 if (Configuration.errorOnAutoCreate()) 675 throw new Error("Attempt to auto-create ImmunizationEvaluation.doseStatus"); 676 else if (Configuration.doAutoCreate()) 677 this.doseStatus = new CodeableConcept(); // cc 678 return this.doseStatus; 679 } 680 681 public boolean hasDoseStatus() { 682 return this.doseStatus != null && !this.doseStatus.isEmpty(); 683 } 684 685 /** 686 * @param value {@link #doseStatus} (Indicates if the dose is valid or not valid 687 * with respect to the published recommendations.) 688 */ 689 public ImmunizationEvaluation setDoseStatus(CodeableConcept value) { 690 this.doseStatus = value; 691 return this; 692 } 693 694 /** 695 * @return {@link #doseStatusReason} (Provides an explanation as to why the 696 * vaccine administration event is valid or not relative to the 697 * published recommendations.) 698 */ 699 public List<CodeableConcept> getDoseStatusReason() { 700 if (this.doseStatusReason == null) 701 this.doseStatusReason = new ArrayList<CodeableConcept>(); 702 return this.doseStatusReason; 703 } 704 705 /** 706 * @return Returns a reference to <code>this</code> for easy method chaining 707 */ 708 public ImmunizationEvaluation setDoseStatusReason(List<CodeableConcept> theDoseStatusReason) { 709 this.doseStatusReason = theDoseStatusReason; 710 return this; 711 } 712 713 public boolean hasDoseStatusReason() { 714 if (this.doseStatusReason == null) 715 return false; 716 for (CodeableConcept item : this.doseStatusReason) 717 if (!item.isEmpty()) 718 return true; 719 return false; 720 } 721 722 public CodeableConcept addDoseStatusReason() { // 3 723 CodeableConcept t = new CodeableConcept(); 724 if (this.doseStatusReason == null) 725 this.doseStatusReason = new ArrayList<CodeableConcept>(); 726 this.doseStatusReason.add(t); 727 return t; 728 } 729 730 public ImmunizationEvaluation addDoseStatusReason(CodeableConcept t) { // 3 731 if (t == null) 732 return this; 733 if (this.doseStatusReason == null) 734 this.doseStatusReason = new ArrayList<CodeableConcept>(); 735 this.doseStatusReason.add(t); 736 return this; 737 } 738 739 /** 740 * @return The first repetition of repeating field {@link #doseStatusReason}, 741 * creating it if it does not already exist 742 */ 743 public CodeableConcept getDoseStatusReasonFirstRep() { 744 if (getDoseStatusReason().isEmpty()) { 745 addDoseStatusReason(); 746 } 747 return getDoseStatusReason().get(0); 748 } 749 750 /** 751 * @return {@link #description} (Additional information about the evaluation.). 752 * This is the underlying object with id, value and extensions. The 753 * accessor "getDescription" gives direct access to the value 754 */ 755 public StringType getDescriptionElement() { 756 if (this.description == null) 757 if (Configuration.errorOnAutoCreate()) 758 throw new Error("Attempt to auto-create ImmunizationEvaluation.description"); 759 else if (Configuration.doAutoCreate()) 760 this.description = new StringType(); // bb 761 return this.description; 762 } 763 764 public boolean hasDescriptionElement() { 765 return this.description != null && !this.description.isEmpty(); 766 } 767 768 public boolean hasDescription() { 769 return this.description != null && !this.description.isEmpty(); 770 } 771 772 /** 773 * @param value {@link #description} (Additional information about the 774 * evaluation.). This is the underlying object with id, value and 775 * extensions. The accessor "getDescription" gives direct access to 776 * the value 777 */ 778 public ImmunizationEvaluation setDescriptionElement(StringType value) { 779 this.description = value; 780 return this; 781 } 782 783 /** 784 * @return Additional information about the evaluation. 785 */ 786 public String getDescription() { 787 return this.description == null ? null : this.description.getValue(); 788 } 789 790 /** 791 * @param value Additional information about the evaluation. 792 */ 793 public ImmunizationEvaluation setDescription(String value) { 794 if (Utilities.noString(value)) 795 this.description = null; 796 else { 797 if (this.description == null) 798 this.description = new StringType(); 799 this.description.setValue(value); 800 } 801 return this; 802 } 803 804 /** 805 * @return {@link #series} (One possible path to achieve presumed immunity 806 * against a disease - within the context of an authority.). This is the 807 * underlying object with id, value and extensions. The accessor 808 * "getSeries" gives direct access to the value 809 */ 810 public StringType getSeriesElement() { 811 if (this.series == null) 812 if (Configuration.errorOnAutoCreate()) 813 throw new Error("Attempt to auto-create ImmunizationEvaluation.series"); 814 else if (Configuration.doAutoCreate()) 815 this.series = new StringType(); // bb 816 return this.series; 817 } 818 819 public boolean hasSeriesElement() { 820 return this.series != null && !this.series.isEmpty(); 821 } 822 823 public boolean hasSeries() { 824 return this.series != null && !this.series.isEmpty(); 825 } 826 827 /** 828 * @param value {@link #series} (One possible path to achieve presumed immunity 829 * against a disease - within the context of an authority.). This 830 * is the underlying object with id, value and extensions. The 831 * accessor "getSeries" gives direct access to the value 832 */ 833 public ImmunizationEvaluation setSeriesElement(StringType value) { 834 this.series = value; 835 return this; 836 } 837 838 /** 839 * @return One possible path to achieve presumed immunity against a disease - 840 * within the context of an authority. 841 */ 842 public String getSeries() { 843 return this.series == null ? null : this.series.getValue(); 844 } 845 846 /** 847 * @param value One possible path to achieve presumed immunity against a disease 848 * - within the context of an authority. 849 */ 850 public ImmunizationEvaluation setSeries(String value) { 851 if (Utilities.noString(value)) 852 this.series = null; 853 else { 854 if (this.series == null) 855 this.series = new StringType(); 856 this.series.setValue(value); 857 } 858 return this; 859 } 860 861 /** 862 * @return {@link #doseNumber} (Nominal position in a series.) 863 */ 864 public Type getDoseNumber() { 865 return this.doseNumber; 866 } 867 868 /** 869 * @return {@link #doseNumber} (Nominal position in a series.) 870 */ 871 public PositiveIntType getDoseNumberPositiveIntType() throws FHIRException { 872 if (this.doseNumber == null) 873 this.doseNumber = new PositiveIntType(); 874 if (!(this.doseNumber instanceof PositiveIntType)) 875 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but " 876 + this.doseNumber.getClass().getName() + " was encountered"); 877 return (PositiveIntType) this.doseNumber; 878 } 879 880 public boolean hasDoseNumberPositiveIntType() { 881 return this != null && this.doseNumber instanceof PositiveIntType; 882 } 883 884 /** 885 * @return {@link #doseNumber} (Nominal position in a series.) 886 */ 887 public StringType getDoseNumberStringType() throws FHIRException { 888 if (this.doseNumber == null) 889 this.doseNumber = new StringType(); 890 if (!(this.doseNumber instanceof StringType)) 891 throw new FHIRException("Type mismatch: the type StringType was expected, but " 892 + this.doseNumber.getClass().getName() + " was encountered"); 893 return (StringType) this.doseNumber; 894 } 895 896 public boolean hasDoseNumberStringType() { 897 return this != null && this.doseNumber instanceof StringType; 898 } 899 900 public boolean hasDoseNumber() { 901 return this.doseNumber != null && !this.doseNumber.isEmpty(); 902 } 903 904 /** 905 * @param value {@link #doseNumber} (Nominal position in a series.) 906 */ 907 public ImmunizationEvaluation setDoseNumber(Type value) { 908 if (value != null && !(value instanceof PositiveIntType || value instanceof StringType)) 909 throw new Error("Not the right type for ImmunizationEvaluation.doseNumber[x]: " + value.fhirType()); 910 this.doseNumber = value; 911 return this; 912 } 913 914 /** 915 * @return {@link #seriesDoses} (The recommended number of doses to achieve 916 * immunity.) 917 */ 918 public Type getSeriesDoses() { 919 return this.seriesDoses; 920 } 921 922 /** 923 * @return {@link #seriesDoses} (The recommended number of doses to achieve 924 * immunity.) 925 */ 926 public PositiveIntType getSeriesDosesPositiveIntType() throws FHIRException { 927 if (this.seriesDoses == null) 928 this.seriesDoses = new PositiveIntType(); 929 if (!(this.seriesDoses instanceof PositiveIntType)) 930 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but " 931 + this.seriesDoses.getClass().getName() + " was encountered"); 932 return (PositiveIntType) this.seriesDoses; 933 } 934 935 public boolean hasSeriesDosesPositiveIntType() { 936 return this != null && this.seriesDoses instanceof PositiveIntType; 937 } 938 939 /** 940 * @return {@link #seriesDoses} (The recommended number of doses to achieve 941 * immunity.) 942 */ 943 public StringType getSeriesDosesStringType() throws FHIRException { 944 if (this.seriesDoses == null) 945 this.seriesDoses = new StringType(); 946 if (!(this.seriesDoses instanceof StringType)) 947 throw new FHIRException("Type mismatch: the type StringType was expected, but " 948 + this.seriesDoses.getClass().getName() + " was encountered"); 949 return (StringType) this.seriesDoses; 950 } 951 952 public boolean hasSeriesDosesStringType() { 953 return this != null && this.seriesDoses instanceof StringType; 954 } 955 956 public boolean hasSeriesDoses() { 957 return this.seriesDoses != null && !this.seriesDoses.isEmpty(); 958 } 959 960 /** 961 * @param value {@link #seriesDoses} (The recommended number of doses to achieve 962 * immunity.) 963 */ 964 public ImmunizationEvaluation setSeriesDoses(Type value) { 965 if (value != null && !(value instanceof PositiveIntType || value instanceof StringType)) 966 throw new Error("Not the right type for ImmunizationEvaluation.seriesDoses[x]: " + value.fhirType()); 967 this.seriesDoses = value; 968 return this; 969 } 970 971 protected void listChildren(List<Property> children) { 972 super.listChildren(children); 973 children.add( 974 new Property("identifier", "Identifier", "A unique identifier assigned to this immunization evaluation record.", 975 0, java.lang.Integer.MAX_VALUE, identifier)); 976 children.add(new Property("status", "code", 977 "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status)); 978 children.add(new Property("patient", "Reference(Patient)", "The individual for whom the evaluation is being done.", 979 0, 1, patient)); 980 children.add(new Property("date", "dateTime", 981 "The date the evaluation of the vaccine administration event was performed.", 0, 1, date)); 982 children.add(new Property("authority", "Reference(Organization)", 983 "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority)); 984 children.add(new Property("targetDisease", "CodeableConcept", 985 "The vaccine preventable disease the dose is being evaluated against.", 0, 1, targetDisease)); 986 children.add(new Property("immunizationEvent", "Reference(Immunization)", 987 "The vaccine administration event being evaluated.", 0, 1, immunizationEvent)); 988 children.add(new Property("doseStatus", "CodeableConcept", 989 "Indicates if the dose is valid or not valid with respect to the published recommendations.", 0, 1, 990 doseStatus)); 991 children.add(new Property("doseStatusReason", "CodeableConcept", 992 "Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.", 993 0, java.lang.Integer.MAX_VALUE, doseStatusReason)); 994 children 995 .add(new Property("description", "string", "Additional information about the evaluation.", 0, 1, description)); 996 children.add(new Property("series", "string", 997 "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, 1, 998 series)); 999 children 1000 .add(new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber)); 1001 children.add(new Property("seriesDoses[x]", "positiveInt|string", 1002 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses)); 1003 } 1004 1005 @Override 1006 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1007 switch (_hash) { 1008 case -1618432855: 1009 /* identifier */ return new Property("identifier", "Identifier", 1010 "A unique identifier assigned to this immunization evaluation record.", 0, java.lang.Integer.MAX_VALUE, 1011 identifier); 1012 case -892481550: 1013 /* status */ return new Property("status", "code", 1014 "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status); 1015 case -791418107: 1016 /* patient */ return new Property("patient", "Reference(Patient)", 1017 "The individual for whom the evaluation is being done.", 0, 1, patient); 1018 case 3076014: 1019 /* date */ return new Property("date", "dateTime", 1020 "The date the evaluation of the vaccine administration event was performed.", 0, 1, date); 1021 case 1475610435: 1022 /* authority */ return new Property("authority", "Reference(Organization)", 1023 "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority); 1024 case -319593813: 1025 /* targetDisease */ return new Property("targetDisease", "CodeableConcept", 1026 "The vaccine preventable disease the dose is being evaluated against.", 0, 1, targetDisease); 1027 case 1081446840: 1028 /* immunizationEvent */ return new Property("immunizationEvent", "Reference(Immunization)", 1029 "The vaccine administration event being evaluated.", 0, 1, immunizationEvent); 1030 case -745826705: 1031 /* doseStatus */ return new Property("doseStatus", "CodeableConcept", 1032 "Indicates if the dose is valid or not valid with respect to the published recommendations.", 0, 1, 1033 doseStatus); 1034 case 662783379: 1035 /* doseStatusReason */ return new Property("doseStatusReason", "CodeableConcept", 1036 "Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.", 1037 0, java.lang.Integer.MAX_VALUE, doseStatusReason); 1038 case -1724546052: 1039 /* description */ return new Property("description", "string", "Additional information about the evaluation.", 0, 1040 1, description); 1041 case -905838985: 1042 /* series */ return new Property("series", "string", 1043 "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, 1044 1, series); 1045 case -1632295686: 1046 /* doseNumber[x] */ return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1047 1, doseNumber); 1048 case -887709242: 1049 /* doseNumber */ return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, 1050 doseNumber); 1051 case -1826134640: 1052 /* doseNumberPositiveInt */ return new Property("doseNumber[x]", "positiveInt|string", 1053 "Nominal position in a series.", 0, 1, doseNumber); 1054 case -333053577: 1055 /* doseNumberString */ return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 1056 0, 1, doseNumber); 1057 case 1553560673: 1058 /* seriesDoses[x] */ return new Property("seriesDoses[x]", "positiveInt|string", 1059 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1060 case -1936727105: 1061 /* seriesDoses */ return new Property("seriesDoses[x]", "positiveInt|string", 1062 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1063 case -220897801: 1064 /* seriesDosesPositiveInt */ return new Property("seriesDoses[x]", "positiveInt|string", 1065 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1066 case -673569616: 1067 /* seriesDosesString */ return new Property("seriesDoses[x]", "positiveInt|string", 1068 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1069 default: 1070 return super.getNamedProperty(_hash, _name, _checkValid); 1071 } 1072 1073 } 1074 1075 @Override 1076 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1077 switch (hash) { 1078 case -1618432855: 1079 /* identifier */ return this.identifier == null ? new Base[0] 1080 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1081 case -892481550: 1082 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<ImmunizationEvaluationStatus> 1083 case -791418107: 1084 /* patient */ return this.patient == null ? new Base[0] : new Base[] { this.patient }; // Reference 1085 case 3076014: 1086 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 1087 case 1475610435: 1088 /* authority */ return this.authority == null ? new Base[0] : new Base[] { this.authority }; // Reference 1089 case -319593813: 1090 /* targetDisease */ return this.targetDisease == null ? new Base[0] : new Base[] { this.targetDisease }; // CodeableConcept 1091 case 1081446840: 1092 /* immunizationEvent */ return this.immunizationEvent == null ? new Base[0] 1093 : new Base[] { this.immunizationEvent }; // Reference 1094 case -745826705: 1095 /* doseStatus */ return this.doseStatus == null ? new Base[0] : new Base[] { this.doseStatus }; // CodeableConcept 1096 case 662783379: 1097 /* doseStatusReason */ return this.doseStatusReason == null ? new Base[0] 1098 : this.doseStatusReason.toArray(new Base[this.doseStatusReason.size()]); // CodeableConcept 1099 case -1724546052: 1100 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 1101 case -905838985: 1102 /* series */ return this.series == null ? new Base[0] : new Base[] { this.series }; // StringType 1103 case -887709242: 1104 /* doseNumber */ return this.doseNumber == null ? new Base[0] : new Base[] { this.doseNumber }; // Type 1105 case -1936727105: 1106 /* seriesDoses */ return this.seriesDoses == null ? new Base[0] : new Base[] { this.seriesDoses }; // Type 1107 default: 1108 return super.getProperty(hash, name, checkValid); 1109 } 1110 1111 } 1112 1113 @Override 1114 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1115 switch (hash) { 1116 case -1618432855: // identifier 1117 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1118 return value; 1119 case -892481550: // status 1120 value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value)); 1121 this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus> 1122 return value; 1123 case -791418107: // patient 1124 this.patient = castToReference(value); // Reference 1125 return value; 1126 case 3076014: // date 1127 this.date = castToDateTime(value); // DateTimeType 1128 return value; 1129 case 1475610435: // authority 1130 this.authority = castToReference(value); // Reference 1131 return value; 1132 case -319593813: // targetDisease 1133 this.targetDisease = castToCodeableConcept(value); // CodeableConcept 1134 return value; 1135 case 1081446840: // immunizationEvent 1136 this.immunizationEvent = castToReference(value); // Reference 1137 return value; 1138 case -745826705: // doseStatus 1139 this.doseStatus = castToCodeableConcept(value); // CodeableConcept 1140 return value; 1141 case 662783379: // doseStatusReason 1142 this.getDoseStatusReason().add(castToCodeableConcept(value)); // CodeableConcept 1143 return value; 1144 case -1724546052: // description 1145 this.description = castToString(value); // StringType 1146 return value; 1147 case -905838985: // series 1148 this.series = castToString(value); // StringType 1149 return value; 1150 case -887709242: // doseNumber 1151 this.doseNumber = castToType(value); // Type 1152 return value; 1153 case -1936727105: // seriesDoses 1154 this.seriesDoses = castToType(value); // Type 1155 return value; 1156 default: 1157 return super.setProperty(hash, name, value); 1158 } 1159 1160 } 1161 1162 @Override 1163 public Base setProperty(String name, Base value) throws FHIRException { 1164 if (name.equals("identifier")) { 1165 this.getIdentifier().add(castToIdentifier(value)); 1166 } else if (name.equals("status")) { 1167 value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value)); 1168 this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus> 1169 } else if (name.equals("patient")) { 1170 this.patient = castToReference(value); // Reference 1171 } else if (name.equals("date")) { 1172 this.date = castToDateTime(value); // DateTimeType 1173 } else if (name.equals("authority")) { 1174 this.authority = castToReference(value); // Reference 1175 } else if (name.equals("targetDisease")) { 1176 this.targetDisease = castToCodeableConcept(value); // CodeableConcept 1177 } else if (name.equals("immunizationEvent")) { 1178 this.immunizationEvent = castToReference(value); // Reference 1179 } else if (name.equals("doseStatus")) { 1180 this.doseStatus = castToCodeableConcept(value); // CodeableConcept 1181 } else if (name.equals("doseStatusReason")) { 1182 this.getDoseStatusReason().add(castToCodeableConcept(value)); 1183 } else if (name.equals("description")) { 1184 this.description = castToString(value); // StringType 1185 } else if (name.equals("series")) { 1186 this.series = castToString(value); // StringType 1187 } else if (name.equals("doseNumber[x]")) { 1188 this.doseNumber = castToType(value); // Type 1189 } else if (name.equals("seriesDoses[x]")) { 1190 this.seriesDoses = castToType(value); // Type 1191 } else 1192 return super.setProperty(name, value); 1193 return value; 1194 } 1195 1196 @Override 1197 public Base makeProperty(int hash, String name) throws FHIRException { 1198 switch (hash) { 1199 case -1618432855: 1200 return addIdentifier(); 1201 case -892481550: 1202 return getStatusElement(); 1203 case -791418107: 1204 return getPatient(); 1205 case 3076014: 1206 return getDateElement(); 1207 case 1475610435: 1208 return getAuthority(); 1209 case -319593813: 1210 return getTargetDisease(); 1211 case 1081446840: 1212 return getImmunizationEvent(); 1213 case -745826705: 1214 return getDoseStatus(); 1215 case 662783379: 1216 return addDoseStatusReason(); 1217 case -1724546052: 1218 return getDescriptionElement(); 1219 case -905838985: 1220 return getSeriesElement(); 1221 case -1632295686: 1222 return getDoseNumber(); 1223 case -887709242: 1224 return getDoseNumber(); 1225 case 1553560673: 1226 return getSeriesDoses(); 1227 case -1936727105: 1228 return getSeriesDoses(); 1229 default: 1230 return super.makeProperty(hash, name); 1231 } 1232 1233 } 1234 1235 @Override 1236 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1237 switch (hash) { 1238 case -1618432855: 1239 /* identifier */ return new String[] { "Identifier" }; 1240 case -892481550: 1241 /* status */ return new String[] { "code" }; 1242 case -791418107: 1243 /* patient */ return new String[] { "Reference" }; 1244 case 3076014: 1245 /* date */ return new String[] { "dateTime" }; 1246 case 1475610435: 1247 /* authority */ return new String[] { "Reference" }; 1248 case -319593813: 1249 /* targetDisease */ return new String[] { "CodeableConcept" }; 1250 case 1081446840: 1251 /* immunizationEvent */ return new String[] { "Reference" }; 1252 case -745826705: 1253 /* doseStatus */ return new String[] { "CodeableConcept" }; 1254 case 662783379: 1255 /* doseStatusReason */ return new String[] { "CodeableConcept" }; 1256 case -1724546052: 1257 /* description */ return new String[] { "string" }; 1258 case -905838985: 1259 /* series */ return new String[] { "string" }; 1260 case -887709242: 1261 /* doseNumber */ return new String[] { "positiveInt", "string" }; 1262 case -1936727105: 1263 /* seriesDoses */ return new String[] { "positiveInt", "string" }; 1264 default: 1265 return super.getTypesForProperty(hash, name); 1266 } 1267 1268 } 1269 1270 @Override 1271 public Base addChild(String name) throws FHIRException { 1272 if (name.equals("identifier")) { 1273 return addIdentifier(); 1274 } else if (name.equals("status")) { 1275 throw new FHIRException("Cannot call addChild on a singleton property ImmunizationEvaluation.status"); 1276 } else if (name.equals("patient")) { 1277 this.patient = new Reference(); 1278 return this.patient; 1279 } else if (name.equals("date")) { 1280 throw new FHIRException("Cannot call addChild on a singleton property ImmunizationEvaluation.date"); 1281 } else if (name.equals("authority")) { 1282 this.authority = new Reference(); 1283 return this.authority; 1284 } else if (name.equals("targetDisease")) { 1285 this.targetDisease = new CodeableConcept(); 1286 return this.targetDisease; 1287 } else if (name.equals("immunizationEvent")) { 1288 this.immunizationEvent = new Reference(); 1289 return this.immunizationEvent; 1290 } else if (name.equals("doseStatus")) { 1291 this.doseStatus = new CodeableConcept(); 1292 return this.doseStatus; 1293 } else if (name.equals("doseStatusReason")) { 1294 return addDoseStatusReason(); 1295 } else if (name.equals("description")) { 1296 throw new FHIRException("Cannot call addChild on a singleton property ImmunizationEvaluation.description"); 1297 } else if (name.equals("series")) { 1298 throw new FHIRException("Cannot call addChild on a singleton property ImmunizationEvaluation.series"); 1299 } else if (name.equals("doseNumberPositiveInt")) { 1300 this.doseNumber = new PositiveIntType(); 1301 return this.doseNumber; 1302 } else if (name.equals("doseNumberString")) { 1303 this.doseNumber = new StringType(); 1304 return this.doseNumber; 1305 } else if (name.equals("seriesDosesPositiveInt")) { 1306 this.seriesDoses = new PositiveIntType(); 1307 return this.seriesDoses; 1308 } else if (name.equals("seriesDosesString")) { 1309 this.seriesDoses = new StringType(); 1310 return this.seriesDoses; 1311 } else 1312 return super.addChild(name); 1313 } 1314 1315 public String fhirType() { 1316 return "ImmunizationEvaluation"; 1317 1318 } 1319 1320 public ImmunizationEvaluation copy() { 1321 ImmunizationEvaluation dst = new ImmunizationEvaluation(); 1322 copyValues(dst); 1323 return dst; 1324 } 1325 1326 public void copyValues(ImmunizationEvaluation dst) { 1327 super.copyValues(dst); 1328 if (identifier != null) { 1329 dst.identifier = new ArrayList<Identifier>(); 1330 for (Identifier i : identifier) 1331 dst.identifier.add(i.copy()); 1332 } 1333 ; 1334 dst.status = status == null ? null : status.copy(); 1335 dst.patient = patient == null ? null : patient.copy(); 1336 dst.date = date == null ? null : date.copy(); 1337 dst.authority = authority == null ? null : authority.copy(); 1338 dst.targetDisease = targetDisease == null ? null : targetDisease.copy(); 1339 dst.immunizationEvent = immunizationEvent == null ? null : immunizationEvent.copy(); 1340 dst.doseStatus = doseStatus == null ? null : doseStatus.copy(); 1341 if (doseStatusReason != null) { 1342 dst.doseStatusReason = new ArrayList<CodeableConcept>(); 1343 for (CodeableConcept i : doseStatusReason) 1344 dst.doseStatusReason.add(i.copy()); 1345 } 1346 ; 1347 dst.description = description == null ? null : description.copy(); 1348 dst.series = series == null ? null : series.copy(); 1349 dst.doseNumber = doseNumber == null ? null : doseNumber.copy(); 1350 dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy(); 1351 } 1352 1353 protected ImmunizationEvaluation typedCopy() { 1354 return copy(); 1355 } 1356 1357 @Override 1358 public boolean equalsDeep(Base other_) { 1359 if (!super.equalsDeep(other_)) 1360 return false; 1361 if (!(other_ instanceof ImmunizationEvaluation)) 1362 return false; 1363 ImmunizationEvaluation o = (ImmunizationEvaluation) other_; 1364 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) 1365 && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true) 1366 && compareDeep(authority, o.authority, true) && compareDeep(targetDisease, o.targetDisease, true) 1367 && compareDeep(immunizationEvent, o.immunizationEvent, true) && compareDeep(doseStatus, o.doseStatus, true) 1368 && compareDeep(doseStatusReason, o.doseStatusReason, true) && compareDeep(description, o.description, true) 1369 && compareDeep(series, o.series, true) && compareDeep(doseNumber, o.doseNumber, true) 1370 && compareDeep(seriesDoses, o.seriesDoses, true); 1371 } 1372 1373 @Override 1374 public boolean equalsShallow(Base other_) { 1375 if (!super.equalsShallow(other_)) 1376 return false; 1377 if (!(other_ instanceof ImmunizationEvaluation)) 1378 return false; 1379 ImmunizationEvaluation o = (ImmunizationEvaluation) other_; 1380 return compareValues(status, o.status, true) && compareValues(date, o.date, true) 1381 && compareValues(description, o.description, true) && compareValues(series, o.series, true); 1382 } 1383 1384 public boolean isEmpty() { 1385 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient, date, authority, 1386 targetDisease, immunizationEvent, doseStatus, doseStatusReason, description, series, doseNumber, seriesDoses); 1387 } 1388 1389 @Override 1390 public ResourceType getResourceType() { 1391 return ResourceType.ImmunizationEvaluation; 1392 } 1393 1394 /** 1395 * Search parameter: <b>date</b> 1396 * <p> 1397 * Description: <b>Date the evaluation was generated</b><br> 1398 * Type: <b>date</b><br> 1399 * Path: <b>ImmunizationEvaluation.date</b><br> 1400 * </p> 1401 */ 1402 @SearchParamDefinition(name = "date", path = "ImmunizationEvaluation.date", description = "Date the evaluation was generated", type = "date") 1403 public static final String SP_DATE = "date"; 1404 /** 1405 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1406 * <p> 1407 * Description: <b>Date the evaluation was generated</b><br> 1408 * Type: <b>date</b><br> 1409 * Path: <b>ImmunizationEvaluation.date</b><br> 1410 * </p> 1411 */ 1412 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 1413 SP_DATE); 1414 1415 /** 1416 * Search parameter: <b>identifier</b> 1417 * <p> 1418 * Description: <b>ID of the evaluation</b><br> 1419 * Type: <b>token</b><br> 1420 * Path: <b>ImmunizationEvaluation.identifier</b><br> 1421 * </p> 1422 */ 1423 @SearchParamDefinition(name = "identifier", path = "ImmunizationEvaluation.identifier", description = "ID of the evaluation", type = "token") 1424 public static final String SP_IDENTIFIER = "identifier"; 1425 /** 1426 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1427 * <p> 1428 * Description: <b>ID of the evaluation</b><br> 1429 * Type: <b>token</b><br> 1430 * Path: <b>ImmunizationEvaluation.identifier</b><br> 1431 * </p> 1432 */ 1433 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 1434 SP_IDENTIFIER); 1435 1436 /** 1437 * Search parameter: <b>target-disease</b> 1438 * <p> 1439 * Description: <b>The vaccine preventable disease being evaluated 1440 * against</b><br> 1441 * Type: <b>token</b><br> 1442 * Path: <b>ImmunizationEvaluation.targetDisease</b><br> 1443 * </p> 1444 */ 1445 @SearchParamDefinition(name = "target-disease", path = "ImmunizationEvaluation.targetDisease", description = "The vaccine preventable disease being evaluated against", type = "token") 1446 public static final String SP_TARGET_DISEASE = "target-disease"; 1447 /** 1448 * <b>Fluent Client</b> search parameter constant for <b>target-disease</b> 1449 * <p> 1450 * Description: <b>The vaccine preventable disease being evaluated 1451 * against</b><br> 1452 * Type: <b>token</b><br> 1453 * Path: <b>ImmunizationEvaluation.targetDisease</b><br> 1454 * </p> 1455 */ 1456 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 1457 SP_TARGET_DISEASE); 1458 1459 /** 1460 * Search parameter: <b>patient</b> 1461 * <p> 1462 * Description: <b>The patient being evaluated</b><br> 1463 * Type: <b>reference</b><br> 1464 * Path: <b>ImmunizationEvaluation.patient</b><br> 1465 * </p> 1466 */ 1467 @SearchParamDefinition(name = "patient", path = "ImmunizationEvaluation.patient", description = "The patient being evaluated", type = "reference", providesMembershipIn = { 1468 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Patient") }, target = { Patient.class }) 1469 public static final String SP_PATIENT = "patient"; 1470 /** 1471 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1472 * <p> 1473 * Description: <b>The patient being evaluated</b><br> 1474 * Type: <b>reference</b><br> 1475 * Path: <b>ImmunizationEvaluation.patient</b><br> 1476 * </p> 1477 */ 1478 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 1479 SP_PATIENT); 1480 1481 /** 1482 * Constant for fluent queries to be used to add include statements. Specifies 1483 * the path value of "<b>ImmunizationEvaluation:patient</b>". 1484 */ 1485 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include( 1486 "ImmunizationEvaluation:patient").toLocked(); 1487 1488 /** 1489 * Search parameter: <b>dose-status</b> 1490 * <p> 1491 * Description: <b>The status of the dose relative to published 1492 * recommendations</b><br> 1493 * Type: <b>token</b><br> 1494 * Path: <b>ImmunizationEvaluation.doseStatus</b><br> 1495 * </p> 1496 */ 1497 @SearchParamDefinition(name = "dose-status", path = "ImmunizationEvaluation.doseStatus", description = "The status of the dose relative to published recommendations", type = "token") 1498 public static final String SP_DOSE_STATUS = "dose-status"; 1499 /** 1500 * <b>Fluent Client</b> search parameter constant for <b>dose-status</b> 1501 * <p> 1502 * Description: <b>The status of the dose relative to published 1503 * recommendations</b><br> 1504 * Type: <b>token</b><br> 1505 * Path: <b>ImmunizationEvaluation.doseStatus</b><br> 1506 * </p> 1507 */ 1508 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DOSE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 1509 SP_DOSE_STATUS); 1510 1511 /** 1512 * Search parameter: <b>immunization-event</b> 1513 * <p> 1514 * Description: <b>The vaccine administration event being evaluated</b><br> 1515 * Type: <b>reference</b><br> 1516 * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br> 1517 * </p> 1518 */ 1519 @SearchParamDefinition(name = "immunization-event", path = "ImmunizationEvaluation.immunizationEvent", description = "The vaccine administration event being evaluated", type = "reference", target = { 1520 Immunization.class }) 1521 public static final String SP_IMMUNIZATION_EVENT = "immunization-event"; 1522 /** 1523 * <b>Fluent Client</b> search parameter constant for <b>immunization-event</b> 1524 * <p> 1525 * Description: <b>The vaccine administration event being evaluated</b><br> 1526 * Type: <b>reference</b><br> 1527 * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br> 1528 * </p> 1529 */ 1530 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam IMMUNIZATION_EVENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 1531 SP_IMMUNIZATION_EVENT); 1532 1533 /** 1534 * Constant for fluent queries to be used to add include statements. Specifies 1535 * the path value of "<b>ImmunizationEvaluation:immunization-event</b>". 1536 */ 1537 public static final ca.uhn.fhir.model.api.Include INCLUDE_IMMUNIZATION_EVENT = new ca.uhn.fhir.model.api.Include( 1538 "ImmunizationEvaluation:immunization-event").toLocked(); 1539 1540 /** 1541 * Search parameter: <b>status</b> 1542 * <p> 1543 * Description: <b>Immunization evaluation status</b><br> 1544 * Type: <b>token</b><br> 1545 * Path: <b>ImmunizationEvaluation.status</b><br> 1546 * </p> 1547 */ 1548 @SearchParamDefinition(name = "status", path = "ImmunizationEvaluation.status", description = "Immunization evaluation status", type = "token") 1549 public static final String SP_STATUS = "status"; 1550 /** 1551 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1552 * <p> 1553 * Description: <b>Immunization evaluation status</b><br> 1554 * Type: <b>token</b><br> 1555 * Path: <b>ImmunizationEvaluation.status</b><br> 1556 * </p> 1557 */ 1558 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 1559 SP_STATUS); 1560 1561}