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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.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/StructureDefinition/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=1, 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 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 = 1248741226L;
254
255  /**
256   * Constructor
257   */
258    public ImmunizationEvaluation() {
259      super();
260    }
261
262  /**
263   * Constructor
264   */
265    public ImmunizationEvaluation(Enumeration<ImmunizationEvaluationStatus> status, Reference patient, CodeableConcept targetDisease, Reference immunizationEvent, CodeableConcept doseStatus) {
266      super();
267      this.status = status;
268      this.patient = patient;
269      this.targetDisease = targetDisease;
270      this.immunizationEvent = immunizationEvent;
271      this.doseStatus = doseStatus;
272    }
273
274    /**
275     * @return {@link #identifier} (A unique identifier assigned to this immunization evaluation record.)
276     */
277    public List<Identifier> getIdentifier() { 
278      if (this.identifier == null)
279        this.identifier = new ArrayList<Identifier>();
280      return this.identifier;
281    }
282
283    /**
284     * @return Returns a reference to <code>this</code> for easy method chaining
285     */
286    public ImmunizationEvaluation setIdentifier(List<Identifier> theIdentifier) { 
287      this.identifier = theIdentifier;
288      return this;
289    }
290
291    public boolean hasIdentifier() { 
292      if (this.identifier == null)
293        return false;
294      for (Identifier item : this.identifier)
295        if (!item.isEmpty())
296          return true;
297      return false;
298    }
299
300    public Identifier addIdentifier() { //3
301      Identifier t = new Identifier();
302      if (this.identifier == null)
303        this.identifier = new ArrayList<Identifier>();
304      this.identifier.add(t);
305      return t;
306    }
307
308    public ImmunizationEvaluation addIdentifier(Identifier t) { //3
309      if (t == null)
310        return this;
311      if (this.identifier == null)
312        this.identifier = new ArrayList<Identifier>();
313      this.identifier.add(t);
314      return this;
315    }
316
317    /**
318     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
319     */
320    public Identifier getIdentifierFirstRep() { 
321      if (getIdentifier().isEmpty()) {
322        addIdentifier();
323      }
324      return getIdentifier().get(0);
325    }
326
327    /**
328     * @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
329     */
330    public Enumeration<ImmunizationEvaluationStatus> getStatusElement() { 
331      if (this.status == null)
332        if (Configuration.errorOnAutoCreate())
333          throw new Error("Attempt to auto-create ImmunizationEvaluation.status");
334        else if (Configuration.doAutoCreate())
335          this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory()); // bb
336      return this.status;
337    }
338
339    public boolean hasStatusElement() { 
340      return this.status != null && !this.status.isEmpty();
341    }
342
343    public boolean hasStatus() { 
344      return this.status != null && !this.status.isEmpty();
345    }
346
347    /**
348     * @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
349     */
350    public ImmunizationEvaluation setStatusElement(Enumeration<ImmunizationEvaluationStatus> value) { 
351      this.status = value;
352      return this;
353    }
354
355    /**
356     * @return Indicates the current status of the evaluation of the vaccination administration event.
357     */
358    public ImmunizationEvaluationStatus getStatus() { 
359      return this.status == null ? null : this.status.getValue();
360    }
361
362    /**
363     * @param value Indicates the current status of the evaluation of the vaccination administration event.
364     */
365    public ImmunizationEvaluation setStatus(ImmunizationEvaluationStatus value) { 
366        if (this.status == null)
367          this.status = new Enumeration<ImmunizationEvaluationStatus>(new ImmunizationEvaluationStatusEnumFactory());
368        this.status.setValue(value);
369      return this;
370    }
371
372    /**
373     * @return {@link #patient} (The individual for whom the evaluation is being done.)
374     */
375    public Reference getPatient() { 
376      if (this.patient == null)
377        if (Configuration.errorOnAutoCreate())
378          throw new Error("Attempt to auto-create ImmunizationEvaluation.patient");
379        else if (Configuration.doAutoCreate())
380          this.patient = new Reference(); // cc
381      return this.patient;
382    }
383
384    public boolean hasPatient() { 
385      return this.patient != null && !this.patient.isEmpty();
386    }
387
388    /**
389     * @param value {@link #patient} (The individual for whom the evaluation is being done.)
390     */
391    public ImmunizationEvaluation setPatient(Reference value) { 
392      this.patient = value;
393      return this;
394    }
395
396    /**
397     * @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.)
398     */
399    public Patient getPatientTarget() { 
400      if (this.patientTarget == null)
401        if (Configuration.errorOnAutoCreate())
402          throw new Error("Attempt to auto-create ImmunizationEvaluation.patient");
403        else if (Configuration.doAutoCreate())
404          this.patientTarget = new Patient(); // aa
405      return this.patientTarget;
406    }
407
408    /**
409     * @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.)
410     */
411    public ImmunizationEvaluation setPatientTarget(Patient value) { 
412      this.patientTarget = value;
413      return this;
414    }
415
416    /**
417     * @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
418     */
419    public DateTimeType getDateElement() { 
420      if (this.date == null)
421        if (Configuration.errorOnAutoCreate())
422          throw new Error("Attempt to auto-create ImmunizationEvaluation.date");
423        else if (Configuration.doAutoCreate())
424          this.date = new DateTimeType(); // bb
425      return this.date;
426    }
427
428    public boolean hasDateElement() { 
429      return this.date != null && !this.date.isEmpty();
430    }
431
432    public boolean hasDate() { 
433      return this.date != null && !this.date.isEmpty();
434    }
435
436    /**
437     * @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
438     */
439    public ImmunizationEvaluation setDateElement(DateTimeType value) { 
440      this.date = value;
441      return this;
442    }
443
444    /**
445     * @return The date the evaluation of the vaccine administration event was performed.
446     */
447    public Date getDate() { 
448      return this.date == null ? null : this.date.getValue();
449    }
450
451    /**
452     * @param value The date the evaluation of the vaccine administration event was performed.
453     */
454    public ImmunizationEvaluation setDate(Date value) { 
455      if (value == null)
456        this.date = null;
457      else {
458        if (this.date == null)
459          this.date = new DateTimeType();
460        this.date.setValue(value);
461      }
462      return this;
463    }
464
465    /**
466     * @return {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP).)
467     */
468    public Reference getAuthority() { 
469      if (this.authority == null)
470        if (Configuration.errorOnAutoCreate())
471          throw new Error("Attempt to auto-create ImmunizationEvaluation.authority");
472        else if (Configuration.doAutoCreate())
473          this.authority = new Reference(); // cc
474      return this.authority;
475    }
476
477    public boolean hasAuthority() { 
478      return this.authority != null && !this.authority.isEmpty();
479    }
480
481    /**
482     * @param value {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP).)
483     */
484    public ImmunizationEvaluation setAuthority(Reference value) { 
485      this.authority = value;
486      return this;
487    }
488
489    /**
490     * @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).)
491     */
492    public Organization getAuthorityTarget() { 
493      if (this.authorityTarget == null)
494        if (Configuration.errorOnAutoCreate())
495          throw new Error("Attempt to auto-create ImmunizationEvaluation.authority");
496        else if (Configuration.doAutoCreate())
497          this.authorityTarget = new Organization(); // aa
498      return this.authorityTarget;
499    }
500
501    /**
502     * @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).)
503     */
504    public ImmunizationEvaluation setAuthorityTarget(Organization value) { 
505      this.authorityTarget = value;
506      return this;
507    }
508
509    /**
510     * @return {@link #targetDisease} (The vaccine preventable disease the dose is being evaluated against.)
511     */
512    public CodeableConcept getTargetDisease() { 
513      if (this.targetDisease == null)
514        if (Configuration.errorOnAutoCreate())
515          throw new Error("Attempt to auto-create ImmunizationEvaluation.targetDisease");
516        else if (Configuration.doAutoCreate())
517          this.targetDisease = new CodeableConcept(); // cc
518      return this.targetDisease;
519    }
520
521    public boolean hasTargetDisease() { 
522      return this.targetDisease != null && !this.targetDisease.isEmpty();
523    }
524
525    /**
526     * @param value {@link #targetDisease} (The vaccine preventable disease the dose is being evaluated against.)
527     */
528    public ImmunizationEvaluation setTargetDisease(CodeableConcept value) { 
529      this.targetDisease = value;
530      return this;
531    }
532
533    /**
534     * @return {@link #immunizationEvent} (The vaccine administration event being evaluated.)
535     */
536    public Reference getImmunizationEvent() { 
537      if (this.immunizationEvent == null)
538        if (Configuration.errorOnAutoCreate())
539          throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent");
540        else if (Configuration.doAutoCreate())
541          this.immunizationEvent = new Reference(); // cc
542      return this.immunizationEvent;
543    }
544
545    public boolean hasImmunizationEvent() { 
546      return this.immunizationEvent != null && !this.immunizationEvent.isEmpty();
547    }
548
549    /**
550     * @param value {@link #immunizationEvent} (The vaccine administration event being evaluated.)
551     */
552    public ImmunizationEvaluation setImmunizationEvent(Reference value) { 
553      this.immunizationEvent = value;
554      return this;
555    }
556
557    /**
558     * @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.)
559     */
560    public Immunization getImmunizationEventTarget() { 
561      if (this.immunizationEventTarget == null)
562        if (Configuration.errorOnAutoCreate())
563          throw new Error("Attempt to auto-create ImmunizationEvaluation.immunizationEvent");
564        else if (Configuration.doAutoCreate())
565          this.immunizationEventTarget = new Immunization(); // aa
566      return this.immunizationEventTarget;
567    }
568
569    /**
570     * @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.)
571     */
572    public ImmunizationEvaluation setImmunizationEventTarget(Immunization value) { 
573      this.immunizationEventTarget = value;
574      return this;
575    }
576
577    /**
578     * @return {@link #doseStatus} (Indicates if the dose is valid or not valid with respect to the published recommendations.)
579     */
580    public CodeableConcept getDoseStatus() { 
581      if (this.doseStatus == null)
582        if (Configuration.errorOnAutoCreate())
583          throw new Error("Attempt to auto-create ImmunizationEvaluation.doseStatus");
584        else if (Configuration.doAutoCreate())
585          this.doseStatus = new CodeableConcept(); // cc
586      return this.doseStatus;
587    }
588
589    public boolean hasDoseStatus() { 
590      return this.doseStatus != null && !this.doseStatus.isEmpty();
591    }
592
593    /**
594     * @param value {@link #doseStatus} (Indicates if the dose is valid or not valid with respect to the published recommendations.)
595     */
596    public ImmunizationEvaluation setDoseStatus(CodeableConcept value) { 
597      this.doseStatus = value;
598      return this;
599    }
600
601    /**
602     * @return {@link #doseStatusReason} (Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.)
603     */
604    public List<CodeableConcept> getDoseStatusReason() { 
605      if (this.doseStatusReason == null)
606        this.doseStatusReason = new ArrayList<CodeableConcept>();
607      return this.doseStatusReason;
608    }
609
610    /**
611     * @return Returns a reference to <code>this</code> for easy method chaining
612     */
613    public ImmunizationEvaluation setDoseStatusReason(List<CodeableConcept> theDoseStatusReason) { 
614      this.doseStatusReason = theDoseStatusReason;
615      return this;
616    }
617
618    public boolean hasDoseStatusReason() { 
619      if (this.doseStatusReason == null)
620        return false;
621      for (CodeableConcept item : this.doseStatusReason)
622        if (!item.isEmpty())
623          return true;
624      return false;
625    }
626
627    public CodeableConcept addDoseStatusReason() { //3
628      CodeableConcept t = new CodeableConcept();
629      if (this.doseStatusReason == null)
630        this.doseStatusReason = new ArrayList<CodeableConcept>();
631      this.doseStatusReason.add(t);
632      return t;
633    }
634
635    public ImmunizationEvaluation addDoseStatusReason(CodeableConcept t) { //3
636      if (t == null)
637        return this;
638      if (this.doseStatusReason == null)
639        this.doseStatusReason = new ArrayList<CodeableConcept>();
640      this.doseStatusReason.add(t);
641      return this;
642    }
643
644    /**
645     * @return The first repetition of repeating field {@link #doseStatusReason}, creating it if it does not already exist
646     */
647    public CodeableConcept getDoseStatusReasonFirstRep() { 
648      if (getDoseStatusReason().isEmpty()) {
649        addDoseStatusReason();
650      }
651      return getDoseStatusReason().get(0);
652    }
653
654    /**
655     * @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
656     */
657    public StringType getDescriptionElement() { 
658      if (this.description == null)
659        if (Configuration.errorOnAutoCreate())
660          throw new Error("Attempt to auto-create ImmunizationEvaluation.description");
661        else if (Configuration.doAutoCreate())
662          this.description = new StringType(); // bb
663      return this.description;
664    }
665
666    public boolean hasDescriptionElement() { 
667      return this.description != null && !this.description.isEmpty();
668    }
669
670    public boolean hasDescription() { 
671      return this.description != null && !this.description.isEmpty();
672    }
673
674    /**
675     * @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
676     */
677    public ImmunizationEvaluation setDescriptionElement(StringType value) { 
678      this.description = value;
679      return this;
680    }
681
682    /**
683     * @return Additional information about the evaluation.
684     */
685    public String getDescription() { 
686      return this.description == null ? null : this.description.getValue();
687    }
688
689    /**
690     * @param value Additional information about the evaluation.
691     */
692    public ImmunizationEvaluation setDescription(String value) { 
693      if (Utilities.noString(value))
694        this.description = null;
695      else {
696        if (this.description == null)
697          this.description = new StringType();
698        this.description.setValue(value);
699      }
700      return this;
701    }
702
703    /**
704     * @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
705     */
706    public StringType getSeriesElement() { 
707      if (this.series == null)
708        if (Configuration.errorOnAutoCreate())
709          throw new Error("Attempt to auto-create ImmunizationEvaluation.series");
710        else if (Configuration.doAutoCreate())
711          this.series = new StringType(); // bb
712      return this.series;
713    }
714
715    public boolean hasSeriesElement() { 
716      return this.series != null && !this.series.isEmpty();
717    }
718
719    public boolean hasSeries() { 
720      return this.series != null && !this.series.isEmpty();
721    }
722
723    /**
724     * @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
725     */
726    public ImmunizationEvaluation setSeriesElement(StringType value) { 
727      this.series = value;
728      return this;
729    }
730
731    /**
732     * @return One possible path to achieve presumed immunity against a disease - within the context of an authority.
733     */
734    public String getSeries() { 
735      return this.series == null ? null : this.series.getValue();
736    }
737
738    /**
739     * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority.
740     */
741    public ImmunizationEvaluation setSeries(String value) { 
742      if (Utilities.noString(value))
743        this.series = null;
744      else {
745        if (this.series == null)
746          this.series = new StringType();
747        this.series.setValue(value);
748      }
749      return this;
750    }
751
752    /**
753     * @return {@link #doseNumber} (Nominal position in a series.)
754     */
755    public Type getDoseNumber() { 
756      return this.doseNumber;
757    }
758
759    /**
760     * @return {@link #doseNumber} (Nominal position in a series.)
761     */
762    public PositiveIntType getDoseNumberPositiveIntType() throws FHIRException { 
763      if (this.doseNumber == null)
764        return null;
765      if (!(this.doseNumber instanceof PositiveIntType))
766        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.doseNumber.getClass().getName()+" was encountered");
767      return (PositiveIntType) this.doseNumber;
768    }
769
770    public boolean hasDoseNumberPositiveIntType() { 
771      return this != null && this.doseNumber instanceof PositiveIntType;
772    }
773
774    /**
775     * @return {@link #doseNumber} (Nominal position in a series.)
776     */
777    public StringType getDoseNumberStringType() throws FHIRException { 
778      if (this.doseNumber == null)
779        return null;
780      if (!(this.doseNumber instanceof StringType))
781        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.doseNumber.getClass().getName()+" was encountered");
782      return (StringType) this.doseNumber;
783    }
784
785    public boolean hasDoseNumberStringType() { 
786      return this != null && this.doseNumber instanceof StringType;
787    }
788
789    public boolean hasDoseNumber() { 
790      return this.doseNumber != null && !this.doseNumber.isEmpty();
791    }
792
793    /**
794     * @param value {@link #doseNumber} (Nominal position in a series.)
795     */
796    public ImmunizationEvaluation setDoseNumber(Type value) { 
797      if (value != null && !(value instanceof PositiveIntType || value instanceof StringType))
798        throw new Error("Not the right type for ImmunizationEvaluation.doseNumber[x]: "+value.fhirType());
799      this.doseNumber = value;
800      return this;
801    }
802
803    /**
804     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
805     */
806    public Type getSeriesDoses() { 
807      return this.seriesDoses;
808    }
809
810    /**
811     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
812     */
813    public PositiveIntType getSeriesDosesPositiveIntType() throws FHIRException { 
814      if (this.seriesDoses == null)
815        return null;
816      if (!(this.seriesDoses instanceof PositiveIntType))
817        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.seriesDoses.getClass().getName()+" was encountered");
818      return (PositiveIntType) this.seriesDoses;
819    }
820
821    public boolean hasSeriesDosesPositiveIntType() { 
822      return this != null && this.seriesDoses instanceof PositiveIntType;
823    }
824
825    /**
826     * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
827     */
828    public StringType getSeriesDosesStringType() throws FHIRException { 
829      if (this.seriesDoses == null)
830        return null;
831      if (!(this.seriesDoses instanceof StringType))
832        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.seriesDoses.getClass().getName()+" was encountered");
833      return (StringType) this.seriesDoses;
834    }
835
836    public boolean hasSeriesDosesStringType() { 
837      return this != null && this.seriesDoses instanceof StringType;
838    }
839
840    public boolean hasSeriesDoses() { 
841      return this.seriesDoses != null && !this.seriesDoses.isEmpty();
842    }
843
844    /**
845     * @param value {@link #seriesDoses} (The recommended number of doses to achieve immunity.)
846     */
847    public ImmunizationEvaluation setSeriesDoses(Type value) { 
848      if (value != null && !(value instanceof PositiveIntType || value instanceof StringType))
849        throw new Error("Not the right type for ImmunizationEvaluation.seriesDoses[x]: "+value.fhirType());
850      this.seriesDoses = value;
851      return this;
852    }
853
854      protected void listChildren(List<Property> children) {
855        super.listChildren(children);
856        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization evaluation record.", 0, java.lang.Integer.MAX_VALUE, identifier));
857        children.add(new Property("status", "code", "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status));
858        children.add(new Property("patient", "Reference(Patient)", "The individual for whom the evaluation is being done.", 0, 1, patient));
859        children.add(new Property("date", "dateTime", "The date the evaluation of the vaccine administration event was performed.", 0, 1, date));
860        children.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority));
861        children.add(new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being evaluated against.", 0, 1, targetDisease));
862        children.add(new Property("immunizationEvent", "Reference(Immunization)", "The vaccine administration event being evaluated.", 0, 1, immunizationEvent));
863        children.add(new Property("doseStatus", "CodeableConcept", "Indicates if the dose is valid or not valid with respect to the published recommendations.", 0, 1, doseStatus));
864        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));
865        children.add(new Property("description", "string", "Additional information about the evaluation.", 0, 1, description));
866        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));
867        children.add(new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber));
868        children.add(new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses));
869      }
870
871      @Override
872      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
873        switch (_hash) {
874        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this immunization evaluation record.", 0, java.lang.Integer.MAX_VALUE, identifier);
875        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current status of the evaluation of the vaccination administration event.", 0, 1, status);
876        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The individual for whom the evaluation is being done.", 0, 1, patient);
877        case 3076014: /*date*/  return new Property("date", "dateTime", "The date the evaluation of the vaccine administration event was performed.", 0, 1, date);
878        case 1475610435: /*authority*/  return new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP).", 0, 1, authority);
879        case -319593813: /*targetDisease*/  return new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being evaluated against.", 0, 1, targetDisease);
880        case 1081446840: /*immunizationEvent*/  return new Property("immunizationEvent", "Reference(Immunization)", "The vaccine administration event being evaluated.", 0, 1, immunizationEvent);
881        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);
882        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);
883        case -1724546052: /*description*/  return new Property("description", "string", "Additional information about the evaluation.", 0, 1, description);
884        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);
885        case -1632295686: /*doseNumber[x]*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
886        case -887709242: /*doseNumber*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
887        case -1826134640: /*doseNumberPositiveInt*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
888        case -333053577: /*doseNumberString*/  return new Property("doseNumber[x]", "positiveInt|string", "Nominal position in a series.", 0, 1, doseNumber);
889        case 1553560673: /*seriesDoses[x]*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
890        case -1936727105: /*seriesDoses*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
891        case -220897801: /*seriesDosesPositiveInt*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
892        case -673569616: /*seriesDosesString*/  return new Property("seriesDoses[x]", "positiveInt|string", "The recommended number of doses to achieve immunity.", 0, 1, seriesDoses);
893        default: return super.getNamedProperty(_hash, _name, _checkValid);
894        }
895
896      }
897
898      @Override
899      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
900        switch (hash) {
901        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
902        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImmunizationEvaluationStatus>
903        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
904        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
905        case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : new Base[] {this.authority}; // Reference
906        case -319593813: /*targetDisease*/ return this.targetDisease == null ? new Base[0] : new Base[] {this.targetDisease}; // CodeableConcept
907        case 1081446840: /*immunizationEvent*/ return this.immunizationEvent == null ? new Base[0] : new Base[] {this.immunizationEvent}; // Reference
908        case -745826705: /*doseStatus*/ return this.doseStatus == null ? new Base[0] : new Base[] {this.doseStatus}; // CodeableConcept
909        case 662783379: /*doseStatusReason*/ return this.doseStatusReason == null ? new Base[0] : this.doseStatusReason.toArray(new Base[this.doseStatusReason.size()]); // CodeableConcept
910        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
911        case -905838985: /*series*/ return this.series == null ? new Base[0] : new Base[] {this.series}; // StringType
912        case -887709242: /*doseNumber*/ return this.doseNumber == null ? new Base[0] : new Base[] {this.doseNumber}; // Type
913        case -1936727105: /*seriesDoses*/ return this.seriesDoses == null ? new Base[0] : new Base[] {this.seriesDoses}; // Type
914        default: return super.getProperty(hash, name, checkValid);
915        }
916
917      }
918
919      @Override
920      public Base setProperty(int hash, String name, Base value) throws FHIRException {
921        switch (hash) {
922        case -1618432855: // identifier
923          this.getIdentifier().add(castToIdentifier(value)); // Identifier
924          return value;
925        case -892481550: // status
926          value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value));
927          this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus>
928          return value;
929        case -791418107: // patient
930          this.patient = castToReference(value); // Reference
931          return value;
932        case 3076014: // date
933          this.date = castToDateTime(value); // DateTimeType
934          return value;
935        case 1475610435: // authority
936          this.authority = castToReference(value); // Reference
937          return value;
938        case -319593813: // targetDisease
939          this.targetDisease = castToCodeableConcept(value); // CodeableConcept
940          return value;
941        case 1081446840: // immunizationEvent
942          this.immunizationEvent = castToReference(value); // Reference
943          return value;
944        case -745826705: // doseStatus
945          this.doseStatus = castToCodeableConcept(value); // CodeableConcept
946          return value;
947        case 662783379: // doseStatusReason
948          this.getDoseStatusReason().add(castToCodeableConcept(value)); // CodeableConcept
949          return value;
950        case -1724546052: // description
951          this.description = castToString(value); // StringType
952          return value;
953        case -905838985: // series
954          this.series = castToString(value); // StringType
955          return value;
956        case -887709242: // doseNumber
957          this.doseNumber = castToType(value); // Type
958          return value;
959        case -1936727105: // seriesDoses
960          this.seriesDoses = castToType(value); // Type
961          return value;
962        default: return super.setProperty(hash, name, value);
963        }
964
965      }
966
967      @Override
968      public Base setProperty(String name, Base value) throws FHIRException {
969        if (name.equals("identifier")) {
970          this.getIdentifier().add(castToIdentifier(value));
971        } else if (name.equals("status")) {
972          value = new ImmunizationEvaluationStatusEnumFactory().fromType(castToCode(value));
973          this.status = (Enumeration) value; // Enumeration<ImmunizationEvaluationStatus>
974        } else if (name.equals("patient")) {
975          this.patient = castToReference(value); // Reference
976        } else if (name.equals("date")) {
977          this.date = castToDateTime(value); // DateTimeType
978        } else if (name.equals("authority")) {
979          this.authority = castToReference(value); // Reference
980        } else if (name.equals("targetDisease")) {
981          this.targetDisease = castToCodeableConcept(value); // CodeableConcept
982        } else if (name.equals("immunizationEvent")) {
983          this.immunizationEvent = castToReference(value); // Reference
984        } else if (name.equals("doseStatus")) {
985          this.doseStatus = castToCodeableConcept(value); // CodeableConcept
986        } else if (name.equals("doseStatusReason")) {
987          this.getDoseStatusReason().add(castToCodeableConcept(value));
988        } else if (name.equals("description")) {
989          this.description = castToString(value); // StringType
990        } else if (name.equals("series")) {
991          this.series = castToString(value); // StringType
992        } else if (name.equals("doseNumber[x]")) {
993          this.doseNumber = castToType(value); // Type
994        } else if (name.equals("seriesDoses[x]")) {
995          this.seriesDoses = castToType(value); // Type
996        } else
997          return super.setProperty(name, value);
998        return value;
999      }
1000
1001      @Override
1002      public Base makeProperty(int hash, String name) throws FHIRException {
1003        switch (hash) {
1004        case -1618432855:  return addIdentifier(); 
1005        case -892481550:  return getStatusElement();
1006        case -791418107:  return getPatient(); 
1007        case 3076014:  return getDateElement();
1008        case 1475610435:  return getAuthority(); 
1009        case -319593813:  return getTargetDisease(); 
1010        case 1081446840:  return getImmunizationEvent(); 
1011        case -745826705:  return getDoseStatus(); 
1012        case 662783379:  return addDoseStatusReason(); 
1013        case -1724546052:  return getDescriptionElement();
1014        case -905838985:  return getSeriesElement();
1015        case -1632295686:  return getDoseNumber(); 
1016        case -887709242:  return getDoseNumber(); 
1017        case 1553560673:  return getSeriesDoses(); 
1018        case -1936727105:  return getSeriesDoses(); 
1019        default: return super.makeProperty(hash, name);
1020        }
1021
1022      }
1023
1024      @Override
1025      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1026        switch (hash) {
1027        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1028        case -892481550: /*status*/ return new String[] {"code"};
1029        case -791418107: /*patient*/ return new String[] {"Reference"};
1030        case 3076014: /*date*/ return new String[] {"dateTime"};
1031        case 1475610435: /*authority*/ return new String[] {"Reference"};
1032        case -319593813: /*targetDisease*/ return new String[] {"CodeableConcept"};
1033        case 1081446840: /*immunizationEvent*/ return new String[] {"Reference"};
1034        case -745826705: /*doseStatus*/ return new String[] {"CodeableConcept"};
1035        case 662783379: /*doseStatusReason*/ return new String[] {"CodeableConcept"};
1036        case -1724546052: /*description*/ return new String[] {"string"};
1037        case -905838985: /*series*/ return new String[] {"string"};
1038        case -887709242: /*doseNumber*/ return new String[] {"positiveInt", "string"};
1039        case -1936727105: /*seriesDoses*/ return new String[] {"positiveInt", "string"};
1040        default: return super.getTypesForProperty(hash, name);
1041        }
1042
1043      }
1044
1045      @Override
1046      public Base addChild(String name) throws FHIRException {
1047        if (name.equals("identifier")) {
1048          return addIdentifier();
1049        }
1050        else if (name.equals("status")) {
1051          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.status");
1052        }
1053        else if (name.equals("patient")) {
1054          this.patient = new Reference();
1055          return this.patient;
1056        }
1057        else if (name.equals("date")) {
1058          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.date");
1059        }
1060        else if (name.equals("authority")) {
1061          this.authority = new Reference();
1062          return this.authority;
1063        }
1064        else if (name.equals("targetDisease")) {
1065          this.targetDisease = new CodeableConcept();
1066          return this.targetDisease;
1067        }
1068        else if (name.equals("immunizationEvent")) {
1069          this.immunizationEvent = new Reference();
1070          return this.immunizationEvent;
1071        }
1072        else if (name.equals("doseStatus")) {
1073          this.doseStatus = new CodeableConcept();
1074          return this.doseStatus;
1075        }
1076        else if (name.equals("doseStatusReason")) {
1077          return addDoseStatusReason();
1078        }
1079        else if (name.equals("description")) {
1080          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.description");
1081        }
1082        else if (name.equals("series")) {
1083          throw new FHIRException("Cannot call addChild on a primitive type ImmunizationEvaluation.series");
1084        }
1085        else if (name.equals("doseNumberPositiveInt")) {
1086          this.doseNumber = new PositiveIntType();
1087          return this.doseNumber;
1088        }
1089        else if (name.equals("doseNumberString")) {
1090          this.doseNumber = new StringType();
1091          return this.doseNumber;
1092        }
1093        else if (name.equals("seriesDosesPositiveInt")) {
1094          this.seriesDoses = new PositiveIntType();
1095          return this.seriesDoses;
1096        }
1097        else if (name.equals("seriesDosesString")) {
1098          this.seriesDoses = new StringType();
1099          return this.seriesDoses;
1100        }
1101        else
1102          return super.addChild(name);
1103      }
1104
1105  public String fhirType() {
1106    return "ImmunizationEvaluation";
1107
1108  }
1109
1110      public ImmunizationEvaluation copy() {
1111        ImmunizationEvaluation dst = new ImmunizationEvaluation();
1112        copyValues(dst);
1113        if (identifier != null) {
1114          dst.identifier = new ArrayList<Identifier>();
1115          for (Identifier i : identifier)
1116            dst.identifier.add(i.copy());
1117        };
1118        dst.status = status == null ? null : status.copy();
1119        dst.patient = patient == null ? null : patient.copy();
1120        dst.date = date == null ? null : date.copy();
1121        dst.authority = authority == null ? null : authority.copy();
1122        dst.targetDisease = targetDisease == null ? null : targetDisease.copy();
1123        dst.immunizationEvent = immunizationEvent == null ? null : immunizationEvent.copy();
1124        dst.doseStatus = doseStatus == null ? null : doseStatus.copy();
1125        if (doseStatusReason != null) {
1126          dst.doseStatusReason = new ArrayList<CodeableConcept>();
1127          for (CodeableConcept i : doseStatusReason)
1128            dst.doseStatusReason.add(i.copy());
1129        };
1130        dst.description = description == null ? null : description.copy();
1131        dst.series = series == null ? null : series.copy();
1132        dst.doseNumber = doseNumber == null ? null : doseNumber.copy();
1133        dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy();
1134        return dst;
1135      }
1136
1137      protected ImmunizationEvaluation typedCopy() {
1138        return copy();
1139      }
1140
1141      @Override
1142      public boolean equalsDeep(Base other_) {
1143        if (!super.equalsDeep(other_))
1144          return false;
1145        if (!(other_ instanceof ImmunizationEvaluation))
1146          return false;
1147        ImmunizationEvaluation o = (ImmunizationEvaluation) other_;
1148        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true)
1149           && compareDeep(date, o.date, true) && compareDeep(authority, o.authority, true) && compareDeep(targetDisease, o.targetDisease, true)
1150           && compareDeep(immunizationEvent, o.immunizationEvent, true) && compareDeep(doseStatus, o.doseStatus, true)
1151           && compareDeep(doseStatusReason, o.doseStatusReason, true) && compareDeep(description, o.description, true)
1152           && compareDeep(series, o.series, true) && compareDeep(doseNumber, o.doseNumber, true) && compareDeep(seriesDoses, o.seriesDoses, true)
1153          ;
1154      }
1155
1156      @Override
1157      public boolean equalsShallow(Base other_) {
1158        if (!super.equalsShallow(other_))
1159          return false;
1160        if (!(other_ instanceof ImmunizationEvaluation))
1161          return false;
1162        ImmunizationEvaluation o = (ImmunizationEvaluation) other_;
1163        return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true)
1164           && compareValues(series, o.series, true);
1165      }
1166
1167      public boolean isEmpty() {
1168        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient
1169          , date, authority, targetDisease, immunizationEvent, doseStatus, doseStatusReason
1170          , description, series, doseNumber, seriesDoses);
1171      }
1172
1173  @Override
1174  public ResourceType getResourceType() {
1175    return ResourceType.ImmunizationEvaluation;
1176   }
1177
1178 /**
1179   * Search parameter: <b>date</b>
1180   * <p>
1181   * Description: <b>Date the evaluation was generated</b><br>
1182   * Type: <b>date</b><br>
1183   * Path: <b>ImmunizationEvaluation.date</b><br>
1184   * </p>
1185   */
1186  @SearchParamDefinition(name="date", path="ImmunizationEvaluation.date", description="Date the evaluation was generated", type="date" )
1187  public static final String SP_DATE = "date";
1188 /**
1189   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1190   * <p>
1191   * Description: <b>Date the evaluation was generated</b><br>
1192   * Type: <b>date</b><br>
1193   * Path: <b>ImmunizationEvaluation.date</b><br>
1194   * </p>
1195   */
1196  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1197
1198 /**
1199   * Search parameter: <b>identifier</b>
1200   * <p>
1201   * Description: <b>ID of the evaluation</b><br>
1202   * Type: <b>token</b><br>
1203   * Path: <b>ImmunizationEvaluation.identifier</b><br>
1204   * </p>
1205   */
1206  @SearchParamDefinition(name="identifier", path="ImmunizationEvaluation.identifier", description="ID of the evaluation", type="token" )
1207  public static final String SP_IDENTIFIER = "identifier";
1208 /**
1209   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1210   * <p>
1211   * Description: <b>ID of the evaluation</b><br>
1212   * Type: <b>token</b><br>
1213   * Path: <b>ImmunizationEvaluation.identifier</b><br>
1214   * </p>
1215   */
1216  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1217
1218 /**
1219   * Search parameter: <b>target-disease</b>
1220   * <p>
1221   * Description: <b>The vaccine preventable disease being evaluated against</b><br>
1222   * Type: <b>token</b><br>
1223   * Path: <b>ImmunizationEvaluation.targetDisease</b><br>
1224   * </p>
1225   */
1226  @SearchParamDefinition(name="target-disease", path="ImmunizationEvaluation.targetDisease", description="The vaccine preventable disease being evaluated against", type="token" )
1227  public static final String SP_TARGET_DISEASE = "target-disease";
1228 /**
1229   * <b>Fluent Client</b> search parameter constant for <b>target-disease</b>
1230   * <p>
1231   * Description: <b>The vaccine preventable disease being evaluated against</b><br>
1232   * Type: <b>token</b><br>
1233   * Path: <b>ImmunizationEvaluation.targetDisease</b><br>
1234   * </p>
1235   */
1236  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_DISEASE);
1237
1238 /**
1239   * Search parameter: <b>patient</b>
1240   * <p>
1241   * Description: <b>The patient being evaluated</b><br>
1242   * Type: <b>reference</b><br>
1243   * Path: <b>ImmunizationEvaluation.patient</b><br>
1244   * </p>
1245   */
1246  @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 } )
1247  public static final String SP_PATIENT = "patient";
1248 /**
1249   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1250   * <p>
1251   * Description: <b>The patient being evaluated</b><br>
1252   * Type: <b>reference</b><br>
1253   * Path: <b>ImmunizationEvaluation.patient</b><br>
1254   * </p>
1255   */
1256  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1257
1258/**
1259   * Constant for fluent queries to be used to add include statements. Specifies
1260   * the path value of "<b>ImmunizationEvaluation:patient</b>".
1261   */
1262  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImmunizationEvaluation:patient").toLocked();
1263
1264 /**
1265   * Search parameter: <b>dose-status</b>
1266   * <p>
1267   * Description: <b>The status of the dose relative to published recommendations</b><br>
1268   * Type: <b>token</b><br>
1269   * Path: <b>ImmunizationEvaluation.doseStatus</b><br>
1270   * </p>
1271   */
1272  @SearchParamDefinition(name="dose-status", path="ImmunizationEvaluation.doseStatus", description="The status of the dose relative to published recommendations", type="token" )
1273  public static final String SP_DOSE_STATUS = "dose-status";
1274 /**
1275   * <b>Fluent Client</b> search parameter constant for <b>dose-status</b>
1276   * <p>
1277   * Description: <b>The status of the dose relative to published recommendations</b><br>
1278   * Type: <b>token</b><br>
1279   * Path: <b>ImmunizationEvaluation.doseStatus</b><br>
1280   * </p>
1281   */
1282  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DOSE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DOSE_STATUS);
1283
1284 /**
1285   * Search parameter: <b>immunization-event</b>
1286   * <p>
1287   * Description: <b>The vaccine administration event being evaluated</b><br>
1288   * Type: <b>reference</b><br>
1289   * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br>
1290   * </p>
1291   */
1292  @SearchParamDefinition(name="immunization-event", path="ImmunizationEvaluation.immunizationEvent", description="The vaccine administration event being evaluated", type="reference", target={Immunization.class } )
1293  public static final String SP_IMMUNIZATION_EVENT = "immunization-event";
1294 /**
1295   * <b>Fluent Client</b> search parameter constant for <b>immunization-event</b>
1296   * <p>
1297   * Description: <b>The vaccine administration event being evaluated</b><br>
1298   * Type: <b>reference</b><br>
1299   * Path: <b>ImmunizationEvaluation.immunizationEvent</b><br>
1300   * </p>
1301   */
1302  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam IMMUNIZATION_EVENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_IMMUNIZATION_EVENT);
1303
1304/**
1305   * Constant for fluent queries to be used to add include statements. Specifies
1306   * the path value of "<b>ImmunizationEvaluation:immunization-event</b>".
1307   */
1308  public static final ca.uhn.fhir.model.api.Include INCLUDE_IMMUNIZATION_EVENT = new ca.uhn.fhir.model.api.Include("ImmunizationEvaluation:immunization-event").toLocked();
1309
1310 /**
1311   * Search parameter: <b>status</b>
1312   * <p>
1313   * Description: <b>Immunization evaluation status</b><br>
1314   * Type: <b>token</b><br>
1315   * Path: <b>ImmunizationEvaluation.status</b><br>
1316   * </p>
1317   */
1318  @SearchParamDefinition(name="status", path="ImmunizationEvaluation.status", description="Immunization evaluation status", type="token" )
1319  public static final String SP_STATUS = "status";
1320 /**
1321   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1322   * <p>
1323   * Description: <b>Immunization evaluation status</b><br>
1324   * Type: <b>token</b><br>
1325   * Path: <b>ImmunizationEvaluation.status</b><br>
1326   * </p>
1327   */
1328  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1329
1330
1331}
1332