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