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