001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.
052 */
053@ResourceDef(name="Immunization", profile="http://hl7.org/fhir/StructureDefinition/Immunization")
054public class Immunization extends DomainResource {
055
056    public enum ImmunizationStatusCodes {
057        /**
058         * The event has now concluded.
059         */
060        COMPLETED, 
061        /**
062         * This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be \"stopped\" rather than \"entered-in-error\".).
063         */
064        ENTEREDINERROR, 
065        /**
066         * The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.
067         */
068        NOTDONE, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static ImmunizationStatusCodes fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("completed".equals(codeString))
077          return COMPLETED;
078        if ("entered-in-error".equals(codeString))
079          return ENTEREDINERROR;
080        if ("not-done".equals(codeString))
081          return NOTDONE;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown ImmunizationStatusCodes code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case COMPLETED: return "completed";
090            case ENTEREDINERROR: return "entered-in-error";
091            case NOTDONE: return "not-done";
092            case NULL: return null;
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case COMPLETED: return "http://hl7.org/fhir/event-status";
099            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
100            case NOTDONE: return "http://hl7.org/fhir/event-status";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDefinition() {
106          switch (this) {
107            case COMPLETED: return "The event has now concluded.";
108            case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be \"stopped\" rather than \"entered-in-error\".).";
109            case NOTDONE: return "The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.";
110            case NULL: return null;
111            default: return "?";
112          }
113        }
114        public String getDisplay() {
115          switch (this) {
116            case COMPLETED: return "Completed";
117            case ENTEREDINERROR: return "Entered in Error";
118            case NOTDONE: return "Not Done";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123    }
124
125  public static class ImmunizationStatusCodesEnumFactory implements EnumFactory<ImmunizationStatusCodes> {
126    public ImmunizationStatusCodes 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 ImmunizationStatusCodes.COMPLETED;
132        if ("entered-in-error".equals(codeString))
133          return ImmunizationStatusCodes.ENTEREDINERROR;
134        if ("not-done".equals(codeString))
135          return ImmunizationStatusCodes.NOTDONE;
136        throw new IllegalArgumentException("Unknown ImmunizationStatusCodes code '"+codeString+"'");
137        }
138        public Enumeration<ImmunizationStatusCodes> fromType(Base code) throws FHIRException {
139          if (code == null)
140            return null;
141          if (code.isEmpty())
142            return new Enumeration<ImmunizationStatusCodes>(this);
143          String codeString = ((PrimitiveType) code).asStringValue();
144          if (codeString == null || "".equals(codeString))
145            return null;
146        if ("completed".equals(codeString))
147          return new Enumeration<ImmunizationStatusCodes>(this, ImmunizationStatusCodes.COMPLETED);
148        if ("entered-in-error".equals(codeString))
149          return new Enumeration<ImmunizationStatusCodes>(this, ImmunizationStatusCodes.ENTEREDINERROR);
150        if ("not-done".equals(codeString))
151          return new Enumeration<ImmunizationStatusCodes>(this, ImmunizationStatusCodes.NOTDONE);
152        throw new FHIRException("Unknown ImmunizationStatusCodes code '"+codeString+"'");
153        }
154    public String toCode(ImmunizationStatusCodes code) {
155      if (code == ImmunizationStatusCodes.COMPLETED)
156        return "completed";
157      if (code == ImmunizationStatusCodes.ENTEREDINERROR)
158        return "entered-in-error";
159      if (code == ImmunizationStatusCodes.NOTDONE)
160        return "not-done";
161      return "?";
162      }
163    public String toSystem(ImmunizationStatusCodes code) {
164      return code.getSystem();
165      }
166    }
167
168    @Block()
169    public static class ImmunizationPerformerComponent extends BackboneElement implements IBaseBackboneElement {
170        /**
171         * Describes the type of performance (e.g. ordering provider, administering provider, etc.).
172         */
173        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
174        @Description(shortDefinition="What type of performance was done", formalDefinition="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." )
175        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-function")
176        protected CodeableConcept function;
177
178        /**
179         * The practitioner or organization who performed the action.
180         */
181        @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true)
182        @Description(shortDefinition="Individual or organization who was performing", formalDefinition="The practitioner or organization who performed the action." )
183        protected Reference actor;
184
185        private static final long serialVersionUID = -576943815L;
186
187    /**
188     * Constructor
189     */
190      public ImmunizationPerformerComponent() {
191        super();
192      }
193
194    /**
195     * Constructor
196     */
197      public ImmunizationPerformerComponent(Reference actor) {
198        super();
199        this.setActor(actor);
200      }
201
202        /**
203         * @return {@link #function} (Describes the type of performance (e.g. ordering provider, administering provider, etc.).)
204         */
205        public CodeableConcept getFunction() { 
206          if (this.function == null)
207            if (Configuration.errorOnAutoCreate())
208              throw new Error("Attempt to auto-create ImmunizationPerformerComponent.function");
209            else if (Configuration.doAutoCreate())
210              this.function = new CodeableConcept(); // cc
211          return this.function;
212        }
213
214        public boolean hasFunction() { 
215          return this.function != null && !this.function.isEmpty();
216        }
217
218        /**
219         * @param value {@link #function} (Describes the type of performance (e.g. ordering provider, administering provider, etc.).)
220         */
221        public ImmunizationPerformerComponent setFunction(CodeableConcept value) { 
222          this.function = value;
223          return this;
224        }
225
226        /**
227         * @return {@link #actor} (The practitioner or organization who performed the action.)
228         */
229        public Reference getActor() { 
230          if (this.actor == null)
231            if (Configuration.errorOnAutoCreate())
232              throw new Error("Attempt to auto-create ImmunizationPerformerComponent.actor");
233            else if (Configuration.doAutoCreate())
234              this.actor = new Reference(); // cc
235          return this.actor;
236        }
237
238        public boolean hasActor() { 
239          return this.actor != null && !this.actor.isEmpty();
240        }
241
242        /**
243         * @param value {@link #actor} (The practitioner or organization who performed the action.)
244         */
245        public ImmunizationPerformerComponent setActor(Reference value) { 
246          this.actor = value;
247          return this;
248        }
249
250        protected void listChildren(List<Property> children) {
251          super.listChildren(children);
252          children.add(new Property("function", "CodeableConcept", "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, function));
253          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "The practitioner or organization who performed the action.", 0, 1, actor));
254        }
255
256        @Override
257        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
258          switch (_hash) {
259          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, function);
260          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "The practitioner or organization who performed the action.", 0, 1, actor);
261          default: return super.getNamedProperty(_hash, _name, _checkValid);
262          }
263
264        }
265
266      @Override
267      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
268        switch (hash) {
269        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
270        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
271        default: return super.getProperty(hash, name, checkValid);
272        }
273
274      }
275
276      @Override
277      public Base setProperty(int hash, String name, Base value) throws FHIRException {
278        switch (hash) {
279        case 1380938712: // function
280          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
281          return value;
282        case 92645877: // actor
283          this.actor = TypeConvertor.castToReference(value); // Reference
284          return value;
285        default: return super.setProperty(hash, name, value);
286        }
287
288      }
289
290      @Override
291      public Base setProperty(String name, Base value) throws FHIRException {
292        if (name.equals("function")) {
293          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
294        } else if (name.equals("actor")) {
295          this.actor = TypeConvertor.castToReference(value); // Reference
296        } else
297          return super.setProperty(name, value);
298        return value;
299      }
300
301      @Override
302      public Base makeProperty(int hash, String name) throws FHIRException {
303        switch (hash) {
304        case 1380938712:  return getFunction();
305        case 92645877:  return getActor();
306        default: return super.makeProperty(hash, name);
307        }
308
309      }
310
311      @Override
312      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
313        switch (hash) {
314        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
315        case 92645877: /*actor*/ return new String[] {"Reference"};
316        default: return super.getTypesForProperty(hash, name);
317        }
318
319      }
320
321      @Override
322      public Base addChild(String name) throws FHIRException {
323        if (name.equals("function")) {
324          this.function = new CodeableConcept();
325          return this.function;
326        }
327        else if (name.equals("actor")) {
328          this.actor = new Reference();
329          return this.actor;
330        }
331        else
332          return super.addChild(name);
333      }
334
335      public ImmunizationPerformerComponent copy() {
336        ImmunizationPerformerComponent dst = new ImmunizationPerformerComponent();
337        copyValues(dst);
338        return dst;
339      }
340
341      public void copyValues(ImmunizationPerformerComponent dst) {
342        super.copyValues(dst);
343        dst.function = function == null ? null : function.copy();
344        dst.actor = actor == null ? null : actor.copy();
345      }
346
347      @Override
348      public boolean equalsDeep(Base other_) {
349        if (!super.equalsDeep(other_))
350          return false;
351        if (!(other_ instanceof ImmunizationPerformerComponent))
352          return false;
353        ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_;
354        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
355      }
356
357      @Override
358      public boolean equalsShallow(Base other_) {
359        if (!super.equalsShallow(other_))
360          return false;
361        if (!(other_ instanceof ImmunizationPerformerComponent))
362          return false;
363        ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_;
364        return true;
365      }
366
367      public boolean isEmpty() {
368        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
369      }
370
371  public String fhirType() {
372    return "Immunization.performer";
373
374  }
375
376  }
377
378    @Block()
379    public static class ImmunizationEducationComponent extends BackboneElement implements IBaseBackboneElement {
380        /**
381         * Identifier of the material presented to the patient.
382         */
383        @Child(name = "documentType", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
384        @Description(shortDefinition="Educational material document identifier", formalDefinition="Identifier of the material presented to the patient." )
385        protected StringType documentType;
386
387        /**
388         * Reference pointer to the educational material given to the patient if the information was on line.
389         */
390        @Child(name = "reference", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
391        @Description(shortDefinition="Educational material reference pointer", formalDefinition="Reference pointer to the educational material given to the patient if the information was on line." )
392        protected UriType reference;
393
394        /**
395         * Date the educational material was published.
396         */
397        @Child(name = "publicationDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
398        @Description(shortDefinition="Educational material publication date", formalDefinition="Date the educational material was published." )
399        protected DateTimeType publicationDate;
400
401        /**
402         * Date the educational material was given to the patient.
403         */
404        @Child(name = "presentationDate", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
405        @Description(shortDefinition="Educational material presentation date", formalDefinition="Date the educational material was given to the patient." )
406        protected DateTimeType presentationDate;
407
408        private static final long serialVersionUID = -1277654827L;
409
410    /**
411     * Constructor
412     */
413      public ImmunizationEducationComponent() {
414        super();
415      }
416
417        /**
418         * @return {@link #documentType} (Identifier of the material presented to the patient.). This is the underlying object with id, value and extensions. The accessor "getDocumentType" gives direct access to the value
419         */
420        public StringType getDocumentTypeElement() { 
421          if (this.documentType == null)
422            if (Configuration.errorOnAutoCreate())
423              throw new Error("Attempt to auto-create ImmunizationEducationComponent.documentType");
424            else if (Configuration.doAutoCreate())
425              this.documentType = new StringType(); // bb
426          return this.documentType;
427        }
428
429        public boolean hasDocumentTypeElement() { 
430          return this.documentType != null && !this.documentType.isEmpty();
431        }
432
433        public boolean hasDocumentType() { 
434          return this.documentType != null && !this.documentType.isEmpty();
435        }
436
437        /**
438         * @param value {@link #documentType} (Identifier of the material presented to the patient.). This is the underlying object with id, value and extensions. The accessor "getDocumentType" gives direct access to the value
439         */
440        public ImmunizationEducationComponent setDocumentTypeElement(StringType value) { 
441          this.documentType = value;
442          return this;
443        }
444
445        /**
446         * @return Identifier of the material presented to the patient.
447         */
448        public String getDocumentType() { 
449          return this.documentType == null ? null : this.documentType.getValue();
450        }
451
452        /**
453         * @param value Identifier of the material presented to the patient.
454         */
455        public ImmunizationEducationComponent setDocumentType(String value) { 
456          if (Utilities.noString(value))
457            this.documentType = null;
458          else {
459            if (this.documentType == null)
460              this.documentType = new StringType();
461            this.documentType.setValue(value);
462          }
463          return this;
464        }
465
466        /**
467         * @return {@link #reference} (Reference pointer to the educational material given to the patient if the information was on line.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
468         */
469        public UriType getReferenceElement() { 
470          if (this.reference == null)
471            if (Configuration.errorOnAutoCreate())
472              throw new Error("Attempt to auto-create ImmunizationEducationComponent.reference");
473            else if (Configuration.doAutoCreate())
474              this.reference = new UriType(); // bb
475          return this.reference;
476        }
477
478        public boolean hasReferenceElement() { 
479          return this.reference != null && !this.reference.isEmpty();
480        }
481
482        public boolean hasReference() { 
483          return this.reference != null && !this.reference.isEmpty();
484        }
485
486        /**
487         * @param value {@link #reference} (Reference pointer to the educational material given to the patient if the information was on line.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
488         */
489        public ImmunizationEducationComponent setReferenceElement(UriType value) { 
490          this.reference = value;
491          return this;
492        }
493
494        /**
495         * @return Reference pointer to the educational material given to the patient if the information was on line.
496         */
497        public String getReference() { 
498          return this.reference == null ? null : this.reference.getValue();
499        }
500
501        /**
502         * @param value Reference pointer to the educational material given to the patient if the information was on line.
503         */
504        public ImmunizationEducationComponent setReference(String value) { 
505          if (Utilities.noString(value))
506            this.reference = null;
507          else {
508            if (this.reference == null)
509              this.reference = new UriType();
510            this.reference.setValue(value);
511          }
512          return this;
513        }
514
515        /**
516         * @return {@link #publicationDate} (Date the educational material was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value
517         */
518        public DateTimeType getPublicationDateElement() { 
519          if (this.publicationDate == null)
520            if (Configuration.errorOnAutoCreate())
521              throw new Error("Attempt to auto-create ImmunizationEducationComponent.publicationDate");
522            else if (Configuration.doAutoCreate())
523              this.publicationDate = new DateTimeType(); // bb
524          return this.publicationDate;
525        }
526
527        public boolean hasPublicationDateElement() { 
528          return this.publicationDate != null && !this.publicationDate.isEmpty();
529        }
530
531        public boolean hasPublicationDate() { 
532          return this.publicationDate != null && !this.publicationDate.isEmpty();
533        }
534
535        /**
536         * @param value {@link #publicationDate} (Date the educational material was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value
537         */
538        public ImmunizationEducationComponent setPublicationDateElement(DateTimeType value) { 
539          this.publicationDate = value;
540          return this;
541        }
542
543        /**
544         * @return Date the educational material was published.
545         */
546        public Date getPublicationDate() { 
547          return this.publicationDate == null ? null : this.publicationDate.getValue();
548        }
549
550        /**
551         * @param value Date the educational material was published.
552         */
553        public ImmunizationEducationComponent setPublicationDate(Date value) { 
554          if (value == null)
555            this.publicationDate = null;
556          else {
557            if (this.publicationDate == null)
558              this.publicationDate = new DateTimeType();
559            this.publicationDate.setValue(value);
560          }
561          return this;
562        }
563
564        /**
565         * @return {@link #presentationDate} (Date the educational material was given to the patient.). This is the underlying object with id, value and extensions. The accessor "getPresentationDate" gives direct access to the value
566         */
567        public DateTimeType getPresentationDateElement() { 
568          if (this.presentationDate == null)
569            if (Configuration.errorOnAutoCreate())
570              throw new Error("Attempt to auto-create ImmunizationEducationComponent.presentationDate");
571            else if (Configuration.doAutoCreate())
572              this.presentationDate = new DateTimeType(); // bb
573          return this.presentationDate;
574        }
575
576        public boolean hasPresentationDateElement() { 
577          return this.presentationDate != null && !this.presentationDate.isEmpty();
578        }
579
580        public boolean hasPresentationDate() { 
581          return this.presentationDate != null && !this.presentationDate.isEmpty();
582        }
583
584        /**
585         * @param value {@link #presentationDate} (Date the educational material was given to the patient.). This is the underlying object with id, value and extensions. The accessor "getPresentationDate" gives direct access to the value
586         */
587        public ImmunizationEducationComponent setPresentationDateElement(DateTimeType value) { 
588          this.presentationDate = value;
589          return this;
590        }
591
592        /**
593         * @return Date the educational material was given to the patient.
594         */
595        public Date getPresentationDate() { 
596          return this.presentationDate == null ? null : this.presentationDate.getValue();
597        }
598
599        /**
600         * @param value Date the educational material was given to the patient.
601         */
602        public ImmunizationEducationComponent setPresentationDate(Date value) { 
603          if (value == null)
604            this.presentationDate = null;
605          else {
606            if (this.presentationDate == null)
607              this.presentationDate = new DateTimeType();
608            this.presentationDate.setValue(value);
609          }
610          return this;
611        }
612
613        protected void listChildren(List<Property> children) {
614          super.listChildren(children);
615          children.add(new Property("documentType", "string", "Identifier of the material presented to the patient.", 0, 1, documentType));
616          children.add(new Property("reference", "uri", "Reference pointer to the educational material given to the patient if the information was on line.", 0, 1, reference));
617          children.add(new Property("publicationDate", "dateTime", "Date the educational material was published.", 0, 1, publicationDate));
618          children.add(new Property("presentationDate", "dateTime", "Date the educational material was given to the patient.", 0, 1, presentationDate));
619        }
620
621        @Override
622        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
623          switch (_hash) {
624          case -1473196299: /*documentType*/  return new Property("documentType", "string", "Identifier of the material presented to the patient.", 0, 1, documentType);
625          case -925155509: /*reference*/  return new Property("reference", "uri", "Reference pointer to the educational material given to the patient if the information was on line.", 0, 1, reference);
626          case 1470566394: /*publicationDate*/  return new Property("publicationDate", "dateTime", "Date the educational material was published.", 0, 1, publicationDate);
627          case 1602373096: /*presentationDate*/  return new Property("presentationDate", "dateTime", "Date the educational material was given to the patient.", 0, 1, presentationDate);
628          default: return super.getNamedProperty(_hash, _name, _checkValid);
629          }
630
631        }
632
633      @Override
634      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
635        switch (hash) {
636        case -1473196299: /*documentType*/ return this.documentType == null ? new Base[0] : new Base[] {this.documentType}; // StringType
637        case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // UriType
638        case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateTimeType
639        case 1602373096: /*presentationDate*/ return this.presentationDate == null ? new Base[0] : new Base[] {this.presentationDate}; // DateTimeType
640        default: return super.getProperty(hash, name, checkValid);
641        }
642
643      }
644
645      @Override
646      public Base setProperty(int hash, String name, Base value) throws FHIRException {
647        switch (hash) {
648        case -1473196299: // documentType
649          this.documentType = TypeConvertor.castToString(value); // StringType
650          return value;
651        case -925155509: // reference
652          this.reference = TypeConvertor.castToUri(value); // UriType
653          return value;
654        case 1470566394: // publicationDate
655          this.publicationDate = TypeConvertor.castToDateTime(value); // DateTimeType
656          return value;
657        case 1602373096: // presentationDate
658          this.presentationDate = TypeConvertor.castToDateTime(value); // DateTimeType
659          return value;
660        default: return super.setProperty(hash, name, value);
661        }
662
663      }
664
665      @Override
666      public Base setProperty(String name, Base value) throws FHIRException {
667        if (name.equals("documentType")) {
668          this.documentType = TypeConvertor.castToString(value); // StringType
669        } else if (name.equals("reference")) {
670          this.reference = TypeConvertor.castToUri(value); // UriType
671        } else if (name.equals("publicationDate")) {
672          this.publicationDate = TypeConvertor.castToDateTime(value); // DateTimeType
673        } else if (name.equals("presentationDate")) {
674          this.presentationDate = TypeConvertor.castToDateTime(value); // DateTimeType
675        } else
676          return super.setProperty(name, value);
677        return value;
678      }
679
680      @Override
681      public Base makeProperty(int hash, String name) throws FHIRException {
682        switch (hash) {
683        case -1473196299:  return getDocumentTypeElement();
684        case -925155509:  return getReferenceElement();
685        case 1470566394:  return getPublicationDateElement();
686        case 1602373096:  return getPresentationDateElement();
687        default: return super.makeProperty(hash, name);
688        }
689
690      }
691
692      @Override
693      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
694        switch (hash) {
695        case -1473196299: /*documentType*/ return new String[] {"string"};
696        case -925155509: /*reference*/ return new String[] {"uri"};
697        case 1470566394: /*publicationDate*/ return new String[] {"dateTime"};
698        case 1602373096: /*presentationDate*/ return new String[] {"dateTime"};
699        default: return super.getTypesForProperty(hash, name);
700        }
701
702      }
703
704      @Override
705      public Base addChild(String name) throws FHIRException {
706        if (name.equals("documentType")) {
707          throw new FHIRException("Cannot call addChild on a primitive type Immunization.education.documentType");
708        }
709        else if (name.equals("reference")) {
710          throw new FHIRException("Cannot call addChild on a primitive type Immunization.education.reference");
711        }
712        else if (name.equals("publicationDate")) {
713          throw new FHIRException("Cannot call addChild on a primitive type Immunization.education.publicationDate");
714        }
715        else if (name.equals("presentationDate")) {
716          throw new FHIRException("Cannot call addChild on a primitive type Immunization.education.presentationDate");
717        }
718        else
719          return super.addChild(name);
720      }
721
722      public ImmunizationEducationComponent copy() {
723        ImmunizationEducationComponent dst = new ImmunizationEducationComponent();
724        copyValues(dst);
725        return dst;
726      }
727
728      public void copyValues(ImmunizationEducationComponent dst) {
729        super.copyValues(dst);
730        dst.documentType = documentType == null ? null : documentType.copy();
731        dst.reference = reference == null ? null : reference.copy();
732        dst.publicationDate = publicationDate == null ? null : publicationDate.copy();
733        dst.presentationDate = presentationDate == null ? null : presentationDate.copy();
734      }
735
736      @Override
737      public boolean equalsDeep(Base other_) {
738        if (!super.equalsDeep(other_))
739          return false;
740        if (!(other_ instanceof ImmunizationEducationComponent))
741          return false;
742        ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_;
743        return compareDeep(documentType, o.documentType, true) && compareDeep(reference, o.reference, true)
744           && compareDeep(publicationDate, o.publicationDate, true) && compareDeep(presentationDate, o.presentationDate, true)
745          ;
746      }
747
748      @Override
749      public boolean equalsShallow(Base other_) {
750        if (!super.equalsShallow(other_))
751          return false;
752        if (!(other_ instanceof ImmunizationEducationComponent))
753          return false;
754        ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_;
755        return compareValues(documentType, o.documentType, true) && compareValues(reference, o.reference, true)
756           && compareValues(publicationDate, o.publicationDate, true) && compareValues(presentationDate, o.presentationDate, true)
757          ;
758      }
759
760      public boolean isEmpty() {
761        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(documentType, reference, publicationDate
762          , presentationDate);
763      }
764
765  public String fhirType() {
766    return "Immunization.education";
767
768  }
769
770  }
771
772    @Block()
773    public static class ImmunizationReactionComponent extends BackboneElement implements IBaseBackboneElement {
774        /**
775         * Date of reaction to the immunization.
776         */
777        @Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
778        @Description(shortDefinition="When reaction started", formalDefinition="Date of reaction to the immunization." )
779        protected DateTimeType date;
780
781        /**
782         * Details of the reaction.
783         */
784        @Child(name = "manifestation", type = {CodeableReference.class}, order=2, min=0, max=1, modifier=false, summary=false)
785        @Description(shortDefinition="Additional information on reaction", formalDefinition="Details of the reaction." )
786        protected CodeableReference manifestation;
787
788        /**
789         * Self-reported indicator.
790         */
791        @Child(name = "reported", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
792        @Description(shortDefinition="Indicates self-reported reaction", formalDefinition="Self-reported indicator." )
793        protected BooleanType reported;
794
795        private static final long serialVersionUID = 1181151012L;
796
797    /**
798     * Constructor
799     */
800      public ImmunizationReactionComponent() {
801        super();
802      }
803
804        /**
805         * @return {@link #date} (Date of reaction to the immunization.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
806         */
807        public DateTimeType getDateElement() { 
808          if (this.date == null)
809            if (Configuration.errorOnAutoCreate())
810              throw new Error("Attempt to auto-create ImmunizationReactionComponent.date");
811            else if (Configuration.doAutoCreate())
812              this.date = new DateTimeType(); // bb
813          return this.date;
814        }
815
816        public boolean hasDateElement() { 
817          return this.date != null && !this.date.isEmpty();
818        }
819
820        public boolean hasDate() { 
821          return this.date != null && !this.date.isEmpty();
822        }
823
824        /**
825         * @param value {@link #date} (Date of reaction to the immunization.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
826         */
827        public ImmunizationReactionComponent setDateElement(DateTimeType value) { 
828          this.date = value;
829          return this;
830        }
831
832        /**
833         * @return Date of reaction to the immunization.
834         */
835        public Date getDate() { 
836          return this.date == null ? null : this.date.getValue();
837        }
838
839        /**
840         * @param value Date of reaction to the immunization.
841         */
842        public ImmunizationReactionComponent setDate(Date value) { 
843          if (value == null)
844            this.date = null;
845          else {
846            if (this.date == null)
847              this.date = new DateTimeType();
848            this.date.setValue(value);
849          }
850          return this;
851        }
852
853        /**
854         * @return {@link #manifestation} (Details of the reaction.)
855         */
856        public CodeableReference getManifestation() { 
857          if (this.manifestation == null)
858            if (Configuration.errorOnAutoCreate())
859              throw new Error("Attempt to auto-create ImmunizationReactionComponent.manifestation");
860            else if (Configuration.doAutoCreate())
861              this.manifestation = new CodeableReference(); // cc
862          return this.manifestation;
863        }
864
865        public boolean hasManifestation() { 
866          return this.manifestation != null && !this.manifestation.isEmpty();
867        }
868
869        /**
870         * @param value {@link #manifestation} (Details of the reaction.)
871         */
872        public ImmunizationReactionComponent setManifestation(CodeableReference value) { 
873          this.manifestation = value;
874          return this;
875        }
876
877        /**
878         * @return {@link #reported} (Self-reported indicator.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value
879         */
880        public BooleanType getReportedElement() { 
881          if (this.reported == null)
882            if (Configuration.errorOnAutoCreate())
883              throw new Error("Attempt to auto-create ImmunizationReactionComponent.reported");
884            else if (Configuration.doAutoCreate())
885              this.reported = new BooleanType(); // bb
886          return this.reported;
887        }
888
889        public boolean hasReportedElement() { 
890          return this.reported != null && !this.reported.isEmpty();
891        }
892
893        public boolean hasReported() { 
894          return this.reported != null && !this.reported.isEmpty();
895        }
896
897        /**
898         * @param value {@link #reported} (Self-reported indicator.). This is the underlying object with id, value and extensions. The accessor "getReported" gives direct access to the value
899         */
900        public ImmunizationReactionComponent setReportedElement(BooleanType value) { 
901          this.reported = value;
902          return this;
903        }
904
905        /**
906         * @return Self-reported indicator.
907         */
908        public boolean getReported() { 
909          return this.reported == null || this.reported.isEmpty() ? false : this.reported.getValue();
910        }
911
912        /**
913         * @param value Self-reported indicator.
914         */
915        public ImmunizationReactionComponent setReported(boolean value) { 
916            if (this.reported == null)
917              this.reported = new BooleanType();
918            this.reported.setValue(value);
919          return this;
920        }
921
922        protected void listChildren(List<Property> children) {
923          super.listChildren(children);
924          children.add(new Property("date", "dateTime", "Date of reaction to the immunization.", 0, 1, date));
925          children.add(new Property("manifestation", "CodeableReference(Observation)", "Details of the reaction.", 0, 1, manifestation));
926          children.add(new Property("reported", "boolean", "Self-reported indicator.", 0, 1, reported));
927        }
928
929        @Override
930        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
931          switch (_hash) {
932          case 3076014: /*date*/  return new Property("date", "dateTime", "Date of reaction to the immunization.", 0, 1, date);
933          case 1115984422: /*manifestation*/  return new Property("manifestation", "CodeableReference(Observation)", "Details of the reaction.", 0, 1, manifestation);
934          case -427039533: /*reported*/  return new Property("reported", "boolean", "Self-reported indicator.", 0, 1, reported);
935          default: return super.getNamedProperty(_hash, _name, _checkValid);
936          }
937
938        }
939
940      @Override
941      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
942        switch (hash) {
943        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
944        case 1115984422: /*manifestation*/ return this.manifestation == null ? new Base[0] : new Base[] {this.manifestation}; // CodeableReference
945        case -427039533: /*reported*/ return this.reported == null ? new Base[0] : new Base[] {this.reported}; // BooleanType
946        default: return super.getProperty(hash, name, checkValid);
947        }
948
949      }
950
951      @Override
952      public Base setProperty(int hash, String name, Base value) throws FHIRException {
953        switch (hash) {
954        case 3076014: // date
955          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
956          return value;
957        case 1115984422: // manifestation
958          this.manifestation = TypeConvertor.castToCodeableReference(value); // CodeableReference
959          return value;
960        case -427039533: // reported
961          this.reported = TypeConvertor.castToBoolean(value); // BooleanType
962          return value;
963        default: return super.setProperty(hash, name, value);
964        }
965
966      }
967
968      @Override
969      public Base setProperty(String name, Base value) throws FHIRException {
970        if (name.equals("date")) {
971          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
972        } else if (name.equals("manifestation")) {
973          this.manifestation = TypeConvertor.castToCodeableReference(value); // CodeableReference
974        } else if (name.equals("reported")) {
975          this.reported = TypeConvertor.castToBoolean(value); // BooleanType
976        } else
977          return super.setProperty(name, value);
978        return value;
979      }
980
981      @Override
982      public Base makeProperty(int hash, String name) throws FHIRException {
983        switch (hash) {
984        case 3076014:  return getDateElement();
985        case 1115984422:  return getManifestation();
986        case -427039533:  return getReportedElement();
987        default: return super.makeProperty(hash, name);
988        }
989
990      }
991
992      @Override
993      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
994        switch (hash) {
995        case 3076014: /*date*/ return new String[] {"dateTime"};
996        case 1115984422: /*manifestation*/ return new String[] {"CodeableReference"};
997        case -427039533: /*reported*/ return new String[] {"boolean"};
998        default: return super.getTypesForProperty(hash, name);
999        }
1000
1001      }
1002
1003      @Override
1004      public Base addChild(String name) throws FHIRException {
1005        if (name.equals("date")) {
1006          throw new FHIRException("Cannot call addChild on a primitive type Immunization.reaction.date");
1007        }
1008        else if (name.equals("manifestation")) {
1009          this.manifestation = new CodeableReference();
1010          return this.manifestation;
1011        }
1012        else if (name.equals("reported")) {
1013          throw new FHIRException("Cannot call addChild on a primitive type Immunization.reaction.reported");
1014        }
1015        else
1016          return super.addChild(name);
1017      }
1018
1019      public ImmunizationReactionComponent copy() {
1020        ImmunizationReactionComponent dst = new ImmunizationReactionComponent();
1021        copyValues(dst);
1022        return dst;
1023      }
1024
1025      public void copyValues(ImmunizationReactionComponent dst) {
1026        super.copyValues(dst);
1027        dst.date = date == null ? null : date.copy();
1028        dst.manifestation = manifestation == null ? null : manifestation.copy();
1029        dst.reported = reported == null ? null : reported.copy();
1030      }
1031
1032      @Override
1033      public boolean equalsDeep(Base other_) {
1034        if (!super.equalsDeep(other_))
1035          return false;
1036        if (!(other_ instanceof ImmunizationReactionComponent))
1037          return false;
1038        ImmunizationReactionComponent o = (ImmunizationReactionComponent) other_;
1039        return compareDeep(date, o.date, true) && compareDeep(manifestation, o.manifestation, true) && compareDeep(reported, o.reported, true)
1040          ;
1041      }
1042
1043      @Override
1044      public boolean equalsShallow(Base other_) {
1045        if (!super.equalsShallow(other_))
1046          return false;
1047        if (!(other_ instanceof ImmunizationReactionComponent))
1048          return false;
1049        ImmunizationReactionComponent o = (ImmunizationReactionComponent) other_;
1050        return compareValues(date, o.date, true) && compareValues(reported, o.reported, true);
1051      }
1052
1053      public boolean isEmpty() {
1054        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, manifestation, reported
1055          );
1056      }
1057
1058  public String fhirType() {
1059    return "Immunization.reaction";
1060
1061  }
1062
1063  }
1064
1065    @Block()
1066    public static class ImmunizationProtocolAppliedComponent extends BackboneElement implements IBaseBackboneElement {
1067        /**
1068         * One possible path to achieve presumed immunity against a disease - within the context of an authority.
1069         */
1070        @Child(name = "series", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1071        @Description(shortDefinition="Name of vaccine series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." )
1072        protected StringType series;
1073
1074        /**
1075         * Indicates the authority who published the protocol (e.g. ACIP) that is being followed.
1076         */
1077        @Child(name = "authority", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=false)
1078        @Description(shortDefinition="Who is responsible for publishing the recommendations", formalDefinition="Indicates the authority who published the protocol (e.g. ACIP) that is being followed." )
1079        protected Reference authority;
1080
1081        /**
1082         * The vaccine preventable disease the dose is being administered against.
1083         */
1084        @Child(name = "targetDisease", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1085        @Description(shortDefinition="Vaccine preventatable disease being targetted", formalDefinition="The vaccine preventable disease the dose is being administered against." )
1086        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-target-disease")
1087        protected List<CodeableConcept> targetDisease;
1088
1089        /**
1090         * Nominal position in a series as intended by the practitioner administering the dose.
1091         */
1092        @Child(name = "doseNumber", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false)
1093        @Description(shortDefinition="Dose number within series", formalDefinition="Nominal position in a series as intended by the practitioner administering the dose." )
1094        protected StringType doseNumber;
1095
1096        /**
1097         * The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.
1098         */
1099        @Child(name = "seriesDoses", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1100        @Description(shortDefinition="Recommended number of doses for immunity", formalDefinition="The recommended number of doses to achieve immunity as intended by the practitioner administering the dose." )
1101        protected StringType seriesDoses;
1102
1103        private static final long serialVersionUID = 660613103L;
1104
1105    /**
1106     * Constructor
1107     */
1108      public ImmunizationProtocolAppliedComponent() {
1109        super();
1110      }
1111
1112    /**
1113     * Constructor
1114     */
1115      public ImmunizationProtocolAppliedComponent(String doseNumber) {
1116        super();
1117        this.setDoseNumber(doseNumber);
1118      }
1119
1120        /**
1121         * @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
1122         */
1123        public StringType getSeriesElement() { 
1124          if (this.series == null)
1125            if (Configuration.errorOnAutoCreate())
1126              throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.series");
1127            else if (Configuration.doAutoCreate())
1128              this.series = new StringType(); // bb
1129          return this.series;
1130        }
1131
1132        public boolean hasSeriesElement() { 
1133          return this.series != null && !this.series.isEmpty();
1134        }
1135
1136        public boolean hasSeries() { 
1137          return this.series != null && !this.series.isEmpty();
1138        }
1139
1140        /**
1141         * @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
1142         */
1143        public ImmunizationProtocolAppliedComponent setSeriesElement(StringType value) { 
1144          this.series = value;
1145          return this;
1146        }
1147
1148        /**
1149         * @return One possible path to achieve presumed immunity against a disease - within the context of an authority.
1150         */
1151        public String getSeries() { 
1152          return this.series == null ? null : this.series.getValue();
1153        }
1154
1155        /**
1156         * @param value One possible path to achieve presumed immunity against a disease - within the context of an authority.
1157         */
1158        public ImmunizationProtocolAppliedComponent setSeries(String value) { 
1159          if (Utilities.noString(value))
1160            this.series = null;
1161          else {
1162            if (this.series == null)
1163              this.series = new StringType();
1164            this.series.setValue(value);
1165          }
1166          return this;
1167        }
1168
1169        /**
1170         * @return {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP) that is being followed.)
1171         */
1172        public Reference getAuthority() { 
1173          if (this.authority == null)
1174            if (Configuration.errorOnAutoCreate())
1175              throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.authority");
1176            else if (Configuration.doAutoCreate())
1177              this.authority = new Reference(); // cc
1178          return this.authority;
1179        }
1180
1181        public boolean hasAuthority() { 
1182          return this.authority != null && !this.authority.isEmpty();
1183        }
1184
1185        /**
1186         * @param value {@link #authority} (Indicates the authority who published the protocol (e.g. ACIP) that is being followed.)
1187         */
1188        public ImmunizationProtocolAppliedComponent setAuthority(Reference value) { 
1189          this.authority = value;
1190          return this;
1191        }
1192
1193        /**
1194         * @return {@link #targetDisease} (The vaccine preventable disease the dose is being administered against.)
1195         */
1196        public List<CodeableConcept> getTargetDisease() { 
1197          if (this.targetDisease == null)
1198            this.targetDisease = new ArrayList<CodeableConcept>();
1199          return this.targetDisease;
1200        }
1201
1202        /**
1203         * @return Returns a reference to <code>this</code> for easy method chaining
1204         */
1205        public ImmunizationProtocolAppliedComponent setTargetDisease(List<CodeableConcept> theTargetDisease) { 
1206          this.targetDisease = theTargetDisease;
1207          return this;
1208        }
1209
1210        public boolean hasTargetDisease() { 
1211          if (this.targetDisease == null)
1212            return false;
1213          for (CodeableConcept item : this.targetDisease)
1214            if (!item.isEmpty())
1215              return true;
1216          return false;
1217        }
1218
1219        public CodeableConcept addTargetDisease() { //3
1220          CodeableConcept t = new CodeableConcept();
1221          if (this.targetDisease == null)
1222            this.targetDisease = new ArrayList<CodeableConcept>();
1223          this.targetDisease.add(t);
1224          return t;
1225        }
1226
1227        public ImmunizationProtocolAppliedComponent addTargetDisease(CodeableConcept t) { //3
1228          if (t == null)
1229            return this;
1230          if (this.targetDisease == null)
1231            this.targetDisease = new ArrayList<CodeableConcept>();
1232          this.targetDisease.add(t);
1233          return this;
1234        }
1235
1236        /**
1237         * @return The first repetition of repeating field {@link #targetDisease}, creating it if it does not already exist {3}
1238         */
1239        public CodeableConcept getTargetDiseaseFirstRep() { 
1240          if (getTargetDisease().isEmpty()) {
1241            addTargetDisease();
1242          }
1243          return getTargetDisease().get(0);
1244        }
1245
1246        /**
1247         * @return {@link #doseNumber} (Nominal position in a series as intended by the practitioner administering the dose.). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value
1248         */
1249        public StringType getDoseNumberElement() { 
1250          if (this.doseNumber == null)
1251            if (Configuration.errorOnAutoCreate())
1252              throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.doseNumber");
1253            else if (Configuration.doAutoCreate())
1254              this.doseNumber = new StringType(); // bb
1255          return this.doseNumber;
1256        }
1257
1258        public boolean hasDoseNumberElement() { 
1259          return this.doseNumber != null && !this.doseNumber.isEmpty();
1260        }
1261
1262        public boolean hasDoseNumber() { 
1263          return this.doseNumber != null && !this.doseNumber.isEmpty();
1264        }
1265
1266        /**
1267         * @param value {@link #doseNumber} (Nominal position in a series as intended by the practitioner administering the dose.). This is the underlying object with id, value and extensions. The accessor "getDoseNumber" gives direct access to the value
1268         */
1269        public ImmunizationProtocolAppliedComponent setDoseNumberElement(StringType value) { 
1270          this.doseNumber = value;
1271          return this;
1272        }
1273
1274        /**
1275         * @return Nominal position in a series as intended by the practitioner administering the dose.
1276         */
1277        public String getDoseNumber() { 
1278          return this.doseNumber == null ? null : this.doseNumber.getValue();
1279        }
1280
1281        /**
1282         * @param value Nominal position in a series as intended by the practitioner administering the dose.
1283         */
1284        public ImmunizationProtocolAppliedComponent setDoseNumber(String value) { 
1285            if (this.doseNumber == null)
1286              this.doseNumber = new StringType();
1287            this.doseNumber.setValue(value);
1288          return this;
1289        }
1290
1291        /**
1292         * @return {@link #seriesDoses} (The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.). This is the underlying object with id, value and extensions. The accessor "getSeriesDoses" gives direct access to the value
1293         */
1294        public StringType getSeriesDosesElement() { 
1295          if (this.seriesDoses == null)
1296            if (Configuration.errorOnAutoCreate())
1297              throw new Error("Attempt to auto-create ImmunizationProtocolAppliedComponent.seriesDoses");
1298            else if (Configuration.doAutoCreate())
1299              this.seriesDoses = new StringType(); // bb
1300          return this.seriesDoses;
1301        }
1302
1303        public boolean hasSeriesDosesElement() { 
1304          return this.seriesDoses != null && !this.seriesDoses.isEmpty();
1305        }
1306
1307        public boolean hasSeriesDoses() { 
1308          return this.seriesDoses != null && !this.seriesDoses.isEmpty();
1309        }
1310
1311        /**
1312         * @param value {@link #seriesDoses} (The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.). This is the underlying object with id, value and extensions. The accessor "getSeriesDoses" gives direct access to the value
1313         */
1314        public ImmunizationProtocolAppliedComponent setSeriesDosesElement(StringType value) { 
1315          this.seriesDoses = value;
1316          return this;
1317        }
1318
1319        /**
1320         * @return The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.
1321         */
1322        public String getSeriesDoses() { 
1323          return this.seriesDoses == null ? null : this.seriesDoses.getValue();
1324        }
1325
1326        /**
1327         * @param value The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.
1328         */
1329        public ImmunizationProtocolAppliedComponent setSeriesDoses(String value) { 
1330          if (Utilities.noString(value))
1331            this.seriesDoses = null;
1332          else {
1333            if (this.seriesDoses == null)
1334              this.seriesDoses = new StringType();
1335            this.seriesDoses.setValue(value);
1336          }
1337          return this;
1338        }
1339
1340        protected void listChildren(List<Property> children) {
1341          super.listChildren(children);
1342          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));
1343          children.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP) that is being followed.", 0, 1, authority));
1344          children.add(new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being administered against.", 0, java.lang.Integer.MAX_VALUE, targetDisease));
1345          children.add(new Property("doseNumber", "string", "Nominal position in a series as intended by the practitioner administering the dose.", 0, 1, doseNumber));
1346          children.add(new Property("seriesDoses", "string", "The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.", 0, 1, seriesDoses));
1347        }
1348
1349        @Override
1350        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1351          switch (_hash) {
1352          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);
1353          case 1475610435: /*authority*/  return new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol (e.g. ACIP) that is being followed.", 0, 1, authority);
1354          case -319593813: /*targetDisease*/  return new Property("targetDisease", "CodeableConcept", "The vaccine preventable disease the dose is being administered against.", 0, java.lang.Integer.MAX_VALUE, targetDisease);
1355          case -887709242: /*doseNumber*/  return new Property("doseNumber", "string", "Nominal position in a series as intended by the practitioner administering the dose.", 0, 1, doseNumber);
1356          case -1936727105: /*seriesDoses*/  return new Property("seriesDoses", "string", "The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.", 0, 1, seriesDoses);
1357          default: return super.getNamedProperty(_hash, _name, _checkValid);
1358          }
1359
1360        }
1361
1362      @Override
1363      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1364        switch (hash) {
1365        case -905838985: /*series*/ return this.series == null ? new Base[0] : new Base[] {this.series}; // StringType
1366        case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : new Base[] {this.authority}; // Reference
1367        case -319593813: /*targetDisease*/ return this.targetDisease == null ? new Base[0] : this.targetDisease.toArray(new Base[this.targetDisease.size()]); // CodeableConcept
1368        case -887709242: /*doseNumber*/ return this.doseNumber == null ? new Base[0] : new Base[] {this.doseNumber}; // StringType
1369        case -1936727105: /*seriesDoses*/ return this.seriesDoses == null ? new Base[0] : new Base[] {this.seriesDoses}; // StringType
1370        default: return super.getProperty(hash, name, checkValid);
1371        }
1372
1373      }
1374
1375      @Override
1376      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1377        switch (hash) {
1378        case -905838985: // series
1379          this.series = TypeConvertor.castToString(value); // StringType
1380          return value;
1381        case 1475610435: // authority
1382          this.authority = TypeConvertor.castToReference(value); // Reference
1383          return value;
1384        case -319593813: // targetDisease
1385          this.getTargetDisease().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1386          return value;
1387        case -887709242: // doseNumber
1388          this.doseNumber = TypeConvertor.castToString(value); // StringType
1389          return value;
1390        case -1936727105: // seriesDoses
1391          this.seriesDoses = TypeConvertor.castToString(value); // StringType
1392          return value;
1393        default: return super.setProperty(hash, name, value);
1394        }
1395
1396      }
1397
1398      @Override
1399      public Base setProperty(String name, Base value) throws FHIRException {
1400        if (name.equals("series")) {
1401          this.series = TypeConvertor.castToString(value); // StringType
1402        } else if (name.equals("authority")) {
1403          this.authority = TypeConvertor.castToReference(value); // Reference
1404        } else if (name.equals("targetDisease")) {
1405          this.getTargetDisease().add(TypeConvertor.castToCodeableConcept(value));
1406        } else if (name.equals("doseNumber")) {
1407          this.doseNumber = TypeConvertor.castToString(value); // StringType
1408        } else if (name.equals("seriesDoses")) {
1409          this.seriesDoses = TypeConvertor.castToString(value); // StringType
1410        } else
1411          return super.setProperty(name, value);
1412        return value;
1413      }
1414
1415      @Override
1416      public Base makeProperty(int hash, String name) throws FHIRException {
1417        switch (hash) {
1418        case -905838985:  return getSeriesElement();
1419        case 1475610435:  return getAuthority();
1420        case -319593813:  return addTargetDisease(); 
1421        case -887709242:  return getDoseNumberElement();
1422        case -1936727105:  return getSeriesDosesElement();
1423        default: return super.makeProperty(hash, name);
1424        }
1425
1426      }
1427
1428      @Override
1429      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1430        switch (hash) {
1431        case -905838985: /*series*/ return new String[] {"string"};
1432        case 1475610435: /*authority*/ return new String[] {"Reference"};
1433        case -319593813: /*targetDisease*/ return new String[] {"CodeableConcept"};
1434        case -887709242: /*doseNumber*/ return new String[] {"string"};
1435        case -1936727105: /*seriesDoses*/ return new String[] {"string"};
1436        default: return super.getTypesForProperty(hash, name);
1437        }
1438
1439      }
1440
1441      @Override
1442      public Base addChild(String name) throws FHIRException {
1443        if (name.equals("series")) {
1444          throw new FHIRException("Cannot call addChild on a primitive type Immunization.protocolApplied.series");
1445        }
1446        else if (name.equals("authority")) {
1447          this.authority = new Reference();
1448          return this.authority;
1449        }
1450        else if (name.equals("targetDisease")) {
1451          return addTargetDisease();
1452        }
1453        else if (name.equals("doseNumber")) {
1454          throw new FHIRException("Cannot call addChild on a primitive type Immunization.protocolApplied.doseNumber");
1455        }
1456        else if (name.equals("seriesDoses")) {
1457          throw new FHIRException("Cannot call addChild on a primitive type Immunization.protocolApplied.seriesDoses");
1458        }
1459        else
1460          return super.addChild(name);
1461      }
1462
1463      public ImmunizationProtocolAppliedComponent copy() {
1464        ImmunizationProtocolAppliedComponent dst = new ImmunizationProtocolAppliedComponent();
1465        copyValues(dst);
1466        return dst;
1467      }
1468
1469      public void copyValues(ImmunizationProtocolAppliedComponent dst) {
1470        super.copyValues(dst);
1471        dst.series = series == null ? null : series.copy();
1472        dst.authority = authority == null ? null : authority.copy();
1473        if (targetDisease != null) {
1474          dst.targetDisease = new ArrayList<CodeableConcept>();
1475          for (CodeableConcept i : targetDisease)
1476            dst.targetDisease.add(i.copy());
1477        };
1478        dst.doseNumber = doseNumber == null ? null : doseNumber.copy();
1479        dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy();
1480      }
1481
1482      @Override
1483      public boolean equalsDeep(Base other_) {
1484        if (!super.equalsDeep(other_))
1485          return false;
1486        if (!(other_ instanceof ImmunizationProtocolAppliedComponent))
1487          return false;
1488        ImmunizationProtocolAppliedComponent o = (ImmunizationProtocolAppliedComponent) other_;
1489        return compareDeep(series, o.series, true) && compareDeep(authority, o.authority, true) && compareDeep(targetDisease, o.targetDisease, true)
1490           && compareDeep(doseNumber, o.doseNumber, true) && compareDeep(seriesDoses, o.seriesDoses, true)
1491          ;
1492      }
1493
1494      @Override
1495      public boolean equalsShallow(Base other_) {
1496        if (!super.equalsShallow(other_))
1497          return false;
1498        if (!(other_ instanceof ImmunizationProtocolAppliedComponent))
1499          return false;
1500        ImmunizationProtocolAppliedComponent o = (ImmunizationProtocolAppliedComponent) other_;
1501        return compareValues(series, o.series, true) && compareValues(doseNumber, o.doseNumber, true) && compareValues(seriesDoses, o.seriesDoses, true)
1502          ;
1503      }
1504
1505      public boolean isEmpty() {
1506        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(series, authority, targetDisease
1507          , doseNumber, seriesDoses);
1508      }
1509
1510  public String fhirType() {
1511    return "Immunization.protocolApplied";
1512
1513  }
1514
1515  }
1516
1517    /**
1518     * A unique identifier assigned to this immunization record.
1519     */
1520    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1521    @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." )
1522    protected List<Identifier> identifier;
1523
1524    /**
1525     * The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.
1526     */
1527    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1528    @Description(shortDefinition="Instantiates FHIR protocol or definition for the immunization event", formalDefinition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization." )
1529    protected List<CanonicalType> instantiatesCanonical;
1530
1531    /**
1532     * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.
1533     */
1534    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1535    @Description(shortDefinition="Instantiates external protocol or definition for the immunization event", formalDefinition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization." )
1536    protected List<UriType> instantiatesUri;
1537
1538    /**
1539     * A plan, order or recommendation fulfilled in whole or in part by this immunization.
1540     */
1541    @Child(name = "basedOn", type = {CarePlan.class, MedicationRequest.class, ServiceRequest.class, ImmunizationRecommendation.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1542    @Description(shortDefinition="Authority that the immunization event is based on", formalDefinition="A plan, order or recommendation fulfilled in whole or in part by this immunization." )
1543    protected List<Reference> basedOn;
1544
1545    /**
1546     * Indicates the current status of the immunization event.
1547     */
1548    @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
1549    @Description(shortDefinition="completed | entered-in-error | not-done", formalDefinition="Indicates the current status of the immunization event." )
1550    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-status")
1551    protected Enumeration<ImmunizationStatusCodes> status;
1552
1553    /**
1554     * Indicates the reason the immunization event was not performed.
1555     */
1556    @Child(name = "statusReason", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false)
1557    @Description(shortDefinition="Reason for current status", formalDefinition="Indicates the reason the immunization event was not performed." )
1558    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-status-reason")
1559    protected CodeableConcept statusReason;
1560
1561    /**
1562     * Vaccine that was administered or was to be administered.
1563     */
1564    @Child(name = "vaccineCode", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true)
1565    @Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." )
1566    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vaccine-code")
1567    protected CodeableConcept vaccineCode;
1568
1569    /**
1570     * Name of vaccine manufacturer.
1571     */
1572    @Child(name = "manufacturer", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=false)
1573    @Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." )
1574    protected Reference manufacturer;
1575
1576    /**
1577     * Lot number of the  vaccine product.
1578     */
1579    @Child(name = "lotNumber", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
1580    @Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the  vaccine product." )
1581    protected StringType lotNumber;
1582
1583    /**
1584     * Date vaccine batch expires.
1585     */
1586    @Child(name = "expirationDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=false)
1587    @Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." )
1588    protected DateType expirationDate;
1589
1590    /**
1591     * The patient who either received or did not receive the immunization.
1592     */
1593    @Child(name = "patient", type = {Patient.class}, order=10, min=1, max=1, modifier=false, summary=true)
1594    @Description(shortDefinition="Who was immunized", formalDefinition="The patient who either received or did not receive the immunization." )
1595    protected Reference patient;
1596
1597    /**
1598     * The visit or admission or other contact between patient and health care provider the immunization was performed as part of.
1599     */
1600    @Child(name = "encounter", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=false)
1601    @Description(shortDefinition="Encounter immunization was part of", formalDefinition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." )
1602    protected Reference encounter;
1603
1604    /**
1605     * Date vaccine administered or was to be administered.
1606     */
1607    @Child(name = "occurrence", type = {DateTimeType.class, StringType.class}, order=12, min=1, max=1, modifier=false, summary=true)
1608    @Description(shortDefinition="Vaccine administration date", formalDefinition="Date vaccine administered or was to be administered." )
1609    protected DataType occurrence;
1610
1611    /**
1612     * Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value "true" means this is a primary record of the immunization.
1613     */
1614    @Child(name = "primarySource", type = {BooleanType.class}, order=13, min=0, max=1, modifier=false, summary=true)
1615    @Description(shortDefinition="Indicates context the data was recorded in", formalDefinition="Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value \"true\" means this is a primary record of the immunization." )
1616    protected BooleanType primarySource;
1617
1618    /**
1619     * Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.
1620     */
1621    @Child(name = "informationSource", type = {CodeableReference.class}, order=14, min=0, max=1, modifier=false, summary=false)
1622    @Description(shortDefinition="Indicates the source of a  reported record", formalDefinition="Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine." )
1623    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-origin")
1624    protected CodeableReference informationSource;
1625
1626    /**
1627     * The service delivery location where the vaccine administration occurred.
1628     */
1629    @Child(name = "location", type = {Location.class}, order=15, min=0, max=1, modifier=false, summary=false)
1630    @Description(shortDefinition="Where immunization occurred", formalDefinition="The service delivery location where the vaccine administration occurred." )
1631    protected Reference location;
1632
1633    /**
1634     * Body site where vaccine was administered.
1635     */
1636    @Child(name = "site", type = {CodeableConcept.class}, order=16, min=0, max=1, modifier=false, summary=false)
1637    @Description(shortDefinition="Body site vaccine  was administered", formalDefinition="Body site where vaccine was administered." )
1638    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-site")
1639    protected CodeableConcept site;
1640
1641    /**
1642     * The path by which the vaccine product is taken into the body.
1643     */
1644    @Child(name = "route", type = {CodeableConcept.class}, order=17, min=0, max=1, modifier=false, summary=false)
1645    @Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." )
1646    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-route")
1647    protected CodeableConcept route;
1648
1649    /**
1650     * The quantity of vaccine product that was administered.
1651     */
1652    @Child(name = "doseQuantity", type = {Quantity.class}, order=18, min=0, max=1, modifier=false, summary=false)
1653    @Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." )
1654    protected Quantity doseQuantity;
1655
1656    /**
1657     * Indicates who performed the immunization event.
1658     */
1659    @Child(name = "performer", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1660    @Description(shortDefinition="Who performed event", formalDefinition="Indicates who performed the immunization event." )
1661    protected List<ImmunizationPerformerComponent> performer;
1662
1663    /**
1664     * Extra information about the immunization that is not conveyed by the other attributes.
1665     */
1666    @Child(name = "note", type = {Annotation.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1667    @Description(shortDefinition="Additional immunization notes", formalDefinition="Extra information about the immunization that is not conveyed by the other attributes." )
1668    protected List<Annotation> note;
1669
1670    /**
1671     * Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.
1672     */
1673    @Child(name = "reason", type = {CodeableReference.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1674    @Description(shortDefinition="Why immunization occurred", formalDefinition="Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization." )
1675    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-reason")
1676    protected List<CodeableReference> reason;
1677
1678    /**
1679     * Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
1680     */
1681    @Child(name = "isSubpotent", type = {BooleanType.class}, order=22, min=0, max=1, modifier=true, summary=true)
1682    @Description(shortDefinition="Dose potency", formalDefinition="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent." )
1683    protected BooleanType isSubpotent;
1684
1685    /**
1686     * Reason why a dose is considered to be subpotent.
1687     */
1688    @Child(name = "subpotentReason", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1689    @Description(shortDefinition="Reason for being subpotent", formalDefinition="Reason why a dose is considered to be subpotent." )
1690    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-subpotent-reason")
1691    protected List<CodeableConcept> subpotentReason;
1692
1693    /**
1694     * Educational material presented to the patient (or guardian) at the time of vaccine administration.
1695     */
1696    @Child(name = "education", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1697    @Description(shortDefinition="Educational material presented to patient", formalDefinition="Educational material presented to the patient (or guardian) at the time of vaccine administration." )
1698    protected List<ImmunizationEducationComponent> education;
1699
1700    /**
1701     * Indicates a patient's eligibility for a funding program.
1702     */
1703    @Child(name = "programEligibility", type = {CodeableConcept.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1704    @Description(shortDefinition="Patient eligibility for a vaccination program", formalDefinition="Indicates a patient's eligibility for a funding program." )
1705    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-program-eligibility")
1706    protected List<CodeableConcept> programEligibility;
1707
1708    /**
1709     * Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).
1710     */
1711    @Child(name = "fundingSource", type = {CodeableConcept.class}, order=26, min=0, max=1, modifier=false, summary=false)
1712    @Description(shortDefinition="Funding source for the vaccine", formalDefinition="Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered)." )
1713    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-funding-source")
1714    protected CodeableConcept fundingSource;
1715
1716    /**
1717     * Categorical data indicating that an adverse event is associated in time to an immunization.
1718     */
1719    @Child(name = "reaction", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1720    @Description(shortDefinition="Details of a reaction that follows immunization", formalDefinition="Categorical data indicating that an adverse event is associated in time to an immunization." )
1721    protected List<ImmunizationReactionComponent> reaction;
1722
1723    /**
1724     * The protocol (set of recommendations) being followed by the provider who administered the dose.
1725     */
1726    @Child(name = "protocolApplied", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1727    @Description(shortDefinition="Protocol followed by the provider", formalDefinition="The protocol (set of recommendations) being followed by the provider who administered the dose." )
1728    protected List<ImmunizationProtocolAppliedComponent> protocolApplied;
1729
1730    private static final long serialVersionUID = 1990638195L;
1731
1732  /**
1733   * Constructor
1734   */
1735    public Immunization() {
1736      super();
1737    }
1738
1739  /**
1740   * Constructor
1741   */
1742    public Immunization(ImmunizationStatusCodes status, CodeableConcept vaccineCode, Reference patient, DataType occurrence) {
1743      super();
1744      this.setStatus(status);
1745      this.setVaccineCode(vaccineCode);
1746      this.setPatient(patient);
1747      this.setOccurrence(occurrence);
1748    }
1749
1750    /**
1751     * @return {@link #identifier} (A unique identifier assigned to this immunization record.)
1752     */
1753    public List<Identifier> getIdentifier() { 
1754      if (this.identifier == null)
1755        this.identifier = new ArrayList<Identifier>();
1756      return this.identifier;
1757    }
1758
1759    /**
1760     * @return Returns a reference to <code>this</code> for easy method chaining
1761     */
1762    public Immunization setIdentifier(List<Identifier> theIdentifier) { 
1763      this.identifier = theIdentifier;
1764      return this;
1765    }
1766
1767    public boolean hasIdentifier() { 
1768      if (this.identifier == null)
1769        return false;
1770      for (Identifier item : this.identifier)
1771        if (!item.isEmpty())
1772          return true;
1773      return false;
1774    }
1775
1776    public Identifier addIdentifier() { //3
1777      Identifier t = new Identifier();
1778      if (this.identifier == null)
1779        this.identifier = new ArrayList<Identifier>();
1780      this.identifier.add(t);
1781      return t;
1782    }
1783
1784    public Immunization addIdentifier(Identifier t) { //3
1785      if (t == null)
1786        return this;
1787      if (this.identifier == null)
1788        this.identifier = new ArrayList<Identifier>();
1789      this.identifier.add(t);
1790      return this;
1791    }
1792
1793    /**
1794     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1795     */
1796    public Identifier getIdentifierFirstRep() { 
1797      if (getIdentifier().isEmpty()) {
1798        addIdentifier();
1799      }
1800      return getIdentifier().get(0);
1801    }
1802
1803    /**
1804     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1805     */
1806    public List<CanonicalType> getInstantiatesCanonical() { 
1807      if (this.instantiatesCanonical == null)
1808        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1809      return this.instantiatesCanonical;
1810    }
1811
1812    /**
1813     * @return Returns a reference to <code>this</code> for easy method chaining
1814     */
1815    public Immunization setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 
1816      this.instantiatesCanonical = theInstantiatesCanonical;
1817      return this;
1818    }
1819
1820    public boolean hasInstantiatesCanonical() { 
1821      if (this.instantiatesCanonical == null)
1822        return false;
1823      for (CanonicalType item : this.instantiatesCanonical)
1824        if (!item.isEmpty())
1825          return true;
1826      return false;
1827    }
1828
1829    /**
1830     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1831     */
1832    public CanonicalType addInstantiatesCanonicalElement() {//2 
1833      CanonicalType t = new CanonicalType();
1834      if (this.instantiatesCanonical == null)
1835        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1836      this.instantiatesCanonical.add(t);
1837      return t;
1838    }
1839
1840    /**
1841     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1842     */
1843    public Immunization addInstantiatesCanonical(String value) { //1
1844      CanonicalType t = new CanonicalType();
1845      t.setValue(value);
1846      if (this.instantiatesCanonical == null)
1847        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1848      this.instantiatesCanonical.add(t);
1849      return this;
1850    }
1851
1852    /**
1853     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1854     */
1855    public boolean hasInstantiatesCanonical(String value) { 
1856      if (this.instantiatesCanonical == null)
1857        return false;
1858      for (CanonicalType v : this.instantiatesCanonical)
1859        if (v.getValue().equals(value)) // canonical
1860          return true;
1861      return false;
1862    }
1863
1864    /**
1865     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1866     */
1867    public List<UriType> getInstantiatesUri() { 
1868      if (this.instantiatesUri == null)
1869        this.instantiatesUri = new ArrayList<UriType>();
1870      return this.instantiatesUri;
1871    }
1872
1873    /**
1874     * @return Returns a reference to <code>this</code> for easy method chaining
1875     */
1876    public Immunization setInstantiatesUri(List<UriType> theInstantiatesUri) { 
1877      this.instantiatesUri = theInstantiatesUri;
1878      return this;
1879    }
1880
1881    public boolean hasInstantiatesUri() { 
1882      if (this.instantiatesUri == null)
1883        return false;
1884      for (UriType item : this.instantiatesUri)
1885        if (!item.isEmpty())
1886          return true;
1887      return false;
1888    }
1889
1890    /**
1891     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1892     */
1893    public UriType addInstantiatesUriElement() {//2 
1894      UriType t = new UriType();
1895      if (this.instantiatesUri == null)
1896        this.instantiatesUri = new ArrayList<UriType>();
1897      this.instantiatesUri.add(t);
1898      return t;
1899    }
1900
1901    /**
1902     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1903     */
1904    public Immunization addInstantiatesUri(String value) { //1
1905      UriType t = new UriType();
1906      t.setValue(value);
1907      if (this.instantiatesUri == null)
1908        this.instantiatesUri = new ArrayList<UriType>();
1909      this.instantiatesUri.add(t);
1910      return this;
1911    }
1912
1913    /**
1914     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.)
1915     */
1916    public boolean hasInstantiatesUri(String value) { 
1917      if (this.instantiatesUri == null)
1918        return false;
1919      for (UriType v : this.instantiatesUri)
1920        if (v.getValue().equals(value)) // uri
1921          return true;
1922      return false;
1923    }
1924
1925    /**
1926     * @return {@link #basedOn} (A plan, order or recommendation fulfilled in whole or in part by this immunization.)
1927     */
1928    public List<Reference> getBasedOn() { 
1929      if (this.basedOn == null)
1930        this.basedOn = new ArrayList<Reference>();
1931      return this.basedOn;
1932    }
1933
1934    /**
1935     * @return Returns a reference to <code>this</code> for easy method chaining
1936     */
1937    public Immunization setBasedOn(List<Reference> theBasedOn) { 
1938      this.basedOn = theBasedOn;
1939      return this;
1940    }
1941
1942    public boolean hasBasedOn() { 
1943      if (this.basedOn == null)
1944        return false;
1945      for (Reference item : this.basedOn)
1946        if (!item.isEmpty())
1947          return true;
1948      return false;
1949    }
1950
1951    public Reference addBasedOn() { //3
1952      Reference t = new Reference();
1953      if (this.basedOn == null)
1954        this.basedOn = new ArrayList<Reference>();
1955      this.basedOn.add(t);
1956      return t;
1957    }
1958
1959    public Immunization addBasedOn(Reference t) { //3
1960      if (t == null)
1961        return this;
1962      if (this.basedOn == null)
1963        this.basedOn = new ArrayList<Reference>();
1964      this.basedOn.add(t);
1965      return this;
1966    }
1967
1968    /**
1969     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
1970     */
1971    public Reference getBasedOnFirstRep() { 
1972      if (getBasedOn().isEmpty()) {
1973        addBasedOn();
1974      }
1975      return getBasedOn().get(0);
1976    }
1977
1978    /**
1979     * @return {@link #status} (Indicates the current status of the immunization event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1980     */
1981    public Enumeration<ImmunizationStatusCodes> getStatusElement() { 
1982      if (this.status == null)
1983        if (Configuration.errorOnAutoCreate())
1984          throw new Error("Attempt to auto-create Immunization.status");
1985        else if (Configuration.doAutoCreate())
1986          this.status = new Enumeration<ImmunizationStatusCodes>(new ImmunizationStatusCodesEnumFactory()); // bb
1987      return this.status;
1988    }
1989
1990    public boolean hasStatusElement() { 
1991      return this.status != null && !this.status.isEmpty();
1992    }
1993
1994    public boolean hasStatus() { 
1995      return this.status != null && !this.status.isEmpty();
1996    }
1997
1998    /**
1999     * @param value {@link #status} (Indicates the current status of the immunization event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2000     */
2001    public Immunization setStatusElement(Enumeration<ImmunizationStatusCodes> value) { 
2002      this.status = value;
2003      return this;
2004    }
2005
2006    /**
2007     * @return Indicates the current status of the immunization event.
2008     */
2009    public ImmunizationStatusCodes getStatus() { 
2010      return this.status == null ? null : this.status.getValue();
2011    }
2012
2013    /**
2014     * @param value Indicates the current status of the immunization event.
2015     */
2016    public Immunization setStatus(ImmunizationStatusCodes value) { 
2017        if (this.status == null)
2018          this.status = new Enumeration<ImmunizationStatusCodes>(new ImmunizationStatusCodesEnumFactory());
2019        this.status.setValue(value);
2020      return this;
2021    }
2022
2023    /**
2024     * @return {@link #statusReason} (Indicates the reason the immunization event was not performed.)
2025     */
2026    public CodeableConcept getStatusReason() { 
2027      if (this.statusReason == null)
2028        if (Configuration.errorOnAutoCreate())
2029          throw new Error("Attempt to auto-create Immunization.statusReason");
2030        else if (Configuration.doAutoCreate())
2031          this.statusReason = new CodeableConcept(); // cc
2032      return this.statusReason;
2033    }
2034
2035    public boolean hasStatusReason() { 
2036      return this.statusReason != null && !this.statusReason.isEmpty();
2037    }
2038
2039    /**
2040     * @param value {@link #statusReason} (Indicates the reason the immunization event was not performed.)
2041     */
2042    public Immunization setStatusReason(CodeableConcept value) { 
2043      this.statusReason = value;
2044      return this;
2045    }
2046
2047    /**
2048     * @return {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
2049     */
2050    public CodeableConcept getVaccineCode() { 
2051      if (this.vaccineCode == null)
2052        if (Configuration.errorOnAutoCreate())
2053          throw new Error("Attempt to auto-create Immunization.vaccineCode");
2054        else if (Configuration.doAutoCreate())
2055          this.vaccineCode = new CodeableConcept(); // cc
2056      return this.vaccineCode;
2057    }
2058
2059    public boolean hasVaccineCode() { 
2060      return this.vaccineCode != null && !this.vaccineCode.isEmpty();
2061    }
2062
2063    /**
2064     * @param value {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
2065     */
2066    public Immunization setVaccineCode(CodeableConcept value) { 
2067      this.vaccineCode = value;
2068      return this;
2069    }
2070
2071    /**
2072     * @return {@link #manufacturer} (Name of vaccine manufacturer.)
2073     */
2074    public Reference getManufacturer() { 
2075      if (this.manufacturer == null)
2076        if (Configuration.errorOnAutoCreate())
2077          throw new Error("Attempt to auto-create Immunization.manufacturer");
2078        else if (Configuration.doAutoCreate())
2079          this.manufacturer = new Reference(); // cc
2080      return this.manufacturer;
2081    }
2082
2083    public boolean hasManufacturer() { 
2084      return this.manufacturer != null && !this.manufacturer.isEmpty();
2085    }
2086
2087    /**
2088     * @param value {@link #manufacturer} (Name of vaccine manufacturer.)
2089     */
2090    public Immunization setManufacturer(Reference value) { 
2091      this.manufacturer = value;
2092      return this;
2093    }
2094
2095    /**
2096     * @return {@link #lotNumber} (Lot number of the  vaccine product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value
2097     */
2098    public StringType getLotNumberElement() { 
2099      if (this.lotNumber == null)
2100        if (Configuration.errorOnAutoCreate())
2101          throw new Error("Attempt to auto-create Immunization.lotNumber");
2102        else if (Configuration.doAutoCreate())
2103          this.lotNumber = new StringType(); // bb
2104      return this.lotNumber;
2105    }
2106
2107    public boolean hasLotNumberElement() { 
2108      return this.lotNumber != null && !this.lotNumber.isEmpty();
2109    }
2110
2111    public boolean hasLotNumber() { 
2112      return this.lotNumber != null && !this.lotNumber.isEmpty();
2113    }
2114
2115    /**
2116     * @param value {@link #lotNumber} (Lot number of the  vaccine product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value
2117     */
2118    public Immunization setLotNumberElement(StringType value) { 
2119      this.lotNumber = value;
2120      return this;
2121    }
2122
2123    /**
2124     * @return Lot number of the  vaccine product.
2125     */
2126    public String getLotNumber() { 
2127      return this.lotNumber == null ? null : this.lotNumber.getValue();
2128    }
2129
2130    /**
2131     * @param value Lot number of the  vaccine product.
2132     */
2133    public Immunization setLotNumber(String value) { 
2134      if (Utilities.noString(value))
2135        this.lotNumber = null;
2136      else {
2137        if (this.lotNumber == null)
2138          this.lotNumber = new StringType();
2139        this.lotNumber.setValue(value);
2140      }
2141      return this;
2142    }
2143
2144    /**
2145     * @return {@link #expirationDate} (Date vaccine batch expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
2146     */
2147    public DateType getExpirationDateElement() { 
2148      if (this.expirationDate == null)
2149        if (Configuration.errorOnAutoCreate())
2150          throw new Error("Attempt to auto-create Immunization.expirationDate");
2151        else if (Configuration.doAutoCreate())
2152          this.expirationDate = new DateType(); // bb
2153      return this.expirationDate;
2154    }
2155
2156    public boolean hasExpirationDateElement() { 
2157      return this.expirationDate != null && !this.expirationDate.isEmpty();
2158    }
2159
2160    public boolean hasExpirationDate() { 
2161      return this.expirationDate != null && !this.expirationDate.isEmpty();
2162    }
2163
2164    /**
2165     * @param value {@link #expirationDate} (Date vaccine batch expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
2166     */
2167    public Immunization setExpirationDateElement(DateType value) { 
2168      this.expirationDate = value;
2169      return this;
2170    }
2171
2172    /**
2173     * @return Date vaccine batch expires.
2174     */
2175    public Date getExpirationDate() { 
2176      return this.expirationDate == null ? null : this.expirationDate.getValue();
2177    }
2178
2179    /**
2180     * @param value Date vaccine batch expires.
2181     */
2182    public Immunization setExpirationDate(Date value) { 
2183      if (value == null)
2184        this.expirationDate = null;
2185      else {
2186        if (this.expirationDate == null)
2187          this.expirationDate = new DateType();
2188        this.expirationDate.setValue(value);
2189      }
2190      return this;
2191    }
2192
2193    /**
2194     * @return {@link #patient} (The patient who either received or did not receive the immunization.)
2195     */
2196    public Reference getPatient() { 
2197      if (this.patient == null)
2198        if (Configuration.errorOnAutoCreate())
2199          throw new Error("Attempt to auto-create Immunization.patient");
2200        else if (Configuration.doAutoCreate())
2201          this.patient = new Reference(); // cc
2202      return this.patient;
2203    }
2204
2205    public boolean hasPatient() { 
2206      return this.patient != null && !this.patient.isEmpty();
2207    }
2208
2209    /**
2210     * @param value {@link #patient} (The patient who either received or did not receive the immunization.)
2211     */
2212    public Immunization setPatient(Reference value) { 
2213      this.patient = value;
2214      return this;
2215    }
2216
2217    /**
2218     * @return {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
2219     */
2220    public Reference getEncounter() { 
2221      if (this.encounter == null)
2222        if (Configuration.errorOnAutoCreate())
2223          throw new Error("Attempt to auto-create Immunization.encounter");
2224        else if (Configuration.doAutoCreate())
2225          this.encounter = new Reference(); // cc
2226      return this.encounter;
2227    }
2228
2229    public boolean hasEncounter() { 
2230      return this.encounter != null && !this.encounter.isEmpty();
2231    }
2232
2233    /**
2234     * @param value {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
2235     */
2236    public Immunization setEncounter(Reference value) { 
2237      this.encounter = value;
2238      return this;
2239    }
2240
2241    /**
2242     * @return {@link #occurrence} (Date vaccine administered or was to be administered.)
2243     */
2244    public DataType getOccurrence() { 
2245      return this.occurrence;
2246    }
2247
2248    /**
2249     * @return {@link #occurrence} (Date vaccine administered or was to be administered.)
2250     */
2251    public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 
2252      if (this.occurrence == null)
2253        this.occurrence = new DateTimeType();
2254      if (!(this.occurrence instanceof DateTimeType))
2255        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
2256      return (DateTimeType) this.occurrence;
2257    }
2258
2259    public boolean hasOccurrenceDateTimeType() { 
2260      return this != null && this.occurrence instanceof DateTimeType;
2261    }
2262
2263    /**
2264     * @return {@link #occurrence} (Date vaccine administered or was to be administered.)
2265     */
2266    public StringType getOccurrenceStringType() throws FHIRException { 
2267      if (this.occurrence == null)
2268        this.occurrence = new StringType();
2269      if (!(this.occurrence instanceof StringType))
2270        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
2271      return (StringType) this.occurrence;
2272    }
2273
2274    public boolean hasOccurrenceStringType() { 
2275      return this != null && this.occurrence instanceof StringType;
2276    }
2277
2278    public boolean hasOccurrence() { 
2279      return this.occurrence != null && !this.occurrence.isEmpty();
2280    }
2281
2282    /**
2283     * @param value {@link #occurrence} (Date vaccine administered or was to be administered.)
2284     */
2285    public Immunization setOccurrence(DataType value) { 
2286      if (value != null && !(value instanceof DateTimeType || value instanceof StringType))
2287        throw new Error("Not the right type for Immunization.occurrence[x]: "+value.fhirType());
2288      this.occurrence = value;
2289      return this;
2290    }
2291
2292    /**
2293     * @return {@link #primarySource} (Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value "true" means this is a primary record of the immunization.). This is the underlying object with id, value and extensions. The accessor "getPrimarySource" gives direct access to the value
2294     */
2295    public BooleanType getPrimarySourceElement() { 
2296      if (this.primarySource == null)
2297        if (Configuration.errorOnAutoCreate())
2298          throw new Error("Attempt to auto-create Immunization.primarySource");
2299        else if (Configuration.doAutoCreate())
2300          this.primarySource = new BooleanType(); // bb
2301      return this.primarySource;
2302    }
2303
2304    public boolean hasPrimarySourceElement() { 
2305      return this.primarySource != null && !this.primarySource.isEmpty();
2306    }
2307
2308    public boolean hasPrimarySource() { 
2309      return this.primarySource != null && !this.primarySource.isEmpty();
2310    }
2311
2312    /**
2313     * @param value {@link #primarySource} (Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value "true" means this is a primary record of the immunization.). This is the underlying object with id, value and extensions. The accessor "getPrimarySource" gives direct access to the value
2314     */
2315    public Immunization setPrimarySourceElement(BooleanType value) { 
2316      this.primarySource = value;
2317      return this;
2318    }
2319
2320    /**
2321     * @return Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value "true" means this is a primary record of the immunization.
2322     */
2323    public boolean getPrimarySource() { 
2324      return this.primarySource == null || this.primarySource.isEmpty() ? false : this.primarySource.getValue();
2325    }
2326
2327    /**
2328     * @param value Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value "true" means this is a primary record of the immunization.
2329     */
2330    public Immunization setPrimarySource(boolean value) { 
2331        if (this.primarySource == null)
2332          this.primarySource = new BooleanType();
2333        this.primarySource.setValue(value);
2334      return this;
2335    }
2336
2337    /**
2338     * @return {@link #informationSource} (Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.)
2339     */
2340    public CodeableReference getInformationSource() { 
2341      if (this.informationSource == null)
2342        if (Configuration.errorOnAutoCreate())
2343          throw new Error("Attempt to auto-create Immunization.informationSource");
2344        else if (Configuration.doAutoCreate())
2345          this.informationSource = new CodeableReference(); // cc
2346      return this.informationSource;
2347    }
2348
2349    public boolean hasInformationSource() { 
2350      return this.informationSource != null && !this.informationSource.isEmpty();
2351    }
2352
2353    /**
2354     * @param value {@link #informationSource} (Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.)
2355     */
2356    public Immunization setInformationSource(CodeableReference value) { 
2357      this.informationSource = value;
2358      return this;
2359    }
2360
2361    /**
2362     * @return {@link #location} (The service delivery location where the vaccine administration occurred.)
2363     */
2364    public Reference getLocation() { 
2365      if (this.location == null)
2366        if (Configuration.errorOnAutoCreate())
2367          throw new Error("Attempt to auto-create Immunization.location");
2368        else if (Configuration.doAutoCreate())
2369          this.location = new Reference(); // cc
2370      return this.location;
2371    }
2372
2373    public boolean hasLocation() { 
2374      return this.location != null && !this.location.isEmpty();
2375    }
2376
2377    /**
2378     * @param value {@link #location} (The service delivery location where the vaccine administration occurred.)
2379     */
2380    public Immunization setLocation(Reference value) { 
2381      this.location = value;
2382      return this;
2383    }
2384
2385    /**
2386     * @return {@link #site} (Body site where vaccine was administered.)
2387     */
2388    public CodeableConcept getSite() { 
2389      if (this.site == null)
2390        if (Configuration.errorOnAutoCreate())
2391          throw new Error("Attempt to auto-create Immunization.site");
2392        else if (Configuration.doAutoCreate())
2393          this.site = new CodeableConcept(); // cc
2394      return this.site;
2395    }
2396
2397    public boolean hasSite() { 
2398      return this.site != null && !this.site.isEmpty();
2399    }
2400
2401    /**
2402     * @param value {@link #site} (Body site where vaccine was administered.)
2403     */
2404    public Immunization setSite(CodeableConcept value) { 
2405      this.site = value;
2406      return this;
2407    }
2408
2409    /**
2410     * @return {@link #route} (The path by which the vaccine product is taken into the body.)
2411     */
2412    public CodeableConcept getRoute() { 
2413      if (this.route == null)
2414        if (Configuration.errorOnAutoCreate())
2415          throw new Error("Attempt to auto-create Immunization.route");
2416        else if (Configuration.doAutoCreate())
2417          this.route = new CodeableConcept(); // cc
2418      return this.route;
2419    }
2420
2421    public boolean hasRoute() { 
2422      return this.route != null && !this.route.isEmpty();
2423    }
2424
2425    /**
2426     * @param value {@link #route} (The path by which the vaccine product is taken into the body.)
2427     */
2428    public Immunization setRoute(CodeableConcept value) { 
2429      this.route = value;
2430      return this;
2431    }
2432
2433    /**
2434     * @return {@link #doseQuantity} (The quantity of vaccine product that was administered.)
2435     */
2436    public Quantity getDoseQuantity() { 
2437      if (this.doseQuantity == null)
2438        if (Configuration.errorOnAutoCreate())
2439          throw new Error("Attempt to auto-create Immunization.doseQuantity");
2440        else if (Configuration.doAutoCreate())
2441          this.doseQuantity = new Quantity(); // cc
2442      return this.doseQuantity;
2443    }
2444
2445    public boolean hasDoseQuantity() { 
2446      return this.doseQuantity != null && !this.doseQuantity.isEmpty();
2447    }
2448
2449    /**
2450     * @param value {@link #doseQuantity} (The quantity of vaccine product that was administered.)
2451     */
2452    public Immunization setDoseQuantity(Quantity value) { 
2453      this.doseQuantity = value;
2454      return this;
2455    }
2456
2457    /**
2458     * @return {@link #performer} (Indicates who performed the immunization event.)
2459     */
2460    public List<ImmunizationPerformerComponent> getPerformer() { 
2461      if (this.performer == null)
2462        this.performer = new ArrayList<ImmunizationPerformerComponent>();
2463      return this.performer;
2464    }
2465
2466    /**
2467     * @return Returns a reference to <code>this</code> for easy method chaining
2468     */
2469    public Immunization setPerformer(List<ImmunizationPerformerComponent> thePerformer) { 
2470      this.performer = thePerformer;
2471      return this;
2472    }
2473
2474    public boolean hasPerformer() { 
2475      if (this.performer == null)
2476        return false;
2477      for (ImmunizationPerformerComponent item : this.performer)
2478        if (!item.isEmpty())
2479          return true;
2480      return false;
2481    }
2482
2483    public ImmunizationPerformerComponent addPerformer() { //3
2484      ImmunizationPerformerComponent t = new ImmunizationPerformerComponent();
2485      if (this.performer == null)
2486        this.performer = new ArrayList<ImmunizationPerformerComponent>();
2487      this.performer.add(t);
2488      return t;
2489    }
2490
2491    public Immunization addPerformer(ImmunizationPerformerComponent t) { //3
2492      if (t == null)
2493        return this;
2494      if (this.performer == null)
2495        this.performer = new ArrayList<ImmunizationPerformerComponent>();
2496      this.performer.add(t);
2497      return this;
2498    }
2499
2500    /**
2501     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
2502     */
2503    public ImmunizationPerformerComponent getPerformerFirstRep() { 
2504      if (getPerformer().isEmpty()) {
2505        addPerformer();
2506      }
2507      return getPerformer().get(0);
2508    }
2509
2510    /**
2511     * @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.)
2512     */
2513    public List<Annotation> getNote() { 
2514      if (this.note == null)
2515        this.note = new ArrayList<Annotation>();
2516      return this.note;
2517    }
2518
2519    /**
2520     * @return Returns a reference to <code>this</code> for easy method chaining
2521     */
2522    public Immunization setNote(List<Annotation> theNote) { 
2523      this.note = theNote;
2524      return this;
2525    }
2526
2527    public boolean hasNote() { 
2528      if (this.note == null)
2529        return false;
2530      for (Annotation item : this.note)
2531        if (!item.isEmpty())
2532          return true;
2533      return false;
2534    }
2535
2536    public Annotation addNote() { //3
2537      Annotation t = new Annotation();
2538      if (this.note == null)
2539        this.note = new ArrayList<Annotation>();
2540      this.note.add(t);
2541      return t;
2542    }
2543
2544    public Immunization addNote(Annotation t) { //3
2545      if (t == null)
2546        return this;
2547      if (this.note == null)
2548        this.note = new ArrayList<Annotation>();
2549      this.note.add(t);
2550      return this;
2551    }
2552
2553    /**
2554     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2555     */
2556    public Annotation getNoteFirstRep() { 
2557      if (getNote().isEmpty()) {
2558        addNote();
2559      }
2560      return getNote().get(0);
2561    }
2562
2563    /**
2564     * @return {@link #reason} (Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.)
2565     */
2566    public List<CodeableReference> getReason() { 
2567      if (this.reason == null)
2568        this.reason = new ArrayList<CodeableReference>();
2569      return this.reason;
2570    }
2571
2572    /**
2573     * @return Returns a reference to <code>this</code> for easy method chaining
2574     */
2575    public Immunization setReason(List<CodeableReference> theReason) { 
2576      this.reason = theReason;
2577      return this;
2578    }
2579
2580    public boolean hasReason() { 
2581      if (this.reason == null)
2582        return false;
2583      for (CodeableReference item : this.reason)
2584        if (!item.isEmpty())
2585          return true;
2586      return false;
2587    }
2588
2589    public CodeableReference addReason() { //3
2590      CodeableReference t = new CodeableReference();
2591      if (this.reason == null)
2592        this.reason = new ArrayList<CodeableReference>();
2593      this.reason.add(t);
2594      return t;
2595    }
2596
2597    public Immunization addReason(CodeableReference t) { //3
2598      if (t == null)
2599        return this;
2600      if (this.reason == null)
2601        this.reason = new ArrayList<CodeableReference>();
2602      this.reason.add(t);
2603      return this;
2604    }
2605
2606    /**
2607     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
2608     */
2609    public CodeableReference getReasonFirstRep() { 
2610      if (getReason().isEmpty()) {
2611        addReason();
2612      }
2613      return getReason().get(0);
2614    }
2615
2616    /**
2617     * @return {@link #isSubpotent} (Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.). This is the underlying object with id, value and extensions. The accessor "getIsSubpotent" gives direct access to the value
2618     */
2619    public BooleanType getIsSubpotentElement() { 
2620      if (this.isSubpotent == null)
2621        if (Configuration.errorOnAutoCreate())
2622          throw new Error("Attempt to auto-create Immunization.isSubpotent");
2623        else if (Configuration.doAutoCreate())
2624          this.isSubpotent = new BooleanType(); // bb
2625      return this.isSubpotent;
2626    }
2627
2628    public boolean hasIsSubpotentElement() { 
2629      return this.isSubpotent != null && !this.isSubpotent.isEmpty();
2630    }
2631
2632    public boolean hasIsSubpotent() { 
2633      return this.isSubpotent != null && !this.isSubpotent.isEmpty();
2634    }
2635
2636    /**
2637     * @param value {@link #isSubpotent} (Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.). This is the underlying object with id, value and extensions. The accessor "getIsSubpotent" gives direct access to the value
2638     */
2639    public Immunization setIsSubpotentElement(BooleanType value) { 
2640      this.isSubpotent = value;
2641      return this;
2642    }
2643
2644    /**
2645     * @return Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
2646     */
2647    public boolean getIsSubpotent() { 
2648      return this.isSubpotent == null || this.isSubpotent.isEmpty() ? false : this.isSubpotent.getValue();
2649    }
2650
2651    /**
2652     * @param value Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
2653     */
2654    public Immunization setIsSubpotent(boolean value) { 
2655        if (this.isSubpotent == null)
2656          this.isSubpotent = new BooleanType();
2657        this.isSubpotent.setValue(value);
2658      return this;
2659    }
2660
2661    /**
2662     * @return {@link #subpotentReason} (Reason why a dose is considered to be subpotent.)
2663     */
2664    public List<CodeableConcept> getSubpotentReason() { 
2665      if (this.subpotentReason == null)
2666        this.subpotentReason = new ArrayList<CodeableConcept>();
2667      return this.subpotentReason;
2668    }
2669
2670    /**
2671     * @return Returns a reference to <code>this</code> for easy method chaining
2672     */
2673    public Immunization setSubpotentReason(List<CodeableConcept> theSubpotentReason) { 
2674      this.subpotentReason = theSubpotentReason;
2675      return this;
2676    }
2677
2678    public boolean hasSubpotentReason() { 
2679      if (this.subpotentReason == null)
2680        return false;
2681      for (CodeableConcept item : this.subpotentReason)
2682        if (!item.isEmpty())
2683          return true;
2684      return false;
2685    }
2686
2687    public CodeableConcept addSubpotentReason() { //3
2688      CodeableConcept t = new CodeableConcept();
2689      if (this.subpotentReason == null)
2690        this.subpotentReason = new ArrayList<CodeableConcept>();
2691      this.subpotentReason.add(t);
2692      return t;
2693    }
2694
2695    public Immunization addSubpotentReason(CodeableConcept t) { //3
2696      if (t == null)
2697        return this;
2698      if (this.subpotentReason == null)
2699        this.subpotentReason = new ArrayList<CodeableConcept>();
2700      this.subpotentReason.add(t);
2701      return this;
2702    }
2703
2704    /**
2705     * @return The first repetition of repeating field {@link #subpotentReason}, creating it if it does not already exist {3}
2706     */
2707    public CodeableConcept getSubpotentReasonFirstRep() { 
2708      if (getSubpotentReason().isEmpty()) {
2709        addSubpotentReason();
2710      }
2711      return getSubpotentReason().get(0);
2712    }
2713
2714    /**
2715     * @return {@link #education} (Educational material presented to the patient (or guardian) at the time of vaccine administration.)
2716     */
2717    public List<ImmunizationEducationComponent> getEducation() { 
2718      if (this.education == null)
2719        this.education = new ArrayList<ImmunizationEducationComponent>();
2720      return this.education;
2721    }
2722
2723    /**
2724     * @return Returns a reference to <code>this</code> for easy method chaining
2725     */
2726    public Immunization setEducation(List<ImmunizationEducationComponent> theEducation) { 
2727      this.education = theEducation;
2728      return this;
2729    }
2730
2731    public boolean hasEducation() { 
2732      if (this.education == null)
2733        return false;
2734      for (ImmunizationEducationComponent item : this.education)
2735        if (!item.isEmpty())
2736          return true;
2737      return false;
2738    }
2739
2740    public ImmunizationEducationComponent addEducation() { //3
2741      ImmunizationEducationComponent t = new ImmunizationEducationComponent();
2742      if (this.education == null)
2743        this.education = new ArrayList<ImmunizationEducationComponent>();
2744      this.education.add(t);
2745      return t;
2746    }
2747
2748    public Immunization addEducation(ImmunizationEducationComponent t) { //3
2749      if (t == null)
2750        return this;
2751      if (this.education == null)
2752        this.education = new ArrayList<ImmunizationEducationComponent>();
2753      this.education.add(t);
2754      return this;
2755    }
2756
2757    /**
2758     * @return The first repetition of repeating field {@link #education}, creating it if it does not already exist {3}
2759     */
2760    public ImmunizationEducationComponent getEducationFirstRep() { 
2761      if (getEducation().isEmpty()) {
2762        addEducation();
2763      }
2764      return getEducation().get(0);
2765    }
2766
2767    /**
2768     * @return {@link #programEligibility} (Indicates a patient's eligibility for a funding program.)
2769     */
2770    public List<CodeableConcept> getProgramEligibility() { 
2771      if (this.programEligibility == null)
2772        this.programEligibility = new ArrayList<CodeableConcept>();
2773      return this.programEligibility;
2774    }
2775
2776    /**
2777     * @return Returns a reference to <code>this</code> for easy method chaining
2778     */
2779    public Immunization setProgramEligibility(List<CodeableConcept> theProgramEligibility) { 
2780      this.programEligibility = theProgramEligibility;
2781      return this;
2782    }
2783
2784    public boolean hasProgramEligibility() { 
2785      if (this.programEligibility == null)
2786        return false;
2787      for (CodeableConcept item : this.programEligibility)
2788        if (!item.isEmpty())
2789          return true;
2790      return false;
2791    }
2792
2793    public CodeableConcept addProgramEligibility() { //3
2794      CodeableConcept t = new CodeableConcept();
2795      if (this.programEligibility == null)
2796        this.programEligibility = new ArrayList<CodeableConcept>();
2797      this.programEligibility.add(t);
2798      return t;
2799    }
2800
2801    public Immunization addProgramEligibility(CodeableConcept t) { //3
2802      if (t == null)
2803        return this;
2804      if (this.programEligibility == null)
2805        this.programEligibility = new ArrayList<CodeableConcept>();
2806      this.programEligibility.add(t);
2807      return this;
2808    }
2809
2810    /**
2811     * @return The first repetition of repeating field {@link #programEligibility}, creating it if it does not already exist {3}
2812     */
2813    public CodeableConcept getProgramEligibilityFirstRep() { 
2814      if (getProgramEligibility().isEmpty()) {
2815        addProgramEligibility();
2816      }
2817      return getProgramEligibility().get(0);
2818    }
2819
2820    /**
2821     * @return {@link #fundingSource} (Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).)
2822     */
2823    public CodeableConcept getFundingSource() { 
2824      if (this.fundingSource == null)
2825        if (Configuration.errorOnAutoCreate())
2826          throw new Error("Attempt to auto-create Immunization.fundingSource");
2827        else if (Configuration.doAutoCreate())
2828          this.fundingSource = new CodeableConcept(); // cc
2829      return this.fundingSource;
2830    }
2831
2832    public boolean hasFundingSource() { 
2833      return this.fundingSource != null && !this.fundingSource.isEmpty();
2834    }
2835
2836    /**
2837     * @param value {@link #fundingSource} (Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).)
2838     */
2839    public Immunization setFundingSource(CodeableConcept value) { 
2840      this.fundingSource = value;
2841      return this;
2842    }
2843
2844    /**
2845     * @return {@link #reaction} (Categorical data indicating that an adverse event is associated in time to an immunization.)
2846     */
2847    public List<ImmunizationReactionComponent> getReaction() { 
2848      if (this.reaction == null)
2849        this.reaction = new ArrayList<ImmunizationReactionComponent>();
2850      return this.reaction;
2851    }
2852
2853    /**
2854     * @return Returns a reference to <code>this</code> for easy method chaining
2855     */
2856    public Immunization setReaction(List<ImmunizationReactionComponent> theReaction) { 
2857      this.reaction = theReaction;
2858      return this;
2859    }
2860
2861    public boolean hasReaction() { 
2862      if (this.reaction == null)
2863        return false;
2864      for (ImmunizationReactionComponent item : this.reaction)
2865        if (!item.isEmpty())
2866          return true;
2867      return false;
2868    }
2869
2870    public ImmunizationReactionComponent addReaction() { //3
2871      ImmunizationReactionComponent t = new ImmunizationReactionComponent();
2872      if (this.reaction == null)
2873        this.reaction = new ArrayList<ImmunizationReactionComponent>();
2874      this.reaction.add(t);
2875      return t;
2876    }
2877
2878    public Immunization addReaction(ImmunizationReactionComponent t) { //3
2879      if (t == null)
2880        return this;
2881      if (this.reaction == null)
2882        this.reaction = new ArrayList<ImmunizationReactionComponent>();
2883      this.reaction.add(t);
2884      return this;
2885    }
2886
2887    /**
2888     * @return The first repetition of repeating field {@link #reaction}, creating it if it does not already exist {3}
2889     */
2890    public ImmunizationReactionComponent getReactionFirstRep() { 
2891      if (getReaction().isEmpty()) {
2892        addReaction();
2893      }
2894      return getReaction().get(0);
2895    }
2896
2897    /**
2898     * @return {@link #protocolApplied} (The protocol (set of recommendations) being followed by the provider who administered the dose.)
2899     */
2900    public List<ImmunizationProtocolAppliedComponent> getProtocolApplied() { 
2901      if (this.protocolApplied == null)
2902        this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>();
2903      return this.protocolApplied;
2904    }
2905
2906    /**
2907     * @return Returns a reference to <code>this</code> for easy method chaining
2908     */
2909    public Immunization setProtocolApplied(List<ImmunizationProtocolAppliedComponent> theProtocolApplied) { 
2910      this.protocolApplied = theProtocolApplied;
2911      return this;
2912    }
2913
2914    public boolean hasProtocolApplied() { 
2915      if (this.protocolApplied == null)
2916        return false;
2917      for (ImmunizationProtocolAppliedComponent item : this.protocolApplied)
2918        if (!item.isEmpty())
2919          return true;
2920      return false;
2921    }
2922
2923    public ImmunizationProtocolAppliedComponent addProtocolApplied() { //3
2924      ImmunizationProtocolAppliedComponent t = new ImmunizationProtocolAppliedComponent();
2925      if (this.protocolApplied == null)
2926        this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>();
2927      this.protocolApplied.add(t);
2928      return t;
2929    }
2930
2931    public Immunization addProtocolApplied(ImmunizationProtocolAppliedComponent t) { //3
2932      if (t == null)
2933        return this;
2934      if (this.protocolApplied == null)
2935        this.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>();
2936      this.protocolApplied.add(t);
2937      return this;
2938    }
2939
2940    /**
2941     * @return The first repetition of repeating field {@link #protocolApplied}, creating it if it does not already exist {3}
2942     */
2943    public ImmunizationProtocolAppliedComponent getProtocolAppliedFirstRep() { 
2944      if (getProtocolApplied().isEmpty()) {
2945        addProtocolApplied();
2946      }
2947      return getProtocolApplied().get(0);
2948    }
2949
2950      protected void listChildren(List<Property> children) {
2951        super.listChildren(children);
2952        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier));
2953        children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition|ArtifactAssessment|EventDefinition|EvidenceVariable|Measure|OperationDefinition|PlanDefinition|Questionnaire|SubscriptionTopic)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical));
2954        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri));
2955        children.add(new Property("basedOn", "Reference(CarePlan|MedicationRequest|ServiceRequest|ImmunizationRecommendation)", "A plan, order or recommendation fulfilled in whole or in part by this immunization.", 0, java.lang.Integer.MAX_VALUE, basedOn));
2956        children.add(new Property("status", "code", "Indicates the current status of the immunization event.", 0, 1, status));
2957        children.add(new Property("statusReason", "CodeableConcept", "Indicates the reason the immunization event was not performed.", 0, 1, statusReason));
2958        children.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode));
2959        children.add(new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, 1, manufacturer));
2960        children.add(new Property("lotNumber", "string", "Lot number of the  vaccine product.", 0, 1, lotNumber));
2961        children.add(new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, expirationDate));
2962        children.add(new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, 1, patient));
2963        children.add(new Property("encounter", "Reference(Encounter)", "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", 0, 1, encounter));
2964        children.add(new Property("occurrence[x]", "dateTime|string", "Date vaccine administered or was to be administered.", 0, 1, occurrence));
2965        children.add(new Property("primarySource", "boolean", "Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value \"true\" means this is a primary record of the immunization.", 0, 1, primarySource));
2966        children.add(new Property("informationSource", "CodeableReference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.", 0, 1, informationSource));
2967        children.add(new Property("location", "Reference(Location)", "The service delivery location where the vaccine administration occurred.", 0, 1, location));
2968        children.add(new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, site));
2969        children.add(new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, 1, route));
2970        children.add(new Property("doseQuantity", "Quantity", "The quantity of vaccine product that was administered.", 0, 1, doseQuantity));
2971        children.add(new Property("performer", "", "Indicates who performed the immunization event.", 0, java.lang.Integer.MAX_VALUE, performer));
2972        children.add(new Property("note", "Annotation", "Extra information about the immunization that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note));
2973        children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.", 0, java.lang.Integer.MAX_VALUE, reason));
2974        children.add(new Property("isSubpotent", "boolean", "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 0, 1, isSubpotent));
2975        children.add(new Property("subpotentReason", "CodeableConcept", "Reason why a dose is considered to be subpotent.", 0, java.lang.Integer.MAX_VALUE, subpotentReason));
2976        children.add(new Property("education", "", "Educational material presented to the patient (or guardian) at the time of vaccine administration.", 0, java.lang.Integer.MAX_VALUE, education));
2977        children.add(new Property("programEligibility", "CodeableConcept", "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, programEligibility));
2978        children.add(new Property("fundingSource", "CodeableConcept", "Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).", 0, 1, fundingSource));
2979        children.add(new Property("reaction", "", "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, java.lang.Integer.MAX_VALUE, reaction));
2980        children.add(new Property("protocolApplied", "", "The protocol (set of recommendations) being followed by the provider who administered the dose.", 0, java.lang.Integer.MAX_VALUE, protocolApplied));
2981      }
2982
2983      @Override
2984      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2985        switch (_hash) {
2986        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier);
2987        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(ActivityDefinition|ArtifactAssessment|EventDefinition|EvidenceVariable|Measure|OperationDefinition|PlanDefinition|Questionnaire|SubscriptionTopic)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical);
2988        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Immunization.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri);
2989        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|MedicationRequest|ServiceRequest|ImmunizationRecommendation)", "A plan, order or recommendation fulfilled in whole or in part by this immunization.", 0, java.lang.Integer.MAX_VALUE, basedOn);
2990        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current status of the immunization event.", 0, 1, status);
2991        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "Indicates the reason the immunization event was not performed.", 0, 1, statusReason);
2992        case 664556354: /*vaccineCode*/  return new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode);
2993        case -1969347631: /*manufacturer*/  return new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, 1, manufacturer);
2994        case 462547450: /*lotNumber*/  return new Property("lotNumber", "string", "Lot number of the  vaccine product.", 0, 1, lotNumber);
2995        case -668811523: /*expirationDate*/  return new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, expirationDate);
2996        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, 1, patient);
2997        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The visit or admission or other contact between patient and health care provider the immunization was performed as part of.", 0, 1, encounter);
2998        case -2022646513: /*occurrence[x]*/  return new Property("occurrence[x]", "dateTime|string", "Date vaccine administered or was to be administered.", 0, 1, occurrence);
2999        case 1687874001: /*occurrence*/  return new Property("occurrence[x]", "dateTime|string", "Date vaccine administered or was to be administered.", 0, 1, occurrence);
3000        case -298443636: /*occurrenceDateTime*/  return new Property("occurrence[x]", "dateTime", "Date vaccine administered or was to be administered.", 0, 1, occurrence);
3001        case 1496896834: /*occurrenceString*/  return new Property("occurrence[x]", "string", "Date vaccine administered or was to be administered.", 0, 1, occurrence);
3002        case -528721731: /*primarySource*/  return new Property("primarySource", "boolean", "Indicates whether this record was captured as an original primary source-of-truth record rather than a secondary 'reported' record. A value \"true\" means this is a primary record of the immunization.", 0, 1, primarySource);
3003        case -2123220889: /*informationSource*/  return new Property("informationSource", "CodeableReference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.", 0, 1, informationSource);
3004        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The service delivery location where the vaccine administration occurred.", 0, 1, location);
3005        case 3530567: /*site*/  return new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, site);
3006        case 108704329: /*route*/  return new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, 1, route);
3007        case -2083618872: /*doseQuantity*/  return new Property("doseQuantity", "Quantity", "The quantity of vaccine product that was administered.", 0, 1, doseQuantity);
3008        case 481140686: /*performer*/  return new Property("performer", "", "Indicates who performed the immunization event.", 0, java.lang.Integer.MAX_VALUE, performer);
3009        case 3387378: /*note*/  return new Property("note", "Annotation", "Extra information about the immunization that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note);
3010        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.", 0, java.lang.Integer.MAX_VALUE, reason);
3011        case 1618512556: /*isSubpotent*/  return new Property("isSubpotent", "boolean", "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 0, 1, isSubpotent);
3012        case 805168794: /*subpotentReason*/  return new Property("subpotentReason", "CodeableConcept", "Reason why a dose is considered to be subpotent.", 0, java.lang.Integer.MAX_VALUE, subpotentReason);
3013        case -290756696: /*education*/  return new Property("education", "", "Educational material presented to the patient (or guardian) at the time of vaccine administration.", 0, java.lang.Integer.MAX_VALUE, education);
3014        case 1207530089: /*programEligibility*/  return new Property("programEligibility", "CodeableConcept", "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, programEligibility);
3015        case 1120150904: /*fundingSource*/  return new Property("fundingSource", "CodeableConcept", "Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).", 0, 1, fundingSource);
3016        case -867509719: /*reaction*/  return new Property("reaction", "", "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, java.lang.Integer.MAX_VALUE, reaction);
3017        case 607985349: /*protocolApplied*/  return new Property("protocolApplied", "", "The protocol (set of recommendations) being followed by the provider who administered the dose.", 0, java.lang.Integer.MAX_VALUE, protocolApplied);
3018        default: return super.getNamedProperty(_hash, _name, _checkValid);
3019        }
3020
3021      }
3022
3023      @Override
3024      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3025        switch (hash) {
3026        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3027        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType
3028        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType
3029        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
3030        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImmunizationStatusCodes>
3031        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
3032        case 664556354: /*vaccineCode*/ return this.vaccineCode == null ? new Base[0] : new Base[] {this.vaccineCode}; // CodeableConcept
3033        case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // Reference
3034        case 462547450: /*lotNumber*/ return this.lotNumber == null ? new Base[0] : new Base[] {this.lotNumber}; // StringType
3035        case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateType
3036        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
3037        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
3038        case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType
3039        case -528721731: /*primarySource*/ return this.primarySource == null ? new Base[0] : new Base[] {this.primarySource}; // BooleanType
3040        case -2123220889: /*informationSource*/ return this.informationSource == null ? new Base[0] : new Base[] {this.informationSource}; // CodeableReference
3041        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
3042        case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // CodeableConcept
3043        case 108704329: /*route*/ return this.route == null ? new Base[0] : new Base[] {this.route}; // CodeableConcept
3044        case -2083618872: /*doseQuantity*/ return this.doseQuantity == null ? new Base[0] : new Base[] {this.doseQuantity}; // Quantity
3045        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // ImmunizationPerformerComponent
3046        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
3047        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
3048        case 1618512556: /*isSubpotent*/ return this.isSubpotent == null ? new Base[0] : new Base[] {this.isSubpotent}; // BooleanType
3049        case 805168794: /*subpotentReason*/ return this.subpotentReason == null ? new Base[0] : this.subpotentReason.toArray(new Base[this.subpotentReason.size()]); // CodeableConcept
3050        case -290756696: /*education*/ return this.education == null ? new Base[0] : this.education.toArray(new Base[this.education.size()]); // ImmunizationEducationComponent
3051        case 1207530089: /*programEligibility*/ return this.programEligibility == null ? new Base[0] : this.programEligibility.toArray(new Base[this.programEligibility.size()]); // CodeableConcept
3052        case 1120150904: /*fundingSource*/ return this.fundingSource == null ? new Base[0] : new Base[] {this.fundingSource}; // CodeableConcept
3053        case -867509719: /*reaction*/ return this.reaction == null ? new Base[0] : this.reaction.toArray(new Base[this.reaction.size()]); // ImmunizationReactionComponent
3054        case 607985349: /*protocolApplied*/ return this.protocolApplied == null ? new Base[0] : this.protocolApplied.toArray(new Base[this.protocolApplied.size()]); // ImmunizationProtocolAppliedComponent
3055        default: return super.getProperty(hash, name, checkValid);
3056        }
3057
3058      }
3059
3060      @Override
3061      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3062        switch (hash) {
3063        case -1618432855: // identifier
3064          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3065          return value;
3066        case 8911915: // instantiatesCanonical
3067          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3068          return value;
3069        case -1926393373: // instantiatesUri
3070          this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType
3071          return value;
3072        case -332612366: // basedOn
3073          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
3074          return value;
3075        case -892481550: // status
3076          value = new ImmunizationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
3077          this.status = (Enumeration) value; // Enumeration<ImmunizationStatusCodes>
3078          return value;
3079        case 2051346646: // statusReason
3080          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3081          return value;
3082        case 664556354: // vaccineCode
3083          this.vaccineCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3084          return value;
3085        case -1969347631: // manufacturer
3086          this.manufacturer = TypeConvertor.castToReference(value); // Reference
3087          return value;
3088        case 462547450: // lotNumber
3089          this.lotNumber = TypeConvertor.castToString(value); // StringType
3090          return value;
3091        case -668811523: // expirationDate
3092          this.expirationDate = TypeConvertor.castToDate(value); // DateType
3093          return value;
3094        case -791418107: // patient
3095          this.patient = TypeConvertor.castToReference(value); // Reference
3096          return value;
3097        case 1524132147: // encounter
3098          this.encounter = TypeConvertor.castToReference(value); // Reference
3099          return value;
3100        case 1687874001: // occurrence
3101          this.occurrence = TypeConvertor.castToType(value); // DataType
3102          return value;
3103        case -528721731: // primarySource
3104          this.primarySource = TypeConvertor.castToBoolean(value); // BooleanType
3105          return value;
3106        case -2123220889: // informationSource
3107          this.informationSource = TypeConvertor.castToCodeableReference(value); // CodeableReference
3108          return value;
3109        case 1901043637: // location
3110          this.location = TypeConvertor.castToReference(value); // Reference
3111          return value;
3112        case 3530567: // site
3113          this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3114          return value;
3115        case 108704329: // route
3116          this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3117          return value;
3118        case -2083618872: // doseQuantity
3119          this.doseQuantity = TypeConvertor.castToQuantity(value); // Quantity
3120          return value;
3121        case 481140686: // performer
3122          this.getPerformer().add((ImmunizationPerformerComponent) value); // ImmunizationPerformerComponent
3123          return value;
3124        case 3387378: // note
3125          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
3126          return value;
3127        case -934964668: // reason
3128          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
3129          return value;
3130        case 1618512556: // isSubpotent
3131          this.isSubpotent = TypeConvertor.castToBoolean(value); // BooleanType
3132          return value;
3133        case 805168794: // subpotentReason
3134          this.getSubpotentReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3135          return value;
3136        case -290756696: // education
3137          this.getEducation().add((ImmunizationEducationComponent) value); // ImmunizationEducationComponent
3138          return value;
3139        case 1207530089: // programEligibility
3140          this.getProgramEligibility().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3141          return value;
3142        case 1120150904: // fundingSource
3143          this.fundingSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3144          return value;
3145        case -867509719: // reaction
3146          this.getReaction().add((ImmunizationReactionComponent) value); // ImmunizationReactionComponent
3147          return value;
3148        case 607985349: // protocolApplied
3149          this.getProtocolApplied().add((ImmunizationProtocolAppliedComponent) value); // ImmunizationProtocolAppliedComponent
3150          return value;
3151        default: return super.setProperty(hash, name, value);
3152        }
3153
3154      }
3155
3156      @Override
3157      public Base setProperty(String name, Base value) throws FHIRException {
3158        if (name.equals("identifier")) {
3159          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3160        } else if (name.equals("instantiatesCanonical")) {
3161          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value));
3162        } else if (name.equals("instantiatesUri")) {
3163          this.getInstantiatesUri().add(TypeConvertor.castToUri(value));
3164        } else if (name.equals("basedOn")) {
3165          this.getBasedOn().add(TypeConvertor.castToReference(value));
3166        } else if (name.equals("status")) {
3167          value = new ImmunizationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
3168          this.status = (Enumeration) value; // Enumeration<ImmunizationStatusCodes>
3169        } else if (name.equals("statusReason")) {
3170          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3171        } else if (name.equals("vaccineCode")) {
3172          this.vaccineCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3173        } else if (name.equals("manufacturer")) {
3174          this.manufacturer = TypeConvertor.castToReference(value); // Reference
3175        } else if (name.equals("lotNumber")) {
3176          this.lotNumber = TypeConvertor.castToString(value); // StringType
3177        } else if (name.equals("expirationDate")) {
3178          this.expirationDate = TypeConvertor.castToDate(value); // DateType
3179        } else if (name.equals("patient")) {
3180          this.patient = TypeConvertor.castToReference(value); // Reference
3181        } else if (name.equals("encounter")) {
3182          this.encounter = TypeConvertor.castToReference(value); // Reference
3183        } else if (name.equals("occurrence[x]")) {
3184          this.occurrence = TypeConvertor.castToType(value); // DataType
3185        } else if (name.equals("primarySource")) {
3186          this.primarySource = TypeConvertor.castToBoolean(value); // BooleanType
3187        } else if (name.equals("informationSource")) {
3188          this.informationSource = TypeConvertor.castToCodeableReference(value); // CodeableReference
3189        } else if (name.equals("location")) {
3190          this.location = TypeConvertor.castToReference(value); // Reference
3191        } else if (name.equals("site")) {
3192          this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3193        } else if (name.equals("route")) {
3194          this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3195        } else if (name.equals("doseQuantity")) {
3196          this.doseQuantity = TypeConvertor.castToQuantity(value); // Quantity
3197        } else if (name.equals("performer")) {
3198          this.getPerformer().add((ImmunizationPerformerComponent) value);
3199        } else if (name.equals("note")) {
3200          this.getNote().add(TypeConvertor.castToAnnotation(value));
3201        } else if (name.equals("reason")) {
3202          this.getReason().add(TypeConvertor.castToCodeableReference(value));
3203        } else if (name.equals("isSubpotent")) {
3204          this.isSubpotent = TypeConvertor.castToBoolean(value); // BooleanType
3205        } else if (name.equals("subpotentReason")) {
3206          this.getSubpotentReason().add(TypeConvertor.castToCodeableConcept(value));
3207        } else if (name.equals("education")) {
3208          this.getEducation().add((ImmunizationEducationComponent) value);
3209        } else if (name.equals("programEligibility")) {
3210          this.getProgramEligibility().add(TypeConvertor.castToCodeableConcept(value));
3211        } else if (name.equals("fundingSource")) {
3212          this.fundingSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3213        } else if (name.equals("reaction")) {
3214          this.getReaction().add((ImmunizationReactionComponent) value);
3215        } else if (name.equals("protocolApplied")) {
3216          this.getProtocolApplied().add((ImmunizationProtocolAppliedComponent) value);
3217        } else
3218          return super.setProperty(name, value);
3219        return value;
3220      }
3221
3222      @Override
3223      public Base makeProperty(int hash, String name) throws FHIRException {
3224        switch (hash) {
3225        case -1618432855:  return addIdentifier(); 
3226        case 8911915:  return addInstantiatesCanonicalElement();
3227        case -1926393373:  return addInstantiatesUriElement();
3228        case -332612366:  return addBasedOn(); 
3229        case -892481550:  return getStatusElement();
3230        case 2051346646:  return getStatusReason();
3231        case 664556354:  return getVaccineCode();
3232        case -1969347631:  return getManufacturer();
3233        case 462547450:  return getLotNumberElement();
3234        case -668811523:  return getExpirationDateElement();
3235        case -791418107:  return getPatient();
3236        case 1524132147:  return getEncounter();
3237        case -2022646513:  return getOccurrence();
3238        case 1687874001:  return getOccurrence();
3239        case -528721731:  return getPrimarySourceElement();
3240        case -2123220889:  return getInformationSource();
3241        case 1901043637:  return getLocation();
3242        case 3530567:  return getSite();
3243        case 108704329:  return getRoute();
3244        case -2083618872:  return getDoseQuantity();
3245        case 481140686:  return addPerformer(); 
3246        case 3387378:  return addNote(); 
3247        case -934964668:  return addReason(); 
3248        case 1618512556:  return getIsSubpotentElement();
3249        case 805168794:  return addSubpotentReason(); 
3250        case -290756696:  return addEducation(); 
3251        case 1207530089:  return addProgramEligibility(); 
3252        case 1120150904:  return getFundingSource();
3253        case -867509719:  return addReaction(); 
3254        case 607985349:  return addProtocolApplied(); 
3255        default: return super.makeProperty(hash, name);
3256        }
3257
3258      }
3259
3260      @Override
3261      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3262        switch (hash) {
3263        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3264        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
3265        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
3266        case -332612366: /*basedOn*/ return new String[] {"Reference"};
3267        case -892481550: /*status*/ return new String[] {"code"};
3268        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
3269        case 664556354: /*vaccineCode*/ return new String[] {"CodeableConcept"};
3270        case -1969347631: /*manufacturer*/ return new String[] {"Reference"};
3271        case 462547450: /*lotNumber*/ return new String[] {"string"};
3272        case -668811523: /*expirationDate*/ return new String[] {"date"};
3273        case -791418107: /*patient*/ return new String[] {"Reference"};
3274        case 1524132147: /*encounter*/ return new String[] {"Reference"};
3275        case 1687874001: /*occurrence*/ return new String[] {"dateTime", "string"};
3276        case -528721731: /*primarySource*/ return new String[] {"boolean"};
3277        case -2123220889: /*informationSource*/ return new String[] {"CodeableReference"};
3278        case 1901043637: /*location*/ return new String[] {"Reference"};
3279        case 3530567: /*site*/ return new String[] {"CodeableConcept"};
3280        case 108704329: /*route*/ return new String[] {"CodeableConcept"};
3281        case -2083618872: /*doseQuantity*/ return new String[] {"Quantity"};
3282        case 481140686: /*performer*/ return new String[] {};
3283        case 3387378: /*note*/ return new String[] {"Annotation"};
3284        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
3285        case 1618512556: /*isSubpotent*/ return new String[] {"boolean"};
3286        case 805168794: /*subpotentReason*/ return new String[] {"CodeableConcept"};
3287        case -290756696: /*education*/ return new String[] {};
3288        case 1207530089: /*programEligibility*/ return new String[] {"CodeableConcept"};
3289        case 1120150904: /*fundingSource*/ return new String[] {"CodeableConcept"};
3290        case -867509719: /*reaction*/ return new String[] {};
3291        case 607985349: /*protocolApplied*/ return new String[] {};
3292        default: return super.getTypesForProperty(hash, name);
3293        }
3294
3295      }
3296
3297      @Override
3298      public Base addChild(String name) throws FHIRException {
3299        if (name.equals("identifier")) {
3300          return addIdentifier();
3301        }
3302        else if (name.equals("instantiatesCanonical")) {
3303          throw new FHIRException("Cannot call addChild on a primitive type Immunization.instantiatesCanonical");
3304        }
3305        else if (name.equals("instantiatesUri")) {
3306          throw new FHIRException("Cannot call addChild on a primitive type Immunization.instantiatesUri");
3307        }
3308        else if (name.equals("basedOn")) {
3309          return addBasedOn();
3310        }
3311        else if (name.equals("status")) {
3312          throw new FHIRException("Cannot call addChild on a primitive type Immunization.status");
3313        }
3314        else if (name.equals("statusReason")) {
3315          this.statusReason = new CodeableConcept();
3316          return this.statusReason;
3317        }
3318        else if (name.equals("vaccineCode")) {
3319          this.vaccineCode = new CodeableConcept();
3320          return this.vaccineCode;
3321        }
3322        else if (name.equals("manufacturer")) {
3323          this.manufacturer = new Reference();
3324          return this.manufacturer;
3325        }
3326        else if (name.equals("lotNumber")) {
3327          throw new FHIRException("Cannot call addChild on a primitive type Immunization.lotNumber");
3328        }
3329        else if (name.equals("expirationDate")) {
3330          throw new FHIRException("Cannot call addChild on a primitive type Immunization.expirationDate");
3331        }
3332        else if (name.equals("patient")) {
3333          this.patient = new Reference();
3334          return this.patient;
3335        }
3336        else if (name.equals("encounter")) {
3337          this.encounter = new Reference();
3338          return this.encounter;
3339        }
3340        else if (name.equals("occurrenceDateTime")) {
3341          this.occurrence = new DateTimeType();
3342          return this.occurrence;
3343        }
3344        else if (name.equals("occurrenceString")) {
3345          this.occurrence = new StringType();
3346          return this.occurrence;
3347        }
3348        else if (name.equals("primarySource")) {
3349          throw new FHIRException("Cannot call addChild on a primitive type Immunization.primarySource");
3350        }
3351        else if (name.equals("informationSource")) {
3352          this.informationSource = new CodeableReference();
3353          return this.informationSource;
3354        }
3355        else if (name.equals("location")) {
3356          this.location = new Reference();
3357          return this.location;
3358        }
3359        else if (name.equals("site")) {
3360          this.site = new CodeableConcept();
3361          return this.site;
3362        }
3363        else if (name.equals("route")) {
3364          this.route = new CodeableConcept();
3365          return this.route;
3366        }
3367        else if (name.equals("doseQuantity")) {
3368          this.doseQuantity = new Quantity();
3369          return this.doseQuantity;
3370        }
3371        else if (name.equals("performer")) {
3372          return addPerformer();
3373        }
3374        else if (name.equals("note")) {
3375          return addNote();
3376        }
3377        else if (name.equals("reason")) {
3378          return addReason();
3379        }
3380        else if (name.equals("isSubpotent")) {
3381          throw new FHIRException("Cannot call addChild on a primitive type Immunization.isSubpotent");
3382        }
3383        else if (name.equals("subpotentReason")) {
3384          return addSubpotentReason();
3385        }
3386        else if (name.equals("education")) {
3387          return addEducation();
3388        }
3389        else if (name.equals("programEligibility")) {
3390          return addProgramEligibility();
3391        }
3392        else if (name.equals("fundingSource")) {
3393          this.fundingSource = new CodeableConcept();
3394          return this.fundingSource;
3395        }
3396        else if (name.equals("reaction")) {
3397          return addReaction();
3398        }
3399        else if (name.equals("protocolApplied")) {
3400          return addProtocolApplied();
3401        }
3402        else
3403          return super.addChild(name);
3404      }
3405
3406  public String fhirType() {
3407    return "Immunization";
3408
3409  }
3410
3411      public Immunization copy() {
3412        Immunization dst = new Immunization();
3413        copyValues(dst);
3414        return dst;
3415      }
3416
3417      public void copyValues(Immunization dst) {
3418        super.copyValues(dst);
3419        if (identifier != null) {
3420          dst.identifier = new ArrayList<Identifier>();
3421          for (Identifier i : identifier)
3422            dst.identifier.add(i.copy());
3423        };
3424        if (instantiatesCanonical != null) {
3425          dst.instantiatesCanonical = new ArrayList<CanonicalType>();
3426          for (CanonicalType i : instantiatesCanonical)
3427            dst.instantiatesCanonical.add(i.copy());
3428        };
3429        if (instantiatesUri != null) {
3430          dst.instantiatesUri = new ArrayList<UriType>();
3431          for (UriType i : instantiatesUri)
3432            dst.instantiatesUri.add(i.copy());
3433        };
3434        if (basedOn != null) {
3435          dst.basedOn = new ArrayList<Reference>();
3436          for (Reference i : basedOn)
3437            dst.basedOn.add(i.copy());
3438        };
3439        dst.status = status == null ? null : status.copy();
3440        dst.statusReason = statusReason == null ? null : statusReason.copy();
3441        dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy();
3442        dst.manufacturer = manufacturer == null ? null : manufacturer.copy();
3443        dst.lotNumber = lotNumber == null ? null : lotNumber.copy();
3444        dst.expirationDate = expirationDate == null ? null : expirationDate.copy();
3445        dst.patient = patient == null ? null : patient.copy();
3446        dst.encounter = encounter == null ? null : encounter.copy();
3447        dst.occurrence = occurrence == null ? null : occurrence.copy();
3448        dst.primarySource = primarySource == null ? null : primarySource.copy();
3449        dst.informationSource = informationSource == null ? null : informationSource.copy();
3450        dst.location = location == null ? null : location.copy();
3451        dst.site = site == null ? null : site.copy();
3452        dst.route = route == null ? null : route.copy();
3453        dst.doseQuantity = doseQuantity == null ? null : doseQuantity.copy();
3454        if (performer != null) {
3455          dst.performer = new ArrayList<ImmunizationPerformerComponent>();
3456          for (ImmunizationPerformerComponent i : performer)
3457            dst.performer.add(i.copy());
3458        };
3459        if (note != null) {
3460          dst.note = new ArrayList<Annotation>();
3461          for (Annotation i : note)
3462            dst.note.add(i.copy());
3463        };
3464        if (reason != null) {
3465          dst.reason = new ArrayList<CodeableReference>();
3466          for (CodeableReference i : reason)
3467            dst.reason.add(i.copy());
3468        };
3469        dst.isSubpotent = isSubpotent == null ? null : isSubpotent.copy();
3470        if (subpotentReason != null) {
3471          dst.subpotentReason = new ArrayList<CodeableConcept>();
3472          for (CodeableConcept i : subpotentReason)
3473            dst.subpotentReason.add(i.copy());
3474        };
3475        if (education != null) {
3476          dst.education = new ArrayList<ImmunizationEducationComponent>();
3477          for (ImmunizationEducationComponent i : education)
3478            dst.education.add(i.copy());
3479        };
3480        if (programEligibility != null) {
3481          dst.programEligibility = new ArrayList<CodeableConcept>();
3482          for (CodeableConcept i : programEligibility)
3483            dst.programEligibility.add(i.copy());
3484        };
3485        dst.fundingSource = fundingSource == null ? null : fundingSource.copy();
3486        if (reaction != null) {
3487          dst.reaction = new ArrayList<ImmunizationReactionComponent>();
3488          for (ImmunizationReactionComponent i : reaction)
3489            dst.reaction.add(i.copy());
3490        };
3491        if (protocolApplied != null) {
3492          dst.protocolApplied = new ArrayList<ImmunizationProtocolAppliedComponent>();
3493          for (ImmunizationProtocolAppliedComponent i : protocolApplied)
3494            dst.protocolApplied.add(i.copy());
3495        };
3496      }
3497
3498      protected Immunization typedCopy() {
3499        return copy();
3500      }
3501
3502      @Override
3503      public boolean equalsDeep(Base other_) {
3504        if (!super.equalsDeep(other_))
3505          return false;
3506        if (!(other_ instanceof Immunization))
3507          return false;
3508        Immunization o = (Immunization) other_;
3509        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
3510           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
3511           && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(vaccineCode, o.vaccineCode, true)
3512           && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(lotNumber, o.lotNumber, true)
3513           && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(patient, o.patient, true)
3514           && compareDeep(encounter, o.encounter, true) && compareDeep(occurrence, o.occurrence, true) && compareDeep(primarySource, o.primarySource, true)
3515           && compareDeep(informationSource, o.informationSource, true) && compareDeep(location, o.location, true)
3516           && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) && compareDeep(doseQuantity, o.doseQuantity, true)
3517           && compareDeep(performer, o.performer, true) && compareDeep(note, o.note, true) && compareDeep(reason, o.reason, true)
3518           && compareDeep(isSubpotent, o.isSubpotent, true) && compareDeep(subpotentReason, o.subpotentReason, true)
3519           && compareDeep(education, o.education, true) && compareDeep(programEligibility, o.programEligibility, true)
3520           && compareDeep(fundingSource, o.fundingSource, true) && compareDeep(reaction, o.reaction, true)
3521           && compareDeep(protocolApplied, o.protocolApplied, true);
3522      }
3523
3524      @Override
3525      public boolean equalsShallow(Base other_) {
3526        if (!super.equalsShallow(other_))
3527          return false;
3528        if (!(other_ instanceof Immunization))
3529          return false;
3530        Immunization o = (Immunization) other_;
3531        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
3532           && compareValues(status, o.status, true) && compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true)
3533           && compareValues(primarySource, o.primarySource, true) && compareValues(isSubpotent, o.isSubpotent, true)
3534          ;
3535      }
3536
3537      public boolean isEmpty() {
3538        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
3539          , instantiatesUri, basedOn, status, statusReason, vaccineCode, manufacturer, lotNumber
3540          , expirationDate, patient, encounter, occurrence, primarySource, informationSource
3541          , location, site, route, doseQuantity, performer, note, reason, isSubpotent
3542          , subpotentReason, education, programEligibility, fundingSource, reaction, protocolApplied
3543          );
3544      }
3545
3546  @Override
3547  public ResourceType getResourceType() {
3548    return ResourceType.Immunization;
3549   }
3550
3551 /**
3552   * Search parameter: <b>location</b>
3553   * <p>
3554   * Description: <b>The service delivery location or facility in which the vaccine was / was to be administered</b><br>
3555   * Type: <b>reference</b><br>
3556   * Path: <b>Immunization.location</b><br>
3557   * </p>
3558   */
3559  @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference", target={Location.class } )
3560  public static final String SP_LOCATION = "location";
3561 /**
3562   * <b>Fluent Client</b> search parameter constant for <b>location</b>
3563   * <p>
3564   * Description: <b>The service delivery location or facility in which the vaccine was / was to be administered</b><br>
3565   * Type: <b>reference</b><br>
3566   * Path: <b>Immunization.location</b><br>
3567   * </p>
3568   */
3569  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
3570
3571/**
3572   * Constant for fluent queries to be used to add include statements. Specifies
3573   * the path value of "<b>Immunization:location</b>".
3574   */
3575  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Immunization:location").toLocked();
3576
3577 /**
3578   * Search parameter: <b>lot-number</b>
3579   * <p>
3580   * Description: <b>Vaccine Lot Number</b><br>
3581   * Type: <b>string</b><br>
3582   * Path: <b>Immunization.lotNumber</b><br>
3583   * </p>
3584   */
3585  @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" )
3586  public static final String SP_LOT_NUMBER = "lot-number";
3587 /**
3588   * <b>Fluent Client</b> search parameter constant for <b>lot-number</b>
3589   * <p>
3590   * Description: <b>Vaccine Lot Number</b><br>
3591   * Type: <b>string</b><br>
3592   * Path: <b>Immunization.lotNumber</b><br>
3593   * </p>
3594   */
3595  public static final ca.uhn.fhir.rest.gclient.StringClientParam LOT_NUMBER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_LOT_NUMBER);
3596
3597 /**
3598   * Search parameter: <b>manufacturer</b>
3599   * <p>
3600   * Description: <b>Vaccine Manufacturer</b><br>
3601   * Type: <b>reference</b><br>
3602   * Path: <b>Immunization.manufacturer</b><br>
3603   * </p>
3604   */
3605  @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference", target={Organization.class } )
3606  public static final String SP_MANUFACTURER = "manufacturer";
3607 /**
3608   * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b>
3609   * <p>
3610   * Description: <b>Vaccine Manufacturer</b><br>
3611   * Type: <b>reference</b><br>
3612   * Path: <b>Immunization.manufacturer</b><br>
3613   * </p>
3614   */
3615  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANUFACTURER);
3616
3617/**
3618   * Constant for fluent queries to be used to add include statements. Specifies
3619   * the path value of "<b>Immunization:manufacturer</b>".
3620   */
3621  public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER = new ca.uhn.fhir.model.api.Include("Immunization:manufacturer").toLocked();
3622
3623 /**
3624   * Search parameter: <b>performer</b>
3625   * <p>
3626   * Description: <b>The practitioner, individual or organization who played a role in the vaccination</b><br>
3627   * Type: <b>reference</b><br>
3628   * Path: <b>Immunization.performer.actor</b><br>
3629   * </p>
3630   */
3631  @SearchParamDefinition(name="performer", path="Immunization.performer.actor", description="The practitioner, individual or organization who played a role in the vaccination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
3632  public static final String SP_PERFORMER = "performer";
3633 /**
3634   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
3635   * <p>
3636   * Description: <b>The practitioner, individual or organization who played a role in the vaccination</b><br>
3637   * Type: <b>reference</b><br>
3638   * Path: <b>Immunization.performer.actor</b><br>
3639   * </p>
3640   */
3641  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
3642
3643/**
3644   * Constant for fluent queries to be used to add include statements. Specifies
3645   * the path value of "<b>Immunization:performer</b>".
3646   */
3647  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("Immunization:performer").toLocked();
3648
3649 /**
3650   * Search parameter: <b>reaction-date</b>
3651   * <p>
3652   * Description: <b>When reaction started</b><br>
3653   * Type: <b>date</b><br>
3654   * Path: <b>Immunization.reaction.date</b><br>
3655   * </p>
3656   */
3657  @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When reaction started", type="date" )
3658  public static final String SP_REACTION_DATE = "reaction-date";
3659 /**
3660   * <b>Fluent Client</b> search parameter constant for <b>reaction-date</b>
3661   * <p>
3662   * Description: <b>When reaction started</b><br>
3663   * Type: <b>date</b><br>
3664   * Path: <b>Immunization.reaction.date</b><br>
3665   * </p>
3666   */
3667  public static final ca.uhn.fhir.rest.gclient.DateClientParam REACTION_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_REACTION_DATE);
3668
3669 /**
3670   * Search parameter: <b>reaction</b>
3671   * <p>
3672   * Description: <b>Additional information on reaction</b><br>
3673   * Type: <b>reference</b><br>
3674   * Path: <b>Immunization.reaction.manifestation.reference</b><br>
3675   * </p>
3676   */
3677  @SearchParamDefinition(name="reaction", path="Immunization.reaction.manifestation.reference", description="Additional information on reaction", type="reference" )
3678  public static final String SP_REACTION = "reaction";
3679 /**
3680   * <b>Fluent Client</b> search parameter constant for <b>reaction</b>
3681   * <p>
3682   * Description: <b>Additional information on reaction</b><br>
3683   * Type: <b>reference</b><br>
3684   * Path: <b>Immunization.reaction.manifestation.reference</b><br>
3685   * </p>
3686   */
3687  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REACTION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REACTION);
3688
3689/**
3690   * Constant for fluent queries to be used to add include statements. Specifies
3691   * the path value of "<b>Immunization:reaction</b>".
3692   */
3693  public static final ca.uhn.fhir.model.api.Include INCLUDE_REACTION = new ca.uhn.fhir.model.api.Include("Immunization:reaction").toLocked();
3694
3695 /**
3696   * Search parameter: <b>reason-code</b>
3697   * <p>
3698   * Description: <b>Reason why the vaccine was administered</b><br>
3699   * Type: <b>token</b><br>
3700   * Path: <b>Immunization.reason.concept</b><br>
3701   * </p>
3702   */
3703  @SearchParamDefinition(name="reason-code", path="Immunization.reason.concept", description="Reason why the vaccine was administered", type="token" )
3704  public static final String SP_REASON_CODE = "reason-code";
3705 /**
3706   * <b>Fluent Client</b> search parameter constant for <b>reason-code</b>
3707   * <p>
3708   * Description: <b>Reason why the vaccine was administered</b><br>
3709   * Type: <b>token</b><br>
3710   * Path: <b>Immunization.reason.concept</b><br>
3711   * </p>
3712   */
3713  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE);
3714
3715 /**
3716   * Search parameter: <b>reason-reference</b>
3717   * <p>
3718   * Description: <b>Reference to a resource (by instance)</b><br>
3719   * Type: <b>reference</b><br>
3720   * Path: <b>Immunization.reason.reference</b><br>
3721   * </p>
3722   */
3723  @SearchParamDefinition(name="reason-reference", path="Immunization.reason.reference", description="Reference to a resource (by instance)", type="reference" )
3724  public static final String SP_REASON_REFERENCE = "reason-reference";
3725 /**
3726   * <b>Fluent Client</b> search parameter constant for <b>reason-reference</b>
3727   * <p>
3728   * Description: <b>Reference to a resource (by instance)</b><br>
3729   * Type: <b>reference</b><br>
3730   * Path: <b>Immunization.reason.reference</b><br>
3731   * </p>
3732   */
3733  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE);
3734
3735/**
3736   * Constant for fluent queries to be used to add include statements. Specifies
3737   * the path value of "<b>Immunization:reason-reference</b>".
3738   */
3739  public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Immunization:reason-reference").toLocked();
3740
3741 /**
3742   * Search parameter: <b>series</b>
3743   * <p>
3744   * Description: <b>The series being followed by the provider</b><br>
3745   * Type: <b>string</b><br>
3746   * Path: <b>Immunization.protocolApplied.series</b><br>
3747   * </p>
3748   */
3749  @SearchParamDefinition(name="series", path="Immunization.protocolApplied.series", description="The series being followed by the provider", type="string" )
3750  public static final String SP_SERIES = "series";
3751 /**
3752   * <b>Fluent Client</b> search parameter constant for <b>series</b>
3753   * <p>
3754   * Description: <b>The series being followed by the provider</b><br>
3755   * Type: <b>string</b><br>
3756   * Path: <b>Immunization.protocolApplied.series</b><br>
3757   * </p>
3758   */
3759  public static final ca.uhn.fhir.rest.gclient.StringClientParam SERIES = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_SERIES);
3760
3761 /**
3762   * Search parameter: <b>status-reason</b>
3763   * <p>
3764   * Description: <b>Reason why the vaccine was not administered</b><br>
3765   * Type: <b>token</b><br>
3766   * Path: <b>Immunization.statusReason</b><br>
3767   * </p>
3768   */
3769  @SearchParamDefinition(name="status-reason", path="Immunization.statusReason", description="Reason why the vaccine was not administered", type="token" )
3770  public static final String SP_STATUS_REASON = "status-reason";
3771 /**
3772   * <b>Fluent Client</b> search parameter constant for <b>status-reason</b>
3773   * <p>
3774   * Description: <b>Reason why the vaccine was not administered</b><br>
3775   * Type: <b>token</b><br>
3776   * Path: <b>Immunization.statusReason</b><br>
3777   * </p>
3778   */
3779  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS_REASON);
3780
3781 /**
3782   * Search parameter: <b>status</b>
3783   * <p>
3784   * Description: <b>Immunization event status</b><br>
3785   * Type: <b>token</b><br>
3786   * Path: <b>Immunization.status</b><br>
3787   * </p>
3788   */
3789  @SearchParamDefinition(name="status", path="Immunization.status", description="Immunization event status", type="token" )
3790  public static final String SP_STATUS = "status";
3791 /**
3792   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3793   * <p>
3794   * Description: <b>Immunization event status</b><br>
3795   * Type: <b>token</b><br>
3796   * Path: <b>Immunization.status</b><br>
3797   * </p>
3798   */
3799  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3800
3801 /**
3802   * Search parameter: <b>target-disease</b>
3803   * <p>
3804   * Description: <b>The target disease the dose is being administered against</b><br>
3805   * Type: <b>token</b><br>
3806   * Path: <b>Immunization.protocolApplied.targetDisease</b><br>
3807   * </p>
3808   */
3809  @SearchParamDefinition(name="target-disease", path="Immunization.protocolApplied.targetDisease", description="The target disease the dose is being administered against", type="token" )
3810  public static final String SP_TARGET_DISEASE = "target-disease";
3811 /**
3812   * <b>Fluent Client</b> search parameter constant for <b>target-disease</b>
3813   * <p>
3814   * Description: <b>The target disease the dose is being administered against</b><br>
3815   * Type: <b>token</b><br>
3816   * Path: <b>Immunization.protocolApplied.targetDisease</b><br>
3817   * </p>
3818   */
3819  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_DISEASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_DISEASE);
3820
3821 /**
3822   * Search parameter: <b>vaccine-code</b>
3823   * <p>
3824   * Description: <b>Vaccine Product Administered</b><br>
3825   * Type: <b>token</b><br>
3826   * Path: <b>Immunization.vaccineCode</b><br>
3827   * </p>
3828   */
3829  @SearchParamDefinition(name="vaccine-code", path="Immunization.vaccineCode", description="Vaccine Product Administered", type="token" )
3830  public static final String SP_VACCINE_CODE = "vaccine-code";
3831 /**
3832   * <b>Fluent Client</b> search parameter constant for <b>vaccine-code</b>
3833   * <p>
3834   * Description: <b>Vaccine Product Administered</b><br>
3835   * Type: <b>token</b><br>
3836   * Path: <b>Immunization.vaccineCode</b><br>
3837   * </p>
3838   */
3839  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VACCINE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VACCINE_CODE);
3840
3841 /**
3842   * Search parameter: <b>date</b>
3843   * <p>
3844   * Description: <b>Multiple Resources: 
3845
3846* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3847* [CarePlan](careplan.html): Time period plan covers
3848* [CareTeam](careteam.html): A date within the coverage time period.
3849* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3850* [Composition](composition.html): Composition editing time
3851* [Consent](consent.html): When consent was agreed to
3852* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3853* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3854* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3855* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3856* [Flag](flag.html): Time period when flag is active
3857* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3858* [List](list.html): When the list was prepared
3859* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
3860* [Procedure](procedure.html): When the procedure occurred or is occurring
3861* [RiskAssessment](riskassessment.html): When was assessment made?
3862* [SupplyRequest](supplyrequest.html): When the request was made
3863</b><br>
3864   * Type: <b>date</b><br>
3865   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
3866   * </p>
3867   */
3868  @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
3869  public static final String SP_DATE = "date";
3870 /**
3871   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3872   * <p>
3873   * Description: <b>Multiple Resources: 
3874
3875* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3876* [CarePlan](careplan.html): Time period plan covers
3877* [CareTeam](careteam.html): A date within the coverage time period.
3878* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3879* [Composition](composition.html): Composition editing time
3880* [Consent](consent.html): When consent was agreed to
3881* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3882* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3883* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3884* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3885* [Flag](flag.html): Time period when flag is active
3886* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3887* [List](list.html): When the list was prepared
3888* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
3889* [Procedure](procedure.html): When the procedure occurred or is occurring
3890* [RiskAssessment](riskassessment.html): When was assessment made?
3891* [SupplyRequest](supplyrequest.html): When the request was made
3892</b><br>
3893   * Type: <b>date</b><br>
3894   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
3895   * </p>
3896   */
3897  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3898
3899 /**
3900   * Search parameter: <b>identifier</b>
3901   * <p>
3902   * Description: <b>Multiple Resources: 
3903
3904* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3905* [CarePlan](careplan.html): External Ids for this plan
3906* [CareTeam](careteam.html): External Ids for this team
3907* [Composition](composition.html): Version-independent identifier for the Composition
3908* [Condition](condition.html): A unique identifier of the condition record
3909* [Consent](consent.html): Identifier for this record (external references)
3910* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3911* [DeviceRequest](devicerequest.html): Business identifier for request/order
3912* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3913* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
3914* [DocumentReference](documentreference.html): Identifier of the attachment binary
3915* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3916* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3917* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3918* [Goal](goal.html): External Ids for this goal
3919* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3920* [Immunization](immunization.html): Business identifier
3921* [List](list.html): Business identifier
3922* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3923* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3924* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3925* [MedicationUsage](medicationusage.html): Return statements with this external identifier
3926* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3927* [Observation](observation.html): The unique id for a particular observation
3928* [Procedure](procedure.html): A unique identifier for a procedure
3929* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3930* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3931* [SupplyDelivery](supplydelivery.html): External identifier
3932* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3933* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3934</b><br>
3935   * Type: <b>token</b><br>
3936   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
3937   * </p>
3938   */
3939  @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
3940  public static final String SP_IDENTIFIER = "identifier";
3941 /**
3942   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3943   * <p>
3944   * Description: <b>Multiple Resources: 
3945
3946* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3947* [CarePlan](careplan.html): External Ids for this plan
3948* [CareTeam](careteam.html): External Ids for this team
3949* [Composition](composition.html): Version-independent identifier for the Composition
3950* [Condition](condition.html): A unique identifier of the condition record
3951* [Consent](consent.html): Identifier for this record (external references)
3952* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3953* [DeviceRequest](devicerequest.html): Business identifier for request/order
3954* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3955* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
3956* [DocumentReference](documentreference.html): Identifier of the attachment binary
3957* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3958* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3959* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3960* [Goal](goal.html): External Ids for this goal
3961* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3962* [Immunization](immunization.html): Business identifier
3963* [List](list.html): Business identifier
3964* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3965* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3966* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3967* [MedicationUsage](medicationusage.html): Return statements with this external identifier
3968* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3969* [Observation](observation.html): The unique id for a particular observation
3970* [Procedure](procedure.html): A unique identifier for a procedure
3971* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3972* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3973* [SupplyDelivery](supplydelivery.html): External identifier
3974* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3975* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3976</b><br>
3977   * Type: <b>token</b><br>
3978   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
3979   * </p>
3980   */
3981  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3982
3983 /**
3984   * Search parameter: <b>patient</b>
3985   * <p>
3986   * Description: <b>Multiple Resources: 
3987
3988* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3989* [CarePlan](careplan.html): Who the care plan is for
3990* [CareTeam](careteam.html): Who care team is for
3991* [ClinicalImpression](clinicalimpression.html): Patient assessed
3992* [Composition](composition.html): Who and/or what the composition is about
3993* [Condition](condition.html): Who has the condition?
3994* [Consent](consent.html): Who the consent applies to
3995* [DetectedIssue](detectedissue.html): Associated patient
3996* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3997* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3998* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3999* [DocumentManifest](documentmanifest.html): The subject of the set of documents
4000* [DocumentReference](documentreference.html): Who/what is the subject of the document
4001* [Encounter](encounter.html): The patient present at the encounter
4002* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
4003* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
4004* [Flag](flag.html): The identity of a subject to list flags for
4005* [Goal](goal.html): Who this goal is intended for
4006* [ImagingStudy](imagingstudy.html): Who the study is about
4007* [Immunization](immunization.html): The patient for the vaccination record
4008* [List](list.html): If all resources have the same subject
4009* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
4010* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
4011* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
4012* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
4013* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
4014* [Observation](observation.html): The subject that the observation is about (if patient)
4015* [Procedure](procedure.html): Search by subject - a patient
4016* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
4017* [ServiceRequest](servicerequest.html): Search by subject - a patient
4018* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
4019* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
4020</b><br>
4021   * Type: <b>reference</b><br>
4022   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
4023   * </p>
4024   */
4025  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
4026  public static final String SP_PATIENT = "patient";
4027 /**
4028   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
4029   * <p>
4030   * Description: <b>Multiple Resources: 
4031
4032* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
4033* [CarePlan](careplan.html): Who the care plan is for
4034* [CareTeam](careteam.html): Who care team is for
4035* [ClinicalImpression](clinicalimpression.html): Patient assessed
4036* [Composition](composition.html): Who and/or what the composition is about
4037* [Condition](condition.html): Who has the condition?
4038* [Consent](consent.html): Who the consent applies to
4039* [DetectedIssue](detectedissue.html): Associated patient
4040* [DeviceRequest](devicerequest.html): Individual the service is ordered for
4041* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
4042* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
4043* [DocumentManifest](documentmanifest.html): The subject of the set of documents
4044* [DocumentReference](documentreference.html): Who/what is the subject of the document
4045* [Encounter](encounter.html): The patient present at the encounter
4046* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
4047* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
4048* [Flag](flag.html): The identity of a subject to list flags for
4049* [Goal](goal.html): Who this goal is intended for
4050* [ImagingStudy](imagingstudy.html): Who the study is about
4051* [Immunization](immunization.html): The patient for the vaccination record
4052* [List](list.html): If all resources have the same subject
4053* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
4054* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
4055* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
4056* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
4057* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
4058* [Observation](observation.html): The subject that the observation is about (if patient)
4059* [Procedure](procedure.html): Search by subject - a patient
4060* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
4061* [ServiceRequest](servicerequest.html): Search by subject - a patient
4062* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
4063* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
4064</b><br>
4065   * Type: <b>reference</b><br>
4066   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
4067   * </p>
4068   */
4069  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
4070
4071/**
4072   * Constant for fluent queries to be used to add include statements. Specifies
4073   * the path value of "<b>Immunization:patient</b>".
4074   */
4075  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Immunization:patient").toLocked();
4076
4077
4078}
4079