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