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