001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.
052 */
053@ResourceDef(name="CarePlan", profile="http://hl7.org/fhir/StructureDefinition/CarePlan")
054public class CarePlan extends DomainResource {
055
056    public enum CarePlanIntent {
057        /**
058         * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.
059         */
060        PROPOSAL, 
061        /**
062         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
063         */
064        PLAN, 
065        /**
066         * The request represents a request/demand and authorization for action by the requestor.
067         */
068        ORDER, 
069        /**
070         * The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.
071         */
072        OPTION, 
073        /**
074         * The request represents a legally binding instruction authored by a Patient or RelatedPerson.
075         */
076        DIRECTIVE, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static CarePlanIntent fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("proposal".equals(codeString))
085          return PROPOSAL;
086        if ("plan".equals(codeString))
087          return PLAN;
088        if ("order".equals(codeString))
089          return ORDER;
090        if ("option".equals(codeString))
091          return OPTION;
092        if ("directive".equals(codeString))
093          return DIRECTIVE;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case PROPOSAL: return "proposal";
102            case PLAN: return "plan";
103            case ORDER: return "order";
104            case OPTION: return "option";
105            case DIRECTIVE: return "directive";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
113            case PLAN: return "http://hl7.org/fhir/request-intent";
114            case ORDER: return "http://hl7.org/fhir/request-intent";
115            case OPTION: return "http://hl7.org/fhir/request-intent";
116            case DIRECTIVE: return "http://hl7.org/fhir/request-intent";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
124            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
125            case ORDER: return "The request represents a request/demand and authorization for action by the requestor.";
126            case OPTION: return "The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.";
127            case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson.";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case PROPOSAL: return "Proposal";
135            case PLAN: return "Plan";
136            case ORDER: return "Order";
137            case OPTION: return "Option";
138            case DIRECTIVE: return "Directive";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class CarePlanIntentEnumFactory implements EnumFactory<CarePlanIntent> {
146    public CarePlanIntent fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("proposal".equals(codeString))
151          return CarePlanIntent.PROPOSAL;
152        if ("plan".equals(codeString))
153          return CarePlanIntent.PLAN;
154        if ("order".equals(codeString))
155          return CarePlanIntent.ORDER;
156        if ("option".equals(codeString))
157          return CarePlanIntent.OPTION;
158        if ("directive".equals(codeString))
159          return CarePlanIntent.DIRECTIVE;
160        throw new IllegalArgumentException("Unknown CarePlanIntent code '"+codeString+"'");
161        }
162        public Enumeration<CarePlanIntent> fromType(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<CarePlanIntent>(this, CarePlanIntent.NULL, code);
170        if ("proposal".equals(codeString))
171          return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PROPOSAL, code);
172        if ("plan".equals(codeString))
173          return new Enumeration<CarePlanIntent>(this, CarePlanIntent.PLAN, code);
174        if ("order".equals(codeString))
175          return new Enumeration<CarePlanIntent>(this, CarePlanIntent.ORDER, code);
176        if ("option".equals(codeString))
177          return new Enumeration<CarePlanIntent>(this, CarePlanIntent.OPTION, code);
178        if ("directive".equals(codeString))
179          return new Enumeration<CarePlanIntent>(this, CarePlanIntent.DIRECTIVE, code);
180        throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'");
181        }
182    public String toCode(CarePlanIntent code) {
183      if (code == CarePlanIntent.PROPOSAL)
184        return "proposal";
185      if (code == CarePlanIntent.PLAN)
186        return "plan";
187      if (code == CarePlanIntent.ORDER)
188        return "order";
189      if (code == CarePlanIntent.OPTION)
190        return "option";
191      if (code == CarePlanIntent.DIRECTIVE)
192        return "directive";
193      return "?";
194      }
195    public String toSystem(CarePlanIntent code) {
196      return code.getSystem();
197      }
198    }
199
200    @Block()
201    public static class CarePlanActivityComponent extends BackboneElement implements IBaseBackboneElement {
202        /**
203         * Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an "event" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a ?request? resource).
204         */
205        @Child(name = "performedActivity", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
206        @Description(shortDefinition="Results of the activity (concept, or Appointment, Encounter, Procedure, etc.)", formalDefinition="Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a ?request? resource)." )
207        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-activity-performed")
208        protected List<CodeableReference> performedActivity;
209
210        /**
211         * Notes about the adherence/status/progress of the activity.
212         */
213        @Child(name = "progress", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
214        @Description(shortDefinition="Comments about the activity status/progress", formalDefinition="Notes about the adherence/status/progress of the activity." )
215        protected List<Annotation> progress;
216
217        /**
218         * The details of the proposed activity represented in a specific resource.
219         */
220        @Child(name = "plannedActivityReference", type = {Appointment.class, CommunicationRequest.class, DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, Task.class, ServiceRequest.class, VisionPrescription.class, RequestOrchestration.class, ImmunizationRecommendation.class, SupplyRequest.class}, order=3, min=0, max=1, modifier=false, summary=false)
221        @Description(shortDefinition="Activity that is intended to be part of the care plan", formalDefinition="The details of the proposed activity represented in a specific resource." )
222        protected Reference plannedActivityReference;
223
224        private static final long serialVersionUID = 1416911432L;
225
226    /**
227     * Constructor
228     */
229      public CarePlanActivityComponent() {
230        super();
231      }
232
233        /**
234         * @return {@link #performedActivity} (Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an "event" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a ?request? resource).)
235         */
236        public List<CodeableReference> getPerformedActivity() { 
237          if (this.performedActivity == null)
238            this.performedActivity = new ArrayList<CodeableReference>();
239          return this.performedActivity;
240        }
241
242        /**
243         * @return Returns a reference to <code>this</code> for easy method chaining
244         */
245        public CarePlanActivityComponent setPerformedActivity(List<CodeableReference> thePerformedActivity) { 
246          this.performedActivity = thePerformedActivity;
247          return this;
248        }
249
250        public boolean hasPerformedActivity() { 
251          if (this.performedActivity == null)
252            return false;
253          for (CodeableReference item : this.performedActivity)
254            if (!item.isEmpty())
255              return true;
256          return false;
257        }
258
259        public CodeableReference addPerformedActivity() { //3
260          CodeableReference t = new CodeableReference();
261          if (this.performedActivity == null)
262            this.performedActivity = new ArrayList<CodeableReference>();
263          this.performedActivity.add(t);
264          return t;
265        }
266
267        public CarePlanActivityComponent addPerformedActivity(CodeableReference t) { //3
268          if (t == null)
269            return this;
270          if (this.performedActivity == null)
271            this.performedActivity = new ArrayList<CodeableReference>();
272          this.performedActivity.add(t);
273          return this;
274        }
275
276        /**
277         * @return The first repetition of repeating field {@link #performedActivity}, creating it if it does not already exist {3}
278         */
279        public CodeableReference getPerformedActivityFirstRep() { 
280          if (getPerformedActivity().isEmpty()) {
281            addPerformedActivity();
282          }
283          return getPerformedActivity().get(0);
284        }
285
286        /**
287         * @return {@link #progress} (Notes about the adherence/status/progress of the activity.)
288         */
289        public List<Annotation> getProgress() { 
290          if (this.progress == null)
291            this.progress = new ArrayList<Annotation>();
292          return this.progress;
293        }
294
295        /**
296         * @return Returns a reference to <code>this</code> for easy method chaining
297         */
298        public CarePlanActivityComponent setProgress(List<Annotation> theProgress) { 
299          this.progress = theProgress;
300          return this;
301        }
302
303        public boolean hasProgress() { 
304          if (this.progress == null)
305            return false;
306          for (Annotation item : this.progress)
307            if (!item.isEmpty())
308              return true;
309          return false;
310        }
311
312        public Annotation addProgress() { //3
313          Annotation t = new Annotation();
314          if (this.progress == null)
315            this.progress = new ArrayList<Annotation>();
316          this.progress.add(t);
317          return t;
318        }
319
320        public CarePlanActivityComponent addProgress(Annotation t) { //3
321          if (t == null)
322            return this;
323          if (this.progress == null)
324            this.progress = new ArrayList<Annotation>();
325          this.progress.add(t);
326          return this;
327        }
328
329        /**
330         * @return The first repetition of repeating field {@link #progress}, creating it if it does not already exist {3}
331         */
332        public Annotation getProgressFirstRep() { 
333          if (getProgress().isEmpty()) {
334            addProgress();
335          }
336          return getProgress().get(0);
337        }
338
339        /**
340         * @return {@link #plannedActivityReference} (The details of the proposed activity represented in a specific resource.)
341         */
342        public Reference getPlannedActivityReference() { 
343          if (this.plannedActivityReference == null)
344            if (Configuration.errorOnAutoCreate())
345              throw new Error("Attempt to auto-create CarePlanActivityComponent.plannedActivityReference");
346            else if (Configuration.doAutoCreate())
347              this.plannedActivityReference = new Reference(); // cc
348          return this.plannedActivityReference;
349        }
350
351        public boolean hasPlannedActivityReference() { 
352          return this.plannedActivityReference != null && !this.plannedActivityReference.isEmpty();
353        }
354
355        /**
356         * @param value {@link #plannedActivityReference} (The details of the proposed activity represented in a specific resource.)
357         */
358        public CarePlanActivityComponent setPlannedActivityReference(Reference value) { 
359          this.plannedActivityReference = value;
360          return this;
361        }
362
363        protected void listChildren(List<Property> children) {
364          super.listChildren(children);
365          children.add(new Property("performedActivity", "CodeableReference(Any)", "Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a ?request? resource).", 0, java.lang.Integer.MAX_VALUE, performedActivity));
366          children.add(new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress));
367          children.add(new Property("plannedActivityReference", "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestOrchestration|ImmunizationRecommendation|SupplyRequest)", "The details of the proposed activity represented in a specific resource.", 0, 1, plannedActivityReference));
368        }
369
370        @Override
371        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
372          switch (_hash) {
373          case 1964521199: /*performedActivity*/  return new Property("performedActivity", "CodeableReference(Any)", "Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an \"event\" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a ?request? resource).", 0, java.lang.Integer.MAX_VALUE, performedActivity);
374          case -1001078227: /*progress*/  return new Property("progress", "Annotation", "Notes about the adherence/status/progress of the activity.", 0, java.lang.Integer.MAX_VALUE, progress);
375          case -1114371176: /*plannedActivityReference*/  return new Property("plannedActivityReference", "Reference(Appointment|CommunicationRequest|DeviceRequest|MedicationRequest|NutritionOrder|Task|ServiceRequest|VisionPrescription|RequestOrchestration|ImmunizationRecommendation|SupplyRequest)", "The details of the proposed activity represented in a specific resource.", 0, 1, plannedActivityReference);
376          default: return super.getNamedProperty(_hash, _name, _checkValid);
377          }
378
379        }
380
381      @Override
382      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
383        switch (hash) {
384        case 1964521199: /*performedActivity*/ return this.performedActivity == null ? new Base[0] : this.performedActivity.toArray(new Base[this.performedActivity.size()]); // CodeableReference
385        case -1001078227: /*progress*/ return this.progress == null ? new Base[0] : this.progress.toArray(new Base[this.progress.size()]); // Annotation
386        case -1114371176: /*plannedActivityReference*/ return this.plannedActivityReference == null ? new Base[0] : new Base[] {this.plannedActivityReference}; // Reference
387        default: return super.getProperty(hash, name, checkValid);
388        }
389
390      }
391
392      @Override
393      public Base setProperty(int hash, String name, Base value) throws FHIRException {
394        switch (hash) {
395        case 1964521199: // performedActivity
396          this.getPerformedActivity().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
397          return value;
398        case -1001078227: // progress
399          this.getProgress().add(TypeConvertor.castToAnnotation(value)); // Annotation
400          return value;
401        case -1114371176: // plannedActivityReference
402          this.plannedActivityReference = TypeConvertor.castToReference(value); // Reference
403          return value;
404        default: return super.setProperty(hash, name, value);
405        }
406
407      }
408
409      @Override
410      public Base setProperty(String name, Base value) throws FHIRException {
411        if (name.equals("performedActivity")) {
412          this.getPerformedActivity().add(TypeConvertor.castToCodeableReference(value));
413        } else if (name.equals("progress")) {
414          this.getProgress().add(TypeConvertor.castToAnnotation(value));
415        } else if (name.equals("plannedActivityReference")) {
416          this.plannedActivityReference = TypeConvertor.castToReference(value); // Reference
417        } else
418          return super.setProperty(name, value);
419        return value;
420      }
421
422  @Override
423  public void removeChild(String name, Base value) throws FHIRException {
424        if (name.equals("performedActivity")) {
425          this.getPerformedActivity().remove(value);
426        } else if (name.equals("progress")) {
427          this.getProgress().remove(value);
428        } else if (name.equals("plannedActivityReference")) {
429          this.plannedActivityReference = null;
430        } else
431          super.removeChild(name, value);
432        
433      }
434
435      @Override
436      public Base makeProperty(int hash, String name) throws FHIRException {
437        switch (hash) {
438        case 1964521199:  return addPerformedActivity(); 
439        case -1001078227:  return addProgress(); 
440        case -1114371176:  return getPlannedActivityReference();
441        default: return super.makeProperty(hash, name);
442        }
443
444      }
445
446      @Override
447      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
448        switch (hash) {
449        case 1964521199: /*performedActivity*/ return new String[] {"CodeableReference"};
450        case -1001078227: /*progress*/ return new String[] {"Annotation"};
451        case -1114371176: /*plannedActivityReference*/ return new String[] {"Reference"};
452        default: return super.getTypesForProperty(hash, name);
453        }
454
455      }
456
457      @Override
458      public Base addChild(String name) throws FHIRException {
459        if (name.equals("performedActivity")) {
460          return addPerformedActivity();
461        }
462        else if (name.equals("progress")) {
463          return addProgress();
464        }
465        else if (name.equals("plannedActivityReference")) {
466          this.plannedActivityReference = new Reference();
467          return this.plannedActivityReference;
468        }
469        else
470          return super.addChild(name);
471      }
472
473      public CarePlanActivityComponent copy() {
474        CarePlanActivityComponent dst = new CarePlanActivityComponent();
475        copyValues(dst);
476        return dst;
477      }
478
479      public void copyValues(CarePlanActivityComponent dst) {
480        super.copyValues(dst);
481        if (performedActivity != null) {
482          dst.performedActivity = new ArrayList<CodeableReference>();
483          for (CodeableReference i : performedActivity)
484            dst.performedActivity.add(i.copy());
485        };
486        if (progress != null) {
487          dst.progress = new ArrayList<Annotation>();
488          for (Annotation i : progress)
489            dst.progress.add(i.copy());
490        };
491        dst.plannedActivityReference = plannedActivityReference == null ? null : plannedActivityReference.copy();
492      }
493
494      @Override
495      public boolean equalsDeep(Base other_) {
496        if (!super.equalsDeep(other_))
497          return false;
498        if (!(other_ instanceof CarePlanActivityComponent))
499          return false;
500        CarePlanActivityComponent o = (CarePlanActivityComponent) other_;
501        return compareDeep(performedActivity, o.performedActivity, true) && compareDeep(progress, o.progress, true)
502           && compareDeep(plannedActivityReference, o.plannedActivityReference, true);
503      }
504
505      @Override
506      public boolean equalsShallow(Base other_) {
507        if (!super.equalsShallow(other_))
508          return false;
509        if (!(other_ instanceof CarePlanActivityComponent))
510          return false;
511        CarePlanActivityComponent o = (CarePlanActivityComponent) other_;
512        return true;
513      }
514
515      public boolean isEmpty() {
516        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(performedActivity, progress
517          , plannedActivityReference);
518      }
519
520  public String fhirType() {
521    return "CarePlan.activity";
522
523  }
524
525  }
526
527    /**
528     * Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
529     */
530    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
531    @Description(shortDefinition="External Ids for this plan", formalDefinition="Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
532    protected List<Identifier> identifier;
533
534    /**
535     * The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.
536     */
537    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
538    @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan." )
539    protected List<CanonicalType> instantiatesCanonical;
540
541    /**
542     * The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.
543     */
544    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
545    @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan." )
546    protected List<UriType> instantiatesUri;
547
548    /**
549     * A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.
550     */
551    @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class, RequestOrchestration.class, NutritionOrder.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
552    @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan." )
553    protected List<Reference> basedOn;
554
555    /**
556     * Completed or terminated care plan whose function is taken by this new care plan.
557     */
558    @Child(name = "replaces", type = {CarePlan.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
559    @Description(shortDefinition="CarePlan replaced by this CarePlan", formalDefinition="Completed or terminated care plan whose function is taken by this new care plan." )
560    protected List<Reference> replaces;
561
562    /**
563     * A larger care plan of which this particular care plan is a component or step.
564     */
565    @Child(name = "partOf", type = {CarePlan.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
566    @Description(shortDefinition="Part of referenced CarePlan", formalDefinition="A larger care plan of which this particular care plan is a component or step." )
567    protected List<Reference> partOf;
568
569    /**
570     * Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.
571     */
572    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
573    @Description(shortDefinition="draft | active | on-hold | revoked | completed | entered-in-error | unknown", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record." )
574    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status")
575    protected Enumeration<RequestStatus> status;
576
577    /**
578     * Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.
579     */
580    @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true)
581    @Description(shortDefinition="proposal | plan | order | option | directive", formalDefinition="Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain." )
582    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-intent")
583    protected Enumeration<CarePlanIntent> intent;
584
585    /**
586     * Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.
587     */
588    @Child(name = "category", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
589    @Description(shortDefinition="Type of plan", formalDefinition="Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc." )
590    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-plan-category")
591    protected List<CodeableConcept> category;
592
593    /**
594     * Human-friendly name for the care plan.
595     */
596    @Child(name = "title", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
597    @Description(shortDefinition="Human-friendly name for the care plan", formalDefinition="Human-friendly name for the care plan." )
598    protected StringType title;
599
600    /**
601     * A description of the scope and nature of the plan.
602     */
603    @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true)
604    @Description(shortDefinition="Summary of nature of plan", formalDefinition="A description of the scope and nature of the plan." )
605    protected StringType description;
606
607    /**
608     * Identifies the patient or group whose intended care is described by the plan.
609     */
610    @Child(name = "subject", type = {Patient.class, Group.class}, order=11, min=1, max=1, modifier=false, summary=true)
611    @Description(shortDefinition="Who the care plan is for", formalDefinition="Identifies the patient or group whose intended care is described by the plan." )
612    protected Reference subject;
613
614    /**
615     * The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.
616     */
617    @Child(name = "encounter", type = {Encounter.class}, order=12, min=0, max=1, modifier=false, summary=true)
618    @Description(shortDefinition="The Encounter during which this CarePlan was created", formalDefinition="The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated." )
619    protected Reference encounter;
620
621    /**
622     * Indicates when the plan did (or is intended to) come into effect and end.
623     */
624    @Child(name = "period", type = {Period.class}, order=13, min=0, max=1, modifier=false, summary=true)
625    @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." )
626    protected Period period;
627
628    /**
629     * Represents when this particular CarePlan record was created in the system, which is often a system-generated date.
630     */
631    @Child(name = "created", type = {DateTimeType.class}, order=14, min=0, max=1, modifier=false, summary=true)
632    @Description(shortDefinition="Date record was first recorded", formalDefinition="Represents when this particular CarePlan record was created in the system, which is often a system-generated date." )
633    protected DateTimeType created;
634
635    /**
636     * When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.
637     */
638    @Child(name = "custodian", type = {Patient.class, Practitioner.class, PractitionerRole.class, Device.class, RelatedPerson.class, Organization.class, CareTeam.class}, order=15, min=0, max=1, modifier=false, summary=true)
639    @Description(shortDefinition="Who is the designated responsible party", formalDefinition="When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian." )
640    protected Reference custodian;
641
642    /**
643     * Identifies the individual(s), organization or device who provided the contents of the care plan.
644     */
645    @Child(name = "contributor", type = {Patient.class, Practitioner.class, PractitionerRole.class, Device.class, RelatedPerson.class, Organization.class, CareTeam.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
646    @Description(shortDefinition="Who provided the content of the care plan", formalDefinition="Identifies the individual(s), organization or device who provided the contents of the care plan." )
647    protected List<Reference> contributor;
648
649    /**
650     * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.
651     */
652    @Child(name = "careTeam", type = {CareTeam.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
653    @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." )
654    protected List<Reference> careTeam;
655
656    /**
657     * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.
658     */
659    @Child(name = "addresses", type = {CodeableReference.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
660    @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." )
661    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
662    protected List<CodeableReference> addresses;
663
664    /**
665     * Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc.
666     */
667    @Child(name = "supportingInfo", type = {Reference.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
668    @Description(shortDefinition="Information considered as part of plan", formalDefinition="Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc." )
669    protected List<Reference> supportingInfo;
670
671    /**
672     * Describes the intended objective(s) of carrying out the care plan.
673     */
674    @Child(name = "goal", type = {Goal.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
675    @Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the care plan." )
676    protected List<Reference> goal;
677
678    /**
679     * Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.
680     */
681    @Child(name = "activity", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
682    @Description(shortDefinition="Action to occur or has occurred as part of plan", formalDefinition="Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc." )
683    protected List<CarePlanActivityComponent> activity;
684
685    /**
686     * General notes about the care plan not covered elsewhere.
687     */
688    @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
689    @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." )
690    protected List<Annotation> note;
691
692    private static final long serialVersionUID = -700769298L;
693
694  /**
695   * Constructor
696   */
697    public CarePlan() {
698      super();
699    }
700
701  /**
702   * Constructor
703   */
704    public CarePlan(RequestStatus status, CarePlanIntent intent, Reference subject) {
705      super();
706      this.setStatus(status);
707      this.setIntent(intent);
708      this.setSubject(subject);
709    }
710
711    /**
712     * @return {@link #identifier} (Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
713     */
714    public List<Identifier> getIdentifier() { 
715      if (this.identifier == null)
716        this.identifier = new ArrayList<Identifier>();
717      return this.identifier;
718    }
719
720    /**
721     * @return Returns a reference to <code>this</code> for easy method chaining
722     */
723    public CarePlan setIdentifier(List<Identifier> theIdentifier) { 
724      this.identifier = theIdentifier;
725      return this;
726    }
727
728    public boolean hasIdentifier() { 
729      if (this.identifier == null)
730        return false;
731      for (Identifier item : this.identifier)
732        if (!item.isEmpty())
733          return true;
734      return false;
735    }
736
737    public Identifier addIdentifier() { //3
738      Identifier t = new Identifier();
739      if (this.identifier == null)
740        this.identifier = new ArrayList<Identifier>();
741      this.identifier.add(t);
742      return t;
743    }
744
745    public CarePlan addIdentifier(Identifier t) { //3
746      if (t == null)
747        return this;
748      if (this.identifier == null)
749        this.identifier = new ArrayList<Identifier>();
750      this.identifier.add(t);
751      return this;
752    }
753
754    /**
755     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
756     */
757    public Identifier getIdentifierFirstRep() { 
758      if (getIdentifier().isEmpty()) {
759        addIdentifier();
760      }
761      return getIdentifier().get(0);
762    }
763
764    /**
765     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
766     */
767    public List<CanonicalType> getInstantiatesCanonical() { 
768      if (this.instantiatesCanonical == null)
769        this.instantiatesCanonical = new ArrayList<CanonicalType>();
770      return this.instantiatesCanonical;
771    }
772
773    /**
774     * @return Returns a reference to <code>this</code> for easy method chaining
775     */
776    public CarePlan setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 
777      this.instantiatesCanonical = theInstantiatesCanonical;
778      return this;
779    }
780
781    public boolean hasInstantiatesCanonical() { 
782      if (this.instantiatesCanonical == null)
783        return false;
784      for (CanonicalType item : this.instantiatesCanonical)
785        if (!item.isEmpty())
786          return true;
787      return false;
788    }
789
790    /**
791     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
792     */
793    public CanonicalType addInstantiatesCanonicalElement() {//2 
794      CanonicalType t = new CanonicalType();
795      if (this.instantiatesCanonical == null)
796        this.instantiatesCanonical = new ArrayList<CanonicalType>();
797      this.instantiatesCanonical.add(t);
798      return t;
799    }
800
801    /**
802     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
803     */
804    public CarePlan addInstantiatesCanonical(String value) { //1
805      CanonicalType t = new CanonicalType();
806      t.setValue(value);
807      if (this.instantiatesCanonical == null)
808        this.instantiatesCanonical = new ArrayList<CanonicalType>();
809      this.instantiatesCanonical.add(t);
810      return this;
811    }
812
813    /**
814     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
815     */
816    public boolean hasInstantiatesCanonical(String value) { 
817      if (this.instantiatesCanonical == null)
818        return false;
819      for (CanonicalType v : this.instantiatesCanonical)
820        if (v.getValue().equals(value)) // canonical
821          return true;
822      return false;
823    }
824
825    /**
826     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
827     */
828    public List<UriType> getInstantiatesUri() { 
829      if (this.instantiatesUri == null)
830        this.instantiatesUri = new ArrayList<UriType>();
831      return this.instantiatesUri;
832    }
833
834    /**
835     * @return Returns a reference to <code>this</code> for easy method chaining
836     */
837    public CarePlan setInstantiatesUri(List<UriType> theInstantiatesUri) { 
838      this.instantiatesUri = theInstantiatesUri;
839      return this;
840    }
841
842    public boolean hasInstantiatesUri() { 
843      if (this.instantiatesUri == null)
844        return false;
845      for (UriType item : this.instantiatesUri)
846        if (!item.isEmpty())
847          return true;
848      return false;
849    }
850
851    /**
852     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
853     */
854    public UriType addInstantiatesUriElement() {//2 
855      UriType t = new UriType();
856      if (this.instantiatesUri == null)
857        this.instantiatesUri = new ArrayList<UriType>();
858      this.instantiatesUri.add(t);
859      return t;
860    }
861
862    /**
863     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
864     */
865    public CarePlan addInstantiatesUri(String value) { //1
866      UriType t = new UriType();
867      t.setValue(value);
868      if (this.instantiatesUri == null)
869        this.instantiatesUri = new ArrayList<UriType>();
870      this.instantiatesUri.add(t);
871      return this;
872    }
873
874    /**
875     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.)
876     */
877    public boolean hasInstantiatesUri(String value) { 
878      if (this.instantiatesUri == null)
879        return false;
880      for (UriType v : this.instantiatesUri)
881        if (v.getValue().equals(value)) // uri
882          return true;
883      return false;
884    }
885
886    /**
887     * @return {@link #basedOn} (A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.)
888     */
889    public List<Reference> getBasedOn() { 
890      if (this.basedOn == null)
891        this.basedOn = new ArrayList<Reference>();
892      return this.basedOn;
893    }
894
895    /**
896     * @return Returns a reference to <code>this</code> for easy method chaining
897     */
898    public CarePlan setBasedOn(List<Reference> theBasedOn) { 
899      this.basedOn = theBasedOn;
900      return this;
901    }
902
903    public boolean hasBasedOn() { 
904      if (this.basedOn == null)
905        return false;
906      for (Reference item : this.basedOn)
907        if (!item.isEmpty())
908          return true;
909      return false;
910    }
911
912    public Reference addBasedOn() { //3
913      Reference t = new Reference();
914      if (this.basedOn == null)
915        this.basedOn = new ArrayList<Reference>();
916      this.basedOn.add(t);
917      return t;
918    }
919
920    public CarePlan addBasedOn(Reference t) { //3
921      if (t == null)
922        return this;
923      if (this.basedOn == null)
924        this.basedOn = new ArrayList<Reference>();
925      this.basedOn.add(t);
926      return this;
927    }
928
929    /**
930     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
931     */
932    public Reference getBasedOnFirstRep() { 
933      if (getBasedOn().isEmpty()) {
934        addBasedOn();
935      }
936      return getBasedOn().get(0);
937    }
938
939    /**
940     * @return {@link #replaces} (Completed or terminated care plan whose function is taken by this new care plan.)
941     */
942    public List<Reference> getReplaces() { 
943      if (this.replaces == null)
944        this.replaces = new ArrayList<Reference>();
945      return this.replaces;
946    }
947
948    /**
949     * @return Returns a reference to <code>this</code> for easy method chaining
950     */
951    public CarePlan setReplaces(List<Reference> theReplaces) { 
952      this.replaces = theReplaces;
953      return this;
954    }
955
956    public boolean hasReplaces() { 
957      if (this.replaces == null)
958        return false;
959      for (Reference item : this.replaces)
960        if (!item.isEmpty())
961          return true;
962      return false;
963    }
964
965    public Reference addReplaces() { //3
966      Reference t = new Reference();
967      if (this.replaces == null)
968        this.replaces = new ArrayList<Reference>();
969      this.replaces.add(t);
970      return t;
971    }
972
973    public CarePlan addReplaces(Reference t) { //3
974      if (t == null)
975        return this;
976      if (this.replaces == null)
977        this.replaces = new ArrayList<Reference>();
978      this.replaces.add(t);
979      return this;
980    }
981
982    /**
983     * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3}
984     */
985    public Reference getReplacesFirstRep() { 
986      if (getReplaces().isEmpty()) {
987        addReplaces();
988      }
989      return getReplaces().get(0);
990    }
991
992    /**
993     * @return {@link #partOf} (A larger care plan of which this particular care plan is a component or step.)
994     */
995    public List<Reference> getPartOf() { 
996      if (this.partOf == null)
997        this.partOf = new ArrayList<Reference>();
998      return this.partOf;
999    }
1000
1001    /**
1002     * @return Returns a reference to <code>this</code> for easy method chaining
1003     */
1004    public CarePlan setPartOf(List<Reference> thePartOf) { 
1005      this.partOf = thePartOf;
1006      return this;
1007    }
1008
1009    public boolean hasPartOf() { 
1010      if (this.partOf == null)
1011        return false;
1012      for (Reference item : this.partOf)
1013        if (!item.isEmpty())
1014          return true;
1015      return false;
1016    }
1017
1018    public Reference addPartOf() { //3
1019      Reference t = new Reference();
1020      if (this.partOf == null)
1021        this.partOf = new ArrayList<Reference>();
1022      this.partOf.add(t);
1023      return t;
1024    }
1025
1026    public CarePlan addPartOf(Reference t) { //3
1027      if (t == null)
1028        return this;
1029      if (this.partOf == null)
1030        this.partOf = new ArrayList<Reference>();
1031      this.partOf.add(t);
1032      return this;
1033    }
1034
1035    /**
1036     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
1037     */
1038    public Reference getPartOfFirstRep() { 
1039      if (getPartOf().isEmpty()) {
1040        addPartOf();
1041      }
1042      return getPartOf().get(0);
1043    }
1044
1045    /**
1046     * @return {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1047     */
1048    public Enumeration<RequestStatus> getStatusElement() { 
1049      if (this.status == null)
1050        if (Configuration.errorOnAutoCreate())
1051          throw new Error("Attempt to auto-create CarePlan.status");
1052        else if (Configuration.doAutoCreate())
1053          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb
1054      return this.status;
1055    }
1056
1057    public boolean hasStatusElement() { 
1058      return this.status != null && !this.status.isEmpty();
1059    }
1060
1061    public boolean hasStatus() { 
1062      return this.status != null && !this.status.isEmpty();
1063    }
1064
1065    /**
1066     * @param value {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1067     */
1068    public CarePlan setStatusElement(Enumeration<RequestStatus> value) { 
1069      this.status = value;
1070      return this;
1071    }
1072
1073    /**
1074     * @return Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.
1075     */
1076    public RequestStatus getStatus() { 
1077      return this.status == null ? null : this.status.getValue();
1078    }
1079
1080    /**
1081     * @param value Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.
1082     */
1083    public CarePlan setStatus(RequestStatus value) { 
1084        if (this.status == null)
1085          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory());
1086        this.status.setValue(value);
1087      return this;
1088    }
1089
1090    /**
1091     * @return {@link #intent} (Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
1092     */
1093    public Enumeration<CarePlanIntent> getIntentElement() { 
1094      if (this.intent == null)
1095        if (Configuration.errorOnAutoCreate())
1096          throw new Error("Attempt to auto-create CarePlan.intent");
1097        else if (Configuration.doAutoCreate())
1098          this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory()); // bb
1099      return this.intent;
1100    }
1101
1102    public boolean hasIntentElement() { 
1103      return this.intent != null && !this.intent.isEmpty();
1104    }
1105
1106    public boolean hasIntent() { 
1107      return this.intent != null && !this.intent.isEmpty();
1108    }
1109
1110    /**
1111     * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
1112     */
1113    public CarePlan setIntentElement(Enumeration<CarePlanIntent> value) { 
1114      this.intent = value;
1115      return this;
1116    }
1117
1118    /**
1119     * @return Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.
1120     */
1121    public CarePlanIntent getIntent() { 
1122      return this.intent == null ? null : this.intent.getValue();
1123    }
1124
1125    /**
1126     * @param value Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.
1127     */
1128    public CarePlan setIntent(CarePlanIntent value) { 
1129        if (this.intent == null)
1130          this.intent = new Enumeration<CarePlanIntent>(new CarePlanIntentEnumFactory());
1131        this.intent.setValue(value);
1132      return this;
1133    }
1134
1135    /**
1136     * @return {@link #category} (Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.)
1137     */
1138    public List<CodeableConcept> getCategory() { 
1139      if (this.category == null)
1140        this.category = new ArrayList<CodeableConcept>();
1141      return this.category;
1142    }
1143
1144    /**
1145     * @return Returns a reference to <code>this</code> for easy method chaining
1146     */
1147    public CarePlan setCategory(List<CodeableConcept> theCategory) { 
1148      this.category = theCategory;
1149      return this;
1150    }
1151
1152    public boolean hasCategory() { 
1153      if (this.category == null)
1154        return false;
1155      for (CodeableConcept item : this.category)
1156        if (!item.isEmpty())
1157          return true;
1158      return false;
1159    }
1160
1161    public CodeableConcept addCategory() { //3
1162      CodeableConcept t = new CodeableConcept();
1163      if (this.category == null)
1164        this.category = new ArrayList<CodeableConcept>();
1165      this.category.add(t);
1166      return t;
1167    }
1168
1169    public CarePlan addCategory(CodeableConcept t) { //3
1170      if (t == null)
1171        return this;
1172      if (this.category == null)
1173        this.category = new ArrayList<CodeableConcept>();
1174      this.category.add(t);
1175      return this;
1176    }
1177
1178    /**
1179     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
1180     */
1181    public CodeableConcept getCategoryFirstRep() { 
1182      if (getCategory().isEmpty()) {
1183        addCategory();
1184      }
1185      return getCategory().get(0);
1186    }
1187
1188    /**
1189     * @return {@link #title} (Human-friendly name for the care plan.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1190     */
1191    public StringType getTitleElement() { 
1192      if (this.title == null)
1193        if (Configuration.errorOnAutoCreate())
1194          throw new Error("Attempt to auto-create CarePlan.title");
1195        else if (Configuration.doAutoCreate())
1196          this.title = new StringType(); // bb
1197      return this.title;
1198    }
1199
1200    public boolean hasTitleElement() { 
1201      return this.title != null && !this.title.isEmpty();
1202    }
1203
1204    public boolean hasTitle() { 
1205      return this.title != null && !this.title.isEmpty();
1206    }
1207
1208    /**
1209     * @param value {@link #title} (Human-friendly name for the care plan.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1210     */
1211    public CarePlan setTitleElement(StringType value) { 
1212      this.title = value;
1213      return this;
1214    }
1215
1216    /**
1217     * @return Human-friendly name for the care plan.
1218     */
1219    public String getTitle() { 
1220      return this.title == null ? null : this.title.getValue();
1221    }
1222
1223    /**
1224     * @param value Human-friendly name for the care plan.
1225     */
1226    public CarePlan setTitle(String value) { 
1227      if (Utilities.noString(value))
1228        this.title = null;
1229      else {
1230        if (this.title == null)
1231          this.title = new StringType();
1232        this.title.setValue(value);
1233      }
1234      return this;
1235    }
1236
1237    /**
1238     * @return {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1239     */
1240    public StringType getDescriptionElement() { 
1241      if (this.description == null)
1242        if (Configuration.errorOnAutoCreate())
1243          throw new Error("Attempt to auto-create CarePlan.description");
1244        else if (Configuration.doAutoCreate())
1245          this.description = new StringType(); // bb
1246      return this.description;
1247    }
1248
1249    public boolean hasDescriptionElement() { 
1250      return this.description != null && !this.description.isEmpty();
1251    }
1252
1253    public boolean hasDescription() { 
1254      return this.description != null && !this.description.isEmpty();
1255    }
1256
1257    /**
1258     * @param value {@link #description} (A description of the scope and nature of the plan.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1259     */
1260    public CarePlan setDescriptionElement(StringType value) { 
1261      this.description = value;
1262      return this;
1263    }
1264
1265    /**
1266     * @return A description of the scope and nature of the plan.
1267     */
1268    public String getDescription() { 
1269      return this.description == null ? null : this.description.getValue();
1270    }
1271
1272    /**
1273     * @param value A description of the scope and nature of the plan.
1274     */
1275    public CarePlan setDescription(String value) { 
1276      if (Utilities.noString(value))
1277        this.description = null;
1278      else {
1279        if (this.description == null)
1280          this.description = new StringType();
1281        this.description.setValue(value);
1282      }
1283      return this;
1284    }
1285
1286    /**
1287     * @return {@link #subject} (Identifies the patient or group whose intended care is described by the plan.)
1288     */
1289    public Reference getSubject() { 
1290      if (this.subject == null)
1291        if (Configuration.errorOnAutoCreate())
1292          throw new Error("Attempt to auto-create CarePlan.subject");
1293        else if (Configuration.doAutoCreate())
1294          this.subject = new Reference(); // cc
1295      return this.subject;
1296    }
1297
1298    public boolean hasSubject() { 
1299      return this.subject != null && !this.subject.isEmpty();
1300    }
1301
1302    /**
1303     * @param value {@link #subject} (Identifies the patient or group whose intended care is described by the plan.)
1304     */
1305    public CarePlan setSubject(Reference value) { 
1306      this.subject = value;
1307      return this;
1308    }
1309
1310    /**
1311     * @return {@link #encounter} (The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.)
1312     */
1313    public Reference getEncounter() { 
1314      if (this.encounter == null)
1315        if (Configuration.errorOnAutoCreate())
1316          throw new Error("Attempt to auto-create CarePlan.encounter");
1317        else if (Configuration.doAutoCreate())
1318          this.encounter = new Reference(); // cc
1319      return this.encounter;
1320    }
1321
1322    public boolean hasEncounter() { 
1323      return this.encounter != null && !this.encounter.isEmpty();
1324    }
1325
1326    /**
1327     * @param value {@link #encounter} (The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.)
1328     */
1329    public CarePlan setEncounter(Reference value) { 
1330      this.encounter = value;
1331      return this;
1332    }
1333
1334    /**
1335     * @return {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.)
1336     */
1337    public Period getPeriod() { 
1338      if (this.period == null)
1339        if (Configuration.errorOnAutoCreate())
1340          throw new Error("Attempt to auto-create CarePlan.period");
1341        else if (Configuration.doAutoCreate())
1342          this.period = new Period(); // cc
1343      return this.period;
1344    }
1345
1346    public boolean hasPeriod() { 
1347      return this.period != null && !this.period.isEmpty();
1348    }
1349
1350    /**
1351     * @param value {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.)
1352     */
1353    public CarePlan setPeriod(Period value) { 
1354      this.period = value;
1355      return this;
1356    }
1357
1358    /**
1359     * @return {@link #created} (Represents when this particular CarePlan record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1360     */
1361    public DateTimeType getCreatedElement() { 
1362      if (this.created == null)
1363        if (Configuration.errorOnAutoCreate())
1364          throw new Error("Attempt to auto-create CarePlan.created");
1365        else if (Configuration.doAutoCreate())
1366          this.created = new DateTimeType(); // bb
1367      return this.created;
1368    }
1369
1370    public boolean hasCreatedElement() { 
1371      return this.created != null && !this.created.isEmpty();
1372    }
1373
1374    public boolean hasCreated() { 
1375      return this.created != null && !this.created.isEmpty();
1376    }
1377
1378    /**
1379     * @param value {@link #created} (Represents when this particular CarePlan record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1380     */
1381    public CarePlan setCreatedElement(DateTimeType value) { 
1382      this.created = value;
1383      return this;
1384    }
1385
1386    /**
1387     * @return Represents when this particular CarePlan record was created in the system, which is often a system-generated date.
1388     */
1389    public Date getCreated() { 
1390      return this.created == null ? null : this.created.getValue();
1391    }
1392
1393    /**
1394     * @param value Represents when this particular CarePlan record was created in the system, which is often a system-generated date.
1395     */
1396    public CarePlan setCreated(Date value) { 
1397      if (value == null)
1398        this.created = null;
1399      else {
1400        if (this.created == null)
1401          this.created = new DateTimeType();
1402        this.created.setValue(value);
1403      }
1404      return this;
1405    }
1406
1407    /**
1408     * @return {@link #custodian} (When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.)
1409     */
1410    public Reference getCustodian() { 
1411      if (this.custodian == null)
1412        if (Configuration.errorOnAutoCreate())
1413          throw new Error("Attempt to auto-create CarePlan.custodian");
1414        else if (Configuration.doAutoCreate())
1415          this.custodian = new Reference(); // cc
1416      return this.custodian;
1417    }
1418
1419    public boolean hasCustodian() { 
1420      return this.custodian != null && !this.custodian.isEmpty();
1421    }
1422
1423    /**
1424     * @param value {@link #custodian} (When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.)
1425     */
1426    public CarePlan setCustodian(Reference value) { 
1427      this.custodian = value;
1428      return this;
1429    }
1430
1431    /**
1432     * @return {@link #contributor} (Identifies the individual(s), organization or device who provided the contents of the care plan.)
1433     */
1434    public List<Reference> getContributor() { 
1435      if (this.contributor == null)
1436        this.contributor = new ArrayList<Reference>();
1437      return this.contributor;
1438    }
1439
1440    /**
1441     * @return Returns a reference to <code>this</code> for easy method chaining
1442     */
1443    public CarePlan setContributor(List<Reference> theContributor) { 
1444      this.contributor = theContributor;
1445      return this;
1446    }
1447
1448    public boolean hasContributor() { 
1449      if (this.contributor == null)
1450        return false;
1451      for (Reference item : this.contributor)
1452        if (!item.isEmpty())
1453          return true;
1454      return false;
1455    }
1456
1457    public Reference addContributor() { //3
1458      Reference t = new Reference();
1459      if (this.contributor == null)
1460        this.contributor = new ArrayList<Reference>();
1461      this.contributor.add(t);
1462      return t;
1463    }
1464
1465    public CarePlan addContributor(Reference t) { //3
1466      if (t == null)
1467        return this;
1468      if (this.contributor == null)
1469        this.contributor = new ArrayList<Reference>();
1470      this.contributor.add(t);
1471      return this;
1472    }
1473
1474    /**
1475     * @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist {3}
1476     */
1477    public Reference getContributorFirstRep() { 
1478      if (getContributor().isEmpty()) {
1479        addContributor();
1480      }
1481      return getContributor().get(0);
1482    }
1483
1484    /**
1485     * @return {@link #careTeam} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.)
1486     */
1487    public List<Reference> getCareTeam() { 
1488      if (this.careTeam == null)
1489        this.careTeam = new ArrayList<Reference>();
1490      return this.careTeam;
1491    }
1492
1493    /**
1494     * @return Returns a reference to <code>this</code> for easy method chaining
1495     */
1496    public CarePlan setCareTeam(List<Reference> theCareTeam) { 
1497      this.careTeam = theCareTeam;
1498      return this;
1499    }
1500
1501    public boolean hasCareTeam() { 
1502      if (this.careTeam == null)
1503        return false;
1504      for (Reference item : this.careTeam)
1505        if (!item.isEmpty())
1506          return true;
1507      return false;
1508    }
1509
1510    public Reference addCareTeam() { //3
1511      Reference t = new Reference();
1512      if (this.careTeam == null)
1513        this.careTeam = new ArrayList<Reference>();
1514      this.careTeam.add(t);
1515      return t;
1516    }
1517
1518    public CarePlan addCareTeam(Reference t) { //3
1519      if (t == null)
1520        return this;
1521      if (this.careTeam == null)
1522        this.careTeam = new ArrayList<Reference>();
1523      this.careTeam.add(t);
1524      return this;
1525    }
1526
1527    /**
1528     * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3}
1529     */
1530    public Reference getCareTeamFirstRep() { 
1531      if (getCareTeam().isEmpty()) {
1532        addCareTeam();
1533      }
1534      return getCareTeam().get(0);
1535    }
1536
1537    /**
1538     * @return {@link #addresses} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.)
1539     */
1540    public List<CodeableReference> getAddresses() { 
1541      if (this.addresses == null)
1542        this.addresses = new ArrayList<CodeableReference>();
1543      return this.addresses;
1544    }
1545
1546    /**
1547     * @return Returns a reference to <code>this</code> for easy method chaining
1548     */
1549    public CarePlan setAddresses(List<CodeableReference> theAddresses) { 
1550      this.addresses = theAddresses;
1551      return this;
1552    }
1553
1554    public boolean hasAddresses() { 
1555      if (this.addresses == null)
1556        return false;
1557      for (CodeableReference item : this.addresses)
1558        if (!item.isEmpty())
1559          return true;
1560      return false;
1561    }
1562
1563    public CodeableReference addAddresses() { //3
1564      CodeableReference t = new CodeableReference();
1565      if (this.addresses == null)
1566        this.addresses = new ArrayList<CodeableReference>();
1567      this.addresses.add(t);
1568      return t;
1569    }
1570
1571    public CarePlan addAddresses(CodeableReference t) { //3
1572      if (t == null)
1573        return this;
1574      if (this.addresses == null)
1575        this.addresses = new ArrayList<CodeableReference>();
1576      this.addresses.add(t);
1577      return this;
1578    }
1579
1580    /**
1581     * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist {3}
1582     */
1583    public CodeableReference getAddressesFirstRep() { 
1584      if (getAddresses().isEmpty()) {
1585        addAddresses();
1586      }
1587      return getAddresses().get(0);
1588    }
1589
1590    /**
1591     * @return {@link #supportingInfo} (Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc.)
1592     */
1593    public List<Reference> getSupportingInfo() { 
1594      if (this.supportingInfo == null)
1595        this.supportingInfo = new ArrayList<Reference>();
1596      return this.supportingInfo;
1597    }
1598
1599    /**
1600     * @return Returns a reference to <code>this</code> for easy method chaining
1601     */
1602    public CarePlan setSupportingInfo(List<Reference> theSupportingInfo) { 
1603      this.supportingInfo = theSupportingInfo;
1604      return this;
1605    }
1606
1607    public boolean hasSupportingInfo() { 
1608      if (this.supportingInfo == null)
1609        return false;
1610      for (Reference item : this.supportingInfo)
1611        if (!item.isEmpty())
1612          return true;
1613      return false;
1614    }
1615
1616    public Reference addSupportingInfo() { //3
1617      Reference t = new Reference();
1618      if (this.supportingInfo == null)
1619        this.supportingInfo = new ArrayList<Reference>();
1620      this.supportingInfo.add(t);
1621      return t;
1622    }
1623
1624    public CarePlan addSupportingInfo(Reference t) { //3
1625      if (t == null)
1626        return this;
1627      if (this.supportingInfo == null)
1628        this.supportingInfo = new ArrayList<Reference>();
1629      this.supportingInfo.add(t);
1630      return this;
1631    }
1632
1633    /**
1634     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3}
1635     */
1636    public Reference getSupportingInfoFirstRep() { 
1637      if (getSupportingInfo().isEmpty()) {
1638        addSupportingInfo();
1639      }
1640      return getSupportingInfo().get(0);
1641    }
1642
1643    /**
1644     * @return {@link #goal} (Describes the intended objective(s) of carrying out the care plan.)
1645     */
1646    public List<Reference> getGoal() { 
1647      if (this.goal == null)
1648        this.goal = new ArrayList<Reference>();
1649      return this.goal;
1650    }
1651
1652    /**
1653     * @return Returns a reference to <code>this</code> for easy method chaining
1654     */
1655    public CarePlan setGoal(List<Reference> theGoal) { 
1656      this.goal = theGoal;
1657      return this;
1658    }
1659
1660    public boolean hasGoal() { 
1661      if (this.goal == null)
1662        return false;
1663      for (Reference item : this.goal)
1664        if (!item.isEmpty())
1665          return true;
1666      return false;
1667    }
1668
1669    public Reference addGoal() { //3
1670      Reference t = new Reference();
1671      if (this.goal == null)
1672        this.goal = new ArrayList<Reference>();
1673      this.goal.add(t);
1674      return t;
1675    }
1676
1677    public CarePlan addGoal(Reference t) { //3
1678      if (t == null)
1679        return this;
1680      if (this.goal == null)
1681        this.goal = new ArrayList<Reference>();
1682      this.goal.add(t);
1683      return this;
1684    }
1685
1686    /**
1687     * @return The first repetition of repeating field {@link #goal}, creating it if it does not already exist {3}
1688     */
1689    public Reference getGoalFirstRep() { 
1690      if (getGoal().isEmpty()) {
1691        addGoal();
1692      }
1693      return getGoal().get(0);
1694    }
1695
1696    /**
1697     * @return {@link #activity} (Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.)
1698     */
1699    public List<CarePlanActivityComponent> getActivity() { 
1700      if (this.activity == null)
1701        this.activity = new ArrayList<CarePlanActivityComponent>();
1702      return this.activity;
1703    }
1704
1705    /**
1706     * @return Returns a reference to <code>this</code> for easy method chaining
1707     */
1708    public CarePlan setActivity(List<CarePlanActivityComponent> theActivity) { 
1709      this.activity = theActivity;
1710      return this;
1711    }
1712
1713    public boolean hasActivity() { 
1714      if (this.activity == null)
1715        return false;
1716      for (CarePlanActivityComponent item : this.activity)
1717        if (!item.isEmpty())
1718          return true;
1719      return false;
1720    }
1721
1722    public CarePlanActivityComponent addActivity() { //3
1723      CarePlanActivityComponent t = new CarePlanActivityComponent();
1724      if (this.activity == null)
1725        this.activity = new ArrayList<CarePlanActivityComponent>();
1726      this.activity.add(t);
1727      return t;
1728    }
1729
1730    public CarePlan addActivity(CarePlanActivityComponent t) { //3
1731      if (t == null)
1732        return this;
1733      if (this.activity == null)
1734        this.activity = new ArrayList<CarePlanActivityComponent>();
1735      this.activity.add(t);
1736      return this;
1737    }
1738
1739    /**
1740     * @return The first repetition of repeating field {@link #activity}, creating it if it does not already exist {3}
1741     */
1742    public CarePlanActivityComponent getActivityFirstRep() { 
1743      if (getActivity().isEmpty()) {
1744        addActivity();
1745      }
1746      return getActivity().get(0);
1747    }
1748
1749    /**
1750     * @return {@link #note} (General notes about the care plan not covered elsewhere.)
1751     */
1752    public List<Annotation> getNote() { 
1753      if (this.note == null)
1754        this.note = new ArrayList<Annotation>();
1755      return this.note;
1756    }
1757
1758    /**
1759     * @return Returns a reference to <code>this</code> for easy method chaining
1760     */
1761    public CarePlan setNote(List<Annotation> theNote) { 
1762      this.note = theNote;
1763      return this;
1764    }
1765
1766    public boolean hasNote() { 
1767      if (this.note == null)
1768        return false;
1769      for (Annotation item : this.note)
1770        if (!item.isEmpty())
1771          return true;
1772      return false;
1773    }
1774
1775    public Annotation addNote() { //3
1776      Annotation t = new Annotation();
1777      if (this.note == null)
1778        this.note = new ArrayList<Annotation>();
1779      this.note.add(t);
1780      return t;
1781    }
1782
1783    public CarePlan addNote(Annotation t) { //3
1784      if (t == null)
1785        return this;
1786      if (this.note == null)
1787        this.note = new ArrayList<Annotation>();
1788      this.note.add(t);
1789      return this;
1790    }
1791
1792    /**
1793     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1794     */
1795    public Annotation getNoteFirstRep() { 
1796      if (getNote().isEmpty()) {
1797        addNote();
1798      }
1799      return getNote().get(0);
1800    }
1801
1802      protected void listChildren(List<Property> children) {
1803        super.listChildren(children);
1804        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1805        children.add(new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical));
1806        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri));
1807        children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest|RequestOrchestration|NutritionOrder)", "A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1808        children.add(new Property("replaces", "Reference(CarePlan)", "Completed or terminated care plan whose function is taken by this new care plan.", 0, java.lang.Integer.MAX_VALUE, replaces));
1809        children.add(new Property("partOf", "Reference(CarePlan)", "A larger care plan of which this particular care plan is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf));
1810        children.add(new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 0, 1, status));
1811        children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 0, 1, intent));
1812        children.add(new Property("category", "CodeableConcept", "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.", 0, java.lang.Integer.MAX_VALUE, category));
1813        children.add(new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title));
1814        children.add(new Property("description", "string", "A description of the scope and nature of the plan.", 0, 1, description));
1815        children.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject));
1816        children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1817        children.add(new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period));
1818        children.add(new Property("created", "dateTime", "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 0, 1, created));
1819        children.add(new Property("custodian", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.", 0, 1, custodian));
1820        children.add(new Property("contributor", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "Identifies the individual(s), organization or device who provided the contents of the care plan.", 0, java.lang.Integer.MAX_VALUE, contributor));
1821        children.add(new Property("careTeam", "Reference(CareTeam)", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, careTeam));
1822        children.add(new Property("addresses", "CodeableReference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, addresses));
1823        children.add(new Property("supportingInfo", "Reference(Any)", "Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
1824        children.add(new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal));
1825        children.add(new Property("activity", "", "Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.", 0, java.lang.Integer.MAX_VALUE, activity));
1826        children.add(new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note));
1827      }
1828
1829      @Override
1830      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1831        switch (_hash) {
1832        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1833        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|Measure|ActivityDefinition|OperationDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical);
1834        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri);
1835        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|ServiceRequest|RequestOrchestration|NutritionOrder)", "A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1836        case -430332865: /*replaces*/  return new Property("replaces", "Reference(CarePlan)", "Completed or terminated care plan whose function is taken by this new care plan.", 0, java.lang.Integer.MAX_VALUE, replaces);
1837        case -995410646: /*partOf*/  return new Property("partOf", "Reference(CarePlan)", "A larger care plan of which this particular care plan is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf);
1838        case -892481550: /*status*/  return new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.", 0, 1, status);
1839        case -1183762788: /*intent*/  return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.", 0, 1, intent);
1840        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc.", 0, java.lang.Integer.MAX_VALUE, category);
1841        case 110371416: /*title*/  return new Property("title", "string", "Human-friendly name for the care plan.", 0, 1, title);
1842        case -1724546052: /*description*/  return new Property("description", "string", "A description of the scope and nature of the plan.", 0, 1, description);
1843        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is described by the plan.", 0, 1, subject);
1844        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1845        case -991726143: /*period*/  return new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, 1, period);
1846        case 1028554472: /*created*/  return new Property("created", "dateTime", "Represents when this particular CarePlan record was created in the system, which is often a system-generated date.", 0, 1, created);
1847        case 1611297262: /*custodian*/  return new Property("custodian", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.", 0, 1, custodian);
1848        case -1895276325: /*contributor*/  return new Property("contributor", "Reference(Patient|Practitioner|PractitionerRole|Device|RelatedPerson|Organization|CareTeam)", "Identifies the individual(s), organization or device who provided the contents of the care plan.", 0, java.lang.Integer.MAX_VALUE, contributor);
1849        case -7323378: /*careTeam*/  return new Property("careTeam", "Reference(CareTeam)", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, careTeam);
1850        case 874544034: /*addresses*/  return new Property("addresses", "CodeableReference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, addresses);
1851        case 1922406657: /*supportingInfo*/  return new Property("supportingInfo", "Reference(Any)", "Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc.", 0, java.lang.Integer.MAX_VALUE, supportingInfo);
1852        case 3178259: /*goal*/  return new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the care plan.", 0, java.lang.Integer.MAX_VALUE, goal);
1853        case -1655966961: /*activity*/  return new Property("activity", "", "Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.", 0, java.lang.Integer.MAX_VALUE, activity);
1854        case 3387378: /*note*/  return new Property("note", "Annotation", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, note);
1855        default: return super.getNamedProperty(_hash, _name, _checkValid);
1856        }
1857
1858      }
1859
1860      @Override
1861      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1862        switch (hash) {
1863        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1864        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType
1865        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType
1866        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1867        case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference
1868        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
1869        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus>
1870        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<CarePlanIntent>
1871        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1872        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1873        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1874        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1875        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1876        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1877        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
1878        case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference
1879        case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // Reference
1880        case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference
1881        case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // CodeableReference
1882        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference
1883        case 3178259: /*goal*/ return this.goal == null ? new Base[0] : this.goal.toArray(new Base[this.goal.size()]); // Reference
1884        case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : this.activity.toArray(new Base[this.activity.size()]); // CarePlanActivityComponent
1885        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1886        default: return super.getProperty(hash, name, checkValid);
1887        }
1888
1889      }
1890
1891      @Override
1892      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1893        switch (hash) {
1894        case -1618432855: // identifier
1895          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1896          return value;
1897        case 8911915: // instantiatesCanonical
1898          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
1899          return value;
1900        case -1926393373: // instantiatesUri
1901          this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType
1902          return value;
1903        case -332612366: // basedOn
1904          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1905          return value;
1906        case -430332865: // replaces
1907          this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference
1908          return value;
1909        case -995410646: // partOf
1910          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
1911          return value;
1912        case -892481550: // status
1913          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1914          this.status = (Enumeration) value; // Enumeration<RequestStatus>
1915          return value;
1916        case -1183762788: // intent
1917          value = new CarePlanIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
1918          this.intent = (Enumeration) value; // Enumeration<CarePlanIntent>
1919          return value;
1920        case 50511102: // category
1921          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1922          return value;
1923        case 110371416: // title
1924          this.title = TypeConvertor.castToString(value); // StringType
1925          return value;
1926        case -1724546052: // description
1927          this.description = TypeConvertor.castToString(value); // StringType
1928          return value;
1929        case -1867885268: // subject
1930          this.subject = TypeConvertor.castToReference(value); // Reference
1931          return value;
1932        case 1524132147: // encounter
1933          this.encounter = TypeConvertor.castToReference(value); // Reference
1934          return value;
1935        case -991726143: // period
1936          this.period = TypeConvertor.castToPeriod(value); // Period
1937          return value;
1938        case 1028554472: // created
1939          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
1940          return value;
1941        case 1611297262: // custodian
1942          this.custodian = TypeConvertor.castToReference(value); // Reference
1943          return value;
1944        case -1895276325: // contributor
1945          this.getContributor().add(TypeConvertor.castToReference(value)); // Reference
1946          return value;
1947        case -7323378: // careTeam
1948          this.getCareTeam().add(TypeConvertor.castToReference(value)); // Reference
1949          return value;
1950        case 874544034: // addresses
1951          this.getAddresses().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1952          return value;
1953        case 1922406657: // supportingInfo
1954          this.getSupportingInfo().add(TypeConvertor.castToReference(value)); // Reference
1955          return value;
1956        case 3178259: // goal
1957          this.getGoal().add(TypeConvertor.castToReference(value)); // Reference
1958          return value;
1959        case -1655966961: // activity
1960          this.getActivity().add((CarePlanActivityComponent) value); // CarePlanActivityComponent
1961          return value;
1962        case 3387378: // note
1963          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1964          return value;
1965        default: return super.setProperty(hash, name, value);
1966        }
1967
1968      }
1969
1970      @Override
1971      public Base setProperty(String name, Base value) throws FHIRException {
1972        if (name.equals("identifier")) {
1973          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1974        } else if (name.equals("instantiatesCanonical")) {
1975          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value));
1976        } else if (name.equals("instantiatesUri")) {
1977          this.getInstantiatesUri().add(TypeConvertor.castToUri(value));
1978        } else if (name.equals("basedOn")) {
1979          this.getBasedOn().add(TypeConvertor.castToReference(value));
1980        } else if (name.equals("replaces")) {
1981          this.getReplaces().add(TypeConvertor.castToReference(value));
1982        } else if (name.equals("partOf")) {
1983          this.getPartOf().add(TypeConvertor.castToReference(value));
1984        } else if (name.equals("status")) {
1985          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1986          this.status = (Enumeration) value; // Enumeration<RequestStatus>
1987        } else if (name.equals("intent")) {
1988          value = new CarePlanIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
1989          this.intent = (Enumeration) value; // Enumeration<CarePlanIntent>
1990        } else if (name.equals("category")) {
1991          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1992        } else if (name.equals("title")) {
1993          this.title = TypeConvertor.castToString(value); // StringType
1994        } else if (name.equals("description")) {
1995          this.description = TypeConvertor.castToString(value); // StringType
1996        } else if (name.equals("subject")) {
1997          this.subject = TypeConvertor.castToReference(value); // Reference
1998        } else if (name.equals("encounter")) {
1999          this.encounter = TypeConvertor.castToReference(value); // Reference
2000        } else if (name.equals("period")) {
2001          this.period = TypeConvertor.castToPeriod(value); // Period
2002        } else if (name.equals("created")) {
2003          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2004        } else if (name.equals("custodian")) {
2005          this.custodian = TypeConvertor.castToReference(value); // Reference
2006        } else if (name.equals("contributor")) {
2007          this.getContributor().add(TypeConvertor.castToReference(value));
2008        } else if (name.equals("careTeam")) {
2009          this.getCareTeam().add(TypeConvertor.castToReference(value));
2010        } else if (name.equals("addresses")) {
2011          this.getAddresses().add(TypeConvertor.castToCodeableReference(value));
2012        } else if (name.equals("supportingInfo")) {
2013          this.getSupportingInfo().add(TypeConvertor.castToReference(value));
2014        } else if (name.equals("goal")) {
2015          this.getGoal().add(TypeConvertor.castToReference(value));
2016        } else if (name.equals("activity")) {
2017          this.getActivity().add((CarePlanActivityComponent) value);
2018        } else if (name.equals("note")) {
2019          this.getNote().add(TypeConvertor.castToAnnotation(value));
2020        } else
2021          return super.setProperty(name, value);
2022        return value;
2023      }
2024
2025  @Override
2026  public void removeChild(String name, Base value) throws FHIRException {
2027        if (name.equals("identifier")) {
2028          this.getIdentifier().remove(value);
2029        } else if (name.equals("instantiatesCanonical")) {
2030          this.getInstantiatesCanonical().remove(value);
2031        } else if (name.equals("instantiatesUri")) {
2032          this.getInstantiatesUri().remove(value);
2033        } else if (name.equals("basedOn")) {
2034          this.getBasedOn().remove(value);
2035        } else if (name.equals("replaces")) {
2036          this.getReplaces().remove(value);
2037        } else if (name.equals("partOf")) {
2038          this.getPartOf().remove(value);
2039        } else if (name.equals("status")) {
2040          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2041          this.status = (Enumeration) value; // Enumeration<RequestStatus>
2042        } else if (name.equals("intent")) {
2043          value = new CarePlanIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
2044          this.intent = (Enumeration) value; // Enumeration<CarePlanIntent>
2045        } else if (name.equals("category")) {
2046          this.getCategory().remove(value);
2047        } else if (name.equals("title")) {
2048          this.title = null;
2049        } else if (name.equals("description")) {
2050          this.description = null;
2051        } else if (name.equals("subject")) {
2052          this.subject = null;
2053        } else if (name.equals("encounter")) {
2054          this.encounter = null;
2055        } else if (name.equals("period")) {
2056          this.period = null;
2057        } else if (name.equals("created")) {
2058          this.created = null;
2059        } else if (name.equals("custodian")) {
2060          this.custodian = null;
2061        } else if (name.equals("contributor")) {
2062          this.getContributor().remove(value);
2063        } else if (name.equals("careTeam")) {
2064          this.getCareTeam().remove(value);
2065        } else if (name.equals("addresses")) {
2066          this.getAddresses().remove(value);
2067        } else if (name.equals("supportingInfo")) {
2068          this.getSupportingInfo().remove(value);
2069        } else if (name.equals("goal")) {
2070          this.getGoal().remove(value);
2071        } else if (name.equals("activity")) {
2072          this.getActivity().remove((CarePlanActivityComponent) value);
2073        } else if (name.equals("note")) {
2074          this.getNote().remove(value);
2075        } else
2076          super.removeChild(name, value);
2077        
2078      }
2079
2080      @Override
2081      public Base makeProperty(int hash, String name) throws FHIRException {
2082        switch (hash) {
2083        case -1618432855:  return addIdentifier(); 
2084        case 8911915:  return addInstantiatesCanonicalElement();
2085        case -1926393373:  return addInstantiatesUriElement();
2086        case -332612366:  return addBasedOn(); 
2087        case -430332865:  return addReplaces(); 
2088        case -995410646:  return addPartOf(); 
2089        case -892481550:  return getStatusElement();
2090        case -1183762788:  return getIntentElement();
2091        case 50511102:  return addCategory(); 
2092        case 110371416:  return getTitleElement();
2093        case -1724546052:  return getDescriptionElement();
2094        case -1867885268:  return getSubject();
2095        case 1524132147:  return getEncounter();
2096        case -991726143:  return getPeriod();
2097        case 1028554472:  return getCreatedElement();
2098        case 1611297262:  return getCustodian();
2099        case -1895276325:  return addContributor(); 
2100        case -7323378:  return addCareTeam(); 
2101        case 874544034:  return addAddresses(); 
2102        case 1922406657:  return addSupportingInfo(); 
2103        case 3178259:  return addGoal(); 
2104        case -1655966961:  return addActivity(); 
2105        case 3387378:  return addNote(); 
2106        default: return super.makeProperty(hash, name);
2107        }
2108
2109      }
2110
2111      @Override
2112      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2113        switch (hash) {
2114        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2115        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
2116        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
2117        case -332612366: /*basedOn*/ return new String[] {"Reference"};
2118        case -430332865: /*replaces*/ return new String[] {"Reference"};
2119        case -995410646: /*partOf*/ return new String[] {"Reference"};
2120        case -892481550: /*status*/ return new String[] {"code"};
2121        case -1183762788: /*intent*/ return new String[] {"code"};
2122        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
2123        case 110371416: /*title*/ return new String[] {"string"};
2124        case -1724546052: /*description*/ return new String[] {"string"};
2125        case -1867885268: /*subject*/ return new String[] {"Reference"};
2126        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2127        case -991726143: /*period*/ return new String[] {"Period"};
2128        case 1028554472: /*created*/ return new String[] {"dateTime"};
2129        case 1611297262: /*custodian*/ return new String[] {"Reference"};
2130        case -1895276325: /*contributor*/ return new String[] {"Reference"};
2131        case -7323378: /*careTeam*/ return new String[] {"Reference"};
2132        case 874544034: /*addresses*/ return new String[] {"CodeableReference"};
2133        case 1922406657: /*supportingInfo*/ return new String[] {"Reference"};
2134        case 3178259: /*goal*/ return new String[] {"Reference"};
2135        case -1655966961: /*activity*/ return new String[] {};
2136        case 3387378: /*note*/ return new String[] {"Annotation"};
2137        default: return super.getTypesForProperty(hash, name);
2138        }
2139
2140      }
2141
2142      @Override
2143      public Base addChild(String name) throws FHIRException {
2144        if (name.equals("identifier")) {
2145          return addIdentifier();
2146        }
2147        else if (name.equals("instantiatesCanonical")) {
2148          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesCanonical");
2149        }
2150        else if (name.equals("instantiatesUri")) {
2151          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.instantiatesUri");
2152        }
2153        else if (name.equals("basedOn")) {
2154          return addBasedOn();
2155        }
2156        else if (name.equals("replaces")) {
2157          return addReplaces();
2158        }
2159        else if (name.equals("partOf")) {
2160          return addPartOf();
2161        }
2162        else if (name.equals("status")) {
2163          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.status");
2164        }
2165        else if (name.equals("intent")) {
2166          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.intent");
2167        }
2168        else if (name.equals("category")) {
2169          return addCategory();
2170        }
2171        else if (name.equals("title")) {
2172          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.title");
2173        }
2174        else if (name.equals("description")) {
2175          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.description");
2176        }
2177        else if (name.equals("subject")) {
2178          this.subject = new Reference();
2179          return this.subject;
2180        }
2181        else if (name.equals("encounter")) {
2182          this.encounter = new Reference();
2183          return this.encounter;
2184        }
2185        else if (name.equals("period")) {
2186          this.period = new Period();
2187          return this.period;
2188        }
2189        else if (name.equals("created")) {
2190          throw new FHIRException("Cannot call addChild on a singleton property CarePlan.created");
2191        }
2192        else if (name.equals("custodian")) {
2193          this.custodian = new Reference();
2194          return this.custodian;
2195        }
2196        else if (name.equals("contributor")) {
2197          return addContributor();
2198        }
2199        else if (name.equals("careTeam")) {
2200          return addCareTeam();
2201        }
2202        else if (name.equals("addresses")) {
2203          return addAddresses();
2204        }
2205        else if (name.equals("supportingInfo")) {
2206          return addSupportingInfo();
2207        }
2208        else if (name.equals("goal")) {
2209          return addGoal();
2210        }
2211        else if (name.equals("activity")) {
2212          return addActivity();
2213        }
2214        else if (name.equals("note")) {
2215          return addNote();
2216        }
2217        else
2218          return super.addChild(name);
2219      }
2220
2221  public String fhirType() {
2222    return "CarePlan";
2223
2224  }
2225
2226      public CarePlan copy() {
2227        CarePlan dst = new CarePlan();
2228        copyValues(dst);
2229        return dst;
2230      }
2231
2232      public void copyValues(CarePlan dst) {
2233        super.copyValues(dst);
2234        if (identifier != null) {
2235          dst.identifier = new ArrayList<Identifier>();
2236          for (Identifier i : identifier)
2237            dst.identifier.add(i.copy());
2238        };
2239        if (instantiatesCanonical != null) {
2240          dst.instantiatesCanonical = new ArrayList<CanonicalType>();
2241          for (CanonicalType i : instantiatesCanonical)
2242            dst.instantiatesCanonical.add(i.copy());
2243        };
2244        if (instantiatesUri != null) {
2245          dst.instantiatesUri = new ArrayList<UriType>();
2246          for (UriType i : instantiatesUri)
2247            dst.instantiatesUri.add(i.copy());
2248        };
2249        if (basedOn != null) {
2250          dst.basedOn = new ArrayList<Reference>();
2251          for (Reference i : basedOn)
2252            dst.basedOn.add(i.copy());
2253        };
2254        if (replaces != null) {
2255          dst.replaces = new ArrayList<Reference>();
2256          for (Reference i : replaces)
2257            dst.replaces.add(i.copy());
2258        };
2259        if (partOf != null) {
2260          dst.partOf = new ArrayList<Reference>();
2261          for (Reference i : partOf)
2262            dst.partOf.add(i.copy());
2263        };
2264        dst.status = status == null ? null : status.copy();
2265        dst.intent = intent == null ? null : intent.copy();
2266        if (category != null) {
2267          dst.category = new ArrayList<CodeableConcept>();
2268          for (CodeableConcept i : category)
2269            dst.category.add(i.copy());
2270        };
2271        dst.title = title == null ? null : title.copy();
2272        dst.description = description == null ? null : description.copy();
2273        dst.subject = subject == null ? null : subject.copy();
2274        dst.encounter = encounter == null ? null : encounter.copy();
2275        dst.period = period == null ? null : period.copy();
2276        dst.created = created == null ? null : created.copy();
2277        dst.custodian = custodian == null ? null : custodian.copy();
2278        if (contributor != null) {
2279          dst.contributor = new ArrayList<Reference>();
2280          for (Reference i : contributor)
2281            dst.contributor.add(i.copy());
2282        };
2283        if (careTeam != null) {
2284          dst.careTeam = new ArrayList<Reference>();
2285          for (Reference i : careTeam)
2286            dst.careTeam.add(i.copy());
2287        };
2288        if (addresses != null) {
2289          dst.addresses = new ArrayList<CodeableReference>();
2290          for (CodeableReference i : addresses)
2291            dst.addresses.add(i.copy());
2292        };
2293        if (supportingInfo != null) {
2294          dst.supportingInfo = new ArrayList<Reference>();
2295          for (Reference i : supportingInfo)
2296            dst.supportingInfo.add(i.copy());
2297        };
2298        if (goal != null) {
2299          dst.goal = new ArrayList<Reference>();
2300          for (Reference i : goal)
2301            dst.goal.add(i.copy());
2302        };
2303        if (activity != null) {
2304          dst.activity = new ArrayList<CarePlanActivityComponent>();
2305          for (CarePlanActivityComponent i : activity)
2306            dst.activity.add(i.copy());
2307        };
2308        if (note != null) {
2309          dst.note = new ArrayList<Annotation>();
2310          for (Annotation i : note)
2311            dst.note.add(i.copy());
2312        };
2313      }
2314
2315      protected CarePlan typedCopy() {
2316        return copy();
2317      }
2318
2319      @Override
2320      public boolean equalsDeep(Base other_) {
2321        if (!super.equalsDeep(other_))
2322          return false;
2323        if (!(other_ instanceof CarePlan))
2324          return false;
2325        CarePlan o = (CarePlan) other_;
2326        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
2327           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
2328           && compareDeep(replaces, o.replaces, true) && compareDeep(partOf, o.partOf, true) && compareDeep(status, o.status, true)
2329           && compareDeep(intent, o.intent, true) && compareDeep(category, o.category, true) && compareDeep(title, o.title, true)
2330           && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
2331           && compareDeep(period, o.period, true) && compareDeep(created, o.created, true) && compareDeep(custodian, o.custodian, true)
2332           && compareDeep(contributor, o.contributor, true) && compareDeep(careTeam, o.careTeam, true) && compareDeep(addresses, o.addresses, true)
2333           && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(goal, o.goal, true) && compareDeep(activity, o.activity, true)
2334           && compareDeep(note, o.note, true);
2335      }
2336
2337      @Override
2338      public boolean equalsShallow(Base other_) {
2339        if (!super.equalsShallow(other_))
2340          return false;
2341        if (!(other_ instanceof CarePlan))
2342          return false;
2343        CarePlan o = (CarePlan) other_;
2344        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
2345           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(title, o.title, true)
2346           && compareValues(description, o.description, true) && compareValues(created, o.created, true);
2347      }
2348
2349      public boolean isEmpty() {
2350        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
2351          , instantiatesUri, basedOn, replaces, partOf, status, intent, category, title
2352          , description, subject, encounter, period, created, custodian, contributor, careTeam
2353          , addresses, supportingInfo, goal, activity, note);
2354      }
2355
2356  @Override
2357  public ResourceType getResourceType() {
2358    return ResourceType.CarePlan;
2359   }
2360
2361 /**
2362   * Search parameter: <b>activity-reference</b>
2363   * <p>
2364   * Description: <b>Activity that is intended to be part of the care plan</b><br>
2365   * Type: <b>reference</b><br>
2366   * Path: <b>CarePlan.activity.plannedActivityReference</b><br>
2367   * </p>
2368   */
2369  @SearchParamDefinition(name="activity-reference", path="CarePlan.activity.plannedActivityReference", description="Activity that is intended to be part of the care plan", type="reference", target={Appointment.class, CommunicationRequest.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, RequestOrchestration.class, ServiceRequest.class, SupplyRequest.class, Task.class, VisionPrescription.class } )
2370  public static final String SP_ACTIVITY_REFERENCE = "activity-reference";
2371 /**
2372   * <b>Fluent Client</b> search parameter constant for <b>activity-reference</b>
2373   * <p>
2374   * Description: <b>Activity that is intended to be part of the care plan</b><br>
2375   * Type: <b>reference</b><br>
2376   * Path: <b>CarePlan.activity.plannedActivityReference</b><br>
2377   * </p>
2378   */
2379  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTIVITY_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTIVITY_REFERENCE);
2380
2381/**
2382   * Constant for fluent queries to be used to add include statements. Specifies
2383   * the path value of "<b>CarePlan:activity-reference</b>".
2384   */
2385  public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTIVITY_REFERENCE = new ca.uhn.fhir.model.api.Include("CarePlan:activity-reference").toLocked();
2386
2387 /**
2388   * Search parameter: <b>based-on</b>
2389   * <p>
2390   * Description: <b>Fulfills CarePlan</b><br>
2391   * Type: <b>reference</b><br>
2392   * Path: <b>CarePlan.basedOn</b><br>
2393   * </p>
2394   */
2395  @SearchParamDefinition(name="based-on", path="CarePlan.basedOn", description="Fulfills CarePlan", type="reference", target={CarePlan.class, NutritionOrder.class, RequestOrchestration.class, ServiceRequest.class } )
2396  public static final String SP_BASED_ON = "based-on";
2397 /**
2398   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
2399   * <p>
2400   * Description: <b>Fulfills CarePlan</b><br>
2401   * Type: <b>reference</b><br>
2402   * Path: <b>CarePlan.basedOn</b><br>
2403   * </p>
2404   */
2405  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
2406
2407/**
2408   * Constant for fluent queries to be used to add include statements. Specifies
2409   * the path value of "<b>CarePlan:based-on</b>".
2410   */
2411  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("CarePlan:based-on").toLocked();
2412
2413 /**
2414   * Search parameter: <b>care-team</b>
2415   * <p>
2416   * Description: <b>Who's involved in plan?</b><br>
2417   * Type: <b>reference</b><br>
2418   * Path: <b>CarePlan.careTeam</b><br>
2419   * </p>
2420   */
2421  @SearchParamDefinition(name="care-team", path="CarePlan.careTeam", description="Who's involved in plan?", type="reference", target={CareTeam.class } )
2422  public static final String SP_CARE_TEAM = "care-team";
2423 /**
2424   * <b>Fluent Client</b> search parameter constant for <b>care-team</b>
2425   * <p>
2426   * Description: <b>Who's involved in plan?</b><br>
2427   * Type: <b>reference</b><br>
2428   * Path: <b>CarePlan.careTeam</b><br>
2429   * </p>
2430   */
2431  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARE_TEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARE_TEAM);
2432
2433/**
2434   * Constant for fluent queries to be used to add include statements. Specifies
2435   * the path value of "<b>CarePlan:care-team</b>".
2436   */
2437  public static final ca.uhn.fhir.model.api.Include INCLUDE_CARE_TEAM = new ca.uhn.fhir.model.api.Include("CarePlan:care-team").toLocked();
2438
2439 /**
2440   * Search parameter: <b>category</b>
2441   * <p>
2442   * Description: <b>Type of plan</b><br>
2443   * Type: <b>token</b><br>
2444   * Path: <b>CarePlan.category</b><br>
2445   * </p>
2446   */
2447  @SearchParamDefinition(name="category", path="CarePlan.category", description="Type of plan", type="token" )
2448  public static final String SP_CATEGORY = "category";
2449 /**
2450   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2451   * <p>
2452   * Description: <b>Type of plan</b><br>
2453   * Type: <b>token</b><br>
2454   * Path: <b>CarePlan.category</b><br>
2455   * </p>
2456   */
2457  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2458
2459 /**
2460   * Search parameter: <b>condition</b>
2461   * <p>
2462   * Description: <b>Reference to a resource (by instance)</b><br>
2463   * Type: <b>reference</b><br>
2464   * Path: <b>CarePlan.addresses.reference</b><br>
2465   * </p>
2466   */
2467  @SearchParamDefinition(name="condition", path="CarePlan.addresses.reference", description="Reference to a resource (by instance)", type="reference", target={Condition.class } )
2468  public static final String SP_CONDITION = "condition";
2469 /**
2470   * <b>Fluent Client</b> search parameter constant for <b>condition</b>
2471   * <p>
2472   * Description: <b>Reference to a resource (by instance)</b><br>
2473   * Type: <b>reference</b><br>
2474   * Path: <b>CarePlan.addresses.reference</b><br>
2475   * </p>
2476   */
2477  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONDITION);
2478
2479/**
2480   * Constant for fluent queries to be used to add include statements. Specifies
2481   * the path value of "<b>CarePlan:condition</b>".
2482   */
2483  public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include("CarePlan:condition").toLocked();
2484
2485 /**
2486   * Search parameter: <b>custodian</b>
2487   * <p>
2488   * Description: <b>Who is the designated responsible party</b><br>
2489   * Type: <b>reference</b><br>
2490   * Path: <b>CarePlan.custodian</b><br>
2491   * </p>
2492   */
2493  @SearchParamDefinition(name="custodian", path="CarePlan.custodian", description="Who is the designated responsible party", type="reference", target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2494  public static final String SP_CUSTODIAN = "custodian";
2495 /**
2496   * <b>Fluent Client</b> search parameter constant for <b>custodian</b>
2497   * <p>
2498   * Description: <b>Who is the designated responsible party</b><br>
2499   * Type: <b>reference</b><br>
2500   * Path: <b>CarePlan.custodian</b><br>
2501   * </p>
2502   */
2503  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CUSTODIAN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CUSTODIAN);
2504
2505/**
2506   * Constant for fluent queries to be used to add include statements. Specifies
2507   * the path value of "<b>CarePlan:custodian</b>".
2508   */
2509  public static final ca.uhn.fhir.model.api.Include INCLUDE_CUSTODIAN = new ca.uhn.fhir.model.api.Include("CarePlan:custodian").toLocked();
2510
2511 /**
2512   * Search parameter: <b>goal</b>
2513   * <p>
2514   * Description: <b>Desired outcome of plan</b><br>
2515   * Type: <b>reference</b><br>
2516   * Path: <b>CarePlan.goal</b><br>
2517   * </p>
2518   */
2519  @SearchParamDefinition(name="goal", path="CarePlan.goal", description="Desired outcome of plan", type="reference", target={Goal.class } )
2520  public static final String SP_GOAL = "goal";
2521 /**
2522   * <b>Fluent Client</b> search parameter constant for <b>goal</b>
2523   * <p>
2524   * Description: <b>Desired outcome of plan</b><br>
2525   * Type: <b>reference</b><br>
2526   * Path: <b>CarePlan.goal</b><br>
2527   * </p>
2528   */
2529  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GOAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GOAL);
2530
2531/**
2532   * Constant for fluent queries to be used to add include statements. Specifies
2533   * the path value of "<b>CarePlan:goal</b>".
2534   */
2535  public static final ca.uhn.fhir.model.api.Include INCLUDE_GOAL = new ca.uhn.fhir.model.api.Include("CarePlan:goal").toLocked();
2536
2537 /**
2538   * Search parameter: <b>instantiates-canonical</b>
2539   * <p>
2540   * Description: <b>Instantiates FHIR protocol or definition</b><br>
2541   * Type: <b>reference</b><br>
2542   * Path: <b>CarePlan.instantiatesCanonical</b><br>
2543   * </p>
2544   */
2545  @SearchParamDefinition(name="instantiates-canonical", path="CarePlan.instantiatesCanonical", description="Instantiates FHIR protocol or definition", type="reference", target={ActivityDefinition.class, Measure.class, OperationDefinition.class, PlanDefinition.class, Questionnaire.class } )
2546  public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical";
2547 /**
2548   * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b>
2549   * <p>
2550   * Description: <b>Instantiates FHIR protocol or definition</b><br>
2551   * Type: <b>reference</b><br>
2552   * Path: <b>CarePlan.instantiatesCanonical</b><br>
2553   * </p>
2554   */
2555  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL);
2556
2557/**
2558   * Constant for fluent queries to be used to add include statements. Specifies
2559   * the path value of "<b>CarePlan:instantiates-canonical</b>".
2560   */
2561  public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("CarePlan:instantiates-canonical").toLocked();
2562
2563 /**
2564   * Search parameter: <b>instantiates-uri</b>
2565   * <p>
2566   * Description: <b>Instantiates external protocol or definition</b><br>
2567   * Type: <b>uri</b><br>
2568   * Path: <b>CarePlan.instantiatesUri</b><br>
2569   * </p>
2570   */
2571  @SearchParamDefinition(name="instantiates-uri", path="CarePlan.instantiatesUri", description="Instantiates external protocol or definition", type="uri" )
2572  public static final String SP_INSTANTIATES_URI = "instantiates-uri";
2573 /**
2574   * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b>
2575   * <p>
2576   * Description: <b>Instantiates external protocol or definition</b><br>
2577   * Type: <b>uri</b><br>
2578   * Path: <b>CarePlan.instantiatesUri</b><br>
2579   * </p>
2580   */
2581  public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI);
2582
2583 /**
2584   * Search parameter: <b>intent</b>
2585   * <p>
2586   * Description: <b>proposal | plan | order | option | directive</b><br>
2587   * Type: <b>token</b><br>
2588   * Path: <b>CarePlan.intent</b><br>
2589   * </p>
2590   */
2591  @SearchParamDefinition(name="intent", path="CarePlan.intent", description="proposal | plan | order | option | directive", type="token" )
2592  public static final String SP_INTENT = "intent";
2593 /**
2594   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
2595   * <p>
2596   * Description: <b>proposal | plan | order | option | directive</b><br>
2597   * Type: <b>token</b><br>
2598   * Path: <b>CarePlan.intent</b><br>
2599   * </p>
2600   */
2601  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
2602
2603 /**
2604   * Search parameter: <b>part-of</b>
2605   * <p>
2606   * Description: <b>Part of referenced CarePlan</b><br>
2607   * Type: <b>reference</b><br>
2608   * Path: <b>CarePlan.partOf</b><br>
2609   * </p>
2610   */
2611  @SearchParamDefinition(name="part-of", path="CarePlan.partOf", description="Part of referenced CarePlan", type="reference", target={CarePlan.class } )
2612  public static final String SP_PART_OF = "part-of";
2613 /**
2614   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
2615   * <p>
2616   * Description: <b>Part of referenced CarePlan</b><br>
2617   * Type: <b>reference</b><br>
2618   * Path: <b>CarePlan.partOf</b><br>
2619   * </p>
2620   */
2621  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
2622
2623/**
2624   * Constant for fluent queries to be used to add include statements. Specifies
2625   * the path value of "<b>CarePlan:part-of</b>".
2626   */
2627  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("CarePlan:part-of").toLocked();
2628
2629 /**
2630   * Search parameter: <b>replaces</b>
2631   * <p>
2632   * Description: <b>CarePlan replaced by this CarePlan</b><br>
2633   * Type: <b>reference</b><br>
2634   * Path: <b>CarePlan.replaces</b><br>
2635   * </p>
2636   */
2637  @SearchParamDefinition(name="replaces", path="CarePlan.replaces", description="CarePlan replaced by this CarePlan", type="reference", target={CarePlan.class } )
2638  public static final String SP_REPLACES = "replaces";
2639 /**
2640   * <b>Fluent Client</b> search parameter constant for <b>replaces</b>
2641   * <p>
2642   * Description: <b>CarePlan replaced by this CarePlan</b><br>
2643   * Type: <b>reference</b><br>
2644   * Path: <b>CarePlan.replaces</b><br>
2645   * </p>
2646   */
2647  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPLACES);
2648
2649/**
2650   * Constant for fluent queries to be used to add include statements. Specifies
2651   * the path value of "<b>CarePlan:replaces</b>".
2652   */
2653  public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACES = new ca.uhn.fhir.model.api.Include("CarePlan:replaces").toLocked();
2654
2655 /**
2656   * Search parameter: <b>status</b>
2657   * <p>
2658   * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br>
2659   * Type: <b>token</b><br>
2660   * Path: <b>CarePlan.status</b><br>
2661   * </p>
2662   */
2663  @SearchParamDefinition(name="status", path="CarePlan.status", description="draft | active | on-hold | revoked | completed | entered-in-error | unknown", type="token" )
2664  public static final String SP_STATUS = "status";
2665 /**
2666   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2667   * <p>
2668   * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br>
2669   * Type: <b>token</b><br>
2670   * Path: <b>CarePlan.status</b><br>
2671   * </p>
2672   */
2673  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2674
2675 /**
2676   * Search parameter: <b>subject</b>
2677   * <p>
2678   * Description: <b>Who the care plan is for</b><br>
2679   * Type: <b>reference</b><br>
2680   * Path: <b>CarePlan.subject</b><br>
2681   * </p>
2682   */
2683  @SearchParamDefinition(name="subject", path="CarePlan.subject", description="Who the care plan is for", type="reference", target={Group.class, Patient.class } )
2684  public static final String SP_SUBJECT = "subject";
2685 /**
2686   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2687   * <p>
2688   * Description: <b>Who the care plan is for</b><br>
2689   * Type: <b>reference</b><br>
2690   * Path: <b>CarePlan.subject</b><br>
2691   * </p>
2692   */
2693  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2694
2695/**
2696   * Constant for fluent queries to be used to add include statements. Specifies
2697   * the path value of "<b>CarePlan:subject</b>".
2698   */
2699  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CarePlan:subject").toLocked();
2700
2701 /**
2702   * Search parameter: <b>date</b>
2703   * <p>
2704   * Description: <b>Multiple Resources: 
2705
2706* [AdverseEvent](adverseevent.html): When the event occurred
2707* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2708* [Appointment](appointment.html): Appointment date/time.
2709* [AuditEvent](auditevent.html): Time when the event was recorded
2710* [CarePlan](careplan.html): Time period plan covers
2711* [CareTeam](careteam.html): A date within the coverage time period.
2712* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2713* [Composition](composition.html): Composition editing time
2714* [Consent](consent.html): When consent was agreed to
2715* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2716* [DocumentReference](documentreference.html): When this document reference was created
2717* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2718* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2719* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2720* [Flag](flag.html): Time period when flag is active
2721* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2722* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2723* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2724* [Invoice](invoice.html): Invoice date / posting date
2725* [List](list.html): When the list was prepared
2726* [MeasureReport](measurereport.html): The date of the measure report
2727* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2728* [Observation](observation.html): Clinically relevant time/time-period for observation
2729* [Procedure](procedure.html): When the procedure occurred or is occurring
2730* [ResearchSubject](researchsubject.html): Start and end of participation
2731* [RiskAssessment](riskassessment.html): When was assessment made?
2732* [SupplyRequest](supplyrequest.html): When the request was made
2733</b><br>
2734   * Type: <b>date</b><br>
2735   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2736   * </p>
2737   */
2738  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
2739  public static final String SP_DATE = "date";
2740 /**
2741   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2742   * <p>
2743   * Description: <b>Multiple Resources: 
2744
2745* [AdverseEvent](adverseevent.html): When the event occurred
2746* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2747* [Appointment](appointment.html): Appointment date/time.
2748* [AuditEvent](auditevent.html): Time when the event was recorded
2749* [CarePlan](careplan.html): Time period plan covers
2750* [CareTeam](careteam.html): A date within the coverage time period.
2751* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2752* [Composition](composition.html): Composition editing time
2753* [Consent](consent.html): When consent was agreed to
2754* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2755* [DocumentReference](documentreference.html): When this document reference was created
2756* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2757* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2758* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2759* [Flag](flag.html): Time period when flag is active
2760* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2761* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2762* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2763* [Invoice](invoice.html): Invoice date / posting date
2764* [List](list.html): When the list was prepared
2765* [MeasureReport](measurereport.html): The date of the measure report
2766* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2767* [Observation](observation.html): Clinically relevant time/time-period for observation
2768* [Procedure](procedure.html): When the procedure occurred or is occurring
2769* [ResearchSubject](researchsubject.html): Start and end of participation
2770* [RiskAssessment](riskassessment.html): When was assessment made?
2771* [SupplyRequest](supplyrequest.html): When the request was made
2772</b><br>
2773   * Type: <b>date</b><br>
2774   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2775   * </p>
2776   */
2777  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2778
2779 /**
2780   * Search parameter: <b>encounter</b>
2781   * <p>
2782   * Description: <b>Multiple Resources: 
2783
2784* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2785* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2786* [ChargeItem](chargeitem.html): Encounter associated with event
2787* [Claim](claim.html): Encounters associated with a billed line item
2788* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2789* [Communication](communication.html): The Encounter during which this Communication was created
2790* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2791* [Composition](composition.html): Context of the Composition
2792* [Condition](condition.html): The Encounter during which this Condition was created
2793* [DeviceRequest](devicerequest.html): Encounter during which request was created
2794* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2795* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2796* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2797* [Flag](flag.html): Alert relevant during encounter
2798* [ImagingStudy](imagingstudy.html): The context of the study
2799* [List](list.html): Context in which list created
2800* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2801* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2802* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2803* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2804* [Observation](observation.html): Encounter related to the observation
2805* [Procedure](procedure.html): The Encounter during which this Procedure was created
2806* [Provenance](provenance.html): Encounter related to the Provenance
2807* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2808* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2809* [RiskAssessment](riskassessment.html): Where was assessment performed?
2810* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2811* [Task](task.html): Search by encounter
2812* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2813</b><br>
2814   * Type: <b>reference</b><br>
2815   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2816   * </p>
2817   */
2818  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
2819  public static final String SP_ENCOUNTER = "encounter";
2820 /**
2821   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2822   * <p>
2823   * Description: <b>Multiple Resources: 
2824
2825* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2826* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2827* [ChargeItem](chargeitem.html): Encounter associated with event
2828* [Claim](claim.html): Encounters associated with a billed line item
2829* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2830* [Communication](communication.html): The Encounter during which this Communication was created
2831* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2832* [Composition](composition.html): Context of the Composition
2833* [Condition](condition.html): The Encounter during which this Condition was created
2834* [DeviceRequest](devicerequest.html): Encounter during which request was created
2835* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2836* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2837* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2838* [Flag](flag.html): Alert relevant during encounter
2839* [ImagingStudy](imagingstudy.html): The context of the study
2840* [List](list.html): Context in which list created
2841* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2842* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2843* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2844* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2845* [Observation](observation.html): Encounter related to the observation
2846* [Procedure](procedure.html): The Encounter during which this Procedure was created
2847* [Provenance](provenance.html): Encounter related to the Provenance
2848* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2849* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2850* [RiskAssessment](riskassessment.html): Where was assessment performed?
2851* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2852* [Task](task.html): Search by encounter
2853* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2854</b><br>
2855   * Type: <b>reference</b><br>
2856   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2857   * </p>
2858   */
2859  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2860
2861/**
2862   * Constant for fluent queries to be used to add include statements. Specifies
2863   * the path value of "<b>CarePlan:encounter</b>".
2864   */
2865  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("CarePlan:encounter").toLocked();
2866
2867 /**
2868   * Search parameter: <b>identifier</b>
2869   * <p>
2870   * Description: <b>Multiple Resources: 
2871
2872* [Account](account.html): Account number
2873* [AdverseEvent](adverseevent.html): Business identifier for the event
2874* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2875* [Appointment](appointment.html): An Identifier of the Appointment
2876* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2877* [Basic](basic.html): Business identifier
2878* [BodyStructure](bodystructure.html): Bodystructure identifier
2879* [CarePlan](careplan.html): External Ids for this plan
2880* [CareTeam](careteam.html): External Ids for this team
2881* [ChargeItem](chargeitem.html): Business Identifier for item
2882* [Claim](claim.html): The primary identifier of the financial resource
2883* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2884* [ClinicalImpression](clinicalimpression.html): Business identifier
2885* [Communication](communication.html): Unique identifier
2886* [CommunicationRequest](communicationrequest.html): Unique identifier
2887* [Composition](composition.html): Version-independent identifier for the Composition
2888* [Condition](condition.html): A unique identifier of the condition record
2889* [Consent](consent.html): Identifier for this record (external references)
2890* [Contract](contract.html): The identity of the contract
2891* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2892* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2893* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2894* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2895* [DeviceRequest](devicerequest.html): Business identifier for request/order
2896* [DeviceUsage](deviceusage.html): Search by identifier
2897* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2898* [DocumentReference](documentreference.html): Identifier of the attachment binary
2899* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2900* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2901* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2902* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2903* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2904* [Flag](flag.html): Business identifier
2905* [Goal](goal.html): External Ids for this goal
2906* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2907* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2908* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2909* [Immunization](immunization.html): Business identifier
2910* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2911* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2912* [Invoice](invoice.html): Business Identifier for item
2913* [List](list.html): Business identifier
2914* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2915* [Medication](medication.html): Returns medications with this external identifier
2916* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2917* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2918* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2919* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2920* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2921* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2922* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2923* [Observation](observation.html): The unique id for a particular observation
2924* [Person](person.html): A person Identifier
2925* [Procedure](procedure.html): A unique identifier for a procedure
2926* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2927* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2928* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2929* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2930* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2931* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2932* [Specimen](specimen.html): The unique identifier associated with the specimen
2933* [SupplyDelivery](supplydelivery.html): External identifier
2934* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2935* [Task](task.html): Search for a task instance by its business identifier
2936* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2937</b><br>
2938   * Type: <b>token</b><br>
2939   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2940   * </p>
2941   */
2942  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2943  public static final String SP_IDENTIFIER = "identifier";
2944 /**
2945   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2946   * <p>
2947   * Description: <b>Multiple Resources: 
2948
2949* [Account](account.html): Account number
2950* [AdverseEvent](adverseevent.html): Business identifier for the event
2951* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2952* [Appointment](appointment.html): An Identifier of the Appointment
2953* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2954* [Basic](basic.html): Business identifier
2955* [BodyStructure](bodystructure.html): Bodystructure identifier
2956* [CarePlan](careplan.html): External Ids for this plan
2957* [CareTeam](careteam.html): External Ids for this team
2958* [ChargeItem](chargeitem.html): Business Identifier for item
2959* [Claim](claim.html): The primary identifier of the financial resource
2960* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2961* [ClinicalImpression](clinicalimpression.html): Business identifier
2962* [Communication](communication.html): Unique identifier
2963* [CommunicationRequest](communicationrequest.html): Unique identifier
2964* [Composition](composition.html): Version-independent identifier for the Composition
2965* [Condition](condition.html): A unique identifier of the condition record
2966* [Consent](consent.html): Identifier for this record (external references)
2967* [Contract](contract.html): The identity of the contract
2968* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2969* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2970* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2971* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2972* [DeviceRequest](devicerequest.html): Business identifier for request/order
2973* [DeviceUsage](deviceusage.html): Search by identifier
2974* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2975* [DocumentReference](documentreference.html): Identifier of the attachment binary
2976* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2977* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2978* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2979* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2980* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2981* [Flag](flag.html): Business identifier
2982* [Goal](goal.html): External Ids for this goal
2983* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2984* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2985* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2986* [Immunization](immunization.html): Business identifier
2987* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2988* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2989* [Invoice](invoice.html): Business Identifier for item
2990* [List](list.html): Business identifier
2991* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2992* [Medication](medication.html): Returns medications with this external identifier
2993* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2994* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2995* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2996* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2997* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2998* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2999* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3000* [Observation](observation.html): The unique id for a particular observation
3001* [Person](person.html): A person Identifier
3002* [Procedure](procedure.html): A unique identifier for a procedure
3003* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3004* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3005* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3006* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3007* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3008* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3009* [Specimen](specimen.html): The unique identifier associated with the specimen
3010* [SupplyDelivery](supplydelivery.html): External identifier
3011* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3012* [Task](task.html): Search for a task instance by its business identifier
3013* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3014</b><br>
3015   * Type: <b>token</b><br>
3016   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
3017   * </p>
3018   */
3019  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3020
3021 /**
3022   * Search parameter: <b>patient</b>
3023   * <p>
3024   * Description: <b>Multiple Resources: 
3025
3026* [Account](account.html): The entity that caused the expenses
3027* [AdverseEvent](adverseevent.html): Subject impacted by event
3028* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3029* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3030* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3031* [AuditEvent](auditevent.html): Where the activity involved patient data
3032* [Basic](basic.html): Identifies the focus of this resource
3033* [BodyStructure](bodystructure.html): Who this is about
3034* [CarePlan](careplan.html): Who the care plan is for
3035* [CareTeam](careteam.html): Who care team is for
3036* [ChargeItem](chargeitem.html): Individual service was done for/to
3037* [Claim](claim.html): Patient receiving the products or services
3038* [ClaimResponse](claimresponse.html): The subject of care
3039* [ClinicalImpression](clinicalimpression.html): Patient assessed
3040* [Communication](communication.html): Focus of message
3041* [CommunicationRequest](communicationrequest.html): Focus of message
3042* [Composition](composition.html): Who and/or what the composition is about
3043* [Condition](condition.html): Who has the condition?
3044* [Consent](consent.html): Who the consent applies to
3045* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3046* [Coverage](coverage.html): Retrieve coverages for a patient
3047* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3048* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3049* [DetectedIssue](detectedissue.html): Associated patient
3050* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3051* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3052* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3053* [DocumentReference](documentreference.html): Who/what is the subject of the document
3054* [Encounter](encounter.html): The patient present at the encounter
3055* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3056* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3057* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3058* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3059* [Flag](flag.html): The identity of a subject to list flags for
3060* [Goal](goal.html): Who this goal is intended for
3061* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3062* [ImagingSelection](imagingselection.html): Who the study is about
3063* [ImagingStudy](imagingstudy.html): Who the study is about
3064* [Immunization](immunization.html): The patient for the vaccination record
3065* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3066* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3067* [Invoice](invoice.html): Recipient(s) of goods and services
3068* [List](list.html): If all resources have the same subject
3069* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3070* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3071* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3072* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3073* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3074* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3075* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3076* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3077* [Observation](observation.html): The subject that the observation is about (if patient)
3078* [Person](person.html): The Person links to this Patient
3079* [Procedure](procedure.html): Search by subject - a patient
3080* [Provenance](provenance.html): Where the activity involved patient data
3081* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3082* [RelatedPerson](relatedperson.html): The patient this related person is related to
3083* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3084* [ResearchSubject](researchsubject.html): Who or what is part of study
3085* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3086* [ServiceRequest](servicerequest.html): Search by subject - a patient
3087* [Specimen](specimen.html): The patient the specimen comes from
3088* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3089* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3090* [Task](task.html): Search by patient
3091* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3092</b><br>
3093   * Type: <b>reference</b><br>
3094   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
3095   * </p>
3096   */
3097  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
3098  public static final String SP_PATIENT = "patient";
3099 /**
3100   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3101   * <p>
3102   * Description: <b>Multiple Resources: 
3103
3104* [Account](account.html): The entity that caused the expenses
3105* [AdverseEvent](adverseevent.html): Subject impacted by event
3106* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3107* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3108* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3109* [AuditEvent](auditevent.html): Where the activity involved patient data
3110* [Basic](basic.html): Identifies the focus of this resource
3111* [BodyStructure](bodystructure.html): Who this is about
3112* [CarePlan](careplan.html): Who the care plan is for
3113* [CareTeam](careteam.html): Who care team is for
3114* [ChargeItem](chargeitem.html): Individual service was done for/to
3115* [Claim](claim.html): Patient receiving the products or services
3116* [ClaimResponse](claimresponse.html): The subject of care
3117* [ClinicalImpression](clinicalimpression.html): Patient assessed
3118* [Communication](communication.html): Focus of message
3119* [CommunicationRequest](communicationrequest.html): Focus of message
3120* [Composition](composition.html): Who and/or what the composition is about
3121* [Condition](condition.html): Who has the condition?
3122* [Consent](consent.html): Who the consent applies to
3123* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3124* [Coverage](coverage.html): Retrieve coverages for a patient
3125* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3126* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3127* [DetectedIssue](detectedissue.html): Associated patient
3128* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3129* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3130* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3131* [DocumentReference](documentreference.html): Who/what is the subject of the document
3132* [Encounter](encounter.html): The patient present at the encounter
3133* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3134* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3135* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3136* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3137* [Flag](flag.html): The identity of a subject to list flags for
3138* [Goal](goal.html): Who this goal is intended for
3139* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3140* [ImagingSelection](imagingselection.html): Who the study is about
3141* [ImagingStudy](imagingstudy.html): Who the study is about
3142* [Immunization](immunization.html): The patient for the vaccination record
3143* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3144* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3145* [Invoice](invoice.html): Recipient(s) of goods and services
3146* [List](list.html): If all resources have the same subject
3147* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3148* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3149* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3150* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3151* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3152* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3153* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3154* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3155* [Observation](observation.html): The subject that the observation is about (if patient)
3156* [Person](person.html): The Person links to this Patient
3157* [Procedure](procedure.html): Search by subject - a patient
3158* [Provenance](provenance.html): Where the activity involved patient data
3159* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3160* [RelatedPerson](relatedperson.html): The patient this related person is related to
3161* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3162* [ResearchSubject](researchsubject.html): Who or what is part of study
3163* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3164* [ServiceRequest](servicerequest.html): Search by subject - a patient
3165* [Specimen](specimen.html): The patient the specimen comes from
3166* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3167* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3168* [Task](task.html): Search by patient
3169* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3170</b><br>
3171   * Type: <b>reference</b><br>
3172   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
3173   * </p>
3174   */
3175  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3176
3177/**
3178   * Constant for fluent queries to be used to add include statements. Specifies
3179   * the path value of "<b>CarePlan:patient</b>".
3180   */
3181  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CarePlan:patient").toLocked();
3182
3183
3184}
3185