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