001package org.hl7.fhir.dstu3.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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. 048 */ 049@ResourceDef(name="ImmunizationRecommendation", profile="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation") 050public class ImmunizationRecommendation extends DomainResource { 051 052 @Block() 053 public static class ImmunizationRecommendationRecommendationComponent extends BackboneElement implements IBaseBackboneElement { 054 /** 055 * The date the immunization recommendation was created. 056 */ 057 @Child(name = "date", type = {DateTimeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 058 @Description(shortDefinition="Date recommendation created", formalDefinition="The date the immunization recommendation was created." ) 059 protected DateTimeType date; 060 061 /** 062 * Vaccine that pertains to the recommendation. 063 */ 064 @Child(name = "vaccineCode", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 065 @Description(shortDefinition="Vaccine recommendation applies to", formalDefinition="Vaccine that pertains to the recommendation." ) 066 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vaccine-code") 067 protected CodeableConcept vaccineCode; 068 069 /** 070 * The targeted disease for the recommendation. 071 */ 072 @Child(name = "targetDisease", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 073 @Description(shortDefinition="Disease to be immunized against", formalDefinition="The targeted disease for the recommendation." ) 074 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease") 075 protected CodeableConcept targetDisease; 076 077 /** 078 * The next recommended dose number (e.g. dose 2 is the next recommended dose). 079 */ 080 @Child(name = "doseNumber", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=true) 081 @Description(shortDefinition="Recommended dose number", formalDefinition="The next recommended dose number (e.g. dose 2 is the next recommended dose)." ) 082 protected PositiveIntType doseNumber; 083 084 /** 085 * Vaccine administration status. 086 */ 087 @Child(name = "forecastStatus", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true) 088 @Description(shortDefinition="Vaccine administration status", formalDefinition="Vaccine administration status." ) 089 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-recommendation-status") 090 protected CodeableConcept forecastStatus; 091 092 /** 093 * Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc. 094 */ 095 @Child(name = "dateCriterion", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 096 @Description(shortDefinition="Dates governing proposed immunization", formalDefinition="Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc." ) 097 protected List<ImmunizationRecommendationRecommendationDateCriterionComponent> dateCriterion; 098 099 /** 100 * Contains information about the protocol under which the vaccine was administered. 101 */ 102 @Child(name = "protocol", type = {}, order=7, min=0, max=1, modifier=false, summary=false) 103 @Description(shortDefinition="Protocol used by recommendation", formalDefinition="Contains information about the protocol under which the vaccine was administered." ) 104 protected ImmunizationRecommendationRecommendationProtocolComponent protocol; 105 106 /** 107 * Immunization event history that supports the status and recommendation. 108 */ 109 @Child(name = "supportingImmunization", type = {Immunization.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 110 @Description(shortDefinition="Past immunizations supporting recommendation", formalDefinition="Immunization event history that supports the status and recommendation." ) 111 protected List<Reference> supportingImmunization; 112 /** 113 * The actual objects that are the target of the reference (Immunization event history that supports the status and recommendation.) 114 */ 115 protected List<Immunization> supportingImmunizationTarget; 116 117 118 /** 119 * Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information. 120 */ 121 @Child(name = "supportingPatientInformation", type = {Observation.class, AllergyIntolerance.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 122 @Description(shortDefinition="Patient observations supporting recommendation", formalDefinition="Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information." ) 123 protected List<Reference> supportingPatientInformation; 124 /** 125 * The actual objects that are the target of the reference (Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) 126 */ 127 protected List<Resource> supportingPatientInformationTarget; 128 129 130 private static final long serialVersionUID = 1279700888L; 131 132 /** 133 * Constructor 134 */ 135 public ImmunizationRecommendationRecommendationComponent() { 136 super(); 137 } 138 139 /** 140 * Constructor 141 */ 142 public ImmunizationRecommendationRecommendationComponent(DateTimeType date, CodeableConcept forecastStatus) { 143 super(); 144 this.date = date; 145 this.forecastStatus = forecastStatus; 146 } 147 148 /** 149 * @return {@link #date} (The date the immunization recommendation was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 150 */ 151 public DateTimeType getDateElement() { 152 if (this.date == null) 153 if (Configuration.errorOnAutoCreate()) 154 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.date"); 155 else if (Configuration.doAutoCreate()) 156 this.date = new DateTimeType(); // bb 157 return this.date; 158 } 159 160 public boolean hasDateElement() { 161 return this.date != null && !this.date.isEmpty(); 162 } 163 164 public boolean hasDate() { 165 return this.date != null && !this.date.isEmpty(); 166 } 167 168 /** 169 * @param value {@link #date} (The date the immunization recommendation was created.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 170 */ 171 public ImmunizationRecommendationRecommendationComponent setDateElement(DateTimeType value) { 172 this.date = value; 173 return this; 174 } 175 176 /** 177 * @return The date the immunization recommendation was created. 178 */ 179 public Date getDate() { 180 return this.date == null ? null : this.date.getValue(); 181 } 182 183 /** 184 * @param value The date the immunization recommendation was created. 185 */ 186 public ImmunizationRecommendationRecommendationComponent setDate(Date value) { 187 if (this.date == null) 188 this.date = new DateTimeType(); 189 this.date.setValue(value); 190 return this; 191 } 192 193 /** 194 * @return {@link #vaccineCode} (Vaccine that pertains to the recommendation.) 195 */ 196 public CodeableConcept getVaccineCode() { 197 if (this.vaccineCode == null) 198 if (Configuration.errorOnAutoCreate()) 199 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.vaccineCode"); 200 else if (Configuration.doAutoCreate()) 201 this.vaccineCode = new CodeableConcept(); // cc 202 return this.vaccineCode; 203 } 204 205 public boolean hasVaccineCode() { 206 return this.vaccineCode != null && !this.vaccineCode.isEmpty(); 207 } 208 209 /** 210 * @param value {@link #vaccineCode} (Vaccine that pertains to the recommendation.) 211 */ 212 public ImmunizationRecommendationRecommendationComponent setVaccineCode(CodeableConcept value) { 213 this.vaccineCode = value; 214 return this; 215 } 216 217 /** 218 * @return {@link #targetDisease} (The targeted disease for the recommendation.) 219 */ 220 public CodeableConcept getTargetDisease() { 221 if (this.targetDisease == null) 222 if (Configuration.errorOnAutoCreate()) 223 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.targetDisease"); 224 else if (Configuration.doAutoCreate()) 225 this.targetDisease = new CodeableConcept(); // cc 226 return this.targetDisease; 227 } 228 229 public boolean hasTargetDisease() { 230 return this.targetDisease != null && !this.targetDisease.isEmpty(); 231 } 232 233 /** 234 * @param value {@link #targetDisease} (The targeted disease for the recommendation.) 235 */ 236 public ImmunizationRecommendationRecommendationComponent setTargetDisease(CodeableConcept value) { 237 this.targetDisease = value; 238 return this; 239 } 240 241 /** 242 * @return {@link #doseNumber} (The next recommended dose number (e.g. dose 2 is the next recommended dose).). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value 243 */ 244 public PositiveIntType getDoseNumberElement() { 245 if (this.doseNumber == null) 246 if (Configuration.errorOnAutoCreate()) 247 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.doseNumber"); 248 else if (Configuration.doAutoCreate()) 249 this.doseNumber = new PositiveIntType(); // bb 250 return this.doseNumber; 251 } 252 253 public boolean hasDoseNumberElement() { 254 return this.doseNumber != null && !this.doseNumber.isEmpty(); 255 } 256 257 public boolean hasDoseNumber() { 258 return this.doseNumber != null && !this.doseNumber.isEmpty(); 259 } 260 261 /** 262 * @param value {@link #doseNumber} (The next recommended dose number (e.g. dose 2 is the next recommended dose).). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value 263 */ 264 public ImmunizationRecommendationRecommendationComponent setDoseNumberElement(PositiveIntType value) { 265 this.doseNumber = value; 266 return this; 267 } 268 269 /** 270 * @return The next recommended dose number (e.g. dose 2 is the next recommended dose). 271 */ 272 public int getDoseNumber() { 273 return this.doseNumber == null || this.doseNumber.isEmpty() ? 0 : this.doseNumber.getValue(); 274 } 275 276 /** 277 * @param value The next recommended dose number (e.g. dose 2 is the next recommended dose). 278 */ 279 public ImmunizationRecommendationRecommendationComponent setDoseNumber(int value) { 280 if (this.doseNumber == null) 281 this.doseNumber = new PositiveIntType(); 282 this.doseNumber.setValue(value); 283 return this; 284 } 285 286 /** 287 * @return {@link #forecastStatus} (Vaccine administration status.) 288 */ 289 public CodeableConcept getForecastStatus() { 290 if (this.forecastStatus == null) 291 if (Configuration.errorOnAutoCreate()) 292 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.forecastStatus"); 293 else if (Configuration.doAutoCreate()) 294 this.forecastStatus = new CodeableConcept(); // cc 295 return this.forecastStatus; 296 } 297 298 public boolean hasForecastStatus() { 299 return this.forecastStatus != null && !this.forecastStatus.isEmpty(); 300 } 301 302 /** 303 * @param value {@link #forecastStatus} (Vaccine administration status.) 304 */ 305 public ImmunizationRecommendationRecommendationComponent setForecastStatus(CodeableConcept value) { 306 this.forecastStatus = value; 307 return this; 308 } 309 310 /** 311 * @return {@link #dateCriterion} (Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.) 312 */ 313 public List<ImmunizationRecommendationRecommendationDateCriterionComponent> getDateCriterion() { 314 if (this.dateCriterion == null) 315 this.dateCriterion = new ArrayList<ImmunizationRecommendationRecommendationDateCriterionComponent>(); 316 return this.dateCriterion; 317 } 318 319 /** 320 * @return Returns a reference to <code>this</code> for easy method chaining 321 */ 322 public ImmunizationRecommendationRecommendationComponent setDateCriterion(List<ImmunizationRecommendationRecommendationDateCriterionComponent> theDateCriterion) { 323 this.dateCriterion = theDateCriterion; 324 return this; 325 } 326 327 public boolean hasDateCriterion() { 328 if (this.dateCriterion == null) 329 return false; 330 for (ImmunizationRecommendationRecommendationDateCriterionComponent item : this.dateCriterion) 331 if (!item.isEmpty()) 332 return true; 333 return false; 334 } 335 336 public ImmunizationRecommendationRecommendationDateCriterionComponent addDateCriterion() { //3 337 ImmunizationRecommendationRecommendationDateCriterionComponent t = new ImmunizationRecommendationRecommendationDateCriterionComponent(); 338 if (this.dateCriterion == null) 339 this.dateCriterion = new ArrayList<ImmunizationRecommendationRecommendationDateCriterionComponent>(); 340 this.dateCriterion.add(t); 341 return t; 342 } 343 344 public ImmunizationRecommendationRecommendationComponent addDateCriterion(ImmunizationRecommendationRecommendationDateCriterionComponent t) { //3 345 if (t == null) 346 return this; 347 if (this.dateCriterion == null) 348 this.dateCriterion = new ArrayList<ImmunizationRecommendationRecommendationDateCriterionComponent>(); 349 this.dateCriterion.add(t); 350 return this; 351 } 352 353 /** 354 * @return The first repetition of repeating field {@link #dateCriterion}, creating it if it does not already exist 355 */ 356 public ImmunizationRecommendationRecommendationDateCriterionComponent getDateCriterionFirstRep() { 357 if (getDateCriterion().isEmpty()) { 358 addDateCriterion(); 359 } 360 return getDateCriterion().get(0); 361 } 362 363 /** 364 * @return {@link #protocol} (Contains information about the protocol under which the vaccine was administered.) 365 */ 366 public ImmunizationRecommendationRecommendationProtocolComponent getProtocol() { 367 if (this.protocol == null) 368 if (Configuration.errorOnAutoCreate()) 369 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.protocol"); 370 else if (Configuration.doAutoCreate()) 371 this.protocol = new ImmunizationRecommendationRecommendationProtocolComponent(); // cc 372 return this.protocol; 373 } 374 375 public boolean hasProtocol() { 376 return this.protocol != null && !this.protocol.isEmpty(); 377 } 378 379 /** 380 * @param value {@link #protocol} (Contains information about the protocol under which the vaccine was administered.) 381 */ 382 public ImmunizationRecommendationRecommendationComponent setProtocol(ImmunizationRecommendationRecommendationProtocolComponent value) { 383 this.protocol = value; 384 return this; 385 } 386 387 /** 388 * @return {@link #supportingImmunization} (Immunization event history that supports the status and recommendation.) 389 */ 390 public List<Reference> getSupportingImmunization() { 391 if (this.supportingImmunization == null) 392 this.supportingImmunization = new ArrayList<Reference>(); 393 return this.supportingImmunization; 394 } 395 396 /** 397 * @return Returns a reference to <code>this</code> for easy method chaining 398 */ 399 public ImmunizationRecommendationRecommendationComponent setSupportingImmunization(List<Reference> theSupportingImmunization) { 400 this.supportingImmunization = theSupportingImmunization; 401 return this; 402 } 403 404 public boolean hasSupportingImmunization() { 405 if (this.supportingImmunization == null) 406 return false; 407 for (Reference item : this.supportingImmunization) 408 if (!item.isEmpty()) 409 return true; 410 return false; 411 } 412 413 public Reference addSupportingImmunization() { //3 414 Reference t = new Reference(); 415 if (this.supportingImmunization == null) 416 this.supportingImmunization = new ArrayList<Reference>(); 417 this.supportingImmunization.add(t); 418 return t; 419 } 420 421 public ImmunizationRecommendationRecommendationComponent addSupportingImmunization(Reference t) { //3 422 if (t == null) 423 return this; 424 if (this.supportingImmunization == null) 425 this.supportingImmunization = new ArrayList<Reference>(); 426 this.supportingImmunization.add(t); 427 return this; 428 } 429 430 /** 431 * @return The first repetition of repeating field {@link #supportingImmunization}, creating it if it does not already exist 432 */ 433 public Reference getSupportingImmunizationFirstRep() { 434 if (getSupportingImmunization().isEmpty()) { 435 addSupportingImmunization(); 436 } 437 return getSupportingImmunization().get(0); 438 } 439 440 /** 441 * @deprecated Use Reference#setResource(IBaseResource) instead 442 */ 443 @Deprecated 444 public List<Immunization> getSupportingImmunizationTarget() { 445 if (this.supportingImmunizationTarget == null) 446 this.supportingImmunizationTarget = new ArrayList<Immunization>(); 447 return this.supportingImmunizationTarget; 448 } 449 450 /** 451 * @deprecated Use Reference#setResource(IBaseResource) instead 452 */ 453 @Deprecated 454 public Immunization addSupportingImmunizationTarget() { 455 Immunization r = new Immunization(); 456 if (this.supportingImmunizationTarget == null) 457 this.supportingImmunizationTarget = new ArrayList<Immunization>(); 458 this.supportingImmunizationTarget.add(r); 459 return r; 460 } 461 462 /** 463 * @return {@link #supportingPatientInformation} (Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.) 464 */ 465 public List<Reference> getSupportingPatientInformation() { 466 if (this.supportingPatientInformation == null) 467 this.supportingPatientInformation = new ArrayList<Reference>(); 468 return this.supportingPatientInformation; 469 } 470 471 /** 472 * @return Returns a reference to <code>this</code> for easy method chaining 473 */ 474 public ImmunizationRecommendationRecommendationComponent setSupportingPatientInformation(List<Reference> theSupportingPatientInformation) { 475 this.supportingPatientInformation = theSupportingPatientInformation; 476 return this; 477 } 478 479 public boolean hasSupportingPatientInformation() { 480 if (this.supportingPatientInformation == null) 481 return false; 482 for (Reference item : this.supportingPatientInformation) 483 if (!item.isEmpty()) 484 return true; 485 return false; 486 } 487 488 public Reference addSupportingPatientInformation() { //3 489 Reference t = new Reference(); 490 if (this.supportingPatientInformation == null) 491 this.supportingPatientInformation = new ArrayList<Reference>(); 492 this.supportingPatientInformation.add(t); 493 return t; 494 } 495 496 public ImmunizationRecommendationRecommendationComponent addSupportingPatientInformation(Reference t) { //3 497 if (t == null) 498 return this; 499 if (this.supportingPatientInformation == null) 500 this.supportingPatientInformation = new ArrayList<Reference>(); 501 this.supportingPatientInformation.add(t); 502 return this; 503 } 504 505 /** 506 * @return The first repetition of repeating field {@link #supportingPatientInformation}, creating it if it does not already exist 507 */ 508 public Reference getSupportingPatientInformationFirstRep() { 509 if (getSupportingPatientInformation().isEmpty()) { 510 addSupportingPatientInformation(); 511 } 512 return getSupportingPatientInformation().get(0); 513 } 514 515 /** 516 * @deprecated Use Reference#setResource(IBaseResource) instead 517 */ 518 @Deprecated 519 public List<Resource> getSupportingPatientInformationTarget() { 520 if (this.supportingPatientInformationTarget == null) 521 this.supportingPatientInformationTarget = new ArrayList<Resource>(); 522 return this.supportingPatientInformationTarget; 523 } 524 525 protected void listChildren(List<Property> children) { 526 super.listChildren(children); 527 children.add(new Property("date", "dateTime", "The date the immunization recommendation was created.", 0, 1, date)); 528 children.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that pertains to the recommendation.", 0, 1, vaccineCode)); 529 children.add(new Property("targetDisease", "CodeableConcept", "The targeted disease for the recommendation.", 0, 1, targetDisease)); 530 children.add(new Property("doseNumber", "positiveInt", "The next recommended dose number (e.g. dose 2 is the next recommended dose).", 0, 1, doseNumber)); 531 children.add(new Property("forecastStatus", "CodeableConcept", "Vaccine administration status.", 0, 1, forecastStatus)); 532 children.add(new Property("dateCriterion", "", "Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.", 0, java.lang.Integer.MAX_VALUE, dateCriterion)); 533 children.add(new Property("protocol", "", "Contains information about the protocol under which the vaccine was administered.", 0, 1, protocol)); 534 children.add(new Property("supportingImmunization", "Reference(Immunization)", "Immunization event history that supports the status and recommendation.", 0, java.lang.Integer.MAX_VALUE, supportingImmunization)); 535 children.add(new Property("supportingPatientInformation", "Reference(Observation|AllergyIntolerance)", "Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.", 0, java.lang.Integer.MAX_VALUE, supportingPatientInformation)); 536 } 537 538 @Override 539 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 540 switch (_hash) { 541 case 3076014: /*date*/ return new Property("date", "dateTime", "The date the immunization recommendation was created.", 0, 1, date); 542 case 664556354: /*vaccineCode*/ return new Property("vaccineCode", "CodeableConcept", "Vaccine that pertains to the recommendation.", 0, 1, vaccineCode); 543 case -319593813: /*targetDisease*/ return new Property("targetDisease", "CodeableConcept", "The targeted disease for the recommendation.", 0, 1, targetDisease); 544 case -887709242: /*doseNumber*/ return new Property("doseNumber", "positiveInt", "The next recommended dose number (e.g. dose 2 is the next recommended dose).", 0, 1, doseNumber); 545 case 1904598477: /*forecastStatus*/ return new Property("forecastStatus", "CodeableConcept", "Vaccine administration status.", 0, 1, forecastStatus); 546 case 2087518867: /*dateCriterion*/ return new Property("dateCriterion", "", "Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.", 0, java.lang.Integer.MAX_VALUE, dateCriterion); 547 case -989163880: /*protocol*/ return new Property("protocol", "", "Contains information about the protocol under which the vaccine was administered.", 0, 1, protocol); 548 case 1171592021: /*supportingImmunization*/ return new Property("supportingImmunization", "Reference(Immunization)", "Immunization event history that supports the status and recommendation.", 0, java.lang.Integer.MAX_VALUE, supportingImmunization); 549 case -1234160646: /*supportingPatientInformation*/ return new Property("supportingPatientInformation", "Reference(Observation|AllergyIntolerance)", "Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.", 0, java.lang.Integer.MAX_VALUE, supportingPatientInformation); 550 default: return super.getNamedProperty(_hash, _name, _checkValid); 551 } 552 553 } 554 555 @Override 556 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 557 switch (hash) { 558 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 559 case 664556354: /*vaccineCode*/ return this.vaccineCode == null ? new Base[0] : new Base[] {this.vaccineCode}; // CodeableConcept 560 case -319593813: /*targetDisease*/ return this.targetDisease == null ? new Base[0] : new Base[] {this.targetDisease}; // CodeableConcept 561 case -887709242: /*doseNumber*/ return this.doseNumber == null ? new Base[0] : new Base[] {this.doseNumber}; // PositiveIntType 562 case 1904598477: /*forecastStatus*/ return this.forecastStatus == null ? new Base[0] : new Base[] {this.forecastStatus}; // CodeableConcept 563 case 2087518867: /*dateCriterion*/ return this.dateCriterion == null ? new Base[0] : this.dateCriterion.toArray(new Base[this.dateCriterion.size()]); // ImmunizationRecommendationRecommendationDateCriterionComponent 564 case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : new Base[] {this.protocol}; // ImmunizationRecommendationRecommendationProtocolComponent 565 case 1171592021: /*supportingImmunization*/ return this.supportingImmunization == null ? new Base[0] : this.supportingImmunization.toArray(new Base[this.supportingImmunization.size()]); // Reference 566 case -1234160646: /*supportingPatientInformation*/ return this.supportingPatientInformation == null ? new Base[0] : this.supportingPatientInformation.toArray(new Base[this.supportingPatientInformation.size()]); // Reference 567 default: return super.getProperty(hash, name, checkValid); 568 } 569 570 } 571 572 @Override 573 public Base setProperty(int hash, String name, Base value) throws FHIRException { 574 switch (hash) { 575 case 3076014: // date 576 this.date = castToDateTime(value); // DateTimeType 577 return value; 578 case 664556354: // vaccineCode 579 this.vaccineCode = castToCodeableConcept(value); // CodeableConcept 580 return value; 581 case -319593813: // targetDisease 582 this.targetDisease = castToCodeableConcept(value); // CodeableConcept 583 return value; 584 case -887709242: // doseNumber 585 this.doseNumber = castToPositiveInt(value); // PositiveIntType 586 return value; 587 case 1904598477: // forecastStatus 588 this.forecastStatus = castToCodeableConcept(value); // CodeableConcept 589 return value; 590 case 2087518867: // dateCriterion 591 this.getDateCriterion().add((ImmunizationRecommendationRecommendationDateCriterionComponent) value); // ImmunizationRecommendationRecommendationDateCriterionComponent 592 return value; 593 case -989163880: // protocol 594 this.protocol = (ImmunizationRecommendationRecommendationProtocolComponent) value; // ImmunizationRecommendationRecommendationProtocolComponent 595 return value; 596 case 1171592021: // supportingImmunization 597 this.getSupportingImmunization().add(castToReference(value)); // Reference 598 return value; 599 case -1234160646: // supportingPatientInformation 600 this.getSupportingPatientInformation().add(castToReference(value)); // Reference 601 return value; 602 default: return super.setProperty(hash, name, value); 603 } 604 605 } 606 607 @Override 608 public Base setProperty(String name, Base value) throws FHIRException { 609 if (name.equals("date")) { 610 this.date = castToDateTime(value); // DateTimeType 611 } else if (name.equals("vaccineCode")) { 612 this.vaccineCode = castToCodeableConcept(value); // CodeableConcept 613 } else if (name.equals("targetDisease")) { 614 this.targetDisease = castToCodeableConcept(value); // CodeableConcept 615 } else if (name.equals("doseNumber")) { 616 this.doseNumber = castToPositiveInt(value); // PositiveIntType 617 } else if (name.equals("forecastStatus")) { 618 this.forecastStatus = castToCodeableConcept(value); // CodeableConcept 619 } else if (name.equals("dateCriterion")) { 620 this.getDateCriterion().add((ImmunizationRecommendationRecommendationDateCriterionComponent) value); 621 } else if (name.equals("protocol")) { 622 this.protocol = (ImmunizationRecommendationRecommendationProtocolComponent) value; // ImmunizationRecommendationRecommendationProtocolComponent 623 } else if (name.equals("supportingImmunization")) { 624 this.getSupportingImmunization().add(castToReference(value)); 625 } else if (name.equals("supportingPatientInformation")) { 626 this.getSupportingPatientInformation().add(castToReference(value)); 627 } else 628 return super.setProperty(name, value); 629 return value; 630 } 631 632 @Override 633 public Base makeProperty(int hash, String name) throws FHIRException { 634 switch (hash) { 635 case 3076014: return getDateElement(); 636 case 664556354: return getVaccineCode(); 637 case -319593813: return getTargetDisease(); 638 case -887709242: return getDoseNumberElement(); 639 case 1904598477: return getForecastStatus(); 640 case 2087518867: return addDateCriterion(); 641 case -989163880: return getProtocol(); 642 case 1171592021: return addSupportingImmunization(); 643 case -1234160646: return addSupportingPatientInformation(); 644 default: return super.makeProperty(hash, name); 645 } 646 647 } 648 649 @Override 650 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 651 switch (hash) { 652 case 3076014: /*date*/ return new String[] {"dateTime"}; 653 case 664556354: /*vaccineCode*/ return new String[] {"CodeableConcept"}; 654 case -319593813: /*targetDisease*/ return new String[] {"CodeableConcept"}; 655 case -887709242: /*doseNumber*/ return new String[] {"positiveInt"}; 656 case 1904598477: /*forecastStatus*/ return new String[] {"CodeableConcept"}; 657 case 2087518867: /*dateCriterion*/ return new String[] {}; 658 case -989163880: /*protocol*/ return new String[] {}; 659 case 1171592021: /*supportingImmunization*/ return new String[] {"Reference"}; 660 case -1234160646: /*supportingPatientInformation*/ return new String[] {"Reference"}; 661 default: return super.getTypesForProperty(hash, name); 662 } 663 664 } 665 666 @Override 667 public Base addChild(String name) throws FHIRException { 668 if (name.equals("date")) { 669 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.date"); 670 } 671 else if (name.equals("vaccineCode")) { 672 this.vaccineCode = new CodeableConcept(); 673 return this.vaccineCode; 674 } 675 else if (name.equals("targetDisease")) { 676 this.targetDisease = new CodeableConcept(); 677 return this.targetDisease; 678 } 679 else if (name.equals("doseNumber")) { 680 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.doseNumber"); 681 } 682 else if (name.equals("forecastStatus")) { 683 this.forecastStatus = new CodeableConcept(); 684 return this.forecastStatus; 685 } 686 else if (name.equals("dateCriterion")) { 687 return addDateCriterion(); 688 } 689 else if (name.equals("protocol")) { 690 this.protocol = new ImmunizationRecommendationRecommendationProtocolComponent(); 691 return this.protocol; 692 } 693 else if (name.equals("supportingImmunization")) { 694 return addSupportingImmunization(); 695 } 696 else if (name.equals("supportingPatientInformation")) { 697 return addSupportingPatientInformation(); 698 } 699 else 700 return super.addChild(name); 701 } 702 703 public ImmunizationRecommendationRecommendationComponent copy() { 704 ImmunizationRecommendationRecommendationComponent dst = new ImmunizationRecommendationRecommendationComponent(); 705 copyValues(dst); 706 dst.date = date == null ? null : date.copy(); 707 dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy(); 708 dst.targetDisease = targetDisease == null ? null : targetDisease.copy(); 709 dst.doseNumber = doseNumber == null ? null : doseNumber.copy(); 710 dst.forecastStatus = forecastStatus == null ? null : forecastStatus.copy(); 711 if (dateCriterion != null) { 712 dst.dateCriterion = new ArrayList<ImmunizationRecommendationRecommendationDateCriterionComponent>(); 713 for (ImmunizationRecommendationRecommendationDateCriterionComponent i : dateCriterion) 714 dst.dateCriterion.add(i.copy()); 715 }; 716 dst.protocol = protocol == null ? null : protocol.copy(); 717 if (supportingImmunization != null) { 718 dst.supportingImmunization = new ArrayList<Reference>(); 719 for (Reference i : supportingImmunization) 720 dst.supportingImmunization.add(i.copy()); 721 }; 722 if (supportingPatientInformation != null) { 723 dst.supportingPatientInformation = new ArrayList<Reference>(); 724 for (Reference i : supportingPatientInformation) 725 dst.supportingPatientInformation.add(i.copy()); 726 }; 727 return dst; 728 } 729 730 @Override 731 public boolean equalsDeep(Base other_) { 732 if (!super.equalsDeep(other_)) 733 return false; 734 if (!(other_ instanceof ImmunizationRecommendationRecommendationComponent)) 735 return false; 736 ImmunizationRecommendationRecommendationComponent o = (ImmunizationRecommendationRecommendationComponent) other_; 737 return compareDeep(date, o.date, true) && compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(targetDisease, o.targetDisease, true) 738 && compareDeep(doseNumber, o.doseNumber, true) && compareDeep(forecastStatus, o.forecastStatus, true) 739 && compareDeep(dateCriterion, o.dateCriterion, true) && compareDeep(protocol, o.protocol, true) 740 && compareDeep(supportingImmunization, o.supportingImmunization, true) && compareDeep(supportingPatientInformation, o.supportingPatientInformation, true) 741 ; 742 } 743 744 @Override 745 public boolean equalsShallow(Base other_) { 746 if (!super.equalsShallow(other_)) 747 return false; 748 if (!(other_ instanceof ImmunizationRecommendationRecommendationComponent)) 749 return false; 750 ImmunizationRecommendationRecommendationComponent o = (ImmunizationRecommendationRecommendationComponent) other_; 751 return compareValues(date, o.date, true) && compareValues(doseNumber, o.doseNumber, true); 752 } 753 754 public boolean isEmpty() { 755 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, vaccineCode, targetDisease 756 , doseNumber, forecastStatus, dateCriterion, protocol, supportingImmunization, supportingPatientInformation 757 ); 758 } 759 760 public String fhirType() { 761 return "ImmunizationRecommendation.recommendation"; 762 763 } 764 765 } 766 767 @Block() 768 public static class ImmunizationRecommendationRecommendationDateCriterionComponent extends BackboneElement implements IBaseBackboneElement { 769 /** 770 * Date classification of recommendation. For example, earliest date to give, latest date to give, etc. 771 */ 772 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 773 @Description(shortDefinition="Type of date", formalDefinition="Date classification of recommendation. For example, earliest date to give, latest date to give, etc." ) 774 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion") 775 protected CodeableConcept code; 776 777 /** 778 * The date whose meaning is specified by dateCriterion.code. 779 */ 780 @Child(name = "value", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 781 @Description(shortDefinition="Recommended date", formalDefinition="The date whose meaning is specified by dateCriterion.code." ) 782 protected DateTimeType value; 783 784 private static final long serialVersionUID = 1036994566L; 785 786 /** 787 * Constructor 788 */ 789 public ImmunizationRecommendationRecommendationDateCriterionComponent() { 790 super(); 791 } 792 793 /** 794 * Constructor 795 */ 796 public ImmunizationRecommendationRecommendationDateCriterionComponent(CodeableConcept code, DateTimeType value) { 797 super(); 798 this.code = code; 799 this.value = value; 800 } 801 802 /** 803 * @return {@link #code} (Date classification of recommendation. For example, earliest date to give, latest date to give, etc.) 804 */ 805 public CodeableConcept getCode() { 806 if (this.code == null) 807 if (Configuration.errorOnAutoCreate()) 808 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationDateCriterionComponent.code"); 809 else if (Configuration.doAutoCreate()) 810 this.code = new CodeableConcept(); // cc 811 return this.code; 812 } 813 814 public boolean hasCode() { 815 return this.code != null && !this.code.isEmpty(); 816 } 817 818 /** 819 * @param value {@link #code} (Date classification of recommendation. For example, earliest date to give, latest date to give, etc.) 820 */ 821 public ImmunizationRecommendationRecommendationDateCriterionComponent setCode(CodeableConcept value) { 822 this.code = value; 823 return this; 824 } 825 826 /** 827 * @return {@link #value} (The date whose meaning is specified by dateCriterion.code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 828 */ 829 public DateTimeType getValueElement() { 830 if (this.value == null) 831 if (Configuration.errorOnAutoCreate()) 832 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationDateCriterionComponent.value"); 833 else if (Configuration.doAutoCreate()) 834 this.value = new DateTimeType(); // bb 835 return this.value; 836 } 837 838 public boolean hasValueElement() { 839 return this.value != null && !this.value.isEmpty(); 840 } 841 842 public boolean hasValue() { 843 return this.value != null && !this.value.isEmpty(); 844 } 845 846 /** 847 * @param value {@link #value} (The date whose meaning is specified by dateCriterion.code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 848 */ 849 public ImmunizationRecommendationRecommendationDateCriterionComponent setValueElement(DateTimeType value) { 850 this.value = value; 851 return this; 852 } 853 854 /** 855 * @return The date whose meaning is specified by dateCriterion.code. 856 */ 857 public Date getValue() { 858 return this.value == null ? null : this.value.getValue(); 859 } 860 861 /** 862 * @param value The date whose meaning is specified by dateCriterion.code. 863 */ 864 public ImmunizationRecommendationRecommendationDateCriterionComponent setValue(Date value) { 865 if (this.value == null) 866 this.value = new DateTimeType(); 867 this.value.setValue(value); 868 return this; 869 } 870 871 protected void listChildren(List<Property> children) { 872 super.listChildren(children); 873 children.add(new Property("code", "CodeableConcept", "Date classification of recommendation. For example, earliest date to give, latest date to give, etc.", 0, 1, code)); 874 children.add(new Property("value", "dateTime", "The date whose meaning is specified by dateCriterion.code.", 0, 1, value)); 875 } 876 877 @Override 878 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 879 switch (_hash) { 880 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Date classification of recommendation. For example, earliest date to give, latest date to give, etc.", 0, 1, code); 881 case 111972721: /*value*/ return new Property("value", "dateTime", "The date whose meaning is specified by dateCriterion.code.", 0, 1, value); 882 default: return super.getNamedProperty(_hash, _name, _checkValid); 883 } 884 885 } 886 887 @Override 888 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 889 switch (hash) { 890 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 891 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DateTimeType 892 default: return super.getProperty(hash, name, checkValid); 893 } 894 895 } 896 897 @Override 898 public Base setProperty(int hash, String name, Base value) throws FHIRException { 899 switch (hash) { 900 case 3059181: // code 901 this.code = castToCodeableConcept(value); // CodeableConcept 902 return value; 903 case 111972721: // value 904 this.value = castToDateTime(value); // DateTimeType 905 return value; 906 default: return super.setProperty(hash, name, value); 907 } 908 909 } 910 911 @Override 912 public Base setProperty(String name, Base value) throws FHIRException { 913 if (name.equals("code")) { 914 this.code = castToCodeableConcept(value); // CodeableConcept 915 } else if (name.equals("value")) { 916 this.value = castToDateTime(value); // DateTimeType 917 } else 918 return super.setProperty(name, value); 919 return value; 920 } 921 922 @Override 923 public Base makeProperty(int hash, String name) throws FHIRException { 924 switch (hash) { 925 case 3059181: return getCode(); 926 case 111972721: return getValueElement(); 927 default: return super.makeProperty(hash, name); 928 } 929 930 } 931 932 @Override 933 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 934 switch (hash) { 935 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 936 case 111972721: /*value*/ return new String[] {"dateTime"}; 937 default: return super.getTypesForProperty(hash, name); 938 } 939 940 } 941 942 @Override 943 public Base addChild(String name) throws FHIRException { 944 if (name.equals("code")) { 945 this.code = new CodeableConcept(); 946 return this.code; 947 } 948 else if (name.equals("value")) { 949 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.value"); 950 } 951 else 952 return super.addChild(name); 953 } 954 955 public ImmunizationRecommendationRecommendationDateCriterionComponent copy() { 956 ImmunizationRecommendationRecommendationDateCriterionComponent dst = new ImmunizationRecommendationRecommendationDateCriterionComponent(); 957 copyValues(dst); 958 dst.code = code == null ? null : code.copy(); 959 dst.value = value == null ? null : value.copy(); 960 return dst; 961 } 962 963 @Override 964 public boolean equalsDeep(Base other_) { 965 if (!super.equalsDeep(other_)) 966 return false; 967 if (!(other_ instanceof ImmunizationRecommendationRecommendationDateCriterionComponent)) 968 return false; 969 ImmunizationRecommendationRecommendationDateCriterionComponent o = (ImmunizationRecommendationRecommendationDateCriterionComponent) other_; 970 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); 971 } 972 973 @Override 974 public boolean equalsShallow(Base other_) { 975 if (!super.equalsShallow(other_)) 976 return false; 977 if (!(other_ instanceof ImmunizationRecommendationRecommendationDateCriterionComponent)) 978 return false; 979 ImmunizationRecommendationRecommendationDateCriterionComponent o = (ImmunizationRecommendationRecommendationDateCriterionComponent) other_; 980 return compareValues(value, o.value, true); 981 } 982 983 public boolean isEmpty() { 984 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value); 985 } 986 987 public String fhirType() { 988 return "ImmunizationRecommendation.recommendation.dateCriterion"; 989 990 } 991 992 } 993 994 @Block() 995 public static class ImmunizationRecommendationRecommendationProtocolComponent extends BackboneElement implements IBaseBackboneElement { 996 /** 997 * Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. 998 */ 999 @Child(name = "doseSequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1000 @Description(shortDefinition="Dose number within sequence", formalDefinition="Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol." ) 1001 protected PositiveIntType doseSequence; 1002 1003 /** 1004 * Contains the description about the protocol under which the vaccine was administered. 1005 */ 1006 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1007 @Description(shortDefinition="Protocol details", formalDefinition="Contains the description about the protocol under which the vaccine was administered." ) 1008 protected StringType description; 1009 1010 /** 1011 * Indicates the authority who published the protocol. For example, ACIP. 1012 */ 1013 @Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 1014 @Description(shortDefinition="Who is responsible for protocol", formalDefinition="Indicates the authority who published the protocol. For example, ACIP." ) 1015 protected Reference authority; 1016 1017 /** 1018 * The actual object that is the target of the reference (Indicates the authority who published the protocol. For example, ACIP.) 1019 */ 1020 protected Organization authorityTarget; 1021 1022 /** 1023 * One possible path to achieve presumed immunity against a disease - within the context of an authority. 1024 */ 1025 @Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1026 @Description(shortDefinition="Name of vaccination series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." ) 1027 protected StringType series; 1028 1029 private static final long serialVersionUID = 215094970L; 1030 1031 /** 1032 * Constructor 1033 */ 1034 public ImmunizationRecommendationRecommendationProtocolComponent() { 1035 super(); 1036 } 1037 1038 /** 1039 * @return {@link #doseSequence} (Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value 1040 */ 1041 public PositiveIntType getDoseSequenceElement() { 1042 if (this.doseSequence == null) 1043 if (Configuration.errorOnAutoCreate()) 1044 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.doseSequence"); 1045 else if (Configuration.doAutoCreate()) 1046 this.doseSequence = new PositiveIntType(); // bb 1047 return this.doseSequence; 1048 } 1049 1050 public boolean hasDoseSequenceElement() { 1051 return this.doseSequence != null && !this.doseSequence.isEmpty(); 1052 } 1053 1054 public boolean hasDoseSequence() { 1055 return this.doseSequence != null && !this.doseSequence.isEmpty(); 1056 } 1057 1058 /** 1059 * @param value {@link #doseSequence} (Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.). This is the underlying object with id, value and extensions. The accessor "getDoseSequence" gives direct access to the value 1060 */ 1061 public ImmunizationRecommendationRecommendationProtocolComponent setDoseSequenceElement(PositiveIntType value) { 1062 this.doseSequence = value; 1063 return this; 1064 } 1065 1066 /** 1067 * @return Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. 1068 */ 1069 public int getDoseSequence() { 1070 return this.doseSequence == null || this.doseSequence.isEmpty() ? 0 : this.doseSequence.getValue(); 1071 } 1072 1073 /** 1074 * @param value Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol. 1075 */ 1076 public ImmunizationRecommendationRecommendationProtocolComponent setDoseSequence(int value) { 1077 if (this.doseSequence == null) 1078 this.doseSequence = new PositiveIntType(); 1079 this.doseSequence.setValue(value); 1080 return this; 1081 } 1082 1083 /** 1084 * @return {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1085 */ 1086 public StringType getDescriptionElement() { 1087 if (this.description == null) 1088 if (Configuration.errorOnAutoCreate()) 1089 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.description"); 1090 else if (Configuration.doAutoCreate()) 1091 this.description = new StringType(); // bb 1092 return this.description; 1093 } 1094 1095 public boolean hasDescriptionElement() { 1096 return this.description != null && !this.description.isEmpty(); 1097 } 1098 1099 public boolean hasDescription() { 1100 return this.description != null && !this.description.isEmpty(); 1101 } 1102 1103 /** 1104 * @param value {@link #description} (Contains the description about the protocol under which the vaccine was administered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1105 */ 1106 public ImmunizationRecommendationRecommendationProtocolComponent setDescriptionElement(StringType value) { 1107 this.description = value; 1108 return this; 1109 } 1110 1111 /** 1112 * @return Contains the description about the protocol under which the vaccine was administered. 1113 */ 1114 public String getDescription() { 1115 return this.description == null ? null : this.description.getValue(); 1116 } 1117 1118 /** 1119 * @param value Contains the description about the protocol under which the vaccine was administered. 1120 */ 1121 public ImmunizationRecommendationRecommendationProtocolComponent setDescription(String value) { 1122 if (Utilities.noString(value)) 1123 this.description = null; 1124 else { 1125 if (this.description == null) 1126 this.description = new StringType(); 1127 this.description.setValue(value); 1128 } 1129 return this; 1130 } 1131 1132 /** 1133 * @return {@link #authority} (Indicates the authority who published the protocol. For example, ACIP.) 1134 */ 1135 public Reference getAuthority() { 1136 if (this.authority == null) 1137 if (Configuration.errorOnAutoCreate()) 1138 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.authority"); 1139 else if (Configuration.doAutoCreate()) 1140 this.authority = new Reference(); // cc 1141 return this.authority; 1142 } 1143 1144 public boolean hasAuthority() { 1145 return this.authority != null && !this.authority.isEmpty(); 1146 } 1147 1148 /** 1149 * @param value {@link #authority} (Indicates the authority who published the protocol. For example, ACIP.) 1150 */ 1151 public ImmunizationRecommendationRecommendationProtocolComponent setAuthority(Reference value) { 1152 this.authority = value; 1153 return this; 1154 } 1155 1156 /** 1157 * @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. For example, ACIP.) 1158 */ 1159 public Organization getAuthorityTarget() { 1160 if (this.authorityTarget == null) 1161 if (Configuration.errorOnAutoCreate()) 1162 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.authority"); 1163 else if (Configuration.doAutoCreate()) 1164 this.authorityTarget = new Organization(); // aa 1165 return this.authorityTarget; 1166 } 1167 1168 /** 1169 * @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. For example, ACIP.) 1170 */ 1171 public ImmunizationRecommendationRecommendationProtocolComponent setAuthorityTarget(Organization value) { 1172 this.authorityTarget = value; 1173 return this; 1174 } 1175 1176 /** 1177 * @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 1178 */ 1179 public StringType getSeriesElement() { 1180 if (this.series == null) 1181 if (Configuration.errorOnAutoCreate()) 1182 throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationProtocolComponent.series"); 1183 else if (Configuration.doAutoCreate()) 1184 this.series = new StringType(); // bb 1185 return this.series; 1186 } 1187 1188 public boolean hasSeriesElement() { 1189 return this.series != null && !this.series.isEmpty(); 1190 } 1191 1192 public boolean hasSeries() { 1193 return this.series != null && !this.series.isEmpty(); 1194 } 1195 1196 /** 1197 * @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 1198 */ 1199 public ImmunizationRecommendationRecommendationProtocolComponent setSeriesElement(StringType value) { 1200 this.series = value; 1201 return this; 1202 } 1203 1204 /** 1205 * @return One possible path to achieve presumed immunity against a disease - within the context of an authority. 1206 */ 1207 public String getSeries() { 1208 return this.series == null ? null : this.series.getValue(); 1209 } 1210 1211 /** 1212 * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority. 1213 */ 1214 public ImmunizationRecommendationRecommendationProtocolComponent setSeries(String value) { 1215 if (Utilities.noString(value)) 1216 this.series = null; 1217 else { 1218 if (this.series == null) 1219 this.series = new StringType(); 1220 this.series.setValue(value); 1221 } 1222 return this; 1223 } 1224 1225 protected void listChildren(List<Property> children) { 1226 super.listChildren(children); 1227 children.add(new Property("doseSequence", "positiveInt", "Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.", 0, 1, doseSequence)); 1228 children.add(new Property("description", "string", "Contains the description about the protocol under which the vaccine was administered.", 0, 1, description)); 1229 children.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol. For example, ACIP.", 0, 1, authority)); 1230 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)); 1231 } 1232 1233 @Override 1234 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1235 switch (_hash) { 1236 case 550933246: /*doseSequence*/ return new Property("doseSequence", "positiveInt", "Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.", 0, 1, doseSequence); 1237 case -1724546052: /*description*/ return new Property("description", "string", "Contains the description about the protocol under which the vaccine was administered.", 0, 1, description); 1238 case 1475610435: /*authority*/ return new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol. For example, ACIP.", 0, 1, authority); 1239 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); 1240 default: return super.getNamedProperty(_hash, _name, _checkValid); 1241 } 1242 1243 } 1244 1245 @Override 1246 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1247 switch (hash) { 1248 case 550933246: /*doseSequence*/ return this.doseSequence == null ? new Base[0] : new Base[] {this.doseSequence}; // PositiveIntType 1249 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1250 case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : new Base[] {this.authority}; // Reference 1251 case -905838985: /*series*/ return this.series == null ? new Base[0] : new Base[] {this.series}; // StringType 1252 default: return super.getProperty(hash, name, checkValid); 1253 } 1254 1255 } 1256 1257 @Override 1258 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1259 switch (hash) { 1260 case 550933246: // doseSequence 1261 this.doseSequence = castToPositiveInt(value); // PositiveIntType 1262 return value; 1263 case -1724546052: // description 1264 this.description = castToString(value); // StringType 1265 return value; 1266 case 1475610435: // authority 1267 this.authority = castToReference(value); // Reference 1268 return value; 1269 case -905838985: // series 1270 this.series = castToString(value); // StringType 1271 return value; 1272 default: return super.setProperty(hash, name, value); 1273 } 1274 1275 } 1276 1277 @Override 1278 public Base setProperty(String name, Base value) throws FHIRException { 1279 if (name.equals("doseSequence")) { 1280 this.doseSequence = castToPositiveInt(value); // PositiveIntType 1281 } else if (name.equals("description")) { 1282 this.description = castToString(value); // StringType 1283 } else if (name.equals("authority")) { 1284 this.authority = castToReference(value); // Reference 1285 } else if (name.equals("series")) { 1286 this.series = castToString(value); // StringType 1287 } else 1288 return super.setProperty(name, value); 1289 return value; 1290 } 1291 1292 @Override 1293 public Base makeProperty(int hash, String name) throws FHIRException { 1294 switch (hash) { 1295 case 550933246: return getDoseSequenceElement(); 1296 case -1724546052: return getDescriptionElement(); 1297 case 1475610435: return getAuthority(); 1298 case -905838985: return getSeriesElement(); 1299 default: return super.makeProperty(hash, name); 1300 } 1301 1302 } 1303 1304 @Override 1305 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1306 switch (hash) { 1307 case 550933246: /*doseSequence*/ return new String[] {"positiveInt"}; 1308 case -1724546052: /*description*/ return new String[] {"string"}; 1309 case 1475610435: /*authority*/ return new String[] {"Reference"}; 1310 case -905838985: /*series*/ return new String[] {"string"}; 1311 default: return super.getTypesForProperty(hash, name); 1312 } 1313 1314 } 1315 1316 @Override 1317 public Base addChild(String name) throws FHIRException { 1318 if (name.equals("doseSequence")) { 1319 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.doseSequence"); 1320 } 1321 else if (name.equals("description")) { 1322 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.description"); 1323 } 1324 else if (name.equals("authority")) { 1325 this.authority = new Reference(); 1326 return this.authority; 1327 } 1328 else if (name.equals("series")) { 1329 throw new FHIRException("Cannot call addChild on a primitive type ImmunizationRecommendation.series"); 1330 } 1331 else 1332 return super.addChild(name); 1333 } 1334 1335 public ImmunizationRecommendationRecommendationProtocolComponent copy() { 1336 ImmunizationRecommendationRecommendationProtocolComponent dst = new ImmunizationRecommendationRecommendationProtocolComponent(); 1337 copyValues(dst); 1338 dst.doseSequence = doseSequence == null ? null : doseSequence.copy(); 1339 dst.description = description == null ? null : description.copy(); 1340 dst.authority = authority == null ? null : authority.copy(); 1341 dst.series = series == null ? null : series.copy(); 1342 return dst; 1343 } 1344 1345 @Override 1346 public boolean equalsDeep(Base other_) { 1347 if (!super.equalsDeep(other_)) 1348 return false; 1349 if (!(other_ instanceof ImmunizationRecommendationRecommendationProtocolComponent)) 1350 return false; 1351 ImmunizationRecommendationRecommendationProtocolComponent o = (ImmunizationRecommendationRecommendationProtocolComponent) other_; 1352 return compareDeep(doseSequence, o.doseSequence, true) && compareDeep(description, o.description, true) 1353 && compareDeep(authority, o.authority, true) && compareDeep(series, o.series, true); 1354 } 1355 1356 @Override 1357 public boolean equalsShallow(Base other_) { 1358 if (!super.equalsShallow(other_)) 1359 return false; 1360 if (!(other_ instanceof ImmunizationRecommendationRecommendationProtocolComponent)) 1361 return false; 1362 ImmunizationRecommendationRecommendationProtocolComponent o = (ImmunizationRecommendationRecommendationProtocolComponent) other_; 1363 return compareValues(doseSequence, o.doseSequence, true) && compareValues(description, o.description, true) 1364 && compareValues(series, o.series, true); 1365 } 1366 1367 public boolean isEmpty() { 1368 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(doseSequence, description 1369 , authority, series); 1370 } 1371 1372 public String fhirType() { 1373 return "ImmunizationRecommendation.recommendation.protocol"; 1374 1375 } 1376 1377 } 1378 1379 /** 1380 * A unique identifier assigned to this particular recommendation record. 1381 */ 1382 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1383 @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this particular recommendation record." ) 1384 protected List<Identifier> identifier; 1385 1386 /** 1387 * The patient the recommendations are for. 1388 */ 1389 @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) 1390 @Description(shortDefinition="Who this profile is for", formalDefinition="The patient the recommendations are for." ) 1391 protected Reference patient; 1392 1393 /** 1394 * The actual object that is the target of the reference (The patient the recommendations are for.) 1395 */ 1396 protected Patient patientTarget; 1397 1398 /** 1399 * Vaccine administration recommendations. 1400 */ 1401 @Child(name = "recommendation", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1402 @Description(shortDefinition="Vaccine administration recommendations", formalDefinition="Vaccine administration recommendations." ) 1403 protected List<ImmunizationRecommendationRecommendationComponent> recommendation; 1404 1405 private static final long serialVersionUID = 641058495L; 1406 1407 /** 1408 * Constructor 1409 */ 1410 public ImmunizationRecommendation() { 1411 super(); 1412 } 1413 1414 /** 1415 * Constructor 1416 */ 1417 public ImmunizationRecommendation(Reference patient) { 1418 super(); 1419 this.patient = patient; 1420 } 1421 1422 /** 1423 * @return {@link #identifier} (A unique identifier assigned to this particular recommendation record.) 1424 */ 1425 public List<Identifier> getIdentifier() { 1426 if (this.identifier == null) 1427 this.identifier = new ArrayList<Identifier>(); 1428 return this.identifier; 1429 } 1430 1431 /** 1432 * @return Returns a reference to <code>this</code> for easy method chaining 1433 */ 1434 public ImmunizationRecommendation setIdentifier(List<Identifier> theIdentifier) { 1435 this.identifier = theIdentifier; 1436 return this; 1437 } 1438 1439 public boolean hasIdentifier() { 1440 if (this.identifier == null) 1441 return false; 1442 for (Identifier item : this.identifier) 1443 if (!item.isEmpty()) 1444 return true; 1445 return false; 1446 } 1447 1448 public Identifier addIdentifier() { //3 1449 Identifier t = new Identifier(); 1450 if (this.identifier == null) 1451 this.identifier = new ArrayList<Identifier>(); 1452 this.identifier.add(t); 1453 return t; 1454 } 1455 1456 public ImmunizationRecommendation addIdentifier(Identifier t) { //3 1457 if (t == null) 1458 return this; 1459 if (this.identifier == null) 1460 this.identifier = new ArrayList<Identifier>(); 1461 this.identifier.add(t); 1462 return this; 1463 } 1464 1465 /** 1466 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1467 */ 1468 public Identifier getIdentifierFirstRep() { 1469 if (getIdentifier().isEmpty()) { 1470 addIdentifier(); 1471 } 1472 return getIdentifier().get(0); 1473 } 1474 1475 /** 1476 * @return {@link #patient} (The patient the recommendations are for.) 1477 */ 1478 public Reference getPatient() { 1479 if (this.patient == null) 1480 if (Configuration.errorOnAutoCreate()) 1481 throw new Error("Attempt to auto-create ImmunizationRecommendation.patient"); 1482 else if (Configuration.doAutoCreate()) 1483 this.patient = new Reference(); // cc 1484 return this.patient; 1485 } 1486 1487 public boolean hasPatient() { 1488 return this.patient != null && !this.patient.isEmpty(); 1489 } 1490 1491 /** 1492 * @param value {@link #patient} (The patient the recommendations are for.) 1493 */ 1494 public ImmunizationRecommendation setPatient(Reference value) { 1495 this.patient = value; 1496 return this; 1497 } 1498 1499 /** 1500 * @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 patient the recommendations are for.) 1501 */ 1502 public Patient getPatientTarget() { 1503 if (this.patientTarget == null) 1504 if (Configuration.errorOnAutoCreate()) 1505 throw new Error("Attempt to auto-create ImmunizationRecommendation.patient"); 1506 else if (Configuration.doAutoCreate()) 1507 this.patientTarget = new Patient(); // aa 1508 return this.patientTarget; 1509 } 1510 1511 /** 1512 * @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 patient the recommendations are for.) 1513 */ 1514 public ImmunizationRecommendation setPatientTarget(Patient value) { 1515 this.patientTarget = value; 1516 return this; 1517 } 1518 1519 /** 1520 * @return {@link #recommendation} (Vaccine administration recommendations.) 1521 */ 1522 public List<ImmunizationRecommendationRecommendationComponent> getRecommendation() { 1523 if (this.recommendation == null) 1524 this.recommendation = new ArrayList<ImmunizationRecommendationRecommendationComponent>(); 1525 return this.recommendation; 1526 } 1527 1528 /** 1529 * @return Returns a reference to <code>this</code> for easy method chaining 1530 */ 1531 public ImmunizationRecommendation setRecommendation(List<ImmunizationRecommendationRecommendationComponent> theRecommendation) { 1532 this.recommendation = theRecommendation; 1533 return this; 1534 } 1535 1536 public boolean hasRecommendation() { 1537 if (this.recommendation == null) 1538 return false; 1539 for (ImmunizationRecommendationRecommendationComponent item : this.recommendation) 1540 if (!item.isEmpty()) 1541 return true; 1542 return false; 1543 } 1544 1545 public ImmunizationRecommendationRecommendationComponent addRecommendation() { //3 1546 ImmunizationRecommendationRecommendationComponent t = new ImmunizationRecommendationRecommendationComponent(); 1547 if (this.recommendation == null) 1548 this.recommendation = new ArrayList<ImmunizationRecommendationRecommendationComponent>(); 1549 this.recommendation.add(t); 1550 return t; 1551 } 1552 1553 public ImmunizationRecommendation addRecommendation(ImmunizationRecommendationRecommendationComponent t) { //3 1554 if (t == null) 1555 return this; 1556 if (this.recommendation == null) 1557 this.recommendation = new ArrayList<ImmunizationRecommendationRecommendationComponent>(); 1558 this.recommendation.add(t); 1559 return this; 1560 } 1561 1562 /** 1563 * @return The first repetition of repeating field {@link #recommendation}, creating it if it does not already exist 1564 */ 1565 public ImmunizationRecommendationRecommendationComponent getRecommendationFirstRep() { 1566 if (getRecommendation().isEmpty()) { 1567 addRecommendation(); 1568 } 1569 return getRecommendation().get(0); 1570 } 1571 1572 protected void listChildren(List<Property> children) { 1573 super.listChildren(children); 1574 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this particular recommendation record.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1575 children.add(new Property("patient", "Reference(Patient)", "The patient the recommendations are for.", 0, 1, patient)); 1576 children.add(new Property("recommendation", "", "Vaccine administration recommendations.", 0, java.lang.Integer.MAX_VALUE, recommendation)); 1577 } 1578 1579 @Override 1580 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1581 switch (_hash) { 1582 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier assigned to this particular recommendation record.", 0, java.lang.Integer.MAX_VALUE, identifier); 1583 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The patient the recommendations are for.", 0, 1, patient); 1584 case -1028636743: /*recommendation*/ return new Property("recommendation", "", "Vaccine administration recommendations.", 0, java.lang.Integer.MAX_VALUE, recommendation); 1585 default: return super.getNamedProperty(_hash, _name, _checkValid); 1586 } 1587 1588 } 1589 1590 @Override 1591 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1592 switch (hash) { 1593 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1594 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 1595 case -1028636743: /*recommendation*/ return this.recommendation == null ? new Base[0] : this.recommendation.toArray(new Base[this.recommendation.size()]); // ImmunizationRecommendationRecommendationComponent 1596 default: return super.getProperty(hash, name, checkValid); 1597 } 1598 1599 } 1600 1601 @Override 1602 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1603 switch (hash) { 1604 case -1618432855: // identifier 1605 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1606 return value; 1607 case -791418107: // patient 1608 this.patient = castToReference(value); // Reference 1609 return value; 1610 case -1028636743: // recommendation 1611 this.getRecommendation().add((ImmunizationRecommendationRecommendationComponent) value); // ImmunizationRecommendationRecommendationComponent 1612 return value; 1613 default: return super.setProperty(hash, name, value); 1614 } 1615 1616 } 1617 1618 @Override 1619 public Base setProperty(String name, Base value) throws FHIRException { 1620 if (name.equals("identifier")) { 1621 this.getIdentifier().add(castToIdentifier(value)); 1622 } else if (name.equals("patient")) { 1623 this.patient = castToReference(value); // Reference 1624 } else if (name.equals("recommendation")) { 1625 this.getRecommendation().add((ImmunizationRecommendationRecommendationComponent) value); 1626 } else 1627 return super.setProperty(name, value); 1628 return value; 1629 } 1630 1631 @Override 1632 public Base makeProperty(int hash, String name) throws FHIRException { 1633 switch (hash) { 1634 case -1618432855: return addIdentifier(); 1635 case -791418107: return getPatient(); 1636 case -1028636743: return addRecommendation(); 1637 default: return super.makeProperty(hash, name); 1638 } 1639 1640 } 1641 1642 @Override 1643 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1644 switch (hash) { 1645 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1646 case -791418107: /*patient*/ return new String[] {"Reference"}; 1647 case -1028636743: /*recommendation*/ return new String[] {}; 1648 default: return super.getTypesForProperty(hash, name); 1649 } 1650 1651 } 1652 1653 @Override 1654 public Base addChild(String name) throws FHIRException { 1655 if (name.equals("identifier")) { 1656 return addIdentifier(); 1657 } 1658 else if (name.equals("patient")) { 1659 this.patient = new Reference(); 1660 return this.patient; 1661 } 1662 else if (name.equals("recommendation")) { 1663 return addRecommendation(); 1664 } 1665 else 1666 return super.addChild(name); 1667 } 1668 1669 public String fhirType() { 1670 return "ImmunizationRecommendation"; 1671 1672 } 1673 1674 public ImmunizationRecommendation copy() { 1675 ImmunizationRecommendation dst = new ImmunizationRecommendation(); 1676 copyValues(dst); 1677 if (identifier != null) { 1678 dst.identifier = new ArrayList<Identifier>(); 1679 for (Identifier i : identifier) 1680 dst.identifier.add(i.copy()); 1681 }; 1682 dst.patient = patient == null ? null : patient.copy(); 1683 if (recommendation != null) { 1684 dst.recommendation = new ArrayList<ImmunizationRecommendationRecommendationComponent>(); 1685 for (ImmunizationRecommendationRecommendationComponent i : recommendation) 1686 dst.recommendation.add(i.copy()); 1687 }; 1688 return dst; 1689 } 1690 1691 protected ImmunizationRecommendation typedCopy() { 1692 return copy(); 1693 } 1694 1695 @Override 1696 public boolean equalsDeep(Base other_) { 1697 if (!super.equalsDeep(other_)) 1698 return false; 1699 if (!(other_ instanceof ImmunizationRecommendation)) 1700 return false; 1701 ImmunizationRecommendation o = (ImmunizationRecommendation) other_; 1702 return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(recommendation, o.recommendation, true) 1703 ; 1704 } 1705 1706 @Override 1707 public boolean equalsShallow(Base other_) { 1708 if (!super.equalsShallow(other_)) 1709 return false; 1710 if (!(other_ instanceof ImmunizationRecommendation)) 1711 return false; 1712 ImmunizationRecommendation o = (ImmunizationRecommendation) other_; 1713 return true; 1714 } 1715 1716 public boolean isEmpty() { 1717 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, patient, recommendation 1718 ); 1719 } 1720 1721 @Override 1722 public ResourceType getResourceType() { 1723 return ResourceType.ImmunizationRecommendation; 1724 } 1725 1726 /** 1727 * Search parameter: <b>date</b> 1728 * <p> 1729 * Description: <b>Date recommendation created</b><br> 1730 * Type: <b>date</b><br> 1731 * Path: <b>ImmunizationRecommendation.recommendation.date</b><br> 1732 * </p> 1733 */ 1734 @SearchParamDefinition(name="date", path="ImmunizationRecommendation.recommendation.date", description="Date recommendation created", type="date" ) 1735 public static final String SP_DATE = "date"; 1736 /** 1737 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1738 * <p> 1739 * Description: <b>Date recommendation created</b><br> 1740 * Type: <b>date</b><br> 1741 * Path: <b>ImmunizationRecommendation.recommendation.date</b><br> 1742 * </p> 1743 */ 1744 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1745 1746 /** 1747 * Search parameter: <b>identifier</b> 1748 * <p> 1749 * Description: <b>Business identifier</b><br> 1750 * Type: <b>token</b><br> 1751 * Path: <b>ImmunizationRecommendation.identifier</b><br> 1752 * </p> 1753 */ 1754 @SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="Business identifier", type="token" ) 1755 public static final String SP_IDENTIFIER = "identifier"; 1756 /** 1757 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1758 * <p> 1759 * Description: <b>Business identifier</b><br> 1760 * Type: <b>token</b><br> 1761 * Path: <b>ImmunizationRecommendation.identifier</b><br> 1762 * </p> 1763 */ 1764 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1765 1766 /** 1767 * Search parameter: <b>dose-sequence</b> 1768 * <p> 1769 * Description: <b>Dose number within sequence</b><br> 1770 * Type: <b>number</b><br> 1771 * Path: <b>ImmunizationRecommendation.recommendation.protocol.doseSequence</b><br> 1772 * </p> 1773 */ 1774 @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Dose number within sequence", type="number" ) 1775 public static final String SP_DOSE_SEQUENCE = "dose-sequence"; 1776 /** 1777 * <b>Fluent Client</b> search parameter constant for <b>dose-sequence</b> 1778 * <p> 1779 * Description: <b>Dose number within sequence</b><br> 1780 * Type: <b>number</b><br> 1781 * Path: <b>ImmunizationRecommendation.recommendation.protocol.doseSequence</b><br> 1782 * </p> 1783 */ 1784 public static final ca.uhn.fhir.rest.gclient.NumberClientParam DOSE_SEQUENCE = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_DOSE_SEQUENCE); 1785 1786 /** 1787 * Search parameter: <b>target-disease</b> 1788 * <p> 1789 * Description: <b>Disease to be immunized against</b><br> 1790 * Type: <b>token</b><br> 1791 * Path: <b>ImmunizationRecommendation.recommendation.targetDisease</b><br> 1792 * </p> 1793 */ 1794 @SearchParamDefinition(name="target-disease", path="ImmunizationRecommendation.recommendation.targetDisease", description="Disease to be immunized against", type="token" ) 1795 public static final String SP_TARGET_DISEASE = "target-disease"; 1796 /** 1797 * <b>Fluent Client</b> search parameter constant for <b>target-disease</b> 1798 * <p> 1799 * Description: <b>Disease to be immunized against</b><br> 1800 * Type: <b>token</b><br> 1801 * Path: <b>ImmunizationRecommendation.recommendation.targetDisease</b><br> 1802 * </p> 1803 */ 1804 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_DISEASE); 1805 1806 /** 1807 * Search parameter: <b>patient</b> 1808 * <p> 1809 * Description: <b>Who this profile is for</b><br> 1810 * Type: <b>reference</b><br> 1811 * Path: <b>ImmunizationRecommendation.patient</b><br> 1812 * </p> 1813 */ 1814 @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 1815 public static final String SP_PATIENT = "patient"; 1816 /** 1817 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1818 * <p> 1819 * Description: <b>Who this profile is for</b><br> 1820 * Type: <b>reference</b><br> 1821 * Path: <b>ImmunizationRecommendation.patient</b><br> 1822 * </p> 1823 */ 1824 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1825 1826/** 1827 * Constant for fluent queries to be used to add include statements. Specifies 1828 * the path value of "<b>ImmunizationRecommendation:patient</b>". 1829 */ 1830 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImmunizationRecommendation:patient").toLocked(); 1831 1832 /** 1833 * Search parameter: <b>vaccine-type</b> 1834 * <p> 1835 * Description: <b>Vaccine recommendation applies to</b><br> 1836 * Type: <b>token</b><br> 1837 * Path: <b>ImmunizationRecommendation.recommendation.vaccineCode</b><br> 1838 * </p> 1839 */ 1840 @SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineCode", description="Vaccine recommendation applies to", type="token" ) 1841 public static final String SP_VACCINE_TYPE = "vaccine-type"; 1842 /** 1843 * <b>Fluent Client</b> search parameter constant for <b>vaccine-type</b> 1844 * <p> 1845 * Description: <b>Vaccine recommendation applies to</b><br> 1846 * Type: <b>token</b><br> 1847 * Path: <b>ImmunizationRecommendation.recommendation.vaccineCode</b><br> 1848 * </p> 1849 */ 1850 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VACCINE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VACCINE_TYPE); 1851 1852 /** 1853 * Search parameter: <b>dose-number</b> 1854 * <p> 1855 * Description: <b>Recommended dose number</b><br> 1856 * Type: <b>number</b><br> 1857 * Path: <b>ImmunizationRecommendation.recommendation.doseNumber</b><br> 1858 * </p> 1859 */ 1860 @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" ) 1861 public static final String SP_DOSE_NUMBER = "dose-number"; 1862 /** 1863 * <b>Fluent Client</b> search parameter constant for <b>dose-number</b> 1864 * <p> 1865 * Description: <b>Recommended dose number</b><br> 1866 * Type: <b>number</b><br> 1867 * Path: <b>ImmunizationRecommendation.recommendation.doseNumber</b><br> 1868 * </p> 1869 */ 1870 public static final ca.uhn.fhir.rest.gclient.NumberClientParam DOSE_NUMBER = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_DOSE_NUMBER); 1871 1872 /** 1873 * Search parameter: <b>information</b> 1874 * <p> 1875 * Description: <b>Patient observations supporting recommendation</b><br> 1876 * Type: <b>reference</b><br> 1877 * Path: <b>ImmunizationRecommendation.recommendation.supportingPatientInformation</b><br> 1878 * </p> 1879 */ 1880 @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="Patient observations supporting recommendation", type="reference", target={AllergyIntolerance.class, Observation.class } ) 1881 public static final String SP_INFORMATION = "information"; 1882 /** 1883 * <b>Fluent Client</b> search parameter constant for <b>information</b> 1884 * <p> 1885 * Description: <b>Patient observations supporting recommendation</b><br> 1886 * Type: <b>reference</b><br> 1887 * Path: <b>ImmunizationRecommendation.recommendation.supportingPatientInformation</b><br> 1888 * </p> 1889 */ 1890 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INFORMATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INFORMATION); 1891 1892/** 1893 * Constant for fluent queries to be used to add include statements. Specifies 1894 * the path value of "<b>ImmunizationRecommendation:information</b>". 1895 */ 1896 public static final ca.uhn.fhir.model.api.Include INCLUDE_INFORMATION = new ca.uhn.fhir.model.api.Include("ImmunizationRecommendation:information").toLocked(); 1897 1898 /** 1899 * Search parameter: <b>support</b> 1900 * <p> 1901 * Description: <b>Past immunizations supporting recommendation</b><br> 1902 * Type: <b>reference</b><br> 1903 * Path: <b>ImmunizationRecommendation.recommendation.supportingImmunization</b><br> 1904 * </p> 1905 */ 1906 @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="Past immunizations supporting recommendation", type="reference", target={Immunization.class } ) 1907 public static final String SP_SUPPORT = "support"; 1908 /** 1909 * <b>Fluent Client</b> search parameter constant for <b>support</b> 1910 * <p> 1911 * Description: <b>Past immunizations supporting recommendation</b><br> 1912 * Type: <b>reference</b><br> 1913 * Path: <b>ImmunizationRecommendation.recommendation.supportingImmunization</b><br> 1914 * </p> 1915 */ 1916 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORT); 1917 1918/** 1919 * Constant for fluent queries to be used to add include statements. Specifies 1920 * the path value of "<b>ImmunizationRecommendation:support</b>". 1921 */ 1922 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORT = new ca.uhn.fhir.model.api.Include("ImmunizationRecommendation:support").toLocked(); 1923 1924 /** 1925 * Search parameter: <b>status</b> 1926 * <p> 1927 * Description: <b>Vaccine administration status</b><br> 1928 * Type: <b>token</b><br> 1929 * Path: <b>ImmunizationRecommendation.recommendation.forecastStatus</b><br> 1930 * </p> 1931 */ 1932 @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="Vaccine administration status", type="token" ) 1933 public static final String SP_STATUS = "status"; 1934 /** 1935 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1936 * <p> 1937 * Description: <b>Vaccine administration status</b><br> 1938 * Type: <b>token</b><br> 1939 * Path: <b>ImmunizationRecommendation.recommendation.forecastStatus</b><br> 1940 * </p> 1941 */ 1942 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1943 1944 1945} 1946