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