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 Base makeProperty(int hash, String name) throws FHIRException {
570        switch (hash) {
571        case 938321246:  return getMeasure();
572        case -1973084529:  return getDetail();
573        case -1335224239:  return getDetail();
574        case -1320900084:  return getDue();
575        case 99828:  return getDue();
576        default: return super.makeProperty(hash, name);
577        }
578
579      }
580
581      @Override
582      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
583        switch (hash) {
584        case 938321246: /*measure*/ return new String[] {"CodeableConcept"};
585        case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept", "string", "boolean", "integer", "Ratio"};
586        case 99828: /*due*/ return new String[] {"date", "Duration"};
587        default: return super.getTypesForProperty(hash, name);
588        }
589
590      }
591
592      @Override
593      public Base addChild(String name) throws FHIRException {
594        if (name.equals("measure")) {
595          this.measure = new CodeableConcept();
596          return this.measure;
597        }
598        else if (name.equals("detailQuantity")) {
599          this.detail = new Quantity();
600          return this.detail;
601        }
602        else if (name.equals("detailRange")) {
603          this.detail = new Range();
604          return this.detail;
605        }
606        else if (name.equals("detailCodeableConcept")) {
607          this.detail = new CodeableConcept();
608          return this.detail;
609        }
610        else if (name.equals("detailString")) {
611          this.detail = new StringType();
612          return this.detail;
613        }
614        else if (name.equals("detailBoolean")) {
615          this.detail = new BooleanType();
616          return this.detail;
617        }
618        else if (name.equals("detailInteger")) {
619          this.detail = new IntegerType();
620          return this.detail;
621        }
622        else if (name.equals("detailRatio")) {
623          this.detail = new Ratio();
624          return this.detail;
625        }
626        else if (name.equals("dueDate")) {
627          this.due = new DateType();
628          return this.due;
629        }
630        else if (name.equals("dueDuration")) {
631          this.due = new Duration();
632          return this.due;
633        }
634        else
635          return super.addChild(name);
636      }
637
638      public GoalTargetComponent copy() {
639        GoalTargetComponent dst = new GoalTargetComponent();
640        copyValues(dst);
641        return dst;
642      }
643
644      public void copyValues(GoalTargetComponent dst) {
645        super.copyValues(dst);
646        dst.measure = measure == null ? null : measure.copy();
647        dst.detail = detail == null ? null : detail.copy();
648        dst.due = due == null ? null : due.copy();
649      }
650
651      @Override
652      public boolean equalsDeep(Base other_) {
653        if (!super.equalsDeep(other_))
654          return false;
655        if (!(other_ instanceof GoalTargetComponent))
656          return false;
657        GoalTargetComponent o = (GoalTargetComponent) other_;
658        return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true)
659          ;
660      }
661
662      @Override
663      public boolean equalsShallow(Base other_) {
664        if (!super.equalsShallow(other_))
665          return false;
666        if (!(other_ instanceof GoalTargetComponent))
667          return false;
668        GoalTargetComponent o = (GoalTargetComponent) other_;
669        return true;
670      }
671
672      public boolean isEmpty() {
673        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due);
674      }
675
676  public String fhirType() {
677    return "Goal.target";
678
679  }
680
681  }
682
683    /**
684     * 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.
685     */
686    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
687    @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." )
688    protected List<Identifier> identifier;
689
690    /**
691     * The state of the goal throughout its lifecycle.
692     */
693    @Child(name = "lifecycleStatus", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
694    @Description(shortDefinition="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", formalDefinition="The state of the goal throughout its lifecycle." )
695    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-status")
696    protected Enumeration<GoalLifecycleStatus> lifecycleStatus;
697
698    /**
699     * Describes the progression, or lack thereof, towards the goal against the target.
700     */
701    @Child(name = "achievementStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
702    @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." )
703    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-achievement")
704    protected CodeableConcept achievementStatus;
705
706    /**
707     * Indicates a category the goal falls within.
708     */
709    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
710    @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc", formalDefinition="Indicates a category the goal falls within." )
711    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category")
712    protected List<CodeableConcept> category;
713
714    /**
715     * After meeting the goal, ongoing activity is needed to sustain the goal objective.
716     */
717    @Child(name = "continuous", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false)
718    @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." )
719    protected BooleanType continuous;
720
721    /**
722     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.
723     */
724    @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
725    @Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." )
726    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority")
727    protected CodeableConcept priority;
728
729    /**
730     * 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".
731     */
732    @Child(name = "description", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true)
733    @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\"." )
734    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
735    protected CodeableConcept description;
736
737    /**
738     * Identifies the patient, group or organization for whom the goal is being established.
739     */
740    @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=7, min=1, max=1, modifier=false, summary=true)
741    @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." )
742    protected Reference subject;
743
744    /**
745     * The date or event after which the goal should begin being pursued.
746     */
747    @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
748    @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." )
749    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event")
750    protected DataType start;
751
752    /**
753     * Indicates what should be done by when.
754     */
755    @Child(name = "target", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
756    @Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done by when." )
757    protected List<GoalTargetComponent> target;
758
759    /**
760     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
761     */
762    @Child(name = "statusDate", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=true)
763    @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc." )
764    protected DateType statusDate;
765
766    /**
767     * Captures the reason for the current status.
768     */
769    @Child(name = "statusReason", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
770    @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." )
771    protected StringType statusReason;
772
773    /**
774     * Indicates whose goal this is - patient goal, practitioner goal, etc.
775     */
776    @Child(name = "source", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, CareTeam.class}, order=12, min=0, max=1, modifier=false, summary=true)
777    @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." )
778    protected Reference source;
779
780    /**
781     * The identified conditions and other health record elements that are intended to be addressed by the goal.
782     */
783    @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)
784    @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." )
785    protected List<Reference> addresses;
786
787    /**
788     * Any comments related to the goal.
789     */
790    @Child(name = "note", type = {Annotation.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
791    @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." )
792    protected List<Annotation> note;
793
794    /**
795     * Identifies the change (or lack of change) at the point when the status of the goal is assessed.
796     */
797    @Child(name = "outcome", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
798    @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." )
799    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
800    protected List<CodeableReference> outcome;
801
802    private static final long serialVersionUID = -884300976L;
803
804  /**
805   * Constructor
806   */
807    public Goal() {
808      super();
809    }
810
811  /**
812   * Constructor
813   */
814    public Goal(GoalLifecycleStatus lifecycleStatus, CodeableConcept description, Reference subject) {
815      super();
816      this.setLifecycleStatus(lifecycleStatus);
817      this.setDescription(description);
818      this.setSubject(subject);
819    }
820
821    /**
822     * @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.)
823     */
824    public List<Identifier> getIdentifier() { 
825      if (this.identifier == null)
826        this.identifier = new ArrayList<Identifier>();
827      return this.identifier;
828    }
829
830    /**
831     * @return Returns a reference to <code>this</code> for easy method chaining
832     */
833    public Goal setIdentifier(List<Identifier> theIdentifier) { 
834      this.identifier = theIdentifier;
835      return this;
836    }
837
838    public boolean hasIdentifier() { 
839      if (this.identifier == null)
840        return false;
841      for (Identifier item : this.identifier)
842        if (!item.isEmpty())
843          return true;
844      return false;
845    }
846
847    public Identifier addIdentifier() { //3
848      Identifier t = new Identifier();
849      if (this.identifier == null)
850        this.identifier = new ArrayList<Identifier>();
851      this.identifier.add(t);
852      return t;
853    }
854
855    public Goal addIdentifier(Identifier t) { //3
856      if (t == null)
857        return this;
858      if (this.identifier == null)
859        this.identifier = new ArrayList<Identifier>();
860      this.identifier.add(t);
861      return this;
862    }
863
864    /**
865     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
866     */
867    public Identifier getIdentifierFirstRep() { 
868      if (getIdentifier().isEmpty()) {
869        addIdentifier();
870      }
871      return getIdentifier().get(0);
872    }
873
874    /**
875     * @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
876     */
877    public Enumeration<GoalLifecycleStatus> getLifecycleStatusElement() { 
878      if (this.lifecycleStatus == null)
879        if (Configuration.errorOnAutoCreate())
880          throw new Error("Attempt to auto-create Goal.lifecycleStatus");
881        else if (Configuration.doAutoCreate())
882          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory()); // bb
883      return this.lifecycleStatus;
884    }
885
886    public boolean hasLifecycleStatusElement() { 
887      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
888    }
889
890    public boolean hasLifecycleStatus() { 
891      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
892    }
893
894    /**
895     * @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
896     */
897    public Goal setLifecycleStatusElement(Enumeration<GoalLifecycleStatus> value) { 
898      this.lifecycleStatus = value;
899      return this;
900    }
901
902    /**
903     * @return The state of the goal throughout its lifecycle.
904     */
905    public GoalLifecycleStatus getLifecycleStatus() { 
906      return this.lifecycleStatus == null ? null : this.lifecycleStatus.getValue();
907    }
908
909    /**
910     * @param value The state of the goal throughout its lifecycle.
911     */
912    public Goal setLifecycleStatus(GoalLifecycleStatus value) { 
913        if (this.lifecycleStatus == null)
914          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory());
915        this.lifecycleStatus.setValue(value);
916      return this;
917    }
918
919    /**
920     * @return {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
921     */
922    public CodeableConcept getAchievementStatus() { 
923      if (this.achievementStatus == null)
924        if (Configuration.errorOnAutoCreate())
925          throw new Error("Attempt to auto-create Goal.achievementStatus");
926        else if (Configuration.doAutoCreate())
927          this.achievementStatus = new CodeableConcept(); // cc
928      return this.achievementStatus;
929    }
930
931    public boolean hasAchievementStatus() { 
932      return this.achievementStatus != null && !this.achievementStatus.isEmpty();
933    }
934
935    /**
936     * @param value {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
937     */
938    public Goal setAchievementStatus(CodeableConcept value) { 
939      this.achievementStatus = value;
940      return this;
941    }
942
943    /**
944     * @return {@link #category} (Indicates a category the goal falls within.)
945     */
946    public List<CodeableConcept> getCategory() { 
947      if (this.category == null)
948        this.category = new ArrayList<CodeableConcept>();
949      return this.category;
950    }
951
952    /**
953     * @return Returns a reference to <code>this</code> for easy method chaining
954     */
955    public Goal setCategory(List<CodeableConcept> theCategory) { 
956      this.category = theCategory;
957      return this;
958    }
959
960    public boolean hasCategory() { 
961      if (this.category == null)
962        return false;
963      for (CodeableConcept item : this.category)
964        if (!item.isEmpty())
965          return true;
966      return false;
967    }
968
969    public CodeableConcept addCategory() { //3
970      CodeableConcept t = new CodeableConcept();
971      if (this.category == null)
972        this.category = new ArrayList<CodeableConcept>();
973      this.category.add(t);
974      return t;
975    }
976
977    public Goal addCategory(CodeableConcept t) { //3
978      if (t == null)
979        return this;
980      if (this.category == null)
981        this.category = new ArrayList<CodeableConcept>();
982      this.category.add(t);
983      return this;
984    }
985
986    /**
987     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
988     */
989    public CodeableConcept getCategoryFirstRep() { 
990      if (getCategory().isEmpty()) {
991        addCategory();
992      }
993      return getCategory().get(0);
994    }
995
996    /**
997     * @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
998     */
999    public BooleanType getContinuousElement() { 
1000      if (this.continuous == null)
1001        if (Configuration.errorOnAutoCreate())
1002          throw new Error("Attempt to auto-create Goal.continuous");
1003        else if (Configuration.doAutoCreate())
1004          this.continuous = new BooleanType(); // bb
1005      return this.continuous;
1006    }
1007
1008    public boolean hasContinuousElement() { 
1009      return this.continuous != null && !this.continuous.isEmpty();
1010    }
1011
1012    public boolean hasContinuous() { 
1013      return this.continuous != null && !this.continuous.isEmpty();
1014    }
1015
1016    /**
1017     * @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
1018     */
1019    public Goal setContinuousElement(BooleanType value) { 
1020      this.continuous = value;
1021      return this;
1022    }
1023
1024    /**
1025     * @return After meeting the goal, ongoing activity is needed to sustain the goal objective.
1026     */
1027    public boolean getContinuous() { 
1028      return this.continuous == null || this.continuous.isEmpty() ? false : this.continuous.getValue();
1029    }
1030
1031    /**
1032     * @param value After meeting the goal, ongoing activity is needed to sustain the goal objective.
1033     */
1034    public Goal setContinuous(boolean value) { 
1035        if (this.continuous == null)
1036          this.continuous = new BooleanType();
1037        this.continuous.setValue(value);
1038      return this;
1039    }
1040
1041    /**
1042     * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1043     */
1044    public CodeableConcept getPriority() { 
1045      if (this.priority == null)
1046        if (Configuration.errorOnAutoCreate())
1047          throw new Error("Attempt to auto-create Goal.priority");
1048        else if (Configuration.doAutoCreate())
1049          this.priority = new CodeableConcept(); // cc
1050      return this.priority;
1051    }
1052
1053    public boolean hasPriority() { 
1054      return this.priority != null && !this.priority.isEmpty();
1055    }
1056
1057    /**
1058     * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1059     */
1060    public Goal setPriority(CodeableConcept value) { 
1061      this.priority = value;
1062      return this;
1063    }
1064
1065    /**
1066     * @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".)
1067     */
1068    public CodeableConcept getDescription() { 
1069      if (this.description == null)
1070        if (Configuration.errorOnAutoCreate())
1071          throw new Error("Attempt to auto-create Goal.description");
1072        else if (Configuration.doAutoCreate())
1073          this.description = new CodeableConcept(); // cc
1074      return this.description;
1075    }
1076
1077    public boolean hasDescription() { 
1078      return this.description != null && !this.description.isEmpty();
1079    }
1080
1081    /**
1082     * @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".)
1083     */
1084    public Goal setDescription(CodeableConcept value) { 
1085      this.description = value;
1086      return this;
1087    }
1088
1089    /**
1090     * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1091     */
1092    public Reference getSubject() { 
1093      if (this.subject == null)
1094        if (Configuration.errorOnAutoCreate())
1095          throw new Error("Attempt to auto-create Goal.subject");
1096        else if (Configuration.doAutoCreate())
1097          this.subject = new Reference(); // cc
1098      return this.subject;
1099    }
1100
1101    public boolean hasSubject() { 
1102      return this.subject != null && !this.subject.isEmpty();
1103    }
1104
1105    /**
1106     * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1107     */
1108    public Goal setSubject(Reference value) { 
1109      this.subject = value;
1110      return this;
1111    }
1112
1113    /**
1114     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1115     */
1116    public DataType getStart() { 
1117      return this.start;
1118    }
1119
1120    /**
1121     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1122     */
1123    public DateType getStartDateType() throws FHIRException { 
1124      if (this.start == null)
1125        this.start = new DateType();
1126      if (!(this.start instanceof DateType))
1127        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered");
1128      return (DateType) this.start;
1129    }
1130
1131    public boolean hasStartDateType() { 
1132      return this != null && this.start instanceof DateType;
1133    }
1134
1135    /**
1136     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1137     */
1138    public CodeableConcept getStartCodeableConcept() throws FHIRException { 
1139      if (this.start == null)
1140        this.start = new CodeableConcept();
1141      if (!(this.start instanceof CodeableConcept))
1142        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered");
1143      return (CodeableConcept) this.start;
1144    }
1145
1146    public boolean hasStartCodeableConcept() { 
1147      return this != null && this.start instanceof CodeableConcept;
1148    }
1149
1150    public boolean hasStart() { 
1151      return this.start != null && !this.start.isEmpty();
1152    }
1153
1154    /**
1155     * @param value {@link #start} (The date or event after which the goal should begin being pursued.)
1156     */
1157    public Goal setStart(DataType value) { 
1158      if (value != null && !(value instanceof DateType || value instanceof CodeableConcept))
1159        throw new FHIRException("Not the right type for Goal.start[x]: "+value.fhirType());
1160      this.start = value;
1161      return this;
1162    }
1163
1164    /**
1165     * @return {@link #target} (Indicates what should be done by when.)
1166     */
1167    public List<GoalTargetComponent> getTarget() { 
1168      if (this.target == null)
1169        this.target = new ArrayList<GoalTargetComponent>();
1170      return this.target;
1171    }
1172
1173    /**
1174     * @return Returns a reference to <code>this</code> for easy method chaining
1175     */
1176    public Goal setTarget(List<GoalTargetComponent> theTarget) { 
1177      this.target = theTarget;
1178      return this;
1179    }
1180
1181    public boolean hasTarget() { 
1182      if (this.target == null)
1183        return false;
1184      for (GoalTargetComponent item : this.target)
1185        if (!item.isEmpty())
1186          return true;
1187      return false;
1188    }
1189
1190    public GoalTargetComponent addTarget() { //3
1191      GoalTargetComponent t = new GoalTargetComponent();
1192      if (this.target == null)
1193        this.target = new ArrayList<GoalTargetComponent>();
1194      this.target.add(t);
1195      return t;
1196    }
1197
1198    public Goal addTarget(GoalTargetComponent t) { //3
1199      if (t == null)
1200        return this;
1201      if (this.target == null)
1202        this.target = new ArrayList<GoalTargetComponent>();
1203      this.target.add(t);
1204      return this;
1205    }
1206
1207    /**
1208     * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist {3}
1209     */
1210    public GoalTargetComponent getTargetFirstRep() { 
1211      if (getTarget().isEmpty()) {
1212        addTarget();
1213      }
1214      return getTarget().get(0);
1215    }
1216
1217    /**
1218     * @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
1219     */
1220    public DateType getStatusDateElement() { 
1221      if (this.statusDate == null)
1222        if (Configuration.errorOnAutoCreate())
1223          throw new Error("Attempt to auto-create Goal.statusDate");
1224        else if (Configuration.doAutoCreate())
1225          this.statusDate = new DateType(); // bb
1226      return this.statusDate;
1227    }
1228
1229    public boolean hasStatusDateElement() { 
1230      return this.statusDate != null && !this.statusDate.isEmpty();
1231    }
1232
1233    public boolean hasStatusDate() { 
1234      return this.statusDate != null && !this.statusDate.isEmpty();
1235    }
1236
1237    /**
1238     * @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
1239     */
1240    public Goal setStatusDateElement(DateType value) { 
1241      this.statusDate = value;
1242      return this;
1243    }
1244
1245    /**
1246     * @return Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1247     */
1248    public Date getStatusDate() { 
1249      return this.statusDate == null ? null : this.statusDate.getValue();
1250    }
1251
1252    /**
1253     * @param value Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1254     */
1255    public Goal setStatusDate(Date value) { 
1256      if (value == null)
1257        this.statusDate = null;
1258      else {
1259        if (this.statusDate == null)
1260          this.statusDate = new DateType();
1261        this.statusDate.setValue(value);
1262      }
1263      return this;
1264    }
1265
1266    /**
1267     * @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
1268     */
1269    public StringType getStatusReasonElement() { 
1270      if (this.statusReason == null)
1271        if (Configuration.errorOnAutoCreate())
1272          throw new Error("Attempt to auto-create Goal.statusReason");
1273        else if (Configuration.doAutoCreate())
1274          this.statusReason = new StringType(); // bb
1275      return this.statusReason;
1276    }
1277
1278    public boolean hasStatusReasonElement() { 
1279      return this.statusReason != null && !this.statusReason.isEmpty();
1280    }
1281
1282    public boolean hasStatusReason() { 
1283      return this.statusReason != null && !this.statusReason.isEmpty();
1284    }
1285
1286    /**
1287     * @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
1288     */
1289    public Goal setStatusReasonElement(StringType value) { 
1290      this.statusReason = value;
1291      return this;
1292    }
1293
1294    /**
1295     * @return Captures the reason for the current status.
1296     */
1297    public String getStatusReason() { 
1298      return this.statusReason == null ? null : this.statusReason.getValue();
1299    }
1300
1301    /**
1302     * @param value Captures the reason for the current status.
1303     */
1304    public Goal setStatusReason(String value) { 
1305      if (Utilities.noString(value))
1306        this.statusReason = null;
1307      else {
1308        if (this.statusReason == null)
1309          this.statusReason = new StringType();
1310        this.statusReason.setValue(value);
1311      }
1312      return this;
1313    }
1314
1315    /**
1316     * @return {@link #source} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1317     */
1318    public Reference getSource() { 
1319      if (this.source == null)
1320        if (Configuration.errorOnAutoCreate())
1321          throw new Error("Attempt to auto-create Goal.source");
1322        else if (Configuration.doAutoCreate())
1323          this.source = new Reference(); // cc
1324      return this.source;
1325    }
1326
1327    public boolean hasSource() { 
1328      return this.source != null && !this.source.isEmpty();
1329    }
1330
1331    /**
1332     * @param value {@link #source} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1333     */
1334    public Goal setSource(Reference value) { 
1335      this.source = value;
1336      return this;
1337    }
1338
1339    /**
1340     * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
1341     */
1342    public List<Reference> getAddresses() { 
1343      if (this.addresses == null)
1344        this.addresses = new ArrayList<Reference>();
1345      return this.addresses;
1346    }
1347
1348    /**
1349     * @return Returns a reference to <code>this</code> for easy method chaining
1350     */
1351    public Goal setAddresses(List<Reference> theAddresses) { 
1352      this.addresses = theAddresses;
1353      return this;
1354    }
1355
1356    public boolean hasAddresses() { 
1357      if (this.addresses == null)
1358        return false;
1359      for (Reference item : this.addresses)
1360        if (!item.isEmpty())
1361          return true;
1362      return false;
1363    }
1364
1365    public Reference addAddresses() { //3
1366      Reference t = new Reference();
1367      if (this.addresses == null)
1368        this.addresses = new ArrayList<Reference>();
1369      this.addresses.add(t);
1370      return t;
1371    }
1372
1373    public Goal addAddresses(Reference t) { //3
1374      if (t == null)
1375        return this;
1376      if (this.addresses == null)
1377        this.addresses = new ArrayList<Reference>();
1378      this.addresses.add(t);
1379      return this;
1380    }
1381
1382    /**
1383     * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist {3}
1384     */
1385    public Reference getAddressesFirstRep() { 
1386      if (getAddresses().isEmpty()) {
1387        addAddresses();
1388      }
1389      return getAddresses().get(0);
1390    }
1391
1392    /**
1393     * @return {@link #note} (Any comments related to the goal.)
1394     */
1395    public List<Annotation> getNote() { 
1396      if (this.note == null)
1397        this.note = new ArrayList<Annotation>();
1398      return this.note;
1399    }
1400
1401    /**
1402     * @return Returns a reference to <code>this</code> for easy method chaining
1403     */
1404    public Goal setNote(List<Annotation> theNote) { 
1405      this.note = theNote;
1406      return this;
1407    }
1408
1409    public boolean hasNote() { 
1410      if (this.note == null)
1411        return false;
1412      for (Annotation item : this.note)
1413        if (!item.isEmpty())
1414          return true;
1415      return false;
1416    }
1417
1418    public Annotation addNote() { //3
1419      Annotation t = new Annotation();
1420      if (this.note == null)
1421        this.note = new ArrayList<Annotation>();
1422      this.note.add(t);
1423      return t;
1424    }
1425
1426    public Goal addNote(Annotation t) { //3
1427      if (t == null)
1428        return this;
1429      if (this.note == null)
1430        this.note = new ArrayList<Annotation>();
1431      this.note.add(t);
1432      return this;
1433    }
1434
1435    /**
1436     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1437     */
1438    public Annotation getNoteFirstRep() { 
1439      if (getNote().isEmpty()) {
1440        addNote();
1441      }
1442      return getNote().get(0);
1443    }
1444
1445    /**
1446     * @return {@link #outcome} (Identifies the change (or lack of change) at the point when the status of the goal is assessed.)
1447     */
1448    public List<CodeableReference> getOutcome() { 
1449      if (this.outcome == null)
1450        this.outcome = new ArrayList<CodeableReference>();
1451      return this.outcome;
1452    }
1453
1454    /**
1455     * @return Returns a reference to <code>this</code> for easy method chaining
1456     */
1457    public Goal setOutcome(List<CodeableReference> theOutcome) { 
1458      this.outcome = theOutcome;
1459      return this;
1460    }
1461
1462    public boolean hasOutcome() { 
1463      if (this.outcome == null)
1464        return false;
1465      for (CodeableReference item : this.outcome)
1466        if (!item.isEmpty())
1467          return true;
1468      return false;
1469    }
1470
1471    public CodeableReference addOutcome() { //3
1472      CodeableReference t = new CodeableReference();
1473      if (this.outcome == null)
1474        this.outcome = new ArrayList<CodeableReference>();
1475      this.outcome.add(t);
1476      return t;
1477    }
1478
1479    public Goal addOutcome(CodeableReference t) { //3
1480      if (t == null)
1481        return this;
1482      if (this.outcome == null)
1483        this.outcome = new ArrayList<CodeableReference>();
1484      this.outcome.add(t);
1485      return this;
1486    }
1487
1488    /**
1489     * @return The first repetition of repeating field {@link #outcome}, creating it if it does not already exist {3}
1490     */
1491    public CodeableReference getOutcomeFirstRep() { 
1492      if (getOutcome().isEmpty()) {
1493        addOutcome();
1494      }
1495      return getOutcome().get(0);
1496    }
1497
1498      protected void listChildren(List<Property> children) {
1499        super.listChildren(children);
1500        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));
1501        children.add(new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus));
1502        children.add(new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus));
1503        children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category));
1504        children.add(new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous));
1505        children.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority));
1506        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));
1507        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));
1508        children.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start));
1509        children.add(new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target));
1510        children.add(new Property("statusDate", "date", "Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate));
1511        children.add(new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason));
1512        children.add(new Property("source", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|CareTeam)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, source));
1513        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));
1514        children.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note));
1515        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));
1516      }
1517
1518      @Override
1519      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1520        switch (_hash) {
1521        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);
1522        case 1165552636: /*lifecycleStatus*/  return new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus);
1523        case 104524801: /*achievementStatus*/  return new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus);
1524        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category);
1525        case 379114255: /*continuous*/  return new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous);
1526        case -1165461084: /*priority*/  return new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority);
1527        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);
1528        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);
1529        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);
1530        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);
1531        case -2129778896: /*startDate*/  return new Property("start[x]", "date", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1532        case -1758833953: /*startCodeableConcept*/  return new Property("start[x]", "CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1533        case -880905839: /*target*/  return new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target);
1534        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);
1535        case 2051346646: /*statusReason*/  return new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason);
1536        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);
1537        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);
1538        case 3387378: /*note*/  return new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note);
1539        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);
1540        default: return super.getNamedProperty(_hash, _name, _checkValid);
1541        }
1542
1543      }
1544
1545      @Override
1546      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1547        switch (hash) {
1548        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1549        case 1165552636: /*lifecycleStatus*/ return this.lifecycleStatus == null ? new Base[0] : new Base[] {this.lifecycleStatus}; // Enumeration<GoalLifecycleStatus>
1550        case 104524801: /*achievementStatus*/ return this.achievementStatus == null ? new Base[0] : new Base[] {this.achievementStatus}; // CodeableConcept
1551        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1552        case 379114255: /*continuous*/ return this.continuous == null ? new Base[0] : new Base[] {this.continuous}; // BooleanType
1553        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
1554        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept
1555        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1556        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DataType
1557        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // GoalTargetComponent
1558        case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateType
1559        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // StringType
1560        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
1561        case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // Reference
1562        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1563        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : this.outcome.toArray(new Base[this.outcome.size()]); // CodeableReference
1564        default: return super.getProperty(hash, name, checkValid);
1565        }
1566
1567      }
1568
1569      @Override
1570      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1571        switch (hash) {
1572        case -1618432855: // identifier
1573          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1574          return value;
1575        case 1165552636: // lifecycleStatus
1576          value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1577          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1578          return value;
1579        case 104524801: // achievementStatus
1580          this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1581          return value;
1582        case 50511102: // category
1583          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1584          return value;
1585        case 379114255: // continuous
1586          this.continuous = TypeConvertor.castToBoolean(value); // BooleanType
1587          return value;
1588        case -1165461084: // priority
1589          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1590          return value;
1591        case -1724546052: // description
1592          this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1593          return value;
1594        case -1867885268: // subject
1595          this.subject = TypeConvertor.castToReference(value); // Reference
1596          return value;
1597        case 109757538: // start
1598          this.start = TypeConvertor.castToType(value); // DataType
1599          return value;
1600        case -880905839: // target
1601          this.getTarget().add((GoalTargetComponent) value); // GoalTargetComponent
1602          return value;
1603        case 247524032: // statusDate
1604          this.statusDate = TypeConvertor.castToDate(value); // DateType
1605          return value;
1606        case 2051346646: // statusReason
1607          this.statusReason = TypeConvertor.castToString(value); // StringType
1608          return value;
1609        case -896505829: // source
1610          this.source = TypeConvertor.castToReference(value); // Reference
1611          return value;
1612        case 874544034: // addresses
1613          this.getAddresses().add(TypeConvertor.castToReference(value)); // Reference
1614          return value;
1615        case 3387378: // note
1616          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1617          return value;
1618        case -1106507950: // outcome
1619          this.getOutcome().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1620          return value;
1621        default: return super.setProperty(hash, name, value);
1622        }
1623
1624      }
1625
1626      @Override
1627      public Base setProperty(String name, Base value) throws FHIRException {
1628        if (name.equals("identifier")) {
1629          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1630        } else if (name.equals("lifecycleStatus")) {
1631          value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1632          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1633        } else if (name.equals("achievementStatus")) {
1634          this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1635        } else if (name.equals("category")) {
1636          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1637        } else if (name.equals("continuous")) {
1638          this.continuous = TypeConvertor.castToBoolean(value); // BooleanType
1639        } else if (name.equals("priority")) {
1640          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1641        } else if (name.equals("description")) {
1642          this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1643        } else if (name.equals("subject")) {
1644          this.subject = TypeConvertor.castToReference(value); // Reference
1645        } else if (name.equals("start[x]")) {
1646          this.start = TypeConvertor.castToType(value); // DataType
1647        } else if (name.equals("target")) {
1648          this.getTarget().add((GoalTargetComponent) value);
1649        } else if (name.equals("statusDate")) {
1650          this.statusDate = TypeConvertor.castToDate(value); // DateType
1651        } else if (name.equals("statusReason")) {
1652          this.statusReason = TypeConvertor.castToString(value); // StringType
1653        } else if (name.equals("source")) {
1654          this.source = TypeConvertor.castToReference(value); // Reference
1655        } else if (name.equals("addresses")) {
1656          this.getAddresses().add(TypeConvertor.castToReference(value));
1657        } else if (name.equals("note")) {
1658          this.getNote().add(TypeConvertor.castToAnnotation(value));
1659        } else if (name.equals("outcome")) {
1660          this.getOutcome().add(TypeConvertor.castToCodeableReference(value));
1661        } else
1662          return super.setProperty(name, value);
1663        return value;
1664      }
1665
1666      @Override
1667      public Base makeProperty(int hash, String name) throws FHIRException {
1668        switch (hash) {
1669        case -1618432855:  return addIdentifier(); 
1670        case 1165552636:  return getLifecycleStatusElement();
1671        case 104524801:  return getAchievementStatus();
1672        case 50511102:  return addCategory(); 
1673        case 379114255:  return getContinuousElement();
1674        case -1165461084:  return getPriority();
1675        case -1724546052:  return getDescription();
1676        case -1867885268:  return getSubject();
1677        case 1316793566:  return getStart();
1678        case 109757538:  return getStart();
1679        case -880905839:  return addTarget(); 
1680        case 247524032:  return getStatusDateElement();
1681        case 2051346646:  return getStatusReasonElement();
1682        case -896505829:  return getSource();
1683        case 874544034:  return addAddresses(); 
1684        case 3387378:  return addNote(); 
1685        case -1106507950:  return addOutcome(); 
1686        default: return super.makeProperty(hash, name);
1687        }
1688
1689      }
1690
1691      @Override
1692      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1693        switch (hash) {
1694        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1695        case 1165552636: /*lifecycleStatus*/ return new String[] {"code"};
1696        case 104524801: /*achievementStatus*/ return new String[] {"CodeableConcept"};
1697        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1698        case 379114255: /*continuous*/ return new String[] {"boolean"};
1699        case -1165461084: /*priority*/ return new String[] {"CodeableConcept"};
1700        case -1724546052: /*description*/ return new String[] {"CodeableConcept"};
1701        case -1867885268: /*subject*/ return new String[] {"Reference"};
1702        case 109757538: /*start*/ return new String[] {"date", "CodeableConcept"};
1703        case -880905839: /*target*/ return new String[] {};
1704        case 247524032: /*statusDate*/ return new String[] {"date"};
1705        case 2051346646: /*statusReason*/ return new String[] {"string"};
1706        case -896505829: /*source*/ return new String[] {"Reference"};
1707        case 874544034: /*addresses*/ return new String[] {"Reference"};
1708        case 3387378: /*note*/ return new String[] {"Annotation"};
1709        case -1106507950: /*outcome*/ return new String[] {"CodeableReference"};
1710        default: return super.getTypesForProperty(hash, name);
1711        }
1712
1713      }
1714
1715      @Override
1716      public Base addChild(String name) throws FHIRException {
1717        if (name.equals("identifier")) {
1718          return addIdentifier();
1719        }
1720        else if (name.equals("lifecycleStatus")) {
1721          throw new FHIRException("Cannot call addChild on a singleton property Goal.lifecycleStatus");
1722        }
1723        else if (name.equals("achievementStatus")) {
1724          this.achievementStatus = new CodeableConcept();
1725          return this.achievementStatus;
1726        }
1727        else if (name.equals("category")) {
1728          return addCategory();
1729        }
1730        else if (name.equals("continuous")) {
1731          throw new FHIRException("Cannot call addChild on a singleton property Goal.continuous");
1732        }
1733        else if (name.equals("priority")) {
1734          this.priority = new CodeableConcept();
1735          return this.priority;
1736        }
1737        else if (name.equals("description")) {
1738          this.description = new CodeableConcept();
1739          return this.description;
1740        }
1741        else if (name.equals("subject")) {
1742          this.subject = new Reference();
1743          return this.subject;
1744        }
1745        else if (name.equals("startDate")) {
1746          this.start = new DateType();
1747          return this.start;
1748        }
1749        else if (name.equals("startCodeableConcept")) {
1750          this.start = new CodeableConcept();
1751          return this.start;
1752        }
1753        else if (name.equals("target")) {
1754          return addTarget();
1755        }
1756        else if (name.equals("statusDate")) {
1757          throw new FHIRException("Cannot call addChild on a singleton property Goal.statusDate");
1758        }
1759        else if (name.equals("statusReason")) {
1760          throw new FHIRException("Cannot call addChild on a singleton property Goal.statusReason");
1761        }
1762        else if (name.equals("source")) {
1763          this.source = new Reference();
1764          return this.source;
1765        }
1766        else if (name.equals("addresses")) {
1767          return addAddresses();
1768        }
1769        else if (name.equals("note")) {
1770          return addNote();
1771        }
1772        else if (name.equals("outcome")) {
1773          return addOutcome();
1774        }
1775        else
1776          return super.addChild(name);
1777      }
1778
1779  public String fhirType() {
1780    return "Goal";
1781
1782  }
1783
1784      public Goal copy() {
1785        Goal dst = new Goal();
1786        copyValues(dst);
1787        return dst;
1788      }
1789
1790      public void copyValues(Goal dst) {
1791        super.copyValues(dst);
1792        if (identifier != null) {
1793          dst.identifier = new ArrayList<Identifier>();
1794          for (Identifier i : identifier)
1795            dst.identifier.add(i.copy());
1796        };
1797        dst.lifecycleStatus = lifecycleStatus == null ? null : lifecycleStatus.copy();
1798        dst.achievementStatus = achievementStatus == null ? null : achievementStatus.copy();
1799        if (category != null) {
1800          dst.category = new ArrayList<CodeableConcept>();
1801          for (CodeableConcept i : category)
1802            dst.category.add(i.copy());
1803        };
1804        dst.continuous = continuous == null ? null : continuous.copy();
1805        dst.priority = priority == null ? null : priority.copy();
1806        dst.description = description == null ? null : description.copy();
1807        dst.subject = subject == null ? null : subject.copy();
1808        dst.start = start == null ? null : start.copy();
1809        if (target != null) {
1810          dst.target = new ArrayList<GoalTargetComponent>();
1811          for (GoalTargetComponent i : target)
1812            dst.target.add(i.copy());
1813        };
1814        dst.statusDate = statusDate == null ? null : statusDate.copy();
1815        dst.statusReason = statusReason == null ? null : statusReason.copy();
1816        dst.source = source == null ? null : source.copy();
1817        if (addresses != null) {
1818          dst.addresses = new ArrayList<Reference>();
1819          for (Reference i : addresses)
1820            dst.addresses.add(i.copy());
1821        };
1822        if (note != null) {
1823          dst.note = new ArrayList<Annotation>();
1824          for (Annotation i : note)
1825            dst.note.add(i.copy());
1826        };
1827        if (outcome != null) {
1828          dst.outcome = new ArrayList<CodeableReference>();
1829          for (CodeableReference i : outcome)
1830            dst.outcome.add(i.copy());
1831        };
1832      }
1833
1834      protected Goal typedCopy() {
1835        return copy();
1836      }
1837
1838      @Override
1839      public boolean equalsDeep(Base other_) {
1840        if (!super.equalsDeep(other_))
1841          return false;
1842        if (!(other_ instanceof Goal))
1843          return false;
1844        Goal o = (Goal) other_;
1845        return compareDeep(identifier, o.identifier, true) && compareDeep(lifecycleStatus, o.lifecycleStatus, true)
1846           && compareDeep(achievementStatus, o.achievementStatus, true) && compareDeep(category, o.category, true)
1847           && compareDeep(continuous, o.continuous, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true)
1848           && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true) && compareDeep(target, o.target, true)
1849           && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true)
1850           && compareDeep(source, o.source, true) && compareDeep(addresses, o.addresses, true) && compareDeep(note, o.note, true)
1851           && compareDeep(outcome, o.outcome, true);
1852      }
1853
1854      @Override
1855      public boolean equalsShallow(Base other_) {
1856        if (!super.equalsShallow(other_))
1857          return false;
1858        if (!(other_ instanceof Goal))
1859          return false;
1860        Goal o = (Goal) other_;
1861        return compareValues(lifecycleStatus, o.lifecycleStatus, true) && compareValues(continuous, o.continuous, true)
1862           && compareValues(statusDate, o.statusDate, true) && compareValues(statusReason, o.statusReason, true)
1863          ;
1864      }
1865
1866      public boolean isEmpty() {
1867        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, lifecycleStatus
1868          , achievementStatus, category, continuous, priority, description, subject, start
1869          , target, statusDate, statusReason, source, addresses, note, outcome);
1870      }
1871
1872  @Override
1873  public ResourceType getResourceType() {
1874    return ResourceType.Goal;
1875   }
1876
1877 /**
1878   * Search parameter: <b>achievement-status</b>
1879   * <p>
1880   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
1881   * Type: <b>token</b><br>
1882   * Path: <b>Goal.achievementStatus</b><br>
1883   * </p>
1884   */
1885  @SearchParamDefinition(name="achievement-status", path="Goal.achievementStatus", description="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", type="token" )
1886  public static final String SP_ACHIEVEMENT_STATUS = "achievement-status";
1887 /**
1888   * <b>Fluent Client</b> search parameter constant for <b>achievement-status</b>
1889   * <p>
1890   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
1891   * Type: <b>token</b><br>
1892   * Path: <b>Goal.achievementStatus</b><br>
1893   * </p>
1894   */
1895  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACHIEVEMENT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACHIEVEMENT_STATUS);
1896
1897 /**
1898   * Search parameter: <b>addresses</b>
1899   * <p>
1900   * Description: <b>Issues addressed by this goal</b><br>
1901   * Type: <b>reference</b><br>
1902   * Path: <b>Goal.addresses</b><br>
1903   * </p>
1904   */
1905  @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 } )
1906  public static final String SP_ADDRESSES = "addresses";
1907 /**
1908   * <b>Fluent Client</b> search parameter constant for <b>addresses</b>
1909   * <p>
1910   * Description: <b>Issues addressed by this goal</b><br>
1911   * Type: <b>reference</b><br>
1912   * Path: <b>Goal.addresses</b><br>
1913   * </p>
1914   */
1915  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ADDRESSES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ADDRESSES);
1916
1917/**
1918   * Constant for fluent queries to be used to add include statements. Specifies
1919   * the path value of "<b>Goal:addresses</b>".
1920   */
1921  public static final ca.uhn.fhir.model.api.Include INCLUDE_ADDRESSES = new ca.uhn.fhir.model.api.Include("Goal:addresses").toLocked();
1922
1923 /**
1924   * Search parameter: <b>category</b>
1925   * <p>
1926   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
1927   * Type: <b>token</b><br>
1928   * Path: <b>Goal.category</b><br>
1929   * </p>
1930   */
1931  @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" )
1932  public static final String SP_CATEGORY = "category";
1933 /**
1934   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1935   * <p>
1936   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
1937   * Type: <b>token</b><br>
1938   * Path: <b>Goal.category</b><br>
1939   * </p>
1940   */
1941  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1942
1943 /**
1944   * Search parameter: <b>description</b>
1945   * <p>
1946   * Description: <b>Code or text describing goal</b><br>
1947   * Type: <b>token</b><br>
1948   * Path: <b>Goal.description</b><br>
1949   * </p>
1950   */
1951  @SearchParamDefinition(name="description", path="Goal.description", description="Code or text describing goal", type="token" )
1952  public static final String SP_DESCRIPTION = "description";
1953 /**
1954   * <b>Fluent Client</b> search parameter constant for <b>description</b>
1955   * <p>
1956   * Description: <b>Code or text describing goal</b><br>
1957   * Type: <b>token</b><br>
1958   * Path: <b>Goal.description</b><br>
1959   * </p>
1960   */
1961  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DESCRIPTION);
1962
1963 /**
1964   * Search parameter: <b>lifecycle-status</b>
1965   * <p>
1966   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
1967   * Type: <b>token</b><br>
1968   * Path: <b>Goal.lifecycleStatus</b><br>
1969   * </p>
1970   */
1971  @SearchParamDefinition(name="lifecycle-status", path="Goal.lifecycleStatus", description="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", type="token" )
1972  public static final String SP_LIFECYCLE_STATUS = "lifecycle-status";
1973 /**
1974   * <b>Fluent Client</b> search parameter constant for <b>lifecycle-status</b>
1975   * <p>
1976   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
1977   * Type: <b>token</b><br>
1978   * Path: <b>Goal.lifecycleStatus</b><br>
1979   * </p>
1980   */
1981  public static final ca.uhn.fhir.rest.gclient.TokenClientParam LIFECYCLE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LIFECYCLE_STATUS);
1982
1983 /**
1984   * Search parameter: <b>start-date</b>
1985   * <p>
1986   * Description: <b>When goal pursuit begins</b><br>
1987   * Type: <b>date</b><br>
1988   * Path: <b>(Goal.start.ofType(date))</b><br>
1989   * </p>
1990   */
1991  @SearchParamDefinition(name="start-date", path="(Goal.start.ofType(date))", description="When goal pursuit begins", type="date" )
1992  public static final String SP_START_DATE = "start-date";
1993 /**
1994   * <b>Fluent Client</b> search parameter constant for <b>start-date</b>
1995   * <p>
1996   * Description: <b>When goal pursuit begins</b><br>
1997   * Type: <b>date</b><br>
1998   * Path: <b>(Goal.start.ofType(date))</b><br>
1999   * </p>
2000   */
2001  public static final ca.uhn.fhir.rest.gclient.DateClientParam START_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START_DATE);
2002
2003 /**
2004   * Search parameter: <b>subject</b>
2005   * <p>
2006   * Description: <b>Who this goal is intended for</b><br>
2007   * Type: <b>reference</b><br>
2008   * Path: <b>Goal.subject</b><br>
2009   * </p>
2010   */
2011  @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference", target={Group.class, Organization.class, Patient.class } )
2012  public static final String SP_SUBJECT = "subject";
2013 /**
2014   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2015   * <p>
2016   * Description: <b>Who this goal is intended for</b><br>
2017   * Type: <b>reference</b><br>
2018   * Path: <b>Goal.subject</b><br>
2019   * </p>
2020   */
2021  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2022
2023/**
2024   * Constant for fluent queries to be used to add include statements. Specifies
2025   * the path value of "<b>Goal:subject</b>".
2026   */
2027  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Goal:subject").toLocked();
2028
2029 /**
2030   * Search parameter: <b>target-date</b>
2031   * <p>
2032   * Description: <b>Reach goal on or before</b><br>
2033   * Type: <b>date</b><br>
2034   * Path: <b>(Goal.target.due.ofType(date))</b><br>
2035   * </p>
2036   */
2037  @SearchParamDefinition(name="target-date", path="(Goal.target.due.ofType(date))", description="Reach goal on or before", type="date" )
2038  public static final String SP_TARGET_DATE = "target-date";
2039 /**
2040   * <b>Fluent Client</b> search parameter constant for <b>target-date</b>
2041   * <p>
2042   * Description: <b>Reach goal on or before</b><br>
2043   * Type: <b>date</b><br>
2044   * Path: <b>(Goal.target.due.ofType(date))</b><br>
2045   * </p>
2046   */
2047  public static final ca.uhn.fhir.rest.gclient.DateClientParam TARGET_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TARGET_DATE);
2048
2049 /**
2050   * Search parameter: <b>target-measure</b>
2051   * <p>
2052   * Description: <b>The parameter whose value is being tracked</b><br>
2053   * Type: <b>token</b><br>
2054   * Path: <b>Goal.target.measure</b><br>
2055   * </p>
2056   */
2057  @SearchParamDefinition(name="target-measure", path="Goal.target.measure", description="The parameter whose value is being tracked", type="token" )
2058  public static final String SP_TARGET_MEASURE = "target-measure";
2059 /**
2060   * <b>Fluent Client</b> search parameter constant for <b>target-measure</b>
2061   * <p>
2062   * Description: <b>The parameter whose value is being tracked</b><br>
2063   * Type: <b>token</b><br>
2064   * Path: <b>Goal.target.measure</b><br>
2065   * </p>
2066   */
2067  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_MEASURE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_MEASURE);
2068
2069 /**
2070   * Search parameter: <b>identifier</b>
2071   * <p>
2072   * Description: <b>Multiple Resources: 
2073
2074* [Account](account.html): Account number
2075* [AdverseEvent](adverseevent.html): Business identifier for the event
2076* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2077* [Appointment](appointment.html): An Identifier of the Appointment
2078* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2079* [Basic](basic.html): Business identifier
2080* [BodyStructure](bodystructure.html): Bodystructure identifier
2081* [CarePlan](careplan.html): External Ids for this plan
2082* [CareTeam](careteam.html): External Ids for this team
2083* [ChargeItem](chargeitem.html): Business Identifier for item
2084* [Claim](claim.html): The primary identifier of the financial resource
2085* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2086* [ClinicalImpression](clinicalimpression.html): Business identifier
2087* [Communication](communication.html): Unique identifier
2088* [CommunicationRequest](communicationrequest.html): Unique identifier
2089* [Composition](composition.html): Version-independent identifier for the Composition
2090* [Condition](condition.html): A unique identifier of the condition record
2091* [Consent](consent.html): Identifier for this record (external references)
2092* [Contract](contract.html): The identity of the contract
2093* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2094* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2095* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2096* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2097* [DeviceRequest](devicerequest.html): Business identifier for request/order
2098* [DeviceUsage](deviceusage.html): Search by identifier
2099* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2100* [DocumentReference](documentreference.html): Identifier of the attachment binary
2101* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2102* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2103* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2104* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2105* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2106* [Flag](flag.html): Business identifier
2107* [Goal](goal.html): External Ids for this goal
2108* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2109* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2110* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2111* [Immunization](immunization.html): Business identifier
2112* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2113* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2114* [Invoice](invoice.html): Business Identifier for item
2115* [List](list.html): Business identifier
2116* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2117* [Medication](medication.html): Returns medications with this external identifier
2118* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2119* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2120* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2121* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2122* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2123* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2124* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2125* [Observation](observation.html): The unique id for a particular observation
2126* [Person](person.html): A person Identifier
2127* [Procedure](procedure.html): A unique identifier for a procedure
2128* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2129* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2130* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2131* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2132* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2133* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2134* [Specimen](specimen.html): The unique identifier associated with the specimen
2135* [SupplyDelivery](supplydelivery.html): External identifier
2136* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2137* [Task](task.html): Search for a task instance by its business identifier
2138* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2139</b><br>
2140   * Type: <b>token</b><br>
2141   * 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>
2142   * </p>
2143   */
2144  @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" )
2145  public static final String SP_IDENTIFIER = "identifier";
2146 /**
2147   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2148   * <p>
2149   * Description: <b>Multiple Resources: 
2150
2151* [Account](account.html): Account number
2152* [AdverseEvent](adverseevent.html): Business identifier for the event
2153* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2154* [Appointment](appointment.html): An Identifier of the Appointment
2155* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2156* [Basic](basic.html): Business identifier
2157* [BodyStructure](bodystructure.html): Bodystructure identifier
2158* [CarePlan](careplan.html): External Ids for this plan
2159* [CareTeam](careteam.html): External Ids for this team
2160* [ChargeItem](chargeitem.html): Business Identifier for item
2161* [Claim](claim.html): The primary identifier of the financial resource
2162* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2163* [ClinicalImpression](clinicalimpression.html): Business identifier
2164* [Communication](communication.html): Unique identifier
2165* [CommunicationRequest](communicationrequest.html): Unique identifier
2166* [Composition](composition.html): Version-independent identifier for the Composition
2167* [Condition](condition.html): A unique identifier of the condition record
2168* [Consent](consent.html): Identifier for this record (external references)
2169* [Contract](contract.html): The identity of the contract
2170* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2171* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2172* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2173* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2174* [DeviceRequest](devicerequest.html): Business identifier for request/order
2175* [DeviceUsage](deviceusage.html): Search by identifier
2176* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2177* [DocumentReference](documentreference.html): Identifier of the attachment binary
2178* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2179* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2180* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2181* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2182* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2183* [Flag](flag.html): Business identifier
2184* [Goal](goal.html): External Ids for this goal
2185* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2186* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2187* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2188* [Immunization](immunization.html): Business identifier
2189* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2190* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2191* [Invoice](invoice.html): Business Identifier for item
2192* [List](list.html): Business identifier
2193* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2194* [Medication](medication.html): Returns medications with this external identifier
2195* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2196* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2197* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2198* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2199* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2200* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2201* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2202* [Observation](observation.html): The unique id for a particular observation
2203* [Person](person.html): A person Identifier
2204* [Procedure](procedure.html): A unique identifier for a procedure
2205* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2206* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2207* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2208* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2209* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2210* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2211* [Specimen](specimen.html): The unique identifier associated with the specimen
2212* [SupplyDelivery](supplydelivery.html): External identifier
2213* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2214* [Task](task.html): Search for a task instance by its business identifier
2215* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2216</b><br>
2217   * Type: <b>token</b><br>
2218   * 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>
2219   * </p>
2220   */
2221  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2222
2223 /**
2224   * Search parameter: <b>patient</b>
2225   * <p>
2226   * Description: <b>Multiple Resources: 
2227
2228* [Account](account.html): The entity that caused the expenses
2229* [AdverseEvent](adverseevent.html): Subject impacted by event
2230* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2231* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2232* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2233* [AuditEvent](auditevent.html): Where the activity involved patient data
2234* [Basic](basic.html): Identifies the focus of this resource
2235* [BodyStructure](bodystructure.html): Who this is about
2236* [CarePlan](careplan.html): Who the care plan is for
2237* [CareTeam](careteam.html): Who care team is for
2238* [ChargeItem](chargeitem.html): Individual service was done for/to
2239* [Claim](claim.html): Patient receiving the products or services
2240* [ClaimResponse](claimresponse.html): The subject of care
2241* [ClinicalImpression](clinicalimpression.html): Patient assessed
2242* [Communication](communication.html): Focus of message
2243* [CommunicationRequest](communicationrequest.html): Focus of message
2244* [Composition](composition.html): Who and/or what the composition is about
2245* [Condition](condition.html): Who has the condition?
2246* [Consent](consent.html): Who the consent applies to
2247* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2248* [Coverage](coverage.html): Retrieve coverages for a patient
2249* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2250* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2251* [DetectedIssue](detectedissue.html): Associated patient
2252* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2253* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2254* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2255* [DocumentReference](documentreference.html): Who/what is the subject of the document
2256* [Encounter](encounter.html): The patient present at the encounter
2257* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2258* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2259* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2260* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2261* [Flag](flag.html): The identity of a subject to list flags for
2262* [Goal](goal.html): Who this goal is intended for
2263* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2264* [ImagingSelection](imagingselection.html): Who the study is about
2265* [ImagingStudy](imagingstudy.html): Who the study is about
2266* [Immunization](immunization.html): The patient for the vaccination record
2267* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2268* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2269* [Invoice](invoice.html): Recipient(s) of goods and services
2270* [List](list.html): If all resources have the same subject
2271* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2272* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2273* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2274* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2275* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2276* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2277* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2278* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2279* [Observation](observation.html): The subject that the observation is about (if patient)
2280* [Person](person.html): The Person links to this Patient
2281* [Procedure](procedure.html): Search by subject - a patient
2282* [Provenance](provenance.html): Where the activity involved patient data
2283* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2284* [RelatedPerson](relatedperson.html): The patient this related person is related to
2285* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2286* [ResearchSubject](researchsubject.html): Who or what is part of study
2287* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2288* [ServiceRequest](servicerequest.html): Search by subject - a patient
2289* [Specimen](specimen.html): The patient the specimen comes from
2290* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2291* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2292* [Task](task.html): Search by patient
2293* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2294</b><br>
2295   * Type: <b>reference</b><br>
2296   * 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>
2297   * </p>
2298   */
2299  @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 } )
2300  public static final String SP_PATIENT = "patient";
2301 /**
2302   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2303   * <p>
2304   * Description: <b>Multiple Resources: 
2305
2306* [Account](account.html): The entity that caused the expenses
2307* [AdverseEvent](adverseevent.html): Subject impacted by event
2308* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2309* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2310* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2311* [AuditEvent](auditevent.html): Where the activity involved patient data
2312* [Basic](basic.html): Identifies the focus of this resource
2313* [BodyStructure](bodystructure.html): Who this is about
2314* [CarePlan](careplan.html): Who the care plan is for
2315* [CareTeam](careteam.html): Who care team is for
2316* [ChargeItem](chargeitem.html): Individual service was done for/to
2317* [Claim](claim.html): Patient receiving the products or services
2318* [ClaimResponse](claimresponse.html): The subject of care
2319* [ClinicalImpression](clinicalimpression.html): Patient assessed
2320* [Communication](communication.html): Focus of message
2321* [CommunicationRequest](communicationrequest.html): Focus of message
2322* [Composition](composition.html): Who and/or what the composition is about
2323* [Condition](condition.html): Who has the condition?
2324* [Consent](consent.html): Who the consent applies to
2325* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2326* [Coverage](coverage.html): Retrieve coverages for a patient
2327* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2328* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2329* [DetectedIssue](detectedissue.html): Associated patient
2330* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2331* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2332* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2333* [DocumentReference](documentreference.html): Who/what is the subject of the document
2334* [Encounter](encounter.html): The patient present at the encounter
2335* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2336* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2337* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2338* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2339* [Flag](flag.html): The identity of a subject to list flags for
2340* [Goal](goal.html): Who this goal is intended for
2341* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2342* [ImagingSelection](imagingselection.html): Who the study is about
2343* [ImagingStudy](imagingstudy.html): Who the study is about
2344* [Immunization](immunization.html): The patient for the vaccination record
2345* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2346* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2347* [Invoice](invoice.html): Recipient(s) of goods and services
2348* [List](list.html): If all resources have the same subject
2349* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2350* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2351* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2352* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2353* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2354* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2355* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2356* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2357* [Observation](observation.html): The subject that the observation is about (if patient)
2358* [Person](person.html): The Person links to this Patient
2359* [Procedure](procedure.html): Search by subject - a patient
2360* [Provenance](provenance.html): Where the activity involved patient data
2361* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2362* [RelatedPerson](relatedperson.html): The patient this related person is related to
2363* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2364* [ResearchSubject](researchsubject.html): Who or what is part of study
2365* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2366* [ServiceRequest](servicerequest.html): Search by subject - a patient
2367* [Specimen](specimen.html): The patient the specimen comes from
2368* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2369* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2370* [Task](task.html): Search by patient
2371* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2372</b><br>
2373   * Type: <b>reference</b><br>
2374   * 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>
2375   * </p>
2376   */
2377  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2378
2379/**
2380   * Constant for fluent queries to be used to add include statements. Specifies
2381   * the path value of "<b>Goal:patient</b>".
2382   */
2383  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Goal:patient").toLocked();
2384
2385
2386}
2387