001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import ca.uhn.fhir.model.api.annotation.ResourceDef;
038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
039import ca.uhn.fhir.model.api.annotation.Child;
040import ca.uhn.fhir.model.api.annotation.ChildOrder;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.Block;
043import org.hl7.fhir.instance.model.api.*;
044import org.hl7.fhir.exceptions.FHIRException;
045/**
046 * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
047 */
048@ResourceDef(name="ImmunizationEvaluation", profile="http://hl7.org/fhir/Profile/ImmunizationEvaluation")
049public class ImmunizationEvaluation extends DomainResource {
050
051    public enum ImmunizationEvaluationStatus {
052        /**
053         * null
054         */
055        COMPLETED, 
056        /**
057         * null
058         */
059        ENTEREDINERROR, 
060        /**
061         * added to help the parsers with the generic types
062         */
063        NULL;
064        public static ImmunizationEvaluationStatus fromCode(String codeString) throws FHIRException {
065            if (codeString == null || "".equals(codeString))
066                return null;
067        if ("completed".equals(codeString))
068          return COMPLETED;
069        if ("entered-in-error".equals(codeString))
070          return ENTEREDINERROR;
071        if (Configuration.isAcceptInvalidEnums())
072          return null;
073        else
074          throw new FHIRException("Unknown ImmunizationEvaluationStatus code '"+codeString+"'");
075        }
076        public String toCode() {
077          switch (this) {
078            case COMPLETED: return "completed";
079            case ENTEREDINERROR: return "entered-in-error";
080            default: return "?";
081          }
082        }
083        public String getSystem() {
084          switch (this) {
085            case COMPLETED: return "http://hl7.org/fhir/medication-admin-status";
086            case ENTEREDINERROR: return "http://hl7.org/fhir/medication-admin-status";
087            default: return "?";
088          }
089        }
090        public String getDefinition() {
091          switch (this) {
092            case COMPLETED: return "";
093            case ENTEREDINERROR: return "";
094            default: return "?";
095          }
096        }
097        public String getDisplay() {
098          switch (this) {
099            case COMPLETED: return "completed";
100            case ENTEREDINERROR: return "entered-in-error";
101            default: return "?";
102          }
103        }
104    }
105
106  public static class ImmunizationEvaluationStatusEnumFactory implements EnumFactory<ImmunizationEvaluationStatus> {
107    public ImmunizationEvaluationStatus fromCode(String codeString) throws IllegalArgumentException {
108      if (codeString == null || "".equals(codeString))
109            if (codeString == null || "".equals(codeString))
110                return null;
111        if ("completed".equals(codeString))
112          return ImmunizationEvaluationStatus.COMPLETED;
113        if ("entered-in-error".equals(codeString))
114          return ImmunizationEvaluationStatus.ENTEREDINERROR;
115        throw new IllegalArgumentException("Unknown ImmunizationEvaluationStatus code '"+codeString+"'");
116        }
117        public Enumeration<ImmunizationEvaluationStatus> fromType(Base code) throws FHIRException {
118          if (code == null)
119            return null;
120          if (code.isEmpty())
121            return new Enumeration<ImmunizationEvaluationStatus>(this);
122          String codeString = ((PrimitiveType) code).asStringValue();
123          if (codeString == null || "".equals(codeString))
124            return null;
125        if ("completed".equals(codeString))
126          return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.COMPLETED);
127        if ("entered-in-error".equals(codeString))
128          return new Enumeration<ImmunizationEvaluationStatus>(this, ImmunizationEvaluationStatus.ENTEREDINERROR);
129        throw new FHIRException("Unknown ImmunizationEvaluationStatus code '"+codeString+"'");
130        }
131    public String toCode(ImmunizationEvaluationStatus code) {
132      if (code == ImmunizationEvaluationStatus.COMPLETED)
133        return "completed";
134      if (code == ImmunizationEvaluationStatus.ENTEREDINERROR)
135        return "entered-in-error";
136      return "?";
137      }
138    public String toSystem(ImmunizationEvaluationStatus code) {
139      return code.getSystem();
140      }
141    }
142
143    /**
144     * A unique identifier assigned to this immunization evaluation record.
145     */
146    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
147    @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization evaluation record." )
148    protected List<Identifier> identifier;
149
150    /**
151     * Indicates the current status of the evaluation of the vaccination administration event.
152     */
153    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
154    @Description(shortDefinition="completed | entered-in-error", formalDefinition="Indicates the current status of the evaluation of the vaccination administration event." )
155    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-evaluation-status")
156    protected Enumeration<ImmunizationEvaluationStatus> status;
157
158    /**
159     * The individual for whom the evaluation is being done.
160     */
161    @Child(name = "patient", type = {Patient.class}, order=2, min=1, max=1, modifier=false, summary=true)
162    @Description(shortDefinition="Who this evaluation is for", formalDefinition="The individual for whom the evaluation is being done." )
163    protected Reference patient;
164
165    /**
166     * The actual object that is the target of the reference (The individual for whom the evaluation is being done.)
167     */
168    protected Patient patientTarget;
169
170    /**
171     * The date the evaluation of the vaccine administration event was performed.
172     */
173    @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
174    @Description(shortDefinition="Date evaluation was performed", formalDefinition="The date the evaluation of the vaccine administration event was performed." )
175    protected DateTimeType date;
176
177    /**
178     * Indicates the authority who published the protocol (e.g. ACIP).
179     */
180    @Child(name = "authority", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=false)
181    @Description(shortDefinition="Who is responsible for publishing the recommendations", formalDefinition="Indicates the authority who published the protocol (e.g. ACIP)." )
182    protected Reference authority;
183
184    /**
185     * The actual object that is the target of the reference (Indicates the authority who published the protocol (e.g. ACIP).)
186     */
187    protected Organization authorityTarget;
188
189    /**
190     * The vaccine preventable disease the dose is being evaluated against.
191     */
192    @Child(name = "targetDisease", type = {CodeableConcept.class}, order=5, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
193    @Description(shortDefinition="Evaluation target disease", formalDefinition="The vaccine preventable disease the dose is being evaluated against." )
194    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-evaluation-target-disease")
195    protected List<CodeableConcept> targetDisease;
196
197    /**
198     * The vaccine administration event being evaluated.
199     */
200    @Child(name = "immunizationEvent", type = {Immunization.class}, order=6, min=1, max=1, modifier=false, summary=true)
201    @Description(shortDefinition="Immunization being evaluated", formalDefinition="The vaccine administration event being evaluated." )
202    protected Reference immunizationEvent;
203
204    /**
205     * The actual object that is the target of the reference (The vaccine administration event being evaluated.)
206     */
207    protected Immunization immunizationEventTarget;
208
209    /**
210     * Indicates if the dose is valid or not valid with respect to the published recommendations.
211     */
212    @Child(name = "doseStatus", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=true)
213    @Description(shortDefinition="Status of the dose relative to published recommendations", formalDefinition="Indicates if the dose is valid or not valid with respect to the published recommendations." )
214    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status")
215    protected CodeableConcept doseStatus;
216
217    /**
218     * Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.
219     */
220    @Child(name = "doseStatusReason", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
221    @Description(shortDefinition="Reason for the dose status", formalDefinition="Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations." )
222    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status-reason")
223    protected List<CodeableConcept> doseStatusReason;
224
225    /**
226     * Additional information about the evaluation.
227     */
228    @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
229    @Description(shortDefinition="Evaluation notes", formalDefinition="Additional information about the evaluation." )
230    protected StringType description;
231
232    /**
233     * One possible path to achieve presumed immunity against a disease - within the context of an authority.
234     */
235    @Child(name = "series", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
236    @Description(shortDefinition="Name of vaccine series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." )
237    protected StringType series;
238
239    /**
240     * Nominal position in a series.
241     */
242    @Child(name = "doseNumber", type = {PositiveIntType.class, StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
243    @Description(shortDefinition="Dose number within series", formalDefinition="Nominal position in a series." )
244    protected Type doseNumber;
245
246    /**
247     * The recommended number of doses to achieve immunity.
248     */
249    @Child(name = "seriesDoses", type = {PositiveIntType.class, StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
250    @Description(shortDefinition="Recommended number of doses for immunity", formalDefinition="The recommended number of doses to achieve immunity." )
251    protected Type seriesDoses;
252
253    private static final long serialVersionUID = -429669628L;
254
255  /**
256   * Constructor
257   */
258    public ImmunizationEvaluation() {
259      super();
260    }
261
262  /**
263   * Constructor
264   */
265    public ImmunizationEvaluation(Enumeration<ImmunizationEvaluationStatus> status, Reference patient, Reference immunizationEvent, CodeableConcept doseStatus) {
266      super();
267      this.status = status;
268      this.patient = patient;
269      this.immunizationEvent = immunizationEvent;
270      this.doseStatus = doseStatus;
271    }
272
273    /**
274     * @return {@link #identifier} (A unique identifier assigned to this immunization evaluation record.)
275     */
276    public List<Identifier> getIdentifier() { 
277      if (this.identifier == null)
278        this.identifier = new ArrayList<Identifier>();
279      return this.identifier;
280    }
281
282    /**
283     * @return Returns a reference to <code>this</code> for easy method chaining
284     */
285    public ImmunizationEvaluation setIdentifier(List<Identifier> theIdentifier) { 
286      this.identifier = theIdentifier;
287      return this;
288    }
289
290    public boolean hasIdentifier() { 
291      if (this.identifier == null)
292        return false;
293      for (Identifier item : this.identifier)
294        if (!item.isEmpty())
295          return true;
296      return false;
297    }
298
299    public Identifier addIdentifier() { //3
300      Identifier t = new Identifier();
301      if (this.identifier == null)
302        this.identifier = new ArrayList<Identifier>();
303      this.identifier.add(t);
304      return t;
305    }
306
307    public ImmunizationEvaluation addIdentifier(Identifier t) { //3
308      if (t == null)
309        return this;
310      if (this.identifier == null)
311        this.identifier = new ArrayList<Identifier>();
312      this.identifier.add(t);
313      return this;
314    }
315
316    /**
317     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
318     */
319    public Identifier getIdentifierFirstRep() { 
320      if (getIdentifier().isEmpty()) {
321        addIdentifier();
322      }
323      return getIdentifier().get(0);
324    }
325
326    /**
327     * @return {@link #status} (Indicates the current status of the evaluation of the vaccination administration event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
328     */
329    public Enumeration<ImmunizationEvaluationStatus> getStatusElement() { 
330      if (this.status == null)
331        if (Configuration.errorOnAutoCreate())
332          throw new Error("Attempt to auto-create ImmunizationEvaluation.status");
333        else if (Configuration.doAutoCreate())
334          this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory()); // bb
335      return this.status;
336    }
337
338    public boolean hasStatusElement() { 
339      return this.status != null && !this.status.isEmpty();
340    }
341
342    public boolean hasStatus() { 
343      return this.status != null && !this.status.isEmpty();
344    }
345
346    /**
347     * @param value {@link #status} (Indicates the current status of the evaluation of the vaccination administration event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
348     */
349    public ImmunizationEvaluation setStatusElement(Enumeration<ImmunizationEvaluationStatus> value) { 
350      this.status = value;
351      return this;
352    }
353
354    /**
355     * @return Indicates the current status of the evaluation of the vaccination administration event.
356     */
357    public ImmunizationEvaluationStatus getStatus() { 
358      return this.status == null ? null : this.status.getValue();
359    }
360
361    /**
362     * @param value Indicates the current status of the evaluation of the vaccination administration event.
363     */
364    public ImmunizationEvaluation setStatus(ImmunizationEvaluationStatus value) { 
365        if (this.status == null)
366          this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory());
367        this.status.setValue(value);
368      return this;
369    }
370
371    /**
372     * @return {@link #patient} (The individual for whom the evaluation is being done.)
373     */
374    public Reference getPatient() { 
375      if (this.patient == null)
376        if (Configuration.errorOnAutoCreate())
377          throw new Error("Attempt to auto-create ImmunizationEvaluation.patient");
378        else if (Configuration.doAutoCreate())
379          this.patient = new Reference(); // cc
380      return this.patient;
381    }
382
383    public boolean hasPatient() { 
384      return this.patient != null && !this.patient.isEmpty();
385    }
386
387    /**
388     * @param value {@link #patient} (The individual for whom the evaluation is being done.)
389     */
390    public ImmunizationEvaluation setPatient(Reference value) { 
391      this.patient = value;
392      return this;
393    }
394
395    /**
396     * @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 individual for whom the evaluation is being done.)
397     */
398    public Patient getPatientTarget() { 
399      if (this.patientTarget == null)
400        if (Configuration.errorOnAutoCreate())
401          throw new Error("Attempt to auto-create ImmunizationEvaluation.patient");
402        else if (Configuration.doAutoCreate())
403          this.patientTarget = new Patient(); // aa
404      return this.patientTarget;
405    }
406
407    /**
408     * @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 individual for whom the evaluation is being done.)
409     */
410    public ImmunizationEvaluation setPatientTarget(Patient value) { 
411      this.patientTarget = value;
412      return this;
413    }
414
415    /**
416     * @return {@link #date} (The date the evaluation of the vaccine administration event was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
417     */
418    public DateTimeType getDateElement() { 
419      if (this.date == null)
420        if (Configuration.errorOnAutoCreate())
421          throw new Error("Attempt to auto-create ImmunizationEvaluation.date");
422        else if (Configuration.doAutoCreate())
423          this.date = new DateTimeType(); // bb
424      return this.date;
425    }
426
427    public boolean hasDateElement() { 
428      return this.date != null && !this.date.isEmpty();
429    }
430
431    public boolean hasDate() { 
432      return this.date != null && !this.date.isEmpty();
433    }
434
435    /**
436     * @param value {@link #date} (The date the evaluation of the vaccine administration event was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
437     */
438    public ImmunizationEvaluation setDateElement(DateTimeType value) { 
439      this.date = value;
440      return this;
441    }
442
443    /**
444     * @return The date the evaluation of the vaccine administration event was performed.
445     */
446    public Date getDate() { 
447      return this.date == null ? null : this.date.getValue();
448    }
449
450    /**
451     * @param value The date the evaluation of the vaccine administration event was performed.
452     */
453    public ImmunizationEvaluation setDate(Date value) { 
454      if (value == null)
455        this.date = null;
456      else {
457        if (this.date == null)
458          this.date = new DateTimeType();
459        this.date.setValue(value);
460      }
461      return this;
462    }
463
464    /**
465     * @return {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP).)
466     */
467    public Reference getAuthority() { 
468      if (this.authority == null)
469        if (Configuration.errorOnAutoCreate())
470          throw new Error("Attempt to auto-create ImmunizationEvaluation.authority");
471        else if (Configuration.doAutoCreate())
472          this.authority = new Reference(); // cc
473      return this.authority;
474    }
475
476    public boolean hasAuthority() { 
477      return this.authority != null && !this.authority.isEmpty();
478    }
479
480    /**
481     * @param value {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP).)
482     */
483    public ImmunizationEvaluation setAuthority(Reference value) { 
484      this.authority = value;
485      return this;
486    }
487
488    /**
489     * @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 (e.g. ACIP).)
490     */
491    public Organization getAuthorityTarget() { 
492      if (this.authorityTarget == null)
493        if (Configuration.errorOnAutoCreate())
494          throw new Error("Attempt to auto-create ImmunizationEvaluation.authority");
495        else if (Configuration.doAutoCreate())
496          this.authorityTarget = new Organization(); // aa
497      return this.authorityTarget;
498    }
499
500    /**
501     * @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 (e.g. ACIP).)
502     */
503    public ImmunizationEvaluation setAuthorityTarget(Organization value) { 
504      this.authorityTarget = value;
505      return this;
506    }
507
508    /**
509     * @return {@link #targetDisease} (The vaccine preventable disease the dose is being evaluated against.)
510     */
511    public List<CodeableConcept> getTargetDisease() { 
512      if (this.targetDisease == null)
513        this.targetDisease = new ArrayList<CodeableConcept>();
514      return this.targetDisease;
515    }
516
517    /**
518     * @return Returns a reference to <code>this</code> for easy method chaining
519     */
520    public ImmunizationEvaluation setTargetDisease(List<CodeableConcept> theTargetDisease) { 
521      this.targetDisease = theTargetDisease;
522      return this;
523    }
524
525    public boolean hasTargetDisease() { 
526      if (this.targetDisease == null)
527        return false;
528      for (CodeableConcept item : this.targetDisease)
529        if (!item.isEmpty())
530          return true;
531      return false;
532    }
533
534    public CodeableConcept addTargetDisease() { //3
535      CodeableConcept t = new CodeableConcept();
536      if (this.targetDisease == null)
537        this.targetDisease = new ArrayList<CodeableConcept>();
538      this.targetDisease.add(t);
539      return t;
540    }
541
542    public ImmunizationEvaluation addTargetDisease(CodeableConcept t) { //3
543      if (t == null)
544        return this;
545      if (this.targetDisease == null)
546        this.targetDisease = new ArrayList<CodeableConcept>();
547      this.targetDisease.add(t);
548      return this;
549    }
550
551    /**
552     * @return The first repetition of repeating field {@link #targetDisease}, creating it if it does not already exist
553     */
554    public CodeableConcept getTargetDiseaseFirstRep() { 
555      if (getTargetDisease().isEmpty()) {
556        addTargetDisease();
557      }
558      return getTargetDisease().get(0);
559    }
560
561    /**
562     * @return {@link #immunizationEvent} (The vaccine administration event being evaluated.)
563     */
564    public Reference getImmunizationEvent() { 
565      if (this.immunizationEvent == null)
566        if (Configuration.errorOnAutoCreate())
567          throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent");
568        else if (Configuration.doAutoCreate())
569          this.immunizationEvent = new Reference(); // cc
570      return this.immunizationEvent;
571    }
572
573    public boolean hasImmunizationEvent() { 
574      return this.immunizationEvent != null && !this.immunizationEvent.isEmpty();
575    }
576
577    /**
578     * @param value {@link #immunizationEvent} (The vaccine administration event being evaluated.)
579     */
580    public ImmunizationEvaluation setImmunizationEvent(Reference value) { 
581      this.immunizationEvent = value;
582      return this;
583    }
584
585    /**
586     * @return {@link #immunizationEvent} 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 vaccine administration event being evaluated.)
587     */
588    public Immunization getImmunizationEventTarget() { 
589      if (this.immunizationEventTarget == null)
590        if (Configuration.errorOnAutoCreate())
591          throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent");
592        else if (Configuration.doAutoCreate())
593          this.immunizationEventTarget = new Immunization(); // aa
594      return this.immunizationEventTarget;
595    }
596
597    /**
598     * @param value {@link #immunizationEvent} 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 vaccine administration event being evaluated.)
599     */
600    public ImmunizationEvaluation setImmunizationEventTarget(Immunization value) { 
601      this.immunizationEventTarget = value;
602      return this;
603    }
604
605    /**
606     * @return {@link #doseStatus} (Indicates if the dose is valid or not valid with respect to the published recommendations.)
607     */
608    public CodeableConcept getDoseStatus() { 
609      if (this.doseStatus == null)
610        if (Configuration.errorOnAutoCreate())
611          throw new Error("Attempt to auto-create ImmunizationEvaluation.doseStatus");
612        else if (Configuration.doAutoCreate())
613          this.doseStatus = new CodeableConcept(); // cc
614      return this.doseStatus;
615    }
616
617    public boolean hasDoseStatus() { 
618      return this.doseStatus != null && !this.doseStatus.isEmpty();
619    }
620
621    /**
622     * @param value {@link #doseStatus} (Indicates if the dose is valid or not valid with respect to the published recommendations.)
623     */
624    public ImmunizationEvaluation setDoseStatus(CodeableConcept value) { 
625      this.doseStatus = value;
626      return this;
627    }
628
629    /**
630     * @return {@link #doseStatusReason} (Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.)
631     */
632    public List<CodeableConcept> getDoseStatusReason() { 
633      if (this.doseStatusReason == null)
634        this.doseStatusReason = new ArrayList<CodeableConcept>();
635      return this.doseStatusReason;
636    }
637
638    /**
639     * @return Returns a reference to <code>this</code> for easy method chaining
640     */
641    public ImmunizationEvaluation setDoseStatusReason(List<CodeableConcept> theDoseStatusReason) { 
642      this.doseStatusReason = theDoseStatusReason;
643      return this;
644    }
645
646    public boolean hasDoseStatusReason() { 
647      if (this.doseStatusReason == null)
648        return false;
649      for (CodeableConcept item : this.doseStatusReason)
650        if (!item.isEmpty())
651          return true;
652      return false;
653    }
654
655    public CodeableConcept addDoseStatusReason() { //3
656      CodeableConcept t = new CodeableConcept();
657      if (this.doseStatusReason == null)
658        this.doseStatusReason = new ArrayList<CodeableConcept>();
659      this.doseStatusReason.add(t);
660      return t;
661    }
662
663    public ImmunizationEvaluation addDoseStatusReason(CodeableConcept t) { //3
664      if (t == null)
665        return this;
666      if (this.doseStatusReason == null)
667        this.doseStatusReason = new ArrayList<CodeableConcept>();
668      this.doseStatusReason.add(t);
669      return this;
670    }
671
672    /**
673     * @return The first repetition of repeating field {@link #doseStatusReason}, creating it if it does not already exist
674     */
675    public CodeableConcept getDoseStatusReasonFirstRep() { 
676      if (getDoseStatusReason().isEmpty()) {
677        addDoseStatusReason();
678      }
679      return getDoseStatusReason().get(0);
680    }
681
682    /**
683     * @return {@link #description} (Additional information about the evaluation.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
684     */
685    public StringType getDescriptionElement() { 
686      if (this.description == null)
687        if (Configuration.errorOnAutoCreate())
688          throw new Error("Attempt to auto-create ImmunizationEvaluation.description");
689        else if (Configuration.doAutoCreate())
690          this.description = new StringType(); // bb
691      return this.description;
692    }
693
694    public boolean hasDescriptionElement() { 
695      return this.description != null && !this.description.isEmpty();
696    }
697
698    public boolean hasDescription() { 
699      return this.description != null && !this.description.isEmpty();
700    }
701
702    /**
703     * @param value {@link #description} (Additional information about the evaluation.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
704     */
705    public ImmunizationEvaluation setDescriptionElement(StringType value) { 
706      this.description = value;
707      return this;
708    }
709
710    /**
711     * @return Additional information about the evaluation.
712     */
713    public String getDescription() { 
714      return this.description == null ? null : this.description.getValue();
715    }
716
717    /**
718     * @param value Additional information about the evaluation.
719     */
720    public ImmunizationEvaluation setDescription(String value) { 
721      if (Utilities.noString(value))
722        this.description = null;
723      else {
724        if (this.description == null)
725          this.description = new StringType();
726        this.description.setValue(value);
727      }
728      return this;
729    }
730
731    /**
732     * @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
733     */
734    public StringType getSeriesElement() { 
735      if (this.series == null)
736        if (Configuration.errorOnAutoCreate())
737          throw new Error("Attempt to auto-create ImmunizationEvaluation.series");
738        else if (Configuration.doAutoCreate())
739          this.series = new StringType(); // bb
740      return this.series;
741    }
742
743    public boolean hasSeriesElement() { 
744      return this.series != null && !this.series.isEmpty();
745    }
746
747    public boolean hasSeries() { 
748      return this.series != null && !this.series.isEmpty();
749    }
750
751    /**
752     * @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
753     */
754    public ImmunizationEvaluation setSeriesElement(StringType value) { 
755      this.series = value;
756      return this;
757    }
758
759    /**
760     * @return One possible path to achieve presumed immunity against a disease - within the context of an authority.
761     */
762    public String getSeries() { 
763      return this.series == null ? null : this.series.getValue();
764    }
765
766    /**
767     * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority.
768     */
769    public ImmunizationEvaluation setSeries(String value) { 
770      if (Utilities.noString(value))
771        this.series = null;
772      else {
773        if (this.series == null)
774          this.series = new StringType();
775        this.series.setValue(value);
776      }
777      return this;
778    }
779
780    /**
781     * @return {@link #doseNumber} (Nominal position in a series.)
782     */
783    public Type getDoseNumber() { 
784      return this.doseNumber;
785    }
786
787    /**
788     * @return {@link #doseNumber} (Nominal position in a series.)
789     */
790    public PositiveIntType getDoseNumberPositiveIntType() throws FHIRException { 
791      if (this.doseNumber == null)
792        return null;
793      if (!(this.doseNumber instanceof PositiveIntType))
794        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.doseNumber.getClass().getName()+" was encountered");
795      return (PositiveIntType) this.doseNumber;
796    }
797
798    public boolean hasDoseNumberPositiveIntType() { 
799      return this != null && this.doseNumber instanceof PositiveIntType;
800    }
801
802    /**
803     * @return {@link #doseNumber} (Nominal position in a series.)
804     */
805    public StringType getDoseNumberStringType() throws FHIRException { 
806      if (this.doseNumber == null)
807        return null;
808      if (!(this.doseNumber instanceof StringType))
809        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.doseNumber.getClass().getName()+" was encountered");
810      return (StringType) this.doseNumber;
811    }
812
813    public boolean hasDoseNumberStringType() { 
814      return this != null && this.doseNumber instanceof StringType;
815    }
816
817    public boolean hasDoseNumber() { 
818      return this.doseNumber != null && !this.doseNumber.isEmpty();
819    }
820
821    /**
822     * @param value {@link #doseNumber} (Nominal position in a series.)
823     */
824    public ImmunizationEvaluation setDoseNumber(Type value) { 
825      if (value != null && !(value instanceof PositiveIntType || value instanceof StringType))
826        throw new Error("Not the right type for ImmunizationEvaluation.doseNumber[x]: "+value.fhirType());
827      this.doseNumber = value;
828      return this;
829    }
830
831    /**
832     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
833     */
834    public Type getSeriesDoses() { 
835      return this.seriesDoses;
836    }
837
838    /**
839     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
840     */
841    public PositiveIntType getSeriesDosesPositiveIntType() throws FHIRException { 
842      if (this.seriesDoses == null)
843        return null;
844      if (!(this.seriesDoses instanceof PositiveIntType))
845        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.seriesDoses.getClass().getName()+" was encountered");
846      return (PositiveIntType) this.seriesDoses;
847    }
848
849    public boolean hasSeriesDosesPositiveIntType() { 
850      return this != null && this.seriesDoses instanceof PositiveIntType;
851    }
852
853    /**
854     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
855     */
856    public StringType getSeriesDosesStringType() throws FHIRException { 
857      if (this.seriesDoses == null)
858        return null;
859      if (!(this.seriesDoses instanceof StringType))
860        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.seriesDoses.getClass().getName()+" was encountered");
861      return (StringType) this.seriesDoses;
862    }
863
864    public boolean hasSeriesDosesStringType() { 
865      return this != null && this.seriesDoses instanceof StringType;
866    }
867
868    public boolean hasSeriesDoses() { 
869      return this.seriesDoses != null && !this.seriesDoses.isEmpty();
870    }
871
872    /**
873     * @param value {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
874     */
875    public ImmunizationEvaluation setSeriesDoses(Type value) { 
876      if (value != null && !(value instanceof PositiveIntType || value instanceof StringType))
877        throw new Error("Not the right type for ImmunizationEvaluation.seriesDoses[x]: "+value.fhirType());
878      this.seriesDoses = value;
879      return this;
880    }
881
882      protected void listChildren(List<Property> children) {
883        super.listChildren(children);
884        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization evaluation record.", 0, java.lang.Integer.MAX_VALUE, identifier));
885        children.add(new Property("status", "code", "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status));
886        children.add(new Property("patient", "Reference(Patient)", "The individual for whom the evaluation is being done.", 0, 1, patient));
887        children.add(new Property("date", "dateTime", "The date the evaluation of the vaccine administration event was performed.", 0, 1, date));
888        children.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority));
889        children.add(new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being evaluated against.", 0, java.lang.Integer.MAX_VALUE, targetDisease));
890        children.add(new Property("immunizationEvent", "Reference(Immunization)", "The vaccine administration event being evaluated.", 0, 1, immunizationEvent));
891        children.add(new Property("doseStatus", "CodeableConcept", "Indicates if the dose is valid or not valid with respect to the published recommendations.", 0, 1, doseStatus));
892        children.add(new Property("doseStatusReason", "CodeableConcept", "Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.", 0, java.lang.Integer.MAX_VALUE, doseStatusReason));
893        children.add(new Property("description", "string", "Additional information about the evaluation.", 0, 1, description));
894        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));
895        children.add(new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber));
896        children.add(new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses));
897      }
898
899      @Override
900      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
901        switch (_hash) {
902        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this immunization evaluation record.", 0, java.lang.Integer.MAX_VALUE, identifier);
903        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status);
904        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The individual for whom the evaluation is being done.", 0, 1, patient);
905        case 3076014: /*date*/  return new Property("date", "dateTime", "The date the evaluation of the vaccine administration event was performed.", 0, 1, date);
906        case 1475610435: /*authority*/  return new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority);
907        case -319593813: /*targetDisease*/  return new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being evaluated against.", 0, java.lang.Integer.MAX_VALUE, targetDisease);
908        case 1081446840: /*immunizationEvent*/  return new Property("immunizationEvent", "Reference(Immunization)", "The vaccine administration event being evaluated.", 0, 1, immunizationEvent);
909        case -745826705: /*doseStatus*/  return new Property("doseStatus", "CodeableConcept", "Indicates if the dose is valid or not valid with respect to the published recommendations.", 0, 1, doseStatus);
910        case 662783379: /*doseStatusReason*/  return new Property("doseStatusReason", "CodeableConcept", "Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.", 0, java.lang.Integer.MAX_VALUE, doseStatusReason);
911        case -1724546052: /*description*/  return new Property("description", "string", "Additional information about the evaluation.", 0, 1, description);
912        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);
913        case -1632295686: /*doseNumber[x]*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
914        case -887709242: /*doseNumber*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
915        case -1826134640: /*doseNumberPositiveInt*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
916        case -333053577: /*doseNumberString*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
917        case 1553560673: /*seriesDoses[x]*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
918        case -1936727105: /*seriesDoses*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
919        case -220897801: /*seriesDosesPositiveInt*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
920        case -673569616: /*seriesDosesString*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
921        default: return super.getNamedProperty(_hash, _name, _checkValid);
922        }
923
924      }
925
926      @Override
927      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
928        switch (hash) {
929        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
930        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImmunizationEvaluationStatus>
931        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
932        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
933        case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : new Base[] {this.authority}; // Reference
934        case -319593813: /*targetDisease*/ return this.targetDisease == null ? new Base[0] : this.targetDisease.toArray(new Base[this.targetDisease.size()]); // CodeableConcept
935        case 1081446840: /*immunizationEvent*/ return this.immunizationEvent == null ? new Base[0] : new Base[] {this.immunizationEvent}; // Reference
936        case -745826705: /*doseStatus*/ return this.doseStatus == null ? new Base[0] : new Base[] {this.doseStatus}; // CodeableConcept
937        case 662783379: /*doseStatusReason*/ return this.doseStatusReason == null ? new Base[0] : this.doseStatusReason.toArray(new Base[this.doseStatusReason.size()]); // CodeableConcept
938        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
939        case -905838985: /*series*/ return this.series == null ? new Base[0] : new Base[] {this.series}; // StringType
940        case -887709242: /*doseNumber*/ return this.doseNumber == null ? new Base[0] : new Base[] {this.doseNumber}; // Type
941        case -1936727105: /*seriesDoses*/ return this.seriesDoses == null ? new Base[0] : new Base[] {this.seriesDoses}; // Type
942        default: return super.getProperty(hash, name, checkValid);
943        }
944
945      }
946
947      @Override
948      public Base setProperty(int hash, String name, Base value) throws FHIRException {
949        switch (hash) {
950        case -1618432855: // identifier
951          this.getIdentifier().add(castToIdentifier(value)); // Identifier
952          return value;
953        case -892481550: // status
954          value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value));
955          this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus>
956          return value;
957        case -791418107: // patient
958          this.patient = castToReference(value); // Reference
959          return value;
960        case 3076014: // date
961          this.date = castToDateTime(value); // DateTimeType
962          return value;
963        case 1475610435: // authority
964          this.authority = castToReference(value); // Reference
965          return value;
966        case -319593813: // targetDisease
967          this.getTargetDisease().add(castToCodeableConcept(value)); // CodeableConcept
968          return value;
969        case 1081446840: // immunizationEvent
970          this.immunizationEvent = castToReference(value); // Reference
971          return value;
972        case -745826705: // doseStatus
973          this.doseStatus = castToCodeableConcept(value); // CodeableConcept
974          return value;
975        case 662783379: // doseStatusReason
976          this.getDoseStatusReason().add(castToCodeableConcept(value)); // CodeableConcept
977          return value;
978        case -1724546052: // description
979          this.description = castToString(value); // StringType
980          return value;
981        case -905838985: // series
982          this.series = castToString(value); // StringType
983          return value;
984        case -887709242: // doseNumber
985          this.doseNumber = castToType(value); // Type
986          return value;
987        case -1936727105: // seriesDoses
988          this.seriesDoses = castToType(value); // Type
989          return value;
990        default: return super.setProperty(hash, name, value);
991        }
992
993      }
994
995      @Override
996      public Base setProperty(String name, Base value) throws FHIRException {
997        if (name.equals("identifier")) {
998          this.getIdentifier().add(castToIdentifier(value));
999        } else if (name.equals("status")) {
1000          value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value));
1001          this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus>
1002        } else if (name.equals("patient")) {
1003          this.patient = castToReference(value); // Reference
1004        } else if (name.equals("date")) {
1005          this.date = castToDateTime(value); // DateTimeType
1006        } else if (name.equals("authority")) {
1007          this.authority = castToReference(value); // Reference
1008        } else if (name.equals("targetDisease")) {
1009          this.getTargetDisease().add(castToCodeableConcept(value));
1010        } else if (name.equals("immunizationEvent")) {
1011          this.immunizationEvent = castToReference(value); // Reference
1012        } else if (name.equals("doseStatus")) {
1013          this.doseStatus = castToCodeableConcept(value); // CodeableConcept
1014        } else if (name.equals("doseStatusReason")) {
1015          this.getDoseStatusReason().add(castToCodeableConcept(value));
1016        } else if (name.equals("description")) {
1017          this.description = castToString(value); // StringType
1018        } else if (name.equals("series")) {
1019          this.series = castToString(value); // StringType
1020        } else if (name.equals("doseNumber[x]")) {
1021          this.doseNumber = castToType(value); // Type
1022        } else if (name.equals("seriesDoses[x]")) {
1023          this.seriesDoses = castToType(value); // Type
1024        } else
1025          return super.setProperty(name, value);
1026        return value;
1027      }
1028
1029      @Override
1030      public Base makeProperty(int hash, String name) throws FHIRException {
1031        switch (hash) {
1032        case -1618432855:  return addIdentifier(); 
1033        case -892481550:  return getStatusElement();
1034        case -791418107:  return getPatient(); 
1035        case 3076014:  return getDateElement();
1036        case 1475610435:  return getAuthority(); 
1037        case -319593813:  return addTargetDisease(); 
1038        case 1081446840:  return getImmunizationEvent(); 
1039        case -745826705:  return getDoseStatus(); 
1040        case 662783379:  return addDoseStatusReason(); 
1041        case -1724546052:  return getDescriptionElement();
1042        case -905838985:  return getSeriesElement();
1043        case -1632295686:  return getDoseNumber(); 
1044        case -887709242:  return getDoseNumber(); 
1045        case 1553560673:  return getSeriesDoses(); 
1046        case -1936727105:  return getSeriesDoses(); 
1047        default: return super.makeProperty(hash, name);
1048        }
1049
1050      }
1051
1052      @Override
1053      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1054        switch (hash) {
1055        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1056        case -892481550: /*status*/ return new String[] {"code"};
1057        case -791418107: /*patient*/ return new String[] {"Reference"};
1058        case 3076014: /*date*/ return new String[] {"dateTime"};
1059        case 1475610435: /*authority*/ return new String[] {"Reference"};
1060        case -319593813: /*targetDisease*/ return new String[] {"CodeableConcept"};
1061        case 1081446840: /*immunizationEvent*/ return new String[] {"Reference"};
1062        case -745826705: /*doseStatus*/ return new String[] {"CodeableConcept"};
1063        case 662783379: /*doseStatusReason*/ return new String[] {"CodeableConcept"};
1064        case -1724546052: /*description*/ return new String[] {"string"};
1065        case -905838985: /*series*/ return new String[] {"string"};
1066        case -887709242: /*doseNumber*/ return new String[] {"positiveInt", "string"};
1067        case -1936727105: /*seriesDoses*/ return new String[] {"positiveInt", "string"};
1068        default: return super.getTypesForProperty(hash, name);
1069        }
1070
1071      }
1072
1073      @Override
1074      public Base addChild(String name) throws FHIRException {
1075        if (name.equals("identifier")) {
1076          return addIdentifier();
1077        }
1078        else if (name.equals("status")) {
1079          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.status");
1080        }
1081        else if (name.equals("patient")) {
1082          this.patient = new Reference();
1083          return this.patient;
1084        }
1085        else if (name.equals("date")) {
1086          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.date");
1087        }
1088        else if (name.equals("authority")) {
1089          this.authority = new Reference();
1090          return this.authority;
1091        }
1092        else if (name.equals("targetDisease")) {
1093          return addTargetDisease();
1094        }
1095        else if (name.equals("immunizationEvent")) {
1096          this.immunizationEvent = new Reference();
1097          return this.immunizationEvent;
1098        }
1099        else if (name.equals("doseStatus")) {
1100          this.doseStatus = new CodeableConcept();
1101          return this.doseStatus;
1102        }
1103        else if (name.equals("doseStatusReason")) {
1104          return addDoseStatusReason();
1105        }
1106        else if (name.equals("description")) {
1107          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.description");
1108        }
1109        else if (name.equals("series")) {
1110          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.series");
1111        }
1112        else if (name.equals("doseNumberPositiveInt")) {
1113          this.doseNumber = new PositiveIntType();
1114          return this.doseNumber;
1115        }
1116        else if (name.equals("doseNumberString")) {
1117          this.doseNumber = new StringType();
1118          return this.doseNumber;
1119        }
1120        else if (name.equals("seriesDosesPositiveInt")) {
1121          this.seriesDoses = new PositiveIntType();
1122          return this.seriesDoses;
1123        }
1124        else if (name.equals("seriesDosesString")) {
1125          this.seriesDoses = new StringType();
1126          return this.seriesDoses;
1127        }
1128        else
1129          return super.addChild(name);
1130      }
1131
1132  public String fhirType() {
1133    return "ImmunizationEvaluation";
1134
1135  }
1136
1137      public ImmunizationEvaluation copy() {
1138        ImmunizationEvaluation dst = new ImmunizationEvaluation();
1139        copyValues(dst);
1140        if (identifier != null) {
1141          dst.identifier = new ArrayList<Identifier>();
1142          for (Identifier i : identifier)
1143            dst.identifier.add(i.copy());
1144        };
1145        dst.status = status == null ? null : status.copy();
1146        dst.patient = patient == null ? null : patient.copy();
1147        dst.date = date == null ? null : date.copy();
1148        dst.authority = authority == null ? null : authority.copy();
1149        if (targetDisease != null) {
1150          dst.targetDisease = new ArrayList<CodeableConcept>();
1151          for (CodeableConcept i : targetDisease)
1152            dst.targetDisease.add(i.copy());
1153        };
1154        dst.immunizationEvent = immunizationEvent == null ? null : immunizationEvent.copy();
1155        dst.doseStatus = doseStatus == null ? null : doseStatus.copy();
1156        if (doseStatusReason != null) {
1157          dst.doseStatusReason = new ArrayList<CodeableConcept>();
1158          for (CodeableConcept i : doseStatusReason)
1159            dst.doseStatusReason.add(i.copy());
1160        };
1161        dst.description = description == null ? null : description.copy();
1162        dst.series = series == null ? null : series.copy();
1163        dst.doseNumber = doseNumber == null ? null : doseNumber.copy();
1164        dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy();
1165        return dst;
1166      }
1167
1168      protected ImmunizationEvaluation typedCopy() {
1169        return copy();
1170      }
1171
1172      @Override
1173      public boolean equalsDeep(Base other_) {
1174        if (!super.equalsDeep(other_))
1175          return false;
1176        if (!(other_ instanceof ImmunizationEvaluation))
1177          return false;
1178        ImmunizationEvaluation o = (ImmunizationEvaluation) other_;
1179        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true)
1180           && compareDeep(date, o.date, true) && compareDeep(authority, o.authority, true) && compareDeep(targetDisease, o.targetDisease, true)
1181           && compareDeep(immunizationEvent, o.immunizationEvent, true) && compareDeep(doseStatus, o.doseStatus, true)
1182           && compareDeep(doseStatusReason, o.doseStatusReason, true) && compareDeep(description, o.description, true)
1183           && compareDeep(series, o.series, true) && compareDeep(doseNumber, o.doseNumber, true) && compareDeep(seriesDoses, o.seriesDoses, true)
1184          ;
1185      }
1186
1187      @Override
1188      public boolean equalsShallow(Base other_) {
1189        if (!super.equalsShallow(other_))
1190          return false;
1191        if (!(other_ instanceof ImmunizationEvaluation))
1192          return false;
1193        ImmunizationEvaluation o = (ImmunizationEvaluation) other_;
1194        return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true)
1195           && compareValues(series, o.series, true);
1196      }
1197
1198      public boolean isEmpty() {
1199        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient
1200          , date, authority, targetDisease, immunizationEvent, doseStatus, doseStatusReason
1201          , description, series, doseNumber, seriesDoses);
1202      }
1203
1204  @Override
1205  public ResourceType getResourceType() {
1206    return ResourceType.ImmunizationEvaluation;
1207   }
1208
1209 /**
1210   * Search parameter: <b>date</b>
1211   * <p>
1212   * Description: <b>Date the evaluation was generated</b><br>
1213   * Type: <b>date</b><br>
1214   * Path: <b>ImmunizationEvaluation.date</b><br>
1215   * </p>
1216   */
1217  @SearchParamDefinition(name="date", path="ImmunizationEvaluation.date", description="Date the evaluation was generated", type="date" )
1218  public static final String SP_DATE = "date";
1219 /**
1220   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1221   * <p>
1222   * Description: <b>Date the evaluation was generated</b><br>
1223   * Type: <b>date</b><br>
1224   * Path: <b>ImmunizationEvaluation.date</b><br>
1225   * </p>
1226   */
1227  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1228
1229 /**
1230   * Search parameter: <b>identifier</b>
1231   * <p>
1232   * Description: <b>ID of the evaluation</b><br>
1233   * Type: <b>token</b><br>
1234   * Path: <b>ImmunizationEvaluation.identifier</b><br>
1235   * </p>
1236   */
1237  @SearchParamDefinition(name="identifier", path="ImmunizationEvaluation.identifier", description="ID of the evaluation", type="token" )
1238  public static final String SP_IDENTIFIER = "identifier";
1239 /**
1240   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1241   * <p>
1242   * Description: <b>ID of the evaluation</b><br>
1243   * Type: <b>token</b><br>
1244   * Path: <b>ImmunizationEvaluation.identifier</b><br>
1245   * </p>
1246   */
1247  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1248
1249 /**
1250   * Search parameter: <b>target-disease</b>
1251   * <p>
1252   * Description: <b>The vaccine preventable disease being evaluated against</b><br>
1253   * Type: <b>token</b><br>
1254   * Path: <b>ImmunizationEvaluation.targetDisease</b><br>
1255   * </p>
1256   */
1257  @SearchParamDefinition(name="target-disease", path="ImmunizationEvaluation.targetDisease", description="The vaccine preventable disease being evaluated against", type="token" )
1258  public static final String SP_TARGET_DISEASE = "target-disease";
1259 /**
1260   * <b>Fluent Client</b> search parameter constant for <b>target-disease</b>
1261   * <p>
1262   * Description: <b>The vaccine preventable disease being evaluated against</b><br>
1263   * Type: <b>token</b><br>
1264   * Path: <b>ImmunizationEvaluation.targetDisease</b><br>
1265   * </p>
1266   */
1267  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_DISEASE);
1268
1269 /**
1270   * Search parameter: <b>patient</b>
1271   * <p>
1272   * Description: <b>The patient being evaluated</b><br>
1273   * Type: <b>reference</b><br>
1274   * Path: <b>ImmunizationEvaluation.patient</b><br>
1275   * </p>
1276   */
1277  @SearchParamDefinition(name="patient", path="ImmunizationEvaluation.patient", description="The patient being evaluated", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
1278  public static final String SP_PATIENT = "patient";
1279 /**
1280   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1281   * <p>
1282   * Description: <b>The patient being evaluated</b><br>
1283   * Type: <b>reference</b><br>
1284   * Path: <b>ImmunizationEvaluation.patient</b><br>
1285   * </p>
1286   */
1287  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1288
1289/**
1290   * Constant for fluent queries to be used to add include statements. Specifies
1291   * the path value of "<b>ImmunizationEvaluation:patient</b>".
1292   */
1293  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImmunizationEvaluation:patient").toLocked();
1294
1295 /**
1296   * Search parameter: <b>dose-status</b>
1297   * <p>
1298   * Description: <b>The status of the dose relative to published recommendations</b><br>
1299   * Type: <b>token</b><br>
1300   * Path: <b>ImmunizationEvaluation.doseStatus</b><br>
1301   * </p>
1302   */
1303  @SearchParamDefinition(name="dose-status", path="ImmunizationEvaluation.doseStatus", description="The status of the dose relative to published recommendations", type="token" )
1304  public static final String SP_DOSE_STATUS = "dose-status";
1305 /**
1306   * <b>Fluent Client</b> search parameter constant for <b>dose-status</b>
1307   * <p>
1308   * Description: <b>The status of the dose relative to published recommendations</b><br>
1309   * Type: <b>token</b><br>
1310   * Path: <b>ImmunizationEvaluation.doseStatus</b><br>
1311   * </p>
1312   */
1313  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DOSE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DOSE_STATUS);
1314
1315 /**
1316   * Search parameter: <b>immunization-event</b>
1317   * <p>
1318   * Description: <b>The vaccine administration event being evaluated</b><br>
1319   * Type: <b>reference</b><br>
1320   * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br>
1321   * </p>
1322   */
1323  @SearchParamDefinition(name="immunization-event", path="ImmunizationEvaluation.immunizationEvent", description="The vaccine administration event being evaluated", type="reference", target={Immunization.class } )
1324  public static final String SP_IMMUNIZATION_EVENT = "immunization-event";
1325 /**
1326   * <b>Fluent Client</b> search parameter constant for <b>immunization-event</b>
1327   * <p>
1328   * Description: <b>The vaccine administration event being evaluated</b><br>
1329   * Type: <b>reference</b><br>
1330   * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br>
1331   * </p>
1332   */
1333  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam IMMUNIZATION_EVENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_IMMUNIZATION_EVENT);
1334
1335/**
1336   * Constant for fluent queries to be used to add include statements. Specifies
1337   * the path value of "<b>ImmunizationEvaluation:immunization-event</b>".
1338   */
1339  public static final ca.uhn.fhir.model.api.Include INCLUDE_IMMUNIZATION_EVENT = new ca.uhn.fhir.model.api.Include("ImmunizationEvaluation:immunization-event").toLocked();
1340
1341 /**
1342   * Search parameter: <b>status</b>
1343   * <p>
1344   * Description: <b>Immunization evaluation status</b><br>
1345   * Type: <b>token</b><br>
1346   * Path: <b>ImmunizationEvaluation.status</b><br>
1347   * </p>
1348   */
1349  @SearchParamDefinition(name="status", path="ImmunizationEvaluation.status", description="Immunization evaluation status", type="token" )
1350  public static final String SP_STATUS = "status";
1351 /**
1352   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1353   * <p>
1354   * Description: <b>Immunization evaluation status</b><br>
1355   * Type: <b>token</b><br>
1356   * Path: <b>ImmunizationEvaluation.status</b><br>
1357   * </p>
1358   */
1359  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1360
1361
1362}
1363