001package org.hl7.fhir.r4.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import ca.uhn.fhir.model.api.annotation.ResourceDef;
041import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
042import ca.uhn.fhir.model.api.annotation.Child;
043import ca.uhn.fhir.model.api.annotation.ChildOrder;
044import ca.uhn.fhir.model.api.annotation.Description;
045import ca.uhn.fhir.model.api.annotation.Block;
046import org.hl7.fhir.instance.model.api.*;
047import org.hl7.fhir.exceptions.FHIRException;
048/**
049 * 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.
050 */
051@ResourceDef(name="Goal", profile="http://hl7.org/fhir/StructureDefinition/Goal")
052public class Goal extends DomainResource {
053
054    public enum GoalLifecycleStatus {
055        /**
056         * A goal is proposed for this patient.
057         */
058        PROPOSED, 
059        /**
060         * A goal is planned for this patient.
061         */
062        PLANNED, 
063        /**
064         * A proposed goal was accepted or acknowledged.
065         */
066        ACCEPTED, 
067        /**
068         * The goal is being sought actively.
069         */
070        ACTIVE, 
071        /**
072         * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.
073         */
074        ONHOLD, 
075        /**
076         * The goal is no longer being sought.
077         */
078        COMPLETED, 
079        /**
080         * The goal has been abandoned.
081         */
082        CANCELLED, 
083        /**
084         * The goal was entered in error and voided.
085         */
086        ENTEREDINERROR, 
087        /**
088         * A proposed goal was rejected.
089         */
090        REJECTED, 
091        /**
092         * added to help the parsers with the generic types
093         */
094        NULL;
095        public static GoalLifecycleStatus fromCode(String codeString) throws FHIRException {
096            if (codeString == null || "".equals(codeString))
097                return null;
098        if ("proposed".equals(codeString))
099          return PROPOSED;
100        if ("planned".equals(codeString))
101          return PLANNED;
102        if ("accepted".equals(codeString))
103          return ACCEPTED;
104        if ("active".equals(codeString))
105          return ACTIVE;
106        if ("on-hold".equals(codeString))
107          return ONHOLD;
108        if ("completed".equals(codeString))
109          return COMPLETED;
110        if ("cancelled".equals(codeString))
111          return CANCELLED;
112        if ("entered-in-error".equals(codeString))
113          return ENTEREDINERROR;
114        if ("rejected".equals(codeString))
115          return REJECTED;
116        if (Configuration.isAcceptInvalidEnums())
117          return null;
118        else
119          throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'");
120        }
121        public String toCode() {
122          switch (this) {
123            case PROPOSED: return "proposed";
124            case PLANNED: return "planned";
125            case ACCEPTED: return "accepted";
126            case ACTIVE: return "active";
127            case ONHOLD: return "on-hold";
128            case COMPLETED: return "completed";
129            case CANCELLED: return "cancelled";
130            case ENTEREDINERROR: return "entered-in-error";
131            case REJECTED: return "rejected";
132            case NULL: return null;
133            default: return "?";
134          }
135        }
136        public String getSystem() {
137          switch (this) {
138            case PROPOSED: return "http://hl7.org/fhir/goal-status";
139            case PLANNED: return "http://hl7.org/fhir/goal-status";
140            case ACCEPTED: return "http://hl7.org/fhir/goal-status";
141            case ACTIVE: return "http://hl7.org/fhir/goal-status";
142            case ONHOLD: return "http://hl7.org/fhir/goal-status";
143            case COMPLETED: return "http://hl7.org/fhir/goal-status";
144            case CANCELLED: return "http://hl7.org/fhir/goal-status";
145            case ENTEREDINERROR: return "http://hl7.org/fhir/goal-status";
146            case REJECTED: return "http://hl7.org/fhir/goal-status";
147            case NULL: return null;
148            default: return "?";
149          }
150        }
151        public String getDefinition() {
152          switch (this) {
153            case PROPOSED: return "A goal is proposed for this patient.";
154            case PLANNED: return "A goal is planned for this patient.";
155            case ACCEPTED: return "A proposed goal was accepted or acknowledged.";
156            case ACTIVE: return "The goal is being sought actively.";
157            case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.";
158            case COMPLETED: return "The goal is no longer being sought.";
159            case CANCELLED: return "The goal has been abandoned.";
160            case ENTEREDINERROR: return "The goal was entered in error and voided.";
161            case REJECTED: return "A proposed goal was rejected.";
162            case NULL: return null;
163            default: return "?";
164          }
165        }
166        public String getDisplay() {
167          switch (this) {
168            case PROPOSED: return "Proposed";
169            case PLANNED: return "Planned";
170            case ACCEPTED: return "Accepted";
171            case ACTIVE: return "Active";
172            case ONHOLD: return "On Hold";
173            case COMPLETED: return "Completed";
174            case CANCELLED: return "Cancelled";
175            case ENTEREDINERROR: return "Entered in Error";
176            case REJECTED: return "Rejected";
177            case NULL: return null;
178            default: return "?";
179          }
180        }
181    }
182
183  public static class GoalLifecycleStatusEnumFactory implements EnumFactory<GoalLifecycleStatus> {
184    public GoalLifecycleStatus fromCode(String codeString) throws IllegalArgumentException {
185      if (codeString == null || "".equals(codeString))
186            if (codeString == null || "".equals(codeString))
187                return null;
188        if ("proposed".equals(codeString))
189          return GoalLifecycleStatus.PROPOSED;
190        if ("planned".equals(codeString))
191          return GoalLifecycleStatus.PLANNED;
192        if ("accepted".equals(codeString))
193          return GoalLifecycleStatus.ACCEPTED;
194        if ("active".equals(codeString))
195          return GoalLifecycleStatus.ACTIVE;
196        if ("on-hold".equals(codeString))
197          return GoalLifecycleStatus.ONHOLD;
198        if ("completed".equals(codeString))
199          return GoalLifecycleStatus.COMPLETED;
200        if ("cancelled".equals(codeString))
201          return GoalLifecycleStatus.CANCELLED;
202        if ("entered-in-error".equals(codeString))
203          return GoalLifecycleStatus.ENTEREDINERROR;
204        if ("rejected".equals(codeString))
205          return GoalLifecycleStatus.REJECTED;
206        throw new IllegalArgumentException("Unknown GoalLifecycleStatus code '"+codeString+"'");
207        }
208        public Enumeration<GoalLifecycleStatus> fromType(Base code) throws FHIRException {
209          if (code == null)
210            return null;
211          if (code.isEmpty())
212            return new Enumeration<GoalLifecycleStatus>(this);
213          String codeString = ((PrimitiveType) code).asStringValue();
214          if (codeString == null || "".equals(codeString))
215            return null;
216        if ("proposed".equals(codeString))
217          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PROPOSED);
218        if ("planned".equals(codeString))
219          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PLANNED);
220        if ("accepted".equals(codeString))
221          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACCEPTED);
222        if ("active".equals(codeString))
223          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACTIVE);
224        if ("on-hold".equals(codeString))
225          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ONHOLD);
226        if ("completed".equals(codeString))
227          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.COMPLETED);
228        if ("cancelled".equals(codeString))
229          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.CANCELLED);
230        if ("entered-in-error".equals(codeString))
231          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ENTEREDINERROR);
232        if ("rejected".equals(codeString))
233          return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.REJECTED);
234        throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'");
235        }
236    public String toCode(GoalLifecycleStatus code) {
237      if (code == GoalLifecycleStatus.PROPOSED)
238        return "proposed";
239      if (code == GoalLifecycleStatus.PLANNED)
240        return "planned";
241      if (code == GoalLifecycleStatus.ACCEPTED)
242        return "accepted";
243      if (code == GoalLifecycleStatus.ACTIVE)
244        return "active";
245      if (code == GoalLifecycleStatus.ONHOLD)
246        return "on-hold";
247      if (code == GoalLifecycleStatus.COMPLETED)
248        return "completed";
249      if (code == GoalLifecycleStatus.CANCELLED)
250        return "cancelled";
251      if (code == GoalLifecycleStatus.ENTEREDINERROR)
252        return "entered-in-error";
253      if (code == GoalLifecycleStatus.REJECTED)
254        return "rejected";
255      return "?";
256      }
257    public String toSystem(GoalLifecycleStatus code) {
258      return code.getSystem();
259      }
260    }
261
262    @Block()
263    public static class GoalTargetComponent extends BackboneElement implements IBaseBackboneElement {
264        /**
265         * The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.
266         */
267        @Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
268        @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." )
269        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
270        protected CodeableConcept measure;
271
272        /**
273         * 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.
274         */
275        @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)
276        @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." )
277        protected Type detail;
278
279        /**
280         * Indicates either the date or the duration after start by which the goal should be met.
281         */
282        @Child(name = "due", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true)
283        @Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." )
284        protected Type due;
285
286        private static final long serialVersionUID = -585108934L;
287
288    /**
289     * Constructor
290     */
291      public GoalTargetComponent() {
292        super();
293      }
294
295        /**
296         * @return {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.)
297         */
298        public CodeableConcept getMeasure() { 
299          if (this.measure == null)
300            if (Configuration.errorOnAutoCreate())
301              throw new Error("Attempt to auto-create GoalTargetComponent.measure");
302            else if (Configuration.doAutoCreate())
303              this.measure = new CodeableConcept(); // cc
304          return this.measure;
305        }
306
307        public boolean hasMeasure() { 
308          return this.measure != null && !this.measure.isEmpty();
309        }
310
311        /**
312         * @param value {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.)
313         */
314        public GoalTargetComponent setMeasure(CodeableConcept value) { 
315          this.measure = value;
316          return this;
317        }
318
319        /**
320         * @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.)
321         */
322        public Type getDetail() { 
323          return this.detail;
324        }
325
326        /**
327         * @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.)
328         */
329        public Quantity getDetailQuantity() throws FHIRException { 
330          if (this.detail == null)
331            this.detail = new Quantity();
332          if (!(this.detail instanceof Quantity))
333            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered");
334          return (Quantity) this.detail;
335        }
336
337        public boolean hasDetailQuantity() { 
338          return this != null && this.detail instanceof Quantity;
339        }
340
341        /**
342         * @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.)
343         */
344        public Range getDetailRange() throws FHIRException { 
345          if (this.detail == null)
346            this.detail = new Range();
347          if (!(this.detail instanceof Range))
348            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered");
349          return (Range) this.detail;
350        }
351
352        public boolean hasDetailRange() { 
353          return this != null && this.detail instanceof Range;
354        }
355
356        /**
357         * @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.)
358         */
359        public CodeableConcept getDetailCodeableConcept() throws FHIRException { 
360          if (this.detail == null)
361            this.detail = new CodeableConcept();
362          if (!(this.detail instanceof CodeableConcept))
363            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered");
364          return (CodeableConcept) this.detail;
365        }
366
367        public boolean hasDetailCodeableConcept() { 
368          return this != null && this.detail instanceof CodeableConcept;
369        }
370
371        /**
372         * @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.)
373         */
374        public StringType getDetailStringType() throws FHIRException { 
375          if (this.detail == null)
376            this.detail = new StringType();
377          if (!(this.detail instanceof StringType))
378            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.detail.getClass().getName()+" was encountered");
379          return (StringType) this.detail;
380        }
381
382        public boolean hasDetailStringType() { 
383          return this != null && this.detail instanceof StringType;
384        }
385
386        /**
387         * @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.)
388         */
389        public BooleanType getDetailBooleanType() throws FHIRException { 
390          if (this.detail == null)
391            this.detail = new BooleanType();
392          if (!(this.detail instanceof BooleanType))
393            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.detail.getClass().getName()+" was encountered");
394          return (BooleanType) this.detail;
395        }
396
397        public boolean hasDetailBooleanType() { 
398          return this != null && this.detail instanceof BooleanType;
399        }
400
401        /**
402         * @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.)
403         */
404        public IntegerType getDetailIntegerType() throws FHIRException { 
405          if (this.detail == null)
406            this.detail = new IntegerType();
407          if (!(this.detail instanceof IntegerType))
408            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.detail.getClass().getName()+" was encountered");
409          return (IntegerType) this.detail;
410        }
411
412        public boolean hasDetailIntegerType() { 
413          return this != null && this.detail instanceof IntegerType;
414        }
415
416        /**
417         * @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.)
418         */
419        public Ratio getDetailRatio() throws FHIRException { 
420          if (this.detail == null)
421            this.detail = new Ratio();
422          if (!(this.detail instanceof Ratio))
423            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.detail.getClass().getName()+" was encountered");
424          return (Ratio) this.detail;
425        }
426
427        public boolean hasDetailRatio() { 
428          return this != null && this.detail instanceof Ratio;
429        }
430
431        public boolean hasDetail() { 
432          return this.detail != null && !this.detail.isEmpty();
433        }
434
435        /**
436         * @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.)
437         */
438        public GoalTargetComponent setDetail(Type value) { 
439          if (value != null && !(value instanceof Quantity || value instanceof Range || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Ratio))
440            throw new Error("Not the right type for Goal.target.detail[x]: "+value.fhirType());
441          this.detail = value;
442          return this;
443        }
444
445        /**
446         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
447         */
448        public Type getDue() { 
449          return this.due;
450        }
451
452        /**
453         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
454         */
455        public DateType getDueDateType() throws FHIRException { 
456          if (this.due == null)
457            this.due = new DateType();
458          if (!(this.due instanceof DateType))
459            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.due.getClass().getName()+" was encountered");
460          return (DateType) this.due;
461        }
462
463        public boolean hasDueDateType() { 
464          return this != null && this.due instanceof DateType;
465        }
466
467        /**
468         * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
469         */
470        public Duration getDueDuration() throws FHIRException { 
471          if (this.due == null)
472            this.due = new Duration();
473          if (!(this.due instanceof Duration))
474            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.due.getClass().getName()+" was encountered");
475          return (Duration) this.due;
476        }
477
478        public boolean hasDueDuration() { 
479          return this != null && this.due instanceof Duration;
480        }
481
482        public boolean hasDue() { 
483          return this.due != null && !this.due.isEmpty();
484        }
485
486        /**
487         * @param value {@link #due} (Indicates either the date or the duration after start by which the goal should be met.)
488         */
489        public GoalTargetComponent setDue(Type value) { 
490          if (value != null && !(value instanceof DateType || value instanceof Duration))
491            throw new Error("Not the right type for Goal.target.due[x]: "+value.fhirType());
492          this.due = value;
493          return this;
494        }
495
496        protected void listChildren(List<Property> children) {
497          super.listChildren(children);
498          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));
499          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));
500          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));
501        }
502
503        @Override
504        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
505          switch (_hash) {
506          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);
507          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);
508          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);
509          case -1313079300: /*detailQuantity*/  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 -2062632084: /*detailRange*/  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 -175586544: /*detailCodeableConcept*/  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);
512          case 529212354: /*detailString*/  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);
513          case 1172184727: /*detailBoolean*/  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);
514          case -1229442131: /*detailInteger*/  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);
515          case -2062626246: /*detailRatio*/  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);
516          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);
517          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);
518          case 2001063874: /*dueDate*/  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 -620428376: /*dueDuration*/  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          default: return super.getNamedProperty(_hash, _name, _checkValid);
521          }
522
523        }
524
525      @Override
526      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
527        switch (hash) {
528        case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept
529        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // Type
530        case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // Type
531        default: return super.getProperty(hash, name, checkValid);
532        }
533
534      }
535
536      @Override
537      public Base setProperty(int hash, String name, Base value) throws FHIRException {
538        switch (hash) {
539        case 938321246: // measure
540          this.measure = castToCodeableConcept(value); // CodeableConcept
541          return value;
542        case -1335224239: // detail
543          this.detail = castToType(value); // Type
544          return value;
545        case 99828: // due
546          this.due = castToType(value); // Type
547          return value;
548        default: return super.setProperty(hash, name, value);
549        }
550
551      }
552
553      @Override
554      public Base setProperty(String name, Base value) throws FHIRException {
555        if (name.equals("measure")) {
556          this.measure = castToCodeableConcept(value); // CodeableConcept
557        } else if (name.equals("detail[x]")) {
558          this.detail = castToType(value); // Type
559        } else if (name.equals("due[x]")) {
560          this.due = castToType(value); // Type
561        } else
562          return super.setProperty(name, value);
563        return value;
564      }
565
566      @Override
567      public Base makeProperty(int hash, String name) throws FHIRException {
568        switch (hash) {
569        case 938321246:  return getMeasure(); 
570        case -1973084529:  return getDetail(); 
571        case -1335224239:  return getDetail(); 
572        case -1320900084:  return getDue(); 
573        case 99828:  return getDue(); 
574        default: return super.makeProperty(hash, name);
575        }
576
577      }
578
579      @Override
580      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
581        switch (hash) {
582        case 938321246: /*measure*/ return new String[] {"CodeableConcept"};
583        case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept", "string", "boolean", "integer", "Ratio"};
584        case 99828: /*due*/ return new String[] {"date", "Duration"};
585        default: return super.getTypesForProperty(hash, name);
586        }
587
588      }
589
590      @Override
591      public Base addChild(String name) throws FHIRException {
592        if (name.equals("measure")) {
593          this.measure = new CodeableConcept();
594          return this.measure;
595        }
596        else if (name.equals("detailQuantity")) {
597          this.detail = new Quantity();
598          return this.detail;
599        }
600        else if (name.equals("detailRange")) {
601          this.detail = new Range();
602          return this.detail;
603        }
604        else if (name.equals("detailCodeableConcept")) {
605          this.detail = new CodeableConcept();
606          return this.detail;
607        }
608        else if (name.equals("detailString")) {
609          this.detail = new StringType();
610          return this.detail;
611        }
612        else if (name.equals("detailBoolean")) {
613          this.detail = new BooleanType();
614          return this.detail;
615        }
616        else if (name.equals("detailInteger")) {
617          this.detail = new IntegerType();
618          return this.detail;
619        }
620        else if (name.equals("detailRatio")) {
621          this.detail = new Ratio();
622          return this.detail;
623        }
624        else if (name.equals("dueDate")) {
625          this.due = new DateType();
626          return this.due;
627        }
628        else if (name.equals("dueDuration")) {
629          this.due = new Duration();
630          return this.due;
631        }
632        else
633          return super.addChild(name);
634      }
635
636      public GoalTargetComponent copy() {
637        GoalTargetComponent dst = new GoalTargetComponent();
638        copyValues(dst);
639        return dst;
640      }
641
642      public void copyValues(GoalTargetComponent dst) {
643        super.copyValues(dst);
644        dst.measure = measure == null ? null : measure.copy();
645        dst.detail = detail == null ? null : detail.copy();
646        dst.due = due == null ? null : due.copy();
647      }
648
649      @Override
650      public boolean equalsDeep(Base other_) {
651        if (!super.equalsDeep(other_))
652          return false;
653        if (!(other_ instanceof GoalTargetComponent))
654          return false;
655        GoalTargetComponent o = (GoalTargetComponent) other_;
656        return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true)
657          ;
658      }
659
660      @Override
661      public boolean equalsShallow(Base other_) {
662        if (!super.equalsShallow(other_))
663          return false;
664        if (!(other_ instanceof GoalTargetComponent))
665          return false;
666        GoalTargetComponent o = (GoalTargetComponent) other_;
667        return true;
668      }
669
670      public boolean isEmpty() {
671        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due);
672      }
673
674  public String fhirType() {
675    return "Goal.target";
676
677  }
678
679  }
680
681    /**
682     * 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.
683     */
684    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
685    @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." )
686    protected List<Identifier> identifier;
687
688    /**
689     * The state of the goal throughout its lifecycle.
690     */
691    @Child(name = "lifecycleStatus", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
692    @Description(shortDefinition="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", formalDefinition="The state of the goal throughout its lifecycle." )
693    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-status")
694    protected Enumeration<GoalLifecycleStatus> lifecycleStatus;
695
696    /**
697     * Describes the progression, or lack thereof, towards the goal against the target.
698     */
699    @Child(name = "achievementStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
700    @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." )
701    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-achievement")
702    protected CodeableConcept achievementStatus;
703
704    /**
705     * Indicates a category the goal falls within.
706     */
707    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
708    @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc.", formalDefinition="Indicates a category the goal falls within." )
709    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category")
710    protected List<CodeableConcept> category;
711
712    /**
713     * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.
714     */
715    @Child(name = "priority", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
716    @Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." )
717    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority")
718    protected CodeableConcept priority;
719
720    /**
721     * 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".
722     */
723    @Child(name = "description", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true)
724    @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\"." )
725    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
726    protected CodeableConcept description;
727
728    /**
729     * Identifies the patient, group or organization for whom the goal is being established.
730     */
731    @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=6, min=1, max=1, modifier=false, summary=true)
732    @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." )
733    protected Reference subject;
734
735    /**
736     * The actual object that is the target of the reference (Identifies the patient, group or organization for whom the goal is being established.)
737     */
738    protected Resource subjectTarget;
739
740    /**
741     * The date or event after which the goal should begin being pursued.
742     */
743    @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
744    @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." )
745    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event")
746    protected Type start;
747
748    /**
749     * Indicates what should be done by when.
750     */
751    @Child(name = "target", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
752    @Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done by when." )
753    protected List<GoalTargetComponent> target;
754
755    /**
756     * Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
757     */
758    @Child(name = "statusDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=true)
759    @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc." )
760    protected DateType statusDate;
761
762    /**
763     * Captures the reason for the current status.
764     */
765    @Child(name = "statusReason", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
766    @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." )
767    protected StringType statusReason;
768
769    /**
770     * Indicates whose goal this is - patient goal, practitioner goal, etc.
771     */
772    @Child(name = "expressedBy", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=11, min=0, max=1, modifier=false, summary=true)
773    @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." )
774    protected Reference expressedBy;
775
776    /**
777     * The actual object that is the target of the reference (Indicates whose goal this is - patient goal, practitioner goal, etc.)
778     */
779    protected Resource expressedByTarget;
780
781    /**
782     * The identified conditions and other health record elements that are intended to be addressed by the goal.
783     */
784    @Child(name = "addresses", type = {Condition.class, Observation.class, MedicationStatement.class, NutritionOrder.class, ServiceRequest.class, RiskAssessment.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
785    @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." )
786    protected List<Reference> addresses;
787    /**
788     * The actual objects that are the target of the reference (The identified conditions and other health record elements that are intended to be addressed by the goal.)
789     */
790    protected List<Resource> addressesTarget;
791
792
793    /**
794     * Any comments related to the goal.
795     */
796    @Child(name = "note", type = {Annotation.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
797    @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." )
798    protected List<Annotation> note;
799
800    /**
801     * Identifies the change (or lack of change) at the point when the status of the goal is assessed.
802     */
803    @Child(name = "outcomeCode", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
804    @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." )
805    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
806    protected List<CodeableConcept> outcomeCode;
807
808    /**
809     * Details of what's changed (or not changed).
810     */
811    @Child(name = "outcomeReference", type = {Observation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
812    @Description(shortDefinition="Observation that resulted from goal", formalDefinition="Details of what's changed (or not changed)." )
813    protected List<Reference> outcomeReference;
814    /**
815     * The actual objects that are the target of the reference (Details of what's changed (or not changed).)
816     */
817    protected List<Observation> outcomeReferenceTarget;
818
819
820    private static final long serialVersionUID = -1366854797L;
821
822  /**
823   * Constructor
824   */
825    public Goal() {
826      super();
827    }
828
829  /**
830   * Constructor
831   */
832    public Goal(Enumeration<GoalLifecycleStatus> lifecycleStatus, CodeableConcept description, Reference subject) {
833      super();
834      this.lifecycleStatus = lifecycleStatus;
835      this.description = description;
836      this.subject = subject;
837    }
838
839    /**
840     * @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.)
841     */
842    public List<Identifier> getIdentifier() { 
843      if (this.identifier == null)
844        this.identifier = new ArrayList<Identifier>();
845      return this.identifier;
846    }
847
848    /**
849     * @return Returns a reference to <code>this</code> for easy method chaining
850     */
851    public Goal setIdentifier(List<Identifier> theIdentifier) { 
852      this.identifier = theIdentifier;
853      return this;
854    }
855
856    public boolean hasIdentifier() { 
857      if (this.identifier == null)
858        return false;
859      for (Identifier item : this.identifier)
860        if (!item.isEmpty())
861          return true;
862      return false;
863    }
864
865    public Identifier addIdentifier() { //3
866      Identifier t = new Identifier();
867      if (this.identifier == null)
868        this.identifier = new ArrayList<Identifier>();
869      this.identifier.add(t);
870      return t;
871    }
872
873    public Goal addIdentifier(Identifier t) { //3
874      if (t == null)
875        return this;
876      if (this.identifier == null)
877        this.identifier = new ArrayList<Identifier>();
878      this.identifier.add(t);
879      return this;
880    }
881
882    /**
883     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
884     */
885    public Identifier getIdentifierFirstRep() { 
886      if (getIdentifier().isEmpty()) {
887        addIdentifier();
888      }
889      return getIdentifier().get(0);
890    }
891
892    /**
893     * @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
894     */
895    public Enumeration<GoalLifecycleStatus> getLifecycleStatusElement() { 
896      if (this.lifecycleStatus == null)
897        if (Configuration.errorOnAutoCreate())
898          throw new Error("Attempt to auto-create Goal.lifecycleStatus");
899        else if (Configuration.doAutoCreate())
900          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory()); // bb
901      return this.lifecycleStatus;
902    }
903
904    public boolean hasLifecycleStatusElement() { 
905      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
906    }
907
908    public boolean hasLifecycleStatus() { 
909      return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty();
910    }
911
912    /**
913     * @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
914     */
915    public Goal setLifecycleStatusElement(Enumeration<GoalLifecycleStatus> value) { 
916      this.lifecycleStatus = value;
917      return this;
918    }
919
920    /**
921     * @return The state of the goal throughout its lifecycle.
922     */
923    public GoalLifecycleStatus getLifecycleStatus() { 
924      return this.lifecycleStatus == null ? null : this.lifecycleStatus.getValue();
925    }
926
927    /**
928     * @param value The state of the goal throughout its lifecycle.
929     */
930    public Goal setLifecycleStatus(GoalLifecycleStatus value) { 
931        if (this.lifecycleStatus == null)
932          this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory());
933        this.lifecycleStatus.setValue(value);
934      return this;
935    }
936
937    /**
938     * @return {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
939     */
940    public CodeableConcept getAchievementStatus() { 
941      if (this.achievementStatus == null)
942        if (Configuration.errorOnAutoCreate())
943          throw new Error("Attempt to auto-create Goal.achievementStatus");
944        else if (Configuration.doAutoCreate())
945          this.achievementStatus = new CodeableConcept(); // cc
946      return this.achievementStatus;
947    }
948
949    public boolean hasAchievementStatus() { 
950      return this.achievementStatus != null && !this.achievementStatus.isEmpty();
951    }
952
953    /**
954     * @param value {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.)
955     */
956    public Goal setAchievementStatus(CodeableConcept value) { 
957      this.achievementStatus = value;
958      return this;
959    }
960
961    /**
962     * @return {@link #category} (Indicates a category the goal falls within.)
963     */
964    public List<CodeableConcept> getCategory() { 
965      if (this.category == null)
966        this.category = new ArrayList<CodeableConcept>();
967      return this.category;
968    }
969
970    /**
971     * @return Returns a reference to <code>this</code> for easy method chaining
972     */
973    public Goal setCategory(List<CodeableConcept> theCategory) { 
974      this.category = theCategory;
975      return this;
976    }
977
978    public boolean hasCategory() { 
979      if (this.category == null)
980        return false;
981      for (CodeableConcept item : this.category)
982        if (!item.isEmpty())
983          return true;
984      return false;
985    }
986
987    public CodeableConcept addCategory() { //3
988      CodeableConcept t = new CodeableConcept();
989      if (this.category == null)
990        this.category = new ArrayList<CodeableConcept>();
991      this.category.add(t);
992      return t;
993    }
994
995    public Goal addCategory(CodeableConcept t) { //3
996      if (t == null)
997        return this;
998      if (this.category == null)
999        this.category = new ArrayList<CodeableConcept>();
1000      this.category.add(t);
1001      return this;
1002    }
1003
1004    /**
1005     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
1006     */
1007    public CodeableConcept getCategoryFirstRep() { 
1008      if (getCategory().isEmpty()) {
1009        addCategory();
1010      }
1011      return getCategory().get(0);
1012    }
1013
1014    /**
1015     * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1016     */
1017    public CodeableConcept getPriority() { 
1018      if (this.priority == null)
1019        if (Configuration.errorOnAutoCreate())
1020          throw new Error("Attempt to auto-create Goal.priority");
1021        else if (Configuration.doAutoCreate())
1022          this.priority = new CodeableConcept(); // cc
1023      return this.priority;
1024    }
1025
1026    public boolean hasPriority() { 
1027      return this.priority != null && !this.priority.isEmpty();
1028    }
1029
1030    /**
1031     * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
1032     */
1033    public Goal setPriority(CodeableConcept value) { 
1034      this.priority = value;
1035      return this;
1036    }
1037
1038    /**
1039     * @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".)
1040     */
1041    public CodeableConcept getDescription() { 
1042      if (this.description == null)
1043        if (Configuration.errorOnAutoCreate())
1044          throw new Error("Attempt to auto-create Goal.description");
1045        else if (Configuration.doAutoCreate())
1046          this.description = new CodeableConcept(); // cc
1047      return this.description;
1048    }
1049
1050    public boolean hasDescription() { 
1051      return this.description != null && !this.description.isEmpty();
1052    }
1053
1054    /**
1055     * @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".)
1056     */
1057    public Goal setDescription(CodeableConcept value) { 
1058      this.description = value;
1059      return this;
1060    }
1061
1062    /**
1063     * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1064     */
1065    public Reference getSubject() { 
1066      if (this.subject == null)
1067        if (Configuration.errorOnAutoCreate())
1068          throw new Error("Attempt to auto-create Goal.subject");
1069        else if (Configuration.doAutoCreate())
1070          this.subject = new Reference(); // cc
1071      return this.subject;
1072    }
1073
1074    public boolean hasSubject() { 
1075      return this.subject != null && !this.subject.isEmpty();
1076    }
1077
1078    /**
1079     * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
1080     */
1081    public Goal setSubject(Reference value) { 
1082      this.subject = value;
1083      return this;
1084    }
1085
1086    /**
1087     * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.)
1088     */
1089    public Resource getSubjectTarget() { 
1090      return this.subjectTarget;
1091    }
1092
1093    /**
1094     * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.)
1095     */
1096    public Goal setSubjectTarget(Resource value) { 
1097      this.subjectTarget = value;
1098      return this;
1099    }
1100
1101    /**
1102     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1103     */
1104    public Type getStart() { 
1105      return this.start;
1106    }
1107
1108    /**
1109     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1110     */
1111    public DateType getStartDateType() throws FHIRException { 
1112      if (this.start == null)
1113        this.start = new DateType();
1114      if (!(this.start instanceof DateType))
1115        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered");
1116      return (DateType) this.start;
1117    }
1118
1119    public boolean hasStartDateType() { 
1120      return this != null && this.start instanceof DateType;
1121    }
1122
1123    /**
1124     * @return {@link #start} (The date or event after which the goal should begin being pursued.)
1125     */
1126    public CodeableConcept getStartCodeableConcept() throws FHIRException { 
1127      if (this.start == null)
1128        this.start = new CodeableConcept();
1129      if (!(this.start instanceof CodeableConcept))
1130        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered");
1131      return (CodeableConcept) this.start;
1132    }
1133
1134    public boolean hasStartCodeableConcept() { 
1135      return this != null && this.start instanceof CodeableConcept;
1136    }
1137
1138    public boolean hasStart() { 
1139      return this.start != null && !this.start.isEmpty();
1140    }
1141
1142    /**
1143     * @param value {@link #start} (The date or event after which the goal should begin being pursued.)
1144     */
1145    public Goal setStart(Type value) { 
1146      if (value != null && !(value instanceof DateType || value instanceof CodeableConcept))
1147        throw new Error("Not the right type for Goal.start[x]: "+value.fhirType());
1148      this.start = value;
1149      return this;
1150    }
1151
1152    /**
1153     * @return {@link #target} (Indicates what should be done by when.)
1154     */
1155    public List<GoalTargetComponent> getTarget() { 
1156      if (this.target == null)
1157        this.target = new ArrayList<GoalTargetComponent>();
1158      return this.target;
1159    }
1160
1161    /**
1162     * @return Returns a reference to <code>this</code> for easy method chaining
1163     */
1164    public Goal setTarget(List<GoalTargetComponent> theTarget) { 
1165      this.target = theTarget;
1166      return this;
1167    }
1168
1169    public boolean hasTarget() { 
1170      if (this.target == null)
1171        return false;
1172      for (GoalTargetComponent item : this.target)
1173        if (!item.isEmpty())
1174          return true;
1175      return false;
1176    }
1177
1178    public GoalTargetComponent addTarget() { //3
1179      GoalTargetComponent t = new GoalTargetComponent();
1180      if (this.target == null)
1181        this.target = new ArrayList<GoalTargetComponent>();
1182      this.target.add(t);
1183      return t;
1184    }
1185
1186    public Goal addTarget(GoalTargetComponent t) { //3
1187      if (t == null)
1188        return this;
1189      if (this.target == null)
1190        this.target = new ArrayList<GoalTargetComponent>();
1191      this.target.add(t);
1192      return this;
1193    }
1194
1195    /**
1196     * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist
1197     */
1198    public GoalTargetComponent getTargetFirstRep() { 
1199      if (getTarget().isEmpty()) {
1200        addTarget();
1201      }
1202      return getTarget().get(0);
1203    }
1204
1205    /**
1206     * @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
1207     */
1208    public DateType getStatusDateElement() { 
1209      if (this.statusDate == null)
1210        if (Configuration.errorOnAutoCreate())
1211          throw new Error("Attempt to auto-create Goal.statusDate");
1212        else if (Configuration.doAutoCreate())
1213          this.statusDate = new DateType(); // bb
1214      return this.statusDate;
1215    }
1216
1217    public boolean hasStatusDateElement() { 
1218      return this.statusDate != null && !this.statusDate.isEmpty();
1219    }
1220
1221    public boolean hasStatusDate() { 
1222      return this.statusDate != null && !this.statusDate.isEmpty();
1223    }
1224
1225    /**
1226     * @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
1227     */
1228    public Goal setStatusDateElement(DateType value) { 
1229      this.statusDate = value;
1230      return this;
1231    }
1232
1233    /**
1234     * @return Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1235     */
1236    public Date getStatusDate() { 
1237      return this.statusDate == null ? null : this.statusDate.getValue();
1238    }
1239
1240    /**
1241     * @param value Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.
1242     */
1243    public Goal setStatusDate(Date value) { 
1244      if (value == null)
1245        this.statusDate = null;
1246      else {
1247        if (this.statusDate == null)
1248          this.statusDate = new DateType();
1249        this.statusDate.setValue(value);
1250      }
1251      return this;
1252    }
1253
1254    /**
1255     * @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
1256     */
1257    public StringType getStatusReasonElement() { 
1258      if (this.statusReason == null)
1259        if (Configuration.errorOnAutoCreate())
1260          throw new Error("Attempt to auto-create Goal.statusReason");
1261        else if (Configuration.doAutoCreate())
1262          this.statusReason = new StringType(); // bb
1263      return this.statusReason;
1264    }
1265
1266    public boolean hasStatusReasonElement() { 
1267      return this.statusReason != null && !this.statusReason.isEmpty();
1268    }
1269
1270    public boolean hasStatusReason() { 
1271      return this.statusReason != null && !this.statusReason.isEmpty();
1272    }
1273
1274    /**
1275     * @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
1276     */
1277    public Goal setStatusReasonElement(StringType value) { 
1278      this.statusReason = value;
1279      return this;
1280    }
1281
1282    /**
1283     * @return Captures the reason for the current status.
1284     */
1285    public String getStatusReason() { 
1286      return this.statusReason == null ? null : this.statusReason.getValue();
1287    }
1288
1289    /**
1290     * @param value Captures the reason for the current status.
1291     */
1292    public Goal setStatusReason(String value) { 
1293      if (Utilities.noString(value))
1294        this.statusReason = null;
1295      else {
1296        if (this.statusReason == null)
1297          this.statusReason = new StringType();
1298        this.statusReason.setValue(value);
1299      }
1300      return this;
1301    }
1302
1303    /**
1304     * @return {@link #expressedBy} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1305     */
1306    public Reference getExpressedBy() { 
1307      if (this.expressedBy == null)
1308        if (Configuration.errorOnAutoCreate())
1309          throw new Error("Attempt to auto-create Goal.expressedBy");
1310        else if (Configuration.doAutoCreate())
1311          this.expressedBy = new Reference(); // cc
1312      return this.expressedBy;
1313    }
1314
1315    public boolean hasExpressedBy() { 
1316      return this.expressedBy != null && !this.expressedBy.isEmpty();
1317    }
1318
1319    /**
1320     * @param value {@link #expressedBy} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1321     */
1322    public Goal setExpressedBy(Reference value) { 
1323      this.expressedBy = value;
1324      return this;
1325    }
1326
1327    /**
1328     * @return {@link #expressedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1329     */
1330    public Resource getExpressedByTarget() { 
1331      return this.expressedByTarget;
1332    }
1333
1334    /**
1335     * @param value {@link #expressedBy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates whose goal this is - patient goal, practitioner goal, etc.)
1336     */
1337    public Goal setExpressedByTarget(Resource value) { 
1338      this.expressedByTarget = value;
1339      return this;
1340    }
1341
1342    /**
1343     * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
1344     */
1345    public List<Reference> getAddresses() { 
1346      if (this.addresses == null)
1347        this.addresses = new ArrayList<Reference>();
1348      return this.addresses;
1349    }
1350
1351    /**
1352     * @return Returns a reference to <code>this</code> for easy method chaining
1353     */
1354    public Goal setAddresses(List<Reference> theAddresses) { 
1355      this.addresses = theAddresses;
1356      return this;
1357    }
1358
1359    public boolean hasAddresses() { 
1360      if (this.addresses == null)
1361        return false;
1362      for (Reference item : this.addresses)
1363        if (!item.isEmpty())
1364          return true;
1365      return false;
1366    }
1367
1368    public Reference addAddresses() { //3
1369      Reference t = new Reference();
1370      if (this.addresses == null)
1371        this.addresses = new ArrayList<Reference>();
1372      this.addresses.add(t);
1373      return t;
1374    }
1375
1376    public Goal addAddresses(Reference t) { //3
1377      if (t == null)
1378        return this;
1379      if (this.addresses == null)
1380        this.addresses = new ArrayList<Reference>();
1381      this.addresses.add(t);
1382      return this;
1383    }
1384
1385    /**
1386     * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist
1387     */
1388    public Reference getAddressesFirstRep() { 
1389      if (getAddresses().isEmpty()) {
1390        addAddresses();
1391      }
1392      return getAddresses().get(0);
1393    }
1394
1395    /**
1396     * @deprecated Use Reference#setResource(IBaseResource) instead
1397     */
1398    @Deprecated
1399    public List<Resource> getAddressesTarget() { 
1400      if (this.addressesTarget == null)
1401        this.addressesTarget = new ArrayList<Resource>();
1402      return this.addressesTarget;
1403    }
1404
1405    /**
1406     * @return {@link #note} (Any comments related to the goal.)
1407     */
1408    public List<Annotation> getNote() { 
1409      if (this.note == null)
1410        this.note = new ArrayList<Annotation>();
1411      return this.note;
1412    }
1413
1414    /**
1415     * @return Returns a reference to <code>this</code> for easy method chaining
1416     */
1417    public Goal setNote(List<Annotation> theNote) { 
1418      this.note = theNote;
1419      return this;
1420    }
1421
1422    public boolean hasNote() { 
1423      if (this.note == null)
1424        return false;
1425      for (Annotation item : this.note)
1426        if (!item.isEmpty())
1427          return true;
1428      return false;
1429    }
1430
1431    public Annotation addNote() { //3
1432      Annotation t = new Annotation();
1433      if (this.note == null)
1434        this.note = new ArrayList<Annotation>();
1435      this.note.add(t);
1436      return t;
1437    }
1438
1439    public Goal addNote(Annotation t) { //3
1440      if (t == null)
1441        return this;
1442      if (this.note == null)
1443        this.note = new ArrayList<Annotation>();
1444      this.note.add(t);
1445      return this;
1446    }
1447
1448    /**
1449     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
1450     */
1451    public Annotation getNoteFirstRep() { 
1452      if (getNote().isEmpty()) {
1453        addNote();
1454      }
1455      return getNote().get(0);
1456    }
1457
1458    /**
1459     * @return {@link #outcomeCode} (Identifies the change (or lack of change) at the point when the status of the goal is assessed.)
1460     */
1461    public List<CodeableConcept> getOutcomeCode() { 
1462      if (this.outcomeCode == null)
1463        this.outcomeCode = new ArrayList<CodeableConcept>();
1464      return this.outcomeCode;
1465    }
1466
1467    /**
1468     * @return Returns a reference to <code>this</code> for easy method chaining
1469     */
1470    public Goal setOutcomeCode(List<CodeableConcept> theOutcomeCode) { 
1471      this.outcomeCode = theOutcomeCode;
1472      return this;
1473    }
1474
1475    public boolean hasOutcomeCode() { 
1476      if (this.outcomeCode == null)
1477        return false;
1478      for (CodeableConcept item : this.outcomeCode)
1479        if (!item.isEmpty())
1480          return true;
1481      return false;
1482    }
1483
1484    public CodeableConcept addOutcomeCode() { //3
1485      CodeableConcept t = new CodeableConcept();
1486      if (this.outcomeCode == null)
1487        this.outcomeCode = new ArrayList<CodeableConcept>();
1488      this.outcomeCode.add(t);
1489      return t;
1490    }
1491
1492    public Goal addOutcomeCode(CodeableConcept t) { //3
1493      if (t == null)
1494        return this;
1495      if (this.outcomeCode == null)
1496        this.outcomeCode = new ArrayList<CodeableConcept>();
1497      this.outcomeCode.add(t);
1498      return this;
1499    }
1500
1501    /**
1502     * @return The first repetition of repeating field {@link #outcomeCode}, creating it if it does not already exist
1503     */
1504    public CodeableConcept getOutcomeCodeFirstRep() { 
1505      if (getOutcomeCode().isEmpty()) {
1506        addOutcomeCode();
1507      }
1508      return getOutcomeCode().get(0);
1509    }
1510
1511    /**
1512     * @return {@link #outcomeReference} (Details of what's changed (or not changed).)
1513     */
1514    public List<Reference> getOutcomeReference() { 
1515      if (this.outcomeReference == null)
1516        this.outcomeReference = new ArrayList<Reference>();
1517      return this.outcomeReference;
1518    }
1519
1520    /**
1521     * @return Returns a reference to <code>this</code> for easy method chaining
1522     */
1523    public Goal setOutcomeReference(List<Reference> theOutcomeReference) { 
1524      this.outcomeReference = theOutcomeReference;
1525      return this;
1526    }
1527
1528    public boolean hasOutcomeReference() { 
1529      if (this.outcomeReference == null)
1530        return false;
1531      for (Reference item : this.outcomeReference)
1532        if (!item.isEmpty())
1533          return true;
1534      return false;
1535    }
1536
1537    public Reference addOutcomeReference() { //3
1538      Reference t = new Reference();
1539      if (this.outcomeReference == null)
1540        this.outcomeReference = new ArrayList<Reference>();
1541      this.outcomeReference.add(t);
1542      return t;
1543    }
1544
1545    public Goal addOutcomeReference(Reference t) { //3
1546      if (t == null)
1547        return this;
1548      if (this.outcomeReference == null)
1549        this.outcomeReference = new ArrayList<Reference>();
1550      this.outcomeReference.add(t);
1551      return this;
1552    }
1553
1554    /**
1555     * @return The first repetition of repeating field {@link #outcomeReference}, creating it if it does not already exist
1556     */
1557    public Reference getOutcomeReferenceFirstRep() { 
1558      if (getOutcomeReference().isEmpty()) {
1559        addOutcomeReference();
1560      }
1561      return getOutcomeReference().get(0);
1562    }
1563
1564    /**
1565     * @deprecated Use Reference#setResource(IBaseResource) instead
1566     */
1567    @Deprecated
1568    public List<Observation> getOutcomeReferenceTarget() { 
1569      if (this.outcomeReferenceTarget == null)
1570        this.outcomeReferenceTarget = new ArrayList<Observation>();
1571      return this.outcomeReferenceTarget;
1572    }
1573
1574    /**
1575     * @deprecated Use Reference#setResource(IBaseResource) instead
1576     */
1577    @Deprecated
1578    public Observation addOutcomeReferenceTarget() { 
1579      Observation r = new Observation();
1580      if (this.outcomeReferenceTarget == null)
1581        this.outcomeReferenceTarget = new ArrayList<Observation>();
1582      this.outcomeReferenceTarget.add(r);
1583      return r;
1584    }
1585
1586      protected void listChildren(List<Property> children) {
1587        super.listChildren(children);
1588        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));
1589        children.add(new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus));
1590        children.add(new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus));
1591        children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category));
1592        children.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority));
1593        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));
1594        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));
1595        children.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start));
1596        children.add(new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target));
1597        children.add(new Property("statusDate", "date", "Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate));
1598        children.add(new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason));
1599        children.add(new Property("expressedBy", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, expressedBy));
1600        children.add(new Property("addresses", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ServiceRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses));
1601        children.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note));
1602        children.add(new Property("outcomeCode", "CodeableConcept", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcomeCode));
1603        children.add(new Property("outcomeReference", "Reference(Observation)", "Details of what's changed (or not changed).", 0, java.lang.Integer.MAX_VALUE, outcomeReference));
1604      }
1605
1606      @Override
1607      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1608        switch (_hash) {
1609        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);
1610        case 1165552636: /*lifecycleStatus*/  return new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus);
1611        case 104524801: /*achievementStatus*/  return new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus);
1612        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category);
1613        case -1165461084: /*priority*/  return new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority);
1614        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);
1615        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);
1616        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);
1617        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);
1618        case -2129778896: /*startDate*/  return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1619        case -1758833953: /*startCodeableConcept*/  return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start);
1620        case -880905839: /*target*/  return new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target);
1621        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);
1622        case 2051346646: /*statusReason*/  return new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason);
1623        case 175423686: /*expressedBy*/  return new Property("expressedBy", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, expressedBy);
1624        case 874544034: /*addresses*/  return new Property("addresses", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ServiceRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses);
1625        case 3387378: /*note*/  return new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note);
1626        case 1062482015: /*outcomeCode*/  return new Property("outcomeCode", "CodeableConcept", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcomeCode);
1627        case -782273511: /*outcomeReference*/  return new Property("outcomeReference", "Reference(Observation)", "Details of what's changed (or not changed).", 0, java.lang.Integer.MAX_VALUE, outcomeReference);
1628        default: return super.getNamedProperty(_hash, _name, _checkValid);
1629        }
1630
1631      }
1632
1633      @Override
1634      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1635        switch (hash) {
1636        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1637        case 1165552636: /*lifecycleStatus*/ return this.lifecycleStatus == null ? new Base[0] : new Base[] {this.lifecycleStatus}; // Enumeration<GoalLifecycleStatus>
1638        case 104524801: /*achievementStatus*/ return this.achievementStatus == null ? new Base[0] : new Base[] {this.achievementStatus}; // CodeableConcept
1639        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1640        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
1641        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept
1642        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1643        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // Type
1644        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // GoalTargetComponent
1645        case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateType
1646        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // StringType
1647        case 175423686: /*expressedBy*/ return this.expressedBy == null ? new Base[0] : new Base[] {this.expressedBy}; // Reference
1648        case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // Reference
1649        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1650        case 1062482015: /*outcomeCode*/ return this.outcomeCode == null ? new Base[0] : this.outcomeCode.toArray(new Base[this.outcomeCode.size()]); // CodeableConcept
1651        case -782273511: /*outcomeReference*/ return this.outcomeReference == null ? new Base[0] : this.outcomeReference.toArray(new Base[this.outcomeReference.size()]); // Reference
1652        default: return super.getProperty(hash, name, checkValid);
1653        }
1654
1655      }
1656
1657      @Override
1658      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1659        switch (hash) {
1660        case -1618432855: // identifier
1661          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1662          return value;
1663        case 1165552636: // lifecycleStatus
1664          value = new GoalLifecycleStatusEnumFactory().fromType(castToCode(value));
1665          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1666          return value;
1667        case 104524801: // achievementStatus
1668          this.achievementStatus = castToCodeableConcept(value); // CodeableConcept
1669          return value;
1670        case 50511102: // category
1671          this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept
1672          return value;
1673        case -1165461084: // priority
1674          this.priority = castToCodeableConcept(value); // CodeableConcept
1675          return value;
1676        case -1724546052: // description
1677          this.description = castToCodeableConcept(value); // CodeableConcept
1678          return value;
1679        case -1867885268: // subject
1680          this.subject = castToReference(value); // Reference
1681          return value;
1682        case 109757538: // start
1683          this.start = castToType(value); // Type
1684          return value;
1685        case -880905839: // target
1686          this.getTarget().add((GoalTargetComponent) value); // GoalTargetComponent
1687          return value;
1688        case 247524032: // statusDate
1689          this.statusDate = castToDate(value); // DateType
1690          return value;
1691        case 2051346646: // statusReason
1692          this.statusReason = castToString(value); // StringType
1693          return value;
1694        case 175423686: // expressedBy
1695          this.expressedBy = castToReference(value); // Reference
1696          return value;
1697        case 874544034: // addresses
1698          this.getAddresses().add(castToReference(value)); // Reference
1699          return value;
1700        case 3387378: // note
1701          this.getNote().add(castToAnnotation(value)); // Annotation
1702          return value;
1703        case 1062482015: // outcomeCode
1704          this.getOutcomeCode().add(castToCodeableConcept(value)); // CodeableConcept
1705          return value;
1706        case -782273511: // outcomeReference
1707          this.getOutcomeReference().add(castToReference(value)); // Reference
1708          return value;
1709        default: return super.setProperty(hash, name, value);
1710        }
1711
1712      }
1713
1714      @Override
1715      public Base setProperty(String name, Base value) throws FHIRException {
1716        if (name.equals("identifier")) {
1717          this.getIdentifier().add(castToIdentifier(value));
1718        } else if (name.equals("lifecycleStatus")) {
1719          value = new GoalLifecycleStatusEnumFactory().fromType(castToCode(value));
1720          this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus>
1721        } else if (name.equals("achievementStatus")) {
1722          this.achievementStatus = castToCodeableConcept(value); // CodeableConcept
1723        } else if (name.equals("category")) {
1724          this.getCategory().add(castToCodeableConcept(value));
1725        } else if (name.equals("priority")) {
1726          this.priority = castToCodeableConcept(value); // CodeableConcept
1727        } else if (name.equals("description")) {
1728          this.description = castToCodeableConcept(value); // CodeableConcept
1729        } else if (name.equals("subject")) {
1730          this.subject = castToReference(value); // Reference
1731        } else if (name.equals("start[x]")) {
1732          this.start = castToType(value); // Type
1733        } else if (name.equals("target")) {
1734          this.getTarget().add((GoalTargetComponent) value);
1735        } else if (name.equals("statusDate")) {
1736          this.statusDate = castToDate(value); // DateType
1737        } else if (name.equals("statusReason")) {
1738          this.statusReason = castToString(value); // StringType
1739        } else if (name.equals("expressedBy")) {
1740          this.expressedBy = castToReference(value); // Reference
1741        } else if (name.equals("addresses")) {
1742          this.getAddresses().add(castToReference(value));
1743        } else if (name.equals("note")) {
1744          this.getNote().add(castToAnnotation(value));
1745        } else if (name.equals("outcomeCode")) {
1746          this.getOutcomeCode().add(castToCodeableConcept(value));
1747        } else if (name.equals("outcomeReference")) {
1748          this.getOutcomeReference().add(castToReference(value));
1749        } else
1750          return super.setProperty(name, value);
1751        return value;
1752      }
1753
1754      @Override
1755      public Base makeProperty(int hash, String name) throws FHIRException {
1756        switch (hash) {
1757        case -1618432855:  return addIdentifier(); 
1758        case 1165552636:  return getLifecycleStatusElement();
1759        case 104524801:  return getAchievementStatus(); 
1760        case 50511102:  return addCategory(); 
1761        case -1165461084:  return getPriority(); 
1762        case -1724546052:  return getDescription(); 
1763        case -1867885268:  return getSubject(); 
1764        case 1316793566:  return getStart(); 
1765        case 109757538:  return getStart(); 
1766        case -880905839:  return addTarget(); 
1767        case 247524032:  return getStatusDateElement();
1768        case 2051346646:  return getStatusReasonElement();
1769        case 175423686:  return getExpressedBy(); 
1770        case 874544034:  return addAddresses(); 
1771        case 3387378:  return addNote(); 
1772        case 1062482015:  return addOutcomeCode(); 
1773        case -782273511:  return addOutcomeReference(); 
1774        default: return super.makeProperty(hash, name);
1775        }
1776
1777      }
1778
1779      @Override
1780      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1781        switch (hash) {
1782        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1783        case 1165552636: /*lifecycleStatus*/ return new String[] {"code"};
1784        case 104524801: /*achievementStatus*/ return new String[] {"CodeableConcept"};
1785        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1786        case -1165461084: /*priority*/ return new String[] {"CodeableConcept"};
1787        case -1724546052: /*description*/ return new String[] {"CodeableConcept"};
1788        case -1867885268: /*subject*/ return new String[] {"Reference"};
1789        case 109757538: /*start*/ return new String[] {"date", "CodeableConcept"};
1790        case -880905839: /*target*/ return new String[] {};
1791        case 247524032: /*statusDate*/ return new String[] {"date"};
1792        case 2051346646: /*statusReason*/ return new String[] {"string"};
1793        case 175423686: /*expressedBy*/ return new String[] {"Reference"};
1794        case 874544034: /*addresses*/ return new String[] {"Reference"};
1795        case 3387378: /*note*/ return new String[] {"Annotation"};
1796        case 1062482015: /*outcomeCode*/ return new String[] {"CodeableConcept"};
1797        case -782273511: /*outcomeReference*/ return new String[] {"Reference"};
1798        default: return super.getTypesForProperty(hash, name);
1799        }
1800
1801      }
1802
1803      @Override
1804      public Base addChild(String name) throws FHIRException {
1805        if (name.equals("identifier")) {
1806          return addIdentifier();
1807        }
1808        else if (name.equals("lifecycleStatus")) {
1809          throw new FHIRException("Cannot call addChild on a primitive type Goal.lifecycleStatus");
1810        }
1811        else if (name.equals("achievementStatus")) {
1812          this.achievementStatus = new CodeableConcept();
1813          return this.achievementStatus;
1814        }
1815        else if (name.equals("category")) {
1816          return addCategory();
1817        }
1818        else if (name.equals("priority")) {
1819          this.priority = new CodeableConcept();
1820          return this.priority;
1821        }
1822        else if (name.equals("description")) {
1823          this.description = new CodeableConcept();
1824          return this.description;
1825        }
1826        else if (name.equals("subject")) {
1827          this.subject = new Reference();
1828          return this.subject;
1829        }
1830        else if (name.equals("startDate")) {
1831          this.start = new DateType();
1832          return this.start;
1833        }
1834        else if (name.equals("startCodeableConcept")) {
1835          this.start = new CodeableConcept();
1836          return this.start;
1837        }
1838        else if (name.equals("target")) {
1839          return addTarget();
1840        }
1841        else if (name.equals("statusDate")) {
1842          throw new FHIRException("Cannot call addChild on a primitive type Goal.statusDate");
1843        }
1844        else if (name.equals("statusReason")) {
1845          throw new FHIRException("Cannot call addChild on a primitive type Goal.statusReason");
1846        }
1847        else if (name.equals("expressedBy")) {
1848          this.expressedBy = new Reference();
1849          return this.expressedBy;
1850        }
1851        else if (name.equals("addresses")) {
1852          return addAddresses();
1853        }
1854        else if (name.equals("note")) {
1855          return addNote();
1856        }
1857        else if (name.equals("outcomeCode")) {
1858          return addOutcomeCode();
1859        }
1860        else if (name.equals("outcomeReference")) {
1861          return addOutcomeReference();
1862        }
1863        else
1864          return super.addChild(name);
1865      }
1866
1867  public String fhirType() {
1868    return "Goal";
1869
1870  }
1871
1872      public Goal copy() {
1873        Goal dst = new Goal();
1874        copyValues(dst);
1875        return dst;
1876      }
1877
1878      public void copyValues(Goal dst) {
1879        super.copyValues(dst);
1880        if (identifier != null) {
1881          dst.identifier = new ArrayList<Identifier>();
1882          for (Identifier i : identifier)
1883            dst.identifier.add(i.copy());
1884        };
1885        dst.lifecycleStatus = lifecycleStatus == null ? null : lifecycleStatus.copy();
1886        dst.achievementStatus = achievementStatus == null ? null : achievementStatus.copy();
1887        if (category != null) {
1888          dst.category = new ArrayList<CodeableConcept>();
1889          for (CodeableConcept i : category)
1890            dst.category.add(i.copy());
1891        };
1892        dst.priority = priority == null ? null : priority.copy();
1893        dst.description = description == null ? null : description.copy();
1894        dst.subject = subject == null ? null : subject.copy();
1895        dst.start = start == null ? null : start.copy();
1896        if (target != null) {
1897          dst.target = new ArrayList<GoalTargetComponent>();
1898          for (GoalTargetComponent i : target)
1899            dst.target.add(i.copy());
1900        };
1901        dst.statusDate = statusDate == null ? null : statusDate.copy();
1902        dst.statusReason = statusReason == null ? null : statusReason.copy();
1903        dst.expressedBy = expressedBy == null ? null : expressedBy.copy();
1904        if (addresses != null) {
1905          dst.addresses = new ArrayList<Reference>();
1906          for (Reference i : addresses)
1907            dst.addresses.add(i.copy());
1908        };
1909        if (note != null) {
1910          dst.note = new ArrayList<Annotation>();
1911          for (Annotation i : note)
1912            dst.note.add(i.copy());
1913        };
1914        if (outcomeCode != null) {
1915          dst.outcomeCode = new ArrayList<CodeableConcept>();
1916          for (CodeableConcept i : outcomeCode)
1917            dst.outcomeCode.add(i.copy());
1918        };
1919        if (outcomeReference != null) {
1920          dst.outcomeReference = new ArrayList<Reference>();
1921          for (Reference i : outcomeReference)
1922            dst.outcomeReference.add(i.copy());
1923        };
1924      }
1925
1926      protected Goal typedCopy() {
1927        return copy();
1928      }
1929
1930      @Override
1931      public boolean equalsDeep(Base other_) {
1932        if (!super.equalsDeep(other_))
1933          return false;
1934        if (!(other_ instanceof Goal))
1935          return false;
1936        Goal o = (Goal) other_;
1937        return compareDeep(identifier, o.identifier, true) && compareDeep(lifecycleStatus, o.lifecycleStatus, true)
1938           && compareDeep(achievementStatus, o.achievementStatus, true) && compareDeep(category, o.category, true)
1939           && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true)
1940           && compareDeep(start, o.start, true) && compareDeep(target, o.target, true) && compareDeep(statusDate, o.statusDate, true)
1941           && compareDeep(statusReason, o.statusReason, true) && compareDeep(expressedBy, o.expressedBy, true)
1942           && compareDeep(addresses, o.addresses, true) && compareDeep(note, o.note, true) && compareDeep(outcomeCode, o.outcomeCode, true)
1943           && compareDeep(outcomeReference, o.outcomeReference, true);
1944      }
1945
1946      @Override
1947      public boolean equalsShallow(Base other_) {
1948        if (!super.equalsShallow(other_))
1949          return false;
1950        if (!(other_ instanceof Goal))
1951          return false;
1952        Goal o = (Goal) other_;
1953        return compareValues(lifecycleStatus, o.lifecycleStatus, true) && compareValues(statusDate, o.statusDate, true)
1954           && compareValues(statusReason, o.statusReason, true);
1955      }
1956
1957      public boolean isEmpty() {
1958        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, lifecycleStatus
1959          , achievementStatus, category, priority, description, subject, start, target, statusDate
1960          , statusReason, expressedBy, addresses, note, outcomeCode, outcomeReference);
1961      }
1962
1963  @Override
1964  public ResourceType getResourceType() {
1965    return ResourceType.Goal;
1966   }
1967
1968 /**
1969   * Search parameter: <b>identifier</b>
1970   * <p>
1971   * Description: <b>External Ids for this goal</b><br>
1972   * Type: <b>token</b><br>
1973   * Path: <b>Goal.identifier</b><br>
1974   * </p>
1975   */
1976  @SearchParamDefinition(name="identifier", path="Goal.identifier", description="External Ids for this goal", type="token" )
1977  public static final String SP_IDENTIFIER = "identifier";
1978 /**
1979   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1980   * <p>
1981   * Description: <b>External Ids for this goal</b><br>
1982   * Type: <b>token</b><br>
1983   * Path: <b>Goal.identifier</b><br>
1984   * </p>
1985   */
1986  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1987
1988 /**
1989   * Search parameter: <b>lifecycle-status</b>
1990   * <p>
1991   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
1992   * Type: <b>token</b><br>
1993   * Path: <b>Goal.lifecycleStatus</b><br>
1994   * </p>
1995   */
1996  @SearchParamDefinition(name="lifecycle-status", path="Goal.lifecycleStatus", description="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", type="token" )
1997  public static final String SP_LIFECYCLE_STATUS = "lifecycle-status";
1998 /**
1999   * <b>Fluent Client</b> search parameter constant for <b>lifecycle-status</b>
2000   * <p>
2001   * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br>
2002   * Type: <b>token</b><br>
2003   * Path: <b>Goal.lifecycleStatus</b><br>
2004   * </p>
2005   */
2006  public static final ca.uhn.fhir.rest.gclient.TokenClientParam LIFECYCLE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LIFECYCLE_STATUS);
2007
2008 /**
2009   * Search parameter: <b>achievement-status</b>
2010   * <p>
2011   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
2012   * Type: <b>token</b><br>
2013   * Path: <b>Goal.achievementStatus</b><br>
2014   * </p>
2015   */
2016  @SearchParamDefinition(name="achievement-status", path="Goal.achievementStatus", description="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", type="token" )
2017  public static final String SP_ACHIEVEMENT_STATUS = "achievement-status";
2018 /**
2019   * <b>Fluent Client</b> search parameter constant for <b>achievement-status</b>
2020   * <p>
2021   * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br>
2022   * Type: <b>token</b><br>
2023   * Path: <b>Goal.achievementStatus</b><br>
2024   * </p>
2025   */
2026  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACHIEVEMENT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACHIEVEMENT_STATUS);
2027
2028 /**
2029   * Search parameter: <b>patient</b>
2030   * <p>
2031   * Description: <b>Who this goal is intended for</b><br>
2032   * Type: <b>reference</b><br>
2033   * Path: <b>Goal.subject</b><br>
2034   * </p>
2035   */
2036  @SearchParamDefinition(name="patient", path="Goal.subject.where(resolve() is Patient)", description="Who this goal is intended for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
2037  public static final String SP_PATIENT = "patient";
2038 /**
2039   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2040   * <p>
2041   * Description: <b>Who this goal is intended for</b><br>
2042   * Type: <b>reference</b><br>
2043   * Path: <b>Goal.subject</b><br>
2044   * </p>
2045   */
2046  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2047
2048/**
2049   * Constant for fluent queries to be used to add include statements. Specifies
2050   * the path value of "<b>Goal:patient</b>".
2051   */
2052  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Goal:patient").toLocked();
2053
2054 /**
2055   * Search parameter: <b>subject</b>
2056   * <p>
2057   * Description: <b>Who this goal is intended for</b><br>
2058   * Type: <b>reference</b><br>
2059   * Path: <b>Goal.subject</b><br>
2060   * </p>
2061   */
2062  @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference", target={Group.class, Organization.class, Patient.class } )
2063  public static final String SP_SUBJECT = "subject";
2064 /**
2065   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2066   * <p>
2067   * Description: <b>Who this goal is intended for</b><br>
2068   * Type: <b>reference</b><br>
2069   * Path: <b>Goal.subject</b><br>
2070   * </p>
2071   */
2072  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2073
2074/**
2075   * Constant for fluent queries to be used to add include statements. Specifies
2076   * the path value of "<b>Goal:subject</b>".
2077   */
2078  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Goal:subject").toLocked();
2079
2080 /**
2081   * Search parameter: <b>start-date</b>
2082   * <p>
2083   * Description: <b>When goal pursuit begins</b><br>
2084   * Type: <b>date</b><br>
2085   * Path: <b>Goal.startDate</b><br>
2086   * </p>
2087   */
2088  @SearchParamDefinition(name="start-date", path="(Goal.start as date)", description="When goal pursuit begins", type="date" )
2089  public static final String SP_START_DATE = "start-date";
2090 /**
2091   * <b>Fluent Client</b> search parameter constant for <b>start-date</b>
2092   * <p>
2093   * Description: <b>When goal pursuit begins</b><br>
2094   * Type: <b>date</b><br>
2095   * Path: <b>Goal.startDate</b><br>
2096   * </p>
2097   */
2098  public static final ca.uhn.fhir.rest.gclient.DateClientParam START_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START_DATE);
2099
2100 /**
2101   * Search parameter: <b>category</b>
2102   * <p>
2103   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
2104   * Type: <b>token</b><br>
2105   * Path: <b>Goal.category</b><br>
2106   * </p>
2107   */
2108  @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" )
2109  public static final String SP_CATEGORY = "category";
2110 /**
2111   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2112   * <p>
2113   * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br>
2114   * Type: <b>token</b><br>
2115   * Path: <b>Goal.category</b><br>
2116   * </p>
2117   */
2118  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2119
2120 /**
2121   * Search parameter: <b>target-date</b>
2122   * <p>
2123   * Description: <b>Reach goal on or before</b><br>
2124   * Type: <b>date</b><br>
2125   * Path: <b>Goal.target.dueDate</b><br>
2126   * </p>
2127   */
2128  @SearchParamDefinition(name="target-date", path="(Goal.target.due as date)", description="Reach goal on or before", type="date" )
2129  public static final String SP_TARGET_DATE = "target-date";
2130 /**
2131   * <b>Fluent Client</b> search parameter constant for <b>target-date</b>
2132   * <p>
2133   * Description: <b>Reach goal on or before</b><br>
2134   * Type: <b>date</b><br>
2135   * Path: <b>Goal.target.dueDate</b><br>
2136   * </p>
2137   */
2138  public static final ca.uhn.fhir.rest.gclient.DateClientParam TARGET_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TARGET_DATE);
2139
2140
2141}