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