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