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