![](/hapi-fhir/images/logos/raccoon-forwards.png)
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.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 046 047/** 048 * Describes the event of a patient being administered a vaccine or a record of 049 * an immunization as reported by a patient, a clinician or another party. 050 */ 051@ResourceDef(name = "Immunization", profile = "http://hl7.org/fhir/StructureDefinition/Immunization") 052public class Immunization extends DomainResource { 053 054 public enum ImmunizationStatus { 055 /** 056 * null 057 */ 058 COMPLETED, 059 /** 060 * null 061 */ 062 ENTEREDINERROR, 063 /** 064 * null 065 */ 066 NOTDONE, 067 /** 068 * added to help the parsers with the generic types 069 */ 070 NULL; 071 072 public static ImmunizationStatus fromCode(String codeString) throws FHIRException { 073 if (codeString == null || "".equals(codeString)) 074 return null; 075 if ("completed".equals(codeString)) 076 return COMPLETED; 077 if ("entered-in-error".equals(codeString)) 078 return ENTEREDINERROR; 079 if ("not-done".equals(codeString)) 080 return NOTDONE; 081 if (Configuration.isAcceptInvalidEnums()) 082 return null; 083 else 084 throw new FHIRException("Unknown ImmunizationStatus code '" + codeString + "'"); 085 } 086 087 public String toCode() { 088 switch (this) { 089 case COMPLETED: 090 return "completed"; 091 case ENTEREDINERROR: 092 return "entered-in-error"; 093 case NOTDONE: 094 return "not-done"; 095 case NULL: 096 return null; 097 default: 098 return "?"; 099 } 100 } 101 102 public String getSystem() { 103 switch (this) { 104 case COMPLETED: 105 return "http://hl7.org/fhir/event-status"; 106 case ENTEREDINERROR: 107 return "http://hl7.org/fhir/event-status"; 108 case NOTDONE: 109 return "http://hl7.org/fhir/event-status"; 110 case NULL: 111 return null; 112 default: 113 return "?"; 114 } 115 } 116 117 public String getDefinition() { 118 switch (this) { 119 case COMPLETED: 120 return ""; 121 case ENTEREDINERROR: 122 return ""; 123 case NOTDONE: 124 return ""; 125 case NULL: 126 return null; 127 default: 128 return "?"; 129 } 130 } 131 132 public String getDisplay() { 133 switch (this) { 134 case COMPLETED: 135 return "completed"; 136 case ENTEREDINERROR: 137 return "entered-in-error"; 138 case NOTDONE: 139 return "not-done"; 140 case NULL: 141 return null; 142 default: 143 return "?"; 144 } 145 } 146 } 147 148 public static class ImmunizationStatusEnumFactory implements EnumFactory<ImmunizationStatus> { 149 public ImmunizationStatus fromCode(String codeString) throws IllegalArgumentException { 150 if (codeString == null || "".equals(codeString)) 151 if (codeString == null || "".equals(codeString)) 152 return null; 153 if ("completed".equals(codeString)) 154 return ImmunizationStatus.COMPLETED; 155 if ("entered-in-error".equals(codeString)) 156 return ImmunizationStatus.ENTEREDINERROR; 157 if ("not-done".equals(codeString)) 158 return ImmunizationStatus.NOTDONE; 159 throw new IllegalArgumentException("Unknown ImmunizationStatus code '" + codeString + "'"); 160 } 161 162 public Enumeration<ImmunizationStatus> fromType(PrimitiveType<?> code) throws FHIRException { 163 if (code == null) 164 return null; 165 if (code.isEmpty()) 166 return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.NULL, code); 167 String codeString = code.asStringValue(); 168 if (codeString == null || "".equals(codeString)) 169 return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.NULL, code); 170 if ("completed".equals(codeString)) 171 return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.COMPLETED, code); 172 if ("entered-in-error".equals(codeString)) 173 return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.ENTEREDINERROR, code); 174 if ("not-done".equals(codeString)) 175 return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.NOTDONE, code); 176 throw new FHIRException("Unknown ImmunizationStatus code '" + codeString + "'"); 177 } 178 179 public String toCode(ImmunizationStatus code) { 180 if (code == ImmunizationStatus.COMPLETED) 181 return "completed"; 182 if (code == ImmunizationStatus.ENTEREDINERROR) 183 return "entered-in-error"; 184 if (code == ImmunizationStatus.NOTDONE) 185 return "not-done"; 186 return "?"; 187 } 188 189 public String toSystem(ImmunizationStatus code) { 190 return code.getSystem(); 191 } 192 } 193 194 @Block() 195 public static class ImmunizationPerformerComponent extends BackboneElement implements IBaseBackboneElement { 196 /** 197 * Describes the type of performance (e.g. ordering provider, administering 198 * provider, etc.). 199 */ 200 @Child(name = "function", type = { 201 CodeableConcept.class }, order = 1, min = 0, max = 1, modifier = false, summary = true) 202 @Description(shortDefinition = "What type of performance was done", formalDefinition = "Describes the type of performance (e.g. ordering provider, administering provider, etc.).") 203 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-function") 204 protected CodeableConcept function; 205 206 /** 207 * The practitioner or organization who performed the action. 208 */ 209 @Child(name = "actor", type = { Practitioner.class, PractitionerRole.class, 210 Organization.class }, order = 2, min = 1, max = 1, modifier = false, summary = true) 211 @Description(shortDefinition = "Individual or organization who was performing", formalDefinition = "The practitioner or organization who performed the action.") 212 protected Reference actor; 213 214 /** 215 * The actual object that is the target of the reference (The practitioner or 216 * organization who performed the action.) 217 */ 218 protected Resource actorTarget; 219 220 private static final long serialVersionUID = 1424001049L; 221 222 /** 223 * Constructor 224 */ 225 public ImmunizationPerformerComponent() { 226 super(); 227 } 228 229 /** 230 * Constructor 231 */ 232 public ImmunizationPerformerComponent(Reference actor) { 233 super(); 234 this.actor = actor; 235 } 236 237 /** 238 * @return {@link #function} (Describes the type of performance (e.g. ordering 239 * provider, administering provider, etc.).) 240 */ 241 public CodeableConcept getFunction() { 242 if (this.function == null) 243 if (Configuration.errorOnAutoCreate()) 244 throw new Error("Attempt to auto-create ImmunizationPerformerComponent.function"); 245 else if (Configuration.doAutoCreate()) 246 this.function = new CodeableConcept(); // cc 247 return this.function; 248 } 249 250 public boolean hasFunction() { 251 return this.function != null && !this.function.isEmpty(); 252 } 253 254 /** 255 * @param value {@link #function} (Describes the type of performance (e.g. 256 * ordering provider, administering provider, etc.).) 257 */ 258 public ImmunizationPerformerComponent setFunction(CodeableConcept value) { 259 this.function = value; 260 return this; 261 } 262 263 /** 264 * @return {@link #actor} (The practitioner or organization who performed the 265 * action.) 266 */ 267 public Reference getActor() { 268 if (this.actor == null) 269 if (Configuration.errorOnAutoCreate()) 270 throw new Error("Attempt to auto-create ImmunizationPerformerComponent.actor"); 271 else if (Configuration.doAutoCreate()) 272 this.actor = new Reference(); // cc 273 return this.actor; 274 } 275 276 public boolean hasActor() { 277 return this.actor != null && !this.actor.isEmpty(); 278 } 279 280 /** 281 * @param value {@link #actor} (The practitioner or organization who performed 282 * the action.) 283 */ 284 public ImmunizationPerformerComponent setActor(Reference value) { 285 this.actor = value; 286 return this; 287 } 288 289 /** 290 * @return {@link #actor} The actual object that is the target of the reference. 291 * The reference library doesn't populate this, but you can use it to 292 * hold the resource if you resolve it. (The practitioner or 293 * organization who performed the action.) 294 */ 295 public Resource getActorTarget() { 296 return this.actorTarget; 297 } 298 299 /** 300 * @param value {@link #actor} The actual object that is the target of the 301 * reference. The reference library doesn't use these, but you can 302 * use it to hold the resource if you resolve it. (The practitioner 303 * or organization who performed the action.) 304 */ 305 public ImmunizationPerformerComponent setActorTarget(Resource value) { 306 this.actorTarget = value; 307 return this; 308 } 309 310 protected void listChildren(List<Property> children) { 311 super.listChildren(children); 312 children.add(new Property("function", "CodeableConcept", 313 "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, function)); 314 children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization)", 315 "The practitioner or organization who performed the action.", 0, 1, actor)); 316 } 317 318 @Override 319 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 320 switch (_hash) { 321 case 1380938712: 322 /* function */ return new Property("function", "CodeableConcept", 323 "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, 324 function); 325 case 92645877: 326 /* actor */ return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization)", 327 "The practitioner or organization who performed the action.", 0, 1, actor); 328 default: 329 return super.getNamedProperty(_hash, _name, _checkValid); 330 } 331 332 } 333 334 @Override 335 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 336 switch (hash) { 337 case 1380938712: 338 /* function */ return this.function == null ? new Base[0] : new Base[] { this.function }; // CodeableConcept 339 case 92645877: 340 /* actor */ return this.actor == null ? new Base[0] : new Base[] { this.actor }; // Reference 341 default: 342 return super.getProperty(hash, name, checkValid); 343 } 344 345 } 346 347 @Override 348 public Base setProperty(int hash, String name, Base value) throws FHIRException { 349 switch (hash) { 350 case 1380938712: // function 351 this.function = castToCodeableConcept(value); // CodeableConcept 352 return value; 353 case 92645877: // actor 354 this.actor = castToReference(value); // Reference 355 return value; 356 default: 357 return super.setProperty(hash, name, value); 358 } 359 360 } 361 362 @Override 363 public Base setProperty(String name, Base value) throws FHIRException { 364 if (name.equals("function")) { 365 this.function = castToCodeableConcept(value); // CodeableConcept 366 } else if (name.equals("actor")) { 367 this.actor = castToReference(value); // Reference 368 } else 369 return super.setProperty(name, value); 370 return value; 371 } 372 373 @Override 374 public void removeChild(String name, Base value) throws FHIRException { 375 if (name.equals("function")) { 376 this.function = null; 377 } else if (name.equals("actor")) { 378 this.actor = null; 379 } else 380 super.removeChild(name, value); 381 382 } 383 384 @Override 385 public Base makeProperty(int hash, String name) throws FHIRException { 386 switch (hash) { 387 case 1380938712: 388 return getFunction(); 389 case 92645877: 390 return getActor(); 391 default: 392 return super.makeProperty(hash, name); 393 } 394 395 } 396 397 @Override 398 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 399 switch (hash) { 400 case 1380938712: 401 /* function */ return new String[] { "CodeableConcept" }; 402 case 92645877: 403 /* actor */ return new String[] { "Reference" }; 404 default: 405 return super.getTypesForProperty(hash, name); 406 } 407 408 } 409 410 @Override 411 public Base addChild(String name) throws FHIRException { 412 if (name.equals("function")) { 413 this.function = new CodeableConcept(); 414 return this.function; 415 } else if (name.equals("actor")) { 416 this.actor = new Reference(); 417 return this.actor; 418 } else 419 return super.addChild(name); 420 } 421 422 public ImmunizationPerformerComponent copy() { 423 ImmunizationPerformerComponent dst = new ImmunizationPerformerComponent(); 424 copyValues(dst); 425 return dst; 426 } 427 428 public void copyValues(ImmunizationPerformerComponent dst) { 429 super.copyValues(dst); 430 dst.function = function == null ? null : function.copy(); 431 dst.actor = actor == null ? null : actor.copy(); 432 } 433 434 @Override 435 public boolean equalsDeep(Base other_) { 436 if (!super.equalsDeep(other_)) 437 return false; 438 if (!(other_ instanceof ImmunizationPerformerComponent)) 439 return false; 440 ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_; 441 return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true); 442 } 443 444 @Override 445 public boolean equalsShallow(Base other_) { 446 if (!super.equalsShallow(other_)) 447 return false; 448 if (!(other_ instanceof ImmunizationPerformerComponent)) 449 return false; 450 ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_; 451 return true; 452 } 453 454 public boolean isEmpty() { 455 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor); 456 } 457 458 public String fhirType() { 459 return "Immunization.performer"; 460 461 } 462 463 } 464 465 @Block() 466 public static class ImmunizationEducationComponent extends BackboneElement implements IBaseBackboneElement { 467 /** 468 * Identifier of the material presented to the patient. 469 */ 470 @Child(name = "documentType", type = { 471 StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 472 @Description(shortDefinition = "Educational material document identifier", formalDefinition = "Identifier of the material presented to the patient.") 473 protected StringType documentType; 474 475 /** 476 * Reference pointer to the educational material given to the patient if the 477 * information was on line. 478 */ 479 @Child(name = "reference", type = { UriType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 480 @Description(shortDefinition = "Educational material reference pointer", formalDefinition = "Reference pointer to the educational material given to the patient if the information was on line.") 481 protected UriType reference; 482 483 /** 484 * Date the educational material was published. 485 */ 486 @Child(name = "publicationDate", type = { 487 DateTimeType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 488 @Description(shortDefinition = "Educational material publication date", formalDefinition = "Date the educational material was published.") 489 protected DateTimeType publicationDate; 490 491 /** 492 * Date the educational material was given to the patient. 493 */ 494 @Child(name = "presentationDate", type = { 495 DateTimeType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 496 @Description(shortDefinition = "Educational material presentation date", formalDefinition = "Date the educational material was given to the patient.") 497 protected DateTimeType presentationDate; 498 499 private static final long serialVersionUID = -1277654827L; 500 501 /** 502 * Constructor 503 */ 504 public ImmunizationEducationComponent() { 505 super(); 506 } 507 508 /** 509 * @return {@link #documentType} (Identifier of the material presented to the 510 * patient.). This is the underlying object with id, value and 511 * extensions. The accessor "getDocumentType" gives direct access to the 512 * value 513 */ 514 public StringType getDocumentTypeElement() { 515 if (this.documentType == null) 516 if (Configuration.errorOnAutoCreate()) 517 throw new Error("Attempt to auto-create ImmunizationEducationComponent.documentType"); 518 else if (Configuration.doAutoCreate()) 519 this.documentType = new StringType(); // bb 520 return this.documentType; 521 } 522 523 public boolean hasDocumentTypeElement() { 524 return this.documentType != null && !this.documentType.isEmpty(); 525 } 526 527 public boolean hasDocumentType() { 528 return this.documentType != null && !this.documentType.isEmpty(); 529 } 530 531 /** 532 * @param value {@link #documentType} (Identifier of the material presented to 533 * the patient.). This is the underlying object with id, value and 534 * extensions. The accessor "getDocumentType" gives direct access 535 * to the value 536 */ 537 public ImmunizationEducationComponent setDocumentTypeElement(StringType value) { 538 this.documentType = value; 539 return this; 540 } 541 542 /** 543 * @return Identifier of the material presented to the patient. 544 */ 545 public String getDocumentType() { 546 return this.documentType == null ? null : this.documentType.getValue(); 547 } 548 549 /** 550 * @param value Identifier of the material presented to the patient. 551 */ 552 public ImmunizationEducationComponent setDocumentType(String value) { 553 if (Utilities.noString(value)) 554 this.documentType = null; 555 else { 556 if (this.documentType == null) 557 this.documentType = new StringType(); 558 this.documentType.setValue(value); 559 } 560 return this; 561 } 562 563 /** 564 * @return {@link #reference} (Reference pointer to the educational material 565 * given to the patient if the information was on line.). This is the 566 * underlying object with id, value and extensions. The accessor 567 * "getReference" gives direct access to the value 568 */ 569 public UriType getReferenceElement() { 570 if (this.reference == null) 571 if (Configuration.errorOnAutoCreate()) 572 throw new Error("Attempt to auto-create ImmunizationEducationComponent.reference"); 573 else if (Configuration.doAutoCreate()) 574 this.reference = new UriType(); // bb 575 return this.reference; 576 } 577 578 public boolean hasReferenceElement() { 579 return this.reference != null && !this.reference.isEmpty(); 580 } 581 582 public boolean hasReference() { 583 return this.reference != null && !this.reference.isEmpty(); 584 } 585 586 /** 587 * @param value {@link #reference} (Reference pointer to the educational 588 * material given to the patient if the information was on line.). 589 * This is the underlying object with id, value and extensions. The 590 * accessor "getReference" gives direct access to the value 591 */ 592 public ImmunizationEducationComponent setReferenceElement(UriType value) { 593 this.reference = value; 594 return this; 595 } 596 597 /** 598 * @return Reference pointer to the educational material given to the patient if 599 * the information was on line. 600 */ 601 public String getReference() { 602 return this.reference == null ? null : this.reference.getValue(); 603 } 604 605 /** 606 * @param value Reference pointer to the educational material given to the 607 * patient if the information was on line. 608 */ 609 public ImmunizationEducationComponent setReference(String value) { 610 if (Utilities.noString(value)) 611 this.reference = null; 612 else { 613 if (this.reference == null) 614 this.reference = new UriType(); 615 this.reference.setValue(value); 616 } 617 return this; 618 } 619 620 /** 621 * @return {@link #publicationDate} (Date the educational material was 622 * published.). This is the underlying object with id, value and 623 * extensions. The accessor "getPublicationDate" gives direct access to 624 * the value 625 */ 626 public DateTimeType getPublicationDateElement() { 627 if (this.publicationDate == null) 628 if (Configuration.errorOnAutoCreate()) 629 throw new Error("Attempt to auto-create ImmunizationEducationComponent.publicationDate"); 630 else if (Configuration.doAutoCreate()) 631 this.publicationDate = new DateTimeType(); // bb 632 return this.publicationDate; 633 } 634 635 public boolean hasPublicationDateElement() { 636 return this.publicationDate != null && !this.publicationDate.isEmpty(); 637 } 638 639 public boolean hasPublicationDate() { 640 return this.publicationDate != null && !this.publicationDate.isEmpty(); 641 } 642 643 /** 644 * @param value {@link #publicationDate} (Date the educational material was 645 * published.). This is the underlying object with id, value and 646 * extensions. The accessor "getPublicationDate" gives direct 647 * access to the value 648 */ 649 public ImmunizationEducationComponent setPublicationDateElement(DateTimeType value) { 650 this.publicationDate = value; 651 return this; 652 } 653 654 /** 655 * @return Date the educational material was published. 656 */ 657 public Date getPublicationDate() { 658 return this.publicationDate == null ? null : this.publicationDate.getValue(); 659 } 660 661 /** 662 * @param value Date the educational material was published. 663 */ 664 public ImmunizationEducationComponent setPublicationDate(Date value) { 665 if (value == null) 666 this.publicationDate = null; 667 else { 668 if (this.publicationDate == null) 669 this.publicationDate = new DateTimeType(); 670 this.publicationDate.setValue(value); 671 } 672 return this; 673 } 674 675 /** 676 * @return {@link #presentationDate} (Date the educational material was given to 677 * the patient.). This is the underlying object with id, value and 678 * extensions. The accessor "getPresentationDate" gives direct access to 679 * the value 680 */ 681 public DateTimeType getPresentationDateElement() { 682 if (this.presentationDate == null) 683 if (Configuration.errorOnAutoCreate()) 684 throw new Error("Attempt to auto-create ImmunizationEducationComponent.presentationDate"); 685 else if (Configuration.doAutoCreate()) 686 this.presentationDate = new DateTimeType(); // bb 687 return this.presentationDate; 688 } 689 690 public boolean hasPresentationDateElement() { 691 return this.presentationDate != null && !this.presentationDate.isEmpty(); 692 } 693 694 public boolean hasPresentationDate() { 695 return this.presentationDate != null && !this.presentationDate.isEmpty(); 696 } 697 698 /** 699 * @param value {@link #presentationDate} (Date the educational material was 700 * given to the patient.). This is the underlying object with id, 701 * value and extensions. The accessor "getPresentationDate" gives 702 * direct access to the value 703 */ 704 public ImmunizationEducationComponent setPresentationDateElement(DateTimeType value) { 705 this.presentationDate = value; 706 return this; 707 } 708 709 /** 710 * @return Date the educational material was given to the patient. 711 */ 712 public Date getPresentationDate() { 713 return this.presentationDate == null ? null : this.presentationDate.getValue(); 714 } 715 716 /** 717 * @param value Date the educational material was given to the patient. 718 */ 719 public ImmunizationEducationComponent setPresentationDate(Date value) { 720 if (value == null) 721 this.presentationDate = null; 722 else { 723 if (this.presentationDate == null) 724 this.presentationDate = new DateTimeType(); 725 this.presentationDate.setValue(value); 726 } 727 return this; 728 } 729 730 protected void listChildren(List<Property> children) { 731 super.listChildren(children); 732 children.add(new Property("documentType", "string", "Identifier of the material presented to the patient.", 0, 1, 733 documentType)); 734 children.add(new Property("reference", "uri", 735 "Reference pointer to the educational material given to the patient if the information was on line.", 0, 1, 736 reference)); 737 children.add(new Property("publicationDate", "dateTime", "Date the educational material was published.", 0, 1, 738 publicationDate)); 739 children.add(new Property("presentationDate", "dateTime", 740 "Date the educational material was given to the patient.", 0, 1, presentationDate)); 741 } 742 743 @Override 744 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 745 switch (_hash) { 746 case -1473196299: 747 /* documentType */ return new Property("documentType", "string", 748 "Identifier of the material presented to the patient.", 0, 1, documentType); 749 case -925155509: 750 /* reference */ return new Property("reference", "uri", 751 "Reference pointer to the educational material given to the patient if the information was on line.", 0, 1, 752 reference); 753 case 1470566394: 754 /* publicationDate */ return new Property("publicationDate", "dateTime", 755 "Date the educational material was published.", 0, 1, publicationDate); 756 case 1602373096: 757 /* presentationDate */ return new Property("presentationDate", "dateTime", 758 "Date the educational material was given to the patient.", 0, 1, presentationDate); 759 default: 760 return super.getNamedProperty(_hash, _name, _checkValid); 761 } 762 763 } 764 765 @Override 766 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 767 switch (hash) { 768 case -1473196299: 769 /* documentType */ return this.documentType == null ? new Base[0] : new Base[] { this.documentType }; // StringType 770 case -925155509: 771 /* reference */ return this.reference == null ? new Base[0] : new Base[] { this.reference }; // UriType 772 case 1470566394: 773 /* publicationDate */ return this.publicationDate == null ? new Base[0] : new Base[] { this.publicationDate }; // DateTimeType 774 case 1602373096: 775 /* presentationDate */ return this.presentationDate == null ? new Base[0] 776 : new Base[] { this.presentationDate }; // DateTimeType 777 default: 778 return super.getProperty(hash, name, checkValid); 779 } 780 781 } 782 783 @Override 784 public Base setProperty(int hash, String name, Base value) throws FHIRException { 785 switch (hash) { 786 case -1473196299: // documentType 787 this.documentType = castToString(value); // StringType 788 return value; 789 case -925155509: // reference 790 this.reference = castToUri(value); // UriType 791 return value; 792 case 1470566394: // publicationDate 793 this.publicationDate = castToDateTime(value); // DateTimeType 794 return value; 795 case 1602373096: // presentationDate 796 this.presentationDate = castToDateTime(value); // DateTimeType 797 return value; 798 default: 799 return super.setProperty(hash, name, value); 800 } 801 802 } 803 804 @Override 805 public Base setProperty(String name, Base value) throws FHIRException { 806 if (name.equals("documentType")) { 807 this.documentType = castToString(value); // StringType 808 } else if (name.equals("reference")) { 809 this.reference = castToUri(value); // UriType 810 } else if (name.equals("publicationDate")) { 811 this.publicationDate = castToDateTime(value); // DateTimeType 812 } else if (name.equals("presentationDate")) { 813 this.presentationDate = castToDateTime(value); // DateTimeType 814 } else 815 return super.setProperty(name, value); 816 return value; 817 } 818 819 @Override 820 public void removeChild(String name, Base value) throws FHIRException { 821 if (name.equals("documentType")) { 822 this.documentType = null; 823 } else if (name.equals("reference")) { 824 this.reference = null; 825 } else if (name.equals("publicationDate")) { 826 this.publicationDate = null; 827 } else if (name.equals("presentationDate")) { 828 this.presentationDate = null; 829 } else 830 super.removeChild(name, value); 831 832 } 833 834 @Override 835 public Base makeProperty(int hash, String name) throws FHIRException { 836 switch (hash) { 837 case -1473196299: 838 return getDocumentTypeElement(); 839 case -925155509: 840 return getReferenceElement(); 841 case 1470566394: 842 return getPublicationDateElement(); 843 case 1602373096: 844 return getPresentationDateElement(); 845 default: 846 return super.makeProperty(hash, name); 847 } 848 849 } 850 851 @Override 852 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 853 switch (hash) { 854 case -1473196299: 855 /* documentType */ return new String[] { "string" }; 856 case -925155509: 857 /* reference */ return new String[] { "uri" }; 858 case 1470566394: 859 /* publicationDate */ return new String[] { "dateTime" }; 860 case 1602373096: 861 /* presentationDate */ return new String[] { "dateTime" }; 862 default: 863 return super.getTypesForProperty(hash, name); 864 } 865 866 } 867 868 @Override 869 public Base addChild(String name) throws FHIRException { 870 if (name.equals("documentType")) { 871 throw new FHIRException("Cannot call addChild on a singleton property Immunization.documentType"); 872 } else if (name.equals("reference")) { 873 throw new FHIRException("Cannot call addChild on a singleton property Immunization.reference"); 874 } else if (name.equals("publicationDate")) { 875 throw new FHIRException("Cannot call addChild on a singleton property Immunization.publicationDate"); 876 } else if (name.equals("presentationDate")) { 877 throw new FHIRException("Cannot call addChild on a singleton property Immunization.presentationDate"); 878 } else 879 return super.addChild(name); 880 } 881 882 public ImmunizationEducationComponent copy() { 883 ImmunizationEducationComponent dst = new ImmunizationEducationComponent(); 884 copyValues(dst); 885 return dst; 886 } 887 888 public void copyValues(ImmunizationEducationComponent dst) { 889 super.copyValues(dst); 890 dst.documentType = documentType == null ? null : documentType.copy(); 891 dst.reference = reference == null ? null : reference.copy(); 892 dst.publicationDate = publicationDate == null ? null : publicationDate.copy(); 893 dst.presentationDate = presentationDate == null ? null : presentationDate.copy(); 894 } 895 896 @Override 897 public boolean equalsDeep(Base other_) { 898 if (!super.equalsDeep(other_)) 899 return false; 900 if (!(other_ instanceof ImmunizationEducationComponent)) 901 return false; 902 ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_; 903 return compareDeep(documentType, o.documentType, true) && compareDeep(reference, o.reference, true) 904 && compareDeep(publicationDate, o.publicationDate, true) 905 && compareDeep(presentationDate, o.presentationDate, true); 906 } 907 908 @Override 909 public boolean equalsShallow(Base other_) { 910 if (!super.equalsShallow(other_)) 911 return false; 912 if (!(other_ instanceof ImmunizationEducationComponent)) 913 return false; 914 ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_; 915 return compareValues(documentType, o.documentType, true) && compareValues(reference, o.reference, true) 916 && compareValues(publicationDate, o.publicationDate, true) 917 && compareValues(presentationDate, o.presentationDate, true); 918 } 919 920 public boolean isEmpty() { 921 return super.isEmpty() 922 && ca.uhn.fhir.util.ElementUtil.isEmpty(documentType, reference, publicationDate, presentationDate); 923 } 924 925 public String fhirType() { 926 return "Immunization.education"; 927 928 } 929 930 } 931 932 @Block() 933 public static class ImmunizationReactionComponent extends BackboneElement implements IBaseBackboneElement { 934 /** 935 * Date of reaction to the immunization. 936 */ 937 @Child(name = "date", type = { DateTimeType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 938 @Description(shortDefinition = "When reaction started", formalDefinition = "Date of reaction to the immunization.") 939 protected DateTimeType date; 940 941 /** 942 * Details of the reaction. 943 */ 944 @Child(name = "detail", type = { 945 Observation.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 946 @Description(shortDefinition = "Additional information on reaction", formalDefinition = "Details of the reaction.") 947 protected Reference detail; 948 949 /** 950 * The actual object that is the target of the reference (Details of the 951 * reaction.) 952 */ 953 protected Observation detailTarget; 954 955 /** 956 * Self-reported indicator. 957 */ 958 @Child(name = "reported", type = { 959 BooleanType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 960 @Description(shortDefinition = "Indicates self-reported reaction", formalDefinition = "Self-reported indicator.") 961 protected BooleanType reported; 962 963 private static final long serialVersionUID = -1297668556L; 964 965 /** 966 * Constructor 967 */ 968 public ImmunizationReactionComponent() { 969 super(); 970 } 971 972 /** 973 * @return {@link #date} (Date of reaction to the immunization.). This is the 974 * underlying object with id, value and extensions. The accessor 975 * "getDate" gives direct access to the value 976 */ 977 public DateTimeType getDateElement() { 978 if (this.date == null) 979 if (Configuration.errorOnAutoCreate()) 980 throw new Error("Attempt to auto-create ImmunizationReactionComponent.date"); 981 else if (Configuration.doAutoCreate()) 982 this.date = new DateTimeType(); // bb 983 return this.date; 984 } 985 986 public boolean hasDateElement() { 987 return this.date != null && !this.date.isEmpty(); 988 } 989 990 public boolean hasDate() { 991 return this.date != null && !this.date.isEmpty(); 992 } 993 994 /** 995 * @param value {@link #date} (Date of reaction to the immunization.). This is 996 * the underlying object with id, value and extensions. The 997 * accessor "getDate" gives direct access to the value 998 */ 999 public ImmunizationReactionComponent setDateElement(DateTimeType value) { 1000 this.date = value; 1001 return this; 1002 } 1003 1004 /** 1005 * @return Date of reaction to the immunization. 1006 */ 1007 public Date getDate() { 1008 return this.date == null ? null : this.date.getValue(); 1009 } 1010 1011 /** 1012 * @param value Date of reaction to the immunization. 1013 */ 1014 public ImmunizationReactionComponent setDate(Date value) { 1015 if (value == null) 1016 this.date = null; 1017 else { 1018 if (this.date == null) 1019 this.date = new DateTimeType(); 1020 this.date.setValue(value); 1021 } 1022 return this; 1023 } 1024 1025 /** 1026 * @return {@link #detail} (Details of the reaction.) 1027 */ 1028 public Reference getDetail() { 1029 if (this.detail == null) 1030 if (Configuration.errorOnAutoCreate()) 1031 throw new Error("Attempt to auto-create ImmunizationReactionComponent.detail"); 1032 else if (Configuration.doAutoCreate()) 1033 this.detail = new Reference(); // cc 1034 return this.detail; 1035 } 1036 1037 public boolean hasDetail() { 1038 return this.detail != null && !this.detail.isEmpty(); 1039 } 1040 1041 /** 1042 * @param value {@link #detail} (Details of the reaction.) 1043 */ 1044 public ImmunizationReactionComponent setDetail(Reference value) { 1045 this.detail = value; 1046 return this; 1047 } 1048 1049 /** 1050 * @return {@link #detail} The actual object that is the target of the 1051 * reference. The reference library doesn't populate this, but you can 1052 * use it to hold the resource if you resolve it. (Details of the 1053 * reaction.) 1054 */ 1055 public Observation getDetailTarget() { 1056 if (this.detailTarget == null) 1057 if (Configuration.errorOnAutoCreate()) 1058 throw new Error("Attempt to auto-create ImmunizationReactionComponent.detail"); 1059 else if (Configuration.doAutoCreate()) 1060 this.detailTarget = new Observation(); // aa 1061 return this.detailTarget; 1062 } 1063 1064 /** 1065 * @param value {@link #detail} The actual object that is the target of the 1066 * reference. The reference library doesn't use these, but you can 1067 * use it to hold the resource if you resolve it. (Details of the 1068 * reaction.) 1069 */ 1070 public ImmunizationReactionComponent setDetailTarget(Observation value) { 1071 this.detailTarget = value; 1072 return this; 1073 } 1074 1075 /** 1076 * @return {@link #reported} (Self-reported indicator.). This is the underlying 1077 * object with id, value and extensions. The accessor "getReported" 1078 * gives direct access to the value 1079 */ 1080 public BooleanType getReportedElement() { 1081 if (this.reported == null) 1082 if (Configuration.errorOnAutoCreate()) 1083 throw new Error("Attempt to auto-create ImmunizationReactionComponent.reported"); 1084 else if (Configuration.doAutoCreate()) 1085 this.reported = new BooleanType(); // bb 1086 return this.reported; 1087 } 1088 1089 public boolean hasReportedElement() { 1090 return this.reported != null && !this.reported.isEmpty(); 1091 } 1092 1093 public boolean hasReported() { 1094 return this.reported != null && !this.reported.isEmpty(); 1095 } 1096 1097 /** 1098 * @param value {@link #reported} (Self-reported indicator.). This is the 1099 * underlying object with id, value and extensions. The accessor 1100 * "getReported" gives direct access to the value 1101 */ 1102 public ImmunizationReactionComponent setReportedElement(BooleanType value) { 1103 this.reported = value; 1104 return this; 1105 } 1106 1107 /** 1108 * @return Self-reported indicator. 1109 */ 1110 public boolean getReported() { 1111 return this.reported == null || this.reported.isEmpty() ? false : this.reported.getValue(); 1112 } 1113 1114 /** 1115 * @param value Self-reported indicator. 1116 */ 1117 public ImmunizationReactionComponent setReported(boolean value) { 1118 if (this.reported == null) 1119 this.reported = new BooleanType(); 1120 this.reported.setValue(value); 1121 return this; 1122 } 1123 1124 protected void listChildren(List<Property> children) { 1125 super.listChildren(children); 1126 children.add(new Property("date", "dateTime", "Date of reaction to the immunization.", 0, 1, date)); 1127 children.add(new Property("detail", "Reference(Observation)", "Details of the reaction.", 0, 1, detail)); 1128 children.add(new Property("reported", "boolean", "Self-reported indicator.", 0, 1, reported)); 1129 } 1130 1131 @Override 1132 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1133 switch (_hash) { 1134 case 3076014: 1135 /* date */ return new Property("date", "dateTime", "Date of reaction to the immunization.", 0, 1, date); 1136 case -1335224239: 1137 /* detail */ return new Property("detail", "Reference(Observation)", "Details of the reaction.", 0, 1, detail); 1138 case -427039533: 1139 /* reported */ return new Property("reported", "boolean", "Self-reported indicator.", 0, 1, reported); 1140 default: 1141 return super.getNamedProperty(_hash, _name, _checkValid); 1142 } 1143 1144 } 1145 1146 @Override 1147 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1148 switch (hash) { 1149 case 3076014: 1150 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 1151 case -1335224239: 1152 /* detail */ return this.detail == null ? new Base[0] : new Base[] { this.detail }; // Reference 1153 case -427039533: 1154 /* reported */ return this.reported == null ? new Base[0] : new Base[] { this.reported }; // BooleanType 1155 default: 1156 return super.getProperty(hash, name, checkValid); 1157 } 1158 1159 } 1160 1161 @Override 1162 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1163 switch (hash) { 1164 case 3076014: // date 1165 this.date = castToDateTime(value); // DateTimeType 1166 return value; 1167 case -1335224239: // detail 1168 this.detail = castToReference(value); // Reference 1169 return value; 1170 case -427039533: // reported 1171 this.reported = castToBoolean(value); // BooleanType 1172 return value; 1173 default: 1174 return super.setProperty(hash, name, value); 1175 } 1176 1177 } 1178 1179 @Override 1180 public Base setProperty(String name, Base value) throws FHIRException { 1181 if (name.equals("date")) { 1182 this.date = castToDateTime(value); // DateTimeType 1183 } else if (name.equals("detail")) { 1184 this.detail = castToReference(value); // Reference 1185 } else if (name.equals("reported")) { 1186 this.reported = castToBoolean(value); // BooleanType 1187 } else 1188 return super.setProperty(name, value); 1189 return value; 1190 } 1191 1192 @Override 1193 public void removeChild(String name, Base value) throws FHIRException { 1194 if (name.equals("date")) { 1195 this.date = null; 1196 } else if (name.equals("detail")) { 1197 this.detail = null; 1198 } else if (name.equals("reported")) { 1199 this.reported = null; 1200 } else 1201 super.removeChild(name, value); 1202 1203 } 1204 1205 @Override 1206 public Base makeProperty(int hash, String name) throws FHIRException { 1207 switch (hash) { 1208 case 3076014: 1209 return getDateElement(); 1210 case -1335224239: 1211 return getDetail(); 1212 case -427039533: 1213 return getReportedElement(); 1214 default: 1215 return super.makeProperty(hash, name); 1216 } 1217 1218 } 1219 1220 @Override 1221 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1222 switch (hash) { 1223 case 3076014: 1224 /* date */ return new String[] { "dateTime" }; 1225 case -1335224239: 1226 /* detail */ return new String[] { "Reference" }; 1227 case -427039533: 1228 /* reported */ return new String[] { "boolean" }; 1229 default: 1230 return super.getTypesForProperty(hash, name); 1231 } 1232 1233 } 1234 1235 @Override 1236 public Base addChild(String name) throws FHIRException { 1237 if (name.equals("date")) { 1238 throw new FHIRException("Cannot call addChild on a singleton property Immunization.date"); 1239 } else if (name.equals("detail")) { 1240 this.detail = new Reference(); 1241 return this.detail; 1242 } else if (name.equals("reported")) { 1243 throw new FHIRException("Cannot call addChild on a singleton property Immunization.reported"); 1244 } else 1245 return super.addChild(name); 1246 } 1247 1248 public ImmunizationReactionComponent copy() { 1249 ImmunizationReactionComponent dst = new ImmunizationReactionComponent(); 1250 copyValues(dst); 1251 return dst; 1252 } 1253 1254 public void copyValues(ImmunizationReactionComponent dst) { 1255 super.copyValues(dst); 1256 dst.date = date == null ? null : date.copy(); 1257 dst.detail = detail == null ? null : detail.copy(); 1258 dst.reported = reported == null ? null : reported.copy(); 1259 } 1260 1261 @Override 1262 public boolean equalsDeep(Base other_) { 1263 if (!super.equalsDeep(other_)) 1264 return false; 1265 if (!(other_ instanceof ImmunizationReactionComponent)) 1266 return false; 1267 ImmunizationReactionComponent o = (ImmunizationReactionComponent) other_; 1268 return compareDeep(date, o.date, true) && compareDeep(detail, o.detail, true) 1269 && compareDeep(reported, o.reported, true); 1270 } 1271 1272 @Override 1273 public boolean equalsShallow(Base other_) { 1274 if (!super.equalsShallow(other_)) 1275 return false; 1276 if (!(other_ instanceof ImmunizationReactionComponent)) 1277 return false; 1278 ImmunizationReactionComponent o = (ImmunizationReactionComponent) other_; 1279 return compareValues(date, o.date, true) && compareValues(reported, o.reported, true); 1280 } 1281 1282 public boolean isEmpty() { 1283 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, detail, reported); 1284 } 1285 1286 public String fhirType() { 1287 return "Immunization.reaction"; 1288 1289 } 1290 1291 } 1292 1293 @Block() 1294 public static class ImmunizationProtocolAppliedComponent extends BackboneElement implements IBaseBackboneElement { 1295 /** 1296 * One possible path to achieve presumed immunity against a disease - within the 1297 * context of an authority. 1298 */ 1299 @Child(name = "series", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 1300 @Description(shortDefinition = "Name of vaccine series", formalDefinition = "One possible path to achieve presumed immunity against a disease - within the context of an authority.") 1301 protected StringType series; 1302 1303 /** 1304 * Indicates the authority who published the protocol (e.g. ACIP) that is being 1305 * followed. 1306 */ 1307 @Child(name = "authority", type = { 1308 Organization.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1309 @Description(shortDefinition = "Who is responsible for publishing the recommendations", formalDefinition = "Indicates the authority who published the protocol (e.g. ACIP) that is being followed.") 1310 protected Reference authority; 1311 1312 /** 1313 * The actual object that is the target of the reference (Indicates the 1314 * authority who published the protocol (e.g. ACIP) that is being followed.) 1315 */ 1316 protected Organization authorityTarget; 1317 1318 /** 1319 * The vaccine preventable disease the dose is being administered against. 1320 */ 1321 @Child(name = "targetDisease", type = { 1322 CodeableConcept.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1323 @Description(shortDefinition = "Vaccine preventatable disease being targetted", formalDefinition = "The vaccine preventable disease the dose is being administered against.") 1324 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-target-disease") 1325 protected List<CodeableConcept> targetDisease; 1326 1327 /** 1328 * Nominal position in a series. 1329 */ 1330 @Child(name = "doseNumber", type = { PositiveIntType.class, 1331 StringType.class }, order = 4, min = 1, max = 1, modifier = false, summary = false) 1332 @Description(shortDefinition = "Dose number within series", formalDefinition = "Nominal position in a series.") 1333 protected Type doseNumber; 1334 1335 /** 1336 * The recommended number of doses to achieve immunity. 1337 */ 1338 @Child(name = "seriesDoses", type = { PositiveIntType.class, 1339 StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false) 1340 @Description(shortDefinition = "Recommended number of doses for immunity", formalDefinition = "The recommended number of doses to achieve immunity.") 1341 protected Type seriesDoses; 1342 1343 private static final long serialVersionUID = -1022717242L; 1344 1345 /** 1346 * Constructor 1347 */ 1348 public ImmunizationProtocolAppliedComponent() { 1349 super(); 1350 } 1351 1352 /** 1353 * Constructor 1354 */ 1355 public ImmunizationProtocolAppliedComponent(Type doseNumber) { 1356 super(); 1357 this.doseNumber = doseNumber; 1358 } 1359 1360 /** 1361 * @return {@link #series} (One possible path to achieve presumed immunity 1362 * against a disease - within the context of an authority.). This is the 1363 * underlying object with id, value and extensions. The accessor 1364 * "getSeries" gives direct access to the value 1365 */ 1366 public StringType getSeriesElement() { 1367 if (this.series == null) 1368 if (Configuration.errorOnAutoCreate()) 1369 throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.series"); 1370 else if (Configuration.doAutoCreate()) 1371 this.series = new StringType(); // bb 1372 return this.series; 1373 } 1374 1375 public boolean hasSeriesElement() { 1376 return this.series != null && !this.series.isEmpty(); 1377 } 1378 1379 public boolean hasSeries() { 1380 return this.series != null && !this.series.isEmpty(); 1381 } 1382 1383 /** 1384 * @param value {@link #series} (One possible path to achieve presumed immunity 1385 * against a disease - within the context of an authority.). This 1386 * is the underlying object with id, value and extensions. The 1387 * accessor "getSeries" gives direct access to the value 1388 */ 1389 public ImmunizationProtocolAppliedComponent setSeriesElement(StringType value) { 1390 this.series = value; 1391 return this; 1392 } 1393 1394 /** 1395 * @return One possible path to achieve presumed immunity against a disease - 1396 * within the context of an authority. 1397 */ 1398 public String getSeries() { 1399 return this.series == null ? null : this.series.getValue(); 1400 } 1401 1402 /** 1403 * @param value One possible path to achieve presumed immunity against a disease 1404 * - within the context of an authority. 1405 */ 1406 public ImmunizationProtocolAppliedComponent setSeries(String value) { 1407 if (Utilities.noString(value)) 1408 this.series = null; 1409 else { 1410 if (this.series == null) 1411 this.series = new StringType(); 1412 this.series.setValue(value); 1413 } 1414 return this; 1415 } 1416 1417 /** 1418 * @return {@link #authority} (Indicates the authority who published the 1419 * protocol (e.g. ACIP) that is being followed.) 1420 */ 1421 public Reference getAuthority() { 1422 if (this.authority == null) 1423 if (Configuration.errorOnAutoCreate()) 1424 throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.authority"); 1425 else if (Configuration.doAutoCreate()) 1426 this.authority = new Reference(); // cc 1427 return this.authority; 1428 } 1429 1430 public boolean hasAuthority() { 1431 return this.authority != null && !this.authority.isEmpty(); 1432 } 1433 1434 /** 1435 * @param value {@link #authority} (Indicates the authority who published the 1436 * protocol (e.g. ACIP) that is being followed.) 1437 */ 1438 public ImmunizationProtocolAppliedComponent setAuthority(Reference value) { 1439 this.authority = value; 1440 return this; 1441 } 1442 1443 /** 1444 * @return {@link #authority} The actual object that is the target of the 1445 * reference. The reference library doesn't populate this, but you can 1446 * use it to hold the resource if you resolve it. (Indicates the 1447 * authority who published the protocol (e.g. ACIP) that is being 1448 * followed.) 1449 */ 1450 public Organization getAuthorityTarget() { 1451 if (this.authorityTarget == null) 1452 if (Configuration.errorOnAutoCreate()) 1453 throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.authority"); 1454 else if (Configuration.doAutoCreate()) 1455 this.authorityTarget = new Organization(); // aa 1456 return this.authorityTarget; 1457 } 1458 1459 /** 1460 * @param value {@link #authority} The actual object that is the target of the 1461 * reference. The reference library doesn't use these, but you can 1462 * use it to hold the resource if you resolve it. (Indicates the 1463 * authority who published the protocol (e.g. ACIP) that is being 1464 * followed.) 1465 */ 1466 public ImmunizationProtocolAppliedComponent setAuthorityTarget(Organization value) { 1467 this.authorityTarget = value; 1468 return this; 1469 } 1470 1471 /** 1472 * @return {@link #targetDisease} (The vaccine preventable disease the dose is 1473 * being administered against.) 1474 */ 1475 public List<CodeableConcept> getTargetDisease() { 1476 if (this.targetDisease == null) 1477 this.targetDisease = new ArrayList<CodeableConcept>(); 1478 return this.targetDisease; 1479 } 1480 1481 /** 1482 * @return Returns a reference to <code>this</code> for easy method chaining 1483 */ 1484 public ImmunizationProtocolAppliedComponent setTargetDisease(List<CodeableConcept> theTargetDisease) { 1485 this.targetDisease = theTargetDisease; 1486 return this; 1487 } 1488 1489 public boolean hasTargetDisease() { 1490 if (this.targetDisease == null) 1491 return false; 1492 for (CodeableConcept item : this.targetDisease) 1493 if (!item.isEmpty()) 1494 return true; 1495 return false; 1496 } 1497 1498 public CodeableConcept addTargetDisease() { // 3 1499 CodeableConcept t = new CodeableConcept(); 1500 if (this.targetDisease == null) 1501 this.targetDisease = new ArrayList<CodeableConcept>(); 1502 this.targetDisease.add(t); 1503 return t; 1504 } 1505 1506 public ImmunizationProtocolAppliedComponent addTargetDisease(CodeableConcept t) { // 3 1507 if (t == null) 1508 return this; 1509 if (this.targetDisease == null) 1510 this.targetDisease = new ArrayList<CodeableConcept>(); 1511 this.targetDisease.add(t); 1512 return this; 1513 } 1514 1515 /** 1516 * @return The first repetition of repeating field {@link #targetDisease}, 1517 * creating it if it does not already exist 1518 */ 1519 public CodeableConcept getTargetDiseaseFirstRep() { 1520 if (getTargetDisease().isEmpty()) { 1521 addTargetDisease(); 1522 } 1523 return getTargetDisease().get(0); 1524 } 1525 1526 /** 1527 * @return {@link #doseNumber} (Nominal position in a series.) 1528 */ 1529 public Type getDoseNumber() { 1530 return this.doseNumber; 1531 } 1532 1533 /** 1534 * @return {@link #doseNumber} (Nominal position in a series.) 1535 */ 1536 public PositiveIntType getDoseNumberPositiveIntType() throws FHIRException { 1537 if (this.doseNumber == null) 1538 this.doseNumber = new PositiveIntType(); 1539 if (!(this.doseNumber instanceof PositiveIntType)) 1540 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but " 1541 + this.doseNumber.getClass().getName() + " was encountered"); 1542 return (PositiveIntType) this.doseNumber; 1543 } 1544 1545 public boolean hasDoseNumberPositiveIntType() { 1546 return this != null && this.doseNumber instanceof PositiveIntType; 1547 } 1548 1549 /** 1550 * @return {@link #doseNumber} (Nominal position in a series.) 1551 */ 1552 public StringType getDoseNumberStringType() throws FHIRException { 1553 if (this.doseNumber == null) 1554 this.doseNumber = new StringType(); 1555 if (!(this.doseNumber instanceof StringType)) 1556 throw new FHIRException("Type mismatch: the type StringType was expected, but " 1557 + this.doseNumber.getClass().getName() + " was encountered"); 1558 return (StringType) this.doseNumber; 1559 } 1560 1561 public boolean hasDoseNumberStringType() { 1562 return this != null && this.doseNumber instanceof StringType; 1563 } 1564 1565 public boolean hasDoseNumber() { 1566 return this.doseNumber != null && !this.doseNumber.isEmpty(); 1567 } 1568 1569 /** 1570 * @param value {@link #doseNumber} (Nominal position in a series.) 1571 */ 1572 public ImmunizationProtocolAppliedComponent setDoseNumber(Type value) { 1573 if (value != null && !(value instanceof PositiveIntType || value instanceof StringType)) 1574 throw new Error("Not the right type for Immunization.protocolApplied.doseNumber[x]: " + value.fhirType()); 1575 this.doseNumber = value; 1576 return this; 1577 } 1578 1579 /** 1580 * @return {@link #seriesDoses} (The recommended number of doses to achieve 1581 * immunity.) 1582 */ 1583 public Type getSeriesDoses() { 1584 return this.seriesDoses; 1585 } 1586 1587 /** 1588 * @return {@link #seriesDoses} (The recommended number of doses to achieve 1589 * immunity.) 1590 */ 1591 public PositiveIntType getSeriesDosesPositiveIntType() throws FHIRException { 1592 if (this.seriesDoses == null) 1593 this.seriesDoses = new PositiveIntType(); 1594 if (!(this.seriesDoses instanceof PositiveIntType)) 1595 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but " 1596 + this.seriesDoses.getClass().getName() + " was encountered"); 1597 return (PositiveIntType) this.seriesDoses; 1598 } 1599 1600 public boolean hasSeriesDosesPositiveIntType() { 1601 return this != null && this.seriesDoses instanceof PositiveIntType; 1602 } 1603 1604 /** 1605 * @return {@link #seriesDoses} (The recommended number of doses to achieve 1606 * immunity.) 1607 */ 1608 public StringType getSeriesDosesStringType() throws FHIRException { 1609 if (this.seriesDoses == null) 1610 this.seriesDoses = new StringType(); 1611 if (!(this.seriesDoses instanceof StringType)) 1612 throw new FHIRException("Type mismatch: the type StringType was expected, but " 1613 + this.seriesDoses.getClass().getName() + " was encountered"); 1614 return (StringType) this.seriesDoses; 1615 } 1616 1617 public boolean hasSeriesDosesStringType() { 1618 return this != null && this.seriesDoses instanceof StringType; 1619 } 1620 1621 public boolean hasSeriesDoses() { 1622 return this.seriesDoses != null && !this.seriesDoses.isEmpty(); 1623 } 1624 1625 /** 1626 * @param value {@link #seriesDoses} (The recommended number of doses to achieve 1627 * immunity.) 1628 */ 1629 public ImmunizationProtocolAppliedComponent setSeriesDoses(Type value) { 1630 if (value != null && !(value instanceof PositiveIntType || value instanceof StringType)) 1631 throw new Error("Not the right type for Immunization.protocolApplied.seriesDoses[x]: " + value.fhirType()); 1632 this.seriesDoses = value; 1633 return this; 1634 } 1635 1636 protected void listChildren(List<Property> children) { 1637 super.listChildren(children); 1638 children.add(new Property("series", "string", 1639 "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, 1640 1, series)); 1641 children.add(new Property("authority", "Reference(Organization)", 1642 "Indicates the authority who published the protocol (e.g. ACIP) that is being followed.", 0, 1, authority)); 1643 children.add(new Property("targetDisease", "CodeableConcept", 1644 "The vaccine preventable disease the dose is being administered against.", 0, java.lang.Integer.MAX_VALUE, 1645 targetDisease)); 1646 children 1647 .add(new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber)); 1648 children.add(new Property("seriesDoses[x]", "positiveInt|string", 1649 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses)); 1650 } 1651 1652 @Override 1653 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1654 switch (_hash) { 1655 case -905838985: 1656 /* series */ return new Property("series", "string", 1657 "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, 1658 1, series); 1659 case 1475610435: 1660 /* authority */ return new Property("authority", "Reference(Organization)", 1661 "Indicates the authority who published the protocol (e.g. ACIP) that is being followed.", 0, 1, authority); 1662 case -319593813: 1663 /* targetDisease */ return new Property("targetDisease", "CodeableConcept", 1664 "The vaccine preventable disease the dose is being administered against.", 0, java.lang.Integer.MAX_VALUE, 1665 targetDisease); 1666 case -1632295686: 1667 /* doseNumber[x] */ return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 1668 0, 1, doseNumber); 1669 case -887709242: 1670 /* doseNumber */ return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1671 1, doseNumber); 1672 case -1826134640: 1673 /* doseNumberPositiveInt */ return new Property("doseNumber[x]", "positiveInt|string", 1674 "Nominal position in a series.", 0, 1, doseNumber); 1675 case -333053577: 1676 /* doseNumberString */ return new Property("doseNumber[x]", "positiveInt|string", 1677 "Nominal position in a series.", 0, 1, doseNumber); 1678 case 1553560673: 1679 /* seriesDoses[x] */ return new Property("seriesDoses[x]", "positiveInt|string", 1680 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1681 case -1936727105: 1682 /* seriesDoses */ return new Property("seriesDoses[x]", "positiveInt|string", 1683 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1684 case -220897801: 1685 /* seriesDosesPositiveInt */ return new Property("seriesDoses[x]", "positiveInt|string", 1686 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1687 case -673569616: 1688 /* seriesDosesString */ return new Property("seriesDoses[x]", "positiveInt|string", 1689 "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses); 1690 default: 1691 return super.getNamedProperty(_hash, _name, _checkValid); 1692 } 1693 1694 } 1695 1696 @Override 1697 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1698 switch (hash) { 1699 case -905838985: 1700 /* series */ return this.series == null ? new Base[0] : new Base[] { this.series }; // StringType 1701 case 1475610435: 1702 /* authority */ return this.authority == null ? new Base[0] : new Base[] { this.authority }; // Reference 1703 case -319593813: 1704 /* targetDisease */ return this.targetDisease == null ? new Base[0] 1705 : this.targetDisease.toArray(new Base[this.targetDisease.size()]); // CodeableConcept 1706 case -887709242: 1707 /* doseNumber */ return this.doseNumber == null ? new Base[0] : new Base[] { this.doseNumber }; // Type 1708 case -1936727105: 1709 /* seriesDoses */ return this.seriesDoses == null ? new Base[0] : new Base[] { this.seriesDoses }; // Type 1710 default: 1711 return super.getProperty(hash, name, checkValid); 1712 } 1713 1714 } 1715 1716 @Override 1717 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1718 switch (hash) { 1719 case -905838985: // series 1720 this.series = castToString(value); // StringType 1721 return value; 1722 case 1475610435: // authority 1723 this.authority = castToReference(value); // Reference 1724 return value; 1725 case -319593813: // targetDisease 1726 this.getTargetDisease().add(castToCodeableConcept(value)); // CodeableConcept 1727 return value; 1728 case -887709242: // doseNumber 1729 this.doseNumber = castToType(value); // Type 1730 return value; 1731 case -1936727105: // seriesDoses 1732 this.seriesDoses = castToType(value); // Type 1733 return value; 1734 default: 1735 return super.setProperty(hash, name, value); 1736 } 1737 1738 } 1739 1740 @Override 1741 public Base setProperty(String name, Base value) throws FHIRException { 1742 if (name.equals("series")) { 1743 this.series = castToString(value); // StringType 1744 } else if (name.equals("authority")) { 1745 this.authority = castToReference(value); // Reference 1746 } else if (name.equals("targetDisease")) { 1747 this.getTargetDisease().add(castToCodeableConcept(value)); 1748 } else if (name.equals("doseNumber[x]")) { 1749 this.doseNumber = castToType(value); // Type 1750 } else if (name.equals("seriesDoses[x]")) { 1751 this.seriesDoses = castToType(value); // Type 1752 } else 1753 return super.setProperty(name, value); 1754 return value; 1755 } 1756 1757 @Override 1758 public void removeChild(String name, Base value) throws FHIRException { 1759 if (name.equals("series")) { 1760 this.series = null; 1761 } else if (name.equals("authority")) { 1762 this.authority = null; 1763 } else if (name.equals("targetDisease")) { 1764 this.getTargetDisease().remove(castToCodeableConcept(value)); 1765 } else if (name.equals("doseNumber[x]")) { 1766 this.doseNumber = null; 1767 } else if (name.equals("seriesDoses[x]")) { 1768 this.seriesDoses = null; 1769 } else 1770 super.removeChild(name, value); 1771 1772 } 1773 1774 @Override 1775 public Base makeProperty(int hash, String name) throws FHIRException { 1776 switch (hash) { 1777 case -905838985: 1778 return getSeriesElement(); 1779 case 1475610435: 1780 return getAuthority(); 1781 case -319593813: 1782 return addTargetDisease(); 1783 case -1632295686: 1784 return getDoseNumber(); 1785 case -887709242: 1786 return getDoseNumber(); 1787 case 1553560673: 1788 return getSeriesDoses(); 1789 case -1936727105: 1790 return getSeriesDoses(); 1791 default: 1792 return super.makeProperty(hash, name); 1793 } 1794 1795 } 1796 1797 @Override 1798 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1799 switch (hash) { 1800 case -905838985: 1801 /* series */ return new String[] { "string" }; 1802 case 1475610435: 1803 /* authority */ return new String[] { "Reference" }; 1804 case -319593813: 1805 /* targetDisease */ return new String[] { "CodeableConcept" }; 1806 case -887709242: 1807 /* doseNumber */ return new String[] { "positiveInt", "string" }; 1808 case -1936727105: 1809 /* seriesDoses */ return new String[] { "positiveInt", "string" }; 1810 default: 1811 return super.getTypesForProperty(hash, name); 1812 } 1813 1814 } 1815 1816 @Override 1817 public Base addChild(String name) throws FHIRException { 1818 if (name.equals("series")) { 1819 throw new FHIRException("Cannot call addChild on a singleton property Immunization.series"); 1820 } else if (name.equals("authority")) { 1821 this.authority = new Reference(); 1822 return this.authority; 1823 } else if (name.equals("targetDisease")) { 1824 return addTargetDisease(); 1825 } else if (name.equals("doseNumberPositiveInt")) { 1826 this.doseNumber = new PositiveIntType(); 1827 return this.doseNumber; 1828 } else if (name.equals("doseNumberString")) { 1829 this.doseNumber = new StringType(); 1830 return this.doseNumber; 1831 } else if (name.equals("seriesDosesPositiveInt")) { 1832 this.seriesDoses = new PositiveIntType(); 1833 return this.seriesDoses; 1834 } else if (name.equals("seriesDosesString")) { 1835 this.seriesDoses = new StringType(); 1836 return this.seriesDoses; 1837 } else 1838 return super.addChild(name); 1839 } 1840 1841 public ImmunizationProtocolAppliedComponent copy() { 1842 ImmunizationProtocolAppliedComponent dst = new ImmunizationProtocolAppliedComponent(); 1843 copyValues(dst); 1844 return dst; 1845 } 1846 1847 public void copyValues(ImmunizationProtocolAppliedComponent dst) { 1848 super.copyValues(dst); 1849 dst.series = series == null ? null : series.copy(); 1850 dst.authority = authority == null ? null : authority.copy(); 1851 if (targetDisease != null) { 1852 dst.targetDisease = new ArrayList<CodeableConcept>(); 1853 for (CodeableConcept i : targetDisease) 1854 dst.targetDisease.add(i.copy()); 1855 } 1856 ; 1857 dst.doseNumber = doseNumber == null ? null : doseNumber.copy(); 1858 dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy(); 1859 } 1860 1861 @Override 1862 public boolean equalsDeep(Base other_) { 1863 if (!super.equalsDeep(other_)) 1864 return false; 1865 if (!(other_ instanceof ImmunizationProtocolAppliedComponent)) 1866 return false; 1867 ImmunizationProtocolAppliedComponent o = (ImmunizationProtocolAppliedComponent) other_; 1868 return compareDeep(series, o.series, true) && compareDeep(authority, o.authority, true) 1869 && compareDeep(targetDisease, o.targetDisease, true) && compareDeep(doseNumber, o.doseNumber, true) 1870 && compareDeep(seriesDoses, o.seriesDoses, true); 1871 } 1872 1873 @Override 1874 public boolean equalsShallow(Base other_) { 1875 if (!super.equalsShallow(other_)) 1876 return false; 1877 if (!(other_ instanceof ImmunizationProtocolAppliedComponent)) 1878 return false; 1879 ImmunizationProtocolAppliedComponent o = (ImmunizationProtocolAppliedComponent) other_; 1880 return compareValues(series, o.series, true); 1881 } 1882 1883 public boolean isEmpty() { 1884 return super.isEmpty() 1885 && ca.uhn.fhir.util.ElementUtil.isEmpty(series, authority, targetDisease, doseNumber, seriesDoses); 1886 } 1887 1888 public String fhirType() { 1889 return "Immunization.protocolApplied"; 1890 1891 } 1892 1893 } 1894 1895 /** 1896 * A unique identifier assigned to this immunization record. 1897 */ 1898 @Child(name = "identifier", type = { 1899 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1900 @Description(shortDefinition = "Business identifier", formalDefinition = "A unique identifier assigned to this immunization record.") 1901 protected List<Identifier> identifier; 1902 1903 /** 1904 * Indicates the current status of the immunization event. 1905 */ 1906 @Child(name = "status", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = true, summary = true) 1907 @Description(shortDefinition = "completed | entered-in-error | not-done", formalDefinition = "Indicates the current status of the immunization event.") 1908 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-status") 1909 protected Enumeration<ImmunizationStatus> status; 1910 1911 /** 1912 * Indicates the reason the immunization event was not performed. 1913 */ 1914 @Child(name = "statusReason", type = { 1915 CodeableConcept.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1916 @Description(shortDefinition = "Reason not done", formalDefinition = "Indicates the reason the immunization event was not performed.") 1917 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-status-reason") 1918 protected CodeableConcept statusReason; 1919 1920 /** 1921 * Vaccine that was administered or was to be administered. 1922 */ 1923 @Child(name = "vaccineCode", type = { 1924 CodeableConcept.class }, order = 3, min = 1, max = 1, modifier = false, summary = true) 1925 @Description(shortDefinition = "Vaccine product administered", formalDefinition = "Vaccine that was administered or was to be administered.") 1926 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/vaccine-code") 1927 protected CodeableConcept vaccineCode; 1928 1929 /** 1930 * The patient who either received or did not receive the immunization. 1931 */ 1932 @Child(name = "patient", type = { Patient.class }, order = 4, min = 1, max = 1, modifier = false, summary = true) 1933 @Description(shortDefinition = "Who was immunized", formalDefinition = "The patient who either received or did not receive the immunization.") 1934 protected Reference patient; 1935 1936 /** 1937 * The actual object that is the target of the reference (The patient who either 1938 * received or did not receive the immunization.) 1939 */ 1940 protected Patient patientTarget; 1941 1942 /** 1943 * The visit or admission or other contact between patient and health care 1944 * provider the immunization was performed as part of. 1945 */ 1946 @Child(name = "encounter", type = { Encounter.class }, order = 5, min = 0, max = 1, modifier = false, summary = false) 1947 @Description(shortDefinition = "Encounter immunization was part of", formalDefinition = "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.") 1948 protected Reference encounter; 1949 1950 /** 1951 * The actual object that is the target of the reference (The visit or admission 1952 * or other contact between patient and health care provider the immunization 1953 * was performed as part of.) 1954 */ 1955 protected Encounter encounterTarget; 1956 1957 /** 1958 * Date vaccine administered or was to be administered. 1959 */ 1960 @Child(name = "occurrence", type = { DateTimeType.class, 1961 StringType.class }, order = 6, min = 1, max = 1, modifier = false, summary = true) 1962 @Description(shortDefinition = "Vaccine administration date", formalDefinition = "Date vaccine administered or was to be administered.") 1963 protected Type occurrence; 1964 1965 /** 1966 * The date the occurrence of the immunization was first captured in the record 1967 * - potentially significantly after the occurrence of the event. 1968 */ 1969 @Child(name = "recorded", type = { 1970 DateTimeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false) 1971 @Description(shortDefinition = "When the immunization was first captured in the subject's record", formalDefinition = "The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.") 1972 protected DateTimeType recorded; 1973 1974 /** 1975 * An indication that the content of the record is based on information from the 1976 * person who administered the vaccine. This reflects the context under which 1977 * the data was originally recorded. 1978 */ 1979 @Child(name = "primarySource", type = { 1980 BooleanType.class }, order = 8, min = 0, max = 1, modifier = false, summary = true) 1981 @Description(shortDefinition = "Indicates context the data was recorded in", formalDefinition = "An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.") 1982 protected BooleanType primarySource; 1983 1984 /** 1985 * The source of the data when the report of the immunization event is not based 1986 * on information from the person who administered the vaccine. 1987 */ 1988 @Child(name = "reportOrigin", type = { 1989 CodeableConcept.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 1990 @Description(shortDefinition = "Indicates the source of a secondarily reported record", formalDefinition = "The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.") 1991 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-origin") 1992 protected CodeableConcept reportOrigin; 1993 1994 /** 1995 * The service delivery location where the vaccine administration occurred. 1996 */ 1997 @Child(name = "location", type = { Location.class }, order = 10, min = 0, max = 1, modifier = false, summary = false) 1998 @Description(shortDefinition = "Where immunization occurred", formalDefinition = "The service delivery location where the vaccine administration occurred.") 1999 protected Reference location; 2000 2001 /** 2002 * The actual object that is the target of the reference (The service delivery 2003 * location where the vaccine administration occurred.) 2004 */ 2005 protected Location locationTarget; 2006 2007 /** 2008 * Name of vaccine manufacturer. 2009 */ 2010 @Child(name = "manufacturer", type = { 2011 Organization.class }, order = 11, min = 0, max = 1, modifier = false, summary = false) 2012 @Description(shortDefinition = "Vaccine manufacturer", formalDefinition = "Name of vaccine manufacturer.") 2013 protected Reference manufacturer; 2014 2015 /** 2016 * The actual object that is the target of the reference (Name of vaccine 2017 * manufacturer.) 2018 */ 2019 protected Organization manufacturerTarget; 2020 2021 /** 2022 * Lot number of the vaccine product. 2023 */ 2024 @Child(name = "lotNumber", type = { 2025 StringType.class }, order = 12, min = 0, max = 1, modifier = false, summary = false) 2026 @Description(shortDefinition = "Vaccine lot number", formalDefinition = "Lot number of the vaccine product.") 2027 protected StringType lotNumber; 2028 2029 /** 2030 * Date vaccine batch expires. 2031 */ 2032 @Child(name = "expirationDate", type = { 2033 DateType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false) 2034 @Description(shortDefinition = "Vaccine expiration date", formalDefinition = "Date vaccine batch expires.") 2035 protected DateType expirationDate; 2036 2037 /** 2038 * Body site where vaccine was administered. 2039 */ 2040 @Child(name = "site", type = { 2041 CodeableConcept.class }, order = 14, min = 0, max = 1, modifier = false, summary = false) 2042 @Description(shortDefinition = "Body site vaccine was administered", formalDefinition = "Body site where vaccine was administered.") 2043 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-site") 2044 protected CodeableConcept site; 2045 2046 /** 2047 * The path by which the vaccine product is taken into the body. 2048 */ 2049 @Child(name = "route", type = { 2050 CodeableConcept.class }, order = 15, min = 0, max = 1, modifier = false, summary = false) 2051 @Description(shortDefinition = "How vaccine entered body", formalDefinition = "The path by which the vaccine product is taken into the body.") 2052 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-route") 2053 protected CodeableConcept route; 2054 2055 /** 2056 * The quantity of vaccine product that was administered. 2057 */ 2058 @Child(name = "doseQuantity", type = { 2059 Quantity.class }, order = 16, min = 0, max = 1, modifier = false, summary = false) 2060 @Description(shortDefinition = "Amount of vaccine administered", formalDefinition = "The quantity of vaccine product that was administered.") 2061 protected Quantity doseQuantity; 2062 2063 /** 2064 * Indicates who performed the immunization event. 2065 */ 2066 @Child(name = "performer", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2067 @Description(shortDefinition = "Who performed event", formalDefinition = "Indicates who performed the immunization event.") 2068 protected List<ImmunizationPerformerComponent> performer; 2069 2070 /** 2071 * Extra information about the immunization that is not conveyed by the other 2072 * attributes. 2073 */ 2074 @Child(name = "note", type = { 2075 Annotation.class }, order = 18, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2076 @Description(shortDefinition = "Additional immunization notes", formalDefinition = "Extra information about the immunization that is not conveyed by the other attributes.") 2077 protected List<Annotation> note; 2078 2079 /** 2080 * Reasons why the vaccine was administered. 2081 */ 2082 @Child(name = "reasonCode", type = { 2083 CodeableConcept.class }, order = 19, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2084 @Description(shortDefinition = "Why immunization occurred", formalDefinition = "Reasons why the vaccine was administered.") 2085 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-reason") 2086 protected List<CodeableConcept> reasonCode; 2087 2088 /** 2089 * Condition, Observation or DiagnosticReport that supports why the immunization 2090 * was administered. 2091 */ 2092 @Child(name = "reasonReference", type = { Condition.class, Observation.class, 2093 DiagnosticReport.class }, order = 20, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2094 @Description(shortDefinition = "Why immunization occurred", formalDefinition = "Condition, Observation or DiagnosticReport that supports why the immunization was administered.") 2095 protected List<Reference> reasonReference; 2096 /** 2097 * The actual objects that are the target of the reference (Condition, 2098 * Observation or DiagnosticReport that supports why the immunization was 2099 * administered.) 2100 */ 2101 protected List<Resource> reasonReferenceTarget; 2102 2103 /** 2104 * Indication if a dose is considered to be subpotent. By default, a dose should 2105 * be considered to be potent. 2106 */ 2107 @Child(name = "isSubpotent", type = { 2108 BooleanType.class }, order = 21, min = 0, max = 1, modifier = true, summary = true) 2109 @Description(shortDefinition = "Dose potency", formalDefinition = "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.") 2110 protected BooleanType isSubpotent; 2111 2112 /** 2113 * Reason why a dose is considered to be subpotent. 2114 */ 2115 @Child(name = "subpotentReason", type = { 2116 CodeableConcept.class }, order = 22, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2117 @Description(shortDefinition = "Reason for being subpotent", formalDefinition = "Reason why a dose is considered to be subpotent.") 2118 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-subpotent-reason") 2119 protected List<CodeableConcept> subpotentReason; 2120 2121 /** 2122 * Educational material presented to the patient (or guardian) at the time of 2123 * vaccine administration. 2124 */ 2125 @Child(name = "education", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2126 @Description(shortDefinition = "Educational material presented to patient", formalDefinition = "Educational material presented to the patient (or guardian) at the time of vaccine administration.") 2127 protected List<ImmunizationEducationComponent> education; 2128 2129 /** 2130 * Indicates a patient's eligibility for a funding program. 2131 */ 2132 @Child(name = "programEligibility", type = { 2133 CodeableConcept.class }, order = 24, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2134 @Description(shortDefinition = "Patient eligibility for a vaccination program", formalDefinition = "Indicates a patient's eligibility for a funding program.") 2135 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-program-eligibility") 2136 protected List<CodeableConcept> programEligibility; 2137 2138 /** 2139 * Indicates the source of the vaccine actually administered. This may be 2140 * different than the patient eligibility (e.g. the patient may be eligible for 2141 * a publically purchased vaccine but due to inventory issues, vaccine purchased 2142 * with private funds was actually administered). 2143 */ 2144 @Child(name = "fundingSource", type = { 2145 CodeableConcept.class }, order = 25, min = 0, max = 1, modifier = false, summary = false) 2146 @Description(shortDefinition = "Funding source for the vaccine", formalDefinition = "Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).") 2147 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/immunization-funding-source") 2148 protected CodeableConcept fundingSource; 2149 2150 /** 2151 * Categorical data indicating that an adverse event is associated in time to an 2152 * immunization. 2153 */ 2154 @Child(name = "reaction", type = {}, order = 26, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2155 @Description(shortDefinition = "Details of a reaction that follows immunization", formalDefinition = "Categorical data indicating that an adverse event is associated in time to an immunization.") 2156 protected List<ImmunizationReactionComponent> reaction; 2157 2158 /** 2159 * The protocol (set of recommendations) being followed by the provider who 2160 * administered the dose. 2161 */ 2162 @Child(name = "protocolApplied", type = {}, order = 27, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2163 @Description(shortDefinition = "Protocol followed by the provider", formalDefinition = "The protocol (set of recommendations) being followed by the provider who administered the dose.") 2164 protected List<ImmunizationProtocolAppliedComponent> protocolApplied; 2165 2166 private static final long serialVersionUID = 1946730839L; 2167 2168 /** 2169 * Constructor 2170 */ 2171 public Immunization() { 2172 super(); 2173 } 2174 2175 /** 2176 * Constructor 2177 */ 2178 public Immunization(Enumeration<ImmunizationStatus> status, CodeableConcept vaccineCode, Reference patient, 2179 Type occurrence) { 2180 super(); 2181 this.status = status; 2182 this.vaccineCode = vaccineCode; 2183 this.patient = patient; 2184 this.occurrence = occurrence; 2185 } 2186 2187 /** 2188 * @return {@link #identifier} (A unique identifier assigned to this 2189 * immunization record.) 2190 */ 2191 public List<Identifier> getIdentifier() { 2192 if (this.identifier == null) 2193 this.identifier = new ArrayList<Identifier>(); 2194 return this.identifier; 2195 } 2196 2197 /** 2198 * @return Returns a reference to <code>this</code> for easy method chaining 2199 */ 2200 public Immunization setIdentifier(List<Identifier> theIdentifier) { 2201 this.identifier = theIdentifier; 2202 return this; 2203 } 2204 2205 public boolean hasIdentifier() { 2206 if (this.identifier == null) 2207 return false; 2208 for (Identifier item : this.identifier) 2209 if (!item.isEmpty()) 2210 return true; 2211 return false; 2212 } 2213 2214 public Identifier addIdentifier() { // 3 2215 Identifier t = new Identifier(); 2216 if (this.identifier == null) 2217 this.identifier = new ArrayList<Identifier>(); 2218 this.identifier.add(t); 2219 return t; 2220 } 2221 2222 public Immunization addIdentifier(Identifier t) { // 3 2223 if (t == null) 2224 return this; 2225 if (this.identifier == null) 2226 this.identifier = new ArrayList<Identifier>(); 2227 this.identifier.add(t); 2228 return this; 2229 } 2230 2231 /** 2232 * @return The first repetition of repeating field {@link #identifier}, creating 2233 * it if it does not already exist 2234 */ 2235 public Identifier getIdentifierFirstRep() { 2236 if (getIdentifier().isEmpty()) { 2237 addIdentifier(); 2238 } 2239 return getIdentifier().get(0); 2240 } 2241 2242 /** 2243 * @return {@link #status} (Indicates the current status of the immunization 2244 * event.). This is the underlying object with id, value and extensions. 2245 * The accessor "getStatus" gives direct access to the value 2246 */ 2247 public Enumeration<ImmunizationStatus> getStatusElement() { 2248 if (this.status == null) 2249 if (Configuration.errorOnAutoCreate()) 2250 throw new Error("Attempt to auto-create Immunization.status"); 2251 else if (Configuration.doAutoCreate()) 2252 this.status = new Enumeration<ImmunizationStatus>(new ImmunizationStatusEnumFactory()); // bb 2253 return this.status; 2254 } 2255 2256 public boolean hasStatusElement() { 2257 return this.status != null && !this.status.isEmpty(); 2258 } 2259 2260 public boolean hasStatus() { 2261 return this.status != null && !this.status.isEmpty(); 2262 } 2263 2264 /** 2265 * @param value {@link #status} (Indicates the current status of the 2266 * immunization event.). This is the underlying object with id, 2267 * value and extensions. The accessor "getStatus" gives direct 2268 * access to the value 2269 */ 2270 public Immunization setStatusElement(Enumeration<ImmunizationStatus> value) { 2271 this.status = value; 2272 return this; 2273 } 2274 2275 /** 2276 * @return Indicates the current status of the immunization event. 2277 */ 2278 public ImmunizationStatus getStatus() { 2279 return this.status == null ? null : this.status.getValue(); 2280 } 2281 2282 /** 2283 * @param value Indicates the current status of the immunization event. 2284 */ 2285 public Immunization setStatus(ImmunizationStatus value) { 2286 if (this.status == null) 2287 this.status = new Enumeration<ImmunizationStatus>(new ImmunizationStatusEnumFactory()); 2288 this.status.setValue(value); 2289 return this; 2290 } 2291 2292 /** 2293 * @return {@link #statusReason} (Indicates the reason the immunization event 2294 * was not performed.) 2295 */ 2296 public CodeableConcept getStatusReason() { 2297 if (this.statusReason == null) 2298 if (Configuration.errorOnAutoCreate()) 2299 throw new Error("Attempt to auto-create Immunization.statusReason"); 2300 else if (Configuration.doAutoCreate()) 2301 this.statusReason = new CodeableConcept(); // cc 2302 return this.statusReason; 2303 } 2304 2305 public boolean hasStatusReason() { 2306 return this.statusReason != null && !this.statusReason.isEmpty(); 2307 } 2308 2309 /** 2310 * @param value {@link #statusReason} (Indicates the reason the immunization 2311 * event was not performed.) 2312 */ 2313 public Immunization setStatusReason(CodeableConcept value) { 2314 this.statusReason = value; 2315 return this; 2316 } 2317 2318 /** 2319 * @return {@link #vaccineCode} (Vaccine that was administered or was to be 2320 * administered.) 2321 */ 2322 public CodeableConcept getVaccineCode() { 2323 if (this.vaccineCode == null) 2324 if (Configuration.errorOnAutoCreate()) 2325 throw new Error("Attempt to auto-create Immunization.vaccineCode"); 2326 else if (Configuration.doAutoCreate()) 2327 this.vaccineCode = new CodeableConcept(); // cc 2328 return this.vaccineCode; 2329 } 2330 2331 public boolean hasVaccineCode() { 2332 return this.vaccineCode != null && !this.vaccineCode.isEmpty(); 2333 } 2334 2335 /** 2336 * @param value {@link #vaccineCode} (Vaccine that was administered or was to be 2337 * administered.) 2338 */ 2339 public Immunization setVaccineCode(CodeableConcept value) { 2340 this.vaccineCode = value; 2341 return this; 2342 } 2343 2344 /** 2345 * @return {@link #patient} (The patient who either received or did not receive 2346 * the immunization.) 2347 */ 2348 public Reference getPatient() { 2349 if (this.patient == null) 2350 if (Configuration.errorOnAutoCreate()) 2351 throw new Error("Attempt to auto-create Immunization.patient"); 2352 else if (Configuration.doAutoCreate()) 2353 this.patient = new Reference(); // cc 2354 return this.patient; 2355 } 2356 2357 public boolean hasPatient() { 2358 return this.patient != null && !this.patient.isEmpty(); 2359 } 2360 2361 /** 2362 * @param value {@link #patient} (The patient who either received or did not 2363 * receive the immunization.) 2364 */ 2365 public Immunization setPatient(Reference value) { 2366 this.patient = value; 2367 return this; 2368 } 2369 2370 /** 2371 * @return {@link #patient} The actual object that is the target of the 2372 * reference. The reference library doesn't populate this, but you can 2373 * use it to hold the resource if you resolve it. (The patient who 2374 * either received or did not receive the immunization.) 2375 */ 2376 public Patient getPatientTarget() { 2377 if (this.patientTarget == null) 2378 if (Configuration.errorOnAutoCreate()) 2379 throw new Error("Attempt to auto-create Immunization.patient"); 2380 else if (Configuration.doAutoCreate()) 2381 this.patientTarget = new Patient(); // aa 2382 return this.patientTarget; 2383 } 2384 2385 /** 2386 * @param value {@link #patient} The actual object that is the target of the 2387 * reference. The reference library doesn't use these, but you can 2388 * use it to hold the resource if you resolve it. (The patient who 2389 * either received or did not receive the immunization.) 2390 */ 2391 public Immunization setPatientTarget(Patient value) { 2392 this.patientTarget = value; 2393 return this; 2394 } 2395 2396 /** 2397 * @return {@link #encounter} (The visit or admission or other contact between 2398 * patient and health care provider the immunization was performed as 2399 * part of.) 2400 */ 2401 public Reference getEncounter() { 2402 if (this.encounter == null) 2403 if (Configuration.errorOnAutoCreate()) 2404 throw new Error("Attempt to auto-create Immunization.encounter"); 2405 else if (Configuration.doAutoCreate()) 2406 this.encounter = new Reference(); // cc 2407 return this.encounter; 2408 } 2409 2410 public boolean hasEncounter() { 2411 return this.encounter != null && !this.encounter.isEmpty(); 2412 } 2413 2414 /** 2415 * @param value {@link #encounter} (The visit or admission or other contact 2416 * between patient and health care provider the immunization was 2417 * performed as part of.) 2418 */ 2419 public Immunization setEncounter(Reference value) { 2420 this.encounter = value; 2421 return this; 2422 } 2423 2424 /** 2425 * @return {@link #encounter} The actual object that is the target of the 2426 * reference. The reference library doesn't populate this, but you can 2427 * use it to hold the resource if you resolve it. (The visit or 2428 * admission or other contact between patient and health care provider 2429 * the immunization was performed as part of.) 2430 */ 2431 public Encounter getEncounterTarget() { 2432 if (this.encounterTarget == null) 2433 if (Configuration.errorOnAutoCreate()) 2434 throw new Error("Attempt to auto-create Immunization.encounter"); 2435 else if (Configuration.doAutoCreate()) 2436 this.encounterTarget = new Encounter(); // aa 2437 return this.encounterTarget; 2438 } 2439 2440 /** 2441 * @param value {@link #encounter} The actual object that is the target of the 2442 * reference. The reference library doesn't use these, but you can 2443 * use it to hold the resource if you resolve it. (The visit or 2444 * admission or other contact between patient and health care 2445 * provider the immunization was performed as part of.) 2446 */ 2447 public Immunization setEncounterTarget(Encounter value) { 2448 this.encounterTarget = value; 2449 return this; 2450 } 2451 2452 /** 2453 * @return {@link #occurrence} (Date vaccine administered or was to be 2454 * administered.) 2455 */ 2456 public Type getOccurrence() { 2457 return this.occurrence; 2458 } 2459 2460 /** 2461 * @return {@link #occurrence} (Date vaccine administered or was to be 2462 * administered.) 2463 */ 2464 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 2465 if (this.occurrence == null) 2466 this.occurrence = new DateTimeType(); 2467 if (!(this.occurrence instanceof DateTimeType)) 2468 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but " 2469 + this.occurrence.getClass().getName() + " was encountered"); 2470 return (DateTimeType) this.occurrence; 2471 } 2472 2473 public boolean hasOccurrenceDateTimeType() { 2474 return this != null && this.occurrence instanceof DateTimeType; 2475 } 2476 2477 /** 2478 * @return {@link #occurrence} (Date vaccine administered or was to be 2479 * administered.) 2480 */ 2481 public StringType getOccurrenceStringType() throws FHIRException { 2482 if (this.occurrence == null) 2483 this.occurrence = new StringType(); 2484 if (!(this.occurrence instanceof StringType)) 2485 throw new FHIRException("Type mismatch: the type StringType was expected, but " 2486 + this.occurrence.getClass().getName() + " was encountered"); 2487 return (StringType) this.occurrence; 2488 } 2489 2490 public boolean hasOccurrenceStringType() { 2491 return this != null && this.occurrence instanceof StringType; 2492 } 2493 2494 public boolean hasOccurrence() { 2495 return this.occurrence != null && !this.occurrence.isEmpty(); 2496 } 2497 2498 /** 2499 * @param value {@link #occurrence} (Date vaccine administered or was to be 2500 * administered.) 2501 */ 2502 public Immunization setOccurrence(Type value) { 2503 if (value != null && !(value instanceof DateTimeType || value instanceof StringType)) 2504 throw new Error("Not the right type for Immunization.occurrence[x]: " + value.fhirType()); 2505 this.occurrence = value; 2506 return this; 2507 } 2508 2509 /** 2510 * @return {@link #recorded} (The date the occurrence of the immunization was 2511 * first captured in the record - potentially significantly after the 2512 * occurrence of the event.). This is the underlying object with id, 2513 * value and extensions. The accessor "getRecorded" gives direct access 2514 * to the value 2515 */ 2516 public DateTimeType getRecordedElement() { 2517 if (this.recorded == null) 2518 if (Configuration.errorOnAutoCreate()) 2519 throw new Error("Attempt to auto-create Immunization.recorded"); 2520 else if (Configuration.doAutoCreate()) 2521 this.recorded = new DateTimeType(); // bb 2522 return this.recorded; 2523 } 2524 2525 public boolean hasRecordedElement() { 2526 return this.recorded != null && !this.recorded.isEmpty(); 2527 } 2528 2529 public boolean hasRecorded() { 2530 return this.recorded != null && !this.recorded.isEmpty(); 2531 } 2532 2533 /** 2534 * @param value {@link #recorded} (The date the occurrence of the immunization 2535 * was first captured in the record - potentially significantly 2536 * after the occurrence of the event.). This is the underlying 2537 * object with id, value and extensions. The accessor "getRecorded" 2538 * gives direct access to the value 2539 */ 2540 public Immunization setRecordedElement(DateTimeType value) { 2541 this.recorded = value; 2542 return this; 2543 } 2544 2545 /** 2546 * @return The date the occurrence of the immunization was first captured in the 2547 * record - potentially significantly after the occurrence of the event. 2548 */ 2549 public Date getRecorded() { 2550 return this.recorded == null ? null : this.recorded.getValue(); 2551 } 2552 2553 /** 2554 * @param value The date the occurrence of the immunization was first captured 2555 * in the record - potentially significantly after the occurrence 2556 * of the event. 2557 */ 2558 public Immunization setRecorded(Date value) { 2559 if (value == null) 2560 this.recorded = null; 2561 else { 2562 if (this.recorded == null) 2563 this.recorded = new DateTimeType(); 2564 this.recorded.setValue(value); 2565 } 2566 return this; 2567 } 2568 2569 /** 2570 * @return {@link #primarySource} (An indication that the content of the record 2571 * is based on information from the person who administered the vaccine. 2572 * This reflects the context under which the data was originally 2573 * recorded.). This is the underlying object with id, value and 2574 * extensions. The accessor "getPrimarySource" gives direct access to 2575 * the value 2576 */ 2577 public BooleanType getPrimarySourceElement() { 2578 if (this.primarySource == null) 2579 if (Configuration.errorOnAutoCreate()) 2580 throw new Error("Attempt to auto-create Immunization.primarySource"); 2581 else if (Configuration.doAutoCreate()) 2582 this.primarySource = new BooleanType(); // bb 2583 return this.primarySource; 2584 } 2585 2586 public boolean hasPrimarySourceElement() { 2587 return this.primarySource != null && !this.primarySource.isEmpty(); 2588 } 2589 2590 public boolean hasPrimarySource() { 2591 return this.primarySource != null && !this.primarySource.isEmpty(); 2592 } 2593 2594 /** 2595 * @param value {@link #primarySource} (An indication that the content of the 2596 * record is based on information from the person who administered 2597 * the vaccine. This reflects the context under which the data was 2598 * originally recorded.). This is the underlying object with id, 2599 * value and extensions. The accessor "getPrimarySource" gives 2600 * direct access to the value 2601 */ 2602 public Immunization setPrimarySourceElement(BooleanType value) { 2603 this.primarySource = value; 2604 return this; 2605 } 2606 2607 /** 2608 * @return An indication that the content of the record is based on information 2609 * from the person who administered the vaccine. This reflects the 2610 * context under which the data was originally recorded. 2611 */ 2612 public boolean getPrimarySource() { 2613 return this.primarySource == null || this.primarySource.isEmpty() ? false : this.primarySource.getValue(); 2614 } 2615 2616 /** 2617 * @param value An indication that the content of the record is based on 2618 * information from the person who administered the vaccine. This 2619 * reflects the context under which the data was originally 2620 * recorded. 2621 */ 2622 public Immunization setPrimarySource(boolean value) { 2623 if (this.primarySource == null) 2624 this.primarySource = new BooleanType(); 2625 this.primarySource.setValue(value); 2626 return this; 2627 } 2628 2629 /** 2630 * @return {@link #reportOrigin} (The source of the data when the report of the 2631 * immunization event is not based on information from the person who 2632 * administered the vaccine.) 2633 */ 2634 public CodeableConcept getReportOrigin() { 2635 if (this.reportOrigin == null) 2636 if (Configuration.errorOnAutoCreate()) 2637 throw new Error("Attempt to auto-create Immunization.reportOrigin"); 2638 else if (Configuration.doAutoCreate()) 2639 this.reportOrigin = new CodeableConcept(); // cc 2640 return this.reportOrigin; 2641 } 2642 2643 public boolean hasReportOrigin() { 2644 return this.reportOrigin != null && !this.reportOrigin.isEmpty(); 2645 } 2646 2647 /** 2648 * @param value {@link #reportOrigin} (The source of the data when the report of 2649 * the immunization event is not based on information from the 2650 * person who administered the vaccine.) 2651 */ 2652 public Immunization setReportOrigin(CodeableConcept value) { 2653 this.reportOrigin = value; 2654 return this; 2655 } 2656 2657 /** 2658 * @return {@link #location} (The service delivery location where the vaccine 2659 * administration occurred.) 2660 */ 2661 public Reference getLocation() { 2662 if (this.location == null) 2663 if (Configuration.errorOnAutoCreate()) 2664 throw new Error("Attempt to auto-create Immunization.location"); 2665 else if (Configuration.doAutoCreate()) 2666 this.location = new Reference(); // cc 2667 return this.location; 2668 } 2669 2670 public boolean hasLocation() { 2671 return this.location != null && !this.location.isEmpty(); 2672 } 2673 2674 /** 2675 * @param value {@link #location} (The service delivery location where the 2676 * vaccine administration occurred.) 2677 */ 2678 public Immunization setLocation(Reference value) { 2679 this.location = value; 2680 return this; 2681 } 2682 2683 /** 2684 * @return {@link #location} The actual object that is the target of the 2685 * reference. The reference library doesn't populate this, but you can 2686 * use it to hold the resource if you resolve it. (The service delivery 2687 * location where the vaccine administration occurred.) 2688 */ 2689 public Location getLocationTarget() { 2690 if (this.locationTarget == null) 2691 if (Configuration.errorOnAutoCreate()) 2692 throw new Error("Attempt to auto-create Immunization.location"); 2693 else if (Configuration.doAutoCreate()) 2694 this.locationTarget = new Location(); // aa 2695 return this.locationTarget; 2696 } 2697 2698 /** 2699 * @param value {@link #location} The actual object that is the target of the 2700 * reference. The reference library doesn't use these, but you can 2701 * use it to hold the resource if you resolve it. (The service 2702 * delivery location where the vaccine administration occurred.) 2703 */ 2704 public Immunization setLocationTarget(Location value) { 2705 this.locationTarget = value; 2706 return this; 2707 } 2708 2709 /** 2710 * @return {@link #manufacturer} (Name of vaccine manufacturer.) 2711 */ 2712 public Reference getManufacturer() { 2713 if (this.manufacturer == null) 2714 if (Configuration.errorOnAutoCreate()) 2715 throw new Error("Attempt to auto-create Immunization.manufacturer"); 2716 else if (Configuration.doAutoCreate()) 2717 this.manufacturer = new Reference(); // cc 2718 return this.manufacturer; 2719 } 2720 2721 public boolean hasManufacturer() { 2722 return this.manufacturer != null && !this.manufacturer.isEmpty(); 2723 } 2724 2725 /** 2726 * @param value {@link #manufacturer} (Name of vaccine manufacturer.) 2727 */ 2728 public Immunization setManufacturer(Reference value) { 2729 this.manufacturer = value; 2730 return this; 2731 } 2732 2733 /** 2734 * @return {@link #manufacturer} The actual object that is the target of the 2735 * reference. The reference library doesn't populate this, but you can 2736 * use it to hold the resource if you resolve it. (Name of vaccine 2737 * manufacturer.) 2738 */ 2739 public Organization getManufacturerTarget() { 2740 if (this.manufacturerTarget == null) 2741 if (Configuration.errorOnAutoCreate()) 2742 throw new Error("Attempt to auto-create Immunization.manufacturer"); 2743 else if (Configuration.doAutoCreate()) 2744 this.manufacturerTarget = new Organization(); // aa 2745 return this.manufacturerTarget; 2746 } 2747 2748 /** 2749 * @param value {@link #manufacturer} The actual object that is the target of 2750 * the reference. The reference library doesn't use these, but you 2751 * can use it to hold the resource if you resolve it. (Name of 2752 * vaccine manufacturer.) 2753 */ 2754 public Immunization setManufacturerTarget(Organization value) { 2755 this.manufacturerTarget = value; 2756 return this; 2757 } 2758 2759 /** 2760 * @return {@link #lotNumber} (Lot number of the vaccine product.). This is the 2761 * underlying object with id, value and extensions. The accessor 2762 * "getLotNumber" gives direct access to the value 2763 */ 2764 public StringType getLotNumberElement() { 2765 if (this.lotNumber == null) 2766 if (Configuration.errorOnAutoCreate()) 2767 throw new Error("Attempt to auto-create Immunization.lotNumber"); 2768 else if (Configuration.doAutoCreate()) 2769 this.lotNumber = new StringType(); // bb 2770 return this.lotNumber; 2771 } 2772 2773 public boolean hasLotNumberElement() { 2774 return this.lotNumber != null && !this.lotNumber.isEmpty(); 2775 } 2776 2777 public boolean hasLotNumber() { 2778 return this.lotNumber != null && !this.lotNumber.isEmpty(); 2779 } 2780 2781 /** 2782 * @param value {@link #lotNumber} (Lot number of the vaccine product.). This is 2783 * the underlying object with id, value and extensions. The 2784 * accessor "getLotNumber" gives direct access to the value 2785 */ 2786 public Immunization setLotNumberElement(StringType value) { 2787 this.lotNumber = value; 2788 return this; 2789 } 2790 2791 /** 2792 * @return Lot number of the vaccine product. 2793 */ 2794 public String getLotNumber() { 2795 return this.lotNumber == null ? null : this.lotNumber.getValue(); 2796 } 2797 2798 /** 2799 * @param value Lot number of the vaccine product. 2800 */ 2801 public Immunization setLotNumber(String value) { 2802 if (Utilities.noString(value)) 2803 this.lotNumber = null; 2804 else { 2805 if (this.lotNumber == null) 2806 this.lotNumber = new StringType(); 2807 this.lotNumber.setValue(value); 2808 } 2809 return this; 2810 } 2811 2812 /** 2813 * @return {@link #expirationDate} (Date vaccine batch expires.). This is the 2814 * underlying object with id, value and extensions. The accessor 2815 * "getExpirationDate" gives direct access to the value 2816 */ 2817 public DateType getExpirationDateElement() { 2818 if (this.expirationDate == null) 2819 if (Configuration.errorOnAutoCreate()) 2820 throw new Error("Attempt to auto-create Immunization.expirationDate"); 2821 else if (Configuration.doAutoCreate()) 2822 this.expirationDate = new DateType(); // bb 2823 return this.expirationDate; 2824 } 2825 2826 public boolean hasExpirationDateElement() { 2827 return this.expirationDate != null && !this.expirationDate.isEmpty(); 2828 } 2829 2830 public boolean hasExpirationDate() { 2831 return this.expirationDate != null && !this.expirationDate.isEmpty(); 2832 } 2833 2834 /** 2835 * @param value {@link #expirationDate} (Date vaccine batch expires.). This is 2836 * the underlying object with id, value and extensions. The 2837 * accessor "getExpirationDate" gives direct access to the value 2838 */ 2839 public Immunization setExpirationDateElement(DateType value) { 2840 this.expirationDate = value; 2841 return this; 2842 } 2843 2844 /** 2845 * @return Date vaccine batch expires. 2846 */ 2847 public Date getExpirationDate() { 2848 return this.expirationDate == null ? null : this.expirationDate.getValue(); 2849 } 2850 2851 /** 2852 * @param value Date vaccine batch expires. 2853 */ 2854 public Immunization setExpirationDate(Date value) { 2855 if (value == null) 2856 this.expirationDate = null; 2857 else { 2858 if (this.expirationDate == null) 2859 this.expirationDate = new DateType(); 2860 this.expirationDate.setValue(value); 2861 } 2862 return this; 2863 } 2864 2865 /** 2866 * @return {@link #site} (Body site where vaccine was administered.) 2867 */ 2868 public CodeableConcept getSite() { 2869 if (this.site == null) 2870 if (Configuration.errorOnAutoCreate()) 2871 throw new Error("Attempt to auto-create Immunization.site"); 2872 else if (Configuration.doAutoCreate()) 2873 this.site = new CodeableConcept(); // cc 2874 return this.site; 2875 } 2876 2877 public boolean hasSite() { 2878 return this.site != null && !this.site.isEmpty(); 2879 } 2880 2881 /** 2882 * @param value {@link #site} (Body site where vaccine was administered.) 2883 */ 2884 public Immunization setSite(CodeableConcept value) { 2885 this.site = value; 2886 return this; 2887 } 2888 2889 /** 2890 * @return {@link #route} (The path by which the vaccine product is taken into 2891 * the body.) 2892 */ 2893 public CodeableConcept getRoute() { 2894 if (this.route == null) 2895 if (Configuration.errorOnAutoCreate()) 2896 throw new Error("Attempt to auto-create Immunization.route"); 2897 else if (Configuration.doAutoCreate()) 2898 this.route = new CodeableConcept(); // cc 2899 return this.route; 2900 } 2901 2902 public boolean hasRoute() { 2903 return this.route != null && !this.route.isEmpty(); 2904 } 2905 2906 /** 2907 * @param value {@link #route} (The path by which the vaccine product is taken 2908 * into the body.) 2909 */ 2910 public Immunization setRoute(CodeableConcept value) { 2911 this.route = value; 2912 return this; 2913 } 2914 2915 /** 2916 * @return {@link #doseQuantity} (The quantity of vaccine product that was 2917 * administered.) 2918 */ 2919 public Quantity getDoseQuantity() { 2920 if (this.doseQuantity == null) 2921 if (Configuration.errorOnAutoCreate()) 2922 throw new Error("Attempt to auto-create Immunization.doseQuantity"); 2923 else if (Configuration.doAutoCreate()) 2924 this.doseQuantity = new Quantity(); // cc 2925 return this.doseQuantity; 2926 } 2927 2928 public boolean hasDoseQuantity() { 2929 return this.doseQuantity != null && !this.doseQuantity.isEmpty(); 2930 } 2931 2932 /** 2933 * @param value {@link #doseQuantity} (The quantity of vaccine product that was 2934 * administered.) 2935 */ 2936 public Immunization setDoseQuantity(Quantity value) { 2937 this.doseQuantity = value; 2938 return this; 2939 } 2940 2941 /** 2942 * @return {@link #performer} (Indicates who performed the immunization event.) 2943 */ 2944 public List<ImmunizationPerformerComponent> getPerformer() { 2945 if (this.performer == null) 2946 this.performer = new ArrayList<ImmunizationPerformerComponent>(); 2947 return this.performer; 2948 } 2949 2950 /** 2951 * @return Returns a reference to <code>this</code> for easy method chaining 2952 */ 2953 public Immunization setPerformer(List<ImmunizationPerformerComponent> thePerformer) { 2954 this.performer = thePerformer; 2955 return this; 2956 } 2957 2958 public boolean hasPerformer() { 2959 if (this.performer == null) 2960 return false; 2961 for (ImmunizationPerformerComponent item : this.performer) 2962 if (!item.isEmpty()) 2963 return true; 2964 return false; 2965 } 2966 2967 public ImmunizationPerformerComponent addPerformer() { // 3 2968 ImmunizationPerformerComponent t = new ImmunizationPerformerComponent(); 2969 if (this.performer == null) 2970 this.performer = new ArrayList<ImmunizationPerformerComponent>(); 2971 this.performer.add(t); 2972 return t; 2973 } 2974 2975 public Immunization addPerformer(ImmunizationPerformerComponent t) { // 3 2976 if (t == null) 2977 return this; 2978 if (this.performer == null) 2979 this.performer = new ArrayList<ImmunizationPerformerComponent>(); 2980 this.performer.add(t); 2981 return this; 2982 } 2983 2984 /** 2985 * @return The first repetition of repeating field {@link #performer}, creating 2986 * it if it does not already exist 2987 */ 2988 public ImmunizationPerformerComponent getPerformerFirstRep() { 2989 if (getPerformer().isEmpty()) { 2990 addPerformer(); 2991 } 2992 return getPerformer().get(0); 2993 } 2994 2995 /** 2996 * @return {@link #note} (Extra information about the immunization that is not 2997 * conveyed by the other attributes.) 2998 */ 2999 public List<Annotation> getNote() { 3000 if (this.note == null) 3001 this.note = new ArrayList<Annotation>(); 3002 return this.note; 3003 } 3004 3005 /** 3006 * @return Returns a reference to <code>this</code> for easy method chaining 3007 */ 3008 public Immunization setNote(List<Annotation> theNote) { 3009 this.note = theNote; 3010 return this; 3011 } 3012 3013 public boolean hasNote() { 3014 if (this.note == null) 3015 return false; 3016 for (Annotation item : this.note) 3017 if (!item.isEmpty()) 3018 return true; 3019 return false; 3020 } 3021 3022 public Annotation addNote() { // 3 3023 Annotation t = new Annotation(); 3024 if (this.note == null) 3025 this.note = new ArrayList<Annotation>(); 3026 this.note.add(t); 3027 return t; 3028 } 3029 3030 public Immunization addNote(Annotation t) { // 3 3031 if (t == null) 3032 return this; 3033 if (this.note == null) 3034 this.note = new ArrayList<Annotation>(); 3035 this.note.add(t); 3036 return this; 3037 } 3038 3039 /** 3040 * @return The first repetition of repeating field {@link #note}, creating it if 3041 * it does not already exist 3042 */ 3043 public Annotation getNoteFirstRep() { 3044 if (getNote().isEmpty()) { 3045 addNote(); 3046 } 3047 return getNote().get(0); 3048 } 3049 3050 /** 3051 * @return {@link #reasonCode} (Reasons why the vaccine was administered.) 3052 */ 3053 public List<CodeableConcept> getReasonCode() { 3054 if (this.reasonCode == null) 3055 this.reasonCode = new ArrayList<CodeableConcept>(); 3056 return this.reasonCode; 3057 } 3058 3059 /** 3060 * @return Returns a reference to <code>this</code> for easy method chaining 3061 */ 3062 public Immunization setReasonCode(List<CodeableConcept> theReasonCode) { 3063 this.reasonCode = theReasonCode; 3064 return this; 3065 } 3066 3067 public boolean hasReasonCode() { 3068 if (this.reasonCode == null) 3069 return false; 3070 for (CodeableConcept item : this.reasonCode) 3071 if (!item.isEmpty()) 3072 return true; 3073 return false; 3074 } 3075 3076 public CodeableConcept addReasonCode() { // 3 3077 CodeableConcept t = new CodeableConcept(); 3078 if (this.reasonCode == null) 3079 this.reasonCode = new ArrayList<CodeableConcept>(); 3080 this.reasonCode.add(t); 3081 return t; 3082 } 3083 3084 public Immunization addReasonCode(CodeableConcept t) { // 3 3085 if (t == null) 3086 return this; 3087 if (this.reasonCode == null) 3088 this.reasonCode = new ArrayList<CodeableConcept>(); 3089 this.reasonCode.add(t); 3090 return this; 3091 } 3092 3093 /** 3094 * @return The first repetition of repeating field {@link #reasonCode}, creating 3095 * it if it does not already exist 3096 */ 3097 public CodeableConcept getReasonCodeFirstRep() { 3098 if (getReasonCode().isEmpty()) { 3099 addReasonCode(); 3100 } 3101 return getReasonCode().get(0); 3102 } 3103 3104 /** 3105 * @return {@link #reasonReference} (Condition, Observation or DiagnosticReport 3106 * that supports why the immunization was administered.) 3107 */ 3108 public List<Reference> getReasonReference() { 3109 if (this.reasonReference == null) 3110 this.reasonReference = new ArrayList<Reference>(); 3111 return this.reasonReference; 3112 } 3113 3114 /** 3115 * @return Returns a reference to <code>this</code> for easy method chaining 3116 */ 3117 public Immunization setReasonReference(List<Reference> theReasonReference) { 3118 this.reasonReference = theReasonReference; 3119 return this; 3120 } 3121 3122 public boolean hasReasonReference() { 3123 if (this.reasonReference == null) 3124 return false; 3125 for (Reference item : this.reasonReference) 3126 if (!item.isEmpty()) 3127 return true; 3128 return false; 3129 } 3130 3131 public Reference addReasonReference() { // 3 3132 Reference t = new Reference(); 3133 if (this.reasonReference == null) 3134 this.reasonReference = new ArrayList<Reference>(); 3135 this.reasonReference.add(t); 3136 return t; 3137 } 3138 3139 public Immunization addReasonReference(Reference t) { // 3 3140 if (t == null) 3141 return this; 3142 if (this.reasonReference == null) 3143 this.reasonReference = new ArrayList<Reference>(); 3144 this.reasonReference.add(t); 3145 return this; 3146 } 3147 3148 /** 3149 * @return The first repetition of repeating field {@link #reasonReference}, 3150 * creating it if it does not already exist 3151 */ 3152 public Reference getReasonReferenceFirstRep() { 3153 if (getReasonReference().isEmpty()) { 3154 addReasonReference(); 3155 } 3156 return getReasonReference().get(0); 3157 } 3158 3159 /** 3160 * @deprecated Use Reference#setResource(IBaseResource) instead 3161 */ 3162 @Deprecated 3163 public List<Resource> getReasonReferenceTarget() { 3164 if (this.reasonReferenceTarget == null) 3165 this.reasonReferenceTarget = new ArrayList<Resource>(); 3166 return this.reasonReferenceTarget; 3167 } 3168 3169 /** 3170 * @return {@link #isSubpotent} (Indication if a dose is considered to be 3171 * subpotent. By default, a dose should be considered to be potent.). 3172 * This is the underlying object with id, value and extensions. The 3173 * accessor "getIsSubpotent" gives direct access to the value 3174 */ 3175 public BooleanType getIsSubpotentElement() { 3176 if (this.isSubpotent == null) 3177 if (Configuration.errorOnAutoCreate()) 3178 throw new Error("Attempt to auto-create Immunization.isSubpotent"); 3179 else if (Configuration.doAutoCreate()) 3180 this.isSubpotent = new BooleanType(); // bb 3181 return this.isSubpotent; 3182 } 3183 3184 public boolean hasIsSubpotentElement() { 3185 return this.isSubpotent != null && !this.isSubpotent.isEmpty(); 3186 } 3187 3188 public boolean hasIsSubpotent() { 3189 return this.isSubpotent != null && !this.isSubpotent.isEmpty(); 3190 } 3191 3192 /** 3193 * @param value {@link #isSubpotent} (Indication if a dose is considered to be 3194 * subpotent. By default, a dose should be considered to be 3195 * potent.). This is the underlying object with id, value and 3196 * extensions. The accessor "getIsSubpotent" gives direct access to 3197 * the value 3198 */ 3199 public Immunization setIsSubpotentElement(BooleanType value) { 3200 this.isSubpotent = value; 3201 return this; 3202 } 3203 3204 /** 3205 * @return Indication if a dose is considered to be subpotent. By default, a 3206 * dose should be considered to be potent. 3207 */ 3208 public boolean getIsSubpotent() { 3209 return this.isSubpotent == null || this.isSubpotent.isEmpty() ? false : this.isSubpotent.getValue(); 3210 } 3211 3212 /** 3213 * @param value Indication if a dose is considered to be subpotent. By default, 3214 * a dose should be considered to be potent. 3215 */ 3216 public Immunization setIsSubpotent(boolean value) { 3217 if (this.isSubpotent == null) 3218 this.isSubpotent = new BooleanType(); 3219 this.isSubpotent.setValue(value); 3220 return this; 3221 } 3222 3223 /** 3224 * @return {@link #subpotentReason} (Reason why a dose is considered to be 3225 * subpotent.) 3226 */ 3227 public List<CodeableConcept> getSubpotentReason() { 3228 if (this.subpotentReason == null) 3229 this.subpotentReason = new ArrayList<CodeableConcept>(); 3230 return this.subpotentReason; 3231 } 3232 3233 /** 3234 * @return Returns a reference to <code>this</code> for easy method chaining 3235 */ 3236 public Immunization setSubpotentReason(List<CodeableConcept> theSubpotentReason) { 3237 this.subpotentReason = theSubpotentReason; 3238 return this; 3239 } 3240 3241 public boolean hasSubpotentReason() { 3242 if (this.subpotentReason == null) 3243 return false; 3244 for (CodeableConcept item : this.subpotentReason) 3245 if (!item.isEmpty()) 3246 return true; 3247 return false; 3248 } 3249 3250 public CodeableConcept addSubpotentReason() { // 3 3251 CodeableConcept t = new CodeableConcept(); 3252 if (this.subpotentReason == null) 3253 this.subpotentReason = new ArrayList<CodeableConcept>(); 3254 this.subpotentReason.add(t); 3255 return t; 3256 } 3257 3258 public Immunization addSubpotentReason(CodeableConcept t) { // 3 3259 if (t == null) 3260 return this; 3261 if (this.subpotentReason == null) 3262 this.subpotentReason = new ArrayList<CodeableConcept>(); 3263 this.subpotentReason.add(t); 3264 return this; 3265 } 3266 3267 /** 3268 * @return The first repetition of repeating field {@link #subpotentReason}, 3269 * creating it if it does not already exist 3270 */ 3271 public CodeableConcept getSubpotentReasonFirstRep() { 3272 if (getSubpotentReason().isEmpty()) { 3273 addSubpotentReason(); 3274 } 3275 return getSubpotentReason().get(0); 3276 } 3277 3278 /** 3279 * @return {@link #education} (Educational material presented to the patient (or 3280 * guardian) at the time of vaccine administration.) 3281 */ 3282 public List<ImmunizationEducationComponent> getEducation() { 3283 if (this.education == null) 3284 this.education = new ArrayList<ImmunizationEducationComponent>(); 3285 return this.education; 3286 } 3287 3288 /** 3289 * @return Returns a reference to <code>this</code> for easy method chaining 3290 */ 3291 public Immunization setEducation(List<ImmunizationEducationComponent> theEducation) { 3292 this.education = theEducation; 3293 return this; 3294 } 3295 3296 public boolean hasEducation() { 3297 if (this.education == null) 3298 return false; 3299 for (ImmunizationEducationComponent item : this.education) 3300 if (!item.isEmpty()) 3301 return true; 3302 return false; 3303 } 3304 3305 public ImmunizationEducationComponent addEducation() { // 3 3306 ImmunizationEducationComponent t = new ImmunizationEducationComponent(); 3307 if (this.education == null) 3308 this.education = new ArrayList<ImmunizationEducationComponent>(); 3309 this.education.add(t); 3310 return t; 3311 } 3312 3313 public Immunization addEducation(ImmunizationEducationComponent t) { // 3 3314 if (t == null) 3315 return this; 3316 if (this.education == null) 3317 this.education = new ArrayList<ImmunizationEducationComponent>(); 3318 this.education.add(t); 3319 return this; 3320 } 3321 3322 /** 3323 * @return The first repetition of repeating field {@link #education}, creating 3324 * it if it does not already exist 3325 */ 3326 public ImmunizationEducationComponent getEducationFirstRep() { 3327 if (getEducation().isEmpty()) { 3328 addEducation(); 3329 } 3330 return getEducation().get(0); 3331 } 3332 3333 /** 3334 * @return {@link #programEligibility} (Indicates a patient's eligibility for a 3335 * funding program.) 3336 */ 3337 public List<CodeableConcept> getProgramEligibility() { 3338 if (this.programEligibility == null) 3339 this.programEligibility = new ArrayList<CodeableConcept>(); 3340 return this.programEligibility; 3341 } 3342 3343 /** 3344 * @return Returns a reference to <code>this</code> for easy method chaining 3345 */ 3346 public Immunization setProgramEligibility(List<CodeableConcept> theProgramEligibility) { 3347 this.programEligibility = theProgramEligibility; 3348 return this; 3349 } 3350 3351 public boolean hasProgramEligibility() { 3352 if (this.programEligibility == null) 3353 return false; 3354 for (CodeableConcept item : this.programEligibility) 3355 if (!item.isEmpty()) 3356 return true; 3357 return false; 3358 } 3359 3360 public CodeableConcept addProgramEligibility() { // 3 3361 CodeableConcept t = new CodeableConcept(); 3362 if (this.programEligibility == null) 3363 this.programEligibility = new ArrayList<CodeableConcept>(); 3364 this.programEligibility.add(t); 3365 return t; 3366 } 3367 3368 public Immunization addProgramEligibility(CodeableConcept t) { // 3 3369 if (t == null) 3370 return this; 3371 if (this.programEligibility == null) 3372 this.programEligibility = new ArrayList<CodeableConcept>(); 3373 this.programEligibility.add(t); 3374 return this; 3375 } 3376 3377 /** 3378 * @return The first repetition of repeating field {@link #programEligibility}, 3379 * creating it if it does not already exist 3380 */ 3381 public CodeableConcept getProgramEligibilityFirstRep() { 3382 if (getProgramEligibility().isEmpty()) { 3383 addProgramEligibility(); 3384 } 3385 return getProgramEligibility().get(0); 3386 } 3387 3388 /** 3389 * @return {@link #fundingSource} (Indicates the source of the vaccine actually 3390 * administered. This may be different than the patient eligibility 3391 * (e.g. the patient may be eligible for a publically purchased vaccine 3392 * but due to inventory issues, vaccine purchased with private funds was 3393 * actually administered).) 3394 */ 3395 public CodeableConcept getFundingSource() { 3396 if (this.fundingSource == null) 3397 if (Configuration.errorOnAutoCreate()) 3398 throw new Error("Attempt to auto-create Immunization.fundingSource"); 3399 else if (Configuration.doAutoCreate()) 3400 this.fundingSource = new CodeableConcept(); // cc 3401 return this.fundingSource; 3402 } 3403 3404 public boolean hasFundingSource() { 3405 return this.fundingSource != null && !this.fundingSource.isEmpty(); 3406 } 3407 3408 /** 3409 * @param value {@link #fundingSource} (Indicates the source of the vaccine 3410 * actually administered. This may be different than the patient 3411 * eligibility (e.g. the patient may be eligible for a publically 3412 * purchased vaccine but due to inventory issues, vaccine purchased 3413 * with private funds was actually administered).) 3414 */ 3415 public Immunization setFundingSource(CodeableConcept value) { 3416 this.fundingSource = value; 3417 return this; 3418 } 3419 3420 /** 3421 * @return {@link #reaction} (Categorical data indicating that an adverse event 3422 * is associated in time to an immunization.) 3423 */ 3424 public List<ImmunizationReactionComponent> getReaction() { 3425 if (this.reaction == null) 3426 this.reaction = new ArrayList<ImmunizationReactionComponent>(); 3427 return this.reaction; 3428 } 3429 3430 /** 3431 * @return Returns a reference to <code>this</code> for easy method chaining 3432 */ 3433 public Immunization setReaction(List<ImmunizationReactionComponent> theReaction) { 3434 this.reaction = theReaction; 3435 return this; 3436 } 3437 3438 public boolean hasReaction() { 3439 if (this.reaction == null) 3440 return false; 3441 for (ImmunizationReactionComponent item : this.reaction) 3442 if (!item.isEmpty()) 3443 return true; 3444 return false; 3445 } 3446 3447 public ImmunizationReactionComponent addReaction() { // 3 3448 ImmunizationReactionComponent t = new ImmunizationReactionComponent(); 3449 if (this.reaction == null) 3450 this.reaction = new ArrayList<ImmunizationReactionComponent>(); 3451 this.reaction.add(t); 3452 return t; 3453 } 3454 3455 public Immunization addReaction(ImmunizationReactionComponent t) { // 3 3456 if (t == null) 3457 return this; 3458 if (this.reaction == null) 3459 this.reaction = new ArrayList<ImmunizationReactionComponent>(); 3460 this.reaction.add(t); 3461 return this; 3462 } 3463 3464 /** 3465 * @return The first repetition of repeating field {@link #reaction}, creating 3466 * it if it does not already exist 3467 */ 3468 public ImmunizationReactionComponent getReactionFirstRep() { 3469 if (getReaction().isEmpty()) { 3470 addReaction(); 3471 } 3472 return getReaction().get(0); 3473 } 3474 3475 /** 3476 * @return {@link #protocolApplied} (The protocol (set of recommendations) being 3477 * followed by the provider who administered the dose.) 3478 */ 3479 public List<ImmunizationProtocolAppliedComponent> getProtocolApplied() { 3480 if (this.protocolApplied == null) 3481 this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>(); 3482 return this.protocolApplied; 3483 } 3484 3485 /** 3486 * @return Returns a reference to <code>this</code> for easy method chaining 3487 */ 3488 public Immunization setProtocolApplied(List<ImmunizationProtocolAppliedComponent> theProtocolApplied) { 3489 this.protocolApplied = theProtocolApplied; 3490 return this; 3491 } 3492 3493 public boolean hasProtocolApplied() { 3494 if (this.protocolApplied == null) 3495 return false; 3496 for (ImmunizationProtocolAppliedComponent item : this.protocolApplied) 3497 if (!item.isEmpty()) 3498 return true; 3499 return false; 3500 } 3501 3502 public ImmunizationProtocolAppliedComponent addProtocolApplied() { // 3 3503 ImmunizationProtocolAppliedComponent t = new ImmunizationProtocolAppliedComponent(); 3504 if (this.protocolApplied == null) 3505 this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>(); 3506 this.protocolApplied.add(t); 3507 return t; 3508 } 3509 3510 public Immunization addProtocolApplied(ImmunizationProtocolAppliedComponent t) { // 3 3511 if (t == null) 3512 return this; 3513 if (this.protocolApplied == null) 3514 this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>(); 3515 this.protocolApplied.add(t); 3516 return this; 3517 } 3518 3519 /** 3520 * @return The first repetition of repeating field {@link #protocolApplied}, 3521 * creating it if it does not already exist 3522 */ 3523 public ImmunizationProtocolAppliedComponent getProtocolAppliedFirstRep() { 3524 if (getProtocolApplied().isEmpty()) { 3525 addProtocolApplied(); 3526 } 3527 return getProtocolApplied().get(0); 3528 } 3529 3530 protected void listChildren(List<Property> children) { 3531 super.listChildren(children); 3532 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 3533 0, java.lang.Integer.MAX_VALUE, identifier)); 3534 children 3535 .add(new Property("status", "code", "Indicates the current status of the immunization event.", 0, 1, status)); 3536 children.add(new Property("statusReason", "CodeableConcept", 3537 "Indicates the reason the immunization event was not performed.", 0, 1, statusReason)); 3538 children.add(new Property("vaccineCode", "CodeableConcept", 3539 "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode)); 3540 children.add(new Property("patient", "Reference(Patient)", 3541 "The patient who either received or did not receive the immunization.", 0, 1, patient)); 3542 children.add(new Property("encounter", "Reference(Encounter)", 3543 "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", 3544 0, 1, encounter)); 3545 children.add(new Property("occurrence[x]", "dateTime|string", 3546 "Date vaccine administered or was to be administered.", 0, 1, occurrence)); 3547 children.add(new Property("recorded", "dateTime", 3548 "The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.", 3549 0, 1, recorded)); 3550 children.add(new Property("primarySource", "boolean", 3551 "An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.", 3552 0, 1, primarySource)); 3553 children.add(new Property("reportOrigin", "CodeableConcept", 3554 "The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.", 3555 0, 1, reportOrigin)); 3556 children.add(new Property("location", "Reference(Location)", 3557 "The service delivery location where the vaccine administration occurred.", 0, 1, location)); 3558 children.add( 3559 new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, 1, manufacturer)); 3560 children.add(new Property("lotNumber", "string", "Lot number of the vaccine product.", 0, 1, lotNumber)); 3561 children.add(new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, expirationDate)); 3562 children.add(new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, site)); 3563 children.add(new Property("route", "CodeableConcept", 3564 "The path by which the vaccine product is taken into the body.", 0, 1, route)); 3565 children.add(new Property("doseQuantity", "SimpleQuantity", 3566 "The quantity of vaccine product that was administered.", 0, 1, doseQuantity)); 3567 children.add(new Property("performer", "", "Indicates who performed the immunization event.", 0, 3568 java.lang.Integer.MAX_VALUE, performer)); 3569 children.add(new Property("note", "Annotation", 3570 "Extra information about the immunization that is not conveyed by the other attributes.", 0, 3571 java.lang.Integer.MAX_VALUE, note)); 3572 children.add(new Property("reasonCode", "CodeableConcept", "Reasons why the vaccine was administered.", 0, 3573 java.lang.Integer.MAX_VALUE, reasonCode)); 3574 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", 3575 "Condition, Observation or DiagnosticReport that supports why the immunization was administered.", 0, 3576 java.lang.Integer.MAX_VALUE, reasonReference)); 3577 children.add(new Property("isSubpotent", "boolean", 3578 "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 0, 3579 1, isSubpotent)); 3580 children.add(new Property("subpotentReason", "CodeableConcept", "Reason why a dose is considered to be subpotent.", 3581 0, java.lang.Integer.MAX_VALUE, subpotentReason)); 3582 children.add(new Property("education", "", 3583 "Educational material presented to the patient (or guardian) at the time of vaccine administration.", 0, 3584 java.lang.Integer.MAX_VALUE, education)); 3585 children.add(new Property("programEligibility", "CodeableConcept", 3586 "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, 3587 programEligibility)); 3588 children.add(new Property("fundingSource", "CodeableConcept", 3589 "Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).", 3590 0, 1, fundingSource)); 3591 children.add(new Property("reaction", "", 3592 "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, 3593 java.lang.Integer.MAX_VALUE, reaction)); 3594 children.add(new Property("protocolApplied", "", 3595 "The protocol (set of recommendations) being followed by the provider who administered the dose.", 0, 3596 java.lang.Integer.MAX_VALUE, protocolApplied)); 3597 } 3598 3599 @Override 3600 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3601 switch (_hash) { 3602 case -1618432855: 3603 /* identifier */ return new Property("identifier", "Identifier", 3604 "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier); 3605 case -892481550: 3606 /* status */ return new Property("status", "code", "Indicates the current status of the immunization event.", 0, 3607 1, status); 3608 case 2051346646: 3609 /* statusReason */ return new Property("statusReason", "CodeableConcept", 3610 "Indicates the reason the immunization event was not performed.", 0, 1, statusReason); 3611 case 664556354: 3612 /* vaccineCode */ return new Property("vaccineCode", "CodeableConcept", 3613 "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode); 3614 case -791418107: 3615 /* patient */ return new Property("patient", "Reference(Patient)", 3616 "The patient who either received or did not receive the immunization.", 0, 1, patient); 3617 case 1524132147: 3618 /* encounter */ return new Property("encounter", "Reference(Encounter)", 3619 "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", 3620 0, 1, encounter); 3621 case -2022646513: 3622 /* occurrence[x] */ return new Property("occurrence[x]", "dateTime|string", 3623 "Date vaccine administered or was to be administered.", 0, 1, occurrence); 3624 case 1687874001: 3625 /* occurrence */ return new Property("occurrence[x]", "dateTime|string", 3626 "Date vaccine administered or was to be administered.", 0, 1, occurrence); 3627 case -298443636: 3628 /* occurrenceDateTime */ return new Property("occurrence[x]", "dateTime|string", 3629 "Date vaccine administered or was to be administered.", 0, 1, occurrence); 3630 case 1496896834: 3631 /* occurrenceString */ return new Property("occurrence[x]", "dateTime|string", 3632 "Date vaccine administered or was to be administered.", 0, 1, occurrence); 3633 case -799233872: 3634 /* recorded */ return new Property("recorded", "dateTime", 3635 "The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.", 3636 0, 1, recorded); 3637 case -528721731: 3638 /* primarySource */ return new Property("primarySource", "boolean", 3639 "An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.", 3640 0, 1, primarySource); 3641 case 486750586: 3642 /* reportOrigin */ return new Property("reportOrigin", "CodeableConcept", 3643 "The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.", 3644 0, 1, reportOrigin); 3645 case 1901043637: 3646 /* location */ return new Property("location", "Reference(Location)", 3647 "The service delivery location where the vaccine administration occurred.", 0, 1, location); 3648 case -1969347631: 3649 /* manufacturer */ return new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 3650 0, 1, manufacturer); 3651 case 462547450: 3652 /* lotNumber */ return new Property("lotNumber", "string", "Lot number of the vaccine product.", 0, 1, 3653 lotNumber); 3654 case -668811523: 3655 /* expirationDate */ return new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, 3656 expirationDate); 3657 case 3530567: 3658 /* site */ return new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, 3659 site); 3660 case 108704329: 3661 /* route */ return new Property("route", "CodeableConcept", 3662 "The path by which the vaccine product is taken into the body.", 0, 1, route); 3663 case -2083618872: 3664 /* doseQuantity */ return new Property("doseQuantity", "SimpleQuantity", 3665 "The quantity of vaccine product that was administered.", 0, 1, doseQuantity); 3666 case 481140686: 3667 /* performer */ return new Property("performer", "", "Indicates who performed the immunization event.", 0, 3668 java.lang.Integer.MAX_VALUE, performer); 3669 case 3387378: 3670 /* note */ return new Property("note", "Annotation", 3671 "Extra information about the immunization that is not conveyed by the other attributes.", 0, 3672 java.lang.Integer.MAX_VALUE, note); 3673 case 722137681: 3674 /* reasonCode */ return new Property("reasonCode", "CodeableConcept", "Reasons why the vaccine was administered.", 3675 0, java.lang.Integer.MAX_VALUE, reasonCode); 3676 case -1146218137: 3677 /* reasonReference */ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", 3678 "Condition, Observation or DiagnosticReport that supports why the immunization was administered.", 0, 3679 java.lang.Integer.MAX_VALUE, reasonReference); 3680 case 1618512556: 3681 /* isSubpotent */ return new Property("isSubpotent", "boolean", 3682 "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 3683 0, 1, isSubpotent); 3684 case 805168794: 3685 /* subpotentReason */ return new Property("subpotentReason", "CodeableConcept", 3686 "Reason why a dose is considered to be subpotent.", 0, java.lang.Integer.MAX_VALUE, subpotentReason); 3687 case -290756696: 3688 /* education */ return new Property("education", "", 3689 "Educational material presented to the patient (or guardian) at the time of vaccine administration.", 0, 3690 java.lang.Integer.MAX_VALUE, education); 3691 case 1207530089: 3692 /* programEligibility */ return new Property("programEligibility", "CodeableConcept", 3693 "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, 3694 programEligibility); 3695 case 1120150904: 3696 /* fundingSource */ return new Property("fundingSource", "CodeableConcept", 3697 "Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).", 3698 0, 1, fundingSource); 3699 case -867509719: 3700 /* reaction */ return new Property("reaction", "", 3701 "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, 3702 java.lang.Integer.MAX_VALUE, reaction); 3703 case 607985349: 3704 /* protocolApplied */ return new Property("protocolApplied", "", 3705 "The protocol (set of recommendations) being followed by the provider who administered the dose.", 0, 3706 java.lang.Integer.MAX_VALUE, protocolApplied); 3707 default: 3708 return super.getNamedProperty(_hash, _name, _checkValid); 3709 } 3710 3711 } 3712 3713 @Override 3714 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3715 switch (hash) { 3716 case -1618432855: 3717 /* identifier */ return this.identifier == null ? new Base[0] 3718 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3719 case -892481550: 3720 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<ImmunizationStatus> 3721 case 2051346646: 3722 /* statusReason */ return this.statusReason == null ? new Base[0] : new Base[] { this.statusReason }; // CodeableConcept 3723 case 664556354: 3724 /* vaccineCode */ return this.vaccineCode == null ? new Base[0] : new Base[] { this.vaccineCode }; // CodeableConcept 3725 case -791418107: 3726 /* patient */ return this.patient == null ? new Base[0] : new Base[] { this.patient }; // Reference 3727 case 1524132147: 3728 /* encounter */ return this.encounter == null ? new Base[0] : new Base[] { this.encounter }; // Reference 3729 case 1687874001: 3730 /* occurrence */ return this.occurrence == null ? new Base[0] : new Base[] { this.occurrence }; // Type 3731 case -799233872: 3732 /* recorded */ return this.recorded == null ? new Base[0] : new Base[] { this.recorded }; // DateTimeType 3733 case -528721731: 3734 /* primarySource */ return this.primarySource == null ? new Base[0] : new Base[] { this.primarySource }; // BooleanType 3735 case 486750586: 3736 /* reportOrigin */ return this.reportOrigin == null ? new Base[0] : new Base[] { this.reportOrigin }; // CodeableConcept 3737 case 1901043637: 3738 /* location */ return this.location == null ? new Base[0] : new Base[] { this.location }; // Reference 3739 case -1969347631: 3740 /* manufacturer */ return this.manufacturer == null ? new Base[0] : new Base[] { this.manufacturer }; // Reference 3741 case 462547450: 3742 /* lotNumber */ return this.lotNumber == null ? new Base[0] : new Base[] { this.lotNumber }; // StringType 3743 case -668811523: 3744 /* expirationDate */ return this.expirationDate == null ? new Base[0] : new Base[] { this.expirationDate }; // DateType 3745 case 3530567: 3746 /* site */ return this.site == null ? new Base[0] : new Base[] { this.site }; // CodeableConcept 3747 case 108704329: 3748 /* route */ return this.route == null ? new Base[0] : new Base[] { this.route }; // CodeableConcept 3749 case -2083618872: 3750 /* doseQuantity */ return this.doseQuantity == null ? new Base[0] : new Base[] { this.doseQuantity }; // Quantity 3751 case 481140686: 3752 /* performer */ return this.performer == null ? new Base[0] 3753 : this.performer.toArray(new Base[this.performer.size()]); // ImmunizationPerformerComponent 3754 case 3387378: 3755 /* note */ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3756 case 722137681: 3757 /* reasonCode */ return this.reasonCode == null ? new Base[0] 3758 : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 3759 case -1146218137: 3760 /* reasonReference */ return this.reasonReference == null ? new Base[0] 3761 : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 3762 case 1618512556: 3763 /* isSubpotent */ return this.isSubpotent == null ? new Base[0] : new Base[] { this.isSubpotent }; // BooleanType 3764 case 805168794: 3765 /* subpotentReason */ return this.subpotentReason == null ? new Base[0] 3766 : this.subpotentReason.toArray(new Base[this.subpotentReason.size()]); // CodeableConcept 3767 case -290756696: 3768 /* education */ return this.education == null ? new Base[0] 3769 : this.education.toArray(new Base[this.education.size()]); // ImmunizationEducationComponent 3770 case 1207530089: 3771 /* programEligibility */ return this.programEligibility == null ? new Base[0] 3772 : this.programEligibility.toArray(new Base[this.programEligibility.size()]); // CodeableConcept 3773 case 1120150904: 3774 /* fundingSource */ return this.fundingSource == null ? new Base[0] : new Base[] { this.fundingSource }; // CodeableConcept 3775 case -867509719: 3776 /* reaction */ return this.reaction == null ? new Base[0] : this.reaction.toArray(new Base[this.reaction.size()]); // ImmunizationReactionComponent 3777 case 607985349: 3778 /* protocolApplied */ return this.protocolApplied == null ? new Base[0] 3779 : this.protocolApplied.toArray(new Base[this.protocolApplied.size()]); // ImmunizationProtocolAppliedComponent 3780 default: 3781 return super.getProperty(hash, name, checkValid); 3782 } 3783 3784 } 3785 3786 @Override 3787 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3788 switch (hash) { 3789 case -1618432855: // identifier 3790 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3791 return value; 3792 case -892481550: // status 3793 value = new ImmunizationStatusEnumFactory().fromType(castToCode(value)); 3794 this.status = (Enumeration) value; // Enumeration<ImmunizationStatus> 3795 return value; 3796 case 2051346646: // statusReason 3797 this.statusReason = castToCodeableConcept(value); // CodeableConcept 3798 return value; 3799 case 664556354: // vaccineCode 3800 this.vaccineCode = castToCodeableConcept(value); // CodeableConcept 3801 return value; 3802 case -791418107: // patient 3803 this.patient = castToReference(value); // Reference 3804 return value; 3805 case 1524132147: // encounter 3806 this.encounter = castToReference(value); // Reference 3807 return value; 3808 case 1687874001: // occurrence 3809 this.occurrence = castToType(value); // Type 3810 return value; 3811 case -799233872: // recorded 3812 this.recorded = castToDateTime(value); // DateTimeType 3813 return value; 3814 case -528721731: // primarySource 3815 this.primarySource = castToBoolean(value); // BooleanType 3816 return value; 3817 case 486750586: // reportOrigin 3818 this.reportOrigin = castToCodeableConcept(value); // CodeableConcept 3819 return value; 3820 case 1901043637: // location 3821 this.location = castToReference(value); // Reference 3822 return value; 3823 case -1969347631: // manufacturer 3824 this.manufacturer = castToReference(value); // Reference 3825 return value; 3826 case 462547450: // lotNumber 3827 this.lotNumber = castToString(value); // StringType 3828 return value; 3829 case -668811523: // expirationDate 3830 this.expirationDate = castToDate(value); // DateType 3831 return value; 3832 case 3530567: // site 3833 this.site = castToCodeableConcept(value); // CodeableConcept 3834 return value; 3835 case 108704329: // route 3836 this.route = castToCodeableConcept(value); // CodeableConcept 3837 return value; 3838 case -2083618872: // doseQuantity 3839 this.doseQuantity = castToQuantity(value); // Quantity 3840 return value; 3841 case 481140686: // performer 3842 this.getPerformer().add((ImmunizationPerformerComponent) value); // ImmunizationPerformerComponent 3843 return value; 3844 case 3387378: // note 3845 this.getNote().add(castToAnnotation(value)); // Annotation 3846 return value; 3847 case 722137681: // reasonCode 3848 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 3849 return value; 3850 case -1146218137: // reasonReference 3851 this.getReasonReference().add(castToReference(value)); // Reference 3852 return value; 3853 case 1618512556: // isSubpotent 3854 this.isSubpotent = castToBoolean(value); // BooleanType 3855 return value; 3856 case 805168794: // subpotentReason 3857 this.getSubpotentReason().add(castToCodeableConcept(value)); // CodeableConcept 3858 return value; 3859 case -290756696: // education 3860 this.getEducation().add((ImmunizationEducationComponent) value); // ImmunizationEducationComponent 3861 return value; 3862 case 1207530089: // programEligibility 3863 this.getProgramEligibility().add(castToCodeableConcept(value)); // CodeableConcept 3864 return value; 3865 case 1120150904: // fundingSource 3866 this.fundingSource = castToCodeableConcept(value); // CodeableConcept 3867 return value; 3868 case -867509719: // reaction 3869 this.getReaction().add((ImmunizationReactionComponent) value); // ImmunizationReactionComponent 3870 return value; 3871 case 607985349: // protocolApplied 3872 this.getProtocolApplied().add((ImmunizationProtocolAppliedComponent) value); // ImmunizationProtocolAppliedComponent 3873 return value; 3874 default: 3875 return super.setProperty(hash, name, value); 3876 } 3877 3878 } 3879 3880 @Override 3881 public Base setProperty(String name, Base value) throws FHIRException { 3882 if (name.equals("identifier")) { 3883 this.getIdentifier().add(castToIdentifier(value)); 3884 } else if (name.equals("status")) { 3885 value = new ImmunizationStatusEnumFactory().fromType(castToCode(value)); 3886 this.status = (Enumeration) value; // Enumeration<ImmunizationStatus> 3887 } else if (name.equals("statusReason")) { 3888 this.statusReason = castToCodeableConcept(value); // CodeableConcept 3889 } else if (name.equals("vaccineCode")) { 3890 this.vaccineCode = castToCodeableConcept(value); // CodeableConcept 3891 } else if (name.equals("patient")) { 3892 this.patient = castToReference(value); // Reference 3893 } else if (name.equals("encounter")) { 3894 this.encounter = castToReference(value); // Reference 3895 } else if (name.equals("occurrence[x]")) { 3896 this.occurrence = castToType(value); // Type 3897 } else if (name.equals("recorded")) { 3898 this.recorded = castToDateTime(value); // DateTimeType 3899 } else if (name.equals("primarySource")) { 3900 this.primarySource = castToBoolean(value); // BooleanType 3901 } else if (name.equals("reportOrigin")) { 3902 this.reportOrigin = castToCodeableConcept(value); // CodeableConcept 3903 } else if (name.equals("location")) { 3904 this.location = castToReference(value); // Reference 3905 } else if (name.equals("manufacturer")) { 3906 this.manufacturer = castToReference(value); // Reference 3907 } else if (name.equals("lotNumber")) { 3908 this.lotNumber = castToString(value); // StringType 3909 } else if (name.equals("expirationDate")) { 3910 this.expirationDate = castToDate(value); // DateType 3911 } else if (name.equals("site")) { 3912 this.site = castToCodeableConcept(value); // CodeableConcept 3913 } else if (name.equals("route")) { 3914 this.route = castToCodeableConcept(value); // CodeableConcept 3915 } else if (name.equals("doseQuantity")) { 3916 this.doseQuantity = castToQuantity(value); // Quantity 3917 } else if (name.equals("performer")) { 3918 this.getPerformer().add((ImmunizationPerformerComponent) value); 3919 } else if (name.equals("note")) { 3920 this.getNote().add(castToAnnotation(value)); 3921 } else if (name.equals("reasonCode")) { 3922 this.getReasonCode().add(castToCodeableConcept(value)); 3923 } else if (name.equals("reasonReference")) { 3924 this.getReasonReference().add(castToReference(value)); 3925 } else if (name.equals("isSubpotent")) { 3926 this.isSubpotent = castToBoolean(value); // BooleanType 3927 } else if (name.equals("subpotentReason")) { 3928 this.getSubpotentReason().add(castToCodeableConcept(value)); 3929 } else if (name.equals("education")) { 3930 this.getEducation().add((ImmunizationEducationComponent) value); 3931 } else if (name.equals("programEligibility")) { 3932 this.getProgramEligibility().add(castToCodeableConcept(value)); 3933 } else if (name.equals("fundingSource")) { 3934 this.fundingSource = castToCodeableConcept(value); // CodeableConcept 3935 } else if (name.equals("reaction")) { 3936 this.getReaction().add((ImmunizationReactionComponent) value); 3937 } else if (name.equals("protocolApplied")) { 3938 this.getProtocolApplied().add((ImmunizationProtocolAppliedComponent) value); 3939 } else 3940 return super.setProperty(name, value); 3941 return value; 3942 } 3943 3944 @Override 3945 public void removeChild(String name, Base value) throws FHIRException { 3946 if (name.equals("identifier")) { 3947 this.getIdentifier().remove(castToIdentifier(value)); 3948 } else if (name.equals("status")) { 3949 this.status = null; 3950 } else if (name.equals("statusReason")) { 3951 this.statusReason = null; 3952 } else if (name.equals("vaccineCode")) { 3953 this.vaccineCode = null; 3954 } else if (name.equals("patient")) { 3955 this.patient = null; 3956 } else if (name.equals("encounter")) { 3957 this.encounter = null; 3958 } else if (name.equals("occurrence[x]")) { 3959 this.occurrence = null; 3960 } else if (name.equals("recorded")) { 3961 this.recorded = null; 3962 } else if (name.equals("primarySource")) { 3963 this.primarySource = null; 3964 } else if (name.equals("reportOrigin")) { 3965 this.reportOrigin = null; 3966 } else if (name.equals("location")) { 3967 this.location = null; 3968 } else if (name.equals("manufacturer")) { 3969 this.manufacturer = null; 3970 } else if (name.equals("lotNumber")) { 3971 this.lotNumber = null; 3972 } else if (name.equals("expirationDate")) { 3973 this.expirationDate = null; 3974 } else if (name.equals("site")) { 3975 this.site = null; 3976 } else if (name.equals("route")) { 3977 this.route = null; 3978 } else if (name.equals("doseQuantity")) { 3979 this.doseQuantity = null; 3980 } else if (name.equals("performer")) { 3981 this.getPerformer().remove((ImmunizationPerformerComponent) value); 3982 } else if (name.equals("note")) { 3983 this.getNote().remove(castToAnnotation(value)); 3984 } else if (name.equals("reasonCode")) { 3985 this.getReasonCode().remove(castToCodeableConcept(value)); 3986 } else if (name.equals("reasonReference")) { 3987 this.getReasonReference().remove(castToReference(value)); 3988 } else if (name.equals("isSubpotent")) { 3989 this.isSubpotent = null; 3990 } else if (name.equals("subpotentReason")) { 3991 this.getSubpotentReason().remove(castToCodeableConcept(value)); 3992 } else if (name.equals("education")) { 3993 this.getEducation().remove((ImmunizationEducationComponent) value); 3994 } else if (name.equals("programEligibility")) { 3995 this.getProgramEligibility().remove(castToCodeableConcept(value)); 3996 } else if (name.equals("fundingSource")) { 3997 this.fundingSource = null; 3998 } else if (name.equals("reaction")) { 3999 this.getReaction().remove((ImmunizationReactionComponent) value); 4000 } else if (name.equals("protocolApplied")) { 4001 this.getProtocolApplied().remove((ImmunizationProtocolAppliedComponent) value); 4002 } else 4003 super.removeChild(name, value); 4004 4005 } 4006 4007 @Override 4008 public Base makeProperty(int hash, String name) throws FHIRException { 4009 switch (hash) { 4010 case -1618432855: 4011 return addIdentifier(); 4012 case -892481550: 4013 return getStatusElement(); 4014 case 2051346646: 4015 return getStatusReason(); 4016 case 664556354: 4017 return getVaccineCode(); 4018 case -791418107: 4019 return getPatient(); 4020 case 1524132147: 4021 return getEncounter(); 4022 case -2022646513: 4023 return getOccurrence(); 4024 case 1687874001: 4025 return getOccurrence(); 4026 case -799233872: 4027 return getRecordedElement(); 4028 case -528721731: 4029 return getPrimarySourceElement(); 4030 case 486750586: 4031 return getReportOrigin(); 4032 case 1901043637: 4033 return getLocation(); 4034 case -1969347631: 4035 return getManufacturer(); 4036 case 462547450: 4037 return getLotNumberElement(); 4038 case -668811523: 4039 return getExpirationDateElement(); 4040 case 3530567: 4041 return getSite(); 4042 case 108704329: 4043 return getRoute(); 4044 case -2083618872: 4045 return getDoseQuantity(); 4046 case 481140686: 4047 return addPerformer(); 4048 case 3387378: 4049 return addNote(); 4050 case 722137681: 4051 return addReasonCode(); 4052 case -1146218137: 4053 return addReasonReference(); 4054 case 1618512556: 4055 return getIsSubpotentElement(); 4056 case 805168794: 4057 return addSubpotentReason(); 4058 case -290756696: 4059 return addEducation(); 4060 case 1207530089: 4061 return addProgramEligibility(); 4062 case 1120150904: 4063 return getFundingSource(); 4064 case -867509719: 4065 return addReaction(); 4066 case 607985349: 4067 return addProtocolApplied(); 4068 default: 4069 return super.makeProperty(hash, name); 4070 } 4071 4072 } 4073 4074 @Override 4075 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4076 switch (hash) { 4077 case -1618432855: 4078 /* identifier */ return new String[] { "Identifier" }; 4079 case -892481550: 4080 /* status */ return new String[] { "code" }; 4081 case 2051346646: 4082 /* statusReason */ return new String[] { "CodeableConcept" }; 4083 case 664556354: 4084 /* vaccineCode */ return new String[] { "CodeableConcept" }; 4085 case -791418107: 4086 /* patient */ return new String[] { "Reference" }; 4087 case 1524132147: 4088 /* encounter */ return new String[] { "Reference" }; 4089 case 1687874001: 4090 /* occurrence */ return new String[] { "dateTime", "string" }; 4091 case -799233872: 4092 /* recorded */ return new String[] { "dateTime" }; 4093 case -528721731: 4094 /* primarySource */ return new String[] { "boolean" }; 4095 case 486750586: 4096 /* reportOrigin */ return new String[] { "CodeableConcept" }; 4097 case 1901043637: 4098 /* location */ return new String[] { "Reference" }; 4099 case -1969347631: 4100 /* manufacturer */ return new String[] { "Reference" }; 4101 case 462547450: 4102 /* lotNumber */ return new String[] { "string" }; 4103 case -668811523: 4104 /* expirationDate */ return new String[] { "date" }; 4105 case 3530567: 4106 /* site */ return new String[] { "CodeableConcept" }; 4107 case 108704329: 4108 /* route */ return new String[] { "CodeableConcept" }; 4109 case -2083618872: 4110 /* doseQuantity */ return new String[] { "SimpleQuantity" }; 4111 case 481140686: 4112 /* performer */ return new String[] {}; 4113 case 3387378: 4114 /* note */ return new String[] { "Annotation" }; 4115 case 722137681: 4116 /* reasonCode */ return new String[] { "CodeableConcept" }; 4117 case -1146218137: 4118 /* reasonReference */ return new String[] { "Reference" }; 4119 case 1618512556: 4120 /* isSubpotent */ return new String[] { "boolean" }; 4121 case 805168794: 4122 /* subpotentReason */ return new String[] { "CodeableConcept" }; 4123 case -290756696: 4124 /* education */ return new String[] {}; 4125 case 1207530089: 4126 /* programEligibility */ return new String[] { "CodeableConcept" }; 4127 case 1120150904: 4128 /* fundingSource */ return new String[] { "CodeableConcept" }; 4129 case -867509719: 4130 /* reaction */ return new String[] {}; 4131 case 607985349: 4132 /* protocolApplied */ return new String[] {}; 4133 default: 4134 return super.getTypesForProperty(hash, name); 4135 } 4136 4137 } 4138 4139 @Override 4140 public Base addChild(String name) throws FHIRException { 4141 if (name.equals("identifier")) { 4142 return addIdentifier(); 4143 } else if (name.equals("status")) { 4144 throw new FHIRException("Cannot call addChild on a singleton property Immunization.status"); 4145 } else if (name.equals("statusReason")) { 4146 this.statusReason = new CodeableConcept(); 4147 return this.statusReason; 4148 } else if (name.equals("vaccineCode")) { 4149 this.vaccineCode = new CodeableConcept(); 4150 return this.vaccineCode; 4151 } else if (name.equals("patient")) { 4152 this.patient = new Reference(); 4153 return this.patient; 4154 } else if (name.equals("encounter")) { 4155 this.encounter = new Reference(); 4156 return this.encounter; 4157 } else if (name.equals("occurrenceDateTime")) { 4158 this.occurrence = new DateTimeType(); 4159 return this.occurrence; 4160 } else if (name.equals("occurrenceString")) { 4161 this.occurrence = new StringType(); 4162 return this.occurrence; 4163 } else if (name.equals("recorded")) { 4164 throw new FHIRException("Cannot call addChild on a singleton property Immunization.recorded"); 4165 } else if (name.equals("primarySource")) { 4166 throw new FHIRException("Cannot call addChild on a singleton property Immunization.primarySource"); 4167 } else if (name.equals("reportOrigin")) { 4168 this.reportOrigin = new CodeableConcept(); 4169 return this.reportOrigin; 4170 } else if (name.equals("location")) { 4171 this.location = new Reference(); 4172 return this.location; 4173 } else if (name.equals("manufacturer")) { 4174 this.manufacturer = new Reference(); 4175 return this.manufacturer; 4176 } else if (name.equals("lotNumber")) { 4177 throw new FHIRException("Cannot call addChild on a singleton property Immunization.lotNumber"); 4178 } else if (name.equals("expirationDate")) { 4179 throw new FHIRException("Cannot call addChild on a singleton property Immunization.expirationDate"); 4180 } else if (name.equals("site")) { 4181 this.site = new CodeableConcept(); 4182 return this.site; 4183 } else if (name.equals("route")) { 4184 this.route = new CodeableConcept(); 4185 return this.route; 4186 } else if (name.equals("doseQuantity")) { 4187 this.doseQuantity = new Quantity(); 4188 return this.doseQuantity; 4189 } else if (name.equals("performer")) { 4190 return addPerformer(); 4191 } else if (name.equals("note")) { 4192 return addNote(); 4193 } else if (name.equals("reasonCode")) { 4194 return addReasonCode(); 4195 } else if (name.equals("reasonReference")) { 4196 return addReasonReference(); 4197 } else if (name.equals("isSubpotent")) { 4198 throw new FHIRException("Cannot call addChild on a singleton property Immunization.isSubpotent"); 4199 } else if (name.equals("subpotentReason")) { 4200 return addSubpotentReason(); 4201 } else if (name.equals("education")) { 4202 return addEducation(); 4203 } else if (name.equals("programEligibility")) { 4204 return addProgramEligibility(); 4205 } else if (name.equals("fundingSource")) { 4206 this.fundingSource = new CodeableConcept(); 4207 return this.fundingSource; 4208 } else if (name.equals("reaction")) { 4209 return addReaction(); 4210 } else if (name.equals("protocolApplied")) { 4211 return addProtocolApplied(); 4212 } else 4213 return super.addChild(name); 4214 } 4215 4216 public String fhirType() { 4217 return "Immunization"; 4218 4219 } 4220 4221 public Immunization copy() { 4222 Immunization dst = new Immunization(); 4223 copyValues(dst); 4224 return dst; 4225 } 4226 4227 public void copyValues(Immunization dst) { 4228 super.copyValues(dst); 4229 if (identifier != null) { 4230 dst.identifier = new ArrayList<Identifier>(); 4231 for (Identifier i : identifier) 4232 dst.identifier.add(i.copy()); 4233 } 4234 ; 4235 dst.status = status == null ? null : status.copy(); 4236 dst.statusReason = statusReason == null ? null : statusReason.copy(); 4237 dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy(); 4238 dst.patient = patient == null ? null : patient.copy(); 4239 dst.encounter = encounter == null ? null : encounter.copy(); 4240 dst.occurrence = occurrence == null ? null : occurrence.copy(); 4241 dst.recorded = recorded == null ? null : recorded.copy(); 4242 dst.primarySource = primarySource == null ? null : primarySource.copy(); 4243 dst.reportOrigin = reportOrigin == null ? null : reportOrigin.copy(); 4244 dst.location = location == null ? null : location.copy(); 4245 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 4246 dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); 4247 dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); 4248 dst.site = site == null ? null : site.copy(); 4249 dst.route = route == null ? null : route.copy(); 4250 dst.doseQuantity = doseQuantity == null ? null : doseQuantity.copy(); 4251 if (performer != null) { 4252 dst.performer = new ArrayList<ImmunizationPerformerComponent>(); 4253 for (ImmunizationPerformerComponent i : performer) 4254 dst.performer.add(i.copy()); 4255 } 4256 ; 4257 if (note != null) { 4258 dst.note = new ArrayList<Annotation>(); 4259 for (Annotation i : note) 4260 dst.note.add(i.copy()); 4261 } 4262 ; 4263 if (reasonCode != null) { 4264 dst.reasonCode = new ArrayList<CodeableConcept>(); 4265 for (CodeableConcept i : reasonCode) 4266 dst.reasonCode.add(i.copy()); 4267 } 4268 ; 4269 if (reasonReference != null) { 4270 dst.reasonReference = new ArrayList<Reference>(); 4271 for (Reference i : reasonReference) 4272 dst.reasonReference.add(i.copy()); 4273 } 4274 ; 4275 dst.isSubpotent = isSubpotent == null ? null : isSubpotent.copy(); 4276 if (subpotentReason != null) { 4277 dst.subpotentReason = new ArrayList<CodeableConcept>(); 4278 for (CodeableConcept i : subpotentReason) 4279 dst.subpotentReason.add(i.copy()); 4280 } 4281 ; 4282 if (education != null) { 4283 dst.education = new ArrayList<ImmunizationEducationComponent>(); 4284 for (ImmunizationEducationComponent i : education) 4285 dst.education.add(i.copy()); 4286 } 4287 ; 4288 if (programEligibility != null) { 4289 dst.programEligibility = new ArrayList<CodeableConcept>(); 4290 for (CodeableConcept i : programEligibility) 4291 dst.programEligibility.add(i.copy()); 4292 } 4293 ; 4294 dst.fundingSource = fundingSource == null ? null : fundingSource.copy(); 4295 if (reaction != null) { 4296 dst.reaction = new ArrayList<ImmunizationReactionComponent>(); 4297 for (ImmunizationReactionComponent i : reaction) 4298 dst.reaction.add(i.copy()); 4299 } 4300 ; 4301 if (protocolApplied != null) { 4302 dst.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>(); 4303 for (ImmunizationProtocolAppliedComponent i : protocolApplied) 4304 dst.protocolApplied.add(i.copy()); 4305 } 4306 ; 4307 } 4308 4309 protected Immunization typedCopy() { 4310 return copy(); 4311 } 4312 4313 @Override 4314 public boolean equalsDeep(Base other_) { 4315 if (!super.equalsDeep(other_)) 4316 return false; 4317 if (!(other_ instanceof Immunization)) 4318 return false; 4319 Immunization o = (Immunization) other_; 4320 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) 4321 && compareDeep(statusReason, o.statusReason, true) && compareDeep(vaccineCode, o.vaccineCode, true) 4322 && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true) 4323 && compareDeep(occurrence, o.occurrence, true) && compareDeep(recorded, o.recorded, true) 4324 && compareDeep(primarySource, o.primarySource, true) && compareDeep(reportOrigin, o.reportOrigin, true) 4325 && compareDeep(location, o.location, true) && compareDeep(manufacturer, o.manufacturer, true) 4326 && compareDeep(lotNumber, o.lotNumber, true) && compareDeep(expirationDate, o.expirationDate, true) 4327 && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) 4328 && compareDeep(doseQuantity, o.doseQuantity, true) && compareDeep(performer, o.performer, true) 4329 && compareDeep(note, o.note, true) && compareDeep(reasonCode, o.reasonCode, true) 4330 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(isSubpotent, o.isSubpotent, true) 4331 && compareDeep(subpotentReason, o.subpotentReason, true) && compareDeep(education, o.education, true) 4332 && compareDeep(programEligibility, o.programEligibility, true) 4333 && compareDeep(fundingSource, o.fundingSource, true) && compareDeep(reaction, o.reaction, true) 4334 && compareDeep(protocolApplied, o.protocolApplied, true); 4335 } 4336 4337 @Override 4338 public boolean equalsShallow(Base other_) { 4339 if (!super.equalsShallow(other_)) 4340 return false; 4341 if (!(other_ instanceof Immunization)) 4342 return false; 4343 Immunization o = (Immunization) other_; 4344 return compareValues(status, o.status, true) && compareValues(recorded, o.recorded, true) 4345 && compareValues(primarySource, o.primarySource, true) && compareValues(lotNumber, o.lotNumber, true) 4346 && compareValues(expirationDate, o.expirationDate, true) && compareValues(isSubpotent, o.isSubpotent, true); 4347 } 4348 4349 public boolean isEmpty() { 4350 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusReason, vaccineCode, 4351 patient, encounter, occurrence, recorded, primarySource, reportOrigin, location, manufacturer, lotNumber, 4352 expirationDate, site, route, doseQuantity, performer, note, reasonCode, reasonReference, isSubpotent, 4353 subpotentReason, education, programEligibility, fundingSource, reaction, protocolApplied); 4354 } 4355 4356 @Override 4357 public ResourceType getResourceType() { 4358 return ResourceType.Immunization; 4359 } 4360 4361 /** 4362 * Search parameter: <b>date</b> 4363 * <p> 4364 * Description: <b>Vaccination (non)-Administration Date</b><br> 4365 * Type: <b>date</b><br> 4366 * Path: <b>Immunization.occurrence[x]</b><br> 4367 * </p> 4368 */ 4369 @SearchParamDefinition(name = "date", path = "Immunization.occurrence", description = "Vaccination (non)-Administration Date", type = "date") 4370 public static final String SP_DATE = "date"; 4371 /** 4372 * <b>Fluent Client</b> search parameter constant for <b>date</b> 4373 * <p> 4374 * Description: <b>Vaccination (non)-Administration Date</b><br> 4375 * Type: <b>date</b><br> 4376 * Path: <b>Immunization.occurrence[x]</b><br> 4377 * </p> 4378 */ 4379 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 4380 SP_DATE); 4381 4382 /** 4383 * Search parameter: <b>identifier</b> 4384 * <p> 4385 * Description: <b>Business identifier</b><br> 4386 * Type: <b>token</b><br> 4387 * Path: <b>Immunization.identifier</b><br> 4388 * </p> 4389 */ 4390 @SearchParamDefinition(name = "identifier", path = "Immunization.identifier", description = "Business identifier", type = "token") 4391 public static final String SP_IDENTIFIER = "identifier"; 4392 /** 4393 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4394 * <p> 4395 * Description: <b>Business identifier</b><br> 4396 * Type: <b>token</b><br> 4397 * Path: <b>Immunization.identifier</b><br> 4398 * </p> 4399 */ 4400 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4401 SP_IDENTIFIER); 4402 4403 /** 4404 * Search parameter: <b>performer</b> 4405 * <p> 4406 * Description: <b>The practitioner or organization who played a role in the 4407 * vaccination</b><br> 4408 * Type: <b>reference</b><br> 4409 * Path: <b>Immunization.performer.actor</b><br> 4410 * </p> 4411 */ 4412 @SearchParamDefinition(name = "performer", path = "Immunization.performer.actor", description = "The practitioner or organization who played a role in the vaccination", type = "reference", providesMembershipIn = { 4413 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Practitioner") }, target = { Organization.class, 4414 Practitioner.class, PractitionerRole.class }) 4415 public static final String SP_PERFORMER = "performer"; 4416 /** 4417 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 4418 * <p> 4419 * Description: <b>The practitioner or organization who played a role in the 4420 * vaccination</b><br> 4421 * Type: <b>reference</b><br> 4422 * Path: <b>Immunization.performer.actor</b><br> 4423 * </p> 4424 */ 4425 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4426 SP_PERFORMER); 4427 4428 /** 4429 * Constant for fluent queries to be used to add include statements. Specifies 4430 * the path value of "<b>Immunization:performer</b>". 4431 */ 4432 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include( 4433 "Immunization:performer").toLocked(); 4434 4435 /** 4436 * Search parameter: <b>reaction</b> 4437 * <p> 4438 * Description: <b>Additional information on reaction</b><br> 4439 * Type: <b>reference</b><br> 4440 * Path: <b>Immunization.reaction.detail</b><br> 4441 * </p> 4442 */ 4443 @SearchParamDefinition(name = "reaction", path = "Immunization.reaction.detail", description = "Additional information on reaction", type = "reference", target = { 4444 Observation.class }) 4445 public static final String SP_REACTION = "reaction"; 4446 /** 4447 * <b>Fluent Client</b> search parameter constant for <b>reaction</b> 4448 * <p> 4449 * Description: <b>Additional information on reaction</b><br> 4450 * Type: <b>reference</b><br> 4451 * Path: <b>Immunization.reaction.detail</b><br> 4452 * </p> 4453 */ 4454 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REACTION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4455 SP_REACTION); 4456 4457 /** 4458 * Constant for fluent queries to be used to add include statements. Specifies 4459 * the path value of "<b>Immunization:reaction</b>". 4460 */ 4461 public static final ca.uhn.fhir.model.api.Include INCLUDE_REACTION = new ca.uhn.fhir.model.api.Include( 4462 "Immunization:reaction").toLocked(); 4463 4464 /** 4465 * Search parameter: <b>lot-number</b> 4466 * <p> 4467 * Description: <b>Vaccine Lot Number</b><br> 4468 * Type: <b>string</b><br> 4469 * Path: <b>Immunization.lotNumber</b><br> 4470 * </p> 4471 */ 4472 @SearchParamDefinition(name = "lot-number", path = "Immunization.lotNumber", description = "Vaccine Lot Number", type = "string") 4473 public static final String SP_LOT_NUMBER = "lot-number"; 4474 /** 4475 * <b>Fluent Client</b> search parameter constant for <b>lot-number</b> 4476 * <p> 4477 * Description: <b>Vaccine Lot Number</b><br> 4478 * Type: <b>string</b><br> 4479 * Path: <b>Immunization.lotNumber</b><br> 4480 * </p> 4481 */ 4482 public static final ca.uhn.fhir.rest.gclient.StringClientParam LOT_NUMBER = new ca.uhn.fhir.rest.gclient.StringClientParam( 4483 SP_LOT_NUMBER); 4484 4485 /** 4486 * Search parameter: <b>status-reason</b> 4487 * <p> 4488 * Description: <b>Reason why the vaccine was not administered</b><br> 4489 * Type: <b>token</b><br> 4490 * Path: <b>Immunization.statusReason</b><br> 4491 * </p> 4492 */ 4493 @SearchParamDefinition(name = "status-reason", path = "Immunization.statusReason", description = "Reason why the vaccine was not administered", type = "token") 4494 public static final String SP_STATUS_REASON = "status-reason"; 4495 /** 4496 * <b>Fluent Client</b> search parameter constant for <b>status-reason</b> 4497 * <p> 4498 * Description: <b>Reason why the vaccine was not administered</b><br> 4499 * Type: <b>token</b><br> 4500 * Path: <b>Immunization.statusReason</b><br> 4501 * </p> 4502 */ 4503 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4504 SP_STATUS_REASON); 4505 4506 /** 4507 * Search parameter: <b>reason-code</b> 4508 * <p> 4509 * Description: <b>Reason why the vaccine was administered</b><br> 4510 * Type: <b>token</b><br> 4511 * Path: <b>Immunization.reasonCode</b><br> 4512 * </p> 4513 */ 4514 @SearchParamDefinition(name = "reason-code", path = "Immunization.reasonCode", description = "Reason why the vaccine was administered", type = "token") 4515 public static final String SP_REASON_CODE = "reason-code"; 4516 /** 4517 * <b>Fluent Client</b> search parameter constant for <b>reason-code</b> 4518 * <p> 4519 * Description: <b>Reason why the vaccine was administered</b><br> 4520 * Type: <b>token</b><br> 4521 * Path: <b>Immunization.reasonCode</b><br> 4522 * </p> 4523 */ 4524 public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4525 SP_REASON_CODE); 4526 4527 /** 4528 * Search parameter: <b>manufacturer</b> 4529 * <p> 4530 * Description: <b>Vaccine Manufacturer</b><br> 4531 * Type: <b>reference</b><br> 4532 * Path: <b>Immunization.manufacturer</b><br> 4533 * </p> 4534 */ 4535 @SearchParamDefinition(name = "manufacturer", path = "Immunization.manufacturer", description = "Vaccine Manufacturer", type = "reference", target = { 4536 Organization.class }) 4537 public static final String SP_MANUFACTURER = "manufacturer"; 4538 /** 4539 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 4540 * <p> 4541 * Description: <b>Vaccine Manufacturer</b><br> 4542 * Type: <b>reference</b><br> 4543 * Path: <b>Immunization.manufacturer</b><br> 4544 * </p> 4545 */ 4546 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4547 SP_MANUFACTURER); 4548 4549 /** 4550 * Constant for fluent queries to be used to add include statements. Specifies 4551 * the path value of "<b>Immunization:manufacturer</b>". 4552 */ 4553 public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER = new ca.uhn.fhir.model.api.Include( 4554 "Immunization:manufacturer").toLocked(); 4555 4556 /** 4557 * Search parameter: <b>target-disease</b> 4558 * <p> 4559 * Description: <b>The target disease the dose is being administered 4560 * against</b><br> 4561 * Type: <b>token</b><br> 4562 * Path: <b>Immunization.protocolApplied.targetDisease</b><br> 4563 * </p> 4564 */ 4565 @SearchParamDefinition(name = "target-disease", path = "Immunization.protocolApplied.targetDisease", description = "The target disease the dose is being administered against", type = "token") 4566 public static final String SP_TARGET_DISEASE = "target-disease"; 4567 /** 4568 * <b>Fluent Client</b> search parameter constant for <b>target-disease</b> 4569 * <p> 4570 * Description: <b>The target disease the dose is being administered 4571 * against</b><br> 4572 * Type: <b>token</b><br> 4573 * Path: <b>Immunization.protocolApplied.targetDisease</b><br> 4574 * </p> 4575 */ 4576 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4577 SP_TARGET_DISEASE); 4578 4579 /** 4580 * Search parameter: <b>patient</b> 4581 * <p> 4582 * Description: <b>The patient for the vaccination record</b><br> 4583 * Type: <b>reference</b><br> 4584 * Path: <b>Immunization.patient</b><br> 4585 * </p> 4586 */ 4587 @SearchParamDefinition(name = "patient", path = "Immunization.patient", description = "The patient for the vaccination record", type = "reference", providesMembershipIn = { 4588 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Patient") }, target = { Patient.class }) 4589 public static final String SP_PATIENT = "patient"; 4590 /** 4591 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4592 * <p> 4593 * Description: <b>The patient for the vaccination record</b><br> 4594 * Type: <b>reference</b><br> 4595 * Path: <b>Immunization.patient</b><br> 4596 * </p> 4597 */ 4598 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4599 SP_PATIENT); 4600 4601 /** 4602 * Constant for fluent queries to be used to add include statements. Specifies 4603 * the path value of "<b>Immunization:patient</b>". 4604 */ 4605 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include( 4606 "Immunization:patient").toLocked(); 4607 4608 /** 4609 * Search parameter: <b>series</b> 4610 * <p> 4611 * Description: <b>The series being followed by the provider</b><br> 4612 * Type: <b>string</b><br> 4613 * Path: <b>Immunization.protocolApplied.series</b><br> 4614 * </p> 4615 */ 4616 @SearchParamDefinition(name = "series", path = "Immunization.protocolApplied.series", description = "The series being followed by the provider", type = "string") 4617 public static final String SP_SERIES = "series"; 4618 /** 4619 * <b>Fluent Client</b> search parameter constant for <b>series</b> 4620 * <p> 4621 * Description: <b>The series being followed by the provider</b><br> 4622 * Type: <b>string</b><br> 4623 * Path: <b>Immunization.protocolApplied.series</b><br> 4624 * </p> 4625 */ 4626 public static final ca.uhn.fhir.rest.gclient.StringClientParam SERIES = new ca.uhn.fhir.rest.gclient.StringClientParam( 4627 SP_SERIES); 4628 4629 /** 4630 * Search parameter: <b>vaccine-code</b> 4631 * <p> 4632 * Description: <b>Vaccine Product Administered</b><br> 4633 * Type: <b>token</b><br> 4634 * Path: <b>Immunization.vaccineCode</b><br> 4635 * </p> 4636 */ 4637 @SearchParamDefinition(name = "vaccine-code", path = "Immunization.vaccineCode", description = "Vaccine Product Administered", type = "token") 4638 public static final String SP_VACCINE_CODE = "vaccine-code"; 4639 /** 4640 * <b>Fluent Client</b> search parameter constant for <b>vaccine-code</b> 4641 * <p> 4642 * Description: <b>Vaccine Product Administered</b><br> 4643 * Type: <b>token</b><br> 4644 * Path: <b>Immunization.vaccineCode</b><br> 4645 * </p> 4646 */ 4647 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VACCINE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4648 SP_VACCINE_CODE); 4649 4650 /** 4651 * Search parameter: <b>reason-reference</b> 4652 * <p> 4653 * Description: <b>Why immunization occurred</b><br> 4654 * Type: <b>reference</b><br> 4655 * Path: <b>Immunization.reasonReference</b><br> 4656 * </p> 4657 */ 4658 @SearchParamDefinition(name = "reason-reference", path = "Immunization.reasonReference", description = "Why immunization occurred", type = "reference", target = { 4659 Condition.class, DiagnosticReport.class, Observation.class }) 4660 public static final String SP_REASON_REFERENCE = "reason-reference"; 4661 /** 4662 * <b>Fluent Client</b> search parameter constant for <b>reason-reference</b> 4663 * <p> 4664 * Description: <b>Why immunization occurred</b><br> 4665 * Type: <b>reference</b><br> 4666 * Path: <b>Immunization.reasonReference</b><br> 4667 * </p> 4668 */ 4669 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4670 SP_REASON_REFERENCE); 4671 4672 /** 4673 * Constant for fluent queries to be used to add include statements. Specifies 4674 * the path value of "<b>Immunization:reason-reference</b>". 4675 */ 4676 public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include( 4677 "Immunization:reason-reference").toLocked(); 4678 4679 /** 4680 * Search parameter: <b>location</b> 4681 * <p> 4682 * Description: <b>The service delivery location or facility in which the 4683 * vaccine was / was to be administered</b><br> 4684 * Type: <b>reference</b><br> 4685 * Path: <b>Immunization.location</b><br> 4686 * </p> 4687 */ 4688 @SearchParamDefinition(name = "location", path = "Immunization.location", description = "The service delivery location or facility in which the vaccine was / was to be administered", type = "reference", target = { 4689 Location.class }) 4690 public static final String SP_LOCATION = "location"; 4691 /** 4692 * <b>Fluent Client</b> search parameter constant for <b>location</b> 4693 * <p> 4694 * Description: <b>The service delivery location or facility in which the 4695 * vaccine was / was to be administered</b><br> 4696 * Type: <b>reference</b><br> 4697 * Path: <b>Immunization.location</b><br> 4698 * </p> 4699 */ 4700 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4701 SP_LOCATION); 4702 4703 /** 4704 * Constant for fluent queries to be used to add include statements. Specifies 4705 * the path value of "<b>Immunization:location</b>". 4706 */ 4707 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include( 4708 "Immunization:location").toLocked(); 4709 4710 /** 4711 * Search parameter: <b>status</b> 4712 * <p> 4713 * Description: <b>Immunization event status</b><br> 4714 * Type: <b>token</b><br> 4715 * Path: <b>Immunization.status</b><br> 4716 * </p> 4717 */ 4718 @SearchParamDefinition(name = "status", path = "Immunization.status", description = "Immunization event status", type = "token") 4719 public static final String SP_STATUS = "status"; 4720 /** 4721 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4722 * <p> 4723 * Description: <b>Immunization event status</b><br> 4724 * Type: <b>token</b><br> 4725 * Path: <b>Immunization.status</b><br> 4726 * </p> 4727 */ 4728 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4729 SP_STATUS); 4730 4731 /** 4732 * Search parameter: <b>reaction-date</b> 4733 * <p> 4734 * Description: <b>When reaction started</b><br> 4735 * Type: <b>date</b><br> 4736 * Path: <b>Immunization.reaction.date</b><br> 4737 * </p> 4738 */ 4739 @SearchParamDefinition(name = "reaction-date", path = "Immunization.reaction.date", description = "When reaction started", type = "date") 4740 public static final String SP_REACTION_DATE = "reaction-date"; 4741 /** 4742 * <b>Fluent Client</b> search parameter constant for <b>reaction-date</b> 4743 * <p> 4744 * Description: <b>When reaction started</b><br> 4745 * Type: <b>date</b><br> 4746 * Path: <b>Immunization.reaction.date</b><br> 4747 * </p> 4748 */ 4749 public static final ca.uhn.fhir.rest.gclient.DateClientParam REACTION_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 4750 SP_REACTION_DATE); 4751 4752}