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