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