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