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