001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import ca.uhn.fhir.model.api.annotation.ResourceDef;
038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
039import ca.uhn.fhir.model.api.annotation.Child;
040import ca.uhn.fhir.model.api.annotation.ChildOrder;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.Block;
043import org.hl7.fhir.instance.model.api.*;
044import org.hl7.fhir.exceptions.FHIRException;
045/**
046 * Describes 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.
047 */
048@ResourceDef(name="Immunization", profile="http://hl7.org/fhir/Profile/Immunization")
049public class Immunization extends DomainResource {
050
051    public enum ImmunizationStatus {
052        /**
053         * null
054         */
055        COMPLETED, 
056        /**
057         * null
058         */
059        ENTEREDINERROR, 
060        /**
061         * null
062         */
063        NOTDONE, 
064        /**
065         * added to help the parsers with the generic types
066         */
067        NULL;
068        public static ImmunizationStatus fromCode(String codeString) throws FHIRException {
069            if (codeString == null || "".equals(codeString))
070                return null;
071        if ("completed".equals(codeString))
072          return COMPLETED;
073        if ("entered-in-error".equals(codeString))
074          return ENTEREDINERROR;
075        if ("not-done".equals(codeString))
076          return NOTDONE;
077        if (Configuration.isAcceptInvalidEnums())
078          return null;
079        else
080          throw new FHIRException("Unknown ImmunizationStatus code '"+codeString+"'");
081        }
082        public String toCode() {
083          switch (this) {
084            case COMPLETED: return "completed";
085            case ENTEREDINERROR: return "entered-in-error";
086            case NOTDONE: return "not-done";
087            default: return "?";
088          }
089        }
090        public String getSystem() {
091          switch (this) {
092            case COMPLETED: return "http://hl7.org/fhir/event-status";
093            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
094            case NOTDONE: return "http://hl7.org/fhir/event-status";
095            default: return "?";
096          }
097        }
098        public String getDefinition() {
099          switch (this) {
100            case COMPLETED: return "";
101            case ENTEREDINERROR: return "";
102            case NOTDONE: return "";
103            default: return "?";
104          }
105        }
106        public String getDisplay() {
107          switch (this) {
108            case COMPLETED: return "completed";
109            case ENTEREDINERROR: return "entered-in-error";
110            case NOTDONE: return "not-done";
111            default: return "?";
112          }
113        }
114    }
115
116  public static class ImmunizationStatusEnumFactory implements EnumFactory<ImmunizationStatus> {
117    public ImmunizationStatus fromCode(String codeString) throws IllegalArgumentException {
118      if (codeString == null || "".equals(codeString))
119            if (codeString == null || "".equals(codeString))
120                return null;
121        if ("completed".equals(codeString))
122          return ImmunizationStatus.COMPLETED;
123        if ("entered-in-error".equals(codeString))
124          return ImmunizationStatus.ENTEREDINERROR;
125        if ("not-done".equals(codeString))
126          return ImmunizationStatus.NOTDONE;
127        throw new IllegalArgumentException("Unknown ImmunizationStatus code '"+codeString+"'");
128        }
129        public Enumeration<ImmunizationStatus> fromType(Base code) throws FHIRException {
130          if (code == null)
131            return null;
132          if (code.isEmpty())
133            return new Enumeration<ImmunizationStatus>(this);
134          String codeString = ((PrimitiveType) code).asStringValue();
135          if (codeString == null || "".equals(codeString))
136            return null;
137        if ("completed".equals(codeString))
138          return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.COMPLETED);
139        if ("entered-in-error".equals(codeString))
140          return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.ENTEREDINERROR);
141        if ("not-done".equals(codeString))
142          return new Enumeration<ImmunizationStatus>(this, ImmunizationStatus.NOTDONE);
143        throw new FHIRException("Unknown ImmunizationStatus code '"+codeString+"'");
144        }
145    public String toCode(ImmunizationStatus code) {
146      if (code == ImmunizationStatus.COMPLETED)
147        return "completed";
148      if (code == ImmunizationStatus.ENTEREDINERROR)
149        return "entered-in-error";
150      if (code == ImmunizationStatus.NOTDONE)
151        return "not-done";
152      return "?";
153      }
154    public String toSystem(ImmunizationStatus code) {
155      return code.getSystem();
156      }
157    }
158
159    @Block()
160    public static class ImmunizationPerformerComponent extends BackboneElement implements IBaseBackboneElement {
161        /**
162         * Describes the type of performance (e.g. ordering provider, administering provider, etc.).
163         */
164        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
165        @Description(shortDefinition="What type of performance was done", formalDefinition="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." )
166        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-function")
167        protected CodeableConcept function;
168
169        /**
170         * The practitioner or organization who performed the action.
171         */
172        @Child(name = "actor", type = {Practitioner.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=true)
173        @Description(shortDefinition="Individual or organization who was performing", formalDefinition="The practitioner or organization who performed the action." )
174        protected Reference actor;
175
176        /**
177         * The actual object that is the target of the reference (The practitioner or organization who performed the action.)
178         */
179        protected Resource actorTarget;
180
181        private static final long serialVersionUID = 1424001049L;
182
183    /**
184     * Constructor
185     */
186      public ImmunizationPerformerComponent() {
187        super();
188      }
189
190    /**
191     * Constructor
192     */
193      public ImmunizationPerformerComponent(Reference actor) {
194        super();
195        this.actor = actor;
196      }
197
198        /**
199         * @return {@link #function} (Describes the type of performance (e.g. ordering provider, administering provider, etc.).)
200         */
201        public CodeableConcept getFunction() { 
202          if (this.function == null)
203            if (Configuration.errorOnAutoCreate())
204              throw new Error("Attempt to auto-create ImmunizationPerformerComponent.function");
205            else if (Configuration.doAutoCreate())
206              this.function = new CodeableConcept(); // cc
207          return this.function;
208        }
209
210        public boolean hasFunction() { 
211          return this.function != null && !this.function.isEmpty();
212        }
213
214        /**
215         * @param value {@link #function} (Describes the type of performance (e.g. ordering provider, administering provider, etc.).)
216         */
217        public ImmunizationPerformerComponent setFunction(CodeableConcept value) { 
218          this.function = value;
219          return this;
220        }
221
222        /**
223         * @return {@link #actor} (The practitioner or organization who performed the action.)
224         */
225        public Reference getActor() { 
226          if (this.actor == null)
227            if (Configuration.errorOnAutoCreate())
228              throw new Error("Attempt to auto-create ImmunizationPerformerComponent.actor");
229            else if (Configuration.doAutoCreate())
230              this.actor = new Reference(); // cc
231          return this.actor;
232        }
233
234        public boolean hasActor() { 
235          return this.actor != null && !this.actor.isEmpty();
236        }
237
238        /**
239         * @param value {@link #actor} (The practitioner or organization who performed the action.)
240         */
241        public ImmunizationPerformerComponent setActor(Reference value) { 
242          this.actor = value;
243          return this;
244        }
245
246        /**
247         * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner or organization who performed the action.)
248         */
249        public Resource getActorTarget() { 
250          return this.actorTarget;
251        }
252
253        /**
254         * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner or organization who performed the action.)
255         */
256        public ImmunizationPerformerComponent setActorTarget(Resource value) { 
257          this.actorTarget = value;
258          return this;
259        }
260
261        protected void listChildren(List<Property> children) {
262          super.listChildren(children);
263          children.add(new Property("function", "CodeableConcept", "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, function));
264          children.add(new Property("actor", "Reference(Practitioner|Organization)", "The practitioner or organization who performed the action.", 0, 1, actor));
265        }
266
267        @Override
268        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
269          switch (_hash) {
270          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Describes the type of performance (e.g. ordering provider, administering provider, etc.).", 0, 1, function);
271          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|Organization)", "The practitioner or organization who performed the action.", 0, 1, actor);
272          default: return super.getNamedProperty(_hash, _name, _checkValid);
273          }
274
275        }
276
277      @Override
278      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
279        switch (hash) {
280        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
281        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
282        default: return super.getProperty(hash, name, checkValid);
283        }
284
285      }
286
287      @Override
288      public Base setProperty(int hash, String name, Base value) throws FHIRException {
289        switch (hash) {
290        case 1380938712: // function
291          this.function = castToCodeableConcept(value); // CodeableConcept
292          return value;
293        case 92645877: // actor
294          this.actor = castToReference(value); // Reference
295          return value;
296        default: return super.setProperty(hash, name, value);
297        }
298
299      }
300
301      @Override
302      public Base setProperty(String name, Base value) throws FHIRException {
303        if (name.equals("function")) {
304          this.function = castToCodeableConcept(value); // CodeableConcept
305        } else if (name.equals("actor")) {
306          this.actor = castToReference(value); // Reference
307        } else
308          return super.setProperty(name, value);
309        return value;
310      }
311
312      @Override
313      public Base makeProperty(int hash, String name) throws FHIRException {
314        switch (hash) {
315        case 1380938712:  return getFunction(); 
316        case 92645877:  return getActor(); 
317        default: return super.makeProperty(hash, name);
318        }
319
320      }
321
322      @Override
323      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
324        switch (hash) {
325        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
326        case 92645877: /*actor*/ return new String[] {"Reference"};
327        default: return super.getTypesForProperty(hash, name);
328        }
329
330      }
331
332      @Override
333      public Base addChild(String name) throws FHIRException {
334        if (name.equals("function")) {
335          this.function = new CodeableConcept();
336          return this.function;
337        }
338        else if (name.equals("actor")) {
339          this.actor = new Reference();
340          return this.actor;
341        }
342        else
343          return super.addChild(name);
344      }
345
346      public ImmunizationPerformerComponent copy() {
347        ImmunizationPerformerComponent dst = new ImmunizationPerformerComponent();
348        copyValues(dst);
349        dst.function = function == null ? null : function.copy();
350        dst.actor = actor == null ? null : actor.copy();
351        return dst;
352      }
353
354      @Override
355      public boolean equalsDeep(Base other_) {
356        if (!super.equalsDeep(other_))
357          return false;
358        if (!(other_ instanceof ImmunizationPerformerComponent))
359          return false;
360        ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_;
361        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
362      }
363
364      @Override
365      public boolean equalsShallow(Base other_) {
366        if (!super.equalsShallow(other_))
367          return false;
368        if (!(other_ instanceof ImmunizationPerformerComponent))
369          return false;
370        ImmunizationPerformerComponent o = (ImmunizationPerformerComponent) other_;
371        return true;
372      }
373
374      public boolean isEmpty() {
375        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
376      }
377
378  public String fhirType() {
379    return "Immunization.performer";
380
381  }
382
383  }
384
385    @Block()
386    public static class ImmunizationEducationComponent extends BackboneElement implements IBaseBackboneElement {
387        /**
388         * Identifier of the material presented to the patient.
389         */
390        @Child(name = "documentType", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
391        @Description(shortDefinition="Educational material document identifier", formalDefinition="Identifier of the material presented to the patient." )
392        protected StringType documentType;
393
394        /**
395         * Reference pointer to the educational material given to the patient if the information was on line.
396         */
397        @Child(name = "reference", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
398        @Description(shortDefinition="Educational material reference pointer", formalDefinition="Reference pointer to the educational material given to the patient if the information was on line." )
399        protected UriType reference;
400
401        /**
402         * Date the educational material was published.
403         */
404        @Child(name = "publicationDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
405        @Description(shortDefinition="Educational material publication date", formalDefinition="Date the educational material was published." )
406        protected DateTimeType publicationDate;
407
408        /**
409         * Date the educational material was given to the patient.
410         */
411        @Child(name = "presentationDate", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
412        @Description(shortDefinition="Educational material presentation date", formalDefinition="Date the educational material was given to the patient." )
413        protected DateTimeType presentationDate;
414
415        private static final long serialVersionUID = -1277654827L;
416
417    /**
418     * Constructor
419     */
420      public ImmunizationEducationComponent() {
421        super();
422      }
423
424        /**
425         * @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
426         */
427        public StringType getDocumentTypeElement() { 
428          if (this.documentType == null)
429            if (Configuration.errorOnAutoCreate())
430              throw new Error("Attempt to auto-create ImmunizationEducationComponent.documentType");
431            else if (Configuration.doAutoCreate())
432              this.documentType = new StringType(); // bb
433          return this.documentType;
434        }
435
436        public boolean hasDocumentTypeElement() { 
437          return this.documentType != null && !this.documentType.isEmpty();
438        }
439
440        public boolean hasDocumentType() { 
441          return this.documentType != null && !this.documentType.isEmpty();
442        }
443
444        /**
445         * @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
446         */
447        public ImmunizationEducationComponent setDocumentTypeElement(StringType value) { 
448          this.documentType = value;
449          return this;
450        }
451
452        /**
453         * @return Identifier of the material presented to the patient.
454         */
455        public String getDocumentType() { 
456          return this.documentType == null ? null : this.documentType.getValue();
457        }
458
459        /**
460         * @param value Identifier of the material presented to the patient.
461         */
462        public ImmunizationEducationComponent setDocumentType(String value) { 
463          if (Utilities.noString(value))
464            this.documentType = null;
465          else {
466            if (this.documentType == null)
467              this.documentType = new StringType();
468            this.documentType.setValue(value);
469          }
470          return this;
471        }
472
473        /**
474         * @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
475         */
476        public UriType getReferenceElement() { 
477          if (this.reference == null)
478            if (Configuration.errorOnAutoCreate())
479              throw new Error("Attempt to auto-create ImmunizationEducationComponent.reference");
480            else if (Configuration.doAutoCreate())
481              this.reference = new UriType(); // bb
482          return this.reference;
483        }
484
485        public boolean hasReferenceElement() { 
486          return this.reference != null && !this.reference.isEmpty();
487        }
488
489        public boolean hasReference() { 
490          return this.reference != null && !this.reference.isEmpty();
491        }
492
493        /**
494         * @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
495         */
496        public ImmunizationEducationComponent setReferenceElement(UriType value) { 
497          this.reference = value;
498          return this;
499        }
500
501        /**
502         * @return Reference pointer to the educational material given to the patient if the information was on line.
503         */
504        public String getReference() { 
505          return this.reference == null ? null : this.reference.getValue();
506        }
507
508        /**
509         * @param value Reference pointer to the educational material given to the patient if the information was on line.
510         */
511        public ImmunizationEducationComponent setReference(String value) { 
512          if (Utilities.noString(value))
513            this.reference = null;
514          else {
515            if (this.reference == null)
516              this.reference = new UriType();
517            this.reference.setValue(value);
518          }
519          return this;
520        }
521
522        /**
523         * @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
524         */
525        public DateTimeType getPublicationDateElement() { 
526          if (this.publicationDate == null)
527            if (Configuration.errorOnAutoCreate())
528              throw new Error("Attempt to auto-create ImmunizationEducationComponent.publicationDate");
529            else if (Configuration.doAutoCreate())
530              this.publicationDate = new DateTimeType(); // bb
531          return this.publicationDate;
532        }
533
534        public boolean hasPublicationDateElement() { 
535          return this.publicationDate != null && !this.publicationDate.isEmpty();
536        }
537
538        public boolean hasPublicationDate() { 
539          return this.publicationDate != null && !this.publicationDate.isEmpty();
540        }
541
542        /**
543         * @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
544         */
545        public ImmunizationEducationComponent setPublicationDateElement(DateTimeType value) { 
546          this.publicationDate = value;
547          return this;
548        }
549
550        /**
551         * @return Date the educational material was published.
552         */
553        public Date getPublicationDate() { 
554          return this.publicationDate == null ? null : this.publicationDate.getValue();
555        }
556
557        /**
558         * @param value Date the educational material was published.
559         */
560        public ImmunizationEducationComponent setPublicationDate(Date value) { 
561          if (value == null)
562            this.publicationDate = null;
563          else {
564            if (this.publicationDate == null)
565              this.publicationDate = new DateTimeType();
566            this.publicationDate.setValue(value);
567          }
568          return this;
569        }
570
571        /**
572         * @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
573         */
574        public DateTimeType getPresentationDateElement() { 
575          if (this.presentationDate == null)
576            if (Configuration.errorOnAutoCreate())
577              throw new Error("Attempt to auto-create ImmunizationEducationComponent.presentationDate");
578            else if (Configuration.doAutoCreate())
579              this.presentationDate = new DateTimeType(); // bb
580          return this.presentationDate;
581        }
582
583        public boolean hasPresentationDateElement() { 
584          return this.presentationDate != null && !this.presentationDate.isEmpty();
585        }
586
587        public boolean hasPresentationDate() { 
588          return this.presentationDate != null && !this.presentationDate.isEmpty();
589        }
590
591        /**
592         * @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
593         */
594        public ImmunizationEducationComponent setPresentationDateElement(DateTimeType value) { 
595          this.presentationDate = value;
596          return this;
597        }
598
599        /**
600         * @return Date the educational material was given to the patient.
601         */
602        public Date getPresentationDate() { 
603          return this.presentationDate == null ? null : this.presentationDate.getValue();
604        }
605
606        /**
607         * @param value Date the educational material was given to the patient.
608         */
609        public ImmunizationEducationComponent setPresentationDate(Date value) { 
610          if (value == null)
611            this.presentationDate = null;
612          else {
613            if (this.presentationDate == null)
614              this.presentationDate = new DateTimeType();
615            this.presentationDate.setValue(value);
616          }
617          return this;
618        }
619
620        protected void listChildren(List<Property> children) {
621          super.listChildren(children);
622          children.add(new Property("documentType", "string", "Identifier of the material presented to the patient.", 0, 1, documentType));
623          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));
624          children.add(new Property("publicationDate", "dateTime", "Date the educational material was published.", 0, 1, publicationDate));
625          children.add(new Property("presentationDate", "dateTime", "Date the educational material was given to the patient.", 0, 1, presentationDate));
626        }
627
628        @Override
629        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
630          switch (_hash) {
631          case -1473196299: /*documentType*/  return new Property("documentType", "string", "Identifier of the material presented to the patient.", 0, 1, documentType);
632          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);
633          case 1470566394: /*publicationDate*/  return new Property("publicationDate", "dateTime", "Date the educational material was published.", 0, 1, publicationDate);
634          case 1602373096: /*presentationDate*/  return new Property("presentationDate", "dateTime", "Date the educational material was given to the patient.", 0, 1, presentationDate);
635          default: return super.getNamedProperty(_hash, _name, _checkValid);
636          }
637
638        }
639
640      @Override
641      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
642        switch (hash) {
643        case -1473196299: /*documentType*/ return this.documentType == null ? new Base[0] : new Base[] {this.documentType}; // StringType
644        case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // UriType
645        case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateTimeType
646        case 1602373096: /*presentationDate*/ return this.presentationDate == null ? new Base[0] : new Base[] {this.presentationDate}; // DateTimeType
647        default: return super.getProperty(hash, name, checkValid);
648        }
649
650      }
651
652      @Override
653      public Base setProperty(int hash, String name, Base value) throws FHIRException {
654        switch (hash) {
655        case -1473196299: // documentType
656          this.documentType = castToString(value); // StringType
657          return value;
658        case -925155509: // reference
659          this.reference = castToUri(value); // UriType
660          return value;
661        case 1470566394: // publicationDate
662          this.publicationDate = castToDateTime(value); // DateTimeType
663          return value;
664        case 1602373096: // presentationDate
665          this.presentationDate = castToDateTime(value); // DateTimeType
666          return value;
667        default: return super.setProperty(hash, name, value);
668        }
669
670      }
671
672      @Override
673      public Base setProperty(String name, Base value) throws FHIRException {
674        if (name.equals("documentType")) {
675          this.documentType = castToString(value); // StringType
676        } else if (name.equals("reference")) {
677          this.reference = castToUri(value); // UriType
678        } else if (name.equals("publicationDate")) {
679          this.publicationDate = castToDateTime(value); // DateTimeType
680        } else if (name.equals("presentationDate")) {
681          this.presentationDate = castToDateTime(value); // DateTimeType
682        } else
683          return super.setProperty(name, value);
684        return value;
685      }
686
687      @Override
688      public Base makeProperty(int hash, String name) throws FHIRException {
689        switch (hash) {
690        case -1473196299:  return getDocumentTypeElement();
691        case -925155509:  return getReferenceElement();
692        case 1470566394:  return getPublicationDateElement();
693        case 1602373096:  return getPresentationDateElement();
694        default: return super.makeProperty(hash, name);
695        }
696
697      }
698
699      @Override
700      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
701        switch (hash) {
702        case -1473196299: /*documentType*/ return new String[] {"string"};
703        case -925155509: /*reference*/ return new String[] {"uri"};
704        case 1470566394: /*publicationDate*/ return new String[] {"dateTime"};
705        case 1602373096: /*presentationDate*/ return new String[] {"dateTime"};
706        default: return super.getTypesForProperty(hash, name);
707        }
708
709      }
710
711      @Override
712      public Base addChild(String name) throws FHIRException {
713        if (name.equals("documentType")) {
714          throw new FHIRException("Cannot call addChild on a primitive type Immunization.documentType");
715        }
716        else if (name.equals("reference")) {
717          throw new FHIRException("Cannot call addChild on a primitive type Immunization.reference");
718        }
719        else if (name.equals("publicationDate")) {
720          throw new FHIRException("Cannot call addChild on a primitive type Immunization.publicationDate");
721        }
722        else if (name.equals("presentationDate")) {
723          throw new FHIRException("Cannot call addChild on a primitive type Immunization.presentationDate");
724        }
725        else
726          return super.addChild(name);
727      }
728
729      public ImmunizationEducationComponent copy() {
730        ImmunizationEducationComponent dst = new ImmunizationEducationComponent();
731        copyValues(dst);
732        dst.documentType = documentType == null ? null : documentType.copy();
733        dst.reference = reference == null ? null : reference.copy();
734        dst.publicationDate = publicationDate == null ? null : publicationDate.copy();
735        dst.presentationDate = presentationDate == null ? null : presentationDate.copy();
736        return dst;
737      }
738
739      @Override
740      public boolean equalsDeep(Base other_) {
741        if (!super.equalsDeep(other_))
742          return false;
743        if (!(other_ instanceof ImmunizationEducationComponent))
744          return false;
745        ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_;
746        return compareDeep(documentType, o.documentType, true) && compareDeep(reference, o.reference, true)
747           && compareDeep(publicationDate, o.publicationDate, true) && compareDeep(presentationDate, o.presentationDate, true)
748          ;
749      }
750
751      @Override
752      public boolean equalsShallow(Base other_) {
753        if (!super.equalsShallow(other_))
754          return false;
755        if (!(other_ instanceof ImmunizationEducationComponent))
756          return false;
757        ImmunizationEducationComponent o = (ImmunizationEducationComponent) other_;
758        return compareValues(documentType, o.documentType, true) && compareValues(reference, o.reference, true)
759           && compareValues(publicationDate, o.publicationDate, true) && compareValues(presentationDate, o.presentationDate, true)
760          ;
761      }
762
763      public boolean isEmpty() {
764        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(documentType, reference, publicationDate
765          , presentationDate);
766      }
767
768  public String fhirType() {
769    return "Immunization.education";
770
771  }
772
773  }
774
775    /**
776     * A unique identifier assigned to this immunization record.
777     */
778    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
779    @Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." )
780    protected List<Identifier> identifier;
781
782    /**
783     * Indicates the current status of the immunization event.
784     */
785    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
786    @Description(shortDefinition="completed | entered-in-error | not-done", formalDefinition="Indicates the current status of the immunization event." )
787    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-status")
788    protected Enumeration<ImmunizationStatus> status;
789
790    /**
791     * Indicates the reason the immunization event was not performed.
792     */
793    @Child(name = "statusReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
794    @Description(shortDefinition="Reason not done", formalDefinition="Indicates the reason the immunization event was not performed." )
795    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-status-reason")
796    protected CodeableConcept statusReason;
797
798    /**
799     * Vaccine that was administered or was to be administered.
800     */
801    @Child(name = "vaccineCode", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
802    @Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." )
803    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vaccine-code")
804    protected CodeableConcept vaccineCode;
805
806    /**
807     * The patient who either received or did not receive the immunization.
808     */
809    @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true)
810    @Description(shortDefinition="Who was immunized", formalDefinition="The patient who either received or did not receive the immunization." )
811    protected Reference patient;
812
813    /**
814     * The actual object that is the target of the reference (The patient who either received or did not receive the immunization.)
815     */
816    protected Patient patientTarget;
817
818    /**
819     * The visit or admission or other contact between patient and health care provider the immunization was performed as part of.
820     */
821    @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=false)
822    @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." )
823    protected Reference encounter;
824
825    /**
826     * The actual object that is the target of the reference (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
827     */
828    protected Encounter encounterTarget;
829
830    /**
831     * Date vaccine administered or was to be administered.
832     */
833    @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
834    @Description(shortDefinition="Vaccine administration date", formalDefinition="Date vaccine administered or was to be administered." )
835    protected DateTimeType date;
836
837    /**
838     * An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.
839     */
840    @Child(name = "primarySource", type = {BooleanType.class}, order=7, min=1, max=1, modifier=false, summary=true)
841    @Description(shortDefinition="Indicates context the data was recorded in", formalDefinition="An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded." )
842    protected BooleanType primarySource;
843
844    /**
845     * The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.
846     */
847    @Child(name = "reportOrigin", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
848    @Description(shortDefinition="Indicates the source of a secondarily reported record", formalDefinition="The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine." )
849    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-origin")
850    protected CodeableConcept reportOrigin;
851
852    /**
853     * The service delivery location where the vaccine administration occurred.
854     */
855    @Child(name = "location", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=false)
856    @Description(shortDefinition="Where immunization occurred", formalDefinition="The service delivery location where the vaccine administration occurred." )
857    protected Reference location;
858
859    /**
860     * The actual object that is the target of the reference (The service delivery location where the vaccine administration occurred.)
861     */
862    protected Location locationTarget;
863
864    /**
865     * Name of vaccine manufacturer.
866     */
867    @Child(name = "manufacturer", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=false)
868    @Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." )
869    protected Reference manufacturer;
870
871    /**
872     * The actual object that is the target of the reference (Name of vaccine manufacturer.)
873     */
874    protected Organization manufacturerTarget;
875
876    /**
877     * Lot number of the  vaccine product.
878     */
879    @Child(name = "lotNumber", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
880    @Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the  vaccine product." )
881    protected StringType lotNumber;
882
883    /**
884     * Date vaccine batch expires.
885     */
886    @Child(name = "expirationDate", type = {DateType.class}, order=12, min=0, max=1, modifier=false, summary=false)
887    @Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." )
888    protected DateType expirationDate;
889
890    /**
891     * Body site where vaccine was administered.
892     */
893    @Child(name = "site", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false)
894    @Description(shortDefinition="Body site vaccine  was administered", formalDefinition="Body site where vaccine was administered." )
895    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-site")
896    protected CodeableConcept site;
897
898    /**
899     * The path by which the vaccine product is taken into the body.
900     */
901    @Child(name = "route", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false)
902    @Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." )
903    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-route")
904    protected CodeableConcept route;
905
906    /**
907     * The quantity of vaccine product that was administered.
908     */
909    @Child(name = "doseQuantity", type = {SimpleQuantity.class}, order=15, min=0, max=1, modifier=false, summary=false)
910    @Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." )
911    protected SimpleQuantity doseQuantity;
912
913    /**
914     * Indicates who performed the immunization event.
915     */
916    @Child(name = "performer", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
917    @Description(shortDefinition="Who performed event", formalDefinition="Indicates who performed the immunization event." )
918    protected List<ImmunizationPerformerComponent> performer;
919
920    /**
921     * Extra information about the immunization that is not conveyed by the other attributes.
922     */
923    @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
924    @Description(shortDefinition="Additional immunization notes", formalDefinition="Extra information about the immunization that is not conveyed by the other attributes." )
925    protected List<Annotation> note;
926
927    /**
928     * Reasons why the vaccine was administered.
929     */
930    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
931    @Description(shortDefinition="Why immunization occurred", formalDefinition="Reasons why the vaccine was administered." )
932    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-reason")
933    protected List<CodeableConcept> reasonCode;
934
935    /**
936     * Condition, Observation or DiagnosticReport that supports why the immunization was administered.
937     */
938    @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
939    @Description(shortDefinition="Why immunization occurred", formalDefinition="Condition, Observation or DiagnosticReport that supports why the immunization was administered." )
940    protected List<Reference> reasonReference;
941    /**
942     * The actual objects that are the target of the reference (Condition, Observation or DiagnosticReport that supports why the immunization was administered.)
943     */
944    protected List<Resource> reasonReferenceTarget;
945
946
947    /**
948     * Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
949     */
950    @Child(name = "isPotent", type = {BooleanType.class}, order=20, min=0, max=1, modifier=true, summary=true)
951    @Description(shortDefinition="Dose potency", formalDefinition="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent." )
952    protected BooleanType isPotent;
953
954    /**
955     * Reason why a dose is considered to be subpotent.
956     */
957    @Child(name = "subpotentReason", type = {CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
958    @Description(shortDefinition="Reason for being subpotent", formalDefinition="Reason why a dose is considered to be subpotent." )
959    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-subpotent-reason")
960    protected List<CodeableConcept> subpotentReason;
961
962    /**
963     * Educational material presented to the patient (or guardian) at the time of vaccine administration.
964     */
965    @Child(name = "education", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
966    @Description(shortDefinition="Educational material presented to patient", formalDefinition="Educational material presented to the patient (or guardian) at the time of vaccine administration." )
967    protected List<ImmunizationEducationComponent> education;
968
969    /**
970     * Indicates a patient's eligibility for a funding program.
971     */
972    @Child(name = "programEligibility", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
973    @Description(shortDefinition="Patient eligibility for a vaccination program", formalDefinition="Indicates a patient's eligibility for a funding program." )
974    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-program-eligibility")
975    protected List<CodeableConcept> programEligibility;
976
977    /**
978     * 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).
979     */
980    @Child(name = "fundingSource", type = {CodeableConcept.class}, order=24, min=0, max=1, modifier=false, summary=false)
981    @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)." )
982    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/immunization-funding-source")
983    protected CodeableConcept fundingSource;
984
985    private static final long serialVersionUID = -1905339818L;
986
987  /**
988   * Constructor
989   */
990    public Immunization() {
991      super();
992    }
993
994  /**
995   * Constructor
996   */
997    public Immunization(Enumeration<ImmunizationStatus> status, CodeableConcept vaccineCode, Reference patient, BooleanType primarySource) {
998      super();
999      this.status = status;
1000      this.vaccineCode = vaccineCode;
1001      this.patient = patient;
1002      this.primarySource = primarySource;
1003    }
1004
1005    /**
1006     * @return {@link #identifier} (A unique identifier assigned to this immunization record.)
1007     */
1008    public List<Identifier> getIdentifier() { 
1009      if (this.identifier == null)
1010        this.identifier = new ArrayList<Identifier>();
1011      return this.identifier;
1012    }
1013
1014    /**
1015     * @return Returns a reference to <code>this</code> for easy method chaining
1016     */
1017    public Immunization setIdentifier(List<Identifier> theIdentifier) { 
1018      this.identifier = theIdentifier;
1019      return this;
1020    }
1021
1022    public boolean hasIdentifier() { 
1023      if (this.identifier == null)
1024        return false;
1025      for (Identifier item : this.identifier)
1026        if (!item.isEmpty())
1027          return true;
1028      return false;
1029    }
1030
1031    public Identifier addIdentifier() { //3
1032      Identifier t = new Identifier();
1033      if (this.identifier == null)
1034        this.identifier = new ArrayList<Identifier>();
1035      this.identifier.add(t);
1036      return t;
1037    }
1038
1039    public Immunization addIdentifier(Identifier t) { //3
1040      if (t == null)
1041        return this;
1042      if (this.identifier == null)
1043        this.identifier = new ArrayList<Identifier>();
1044      this.identifier.add(t);
1045      return this;
1046    }
1047
1048    /**
1049     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1050     */
1051    public Identifier getIdentifierFirstRep() { 
1052      if (getIdentifier().isEmpty()) {
1053        addIdentifier();
1054      }
1055      return getIdentifier().get(0);
1056    }
1057
1058    /**
1059     * @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
1060     */
1061    public Enumeration<ImmunizationStatus> getStatusElement() { 
1062      if (this.status == null)
1063        if (Configuration.errorOnAutoCreate())
1064          throw new Error("Attempt to auto-create Immunization.status");
1065        else if (Configuration.doAutoCreate())
1066          this.status = new Enumeration<ImmunizationStatus>(new ImmunizationStatusEnumFactory()); // bb
1067      return this.status;
1068    }
1069
1070    public boolean hasStatusElement() { 
1071      return this.status != null && !this.status.isEmpty();
1072    }
1073
1074    public boolean hasStatus() { 
1075      return this.status != null && !this.status.isEmpty();
1076    }
1077
1078    /**
1079     * @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
1080     */
1081    public Immunization setStatusElement(Enumeration<ImmunizationStatus> value) { 
1082      this.status = value;
1083      return this;
1084    }
1085
1086    /**
1087     * @return Indicates the current status of the immunization event.
1088     */
1089    public ImmunizationStatus getStatus() { 
1090      return this.status == null ? null : this.status.getValue();
1091    }
1092
1093    /**
1094     * @param value Indicates the current status of the immunization event.
1095     */
1096    public Immunization setStatus(ImmunizationStatus value) { 
1097        if (this.status == null)
1098          this.status = new Enumeration<ImmunizationStatus>(new ImmunizationStatusEnumFactory());
1099        this.status.setValue(value);
1100      return this;
1101    }
1102
1103    /**
1104     * @return {@link #statusReason} (Indicates the reason the immunization event was not performed.)
1105     */
1106    public CodeableConcept getStatusReason() { 
1107      if (this.statusReason == null)
1108        if (Configuration.errorOnAutoCreate())
1109          throw new Error("Attempt to auto-create Immunization.statusReason");
1110        else if (Configuration.doAutoCreate())
1111          this.statusReason = new CodeableConcept(); // cc
1112      return this.statusReason;
1113    }
1114
1115    public boolean hasStatusReason() { 
1116      return this.statusReason != null && !this.statusReason.isEmpty();
1117    }
1118
1119    /**
1120     * @param value {@link #statusReason} (Indicates the reason the immunization event was not performed.)
1121     */
1122    public Immunization setStatusReason(CodeableConcept value) { 
1123      this.statusReason = value;
1124      return this;
1125    }
1126
1127    /**
1128     * @return {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
1129     */
1130    public CodeableConcept getVaccineCode() { 
1131      if (this.vaccineCode == null)
1132        if (Configuration.errorOnAutoCreate())
1133          throw new Error("Attempt to auto-create Immunization.vaccineCode");
1134        else if (Configuration.doAutoCreate())
1135          this.vaccineCode = new CodeableConcept(); // cc
1136      return this.vaccineCode;
1137    }
1138
1139    public boolean hasVaccineCode() { 
1140      return this.vaccineCode != null && !this.vaccineCode.isEmpty();
1141    }
1142
1143    /**
1144     * @param value {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
1145     */
1146    public Immunization setVaccineCode(CodeableConcept value) { 
1147      this.vaccineCode = value;
1148      return this;
1149    }
1150
1151    /**
1152     * @return {@link #patient} (The patient who either received or did not receive the immunization.)
1153     */
1154    public Reference getPatient() { 
1155      if (this.patient == null)
1156        if (Configuration.errorOnAutoCreate())
1157          throw new Error("Attempt to auto-create Immunization.patient");
1158        else if (Configuration.doAutoCreate())
1159          this.patient = new Reference(); // cc
1160      return this.patient;
1161    }
1162
1163    public boolean hasPatient() { 
1164      return this.patient != null && !this.patient.isEmpty();
1165    }
1166
1167    /**
1168     * @param value {@link #patient} (The patient who either received or did not receive the immunization.)
1169     */
1170    public Immunization setPatient(Reference value) { 
1171      this.patient = value;
1172      return this;
1173    }
1174
1175    /**
1176     * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who either received or did not receive the immunization.)
1177     */
1178    public Patient getPatientTarget() { 
1179      if (this.patientTarget == null)
1180        if (Configuration.errorOnAutoCreate())
1181          throw new Error("Attempt to auto-create Immunization.patient");
1182        else if (Configuration.doAutoCreate())
1183          this.patientTarget = new Patient(); // aa
1184      return this.patientTarget;
1185    }
1186
1187    /**
1188     * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who either received or did not receive the immunization.)
1189     */
1190    public Immunization setPatientTarget(Patient value) { 
1191      this.patientTarget = value;
1192      return this;
1193    }
1194
1195    /**
1196     * @return {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
1197     */
1198    public Reference getEncounter() { 
1199      if (this.encounter == null)
1200        if (Configuration.errorOnAutoCreate())
1201          throw new Error("Attempt to auto-create Immunization.encounter");
1202        else if (Configuration.doAutoCreate())
1203          this.encounter = new Reference(); // cc
1204      return this.encounter;
1205    }
1206
1207    public boolean hasEncounter() { 
1208      return this.encounter != null && !this.encounter.isEmpty();
1209    }
1210
1211    /**
1212     * @param value {@link #encounter} (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
1213     */
1214    public Immunization setEncounter(Reference value) { 
1215      this.encounter = value;
1216      return this;
1217    }
1218
1219    /**
1220     * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
1221     */
1222    public Encounter getEncounterTarget() { 
1223      if (this.encounterTarget == null)
1224        if (Configuration.errorOnAutoCreate())
1225          throw new Error("Attempt to auto-create Immunization.encounter");
1226        else if (Configuration.doAutoCreate())
1227          this.encounterTarget = new Encounter(); // aa
1228      return this.encounterTarget;
1229    }
1230
1231    /**
1232     * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The visit or admission or other contact between patient and health care provider the immunization was performed as part of.)
1233     */
1234    public Immunization setEncounterTarget(Encounter value) { 
1235      this.encounterTarget = value;
1236      return this;
1237    }
1238
1239    /**
1240     * @return {@link #date} (Date vaccine administered or was to be administered.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1241     */
1242    public DateTimeType getDateElement() { 
1243      if (this.date == null)
1244        if (Configuration.errorOnAutoCreate())
1245          throw new Error("Attempt to auto-create Immunization.date");
1246        else if (Configuration.doAutoCreate())
1247          this.date = new DateTimeType(); // bb
1248      return this.date;
1249    }
1250
1251    public boolean hasDateElement() { 
1252      return this.date != null && !this.date.isEmpty();
1253    }
1254
1255    public boolean hasDate() { 
1256      return this.date != null && !this.date.isEmpty();
1257    }
1258
1259    /**
1260     * @param value {@link #date} (Date vaccine administered or was to be administered.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1261     */
1262    public Immunization setDateElement(DateTimeType value) { 
1263      this.date = value;
1264      return this;
1265    }
1266
1267    /**
1268     * @return Date vaccine administered or was to be administered.
1269     */
1270    public Date getDate() { 
1271      return this.date == null ? null : this.date.getValue();
1272    }
1273
1274    /**
1275     * @param value Date vaccine administered or was to be administered.
1276     */
1277    public Immunization setDate(Date value) { 
1278      if (value == null)
1279        this.date = null;
1280      else {
1281        if (this.date == null)
1282          this.date = new DateTimeType();
1283        this.date.setValue(value);
1284      }
1285      return this;
1286    }
1287
1288    /**
1289     * @return {@link #primarySource} (An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.). This is the underlying object with id, value and extensions. The accessor "getPrimarySource" gives direct access to the value
1290     */
1291    public BooleanType getPrimarySourceElement() { 
1292      if (this.primarySource == null)
1293        if (Configuration.errorOnAutoCreate())
1294          throw new Error("Attempt to auto-create Immunization.primarySource");
1295        else if (Configuration.doAutoCreate())
1296          this.primarySource = new BooleanType(); // bb
1297      return this.primarySource;
1298    }
1299
1300    public boolean hasPrimarySourceElement() { 
1301      return this.primarySource != null && !this.primarySource.isEmpty();
1302    }
1303
1304    public boolean hasPrimarySource() { 
1305      return this.primarySource != null && !this.primarySource.isEmpty();
1306    }
1307
1308    /**
1309     * @param value {@link #primarySource} (An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.). This is the underlying object with id, value and extensions. The accessor "getPrimarySource" gives direct access to the value
1310     */
1311    public Immunization setPrimarySourceElement(BooleanType value) { 
1312      this.primarySource = value;
1313      return this;
1314    }
1315
1316    /**
1317     * @return An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.
1318     */
1319    public boolean getPrimarySource() { 
1320      return this.primarySource == null || this.primarySource.isEmpty() ? false : this.primarySource.getValue();
1321    }
1322
1323    /**
1324     * @param value An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.
1325     */
1326    public Immunization setPrimarySource(boolean value) { 
1327        if (this.primarySource == null)
1328          this.primarySource = new BooleanType();
1329        this.primarySource.setValue(value);
1330      return this;
1331    }
1332
1333    /**
1334     * @return {@link #reportOrigin} (The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.)
1335     */
1336    public CodeableConcept getReportOrigin() { 
1337      if (this.reportOrigin == null)
1338        if (Configuration.errorOnAutoCreate())
1339          throw new Error("Attempt to auto-create Immunization.reportOrigin");
1340        else if (Configuration.doAutoCreate())
1341          this.reportOrigin = new CodeableConcept(); // cc
1342      return this.reportOrigin;
1343    }
1344
1345    public boolean hasReportOrigin() { 
1346      return this.reportOrigin != null && !this.reportOrigin.isEmpty();
1347    }
1348
1349    /**
1350     * @param value {@link #reportOrigin} (The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.)
1351     */
1352    public Immunization setReportOrigin(CodeableConcept value) { 
1353      this.reportOrigin = value;
1354      return this;
1355    }
1356
1357    /**
1358     * @return {@link #location} (The service delivery location where the vaccine administration occurred.)
1359     */
1360    public Reference getLocation() { 
1361      if (this.location == null)
1362        if (Configuration.errorOnAutoCreate())
1363          throw new Error("Attempt to auto-create Immunization.location");
1364        else if (Configuration.doAutoCreate())
1365          this.location = new Reference(); // cc
1366      return this.location;
1367    }
1368
1369    public boolean hasLocation() { 
1370      return this.location != null && !this.location.isEmpty();
1371    }
1372
1373    /**
1374     * @param value {@link #location} (The service delivery location where the vaccine administration occurred.)
1375     */
1376    public Immunization setLocation(Reference value) { 
1377      this.location = value;
1378      return this;
1379    }
1380
1381    /**
1382     * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The service delivery location where the vaccine administration occurred.)
1383     */
1384    public Location getLocationTarget() { 
1385      if (this.locationTarget == null)
1386        if (Configuration.errorOnAutoCreate())
1387          throw new Error("Attempt to auto-create Immunization.location");
1388        else if (Configuration.doAutoCreate())
1389          this.locationTarget = new Location(); // aa
1390      return this.locationTarget;
1391    }
1392
1393    /**
1394     * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The service delivery location where the vaccine administration occurred.)
1395     */
1396    public Immunization setLocationTarget(Location value) { 
1397      this.locationTarget = value;
1398      return this;
1399    }
1400
1401    /**
1402     * @return {@link #manufacturer} (Name of vaccine manufacturer.)
1403     */
1404    public Reference getManufacturer() { 
1405      if (this.manufacturer == null)
1406        if (Configuration.errorOnAutoCreate())
1407          throw new Error("Attempt to auto-create Immunization.manufacturer");
1408        else if (Configuration.doAutoCreate())
1409          this.manufacturer = new Reference(); // cc
1410      return this.manufacturer;
1411    }
1412
1413    public boolean hasManufacturer() { 
1414      return this.manufacturer != null && !this.manufacturer.isEmpty();
1415    }
1416
1417    /**
1418     * @param value {@link #manufacturer} (Name of vaccine manufacturer.)
1419     */
1420    public Immunization setManufacturer(Reference value) { 
1421      this.manufacturer = value;
1422      return this;
1423    }
1424
1425    /**
1426     * @return {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Name of vaccine manufacturer.)
1427     */
1428    public Organization getManufacturerTarget() { 
1429      if (this.manufacturerTarget == null)
1430        if (Configuration.errorOnAutoCreate())
1431          throw new Error("Attempt to auto-create Immunization.manufacturer");
1432        else if (Configuration.doAutoCreate())
1433          this.manufacturerTarget = new Organization(); // aa
1434      return this.manufacturerTarget;
1435    }
1436
1437    /**
1438     * @param value {@link #manufacturer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Name of vaccine manufacturer.)
1439     */
1440    public Immunization setManufacturerTarget(Organization value) { 
1441      this.manufacturerTarget = value;
1442      return this;
1443    }
1444
1445    /**
1446     * @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
1447     */
1448    public StringType getLotNumberElement() { 
1449      if (this.lotNumber == null)
1450        if (Configuration.errorOnAutoCreate())
1451          throw new Error("Attempt to auto-create Immunization.lotNumber");
1452        else if (Configuration.doAutoCreate())
1453          this.lotNumber = new StringType(); // bb
1454      return this.lotNumber;
1455    }
1456
1457    public boolean hasLotNumberElement() { 
1458      return this.lotNumber != null && !this.lotNumber.isEmpty();
1459    }
1460
1461    public boolean hasLotNumber() { 
1462      return this.lotNumber != null && !this.lotNumber.isEmpty();
1463    }
1464
1465    /**
1466     * @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
1467     */
1468    public Immunization setLotNumberElement(StringType value) { 
1469      this.lotNumber = value;
1470      return this;
1471    }
1472
1473    /**
1474     * @return Lot number of the  vaccine product.
1475     */
1476    public String getLotNumber() { 
1477      return this.lotNumber == null ? null : this.lotNumber.getValue();
1478    }
1479
1480    /**
1481     * @param value Lot number of the  vaccine product.
1482     */
1483    public Immunization setLotNumber(String value) { 
1484      if (Utilities.noString(value))
1485        this.lotNumber = null;
1486      else {
1487        if (this.lotNumber == null)
1488          this.lotNumber = new StringType();
1489        this.lotNumber.setValue(value);
1490      }
1491      return this;
1492    }
1493
1494    /**
1495     * @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
1496     */
1497    public DateType getExpirationDateElement() { 
1498      if (this.expirationDate == null)
1499        if (Configuration.errorOnAutoCreate())
1500          throw new Error("Attempt to auto-create Immunization.expirationDate");
1501        else if (Configuration.doAutoCreate())
1502          this.expirationDate = new DateType(); // bb
1503      return this.expirationDate;
1504    }
1505
1506    public boolean hasExpirationDateElement() { 
1507      return this.expirationDate != null && !this.expirationDate.isEmpty();
1508    }
1509
1510    public boolean hasExpirationDate() { 
1511      return this.expirationDate != null && !this.expirationDate.isEmpty();
1512    }
1513
1514    /**
1515     * @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
1516     */
1517    public Immunization setExpirationDateElement(DateType value) { 
1518      this.expirationDate = value;
1519      return this;
1520    }
1521
1522    /**
1523     * @return Date vaccine batch expires.
1524     */
1525    public Date getExpirationDate() { 
1526      return this.expirationDate == null ? null : this.expirationDate.getValue();
1527    }
1528
1529    /**
1530     * @param value Date vaccine batch expires.
1531     */
1532    public Immunization setExpirationDate(Date value) { 
1533      if (value == null)
1534        this.expirationDate = null;
1535      else {
1536        if (this.expirationDate == null)
1537          this.expirationDate = new DateType();
1538        this.expirationDate.setValue(value);
1539      }
1540      return this;
1541    }
1542
1543    /**
1544     * @return {@link #site} (Body site where vaccine was administered.)
1545     */
1546    public CodeableConcept getSite() { 
1547      if (this.site == null)
1548        if (Configuration.errorOnAutoCreate())
1549          throw new Error("Attempt to auto-create Immunization.site");
1550        else if (Configuration.doAutoCreate())
1551          this.site = new CodeableConcept(); // cc
1552      return this.site;
1553    }
1554
1555    public boolean hasSite() { 
1556      return this.site != null && !this.site.isEmpty();
1557    }
1558
1559    /**
1560     * @param value {@link #site} (Body site where vaccine was administered.)
1561     */
1562    public Immunization setSite(CodeableConcept value) { 
1563      this.site = value;
1564      return this;
1565    }
1566
1567    /**
1568     * @return {@link #route} (The path by which the vaccine product is taken into the body.)
1569     */
1570    public CodeableConcept getRoute() { 
1571      if (this.route == null)
1572        if (Configuration.errorOnAutoCreate())
1573          throw new Error("Attempt to auto-create Immunization.route");
1574        else if (Configuration.doAutoCreate())
1575          this.route = new CodeableConcept(); // cc
1576      return this.route;
1577    }
1578
1579    public boolean hasRoute() { 
1580      return this.route != null && !this.route.isEmpty();
1581    }
1582
1583    /**
1584     * @param value {@link #route} (The path by which the vaccine product is taken into the body.)
1585     */
1586    public Immunization setRoute(CodeableConcept value) { 
1587      this.route = value;
1588      return this;
1589    }
1590
1591    /**
1592     * @return {@link #doseQuantity} (The quantity of vaccine product that was administered.)
1593     */
1594    public SimpleQuantity getDoseQuantity() { 
1595      if (this.doseQuantity == null)
1596        if (Configuration.errorOnAutoCreate())
1597          throw new Error("Attempt to auto-create Immunization.doseQuantity");
1598        else if (Configuration.doAutoCreate())
1599          this.doseQuantity = new SimpleQuantity(); // cc
1600      return this.doseQuantity;
1601    }
1602
1603    public boolean hasDoseQuantity() { 
1604      return this.doseQuantity != null && !this.doseQuantity.isEmpty();
1605    }
1606
1607    /**
1608     * @param value {@link #doseQuantity} (The quantity of vaccine product that was administered.)
1609     */
1610    public Immunization setDoseQuantity(SimpleQuantity value) { 
1611      this.doseQuantity = value;
1612      return this;
1613    }
1614
1615    /**
1616     * @return {@link #performer} (Indicates who performed the immunization event.)
1617     */
1618    public List<ImmunizationPerformerComponent> getPerformer() { 
1619      if (this.performer == null)
1620        this.performer = new ArrayList<ImmunizationPerformerComponent>();
1621      return this.performer;
1622    }
1623
1624    /**
1625     * @return Returns a reference to <code>this</code> for easy method chaining
1626     */
1627    public Immunization setPerformer(List<ImmunizationPerformerComponent> thePerformer) { 
1628      this.performer = thePerformer;
1629      return this;
1630    }
1631
1632    public boolean hasPerformer() { 
1633      if (this.performer == null)
1634        return false;
1635      for (ImmunizationPerformerComponent item : this.performer)
1636        if (!item.isEmpty())
1637          return true;
1638      return false;
1639    }
1640
1641    public ImmunizationPerformerComponent addPerformer() { //3
1642      ImmunizationPerformerComponent t = new ImmunizationPerformerComponent();
1643      if (this.performer == null)
1644        this.performer = new ArrayList<ImmunizationPerformerComponent>();
1645      this.performer.add(t);
1646      return t;
1647    }
1648
1649    public Immunization addPerformer(ImmunizationPerformerComponent t) { //3
1650      if (t == null)
1651        return this;
1652      if (this.performer == null)
1653        this.performer = new ArrayList<ImmunizationPerformerComponent>();
1654      this.performer.add(t);
1655      return this;
1656    }
1657
1658    /**
1659     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist
1660     */
1661    public ImmunizationPerformerComponent getPerformerFirstRep() { 
1662      if (getPerformer().isEmpty()) {
1663        addPerformer();
1664      }
1665      return getPerformer().get(0);
1666    }
1667
1668    /**
1669     * @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.)
1670     */
1671    public List<Annotation> getNote() { 
1672      if (this.note == null)
1673        this.note = new ArrayList<Annotation>();
1674      return this.note;
1675    }
1676
1677    /**
1678     * @return Returns a reference to <code>this</code> for easy method chaining
1679     */
1680    public Immunization setNote(List<Annotation> theNote) { 
1681      this.note = theNote;
1682      return this;
1683    }
1684
1685    public boolean hasNote() { 
1686      if (this.note == null)
1687        return false;
1688      for (Annotation item : this.note)
1689        if (!item.isEmpty())
1690          return true;
1691      return false;
1692    }
1693
1694    public Annotation addNote() { //3
1695      Annotation t = new Annotation();
1696      if (this.note == null)
1697        this.note = new ArrayList<Annotation>();
1698      this.note.add(t);
1699      return t;
1700    }
1701
1702    public Immunization addNote(Annotation t) { //3
1703      if (t == null)
1704        return this;
1705      if (this.note == null)
1706        this.note = new ArrayList<Annotation>();
1707      this.note.add(t);
1708      return this;
1709    }
1710
1711    /**
1712     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
1713     */
1714    public Annotation getNoteFirstRep() { 
1715      if (getNote().isEmpty()) {
1716        addNote();
1717      }
1718      return getNote().get(0);
1719    }
1720
1721    /**
1722     * @return {@link #reasonCode} (Reasons why the vaccine was administered.)
1723     */
1724    public List<CodeableConcept> getReasonCode() { 
1725      if (this.reasonCode == null)
1726        this.reasonCode = new ArrayList<CodeableConcept>();
1727      return this.reasonCode;
1728    }
1729
1730    /**
1731     * @return Returns a reference to <code>this</code> for easy method chaining
1732     */
1733    public Immunization setReasonCode(List<CodeableConcept> theReasonCode) { 
1734      this.reasonCode = theReasonCode;
1735      return this;
1736    }
1737
1738    public boolean hasReasonCode() { 
1739      if (this.reasonCode == null)
1740        return false;
1741      for (CodeableConcept item : this.reasonCode)
1742        if (!item.isEmpty())
1743          return true;
1744      return false;
1745    }
1746
1747    public CodeableConcept addReasonCode() { //3
1748      CodeableConcept t = new CodeableConcept();
1749      if (this.reasonCode == null)
1750        this.reasonCode = new ArrayList<CodeableConcept>();
1751      this.reasonCode.add(t);
1752      return t;
1753    }
1754
1755    public Immunization addReasonCode(CodeableConcept t) { //3
1756      if (t == null)
1757        return this;
1758      if (this.reasonCode == null)
1759        this.reasonCode = new ArrayList<CodeableConcept>();
1760      this.reasonCode.add(t);
1761      return this;
1762    }
1763
1764    /**
1765     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
1766     */
1767    public CodeableConcept getReasonCodeFirstRep() { 
1768      if (getReasonCode().isEmpty()) {
1769        addReasonCode();
1770      }
1771      return getReasonCode().get(0);
1772    }
1773
1774    /**
1775     * @return {@link #reasonReference} (Condition, Observation or DiagnosticReport that supports why the immunization was administered.)
1776     */
1777    public List<Reference> getReasonReference() { 
1778      if (this.reasonReference == null)
1779        this.reasonReference = new ArrayList<Reference>();
1780      return this.reasonReference;
1781    }
1782
1783    /**
1784     * @return Returns a reference to <code>this</code> for easy method chaining
1785     */
1786    public Immunization setReasonReference(List<Reference> theReasonReference) { 
1787      this.reasonReference = theReasonReference;
1788      return this;
1789    }
1790
1791    public boolean hasReasonReference() { 
1792      if (this.reasonReference == null)
1793        return false;
1794      for (Reference item : this.reasonReference)
1795        if (!item.isEmpty())
1796          return true;
1797      return false;
1798    }
1799
1800    public Reference addReasonReference() { //3
1801      Reference t = new Reference();
1802      if (this.reasonReference == null)
1803        this.reasonReference = new ArrayList<Reference>();
1804      this.reasonReference.add(t);
1805      return t;
1806    }
1807
1808    public Immunization addReasonReference(Reference t) { //3
1809      if (t == null)
1810        return this;
1811      if (this.reasonReference == null)
1812        this.reasonReference = new ArrayList<Reference>();
1813      this.reasonReference.add(t);
1814      return this;
1815    }
1816
1817    /**
1818     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
1819     */
1820    public Reference getReasonReferenceFirstRep() { 
1821      if (getReasonReference().isEmpty()) {
1822        addReasonReference();
1823      }
1824      return getReasonReference().get(0);
1825    }
1826
1827    /**
1828     * @deprecated Use Reference#setResource(IBaseResource) instead
1829     */
1830    @Deprecated
1831    public List<Resource> getReasonReferenceTarget() { 
1832      if (this.reasonReferenceTarget == null)
1833        this.reasonReferenceTarget = new ArrayList<Resource>();
1834      return this.reasonReferenceTarget;
1835    }
1836
1837    /**
1838     * @return {@link #isPotent} (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 "getIsPotent" gives direct access to the value
1839     */
1840    public BooleanType getIsPotentElement() { 
1841      if (this.isPotent == null)
1842        if (Configuration.errorOnAutoCreate())
1843          throw new Error("Attempt to auto-create Immunization.isPotent");
1844        else if (Configuration.doAutoCreate())
1845          this.isPotent = new BooleanType(); // bb
1846      return this.isPotent;
1847    }
1848
1849    public boolean hasIsPotentElement() { 
1850      return this.isPotent != null && !this.isPotent.isEmpty();
1851    }
1852
1853    public boolean hasIsPotent() { 
1854      return this.isPotent != null && !this.isPotent.isEmpty();
1855    }
1856
1857    /**
1858     * @param value {@link #isPotent} (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 "getIsPotent" gives direct access to the value
1859     */
1860    public Immunization setIsPotentElement(BooleanType value) { 
1861      this.isPotent = value;
1862      return this;
1863    }
1864
1865    /**
1866     * @return Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
1867     */
1868    public boolean getIsPotent() { 
1869      return this.isPotent == null || this.isPotent.isEmpty() ? false : this.isPotent.getValue();
1870    }
1871
1872    /**
1873     * @param value Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.
1874     */
1875    public Immunization setIsPotent(boolean value) { 
1876        if (this.isPotent == null)
1877          this.isPotent = new BooleanType();
1878        this.isPotent.setValue(value);
1879      return this;
1880    }
1881
1882    /**
1883     * @return {@link #subpotentReason} (Reason why a dose is considered to be subpotent.)
1884     */
1885    public List<CodeableConcept> getSubpotentReason() { 
1886      if (this.subpotentReason == null)
1887        this.subpotentReason = new ArrayList<CodeableConcept>();
1888      return this.subpotentReason;
1889    }
1890
1891    /**
1892     * @return Returns a reference to <code>this</code> for easy method chaining
1893     */
1894    public Immunization setSubpotentReason(List<CodeableConcept> theSubpotentReason) { 
1895      this.subpotentReason = theSubpotentReason;
1896      return this;
1897    }
1898
1899    public boolean hasSubpotentReason() { 
1900      if (this.subpotentReason == null)
1901        return false;
1902      for (CodeableConcept item : this.subpotentReason)
1903        if (!item.isEmpty())
1904          return true;
1905      return false;
1906    }
1907
1908    public CodeableConcept addSubpotentReason() { //3
1909      CodeableConcept t = new CodeableConcept();
1910      if (this.subpotentReason == null)
1911        this.subpotentReason = new ArrayList<CodeableConcept>();
1912      this.subpotentReason.add(t);
1913      return t;
1914    }
1915
1916    public Immunization addSubpotentReason(CodeableConcept t) { //3
1917      if (t == null)
1918        return this;
1919      if (this.subpotentReason == null)
1920        this.subpotentReason = new ArrayList<CodeableConcept>();
1921      this.subpotentReason.add(t);
1922      return this;
1923    }
1924
1925    /**
1926     * @return The first repetition of repeating field {@link #subpotentReason}, creating it if it does not already exist
1927     */
1928    public CodeableConcept getSubpotentReasonFirstRep() { 
1929      if (getSubpotentReason().isEmpty()) {
1930        addSubpotentReason();
1931      }
1932      return getSubpotentReason().get(0);
1933    }
1934
1935    /**
1936     * @return {@link #education} (Educational material presented to the patient (or guardian) at the time of vaccine administration.)
1937     */
1938    public List<ImmunizationEducationComponent> getEducation() { 
1939      if (this.education == null)
1940        this.education = new ArrayList<ImmunizationEducationComponent>();
1941      return this.education;
1942    }
1943
1944    /**
1945     * @return Returns a reference to <code>this</code> for easy method chaining
1946     */
1947    public Immunization setEducation(List<ImmunizationEducationComponent> theEducation) { 
1948      this.education = theEducation;
1949      return this;
1950    }
1951
1952    public boolean hasEducation() { 
1953      if (this.education == null)
1954        return false;
1955      for (ImmunizationEducationComponent item : this.education)
1956        if (!item.isEmpty())
1957          return true;
1958      return false;
1959    }
1960
1961    public ImmunizationEducationComponent addEducation() { //3
1962      ImmunizationEducationComponent t = new ImmunizationEducationComponent();
1963      if (this.education == null)
1964        this.education = new ArrayList<ImmunizationEducationComponent>();
1965      this.education.add(t);
1966      return t;
1967    }
1968
1969    public Immunization addEducation(ImmunizationEducationComponent t) { //3
1970      if (t == null)
1971        return this;
1972      if (this.education == null)
1973        this.education = new ArrayList<ImmunizationEducationComponent>();
1974      this.education.add(t);
1975      return this;
1976    }
1977
1978    /**
1979     * @return The first repetition of repeating field {@link #education}, creating it if it does not already exist
1980     */
1981    public ImmunizationEducationComponent getEducationFirstRep() { 
1982      if (getEducation().isEmpty()) {
1983        addEducation();
1984      }
1985      return getEducation().get(0);
1986    }
1987
1988    /**
1989     * @return {@link #programEligibility} (Indicates a patient's eligibility for a funding program.)
1990     */
1991    public List<CodeableConcept> getProgramEligibility() { 
1992      if (this.programEligibility == null)
1993        this.programEligibility = new ArrayList<CodeableConcept>();
1994      return this.programEligibility;
1995    }
1996
1997    /**
1998     * @return Returns a reference to <code>this</code> for easy method chaining
1999     */
2000    public Immunization setProgramEligibility(List<CodeableConcept> theProgramEligibility) { 
2001      this.programEligibility = theProgramEligibility;
2002      return this;
2003    }
2004
2005    public boolean hasProgramEligibility() { 
2006      if (this.programEligibility == null)
2007        return false;
2008      for (CodeableConcept item : this.programEligibility)
2009        if (!item.isEmpty())
2010          return true;
2011      return false;
2012    }
2013
2014    public CodeableConcept addProgramEligibility() { //3
2015      CodeableConcept t = new CodeableConcept();
2016      if (this.programEligibility == null)
2017        this.programEligibility = new ArrayList<CodeableConcept>();
2018      this.programEligibility.add(t);
2019      return t;
2020    }
2021
2022    public Immunization addProgramEligibility(CodeableConcept t) { //3
2023      if (t == null)
2024        return this;
2025      if (this.programEligibility == null)
2026        this.programEligibility = new ArrayList<CodeableConcept>();
2027      this.programEligibility.add(t);
2028      return this;
2029    }
2030
2031    /**
2032     * @return The first repetition of repeating field {@link #programEligibility}, creating it if it does not already exist
2033     */
2034    public CodeableConcept getProgramEligibilityFirstRep() { 
2035      if (getProgramEligibility().isEmpty()) {
2036        addProgramEligibility();
2037      }
2038      return getProgramEligibility().get(0);
2039    }
2040
2041    /**
2042     * @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).)
2043     */
2044    public CodeableConcept getFundingSource() { 
2045      if (this.fundingSource == null)
2046        if (Configuration.errorOnAutoCreate())
2047          throw new Error("Attempt to auto-create Immunization.fundingSource");
2048        else if (Configuration.doAutoCreate())
2049          this.fundingSource = new CodeableConcept(); // cc
2050      return this.fundingSource;
2051    }
2052
2053    public boolean hasFundingSource() { 
2054      return this.fundingSource != null && !this.fundingSource.isEmpty();
2055    }
2056
2057    /**
2058     * @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).)
2059     */
2060    public Immunization setFundingSource(CodeableConcept value) { 
2061      this.fundingSource = value;
2062      return this;
2063    }
2064
2065      protected void listChildren(List<Property> children) {
2066        super.listChildren(children);
2067        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier));
2068        children.add(new Property("status", "code", "Indicates the current status of the immunization event.", 0, 1, status));
2069        children.add(new Property("statusReason", "CodeableConcept", "Indicates the reason the immunization event was not performed.", 0, 1, statusReason));
2070        children.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode));
2071        children.add(new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, 1, patient));
2072        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));
2073        children.add(new Property("date", "dateTime", "Date vaccine administered or was to be administered.", 0, 1, date));
2074        children.add(new Property("primarySource", "boolean", "An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.", 0, 1, primarySource));
2075        children.add(new Property("reportOrigin", "CodeableConcept", "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, reportOrigin));
2076        children.add(new Property("location", "Reference(Location)", "The service delivery location where the vaccine administration occurred.", 0, 1, location));
2077        children.add(new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, 1, manufacturer));
2078        children.add(new Property("lotNumber", "string", "Lot number of the  vaccine product.", 0, 1, lotNumber));
2079        children.add(new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, expirationDate));
2080        children.add(new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, site));
2081        children.add(new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, 1, route));
2082        children.add(new Property("doseQuantity", "SimpleQuantity", "The quantity of vaccine product that was administered.", 0, 1, doseQuantity));
2083        children.add(new Property("performer", "", "Indicates who performed the immunization event.", 0, java.lang.Integer.MAX_VALUE, performer));
2084        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));
2085        children.add(new Property("reasonCode", "CodeableConcept", "Reasons why the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, reasonCode));
2086        children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", "Condition, Observation or DiagnosticReport that supports why the immunization was administered.", 0, java.lang.Integer.MAX_VALUE, reasonReference));
2087        children.add(new Property("isPotent", "boolean", "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 0, 1, isPotent));
2088        children.add(new Property("subpotentReason", "CodeableConcept", "Reason why a dose is considered to be subpotent.", 0, java.lang.Integer.MAX_VALUE, subpotentReason));
2089        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));
2090        children.add(new Property("programEligibility", "CodeableConcept", "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, programEligibility));
2091        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));
2092      }
2093
2094      @Override
2095      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2096        switch (_hash) {
2097        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier);
2098        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current status of the immunization event.", 0, 1, status);
2099        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "Indicates the reason the immunization event was not performed.", 0, 1, statusReason);
2100        case 664556354: /*vaccineCode*/  return new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, 1, vaccineCode);
2101        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, 1, patient);
2102        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);
2103        case 3076014: /*date*/  return new Property("date", "dateTime", "Date vaccine administered or was to be administered.", 0, 1, date);
2104        case -528721731: /*primarySource*/  return new Property("primarySource", "boolean", "An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.", 0, 1, primarySource);
2105        case 486750586: /*reportOrigin*/  return new Property("reportOrigin", "CodeableConcept", "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, reportOrigin);
2106        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The service delivery location where the vaccine administration occurred.", 0, 1, location);
2107        case -1969347631: /*manufacturer*/  return new Property("manufacturer", "Reference(Organization)", "Name of vaccine manufacturer.", 0, 1, manufacturer);
2108        case 462547450: /*lotNumber*/  return new Property("lotNumber", "string", "Lot number of the  vaccine product.", 0, 1, lotNumber);
2109        case -668811523: /*expirationDate*/  return new Property("expirationDate", "date", "Date vaccine batch expires.", 0, 1, expirationDate);
2110        case 3530567: /*site*/  return new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, 1, site);
2111        case 108704329: /*route*/  return new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, 1, route);
2112        case -2083618872: /*doseQuantity*/  return new Property("doseQuantity", "SimpleQuantity", "The quantity of vaccine product that was administered.", 0, 1, doseQuantity);
2113        case 481140686: /*performer*/  return new Property("performer", "", "Indicates who performed the immunization event.", 0, java.lang.Integer.MAX_VALUE, performer);
2114        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);
2115        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "Reasons why the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, reasonCode);
2116        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", "Condition, Observation or DiagnosticReport that supports why the immunization was administered.", 0, java.lang.Integer.MAX_VALUE, reasonReference);
2117        case -308401088: /*isPotent*/  return new Property("isPotent", "boolean", "Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.", 0, 1, isPotent);
2118        case 805168794: /*subpotentReason*/  return new Property("subpotentReason", "CodeableConcept", "Reason why a dose is considered to be subpotent.", 0, java.lang.Integer.MAX_VALUE, subpotentReason);
2119        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);
2120        case 1207530089: /*programEligibility*/  return new Property("programEligibility", "CodeableConcept", "Indicates a patient's eligibility for a funding program.", 0, java.lang.Integer.MAX_VALUE, programEligibility);
2121        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);
2122        default: return super.getNamedProperty(_hash, _name, _checkValid);
2123        }
2124
2125      }
2126
2127      @Override
2128      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2129        switch (hash) {
2130        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2131        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImmunizationStatus>
2132        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
2133        case 664556354: /*vaccineCode*/ return this.vaccineCode == null ? new Base[0] : new Base[] {this.vaccineCode}; // CodeableConcept
2134        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
2135        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
2136        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2137        case -528721731: /*primarySource*/ return this.primarySource == null ? new Base[0] : new Base[] {this.primarySource}; // BooleanType
2138        case 486750586: /*reportOrigin*/ return this.reportOrigin == null ? new Base[0] : new Base[] {this.reportOrigin}; // CodeableConcept
2139        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
2140        case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // Reference
2141        case 462547450: /*lotNumber*/ return this.lotNumber == null ? new Base[0] : new Base[] {this.lotNumber}; // StringType
2142        case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateType
2143        case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // CodeableConcept
2144        case 108704329: /*route*/ return this.route == null ? new Base[0] : new Base[] {this.route}; // CodeableConcept
2145        case -2083618872: /*doseQuantity*/ return this.doseQuantity == null ? new Base[0] : new Base[] {this.doseQuantity}; // SimpleQuantity
2146        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // ImmunizationPerformerComponent
2147        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2148        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept
2149        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference
2150        case -308401088: /*isPotent*/ return this.isPotent == null ? new Base[0] : new Base[] {this.isPotent}; // BooleanType
2151        case 805168794: /*subpotentReason*/ return this.subpotentReason == null ? new Base[0] : this.subpotentReason.toArray(new Base[this.subpotentReason.size()]); // CodeableConcept
2152        case -290756696: /*education*/ return this.education == null ? new Base[0] : this.education.toArray(new Base[this.education.size()]); // ImmunizationEducationComponent
2153        case 1207530089: /*programEligibility*/ return this.programEligibility == null ? new Base[0] : this.programEligibility.toArray(new Base[this.programEligibility.size()]); // CodeableConcept
2154        case 1120150904: /*fundingSource*/ return this.fundingSource == null ? new Base[0] : new Base[] {this.fundingSource}; // CodeableConcept
2155        default: return super.getProperty(hash, name, checkValid);
2156        }
2157
2158      }
2159
2160      @Override
2161      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2162        switch (hash) {
2163        case -1618432855: // identifier
2164          this.getIdentifier().add(castToIdentifier(value)); // Identifier
2165          return value;
2166        case -892481550: // status
2167          value = new ImmunizationStatusEnumFactory().fromType(castToCode(value));
2168          this.status = (Enumeration) value; // Enumeration<ImmunizationStatus>
2169          return value;
2170        case 2051346646: // statusReason
2171          this.statusReason = castToCodeableConcept(value); // CodeableConcept
2172          return value;
2173        case 664556354: // vaccineCode
2174          this.vaccineCode = castToCodeableConcept(value); // CodeableConcept
2175          return value;
2176        case -791418107: // patient
2177          this.patient = castToReference(value); // Reference
2178          return value;
2179        case 1524132147: // encounter
2180          this.encounter = castToReference(value); // Reference
2181          return value;
2182        case 3076014: // date
2183          this.date = castToDateTime(value); // DateTimeType
2184          return value;
2185        case -528721731: // primarySource
2186          this.primarySource = castToBoolean(value); // BooleanType
2187          return value;
2188        case 486750586: // reportOrigin
2189          this.reportOrigin = castToCodeableConcept(value); // CodeableConcept
2190          return value;
2191        case 1901043637: // location
2192          this.location = castToReference(value); // Reference
2193          return value;
2194        case -1969347631: // manufacturer
2195          this.manufacturer = castToReference(value); // Reference
2196          return value;
2197        case 462547450: // lotNumber
2198          this.lotNumber = castToString(value); // StringType
2199          return value;
2200        case -668811523: // expirationDate
2201          this.expirationDate = castToDate(value); // DateType
2202          return value;
2203        case 3530567: // site
2204          this.site = castToCodeableConcept(value); // CodeableConcept
2205          return value;
2206        case 108704329: // route
2207          this.route = castToCodeableConcept(value); // CodeableConcept
2208          return value;
2209        case -2083618872: // doseQuantity
2210          this.doseQuantity = castToSimpleQuantity(value); // SimpleQuantity
2211          return value;
2212        case 481140686: // performer
2213          this.getPerformer().add((ImmunizationPerformerComponent) value); // ImmunizationPerformerComponent
2214          return value;
2215        case 3387378: // note
2216          this.getNote().add(castToAnnotation(value)); // Annotation
2217          return value;
2218        case 722137681: // reasonCode
2219          this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept
2220          return value;
2221        case -1146218137: // reasonReference
2222          this.getReasonReference().add(castToReference(value)); // Reference
2223          return value;
2224        case -308401088: // isPotent
2225          this.isPotent = castToBoolean(value); // BooleanType
2226          return value;
2227        case 805168794: // subpotentReason
2228          this.getSubpotentReason().add(castToCodeableConcept(value)); // CodeableConcept
2229          return value;
2230        case -290756696: // education
2231          this.getEducation().add((ImmunizationEducationComponent) value); // ImmunizationEducationComponent
2232          return value;
2233        case 1207530089: // programEligibility
2234          this.getProgramEligibility().add(castToCodeableConcept(value)); // CodeableConcept
2235          return value;
2236        case 1120150904: // fundingSource
2237          this.fundingSource = castToCodeableConcept(value); // CodeableConcept
2238          return value;
2239        default: return super.setProperty(hash, name, value);
2240        }
2241
2242      }
2243
2244      @Override
2245      public Base setProperty(String name, Base value) throws FHIRException {
2246        if (name.equals("identifier")) {
2247          this.getIdentifier().add(castToIdentifier(value));
2248        } else if (name.equals("status")) {
2249          value = new ImmunizationStatusEnumFactory().fromType(castToCode(value));
2250          this.status = (Enumeration) value; // Enumeration<ImmunizationStatus>
2251        } else if (name.equals("statusReason")) {
2252          this.statusReason = castToCodeableConcept(value); // CodeableConcept
2253        } else if (name.equals("vaccineCode")) {
2254          this.vaccineCode = castToCodeableConcept(value); // CodeableConcept
2255        } else if (name.equals("patient")) {
2256          this.patient = castToReference(value); // Reference
2257        } else if (name.equals("encounter")) {
2258          this.encounter = castToReference(value); // Reference
2259        } else if (name.equals("date")) {
2260          this.date = castToDateTime(value); // DateTimeType
2261        } else if (name.equals("primarySource")) {
2262          this.primarySource = castToBoolean(value); // BooleanType
2263        } else if (name.equals("reportOrigin")) {
2264          this.reportOrigin = castToCodeableConcept(value); // CodeableConcept
2265        } else if (name.equals("location")) {
2266          this.location = castToReference(value); // Reference
2267        } else if (name.equals("manufacturer")) {
2268          this.manufacturer = castToReference(value); // Reference
2269        } else if (name.equals("lotNumber")) {
2270          this.lotNumber = castToString(value); // StringType
2271        } else if (name.equals("expirationDate")) {
2272          this.expirationDate = castToDate(value); // DateType
2273        } else if (name.equals("site")) {
2274          this.site = castToCodeableConcept(value); // CodeableConcept
2275        } else if (name.equals("route")) {
2276          this.route = castToCodeableConcept(value); // CodeableConcept
2277        } else if (name.equals("doseQuantity")) {
2278          this.doseQuantity = castToSimpleQuantity(value); // SimpleQuantity
2279        } else if (name.equals("performer")) {
2280          this.getPerformer().add((ImmunizationPerformerComponent) value);
2281        } else if (name.equals("note")) {
2282          this.getNote().add(castToAnnotation(value));
2283        } else if (name.equals("reasonCode")) {
2284          this.getReasonCode().add(castToCodeableConcept(value));
2285        } else if (name.equals("reasonReference")) {
2286          this.getReasonReference().add(castToReference(value));
2287        } else if (name.equals("isPotent")) {
2288          this.isPotent = castToBoolean(value); // BooleanType
2289        } else if (name.equals("subpotentReason")) {
2290          this.getSubpotentReason().add(castToCodeableConcept(value));
2291        } else if (name.equals("education")) {
2292          this.getEducation().add((ImmunizationEducationComponent) value);
2293        } else if (name.equals("programEligibility")) {
2294          this.getProgramEligibility().add(castToCodeableConcept(value));
2295        } else if (name.equals("fundingSource")) {
2296          this.fundingSource = castToCodeableConcept(value); // CodeableConcept
2297        } else
2298          return super.setProperty(name, value);
2299        return value;
2300      }
2301
2302      @Override
2303      public Base makeProperty(int hash, String name) throws FHIRException {
2304        switch (hash) {
2305        case -1618432855:  return addIdentifier(); 
2306        case -892481550:  return getStatusElement();
2307        case 2051346646:  return getStatusReason(); 
2308        case 664556354:  return getVaccineCode(); 
2309        case -791418107:  return getPatient(); 
2310        case 1524132147:  return getEncounter(); 
2311        case 3076014:  return getDateElement();
2312        case -528721731:  return getPrimarySourceElement();
2313        case 486750586:  return getReportOrigin(); 
2314        case 1901043637:  return getLocation(); 
2315        case -1969347631:  return getManufacturer(); 
2316        case 462547450:  return getLotNumberElement();
2317        case -668811523:  return getExpirationDateElement();
2318        case 3530567:  return getSite(); 
2319        case 108704329:  return getRoute(); 
2320        case -2083618872:  return getDoseQuantity(); 
2321        case 481140686:  return addPerformer(); 
2322        case 3387378:  return addNote(); 
2323        case 722137681:  return addReasonCode(); 
2324        case -1146218137:  return addReasonReference(); 
2325        case -308401088:  return getIsPotentElement();
2326        case 805168794:  return addSubpotentReason(); 
2327        case -290756696:  return addEducation(); 
2328        case 1207530089:  return addProgramEligibility(); 
2329        case 1120150904:  return getFundingSource(); 
2330        default: return super.makeProperty(hash, name);
2331        }
2332
2333      }
2334
2335      @Override
2336      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2337        switch (hash) {
2338        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2339        case -892481550: /*status*/ return new String[] {"code"};
2340        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
2341        case 664556354: /*vaccineCode*/ return new String[] {"CodeableConcept"};
2342        case -791418107: /*patient*/ return new String[] {"Reference"};
2343        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2344        case 3076014: /*date*/ return new String[] {"dateTime"};
2345        case -528721731: /*primarySource*/ return new String[] {"boolean"};
2346        case 486750586: /*reportOrigin*/ return new String[] {"CodeableConcept"};
2347        case 1901043637: /*location*/ return new String[] {"Reference"};
2348        case -1969347631: /*manufacturer*/ return new String[] {"Reference"};
2349        case 462547450: /*lotNumber*/ return new String[] {"string"};
2350        case -668811523: /*expirationDate*/ return new String[] {"date"};
2351        case 3530567: /*site*/ return new String[] {"CodeableConcept"};
2352        case 108704329: /*route*/ return new String[] {"CodeableConcept"};
2353        case -2083618872: /*doseQuantity*/ return new String[] {"SimpleQuantity"};
2354        case 481140686: /*performer*/ return new String[] {};
2355        case 3387378: /*note*/ return new String[] {"Annotation"};
2356        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
2357        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
2358        case -308401088: /*isPotent*/ return new String[] {"boolean"};
2359        case 805168794: /*subpotentReason*/ return new String[] {"CodeableConcept"};
2360        case -290756696: /*education*/ return new String[] {};
2361        case 1207530089: /*programEligibility*/ return new String[] {"CodeableConcept"};
2362        case 1120150904: /*fundingSource*/ return new String[] {"CodeableConcept"};
2363        default: return super.getTypesForProperty(hash, name);
2364        }
2365
2366      }
2367
2368      @Override
2369      public Base addChild(String name) throws FHIRException {
2370        if (name.equals("identifier")) {
2371          return addIdentifier();
2372        }
2373        else if (name.equals("status")) {
2374          throw new FHIRException("Cannot call addChild on a primitive type Immunization.status");
2375        }
2376        else if (name.equals("statusReason")) {
2377          this.statusReason = new CodeableConcept();
2378          return this.statusReason;
2379        }
2380        else if (name.equals("vaccineCode")) {
2381          this.vaccineCode = new CodeableConcept();
2382          return this.vaccineCode;
2383        }
2384        else if (name.equals("patient")) {
2385          this.patient = new Reference();
2386          return this.patient;
2387        }
2388        else if (name.equals("encounter")) {
2389          this.encounter = new Reference();
2390          return this.encounter;
2391        }
2392        else if (name.equals("date")) {
2393          throw new FHIRException("Cannot call addChild on a primitive type Immunization.date");
2394        }
2395        else if (name.equals("primarySource")) {
2396          throw new FHIRException("Cannot call addChild on a primitive type Immunization.primarySource");
2397        }
2398        else if (name.equals("reportOrigin")) {
2399          this.reportOrigin = new CodeableConcept();
2400          return this.reportOrigin;
2401        }
2402        else if (name.equals("location")) {
2403          this.location = new Reference();
2404          return this.location;
2405        }
2406        else if (name.equals("manufacturer")) {
2407          this.manufacturer = new Reference();
2408          return this.manufacturer;
2409        }
2410        else if (name.equals("lotNumber")) {
2411          throw new FHIRException("Cannot call addChild on a primitive type Immunization.lotNumber");
2412        }
2413        else if (name.equals("expirationDate")) {
2414          throw new FHIRException("Cannot call addChild on a primitive type Immunization.expirationDate");
2415        }
2416        else if (name.equals("site")) {
2417          this.site = new CodeableConcept();
2418          return this.site;
2419        }
2420        else if (name.equals("route")) {
2421          this.route = new CodeableConcept();
2422          return this.route;
2423        }
2424        else if (name.equals("doseQuantity")) {
2425          this.doseQuantity = new SimpleQuantity();
2426          return this.doseQuantity;
2427        }
2428        else if (name.equals("performer")) {
2429          return addPerformer();
2430        }
2431        else if (name.equals("note")) {
2432          return addNote();
2433        }
2434        else if (name.equals("reasonCode")) {
2435          return addReasonCode();
2436        }
2437        else if (name.equals("reasonReference")) {
2438          return addReasonReference();
2439        }
2440        else if (name.equals("isPotent")) {
2441          throw new FHIRException("Cannot call addChild on a primitive type Immunization.isPotent");
2442        }
2443        else if (name.equals("subpotentReason")) {
2444          return addSubpotentReason();
2445        }
2446        else if (name.equals("education")) {
2447          return addEducation();
2448        }
2449        else if (name.equals("programEligibility")) {
2450          return addProgramEligibility();
2451        }
2452        else if (name.equals("fundingSource")) {
2453          this.fundingSource = new CodeableConcept();
2454          return this.fundingSource;
2455        }
2456        else
2457          return super.addChild(name);
2458      }
2459
2460  public String fhirType() {
2461    return "Immunization";
2462
2463  }
2464
2465      public Immunization copy() {
2466        Immunization dst = new Immunization();
2467        copyValues(dst);
2468        if (identifier != null) {
2469          dst.identifier = new ArrayList<Identifier>();
2470          for (Identifier i : identifier)
2471            dst.identifier.add(i.copy());
2472        };
2473        dst.status = status == null ? null : status.copy();
2474        dst.statusReason = statusReason == null ? null : statusReason.copy();
2475        dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy();
2476        dst.patient = patient == null ? null : patient.copy();
2477        dst.encounter = encounter == null ? null : encounter.copy();
2478        dst.date = date == null ? null : date.copy();
2479        dst.primarySource = primarySource == null ? null : primarySource.copy();
2480        dst.reportOrigin = reportOrigin == null ? null : reportOrigin.copy();
2481        dst.location = location == null ? null : location.copy();
2482        dst.manufacturer = manufacturer == null ? null : manufacturer.copy();
2483        dst.lotNumber = lotNumber == null ? null : lotNumber.copy();
2484        dst.expirationDate = expirationDate == null ? null : expirationDate.copy();
2485        dst.site = site == null ? null : site.copy();
2486        dst.route = route == null ? null : route.copy();
2487        dst.doseQuantity = doseQuantity == null ? null : doseQuantity.copy();
2488        if (performer != null) {
2489          dst.performer = new ArrayList<ImmunizationPerformerComponent>();
2490          for (ImmunizationPerformerComponent i : performer)
2491            dst.performer.add(i.copy());
2492        };
2493        if (note != null) {
2494          dst.note = new ArrayList<Annotation>();
2495          for (Annotation i : note)
2496            dst.note.add(i.copy());
2497        };
2498        if (reasonCode != null) {
2499          dst.reasonCode = new ArrayList<CodeableConcept>();
2500          for (CodeableConcept i : reasonCode)
2501            dst.reasonCode.add(i.copy());
2502        };
2503        if (reasonReference != null) {
2504          dst.reasonReference = new ArrayList<Reference>();
2505          for (Reference i : reasonReference)
2506            dst.reasonReference.add(i.copy());
2507        };
2508        dst.isPotent = isPotent == null ? null : isPotent.copy();
2509        if (subpotentReason != null) {
2510          dst.subpotentReason = new ArrayList<CodeableConcept>();
2511          for (CodeableConcept i : subpotentReason)
2512            dst.subpotentReason.add(i.copy());
2513        };
2514        if (education != null) {
2515          dst.education = new ArrayList<ImmunizationEducationComponent>();
2516          for (ImmunizationEducationComponent i : education)
2517            dst.education.add(i.copy());
2518        };
2519        if (programEligibility != null) {
2520          dst.programEligibility = new ArrayList<CodeableConcept>();
2521          for (CodeableConcept i : programEligibility)
2522            dst.programEligibility.add(i.copy());
2523        };
2524        dst.fundingSource = fundingSource == null ? null : fundingSource.copy();
2525        return dst;
2526      }
2527
2528      protected Immunization typedCopy() {
2529        return copy();
2530      }
2531
2532      @Override
2533      public boolean equalsDeep(Base other_) {
2534        if (!super.equalsDeep(other_))
2535          return false;
2536        if (!(other_ instanceof Immunization))
2537          return false;
2538        Immunization o = (Immunization) other_;
2539        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true)
2540           && compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true)
2541           && compareDeep(date, o.date, true) && compareDeep(primarySource, o.primarySource, true) && compareDeep(reportOrigin, o.reportOrigin, true)
2542           && compareDeep(location, o.location, true) && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(lotNumber, o.lotNumber, true)
2543           && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(site, o.site, true) && compareDeep(route, o.route, true)
2544           && compareDeep(doseQuantity, o.doseQuantity, true) && compareDeep(performer, o.performer, true)
2545           && compareDeep(note, o.note, true) && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true)
2546           && compareDeep(isPotent, o.isPotent, true) && compareDeep(subpotentReason, o.subpotentReason, true)
2547           && compareDeep(education, o.education, true) && compareDeep(programEligibility, o.programEligibility, true)
2548           && compareDeep(fundingSource, o.fundingSource, true);
2549      }
2550
2551      @Override
2552      public boolean equalsShallow(Base other_) {
2553        if (!super.equalsShallow(other_))
2554          return false;
2555        if (!(other_ instanceof Immunization))
2556          return false;
2557        Immunization o = (Immunization) other_;
2558        return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(primarySource, o.primarySource, true)
2559           && compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true)
2560           && compareValues(isPotent, o.isPotent, true);
2561      }
2562
2563      public boolean isEmpty() {
2564        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusReason
2565          , vaccineCode, patient, encounter, date, primarySource, reportOrigin, location
2566          , manufacturer, lotNumber, expirationDate, site, route, doseQuantity, performer
2567          , note, reasonCode, reasonReference, isPotent, subpotentReason, education, programEligibility
2568          , fundingSource);
2569      }
2570
2571  @Override
2572  public ResourceType getResourceType() {
2573    return ResourceType.Immunization;
2574   }
2575
2576 /**
2577   * Search parameter: <b>date</b>
2578   * <p>
2579   * Description: <b>Vaccination  (non)-Administration Date</b><br>
2580   * Type: <b>date</b><br>
2581   * Path: <b>Immunization.date</b><br>
2582   * </p>
2583   */
2584  @SearchParamDefinition(name="date", path="Immunization.date", description="Vaccination  (non)-Administration Date", type="date" )
2585  public static final String SP_DATE = "date";
2586 /**
2587   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2588   * <p>
2589   * Description: <b>Vaccination  (non)-Administration Date</b><br>
2590   * Type: <b>date</b><br>
2591   * Path: <b>Immunization.date</b><br>
2592   * </p>
2593   */
2594  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2595
2596 /**
2597   * Search parameter: <b>identifier</b>
2598   * <p>
2599   * Description: <b>Business identifier</b><br>
2600   * Type: <b>token</b><br>
2601   * Path: <b>Immunization.identifier</b><br>
2602   * </p>
2603   */
2604  @SearchParamDefinition(name="identifier", path="Immunization.identifier", description="Business identifier", type="token" )
2605  public static final String SP_IDENTIFIER = "identifier";
2606 /**
2607   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2608   * <p>
2609   * Description: <b>Business identifier</b><br>
2610   * Type: <b>token</b><br>
2611   * Path: <b>Immunization.identifier</b><br>
2612   * </p>
2613   */
2614  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2615
2616 /**
2617   * Search parameter: <b>performer</b>
2618   * <p>
2619   * Description: <b>The practitioner or organization who played a role in the vaccination</b><br>
2620   * Type: <b>reference</b><br>
2621   * Path: <b>Immunization.performer.actor</b><br>
2622   * </p>
2623   */
2624  @SearchParamDefinition(name="performer", path="Immunization.performer.actor", description="The practitioner or organization who played a role in the vaccination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Practitioner.class } )
2625  public static final String SP_PERFORMER = "performer";
2626 /**
2627   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
2628   * <p>
2629   * Description: <b>The practitioner or organization who played a role in the vaccination</b><br>
2630   * Type: <b>reference</b><br>
2631   * Path: <b>Immunization.performer.actor</b><br>
2632   * </p>
2633   */
2634  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
2635
2636/**
2637   * Constant for fluent queries to be used to add include statements. Specifies
2638   * the path value of "<b>Immunization:performer</b>".
2639   */
2640  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("Immunization:performer").toLocked();
2641
2642 /**
2643   * Search parameter: <b>lot-number</b>
2644   * <p>
2645   * Description: <b>Vaccine Lot Number</b><br>
2646   * Type: <b>string</b><br>
2647   * Path: <b>Immunization.lotNumber</b><br>
2648   * </p>
2649   */
2650  @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" )
2651  public static final String SP_LOT_NUMBER = "lot-number";
2652 /**
2653   * <b>Fluent Client</b> search parameter constant for <b>lot-number</b>
2654   * <p>
2655   * Description: <b>Vaccine Lot Number</b><br>
2656   * Type: <b>string</b><br>
2657   * Path: <b>Immunization.lotNumber</b><br>
2658   * </p>
2659   */
2660  public static final ca.uhn.fhir.rest.gclient.StringClientParam LOT_NUMBER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_LOT_NUMBER);
2661
2662 /**
2663   * Search parameter: <b>patient</b>
2664   * <p>
2665   * Description: <b>The patient for the vaccination record</b><br>
2666   * Type: <b>reference</b><br>
2667   * Path: <b>Immunization.patient</b><br>
2668   * </p>
2669   */
2670  @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
2671  public static final String SP_PATIENT = "patient";
2672 /**
2673   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2674   * <p>
2675   * Description: <b>The patient for the vaccination record</b><br>
2676   * Type: <b>reference</b><br>
2677   * Path: <b>Immunization.patient</b><br>
2678   * </p>
2679   */
2680  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2681
2682/**
2683   * Constant for fluent queries to be used to add include statements. Specifies
2684   * the path value of "<b>Immunization:patient</b>".
2685   */
2686  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Immunization:patient").toLocked();
2687
2688 /**
2689   * Search parameter: <b>vaccine-code</b>
2690   * <p>
2691   * Description: <b>Vaccine Product Administered</b><br>
2692   * Type: <b>token</b><br>
2693   * Path: <b>Immunization.vaccineCode</b><br>
2694   * </p>
2695   */
2696  @SearchParamDefinition(name="vaccine-code", path="Immunization.vaccineCode", description="Vaccine Product Administered", type="token" )
2697  public static final String SP_VACCINE_CODE = "vaccine-code";
2698 /**
2699   * <b>Fluent Client</b> search parameter constant for <b>vaccine-code</b>
2700   * <p>
2701   * Description: <b>Vaccine Product Administered</b><br>
2702   * Type: <b>token</b><br>
2703   * Path: <b>Immunization.vaccineCode</b><br>
2704   * </p>
2705   */
2706  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VACCINE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VACCINE_CODE);
2707
2708 /**
2709   * Search parameter: <b>reason-reference</b>
2710   * <p>
2711   * Description: <b>Why immunization occurred</b><br>
2712   * Type: <b>reference</b><br>
2713   * Path: <b>Immunization.reasonReference</b><br>
2714   * </p>
2715   */
2716  @SearchParamDefinition(name="reason-reference", path="Immunization.reasonReference", description="Why immunization occurred", type="reference", target={Condition.class, DiagnosticReport.class, Observation.class } )
2717  public static final String SP_REASON_REFERENCE = "reason-reference";
2718 /**
2719   * <b>Fluent Client</b> search parameter constant for <b>reason-reference</b>
2720   * <p>
2721   * Description: <b>Why immunization occurred</b><br>
2722   * Type: <b>reference</b><br>
2723   * Path: <b>Immunization.reasonReference</b><br>
2724   * </p>
2725   */
2726  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE);
2727
2728/**
2729   * Constant for fluent queries to be used to add include statements. Specifies
2730   * the path value of "<b>Immunization:reason-reference</b>".
2731   */
2732  public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Immunization:reason-reference").toLocked();
2733
2734 /**
2735   * Search parameter: <b>location</b>
2736   * <p>
2737   * Description: <b>The service delivery location or facility in which the vaccine was / was to be administered</b><br>
2738   * Type: <b>reference</b><br>
2739   * Path: <b>Immunization.location</b><br>
2740   * </p>
2741   */
2742  @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 } )
2743  public static final String SP_LOCATION = "location";
2744 /**
2745   * <b>Fluent Client</b> search parameter constant for <b>location</b>
2746   * <p>
2747   * Description: <b>The service delivery location or facility in which the vaccine was / was to be administered</b><br>
2748   * Type: <b>reference</b><br>
2749   * Path: <b>Immunization.location</b><br>
2750   * </p>
2751   */
2752  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
2753
2754/**
2755   * Constant for fluent queries to be used to add include statements. Specifies
2756   * the path value of "<b>Immunization:location</b>".
2757   */
2758  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Immunization:location").toLocked();
2759
2760 /**
2761   * Search parameter: <b>status-reason</b>
2762   * <p>
2763   * Description: <b>Reason why the vaccine was not administered</b><br>
2764   * Type: <b>token</b><br>
2765   * Path: <b>Immunization.statusReason</b><br>
2766   * </p>
2767   */
2768  @SearchParamDefinition(name="status-reason", path="Immunization.statusReason", description="Reason why the vaccine was not administered", type="token" )
2769  public static final String SP_STATUS_REASON = "status-reason";
2770 /**
2771   * <b>Fluent Client</b> search parameter constant for <b>status-reason</b>
2772   * <p>
2773   * Description: <b>Reason why the vaccine was not administered</b><br>
2774   * Type: <b>token</b><br>
2775   * Path: <b>Immunization.statusReason</b><br>
2776   * </p>
2777   */
2778  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS_REASON);
2779
2780 /**
2781   * Search parameter: <b>reason-code</b>
2782   * <p>
2783   * Description: <b>Reason why the vaccine was administered</b><br>
2784   * Type: <b>token</b><br>
2785   * Path: <b>Immunization.reasonCode</b><br>
2786   * </p>
2787   */
2788  @SearchParamDefinition(name="reason-code", path="Immunization.reasonCode", description="Reason why the vaccine was administered", type="token" )
2789  public static final String SP_REASON_CODE = "reason-code";
2790 /**
2791   * <b>Fluent Client</b> search parameter constant for <b>reason-code</b>
2792   * <p>
2793   * Description: <b>Reason why the vaccine was administered</b><br>
2794   * Type: <b>token</b><br>
2795   * Path: <b>Immunization.reasonCode</b><br>
2796   * </p>
2797   */
2798  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE);
2799
2800 /**
2801   * Search parameter: <b>manufacturer</b>
2802   * <p>
2803   * Description: <b>Vaccine Manufacturer</b><br>
2804   * Type: <b>reference</b><br>
2805   * Path: <b>Immunization.manufacturer</b><br>
2806   * </p>
2807   */
2808  @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference", target={Organization.class } )
2809  public static final String SP_MANUFACTURER = "manufacturer";
2810 /**
2811   * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b>
2812   * <p>
2813   * Description: <b>Vaccine Manufacturer</b><br>
2814   * Type: <b>reference</b><br>
2815   * Path: <b>Immunization.manufacturer</b><br>
2816   * </p>
2817   */
2818  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANUFACTURER);
2819
2820/**
2821   * Constant for fluent queries to be used to add include statements. Specifies
2822   * the path value of "<b>Immunization:manufacturer</b>".
2823   */
2824  public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER = new ca.uhn.fhir.model.api.Include("Immunization:manufacturer").toLocked();
2825
2826 /**
2827   * Search parameter: <b>status</b>
2828   * <p>
2829   * Description: <b>Immunization event status</b><br>
2830   * Type: <b>token</b><br>
2831   * Path: <b>Immunization.status</b><br>
2832   * </p>
2833   */
2834  @SearchParamDefinition(name="status", path="Immunization.status", description="Immunization event status", type="token" )
2835  public static final String SP_STATUS = "status";
2836 /**
2837   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2838   * <p>
2839   * Description: <b>Immunization event status</b><br>
2840   * Type: <b>token</b><br>
2841   * Path: <b>Immunization.status</b><br>
2842   * </p>
2843   */
2844  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2845
2846
2847}
2848