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 intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
052 */
053@ResourceDef(name="Goal", profile="http://hl7.org/fhir/StructureDefinition/Goal")
054public class Goal extends DomainResource {
055
056    public enum GoalLifecycleStatus {
057        /**
058         * A goal is proposed for this patient.
059         */
060        PROPOSED, 
061        /**
062         * A goal is planned for this patient.
063         */
064        PLANNED, 
065        /**
066         * A proposed goal was accepted or acknowledged.
067         */
068        ACCEPTED, 
069        /**
070         * The goal is being sought actively.
071         */
072        ACTIVE, 
073        /**
074         * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.
075         */
076        ONHOLD, 
077        /**
078         * The goal is no longer being sought.
079         */
080        COMPLETED, 
081        /**
082         * The goal has been abandoned.
083         */
084        CANCELLED, 
085        /**
086         * The goal was entered in error and voided.
087         */
088        ENTEREDINERROR, 
089        /**
090         * A proposed goal was rejected.
091         */
092        REJECTED, 
093        /**
094         * added to help the parsers with the generic types
095         */
096        NULL;
097        public static GoalLifecycleStatus fromCode(String codeString) throws FHIRException {
098            if (codeString == null || "".equals(codeString))
099                return null;
100        if ("proposed".equals(codeString))
101          return PROPOSED;
102        if ("planned".equals(codeString))
103          return PLANNED;
104        if ("accepted".equals(codeString))
105          return ACCEPTED;
106        if ("active".equals(codeString))
107          return ACTIVE;
108        if ("on-hold".equals(codeString))
109          return ONHOLD;
110        if ("completed".equals(codeString))
111          return COMPLETED;
112        if ("cancelled".equals(codeString))
113          return CANCELLED;
114        if ("entered-in-error".equals(codeString))
115          return ENTEREDINERROR;
116        if ("rejected".equals(codeString))
117          return REJECTED;
118        if (Configuration.isAcceptInvalidEnums())
119          return null;
120        else
121          throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'");
122        }
123        public String toCode() {
124          switch (this) {
125            case PROPOSED: return "proposed";
126            case PLANNED: return "planned";
127            case ACCEPTED: return "accepted";
128            case ACTIVE: return "active";
129            case ONHOLD: return "on-hold";
130            case COMPLETED: return "completed";
131            case CANCELLED: return "cancelled";
132            case ENTEREDINERROR: return "entered-in-error";
133            case REJECTED: return "rejected";
134            case NULL: return null;
135            default: return "?";
136          }
137        }
138        public String getSystem() {
139          switch (this) {
140            case PROPOSED: return "http://hl7.org/fhir/goal-status";
141            case PLANNED: return "http://hl7.org/fhir/goal-status";
142            case ACCEPTED: return "http://hl7.org/fhir/goal-status";
143            case ACTIVE: return "http://hl7.org/fhir/goal-status";
144            case ONHOLD: return "http://hl7.org/fhir/goal-status";
145            case COMPLETED: return "http://hl7.org/fhir/goal-status";
146            case CANCELLED: return "http://hl7.org/fhir/goal-status";
147            case ENTEREDINERROR: return "http://hl7.org/fhir/goal-status";
148            case REJECTED: return "http://hl7.org/fhir/goal-status";
149            case NULL: return null;
150            default: return "?";
151          }
152        }
153        public String getDefinition() {
154          switch (this) {
155            case PROPOSED: return "A goal is proposed for this patient.";
156            case PLANNED: return "A goal is planned for this patient.";
157            case ACCEPTED: return "A proposed goal was accepted or acknowledged.";
158            case ACTIVE: return "The goal is being sought actively.";
159            case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.";
160            case COMPLETED: return "The goal is no longer being sought.";
161            case CANCELLED: return "The goal has been abandoned.";
162            case ENTEREDINERROR: return "The goal was entered in error and voided.";
163            case REJECTED: return "A proposed goal was rejected.";
164            case NULL: return null;
165            default: return "?";
166          }
167        }
168        public String getDisplay() {
169          switch (this) {
170            case PROPOSED: return "Proposed";
171            case PLANNED: return "Planned";
172            case ACCEPTED: return "Accepted";
173            case ACTIVE: return "Active";
174            case ONHOLD: return "On Hold";
175            case COMPLETED: return "Completed";
176            case CANCELLED: return "Cancelled";
177            case ENTEREDINERROR: return "Entered in Error";
178            case REJECTED: return "Rejected";
179            case NULL: return null;
180            default: return "?";
181          }
182        }
183    }
184
185  public static class GoalLifecycleStatusEnumFactory implements EnumFactory<GoalLifecycleStatus> {
186    public GoalLifecycleStatus fromCode(String codeString) throws IllegalArgumentException {
187      if (codeString == null || "".equals(codeString))
188            if (codeString == null || "".equals(codeString))
189                return null;
190        if ("proposed".equals(codeString))
191          return GoalLifecycleStatus.PROPOSED;
192        if ("planned".equals(codeString))
193          return GoalLifecycleStatus.PLANNED;
194        if ("accepted".equals(codeString))
195          return GoalLifecycleStatus.ACCEPTED;
196        if ("active".equals(codeString))
197          return GoalLifecycleStatus.ACTIVE;
198        if ("on-hold".equals(codeString))
199          return GoalLifecycleStatus.ONHOLD;
200        if ("completed".equals(codeString))
201          return GoalLifecycleStatus.COMPLETED;
202        if ("cancelled".equals(codeString))
203          return GoalLifecycleStatus.CANCELLED;
204        if ("entered-in-error".equals(codeString))
205          return GoalLifecycleStatus.ENTEREDINERROR;
206        if ("rejected".equals(codeString))
207          return GoalLifecycleStatus.REJECTED;
208        throw new IllegalArgumentException("Unknown GoalLifecycleStatus code '"+codeString+"'");
209        }
210        public Enumeration<GoalLifecycleStatus> fromType(PrimitiveType<?> code) throws FHIRException {
211          if (code == null)
212            return null;
213          if (code.isEmpty())
214            return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.NULL, code);
215          String codeString = ((PrimitiveType) code).asStringValue();
216          if (codeString == null || "".equals(codeString))
217            return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.NULL, code);
218        if ("proposed".equals(codeString))
219          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PROPOSED, code);
220        if ("planned".equals(codeString))
221          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PLANNED, code);
222        if ("accepted".equals(codeString))
223          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACCEPTED, code);
224        if ("active".equals(codeString))
225          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACTIVE, code);
226        if ("on-hold".equals(codeString))
227          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ONHOLD, code);
228        if ("completed".equals(codeString))
229          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.COMPLETED, code);
230        if ("cancelled".equals(codeString))
231          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.CANCELLED, code);
232        if ("entered-in-error".equals(codeString))
233          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ENTEREDINERROR, code);
234        if ("rejected".equals(codeString))
235          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.REJECTED, code);
236        throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'");
237        }
238    public String toCode(GoalLifecycleStatus code) {
239      if (code == GoalLifecycleStatus.PROPOSED)
240        return "proposed";
241      if (code == GoalLifecycleStatus.PLANNED)
242        return "planned";
243      if (code == GoalLifecycleStatus.ACCEPTED)
244        return "accepted";
245      if (code == GoalLifecycleStatus.ACTIVE)
246        return "active";
247      if (code == GoalLifecycleStatus.ONHOLD)
248        return "on-hold";
249      if (code == GoalLifecycleStatus.COMPLETED)
250        return "completed";
251      if (code == GoalLifecycleStatus.CANCELLED)
252        return "cancelled";
253      if (code == GoalLifecycleStatus.ENTEREDINERROR)
254        return "entered-in-error";
255      if (code == GoalLifecycleStatus.REJECTED)
256        return "rejected";
257      return "?";
258      }
259    public String toSystem(GoalLifecycleStatus code) {
260      return code.getSystem();
261      }
262    }
263
264    @Block()
265    public static class GoalTargetComponent extends BackboneElement implements IBaseBackboneElement {
266        /**
267         * The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.
268         */
269        @Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
270        @Description(shortDefinition="The parameter whose value is being tracked", formalDefinition="The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." )
271        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
272        protected CodeableConcept measure;
273
274        /**
275         * The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.
276         */
277        @Child(name = "detail", type = {Quantity.class, Range.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Ratio.class}, order=2, min=0, max=1, modifier=false, summary=true)
278        @Description(shortDefinition="The target value to be achieved", formalDefinition="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value." )
279        protected DataType detail;
280
281        /**
282         * Indicates either the date or the duration after start by which the goal should be met.
283         */
284        @Child(name = "due", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true)
285        @Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." )
286        protected DataType due;
287
288        private static final long serialVersionUID = 1975697830L;
289
290    /**
291     * Constructor
292     */
293      public GoalTargetComponent() {
294        super();
295      }
296
297        /**
298         * @return {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.)
299         */
300        public CodeableConcept getMeasure() { 
301          if (this.measure == null)
302            if (Configuration.errorOnAutoCreate())
303              throw new Error("Attempt to auto-create GoalTargetComponent.measure");
304            else if (Configuration.doAutoCreate())
305              this.measure = new CodeableConcept(); // cc
306          return this.measure;
307        }
308
309        public boolean hasMeasure() { 
310          return this.measure != null && !this.measure.isEmpty();
311        }
312
313        /**
314         * @param value {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.)
315         */
316        public GoalTargetComponent setMeasure(CodeableConcept value) { 
317          this.measure = value;
318          return this;
319        }
320
321        /**
322         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
323         */
324        public DataType getDetail() { 
325          return this.detail;
326        }
327
328        /**
329         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
330         */
331        public Quantity getDetailQuantity() throws FHIRException { 
332          if (this.detail == null)
333            this.detail = new Quantity();
334          if (!(this.detail instanceof Quantity))
335            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered");
336          return (Quantity) this.detail;
337        }
338
339        public boolean hasDetailQuantity() { 
340          return this != null && this.detail instanceof Quantity;
341        }
342
343        /**
344         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
345         */
346        public Range getDetailRange() throws FHIRException { 
347          if (this.detail == null)
348            this.detail = new Range();
349          if (!(this.detail instanceof Range))
350            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered");
351          return (Range) this.detail;
352        }
353
354        public boolean hasDetailRange() { 
355          return this != null && this.detail instanceof Range;
356        }
357
358        /**
359         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
360         */
361        public CodeableConcept getDetailCodeableConcept() throws FHIRException { 
362          if (this.detail == null)
363            this.detail = new CodeableConcept();
364          if (!(this.detail instanceof CodeableConcept))
365            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered");
366          return (CodeableConcept) this.detail;
367        }
368
369        public boolean hasDetailCodeableConcept() { 
370          return this != null && this.detail instanceof CodeableConcept;
371        }
372
373        /**
374         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
375         */
376        public StringType getDetailStringType() throws FHIRException { 
377          if (this.detail == null)
378            this.detail = new StringType();
379          if (!(this.detail instanceof StringType))
380            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.detail.getClass().getName()+" was encountered");
381          return (StringType) this.detail;
382        }
383
384        public boolean hasDetailStringType() { 
385          return this != null && this.detail instanceof StringType;
386        }
387
388        /**
389         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
390         */
391        public BooleanType getDetailBooleanType() throws FHIRException { 
392          if (this.detail == null)
393            this.detail = new BooleanType();
394          if (!(this.detail instanceof BooleanType))
395            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.detail.getClass().getName()+" was encountered");
396          return (BooleanType) this.detail;
397        }
398
399        public boolean hasDetailBooleanType() { 
400          return this != null && this.detail instanceof BooleanType;
401        }
402
403        /**
404         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
405         */
406        public IntegerType getDetailIntegerType() throws FHIRException { 
407          if (this.detail == null)
408            this.detail = new IntegerType();
409          if (!(this.detail instanceof IntegerType))
410            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.detail.getClass().getName()+" was encountered");
411          return (IntegerType) this.detail;
412        }
413
414        public boolean hasDetailIntegerType() { 
415          return this != null && this.detail instanceof IntegerType;
416        }
417
418        /**
419         * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
420         */
421        public Ratio getDetailRatio() throws FHIRException { 
422          if (this.detail == null)
423            this.detail = new Ratio();
424          if (!(this.detail instanceof Ratio))
425            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.detail.getClass().getName()+" was encountered");
426          return (Ratio) this.detail;
427        }
428
429        public boolean hasDetailRatio() { 
430          return this != null && this.detail instanceof Ratio;
431        }
432
433        public boolean hasDetail() { 
434          return this.detail != null && !this.detail.isEmpty();
435        }
436
437        /**
438         * @param value {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.)
439         */
440        public GoalTargetComponent setDetail(DataType value) { 
441          if (value != null && !(value instanceof Quantity || value instanceof Range || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Ratio))
442            throw new FHIRException("Not the right type for Goal.target.detail[x]: "+value.fhirType());
443          this.detail = value;
444          return this;
445        }
446
447        /**
448         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
449         */
450        public DataType getDue() { 
451          return this.due;
452        }
453
454        /**
455         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
456         */
457        public DateType getDueDateType() throws FHIRException { 
458          if (this.due == null)
459            this.due = new DateType();
460          if (!(this.due instanceof DateType))
461            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.due.getClass().getName()+" was encountered");
462          return (DateType) this.due;
463        }
464
465        public boolean hasDueDateType() { 
466          return this != null && this.due instanceof DateType;
467        }
468
469        /**
470         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
471         */
472        public Duration getDueDuration() throws FHIRException { 
473          if (this.due == null)
474            this.due = new Duration();
475          if (!(this.due instanceof Duration))
476            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.due.getClass().getName()+" was encountered");
477          return (Duration) this.due;
478        }
479
480        public boolean hasDueDuration() { 
481          return this != null && this.due instanceof Duration;
482        }
483
484        public boolean hasDue() { 
485          return this.due != null && !this.due.isEmpty();
486        }
487
488        /**
489         * @param value {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
490         */
491        public GoalTargetComponent setDue(DataType value) { 
492          if (value != null && !(value instanceof DateType || value instanceof Duration))
493            throw new FHIRException("Not the right type for Goal.target.due[x]: "+value.fhirType());
494          this.due = value;
495          return this;
496        }
497
498        protected void listChildren(List<Property> children) {
499          super.listChildren(children);
500          children.add(new Property("measure", "CodeableConcept", "The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure));
501          children.add(new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail));
502          children.add(new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due));
503        }
504
505        @Override
506        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
507          switch (_hash) {
508          case 938321246: /*measure*/  return new Property("measure", "CodeableConcept", "The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure);
509          case -1973084529: /*detail[x]*/  return new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
510          case -1335224239: /*detail*/  return new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
511          case -1313079300: /*detailQuantity*/  return new Property("detail[x]", "Quantity", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
512          case -2062632084: /*detailRange*/  return new Property("detail[x]", "Range", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
513          case -175586544: /*detailCodeableConcept*/  return new Property("detail[x]", "CodeableConcept", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
514          case 529212354: /*detailString*/  return new Property("detail[x]", "string", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
515          case 1172184727: /*detailBoolean*/  return new Property("detail[x]", "boolean", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
516          case -1229442131: /*detailInteger*/  return new Property("detail[x]", "integer", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
517          case -2062626246: /*detailRatio*/  return new Property("detail[x]", "Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail);
518          case -1320900084: /*due[x]*/  return new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due);
519          case 99828: /*due*/  return new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due);
520          case 2001063874: /*dueDate*/  return new Property("due[x]", "date", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due);
521          case -620428376: /*dueDuration*/  return new Property("due[x]", "Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due);
522          default: return super.getNamedProperty(_hash, _name, _checkValid);
523          }
524
525        }
526
527      @Override
528      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
529        switch (hash) {
530        case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept
531        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // DataType
532        case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // DataType
533        default: return super.getProperty(hash, name, checkValid);
534        }
535
536      }
537
538      @Override
539      public Base setProperty(int hash, String name, Base value) throws FHIRException {
540        switch (hash) {
541        case 938321246: // measure
542          this.measure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
543          return value;
544        case -1335224239: // detail
545          this.detail = TypeConvertor.castToType(value); // DataType
546          return value;
547        case 99828: // due
548          this.due = TypeConvertor.castToType(value); // DataType
549          return value;
550        default: return super.setProperty(hash, name, value);
551        }
552
553      }
554
555      @Override
556      public Base setProperty(String name, Base value) throws FHIRException {
557        if (name.equals("measure")) {
558          this.measure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
559        } else if (name.equals("detail[x]")) {
560          this.detail = TypeConvertor.castToType(value); // DataType
561        } else if (name.equals("due[x]")) {
562          this.due = TypeConvertor.castToType(value); // DataType
563        } else
564          return super.setProperty(name, value);
565        return value;
566      }
567
568  @Override
569  public void removeChild(String name, Base value) throws FHIRException {
570        if (name.equals("measure")) {
571          this.measure = null;
572        } else if (name.equals("detail[x]")) {
573          this.detail = null;
574        } else if (name.equals("due[x]")) {
575          this.due = null;
576        } else
577          super.removeChild(name, value);
578        
579      }
580
581      @Override
582      public Base makeProperty(int hash, String name) throws FHIRException {
583        switch (hash) {
584        case 938321246:  return getMeasure();
585        case -1973084529:  return getDetail();
586        case -1335224239:  return getDetail();
587        case -1320900084:  return getDue();
588        case 99828:  return getDue();
589        default: return super.makeProperty(hash, name);
590        }
591
592      }
593
594      @Override
595      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
596        switch (hash) {
597        case 938321246: /*measure*/ return new String[] {"CodeableConcept"};
598        case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept", "string", "boolean", "integer", "Ratio"};
599        case 99828: /*due*/ return new String[] {"date", "Duration"};
600        default: return super.getTypesForProperty(hash, name);
601        }
602
603      }
604
605      @Override
606      public Base addChild(String name) throws FHIRException {
607        if (name.equals("measure")) {
608          this.measure = new CodeableConcept();
609          return this.measure;
610        }
611        else if (name.equals("detailQuantity")) {
612          this.detail = new Quantity();
613          return this.detail;
614        }
615        else if (name.equals("detailRange")) {
616          this.detail = new Range();
617          return this.detail;
618        }
619        else if (name.equals("detailCodeableConcept")) {
620          this.detail = new CodeableConcept();
621          return this.detail;
622        }
623        else if (name.equals("detailString")) {
624          this.detail = new StringType();
625          return this.detail;
626        }
627        else if (name.equals("detailBoolean")) {
628          this.detail = new BooleanType();
629          return this.detail;
630        }
631        else if (name.equals("detailInteger")) {
632          this.detail = new IntegerType();
633          return this.detail;
634        }
635        else if (name.equals("detailRatio")) {
636          this.detail = new Ratio();
637          return this.detail;
638        }
639        else if (name.equals("dueDate")) {
640          this.due = new DateType();
641          return this.due;
642        }
643        else if (name.equals("dueDuration")) {
644          this.due = new Duration();
645          return this.due;
646        }
647        else
648          return super.addChild(name);
649      }
650
651      public GoalTargetComponent copy() {
652        GoalTargetComponent dst = new GoalTargetComponent();
653        copyValues(dst);
654        return dst;
655      }
656
657      public void copyValues(GoalTargetComponent dst) {
658        super.copyValues(dst);
659        dst.measure = measure == null ? null : measure.copy();
660        dst.detail = detail == null ? null : detail.copy();
661        dst.due = due == null ? null : due.copy();
662      }
663
664      @Override
665      public boolean equalsDeep(Base other_) {
666        if (!super.equalsDeep(other_))
667          return false;
668        if (!(other_ instanceof GoalTargetComponent))
669          return false;
670        GoalTargetComponent o = (GoalTargetComponent) other_;
671        return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true)
672          ;
673      }
674
675      @Override
676      public boolean equalsShallow(Base other_) {
677        if (!super.equalsShallow(other_))
678          return false;
679        if (!(other_ instanceof GoalTargetComponent))
680          return false;
681        GoalTargetComponent o = (GoalTargetComponent) other_;
682        return true;
683      }
684
685      public boolean isEmpty() {
686        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due);
687      }
688
689  public String fhirType() {
690    return "Goal.target";
691
692  }
693
694  }
695
696    /**
697     * Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
698     */
699    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
700    @Description(shortDefinition="External Ids for this goal", formalDefinition="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
701    protected List<Identifier> identifier;
702
703    /**
704     * The state of the goal throughout its lifecycle.
705     */
706    @Child(name = "lifecycleStatus", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
707    @Description(shortDefinition="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", formalDefinition="The state of the goal throughout its lifecycle." )
708    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-status")
709    protected Enumeration<GoalLifecycleStatus> lifecycleStatus;
710
711    /**
712     * Describes the progression, or lack thereof, towards the goal against the target.
713     */
714    @Child(name = "achievementStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
715    @Description(shortDefinition="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", formalDefinition="Describes the progression, or lack thereof, towards the goal against the target." )
716    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-achievement")
717    protected CodeableConcept achievementStatus;
718
719    /**
720     * Indicates a category the goal falls within.
721     */
722    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
723    @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc", formalDefinition="Indicates a category the goal falls within." )
724    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category")
725    protected List<CodeableConcept> category;
726
727    /**
728     * After meeting the goal, ongoing activity is needed to sustain the goal objective.
729     */
730    @Child(name = "continuous", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false)
731    @Description(shortDefinition="After meeting the goal, ongoing activity is needed to sustain the goal objective", formalDefinition="After meeting the goal, ongoing activity is needed to sustain the goal objective." )
732    protected BooleanType continuous;
733
734    /**
735     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.
736     */
737    @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
738    @Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." )
739    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority")
740    protected CodeableConcept priority;
741
742    /**
743     * Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".
744     */
745    @Child(name = "description", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true)
746    @Description(shortDefinition="Code or text describing goal", formalDefinition="Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\"." )
747    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
748    protected CodeableConcept description;
749
750    /**
751     * Identifies the patient, group or organization for whom the goal is being established.
752     */
753    @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=7, min=1, max=1, modifier=false, summary=true)
754    @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." )
755    protected Reference subject;
756
757    /**
758     * The date or event after which the goal should begin being pursued.
759     */
760    @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
761    @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." )
762    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event")
763    protected DataType start;
764
765    /**
766     * Indicates what should be done by when.
767     */
768    @Child(name = "target", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
769    @Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done by when." )
770    protected List<GoalTargetComponent> target;
771
772    /**
773     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
774     */
775    @Child(name = "statusDate", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=true)
776    @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc." )
777    protected DateType statusDate;
778
779    /**
780     * Captures the reason for the current status.
781     */
782    @Child(name = "statusReason", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
783    @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." )
784    protected StringType statusReason;
785
786    /**
787     * Indicates whose goal this is - patient goal, practitioner goal, etc.
788     */
789    @Child(name = "source", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, CareTeam.class}, order=12, min=0, max=1, modifier=false, summary=true)
790    @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." )
791    protected Reference source;
792
793    /**
794     * The identified conditions and other health record elements that are intended to be addressed by the goal.
795     */
796    @Child(name = "addresses", type = {Condition.class, Observation.class, MedicationStatement.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class, RiskAssessment.class, Procedure.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
797    @Description(shortDefinition="Issues addressed by this goal", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." )
798    protected List<Reference> addresses;
799
800    /**
801     * Any comments related to the goal.
802     */
803    @Child(name = "note", type = {Annotation.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
804    @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." )
805    protected List<Annotation> note;
806
807    /**
808     * Identifies the change (or lack of change) at the point when the status of the goal is assessed.
809     */
810    @Child(name = "outcome", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
811    @Description(shortDefinition="What result was achieved regarding the goal?", formalDefinition="Identifies the change (or lack of change) at the point when the status of the goal is assessed." )
812    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
813    protected List<CodeableReference> outcome;
814
815    private static final long serialVersionUID = -884300976L;
816
817  /**
818   * Constructor
819   */
820    public Goal() {
821      super();
822    }
823
824  /**
825   * Constructor
826   */
827    public Goal(GoalLifecycleStatus lifecycleStatus, CodeableConcept description, Reference subject) {
828      super();
829      this.setLifecycleStatus(lifecycleStatus);
830      this.setDescription(description);
831      this.setSubject(subject);
832    }
833
834    /**
835     * @return {@link #identifier} (Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
836     */
837    public List<Identifier> getIdentifier() { 
838      if (this.identifier == null)
839        this.identifier = new ArrayList<Identifier>();
840      return this.identifier;
841    }
842
843    /**
844     * @return Returns a reference to <code>this</code> for easy method chaining
845     */
846    public Goal setIdentifier(List<Identifier> theIdentifier) { 
847      this.identifier = theIdentifier;
848      return this;
849    }
850
851    public boolean hasIdentifier() { 
852      if (this.identifier == null)
853        return false;
854      for (Identifier item : this.identifier)
855        if (!item.isEmpty())
856          return true;
857      return false;
858    }
859
860    public Identifier addIdentifier() { //3
861      Identifier t = new Identifier();
862      if (this.identifier == null)
863        this.identifier = new ArrayList<Identifier>();
864      this.identifier.add(t);
865      return t;
866    }
867
868    public Goal addIdentifier(Identifier t) { //3
869      if (t == null)
870        return this;
871      if (this.identifier == null)
872        this.identifier = new ArrayList<Identifier>();
873      this.identifier.add(t);
874      return this;
875    }
876
877    /**
878     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
879     */
880    public Identifier getIdentifierFirstRep() { 
881      if (getIdentifier().isEmpty()) {
882        addIdentifier();
883      }
884      return getIdentifier().get(0);
885    }
886
887    /**
888     * @return {@link #lifecycleStatus} (The state of the goal throughout its lifecycle.). This is the underlying object with id, value and extensions. The accessor "getLifecycleStatus" gives direct access to the value
889     */
890    public Enumeration<GoalLifecycleStatus> getLifecycleStatusElement() { 
891      if (this.lifecycleStatus == null)
892        if (Configuration.errorOnAutoCreate())
893          throw new Error("Attempt to auto-create Goal.lifecycleStatus");
894        else if (Configuration.doAutoCreate())
895          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory()); // bb
896      return this.lifecycleStatus;
897    }
898
899    public boolean hasLifecycleStatusElement() { 
900      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
901    }
902
903    public boolean hasLifecycleStatus() { 
904      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
905    }
906
907    /**
908     * @param value {@link #lifecycleStatus} (The state of the goal throughout its lifecycle.). This is the underlying object with id, value and extensions. The accessor "getLifecycleStatus" gives direct access to the value
909     */
910    public Goal setLifecycleStatusElement(Enumeration<GoalLifecycleStatus> value) { 
911      this.lifecycleStatus = value;
912      return this;
913    }
914
915    /**
916     * @return The state of the goal throughout its lifecycle.
917     */
918    public GoalLifecycleStatus getLifecycleStatus() { 
919      return this.lifecycleStatus == null ? null : this.lifecycleStatus.getValue();
920    }
921
922    /**
923     * @param value The state of the goal throughout its lifecycle.
924     */
925    public Goal setLifecycleStatus(GoalLifecycleStatus value) { 
926        if (this.lifecycleStatus == null)
927          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory());
928        this.lifecycleStatus.setValue(value);
929      return this;
930    }
931
932    /**
933     * @return {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
934     */
935    public CodeableConcept getAchievementStatus() { 
936      if (this.achievementStatus == null)
937        if (Configuration.errorOnAutoCreate())
938          throw new Error("Attempt to auto-create Goal.achievementStatus");
939        else if (Configuration.doAutoCreate())
940          this.achievementStatus = new CodeableConcept(); // cc
941      return this.achievementStatus;
942    }
943
944    public boolean hasAchievementStatus() { 
945      return this.achievementStatus != null && !this.achievementStatus.isEmpty();
946    }
947
948    /**
949     * @param value {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
950     */
951    public Goal setAchievementStatus(CodeableConcept value) { 
952      this.achievementStatus = value;
953      return this;
954    }
955
956    /**
957     * @return {@link #category} (Indicates a category the goal falls within.)
958     */
959    public List<CodeableConcept> getCategory() { 
960      if (this.category == null)
961        this.category = new ArrayList<CodeableConcept>();
962      return this.category;
963    }
964
965    /**
966     * @return Returns a reference to <code>this</code> for easy method chaining
967     */
968    public Goal setCategory(List<CodeableConcept> theCategory) { 
969      this.category = theCategory;
970      return this;
971    }
972
973    public boolean hasCategory() { 
974      if (this.category == null)
975        return false;
976      for (CodeableConcept item : this.category)
977        if (!item.isEmpty())
978          return true;
979      return false;
980    }
981
982    public CodeableConcept addCategory() { //3
983      CodeableConcept t = new CodeableConcept();
984      if (this.category == null)
985        this.category = new ArrayList<CodeableConcept>();
986      this.category.add(t);
987      return t;
988    }
989
990    public Goal addCategory(CodeableConcept t) { //3
991      if (t == null)
992        return this;
993      if (this.category == null)
994        this.category = new ArrayList<CodeableConcept>();
995      this.category.add(t);
996      return this;
997    }
998
999    /**
1000     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
1001     */
1002    public CodeableConcept getCategoryFirstRep() { 
1003      if (getCategory().isEmpty()) {
1004        addCategory();
1005      }
1006      return getCategory().get(0);
1007    }
1008
1009    /**
1010     * @return {@link #continuous} (After meeting the goal, ongoing activity is needed to sustain the goal objective.). This is the underlying object with id, value and extensions. The accessor "getContinuous" gives direct access to the value
1011     */
1012    public BooleanType getContinuousElement() { 
1013      if (this.continuous == null)
1014        if (Configuration.errorOnAutoCreate())
1015          throw new Error("Attempt to auto-create Goal.continuous");
1016        else if (Configuration.doAutoCreate())
1017          this.continuous = new BooleanType(); // bb
1018      return this.continuous;
1019    }
1020
1021    public boolean hasContinuousElement() { 
1022      return this.continuous != null && !this.continuous.isEmpty();
1023    }
1024
1025    public boolean hasContinuous() { 
1026      return this.continuous != null && !this.continuous.isEmpty();
1027    }
1028
1029    /**
1030     * @param value {@link #continuous} (After meeting the goal, ongoing activity is needed to sustain the goal objective.). This is the underlying object with id, value and extensions. The accessor "getContinuous" gives direct access to the value
1031     */
1032    public Goal setContinuousElement(BooleanType value) { 
1033      this.continuous = value;
1034      return this;
1035    }
1036
1037    /**
1038     * @return After meeting the goal, ongoing activity is needed to sustain the goal objective.
1039     */
1040    public boolean getContinuous() { 
1041      return this.continuous == null || this.continuous.isEmpty() ? false : this.continuous.getValue();
1042    }
1043
1044    /**
1045     * @param value After meeting the goal, ongoing activity is needed to sustain the goal objective.
1046     */
1047    public Goal setContinuous(boolean value) { 
1048        if (this.continuous == null)
1049          this.continuous = new BooleanType();
1050        this.continuous.setValue(value);
1051      return this;
1052    }
1053
1054    /**
1055     * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1056     */
1057    public CodeableConcept getPriority() { 
1058      if (this.priority == null)
1059        if (Configuration.errorOnAutoCreate())
1060          throw new Error("Attempt to auto-create Goal.priority");
1061        else if (Configuration.doAutoCreate())
1062          this.priority = new CodeableConcept(); // cc
1063      return this.priority;
1064    }
1065
1066    public boolean hasPriority() { 
1067      return this.priority != null && !this.priority.isEmpty();
1068    }
1069
1070    /**
1071     * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1072     */
1073    public Goal setPriority(CodeableConcept value) { 
1074      this.priority = value;
1075      return this;
1076    }
1077
1078    /**
1079     * @return {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".)
1080     */
1081    public CodeableConcept getDescription() { 
1082      if (this.description == null)
1083        if (Configuration.errorOnAutoCreate())
1084          throw new Error("Attempt to auto-create Goal.description");
1085        else if (Configuration.doAutoCreate())
1086          this.description = new CodeableConcept(); // cc
1087      return this.description;
1088    }
1089
1090    public boolean hasDescription() { 
1091      return this.description != null && !this.description.isEmpty();
1092    }
1093
1094    /**
1095     * @param value {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".)
1096     */
1097    public Goal setDescription(CodeableConcept value) { 
1098      this.description = value;
1099      return this;
1100    }
1101
1102    /**
1103     * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1104     */
1105    public Reference getSubject() { 
1106      if (this.subject == null)
1107        if (Configuration.errorOnAutoCreate())
1108          throw new Error("Attempt to auto-create Goal.subject");
1109        else if (Configuration.doAutoCreate())
1110          this.subject = new Reference(); // cc
1111      return this.subject;
1112    }
1113
1114    public boolean hasSubject() { 
1115      return this.subject != null && !this.subject.isEmpty();
1116    }
1117
1118    /**
1119     * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1120     */
1121    public Goal setSubject(Reference value) { 
1122      this.subject = value;
1123      return this;
1124    }
1125
1126    /**
1127     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1128     */
1129    public DataType getStart() { 
1130      return this.start;
1131    }
1132
1133    /**
1134     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1135     */
1136    public DateType getStartDateType() throws FHIRException { 
1137      if (this.start == null)
1138        this.start = new DateType();
1139      if (!(this.start instanceof DateType))
1140        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered");
1141      return (DateType) this.start;
1142    }
1143
1144    public boolean hasStartDateType() { 
1145      return this != null && this.start instanceof DateType;
1146    }
1147
1148    /**
1149     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1150     */
1151    public CodeableConcept getStartCodeableConcept() throws FHIRException { 
1152      if (this.start == null)
1153        this.start = new CodeableConcept();
1154      if (!(this.start instanceof CodeableConcept))
1155        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered");
1156      return (CodeableConcept) this.start;
1157    }
1158
1159    public boolean hasStartCodeableConcept() { 
1160      return this != null && this.start instanceof CodeableConcept;
1161    }
1162
1163    public boolean hasStart() { 
1164      return this.start != null && !this.start.isEmpty();
1165    }
1166
1167    /**
1168     * @param value {@link #start} (The date or event after which the goal should begin being pursued.)
1169     */
1170    public Goal setStart(DataType value) { 
1171      if (value != null && !(value instanceof DateType || value instanceof CodeableConcept))
1172        throw new FHIRException("Not the right type for Goal.start[x]: "+value.fhirType());
1173      this.start = value;
1174      return this;
1175    }
1176
1177    /**
1178     * @return {@link #target} (Indicates what should be done by when.)
1179     */
1180    public List<GoalTargetComponent> getTarget() { 
1181      if (this.target == null)
1182        this.target = new ArrayList<GoalTargetComponent>();
1183      return this.target;
1184    }
1185
1186    /**
1187     * @return Returns a reference to <code>this</code> for easy method chaining
1188     */
1189    public Goal setTarget(List<GoalTargetComponent> theTarget) { 
1190      this.target = theTarget;
1191      return this;
1192    }
1193
1194    public boolean hasTarget() { 
1195      if (this.target == null)
1196        return false;
1197      for (GoalTargetComponent item : this.target)
1198        if (!item.isEmpty())
1199          return true;
1200      return false;
1201    }
1202
1203    public GoalTargetComponent addTarget() { //3
1204      GoalTargetComponent t = new GoalTargetComponent();
1205      if (this.target == null)
1206        this.target = new ArrayList<GoalTargetComponent>();
1207      this.target.add(t);
1208      return t;
1209    }
1210
1211    public Goal addTarget(GoalTargetComponent t) { //3
1212      if (t == null)
1213        return this;
1214      if (this.target == null)
1215        this.target = new ArrayList<GoalTargetComponent>();
1216      this.target.add(t);
1217      return this;
1218    }
1219
1220    /**
1221     * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist {3}
1222     */
1223    public GoalTargetComponent getTargetFirstRep() { 
1224      if (getTarget().isEmpty()) {
1225        addTarget();
1226      }
1227      return getTarget().get(0);
1228    }
1229
1230    /**
1231     * @return {@link #statusDate} (Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value
1232     */
1233    public DateType getStatusDateElement() { 
1234      if (this.statusDate == null)
1235        if (Configuration.errorOnAutoCreate())
1236          throw new Error("Attempt to auto-create Goal.statusDate");
1237        else if (Configuration.doAutoCreate())
1238          this.statusDate = new DateType(); // bb
1239      return this.statusDate;
1240    }
1241
1242    public boolean hasStatusDateElement() { 
1243      return this.statusDate != null && !this.statusDate.isEmpty();
1244    }
1245
1246    public boolean hasStatusDate() { 
1247      return this.statusDate != null && !this.statusDate.isEmpty();
1248    }
1249
1250    /**
1251     * @param value {@link #statusDate} (Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value
1252     */
1253    public Goal setStatusDateElement(DateType value) { 
1254      this.statusDate = value;
1255      return this;
1256    }
1257
1258    /**
1259     * @return Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1260     */
1261    public Date getStatusDate() { 
1262      return this.statusDate == null ? null : this.statusDate.getValue();
1263    }
1264
1265    /**
1266     * @param value Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1267     */
1268    public Goal setStatusDate(Date value) { 
1269      if (value == null)
1270        this.statusDate = null;
1271      else {
1272        if (this.statusDate == null)
1273          this.statusDate = new DateType();
1274        this.statusDate.setValue(value);
1275      }
1276      return this;
1277    }
1278
1279    /**
1280     * @return {@link #statusReason} (Captures the reason for the current status.). This is the underlying object with id, value and extensions. The accessor "getStatusReason" gives direct access to the value
1281     */
1282    public StringType getStatusReasonElement() { 
1283      if (this.statusReason == null)
1284        if (Configuration.errorOnAutoCreate())
1285          throw new Error("Attempt to auto-create Goal.statusReason");
1286        else if (Configuration.doAutoCreate())
1287          this.statusReason = new StringType(); // bb
1288      return this.statusReason;
1289    }
1290
1291    public boolean hasStatusReasonElement() { 
1292      return this.statusReason != null && !this.statusReason.isEmpty();
1293    }
1294
1295    public boolean hasStatusReason() { 
1296      return this.statusReason != null && !this.statusReason.isEmpty();
1297    }
1298
1299    /**
1300     * @param value {@link #statusReason} (Captures the reason for the current status.). This is the underlying object with id, value and extensions. The accessor "getStatusReason" gives direct access to the value
1301     */
1302    public Goal setStatusReasonElement(StringType value) { 
1303      this.statusReason = value;
1304      return this;
1305    }
1306
1307    /**
1308     * @return Captures the reason for the current status.
1309     */
1310    public String getStatusReason() { 
1311      return this.statusReason == null ? null : this.statusReason.getValue();
1312    }
1313
1314    /**
1315     * @param value Captures the reason for the current status.
1316     */
1317    public Goal setStatusReason(String value) { 
1318      if (Utilities.noString(value))
1319        this.statusReason = null;
1320      else {
1321        if (this.statusReason == null)
1322          this.statusReason = new StringType();
1323        this.statusReason.setValue(value);
1324      }
1325      return this;
1326    }
1327
1328    /**
1329     * @return {@link #source} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1330     */
1331    public Reference getSource() { 
1332      if (this.source == null)
1333        if (Configuration.errorOnAutoCreate())
1334          throw new Error("Attempt to auto-create Goal.source");
1335        else if (Configuration.doAutoCreate())
1336          this.source = new Reference(); // cc
1337      return this.source;
1338    }
1339
1340    public boolean hasSource() { 
1341      return this.source != null && !this.source.isEmpty();
1342    }
1343
1344    /**
1345     * @param value {@link #source} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1346     */
1347    public Goal setSource(Reference value) { 
1348      this.source = value;
1349      return this;
1350    }
1351
1352    /**
1353     * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
1354     */
1355    public List<Reference> getAddresses() { 
1356      if (this.addresses == null)
1357        this.addresses = new ArrayList<Reference>();
1358      return this.addresses;
1359    }
1360
1361    /**
1362     * @return Returns a reference to <code>this</code> for easy method chaining
1363     */
1364    public Goal setAddresses(List<Reference> theAddresses) { 
1365      this.addresses = theAddresses;
1366      return this;
1367    }
1368
1369    public boolean hasAddresses() { 
1370      if (this.addresses == null)
1371        return false;
1372      for (Reference item : this.addresses)
1373        if (!item.isEmpty())
1374          return true;
1375      return false;
1376    }
1377
1378    public Reference addAddresses() { //3
1379      Reference t = new Reference();
1380      if (this.addresses == null)
1381        this.addresses = new ArrayList<Reference>();
1382      this.addresses.add(t);
1383      return t;
1384    }
1385
1386    public Goal addAddresses(Reference t) { //3
1387      if (t == null)
1388        return this;
1389      if (this.addresses == null)
1390        this.addresses = new ArrayList<Reference>();
1391      this.addresses.add(t);
1392      return this;
1393    }
1394
1395    /**
1396     * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist {3}
1397     */
1398    public Reference getAddressesFirstRep() { 
1399      if (getAddresses().isEmpty()) {
1400        addAddresses();
1401      }
1402      return getAddresses().get(0);
1403    }
1404
1405    /**
1406     * @return {@link #note} (Any comments related to the goal.)
1407     */
1408    public List<Annotation> getNote() { 
1409      if (this.note == null)
1410        this.note = new ArrayList<Annotation>();
1411      return this.note;
1412    }
1413
1414    /**
1415     * @return Returns a reference to <code>this</code> for easy method chaining
1416     */
1417    public Goal setNote(List<Annotation> theNote) { 
1418      this.note = theNote;
1419      return this;
1420    }
1421
1422    public boolean hasNote() { 
1423      if (this.note == null)
1424        return false;
1425      for (Annotation item : this.note)
1426        if (!item.isEmpty())
1427          return true;
1428      return false;
1429    }
1430
1431    public Annotation addNote() { //3
1432      Annotation t = new Annotation();
1433      if (this.note == null)
1434        this.note = new ArrayList<Annotation>();
1435      this.note.add(t);
1436      return t;
1437    }
1438
1439    public Goal addNote(Annotation t) { //3
1440      if (t == null)
1441        return this;
1442      if (this.note == null)
1443        this.note = new ArrayList<Annotation>();
1444      this.note.add(t);
1445      return this;
1446    }
1447
1448    /**
1449     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1450     */
1451    public Annotation getNoteFirstRep() { 
1452      if (getNote().isEmpty()) {
1453        addNote();
1454      }
1455      return getNote().get(0);
1456    }
1457
1458    /**
1459     * @return {@link #outcome} (Identifies the change (or lack of change) at the point when the status of the goal is assessed.)
1460     */
1461    public List<CodeableReference> getOutcome() { 
1462      if (this.outcome == null)
1463        this.outcome = new ArrayList<CodeableReference>();
1464      return this.outcome;
1465    }
1466
1467    /**
1468     * @return Returns a reference to <code>this</code> for easy method chaining
1469     */
1470    public Goal setOutcome(List<CodeableReference> theOutcome) { 
1471      this.outcome = theOutcome;
1472      return this;
1473    }
1474
1475    public boolean hasOutcome() { 
1476      if (this.outcome == null)
1477        return false;
1478      for (CodeableReference item : this.outcome)
1479        if (!item.isEmpty())
1480          return true;
1481      return false;
1482    }
1483
1484    public CodeableReference addOutcome() { //3
1485      CodeableReference t = new CodeableReference();
1486      if (this.outcome == null)
1487        this.outcome = new ArrayList<CodeableReference>();
1488      this.outcome.add(t);
1489      return t;
1490    }
1491
1492    public Goal addOutcome(CodeableReference t) { //3
1493      if (t == null)
1494        return this;
1495      if (this.outcome == null)
1496        this.outcome = new ArrayList<CodeableReference>();
1497      this.outcome.add(t);
1498      return this;
1499    }
1500
1501    /**
1502     * @return The first repetition of repeating field {@link #outcome}, creating it if it does not already exist {3}
1503     */
1504    public CodeableReference getOutcomeFirstRep() { 
1505      if (getOutcome().isEmpty()) {
1506        addOutcome();
1507      }
1508      return getOutcome().get(0);
1509    }
1510
1511      protected void listChildren(List<Property> children) {
1512        super.listChildren(children);
1513        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this goal 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));
1514        children.add(new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus));
1515        children.add(new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus));
1516        children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category));
1517        children.add(new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous));
1518        children.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority));
1519        children.add(new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description));
1520        children.add(new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, 1, subject));
1521        children.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start));
1522        children.add(new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target));
1523        children.add(new Property("statusDate", "date", "Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate));
1524        children.add(new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason));
1525        children.add(new Property("source", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|CareTeam)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, source));
1526        children.add(new Property("addresses", "Reference(Condition|Observation|MedicationStatement|MedicationRequest|NutritionOrder|ServiceRequest|RiskAssessment|Procedure)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses));
1527        children.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note));
1528        children.add(new Property("outcome", "CodeableReference(Observation)", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcome));
1529      }
1530
1531      @Override
1532      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1533        switch (_hash) {
1534        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this goal 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);
1535        case 1165552636: /*lifecycleStatus*/  return new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus);
1536        case 104524801: /*achievementStatus*/  return new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus);
1537        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category);
1538        case 379114255: /*continuous*/  return new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous);
1539        case -1165461084: /*priority*/  return new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority);
1540        case -1724546052: /*description*/  return new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description);
1541        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, 1, subject);
1542        case 1316793566: /*start[x]*/  return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1543        case 109757538: /*start*/  return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1544        case -2129778896: /*startDate*/  return new Property("start[x]", "date", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1545        case -1758833953: /*startCodeableConcept*/  return new Property("start[x]", "CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1546        case -880905839: /*target*/  return new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target);
1547        case 247524032: /*statusDate*/  return new Property("statusDate", "date", "Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate);
1548        case 2051346646: /*statusReason*/  return new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason);
1549        case -896505829: /*source*/  return new Property("source", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|CareTeam)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, source);
1550        case 874544034: /*addresses*/  return new Property("addresses", "Reference(Condition|Observation|MedicationStatement|MedicationRequest|NutritionOrder|ServiceRequest|RiskAssessment|Procedure)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses);
1551        case 3387378: /*note*/  return new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note);
1552        case -1106507950: /*outcome*/  return new Property("outcome", "CodeableReference(Observation)", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcome);
1553        default: return super.getNamedProperty(_hash, _name, _checkValid);
1554        }
1555
1556      }
1557
1558      @Override
1559      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1560        switch (hash) {
1561        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1562        case 1165552636: /*lifecycleStatus*/ return this.lifecycleStatus == null ? new Base[0] : new Base[] {this.lifecycleStatus}; // Enumeration<GoalLifecycleStatus>
1563        case 104524801: /*achievementStatus*/ return this.achievementStatus == null ? new Base[0] : new Base[] {this.achievementStatus}; // CodeableConcept
1564        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1565        case 379114255: /*continuous*/ return this.continuous == null ? new Base[0] : new Base[] {this.continuous}; // BooleanType
1566        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
1567        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept
1568        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1569        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DataType
1570        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // GoalTargetComponent
1571        case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateType
1572        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // StringType
1573        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
1574        case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // Reference
1575        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1576        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : this.outcome.toArray(new Base[this.outcome.size()]); // CodeableReference
1577        default: return super.getProperty(hash, name, checkValid);
1578        }
1579
1580      }
1581
1582      @Override
1583      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1584        switch (hash) {
1585        case -1618432855: // identifier
1586          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1587          return value;
1588        case 1165552636: // lifecycleStatus
1589          value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1590          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1591          return value;
1592        case 104524801: // achievementStatus
1593          this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1594          return value;
1595        case 50511102: // category
1596          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1597          return value;
1598        case 379114255: // continuous
1599          this.continuous = TypeConvertor.castToBoolean(value); // BooleanType
1600          return value;
1601        case -1165461084: // priority
1602          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1603          return value;
1604        case -1724546052: // description
1605          this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1606          return value;
1607        case -1867885268: // subject
1608          this.subject = TypeConvertor.castToReference(value); // Reference
1609          return value;
1610        case 109757538: // start
1611          this.start = TypeConvertor.castToType(value); // DataType
1612          return value;
1613        case -880905839: // target
1614          this.getTarget().add((GoalTargetComponent) value); // GoalTargetComponent
1615          return value;
1616        case 247524032: // statusDate
1617          this.statusDate = TypeConvertor.castToDate(value); // DateType
1618          return value;
1619        case 2051346646: // statusReason
1620          this.statusReason = TypeConvertor.castToString(value); // StringType
1621          return value;
1622        case -896505829: // source
1623          this.source = TypeConvertor.castToReference(value); // Reference
1624          return value;
1625        case 874544034: // addresses
1626          this.getAddresses().add(TypeConvertor.castToReference(value)); // Reference
1627          return value;
1628        case 3387378: // note
1629          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1630          return value;
1631        case -1106507950: // outcome
1632          this.getOutcome().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1633          return value;
1634        default: return super.setProperty(hash, name, value);
1635        }
1636
1637      }
1638
1639      @Override
1640      public Base setProperty(String name, Base value) throws FHIRException {
1641        if (name.equals("identifier")) {
1642          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1643        } else if (name.equals("lifecycleStatus")) {
1644          value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1645          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1646        } else if (name.equals("achievementStatus")) {
1647          this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1648        } else if (name.equals("category")) {
1649          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1650        } else if (name.equals("continuous")) {
1651          this.continuous = TypeConvertor.castToBoolean(value); // BooleanType
1652        } else if (name.equals("priority")) {
1653          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1654        } else if (name.equals("description")) {
1655          this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1656        } else if (name.equals("subject")) {
1657          this.subject = TypeConvertor.castToReference(value); // Reference
1658        } else if (name.equals("start[x]")) {
1659          this.start = TypeConvertor.castToType(value); // DataType
1660        } else if (name.equals("target")) {
1661          this.getTarget().add((GoalTargetComponent) value);
1662        } else if (name.equals("statusDate")) {
1663          this.statusDate = TypeConvertor.castToDate(value); // DateType
1664        } else if (name.equals("statusReason")) {
1665          this.statusReason = TypeConvertor.castToString(value); // StringType
1666        } else if (name.equals("source")) {
1667          this.source = TypeConvertor.castToReference(value); // Reference
1668        } else if (name.equals("addresses")) {
1669          this.getAddresses().add(TypeConvertor.castToReference(value));
1670        } else if (name.equals("note")) {
1671          this.getNote().add(TypeConvertor.castToAnnotation(value));
1672        } else if (name.equals("outcome")) {
1673          this.getOutcome().add(TypeConvertor.castToCodeableReference(value));
1674        } else
1675          return super.setProperty(name, value);
1676        return value;
1677      }
1678
1679  @Override
1680  public void removeChild(String name, Base value) throws FHIRException {
1681        if (name.equals("identifier")) {
1682          this.getIdentifier().remove(value);
1683        } else if (name.equals("lifecycleStatus")) {
1684          value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1685          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1686        } else if (name.equals("achievementStatus")) {
1687          this.achievementStatus = null;
1688        } else if (name.equals("category")) {
1689          this.getCategory().remove(value);
1690        } else if (name.equals("continuous")) {
1691          this.continuous = null;
1692        } else if (name.equals("priority")) {
1693          this.priority = null;
1694        } else if (name.equals("description")) {
1695          this.description = null;
1696        } else if (name.equals("subject")) {
1697          this.subject = null;
1698        } else if (name.equals("start[x]")) {
1699          this.start = null;
1700        } else if (name.equals("target")) {
1701          this.getTarget().remove((GoalTargetComponent) value);
1702        } else if (name.equals("statusDate")) {
1703          this.statusDate = null;
1704        } else if (name.equals("statusReason")) {
1705          this.statusReason = null;
1706        } else if (name.equals("source")) {
1707          this.source = null;
1708        } else if (name.equals("addresses")) {
1709          this.getAddresses().remove(value);
1710        } else if (name.equals("note")) {
1711          this.getNote().remove(value);
1712        } else if (name.equals("outcome")) {
1713          this.getOutcome().remove(value);
1714        } else
1715          super.removeChild(name, value);
1716        
1717      }
1718
1719      @Override
1720      public Base makeProperty(int hash, String name) throws FHIRException {
1721        switch (hash) {
1722        case -1618432855:  return addIdentifier(); 
1723        case 1165552636:  return getLifecycleStatusElement();
1724        case 104524801:  return getAchievementStatus();
1725        case 50511102:  return addCategory(); 
1726        case 379114255:  return getContinuousElement();
1727        case -1165461084:  return getPriority();
1728        case -1724546052:  return getDescription();
1729        case -1867885268:  return getSubject();
1730        case 1316793566:  return getStart();
1731        case 109757538:  return getStart();
1732        case -880905839:  return addTarget(); 
1733        case 247524032:  return getStatusDateElement();
1734        case 2051346646:  return getStatusReasonElement();
1735        case -896505829:  return getSource();
1736        case 874544034:  return addAddresses(); 
1737        case 3387378:  return addNote(); 
1738        case -1106507950:  return addOutcome(); 
1739        default: return super.makeProperty(hash, name);
1740        }
1741
1742      }
1743
1744      @Override
1745      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1746        switch (hash) {
1747        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1748        case 1165552636: /*lifecycleStatus*/ return new String[] {"code"};
1749        case 104524801: /*achievementStatus*/ return new String[] {"CodeableConcept"};
1750        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1751        case 379114255: /*continuous*/ return new String[] {"boolean"};
1752        case -1165461084: /*priority*/ return new String[] {"CodeableConcept"};
1753        case -1724546052: /*description*/ return new String[] {"CodeableConcept"};
1754        case -1867885268: /*subject*/ return new String[] {"Reference"};
1755        case 109757538: /*start*/ return new String[] {"date", "CodeableConcept"};
1756        case -880905839: /*target*/ return new String[] {};
1757        case 247524032: /*statusDate*/ return new String[] {"date"};
1758        case 2051346646: /*statusReason*/ return new String[] {"string"};
1759        case -896505829: /*source*/ return new String[] {"Reference"};
1760        case 874544034: /*addresses*/ return new String[] {"Reference"};
1761        case 3387378: /*note*/ return new String[] {"Annotation"};
1762        case -1106507950: /*outcome*/ return new String[] {"CodeableReference"};
1763        default: return super.getTypesForProperty(hash, name);
1764        }
1765
1766      }
1767
1768      @Override
1769      public Base addChild(String name) throws FHIRException {
1770        if (name.equals("identifier")) {
1771          return addIdentifier();
1772        }
1773        else if (name.equals("lifecycleStatus")) {
1774          throw new FHIRException("Cannot call addChild on a singleton property Goal.lifecycleStatus");
1775        }
1776        else if (name.equals("achievementStatus")) {
1777          this.achievementStatus = new CodeableConcept();
1778          return this.achievementStatus;
1779        }
1780        else if (name.equals("category")) {
1781          return addCategory();
1782        }
1783        else if (name.equals("continuous")) {
1784          throw new FHIRException("Cannot call addChild on a singleton property Goal.continuous");
1785        }
1786        else if (name.equals("priority")) {
1787          this.priority = new CodeableConcept();
1788          return this.priority;
1789        }
1790        else if (name.equals("description")) {
1791          this.description = new CodeableConcept();
1792          return this.description;
1793        }
1794        else if (name.equals("subject")) {
1795          this.subject = new Reference();
1796          return this.subject;
1797        }
1798        else if (name.equals("startDate")) {
1799          this.start = new DateType();
1800          return this.start;
1801        }
1802        else if (name.equals("startCodeableConcept")) {
1803          this.start = new CodeableConcept();
1804          return this.start;
1805        }
1806        else if (name.equals("target")) {
1807          return addTarget();
1808        }
1809        else if (name.equals("statusDate")) {
1810          throw new FHIRException("Cannot call addChild on a singleton property Goal.statusDate");
1811        }
1812        else if (name.equals("statusReason")) {
1813          throw new FHIRException("Cannot call addChild on a singleton property Goal.statusReason");
1814        }
1815        else if (name.equals("source")) {
1816          this.source = new Reference();
1817          return this.source;
1818        }
1819        else if (name.equals("addresses")) {
1820          return addAddresses();
1821        }
1822        else if (name.equals("note")) {
1823          return addNote();
1824        }
1825        else if (name.equals("outcome")) {
1826          return addOutcome();
1827        }
1828        else
1829          return super.addChild(name);
1830      }
1831
1832  public String fhirType() {
1833    return "Goal";
1834
1835  }
1836
1837      public Goal copy() {
1838        Goal dst = new Goal();
1839        copyValues(dst);
1840        return dst;
1841      }
1842
1843      public void copyValues(Goal dst) {
1844        super.copyValues(dst);
1845        if (identifier != null) {
1846          dst.identifier = new ArrayList<Identifier>();
1847          for (Identifier i : identifier)
1848            dst.identifier.add(i.copy());
1849        };
1850        dst.lifecycleStatus = lifecycleStatus == null ? null : lifecycleStatus.copy();
1851        dst.achievementStatus = achievementStatus == null ? null : achievementStatus.copy();
1852        if (category != null) {
1853          dst.category = new ArrayList<CodeableConcept>();
1854          for (CodeableConcept i : category)
1855            dst.category.add(i.copy());
1856        };
1857        dst.continuous = continuous == null ? null : continuous.copy();
1858        dst.priority = priority == null ? null : priority.copy();
1859        dst.description = description == null ? null : description.copy();
1860        dst.subject = subject == null ? null : subject.copy();
1861        dst.start = start == null ? null : start.copy();
1862        if (target != null) {
1863          dst.target = new ArrayList<GoalTargetComponent>();
1864          for (GoalTargetComponent i : target)
1865            dst.target.add(i.copy());
1866        };
1867        dst.statusDate = statusDate == null ? null : statusDate.copy();
1868        dst.statusReason = statusReason == null ? null : statusReason.copy();
1869        dst.source = source == null ? null : source.copy();
1870        if (addresses != null) {
1871          dst.addresses = new ArrayList<Reference>();
1872          for (Reference i : addresses)
1873            dst.addresses.add(i.copy());
1874        };
1875        if (note != null) {
1876          dst.note = new ArrayList<Annotation>();
1877          for (Annotation i : note)
1878            dst.note.add(i.copy());
1879        };
1880        if (outcome != null) {
1881          dst.outcome = new ArrayList<CodeableReference>();
1882          for (CodeableReference i : outcome)
1883            dst.outcome.add(i.copy());
1884        };
1885      }
1886
1887      protected Goal typedCopy() {
1888        return copy();
1889      }
1890
1891      @Override
1892      public boolean equalsDeep(Base other_) {
1893        if (!super.equalsDeep(other_))
1894          return false;
1895        if (!(other_ instanceof Goal))
1896          return false;
1897        Goal o = (Goal) other_;
1898        return compareDeep(identifier, o.identifier, true) && compareDeep(lifecycleStatus, o.lifecycleStatus, true)
1899           && compareDeep(achievementStatus, o.achievementStatus, true) && compareDeep(category, o.category, true)
1900           && compareDeep(continuous, o.continuous, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true)
1901           && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true) && compareDeep(target, o.target, true)
1902           && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true)
1903           && compareDeep(source, o.source, true) && compareDeep(addresses, o.addresses, true) && compareDeep(note, o.note, true)
1904           && compareDeep(outcome, o.outcome, true);
1905      }
1906
1907      @Override
1908      public boolean equalsShallow(Base other_) {
1909        if (!super.equalsShallow(other_))
1910          return false;
1911        if (!(other_ instanceof Goal))
1912          return false;
1913        Goal o = (Goal) other_;
1914        return compareValues(lifecycleStatus, o.lifecycleStatus, true) && compareValues(continuous, o.continuous, true)
1915           && compareValues(statusDate, o.statusDate, true) && compareValues(statusReason, o.statusReason, true)
1916          ;
1917      }
1918
1919      public boolean isEmpty() {
1920        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, lifecycleStatus
1921          , achievementStatus, category, continuous, priority, description, subject, start
1922          , target, statusDate, statusReason, source, addresses, note, outcome);
1923      }
1924
1925  @Override
1926  public ResourceType getResourceType() {
1927    return ResourceType.Goal;
1928   }
1929
1930 /**
1931   * Search parameter: <b>achievement-status</b>
1932   * <p>
1933   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
1934   * Type: <b>token</b><br>
1935   * Path: <b>Goal.achievementStatus</b><br>
1936   * </p>
1937   */
1938  @SearchParamDefinition(name="achievement-status", path="Goal.achievementStatus", description="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", type="token" )
1939  public static final String SP_ACHIEVEMENT_STATUS = "achievement-status";
1940 /**
1941   * <b>Fluent Client</b> search parameter constant for <b>achievement-status</b>
1942   * <p>
1943   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
1944   * Type: <b>token</b><br>
1945   * Path: <b>Goal.achievementStatus</b><br>
1946   * </p>
1947   */
1948  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACHIEVEMENT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACHIEVEMENT_STATUS);
1949
1950 /**
1951   * Search parameter: <b>addresses</b>
1952   * <p>
1953   * Description: <b>Issues addressed by this goal</b><br>
1954   * Type: <b>reference</b><br>
1955   * Path: <b>Goal.addresses</b><br>
1956   * </p>
1957   */
1958  @SearchParamDefinition(name="addresses", path="Goal.addresses", description="Issues addressed by this goal", type="reference", target={Condition.class, MedicationRequest.class, MedicationStatement.class, NutritionOrder.class, Observation.class, Procedure.class, RiskAssessment.class, ServiceRequest.class } )
1959  public static final String SP_ADDRESSES = "addresses";
1960 /**
1961   * <b>Fluent Client</b> search parameter constant for <b>addresses</b>
1962   * <p>
1963   * Description: <b>Issues addressed by this goal</b><br>
1964   * Type: <b>reference</b><br>
1965   * Path: <b>Goal.addresses</b><br>
1966   * </p>
1967   */
1968  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ADDRESSES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ADDRESSES);
1969
1970/**
1971   * Constant for fluent queries to be used to add include statements. Specifies
1972   * the path value of "<b>Goal:addresses</b>".
1973   */
1974  public static final ca.uhn.fhir.model.api.Include INCLUDE_ADDRESSES = new ca.uhn.fhir.model.api.Include("Goal:addresses").toLocked();
1975
1976 /**
1977   * Search parameter: <b>category</b>
1978   * <p>
1979   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
1980   * Type: <b>token</b><br>
1981   * Path: <b>Goal.category</b><br>
1982   * </p>
1983   */
1984  @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" )
1985  public static final String SP_CATEGORY = "category";
1986 /**
1987   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1988   * <p>
1989   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
1990   * Type: <b>token</b><br>
1991   * Path: <b>Goal.category</b><br>
1992   * </p>
1993   */
1994  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1995
1996 /**
1997   * Search parameter: <b>description</b>
1998   * <p>
1999   * Description: <b>Code or text describing goal</b><br>
2000   * Type: <b>token</b><br>
2001   * Path: <b>Goal.description</b><br>
2002   * </p>
2003   */
2004  @SearchParamDefinition(name="description", path="Goal.description", description="Code or text describing goal", type="token" )
2005  public static final String SP_DESCRIPTION = "description";
2006 /**
2007   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2008   * <p>
2009   * Description: <b>Code or text describing goal</b><br>
2010   * Type: <b>token</b><br>
2011   * Path: <b>Goal.description</b><br>
2012   * </p>
2013   */
2014  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DESCRIPTION);
2015
2016 /**
2017   * Search parameter: <b>lifecycle-status</b>
2018   * <p>
2019   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
2020   * Type: <b>token</b><br>
2021   * Path: <b>Goal.lifecycleStatus</b><br>
2022   * </p>
2023   */
2024  @SearchParamDefinition(name="lifecycle-status", path="Goal.lifecycleStatus", description="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", type="token" )
2025  public static final String SP_LIFECYCLE_STATUS = "lifecycle-status";
2026 /**
2027   * <b>Fluent Client</b> search parameter constant for <b>lifecycle-status</b>
2028   * <p>
2029   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
2030   * Type: <b>token</b><br>
2031   * Path: <b>Goal.lifecycleStatus</b><br>
2032   * </p>
2033   */
2034  public static final ca.uhn.fhir.rest.gclient.TokenClientParam LIFECYCLE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LIFECYCLE_STATUS);
2035
2036 /**
2037   * Search parameter: <b>start-date</b>
2038   * <p>
2039   * Description: <b>When goal pursuit begins</b><br>
2040   * Type: <b>date</b><br>
2041   * Path: <b>(Goal.start.ofType(date))</b><br>
2042   * </p>
2043   */
2044  @SearchParamDefinition(name="start-date", path="(Goal.start.ofType(date))", description="When goal pursuit begins", type="date" )
2045  public static final String SP_START_DATE = "start-date";
2046 /**
2047   * <b>Fluent Client</b> search parameter constant for <b>start-date</b>
2048   * <p>
2049   * Description: <b>When goal pursuit begins</b><br>
2050   * Type: <b>date</b><br>
2051   * Path: <b>(Goal.start.ofType(date))</b><br>
2052   * </p>
2053   */
2054  public static final ca.uhn.fhir.rest.gclient.DateClientParam START_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START_DATE);
2055
2056 /**
2057   * Search parameter: <b>subject</b>
2058   * <p>
2059   * Description: <b>Who this goal is intended for</b><br>
2060   * Type: <b>reference</b><br>
2061   * Path: <b>Goal.subject</b><br>
2062   * </p>
2063   */
2064  @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference", target={Group.class, Organization.class, Patient.class } )
2065  public static final String SP_SUBJECT = "subject";
2066 /**
2067   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2068   * <p>
2069   * Description: <b>Who this goal is intended for</b><br>
2070   * Type: <b>reference</b><br>
2071   * Path: <b>Goal.subject</b><br>
2072   * </p>
2073   */
2074  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2075
2076/**
2077   * Constant for fluent queries to be used to add include statements. Specifies
2078   * the path value of "<b>Goal:subject</b>".
2079   */
2080  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Goal:subject").toLocked();
2081
2082 /**
2083   * Search parameter: <b>target-date</b>
2084   * <p>
2085   * Description: <b>Reach goal on or before</b><br>
2086   * Type: <b>date</b><br>
2087   * Path: <b>(Goal.target.due.ofType(date))</b><br>
2088   * </p>
2089   */
2090  @SearchParamDefinition(name="target-date", path="(Goal.target.due.ofType(date))", description="Reach goal on or before", type="date" )
2091  public static final String SP_TARGET_DATE = "target-date";
2092 /**
2093   * <b>Fluent Client</b> search parameter constant for <b>target-date</b>
2094   * <p>
2095   * Description: <b>Reach goal on or before</b><br>
2096   * Type: <b>date</b><br>
2097   * Path: <b>(Goal.target.due.ofType(date))</b><br>
2098   * </p>
2099   */
2100  public static final ca.uhn.fhir.rest.gclient.DateClientParam TARGET_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TARGET_DATE);
2101
2102 /**
2103   * Search parameter: <b>target-measure</b>
2104   * <p>
2105   * Description: <b>The parameter whose value is being tracked</b><br>
2106   * Type: <b>token</b><br>
2107   * Path: <b>Goal.target.measure</b><br>
2108   * </p>
2109   */
2110  @SearchParamDefinition(name="target-measure", path="Goal.target.measure", description="The parameter whose value is being tracked", type="token" )
2111  public static final String SP_TARGET_MEASURE = "target-measure";
2112 /**
2113   * <b>Fluent Client</b> search parameter constant for <b>target-measure</b>
2114   * <p>
2115   * Description: <b>The parameter whose value is being tracked</b><br>
2116   * Type: <b>token</b><br>
2117   * Path: <b>Goal.target.measure</b><br>
2118   * </p>
2119   */
2120  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_MEASURE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_MEASURE);
2121
2122 /**
2123   * Search parameter: <b>identifier</b>
2124   * <p>
2125   * Description: <b>Multiple Resources: 
2126
2127* [Account](account.html): Account number
2128* [AdverseEvent](adverseevent.html): Business identifier for the event
2129* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2130* [Appointment](appointment.html): An Identifier of the Appointment
2131* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2132* [Basic](basic.html): Business identifier
2133* [BodyStructure](bodystructure.html): Bodystructure identifier
2134* [CarePlan](careplan.html): External Ids for this plan
2135* [CareTeam](careteam.html): External Ids for this team
2136* [ChargeItem](chargeitem.html): Business Identifier for item
2137* [Claim](claim.html): The primary identifier of the financial resource
2138* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2139* [ClinicalImpression](clinicalimpression.html): Business identifier
2140* [Communication](communication.html): Unique identifier
2141* [CommunicationRequest](communicationrequest.html): Unique identifier
2142* [Composition](composition.html): Version-independent identifier for the Composition
2143* [Condition](condition.html): A unique identifier of the condition record
2144* [Consent](consent.html): Identifier for this record (external references)
2145* [Contract](contract.html): The identity of the contract
2146* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2147* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2148* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2149* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2150* [DeviceRequest](devicerequest.html): Business identifier for request/order
2151* [DeviceUsage](deviceusage.html): Search by identifier
2152* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2153* [DocumentReference](documentreference.html): Identifier of the attachment binary
2154* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2155* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2156* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2157* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2158* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2159* [Flag](flag.html): Business identifier
2160* [Goal](goal.html): External Ids for this goal
2161* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2162* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2163* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2164* [Immunization](immunization.html): Business identifier
2165* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2166* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2167* [Invoice](invoice.html): Business Identifier for item
2168* [List](list.html): Business identifier
2169* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2170* [Medication](medication.html): Returns medications with this external identifier
2171* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2172* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2173* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2174* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2175* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2176* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2177* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2178* [Observation](observation.html): The unique id for a particular observation
2179* [Person](person.html): A person Identifier
2180* [Procedure](procedure.html): A unique identifier for a procedure
2181* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2182* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2183* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2184* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2185* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2186* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2187* [Specimen](specimen.html): The unique identifier associated with the specimen
2188* [SupplyDelivery](supplydelivery.html): External identifier
2189* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2190* [Task](task.html): Search for a task instance by its business identifier
2191* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2192</b><br>
2193   * Type: <b>token</b><br>
2194   * 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>
2195   * </p>
2196   */
2197  @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" )
2198  public static final String SP_IDENTIFIER = "identifier";
2199 /**
2200   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2201   * <p>
2202   * Description: <b>Multiple Resources: 
2203
2204* [Account](account.html): Account number
2205* [AdverseEvent](adverseevent.html): Business identifier for the event
2206* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2207* [Appointment](appointment.html): An Identifier of the Appointment
2208* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2209* [Basic](basic.html): Business identifier
2210* [BodyStructure](bodystructure.html): Bodystructure identifier
2211* [CarePlan](careplan.html): External Ids for this plan
2212* [CareTeam](careteam.html): External Ids for this team
2213* [ChargeItem](chargeitem.html): Business Identifier for item
2214* [Claim](claim.html): The primary identifier of the financial resource
2215* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2216* [ClinicalImpression](clinicalimpression.html): Business identifier
2217* [Communication](communication.html): Unique identifier
2218* [CommunicationRequest](communicationrequest.html): Unique identifier
2219* [Composition](composition.html): Version-independent identifier for the Composition
2220* [Condition](condition.html): A unique identifier of the condition record
2221* [Consent](consent.html): Identifier for this record (external references)
2222* [Contract](contract.html): The identity of the contract
2223* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2224* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2225* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2226* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2227* [DeviceRequest](devicerequest.html): Business identifier for request/order
2228* [DeviceUsage](deviceusage.html): Search by identifier
2229* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2230* [DocumentReference](documentreference.html): Identifier of the attachment binary
2231* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2232* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2233* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2234* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2235* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2236* [Flag](flag.html): Business identifier
2237* [Goal](goal.html): External Ids for this goal
2238* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2239* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2240* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2241* [Immunization](immunization.html): Business identifier
2242* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2243* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2244* [Invoice](invoice.html): Business Identifier for item
2245* [List](list.html): Business identifier
2246* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2247* [Medication](medication.html): Returns medications with this external identifier
2248* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2249* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2250* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2251* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2252* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2253* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2254* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2255* [Observation](observation.html): The unique id for a particular observation
2256* [Person](person.html): A person Identifier
2257* [Procedure](procedure.html): A unique identifier for a procedure
2258* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2259* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2260* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2261* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2262* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2263* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2264* [Specimen](specimen.html): The unique identifier associated with the specimen
2265* [SupplyDelivery](supplydelivery.html): External identifier
2266* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2267* [Task](task.html): Search for a task instance by its business identifier
2268* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2269</b><br>
2270   * Type: <b>token</b><br>
2271   * 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>
2272   * </p>
2273   */
2274  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2275
2276 /**
2277   * Search parameter: <b>patient</b>
2278   * <p>
2279   * Description: <b>Multiple Resources: 
2280
2281* [Account](account.html): The entity that caused the expenses
2282* [AdverseEvent](adverseevent.html): Subject impacted by event
2283* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2284* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2285* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2286* [AuditEvent](auditevent.html): Where the activity involved patient data
2287* [Basic](basic.html): Identifies the focus of this resource
2288* [BodyStructure](bodystructure.html): Who this is about
2289* [CarePlan](careplan.html): Who the care plan is for
2290* [CareTeam](careteam.html): Who care team is for
2291* [ChargeItem](chargeitem.html): Individual service was done for/to
2292* [Claim](claim.html): Patient receiving the products or services
2293* [ClaimResponse](claimresponse.html): The subject of care
2294* [ClinicalImpression](clinicalimpression.html): Patient assessed
2295* [Communication](communication.html): Focus of message
2296* [CommunicationRequest](communicationrequest.html): Focus of message
2297* [Composition](composition.html): Who and/or what the composition is about
2298* [Condition](condition.html): Who has the condition?
2299* [Consent](consent.html): Who the consent applies to
2300* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2301* [Coverage](coverage.html): Retrieve coverages for a patient
2302* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2303* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2304* [DetectedIssue](detectedissue.html): Associated patient
2305* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2306* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2307* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2308* [DocumentReference](documentreference.html): Who/what is the subject of the document
2309* [Encounter](encounter.html): The patient present at the encounter
2310* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2311* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2312* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2313* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2314* [Flag](flag.html): The identity of a subject to list flags for
2315* [Goal](goal.html): Who this goal is intended for
2316* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2317* [ImagingSelection](imagingselection.html): Who the study is about
2318* [ImagingStudy](imagingstudy.html): Who the study is about
2319* [Immunization](immunization.html): The patient for the vaccination record
2320* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2321* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2322* [Invoice](invoice.html): Recipient(s) of goods and services
2323* [List](list.html): If all resources have the same subject
2324* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2325* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2326* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2327* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2328* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2329* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2330* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2331* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2332* [Observation](observation.html): The subject that the observation is about (if patient)
2333* [Person](person.html): The Person links to this Patient
2334* [Procedure](procedure.html): Search by subject - a patient
2335* [Provenance](provenance.html): Where the activity involved patient data
2336* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2337* [RelatedPerson](relatedperson.html): The patient this related person is related to
2338* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2339* [ResearchSubject](researchsubject.html): Who or what is part of study
2340* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2341* [ServiceRequest](servicerequest.html): Search by subject - a patient
2342* [Specimen](specimen.html): The patient the specimen comes from
2343* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2344* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2345* [Task](task.html): Search by patient
2346* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2347</b><br>
2348   * Type: <b>reference</b><br>
2349   * 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>
2350   * </p>
2351   */
2352  @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 } )
2353  public static final String SP_PATIENT = "patient";
2354 /**
2355   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2356   * <p>
2357   * Description: <b>Multiple Resources: 
2358
2359* [Account](account.html): The entity that caused the expenses
2360* [AdverseEvent](adverseevent.html): Subject impacted by event
2361* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2362* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2363* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2364* [AuditEvent](auditevent.html): Where the activity involved patient data
2365* [Basic](basic.html): Identifies the focus of this resource
2366* [BodyStructure](bodystructure.html): Who this is about
2367* [CarePlan](careplan.html): Who the care plan is for
2368* [CareTeam](careteam.html): Who care team is for
2369* [ChargeItem](chargeitem.html): Individual service was done for/to
2370* [Claim](claim.html): Patient receiving the products or services
2371* [ClaimResponse](claimresponse.html): The subject of care
2372* [ClinicalImpression](clinicalimpression.html): Patient assessed
2373* [Communication](communication.html): Focus of message
2374* [CommunicationRequest](communicationrequest.html): Focus of message
2375* [Composition](composition.html): Who and/or what the composition is about
2376* [Condition](condition.html): Who has the condition?
2377* [Consent](consent.html): Who the consent applies to
2378* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2379* [Coverage](coverage.html): Retrieve coverages for a patient
2380* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2381* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2382* [DetectedIssue](detectedissue.html): Associated patient
2383* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2384* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2385* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2386* [DocumentReference](documentreference.html): Who/what is the subject of the document
2387* [Encounter](encounter.html): The patient present at the encounter
2388* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2389* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2390* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2391* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2392* [Flag](flag.html): The identity of a subject to list flags for
2393* [Goal](goal.html): Who this goal is intended for
2394* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2395* [ImagingSelection](imagingselection.html): Who the study is about
2396* [ImagingStudy](imagingstudy.html): Who the study is about
2397* [Immunization](immunization.html): The patient for the vaccination record
2398* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2399* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2400* [Invoice](invoice.html): Recipient(s) of goods and services
2401* [List](list.html): If all resources have the same subject
2402* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2403* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2404* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2405* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2406* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2407* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2408* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2409* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2410* [Observation](observation.html): The subject that the observation is about (if patient)
2411* [Person](person.html): The Person links to this Patient
2412* [Procedure](procedure.html): Search by subject - a patient
2413* [Provenance](provenance.html): Where the activity involved patient data
2414* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2415* [RelatedPerson](relatedperson.html): The patient this related person is related to
2416* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2417* [ResearchSubject](researchsubject.html): Who or what is part of study
2418* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2419* [ServiceRequest](servicerequest.html): Search by subject - a patient
2420* [Specimen](specimen.html): The patient the specimen comes from
2421* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2422* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2423* [Task](task.html): Search by patient
2424* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2425</b><br>
2426   * Type: <b>reference</b><br>
2427   * 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>
2428   * </p>
2429   */
2430  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2431
2432/**
2433   * Constant for fluent queries to be used to add include statements. Specifies
2434   * the path value of "<b>Goal:patient</b>".
2435   */
2436  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Goal:patient").toLocked();
2437
2438
2439}
2440