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 * Measurements and simple assertions made about a patient, device or other subject.
052 */
053@ResourceDef(name="Observation", profile="http://hl7.org/fhir/StructureDefinition/Observation")
054public class Observation extends DomainResource {
055
056    public enum TriggeredBytype {
057        /**
058         * Performance of one or more other tests depending on the results of the initial test.  This may include collection of additional specimen. While a new ServiceRequest is not required to perform the additional test, where it is still needed (e.g., requesting another laboratory to perform the reflex test), the Observation.basedOn would reference the new ServiceRequest that requested the additional test to be performed as well as the original ServiceRequest to reflect the one that provided the authorization.
059         */
060        REFLEX, 
061        /**
062         * Performance of the same test again with the same parameters/settings/solution.
063         */
064        REPEAT, 
065        /**
066         * Performance of the same test but with different parameters/settings/solution.
067         */
068        RERUN, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static TriggeredBytype fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("reflex".equals(codeString))
077          return REFLEX;
078        if ("repeat".equals(codeString))
079          return REPEAT;
080        if ("re-run".equals(codeString))
081          return RERUN;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown TriggeredBytype code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case REFLEX: return "reflex";
090            case REPEAT: return "repeat";
091            case RERUN: return "re-run";
092            case NULL: return null;
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case REFLEX: return "http://hl7.org/fhir/observation-triggeredbytype";
099            case REPEAT: return "http://hl7.org/fhir/observation-triggeredbytype";
100            case RERUN: return "http://hl7.org/fhir/observation-triggeredbytype";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDefinition() {
106          switch (this) {
107            case REFLEX: return "Performance of one or more other tests depending on the results of the initial test.  This may include collection of additional specimen. While a new ServiceRequest is not required to perform the additional test, where it is still needed (e.g., requesting another laboratory to perform the reflex test), the Observation.basedOn would reference the new ServiceRequest that requested the additional test to be performed as well as the original ServiceRequest to reflect the one that provided the authorization.";
108            case REPEAT: return "Performance of the same test again with the same parameters/settings/solution.";
109            case RERUN: return "Performance of the same test but with different parameters/settings/solution.";
110            case NULL: return null;
111            default: return "?";
112          }
113        }
114        public String getDisplay() {
115          switch (this) {
116            case REFLEX: return "Reflex";
117            case REPEAT: return "Repeat (per policy)";
118            case RERUN: return "Re-run (per policy)";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123    }
124
125  public static class TriggeredBytypeEnumFactory implements EnumFactory<TriggeredBytype> {
126    public TriggeredBytype fromCode(String codeString) throws IllegalArgumentException {
127      if (codeString == null || "".equals(codeString))
128            if (codeString == null || "".equals(codeString))
129                return null;
130        if ("reflex".equals(codeString))
131          return TriggeredBytype.REFLEX;
132        if ("repeat".equals(codeString))
133          return TriggeredBytype.REPEAT;
134        if ("re-run".equals(codeString))
135          return TriggeredBytype.RERUN;
136        throw new IllegalArgumentException("Unknown TriggeredBytype code '"+codeString+"'");
137        }
138        public Enumeration<TriggeredBytype> fromType(PrimitiveType<?> code) throws FHIRException {
139          if (code == null)
140            return null;
141          if (code.isEmpty())
142            return new Enumeration<TriggeredBytype>(this, TriggeredBytype.NULL, code);
143          String codeString = ((PrimitiveType) code).asStringValue();
144          if (codeString == null || "".equals(codeString))
145            return new Enumeration<TriggeredBytype>(this, TriggeredBytype.NULL, code);
146        if ("reflex".equals(codeString))
147          return new Enumeration<TriggeredBytype>(this, TriggeredBytype.REFLEX, code);
148        if ("repeat".equals(codeString))
149          return new Enumeration<TriggeredBytype>(this, TriggeredBytype.REPEAT, code);
150        if ("re-run".equals(codeString))
151          return new Enumeration<TriggeredBytype>(this, TriggeredBytype.RERUN, code);
152        throw new FHIRException("Unknown TriggeredBytype code '"+codeString+"'");
153        }
154    public String toCode(TriggeredBytype code) {
155      if (code == TriggeredBytype.REFLEX)
156        return "reflex";
157      if (code == TriggeredBytype.REPEAT)
158        return "repeat";
159      if (code == TriggeredBytype.RERUN)
160        return "re-run";
161      return "?";
162      }
163    public String toSystem(TriggeredBytype code) {
164      return code.getSystem();
165      }
166    }
167
168    @Block()
169    public static class ObservationTriggeredByComponent extends BackboneElement implements IBaseBackboneElement {
170        /**
171         * Reference to the triggering observation.
172         */
173        @Child(name = "observation", type = {Observation.class}, order=1, min=1, max=1, modifier=false, summary=true)
174        @Description(shortDefinition="Triggering observation", formalDefinition="Reference to the triggering observation." )
175        protected Reference observation;
176
177        /**
178         * The type of trigger.
179Reflex | Repeat | Re-run.
180         */
181        @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
182        @Description(shortDefinition="reflex | repeat | re-run", formalDefinition="The type of trigger.\nReflex | Repeat | Re-run." )
183        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-triggeredbytype")
184        protected Enumeration<TriggeredBytype> type;
185
186        /**
187         * Provides the reason why this observation was performed as a result of the observation(s) referenced.
188         */
189        @Child(name = "reason", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
190        @Description(shortDefinition="Reason that the observation was triggered", formalDefinition="Provides the reason why this observation was performed as a result of the observation(s) referenced." )
191        protected StringType reason;
192
193        private static final long serialVersionUID = -737822241L;
194
195    /**
196     * Constructor
197     */
198      public ObservationTriggeredByComponent() {
199        super();
200      }
201
202    /**
203     * Constructor
204     */
205      public ObservationTriggeredByComponent(Reference observation, TriggeredBytype type) {
206        super();
207        this.setObservation(observation);
208        this.setType(type);
209      }
210
211        /**
212         * @return {@link #observation} (Reference to the triggering observation.)
213         */
214        public Reference getObservation() { 
215          if (this.observation == null)
216            if (Configuration.errorOnAutoCreate())
217              throw new Error("Attempt to auto-create ObservationTriggeredByComponent.observation");
218            else if (Configuration.doAutoCreate())
219              this.observation = new Reference(); // cc
220          return this.observation;
221        }
222
223        public boolean hasObservation() { 
224          return this.observation != null && !this.observation.isEmpty();
225        }
226
227        /**
228         * @param value {@link #observation} (Reference to the triggering observation.)
229         */
230        public ObservationTriggeredByComponent setObservation(Reference value) { 
231          this.observation = value;
232          return this;
233        }
234
235        /**
236         * @return {@link #type} (The type of trigger.
237Reflex | Repeat | Re-run.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
238         */
239        public Enumeration<TriggeredBytype> getTypeElement() { 
240          if (this.type == null)
241            if (Configuration.errorOnAutoCreate())
242              throw new Error("Attempt to auto-create ObservationTriggeredByComponent.type");
243            else if (Configuration.doAutoCreate())
244              this.type = new Enumeration<TriggeredBytype>(new TriggeredBytypeEnumFactory()); // bb
245          return this.type;
246        }
247
248        public boolean hasTypeElement() { 
249          return this.type != null && !this.type.isEmpty();
250        }
251
252        public boolean hasType() { 
253          return this.type != null && !this.type.isEmpty();
254        }
255
256        /**
257         * @param value {@link #type} (The type of trigger.
258Reflex | Repeat | Re-run.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
259         */
260        public ObservationTriggeredByComponent setTypeElement(Enumeration<TriggeredBytype> value) { 
261          this.type = value;
262          return this;
263        }
264
265        /**
266         * @return The type of trigger.
267Reflex | Repeat | Re-run.
268         */
269        public TriggeredBytype getType() { 
270          return this.type == null ? null : this.type.getValue();
271        }
272
273        /**
274         * @param value The type of trigger.
275Reflex | Repeat | Re-run.
276         */
277        public ObservationTriggeredByComponent setType(TriggeredBytype value) { 
278            if (this.type == null)
279              this.type = new Enumeration<TriggeredBytype>(new TriggeredBytypeEnumFactory());
280            this.type.setValue(value);
281          return this;
282        }
283
284        /**
285         * @return {@link #reason} (Provides the reason why this observation was performed as a result of the observation(s) referenced.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
286         */
287        public StringType getReasonElement() { 
288          if (this.reason == null)
289            if (Configuration.errorOnAutoCreate())
290              throw new Error("Attempt to auto-create ObservationTriggeredByComponent.reason");
291            else if (Configuration.doAutoCreate())
292              this.reason = new StringType(); // bb
293          return this.reason;
294        }
295
296        public boolean hasReasonElement() { 
297          return this.reason != null && !this.reason.isEmpty();
298        }
299
300        public boolean hasReason() { 
301          return this.reason != null && !this.reason.isEmpty();
302        }
303
304        /**
305         * @param value {@link #reason} (Provides the reason why this observation was performed as a result of the observation(s) referenced.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
306         */
307        public ObservationTriggeredByComponent setReasonElement(StringType value) { 
308          this.reason = value;
309          return this;
310        }
311
312        /**
313         * @return Provides the reason why this observation was performed as a result of the observation(s) referenced.
314         */
315        public String getReason() { 
316          return this.reason == null ? null : this.reason.getValue();
317        }
318
319        /**
320         * @param value Provides the reason why this observation was performed as a result of the observation(s) referenced.
321         */
322        public ObservationTriggeredByComponent setReason(String value) { 
323          if (Utilities.noString(value))
324            this.reason = null;
325          else {
326            if (this.reason == null)
327              this.reason = new StringType();
328            this.reason.setValue(value);
329          }
330          return this;
331        }
332
333        protected void listChildren(List<Property> children) {
334          super.listChildren(children);
335          children.add(new Property("observation", "Reference(Observation)", "Reference to the triggering observation.", 0, 1, observation));
336          children.add(new Property("type", "code", "The type of trigger.\nReflex | Repeat | Re-run.", 0, 1, type));
337          children.add(new Property("reason", "string", "Provides the reason why this observation was performed as a result of the observation(s) referenced.", 0, 1, reason));
338        }
339
340        @Override
341        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
342          switch (_hash) {
343          case 122345516: /*observation*/  return new Property("observation", "Reference(Observation)", "Reference to the triggering observation.", 0, 1, observation);
344          case 3575610: /*type*/  return new Property("type", "code", "The type of trigger.\nReflex | Repeat | Re-run.", 0, 1, type);
345          case -934964668: /*reason*/  return new Property("reason", "string", "Provides the reason why this observation was performed as a result of the observation(s) referenced.", 0, 1, reason);
346          default: return super.getNamedProperty(_hash, _name, _checkValid);
347          }
348
349        }
350
351      @Override
352      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
353        switch (hash) {
354        case 122345516: /*observation*/ return this.observation == null ? new Base[0] : new Base[] {this.observation}; // Reference
355        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<TriggeredBytype>
356        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // StringType
357        default: return super.getProperty(hash, name, checkValid);
358        }
359
360      }
361
362      @Override
363      public Base setProperty(int hash, String name, Base value) throws FHIRException {
364        switch (hash) {
365        case 122345516: // observation
366          this.observation = TypeConvertor.castToReference(value); // Reference
367          return value;
368        case 3575610: // type
369          value = new TriggeredBytypeEnumFactory().fromType(TypeConvertor.castToCode(value));
370          this.type = (Enumeration) value; // Enumeration<TriggeredBytype>
371          return value;
372        case -934964668: // reason
373          this.reason = TypeConvertor.castToString(value); // StringType
374          return value;
375        default: return super.setProperty(hash, name, value);
376        }
377
378      }
379
380      @Override
381      public Base setProperty(String name, Base value) throws FHIRException {
382        if (name.equals("observation")) {
383          this.observation = TypeConvertor.castToReference(value); // Reference
384        } else if (name.equals("type")) {
385          value = new TriggeredBytypeEnumFactory().fromType(TypeConvertor.castToCode(value));
386          this.type = (Enumeration) value; // Enumeration<TriggeredBytype>
387        } else if (name.equals("reason")) {
388          this.reason = TypeConvertor.castToString(value); // StringType
389        } else
390          return super.setProperty(name, value);
391        return value;
392      }
393
394  @Override
395  public void removeChild(String name, Base value) throws FHIRException {
396        if (name.equals("observation")) {
397          this.observation = null;
398        } else if (name.equals("type")) {
399          value = new TriggeredBytypeEnumFactory().fromType(TypeConvertor.castToCode(value));
400          this.type = (Enumeration) value; // Enumeration<TriggeredBytype>
401        } else if (name.equals("reason")) {
402          this.reason = null;
403        } else
404          super.removeChild(name, value);
405        
406      }
407
408      @Override
409      public Base makeProperty(int hash, String name) throws FHIRException {
410        switch (hash) {
411        case 122345516:  return getObservation();
412        case 3575610:  return getTypeElement();
413        case -934964668:  return getReasonElement();
414        default: return super.makeProperty(hash, name);
415        }
416
417      }
418
419      @Override
420      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
421        switch (hash) {
422        case 122345516: /*observation*/ return new String[] {"Reference"};
423        case 3575610: /*type*/ return new String[] {"code"};
424        case -934964668: /*reason*/ return new String[] {"string"};
425        default: return super.getTypesForProperty(hash, name);
426        }
427
428      }
429
430      @Override
431      public Base addChild(String name) throws FHIRException {
432        if (name.equals("observation")) {
433          this.observation = new Reference();
434          return this.observation;
435        }
436        else if (name.equals("type")) {
437          throw new FHIRException("Cannot call addChild on a singleton property Observation.triggeredBy.type");
438        }
439        else if (name.equals("reason")) {
440          throw new FHIRException("Cannot call addChild on a singleton property Observation.triggeredBy.reason");
441        }
442        else
443          return super.addChild(name);
444      }
445
446      public ObservationTriggeredByComponent copy() {
447        ObservationTriggeredByComponent dst = new ObservationTriggeredByComponent();
448        copyValues(dst);
449        return dst;
450      }
451
452      public void copyValues(ObservationTriggeredByComponent dst) {
453        super.copyValues(dst);
454        dst.observation = observation == null ? null : observation.copy();
455        dst.type = type == null ? null : type.copy();
456        dst.reason = reason == null ? null : reason.copy();
457      }
458
459      @Override
460      public boolean equalsDeep(Base other_) {
461        if (!super.equalsDeep(other_))
462          return false;
463        if (!(other_ instanceof ObservationTriggeredByComponent))
464          return false;
465        ObservationTriggeredByComponent o = (ObservationTriggeredByComponent) other_;
466        return compareDeep(observation, o.observation, true) && compareDeep(type, o.type, true) && compareDeep(reason, o.reason, true)
467          ;
468      }
469
470      @Override
471      public boolean equalsShallow(Base other_) {
472        if (!super.equalsShallow(other_))
473          return false;
474        if (!(other_ instanceof ObservationTriggeredByComponent))
475          return false;
476        ObservationTriggeredByComponent o = (ObservationTriggeredByComponent) other_;
477        return compareValues(type, o.type, true) && compareValues(reason, o.reason, true);
478      }
479
480      public boolean isEmpty() {
481        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(observation, type, reason
482          );
483      }
484
485  public String fhirType() {
486    return "Observation.triggeredBy";
487
488  }
489
490  }
491
492    @Block()
493    public static class ObservationReferenceRangeComponent extends BackboneElement implements IBaseBackboneElement {
494        /**
495         * The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).
496         */
497        @Child(name = "low", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false)
498        @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3)." )
499        protected Quantity low;
500
501        /**
502         * The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).
503         */
504        @Child(name = "high", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false)
505        @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3)." )
506        protected Quantity high;
507
508        /**
509         * The value of the normal value of the reference range.
510         */
511        @Child(name = "normalValue", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
512        @Description(shortDefinition="Normal value, if relevant", formalDefinition="The value of the normal value of the reference range." )
513        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-referencerange-normalvalue")
514        protected CodeableConcept normalValue;
515
516        /**
517         * Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.
518         */
519        @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
520        @Description(shortDefinition="Reference range qualifier", formalDefinition="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." )
521        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/referencerange-meaning")
522        protected CodeableConcept type;
523
524        /**
525         * Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an "AND" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.
526         */
527        @Child(name = "appliesTo", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
528        @Description(shortDefinition="Reference range population", formalDefinition="Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an \"AND\" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used." )
529        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/referencerange-appliesto")
530        protected List<CodeableConcept> appliesTo;
531
532        /**
533         * The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.
534         */
535        @Child(name = "age", type = {Range.class}, order=6, min=0, max=1, modifier=false, summary=false)
536        @Description(shortDefinition="Applicable age range, if relevant", formalDefinition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." )
537        protected Range age;
538
539        /**
540         * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".
541         */
542        @Child(name = "text", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=false)
543        @Description(shortDefinition="Text based reference range in an observation", formalDefinition="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \"Negative\" or a list or table of \"normals\"." )
544        protected MarkdownType text;
545
546        private static final long serialVersionUID = 470232080L;
547
548    /**
549     * Constructor
550     */
551      public ObservationReferenceRangeComponent() {
552        super();
553      }
554
555        /**
556         * @return {@link #low} (The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).)
557         */
558        public Quantity getLow() { 
559          if (this.low == null)
560            if (Configuration.errorOnAutoCreate())
561              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.low");
562            else if (Configuration.doAutoCreate())
563              this.low = new Quantity(); // cc
564          return this.low;
565        }
566
567        public boolean hasLow() { 
568          return this.low != null && !this.low.isEmpty();
569        }
570
571        /**
572         * @param value {@link #low} (The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).)
573         */
574        public ObservationReferenceRangeComponent setLow(Quantity value) { 
575          this.low = value;
576          return this;
577        }
578
579        /**
580         * @return {@link #high} (The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).)
581         */
582        public Quantity getHigh() { 
583          if (this.high == null)
584            if (Configuration.errorOnAutoCreate())
585              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.high");
586            else if (Configuration.doAutoCreate())
587              this.high = new Quantity(); // cc
588          return this.high;
589        }
590
591        public boolean hasHigh() { 
592          return this.high != null && !this.high.isEmpty();
593        }
594
595        /**
596         * @param value {@link #high} (The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).)
597         */
598        public ObservationReferenceRangeComponent setHigh(Quantity value) { 
599          this.high = value;
600          return this;
601        }
602
603        /**
604         * @return {@link #normalValue} (The value of the normal value of the reference range.)
605         */
606        public CodeableConcept getNormalValue() { 
607          if (this.normalValue == null)
608            if (Configuration.errorOnAutoCreate())
609              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.normalValue");
610            else if (Configuration.doAutoCreate())
611              this.normalValue = new CodeableConcept(); // cc
612          return this.normalValue;
613        }
614
615        public boolean hasNormalValue() { 
616          return this.normalValue != null && !this.normalValue.isEmpty();
617        }
618
619        /**
620         * @param value {@link #normalValue} (The value of the normal value of the reference range.)
621         */
622        public ObservationReferenceRangeComponent setNormalValue(CodeableConcept value) { 
623          this.normalValue = value;
624          return this;
625        }
626
627        /**
628         * @return {@link #type} (Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.)
629         */
630        public CodeableConcept getType() { 
631          if (this.type == null)
632            if (Configuration.errorOnAutoCreate())
633              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.type");
634            else if (Configuration.doAutoCreate())
635              this.type = new CodeableConcept(); // cc
636          return this.type;
637        }
638
639        public boolean hasType() { 
640          return this.type != null && !this.type.isEmpty();
641        }
642
643        /**
644         * @param value {@link #type} (Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.)
645         */
646        public ObservationReferenceRangeComponent setType(CodeableConcept value) { 
647          this.type = value;
648          return this;
649        }
650
651        /**
652         * @return {@link #appliesTo} (Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an "AND" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.)
653         */
654        public List<CodeableConcept> getAppliesTo() { 
655          if (this.appliesTo == null)
656            this.appliesTo = new ArrayList<CodeableConcept>();
657          return this.appliesTo;
658        }
659
660        /**
661         * @return Returns a reference to <code>this</code> for easy method chaining
662         */
663        public ObservationReferenceRangeComponent setAppliesTo(List<CodeableConcept> theAppliesTo) { 
664          this.appliesTo = theAppliesTo;
665          return this;
666        }
667
668        public boolean hasAppliesTo() { 
669          if (this.appliesTo == null)
670            return false;
671          for (CodeableConcept item : this.appliesTo)
672            if (!item.isEmpty())
673              return true;
674          return false;
675        }
676
677        public CodeableConcept addAppliesTo() { //3
678          CodeableConcept t = new CodeableConcept();
679          if (this.appliesTo == null)
680            this.appliesTo = new ArrayList<CodeableConcept>();
681          this.appliesTo.add(t);
682          return t;
683        }
684
685        public ObservationReferenceRangeComponent addAppliesTo(CodeableConcept t) { //3
686          if (t == null)
687            return this;
688          if (this.appliesTo == null)
689            this.appliesTo = new ArrayList<CodeableConcept>();
690          this.appliesTo.add(t);
691          return this;
692        }
693
694        /**
695         * @return The first repetition of repeating field {@link #appliesTo}, creating it if it does not already exist {3}
696         */
697        public CodeableConcept getAppliesToFirstRep() { 
698          if (getAppliesTo().isEmpty()) {
699            addAppliesTo();
700          }
701          return getAppliesTo().get(0);
702        }
703
704        /**
705         * @return {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.)
706         */
707        public Range getAge() { 
708          if (this.age == null)
709            if (Configuration.errorOnAutoCreate())
710              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.age");
711            else if (Configuration.doAutoCreate())
712              this.age = new Range(); // cc
713          return this.age;
714        }
715
716        public boolean hasAge() { 
717          return this.age != null && !this.age.isEmpty();
718        }
719
720        /**
721         * @param value {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.)
722         */
723        public ObservationReferenceRangeComponent setAge(Range value) { 
724          this.age = value;
725          return this;
726        }
727
728        /**
729         * @return {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
730         */
731        public MarkdownType getTextElement() { 
732          if (this.text == null)
733            if (Configuration.errorOnAutoCreate())
734              throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.text");
735            else if (Configuration.doAutoCreate())
736              this.text = new MarkdownType(); // bb
737          return this.text;
738        }
739
740        public boolean hasTextElement() { 
741          return this.text != null && !this.text.isEmpty();
742        }
743
744        public boolean hasText() { 
745          return this.text != null && !this.text.isEmpty();
746        }
747
748        /**
749         * @param value {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
750         */
751        public ObservationReferenceRangeComponent setTextElement(MarkdownType value) { 
752          this.text = value;
753          return this;
754        }
755
756        /**
757         * @return Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".
758         */
759        public String getText() { 
760          return this.text == null ? null : this.text.getValue();
761        }
762
763        /**
764         * @param value Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".
765         */
766        public ObservationReferenceRangeComponent setText(String value) { 
767          if (Utilities.noString(value))
768            this.text = null;
769          else {
770            if (this.text == null)
771              this.text = new MarkdownType();
772            this.text.setValue(value);
773          }
774          return this;
775        }
776
777        protected void listChildren(List<Property> children) {
778          super.listChildren(children);
779          children.add(new Property("low", "Quantity", "The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).", 0, 1, low));
780          children.add(new Property("high", "Quantity", "The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).", 0, 1, high));
781          children.add(new Property("normalValue", "CodeableConcept", "The value of the normal value of the reference range.", 0, 1, normalValue));
782          children.add(new Property("type", "CodeableConcept", "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", 0, 1, type));
783          children.add(new Property("appliesTo", "CodeableConcept", "Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an \"AND\" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.", 0, java.lang.Integer.MAX_VALUE, appliesTo));
784          children.add(new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, 1, age));
785          children.add(new Property("text", "markdown", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \"Negative\" or a list or table of \"normals\".", 0, 1, text));
786        }
787
788        @Override
789        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
790          switch (_hash) {
791          case 107348: /*low*/  return new Property("low", "Quantity", "The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).", 0, 1, low);
792          case 3202466: /*high*/  return new Property("high", "Quantity", "The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).", 0, 1, high);
793          case -270017334: /*normalValue*/  return new Property("normalValue", "CodeableConcept", "The value of the normal value of the reference range.", 0, 1, normalValue);
794          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", 0, 1, type);
795          case -2089924569: /*appliesTo*/  return new Property("appliesTo", "CodeableConcept", "Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an \"AND\" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.", 0, java.lang.Integer.MAX_VALUE, appliesTo);
796          case 96511: /*age*/  return new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, 1, age);
797          case 3556653: /*text*/  return new Property("text", "markdown", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \"Negative\" or a list or table of \"normals\".", 0, 1, text);
798          default: return super.getNamedProperty(_hash, _name, _checkValid);
799          }
800
801        }
802
803      @Override
804      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
805        switch (hash) {
806        case 107348: /*low*/ return this.low == null ? new Base[0] : new Base[] {this.low}; // Quantity
807        case 3202466: /*high*/ return this.high == null ? new Base[0] : new Base[] {this.high}; // Quantity
808        case -270017334: /*normalValue*/ return this.normalValue == null ? new Base[0] : new Base[] {this.normalValue}; // CodeableConcept
809        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
810        case -2089924569: /*appliesTo*/ return this.appliesTo == null ? new Base[0] : this.appliesTo.toArray(new Base[this.appliesTo.size()]); // CodeableConcept
811        case 96511: /*age*/ return this.age == null ? new Base[0] : new Base[] {this.age}; // Range
812        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // MarkdownType
813        default: return super.getProperty(hash, name, checkValid);
814        }
815
816      }
817
818      @Override
819      public Base setProperty(int hash, String name, Base value) throws FHIRException {
820        switch (hash) {
821        case 107348: // low
822          this.low = TypeConvertor.castToQuantity(value); // Quantity
823          return value;
824        case 3202466: // high
825          this.high = TypeConvertor.castToQuantity(value); // Quantity
826          return value;
827        case -270017334: // normalValue
828          this.normalValue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
829          return value;
830        case 3575610: // type
831          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
832          return value;
833        case -2089924569: // appliesTo
834          this.getAppliesTo().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
835          return value;
836        case 96511: // age
837          this.age = TypeConvertor.castToRange(value); // Range
838          return value;
839        case 3556653: // text
840          this.text = TypeConvertor.castToMarkdown(value); // MarkdownType
841          return value;
842        default: return super.setProperty(hash, name, value);
843        }
844
845      }
846
847      @Override
848      public Base setProperty(String name, Base value) throws FHIRException {
849        if (name.equals("low")) {
850          this.low = TypeConvertor.castToQuantity(value); // Quantity
851        } else if (name.equals("high")) {
852          this.high = TypeConvertor.castToQuantity(value); // Quantity
853        } else if (name.equals("normalValue")) {
854          this.normalValue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
855        } else if (name.equals("type")) {
856          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
857        } else if (name.equals("appliesTo")) {
858          this.getAppliesTo().add(TypeConvertor.castToCodeableConcept(value));
859        } else if (name.equals("age")) {
860          this.age = TypeConvertor.castToRange(value); // Range
861        } else if (name.equals("text")) {
862          this.text = TypeConvertor.castToMarkdown(value); // MarkdownType
863        } else
864          return super.setProperty(name, value);
865        return value;
866      }
867
868  @Override
869  public void removeChild(String name, Base value) throws FHIRException {
870        if (name.equals("low")) {
871          this.low = null;
872        } else if (name.equals("high")) {
873          this.high = null;
874        } else if (name.equals("normalValue")) {
875          this.normalValue = null;
876        } else if (name.equals("type")) {
877          this.type = null;
878        } else if (name.equals("appliesTo")) {
879          this.getAppliesTo().remove(value);
880        } else if (name.equals("age")) {
881          this.age = null;
882        } else if (name.equals("text")) {
883          this.text = null;
884        } else
885          super.removeChild(name, value);
886        
887      }
888
889      @Override
890      public Base makeProperty(int hash, String name) throws FHIRException {
891        switch (hash) {
892        case 107348:  return getLow();
893        case 3202466:  return getHigh();
894        case -270017334:  return getNormalValue();
895        case 3575610:  return getType();
896        case -2089924569:  return addAppliesTo(); 
897        case 96511:  return getAge();
898        case 3556653:  return getTextElement();
899        default: return super.makeProperty(hash, name);
900        }
901
902      }
903
904      @Override
905      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
906        switch (hash) {
907        case 107348: /*low*/ return new String[] {"Quantity"};
908        case 3202466: /*high*/ return new String[] {"Quantity"};
909        case -270017334: /*normalValue*/ return new String[] {"CodeableConcept"};
910        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
911        case -2089924569: /*appliesTo*/ return new String[] {"CodeableConcept"};
912        case 96511: /*age*/ return new String[] {"Range"};
913        case 3556653: /*text*/ return new String[] {"markdown"};
914        default: return super.getTypesForProperty(hash, name);
915        }
916
917      }
918
919      @Override
920      public Base addChild(String name) throws FHIRException {
921        if (name.equals("low")) {
922          this.low = new Quantity();
923          return this.low;
924        }
925        else if (name.equals("high")) {
926          this.high = new Quantity();
927          return this.high;
928        }
929        else if (name.equals("normalValue")) {
930          this.normalValue = new CodeableConcept();
931          return this.normalValue;
932        }
933        else if (name.equals("type")) {
934          this.type = new CodeableConcept();
935          return this.type;
936        }
937        else if (name.equals("appliesTo")) {
938          return addAppliesTo();
939        }
940        else if (name.equals("age")) {
941          this.age = new Range();
942          return this.age;
943        }
944        else if (name.equals("text")) {
945          throw new FHIRException("Cannot call addChild on a singleton property Observation.referenceRange.text");
946        }
947        else
948          return super.addChild(name);
949      }
950
951      public ObservationReferenceRangeComponent copy() {
952        ObservationReferenceRangeComponent dst = new ObservationReferenceRangeComponent();
953        copyValues(dst);
954        return dst;
955      }
956
957      public void copyValues(ObservationReferenceRangeComponent dst) {
958        super.copyValues(dst);
959        dst.low = low == null ? null : low.copy();
960        dst.high = high == null ? null : high.copy();
961        dst.normalValue = normalValue == null ? null : normalValue.copy();
962        dst.type = type == null ? null : type.copy();
963        if (appliesTo != null) {
964          dst.appliesTo = new ArrayList<CodeableConcept>();
965          for (CodeableConcept i : appliesTo)
966            dst.appliesTo.add(i.copy());
967        };
968        dst.age = age == null ? null : age.copy();
969        dst.text = text == null ? null : text.copy();
970      }
971
972      @Override
973      public boolean equalsDeep(Base other_) {
974        if (!super.equalsDeep(other_))
975          return false;
976        if (!(other_ instanceof ObservationReferenceRangeComponent))
977          return false;
978        ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other_;
979        return compareDeep(low, o.low, true) && compareDeep(high, o.high, true) && compareDeep(normalValue, o.normalValue, true)
980           && compareDeep(type, o.type, true) && compareDeep(appliesTo, o.appliesTo, true) && compareDeep(age, o.age, true)
981           && compareDeep(text, o.text, true);
982      }
983
984      @Override
985      public boolean equalsShallow(Base other_) {
986        if (!super.equalsShallow(other_))
987          return false;
988        if (!(other_ instanceof ObservationReferenceRangeComponent))
989          return false;
990        ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other_;
991        return compareValues(text, o.text, true);
992      }
993
994      public boolean isEmpty() {
995        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(low, high, normalValue, type
996          , appliesTo, age, text);
997      }
998
999  public String fhirType() {
1000    return "Observation.referenceRange";
1001
1002  }
1003
1004  }
1005
1006    @Block()
1007    public static class ObservationComponentComponent extends BackboneElement implements IBaseBackboneElement {
1008        /**
1009         * Describes what was observed. Sometimes this is called the observation "code".
1010         */
1011        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
1012        @Description(shortDefinition="Type of component observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"code\"." )
1013        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
1014        protected CodeableConcept code;
1015
1016        /**
1017         * The information determined as a result of making the observation, if the information has a simple value.
1018         */
1019        @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, TimeType.class, DateTimeType.class, Period.class, Attachment.class, MolecularSequence.class}, order=2, min=0, max=1, modifier=false, summary=true)
1020        @Description(shortDefinition="Actual component result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." )
1021        protected DataType value;
1022
1023        /**
1024         * Provides a reason why the expected value in the element Observation.component.value[x] is missing.
1025         */
1026        @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
1027        @Description(shortDefinition="Why the component result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.component.value[x] is missing." )
1028        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/data-absent-reason")
1029        protected CodeableConcept dataAbsentReason;
1030
1031        /**
1032         * A categorical assessment of an observation value.  For example, high, low, normal.
1033         */
1034        @Child(name = "interpretation", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1035        @Description(shortDefinition="High, low, normal, etc", formalDefinition="A categorical assessment of an observation value.  For example, high, low, normal." )
1036        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-interpretation")
1037        protected List<CodeableConcept> interpretation;
1038
1039        /**
1040         * Guidance on how to interpret the value by comparison to a normal or recommended range.
1041         */
1042        @Child(name = "referenceRange", type = {ObservationReferenceRangeComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1043        @Description(shortDefinition="Provides guide for interpretation of component result", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." )
1044        protected List<ObservationReferenceRangeComponent> referenceRange;
1045
1046        private static final long serialVersionUID = -1771757751L;
1047
1048    /**
1049     * Constructor
1050     */
1051      public ObservationComponentComponent() {
1052        super();
1053      }
1054
1055    /**
1056     * Constructor
1057     */
1058      public ObservationComponentComponent(CodeableConcept code) {
1059        super();
1060        this.setCode(code);
1061      }
1062
1063        /**
1064         * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "code".)
1065         */
1066        public CodeableConcept getCode() { 
1067          if (this.code == null)
1068            if (Configuration.errorOnAutoCreate())
1069              throw new Error("Attempt to auto-create ObservationComponentComponent.code");
1070            else if (Configuration.doAutoCreate())
1071              this.code = new CodeableConcept(); // cc
1072          return this.code;
1073        }
1074
1075        public boolean hasCode() { 
1076          return this.code != null && !this.code.isEmpty();
1077        }
1078
1079        /**
1080         * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "code".)
1081         */
1082        public ObservationComponentComponent setCode(CodeableConcept value) { 
1083          this.code = value;
1084          return this;
1085        }
1086
1087        /**
1088         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1089         */
1090        public DataType getValue() { 
1091          return this.value;
1092        }
1093
1094        /**
1095         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1096         */
1097        public Quantity getValueQuantity() throws FHIRException { 
1098          if (this.value == null)
1099            this.value = new Quantity();
1100          if (!(this.value instanceof Quantity))
1101            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
1102          return (Quantity) this.value;
1103        }
1104
1105        public boolean hasValueQuantity() { 
1106          return this != null && this.value instanceof Quantity;
1107        }
1108
1109        /**
1110         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1111         */
1112        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
1113          if (this.value == null)
1114            this.value = new CodeableConcept();
1115          if (!(this.value instanceof CodeableConcept))
1116            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
1117          return (CodeableConcept) this.value;
1118        }
1119
1120        public boolean hasValueCodeableConcept() { 
1121          return this != null && this.value instanceof CodeableConcept;
1122        }
1123
1124        /**
1125         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1126         */
1127        public StringType getValueStringType() throws FHIRException { 
1128          if (this.value == null)
1129            this.value = new StringType();
1130          if (!(this.value instanceof StringType))
1131            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
1132          return (StringType) this.value;
1133        }
1134
1135        public boolean hasValueStringType() { 
1136          return this != null && this.value instanceof StringType;
1137        }
1138
1139        /**
1140         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1141         */
1142        public BooleanType getValueBooleanType() throws FHIRException { 
1143          if (this.value == null)
1144            this.value = new BooleanType();
1145          if (!(this.value instanceof BooleanType))
1146            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
1147          return (BooleanType) this.value;
1148        }
1149
1150        public boolean hasValueBooleanType() { 
1151          return this != null && this.value instanceof BooleanType;
1152        }
1153
1154        /**
1155         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1156         */
1157        public IntegerType getValueIntegerType() throws FHIRException { 
1158          if (this.value == null)
1159            this.value = new IntegerType();
1160          if (!(this.value instanceof IntegerType))
1161            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
1162          return (IntegerType) this.value;
1163        }
1164
1165        public boolean hasValueIntegerType() { 
1166          return this != null && this.value instanceof IntegerType;
1167        }
1168
1169        /**
1170         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1171         */
1172        public Range getValueRange() throws FHIRException { 
1173          if (this.value == null)
1174            this.value = new Range();
1175          if (!(this.value instanceof Range))
1176            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
1177          return (Range) this.value;
1178        }
1179
1180        public boolean hasValueRange() { 
1181          return this != null && this.value instanceof Range;
1182        }
1183
1184        /**
1185         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1186         */
1187        public Ratio getValueRatio() throws FHIRException { 
1188          if (this.value == null)
1189            this.value = new Ratio();
1190          if (!(this.value instanceof Ratio))
1191            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
1192          return (Ratio) this.value;
1193        }
1194
1195        public boolean hasValueRatio() { 
1196          return this != null && this.value instanceof Ratio;
1197        }
1198
1199        /**
1200         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1201         */
1202        public SampledData getValueSampledData() throws FHIRException { 
1203          if (this.value == null)
1204            this.value = new SampledData();
1205          if (!(this.value instanceof SampledData))
1206            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
1207          return (SampledData) this.value;
1208        }
1209
1210        public boolean hasValueSampledData() { 
1211          return this != null && this.value instanceof SampledData;
1212        }
1213
1214        /**
1215         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1216         */
1217        public TimeType getValueTimeType() throws FHIRException { 
1218          if (this.value == null)
1219            this.value = new TimeType();
1220          if (!(this.value instanceof TimeType))
1221            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1222          return (TimeType) this.value;
1223        }
1224
1225        public boolean hasValueTimeType() { 
1226          return this != null && this.value instanceof TimeType;
1227        }
1228
1229        /**
1230         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1231         */
1232        public DateTimeType getValueDateTimeType() throws FHIRException { 
1233          if (this.value == null)
1234            this.value = new DateTimeType();
1235          if (!(this.value instanceof DateTimeType))
1236            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1237          return (DateTimeType) this.value;
1238        }
1239
1240        public boolean hasValueDateTimeType() { 
1241          return this != null && this.value instanceof DateTimeType;
1242        }
1243
1244        /**
1245         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1246         */
1247        public Period getValuePeriod() throws FHIRException { 
1248          if (this.value == null)
1249            this.value = new Period();
1250          if (!(this.value instanceof Period))
1251            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
1252          return (Period) this.value;
1253        }
1254
1255        public boolean hasValuePeriod() { 
1256          return this != null && this.value instanceof Period;
1257        }
1258
1259        /**
1260         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1261         */
1262        public Attachment getValueAttachment() throws FHIRException { 
1263          if (this.value == null)
1264            this.value = new Attachment();
1265          if (!(this.value instanceof Attachment))
1266            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
1267          return (Attachment) this.value;
1268        }
1269
1270        public boolean hasValueAttachment() { 
1271          return this != null && this.value instanceof Attachment;
1272        }
1273
1274        /**
1275         * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1276         */
1277        public Reference getValueReference() throws FHIRException { 
1278          if (this.value == null)
1279            this.value = new Reference();
1280          if (!(this.value instanceof Reference))
1281            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
1282          return (Reference) this.value;
1283        }
1284
1285        public boolean hasValueReference() { 
1286          return this != null && this.value instanceof Reference;
1287        }
1288
1289        public boolean hasValue() { 
1290          return this.value != null && !this.value.isEmpty();
1291        }
1292
1293        /**
1294         * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
1295         */
1296        public ObservationComponentComponent setValue(DataType value) { 
1297          if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period || value instanceof Attachment || value instanceof Reference))
1298            throw new FHIRException("Not the right type for Observation.component.value[x]: "+value.fhirType());
1299          this.value = value;
1300          return this;
1301        }
1302
1303        /**
1304         * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.component.value[x] is missing.)
1305         */
1306        public CodeableConcept getDataAbsentReason() { 
1307          if (this.dataAbsentReason == null)
1308            if (Configuration.errorOnAutoCreate())
1309              throw new Error("Attempt to auto-create ObservationComponentComponent.dataAbsentReason");
1310            else if (Configuration.doAutoCreate())
1311              this.dataAbsentReason = new CodeableConcept(); // cc
1312          return this.dataAbsentReason;
1313        }
1314
1315        public boolean hasDataAbsentReason() { 
1316          return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty();
1317        }
1318
1319        /**
1320         * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.component.value[x] is missing.)
1321         */
1322        public ObservationComponentComponent setDataAbsentReason(CodeableConcept value) { 
1323          this.dataAbsentReason = value;
1324          return this;
1325        }
1326
1327        /**
1328         * @return {@link #interpretation} (A categorical assessment of an observation value.  For example, high, low, normal.)
1329         */
1330        public List<CodeableConcept> getInterpretation() { 
1331          if (this.interpretation == null)
1332            this.interpretation = new ArrayList<CodeableConcept>();
1333          return this.interpretation;
1334        }
1335
1336        /**
1337         * @return Returns a reference to <code>this</code> for easy method chaining
1338         */
1339        public ObservationComponentComponent setInterpretation(List<CodeableConcept> theInterpretation) { 
1340          this.interpretation = theInterpretation;
1341          return this;
1342        }
1343
1344        public boolean hasInterpretation() { 
1345          if (this.interpretation == null)
1346            return false;
1347          for (CodeableConcept item : this.interpretation)
1348            if (!item.isEmpty())
1349              return true;
1350          return false;
1351        }
1352
1353        public CodeableConcept addInterpretation() { //3
1354          CodeableConcept t = new CodeableConcept();
1355          if (this.interpretation == null)
1356            this.interpretation = new ArrayList<CodeableConcept>();
1357          this.interpretation.add(t);
1358          return t;
1359        }
1360
1361        public ObservationComponentComponent addInterpretation(CodeableConcept t) { //3
1362          if (t == null)
1363            return this;
1364          if (this.interpretation == null)
1365            this.interpretation = new ArrayList<CodeableConcept>();
1366          this.interpretation.add(t);
1367          return this;
1368        }
1369
1370        /**
1371         * @return The first repetition of repeating field {@link #interpretation}, creating it if it does not already exist {3}
1372         */
1373        public CodeableConcept getInterpretationFirstRep() { 
1374          if (getInterpretation().isEmpty()) {
1375            addInterpretation();
1376          }
1377          return getInterpretation().get(0);
1378        }
1379
1380        /**
1381         * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.)
1382         */
1383        public List<ObservationReferenceRangeComponent> getReferenceRange() { 
1384          if (this.referenceRange == null)
1385            this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
1386          return this.referenceRange;
1387        }
1388
1389        /**
1390         * @return Returns a reference to <code>this</code> for easy method chaining
1391         */
1392        public ObservationComponentComponent setReferenceRange(List<ObservationReferenceRangeComponent> theReferenceRange) { 
1393          this.referenceRange = theReferenceRange;
1394          return this;
1395        }
1396
1397        public boolean hasReferenceRange() { 
1398          if (this.referenceRange == null)
1399            return false;
1400          for (ObservationReferenceRangeComponent item : this.referenceRange)
1401            if (!item.isEmpty())
1402              return true;
1403          return false;
1404        }
1405
1406        public ObservationReferenceRangeComponent addReferenceRange() { //3
1407          ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent();
1408          if (this.referenceRange == null)
1409            this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
1410          this.referenceRange.add(t);
1411          return t;
1412        }
1413
1414        public ObservationComponentComponent addReferenceRange(ObservationReferenceRangeComponent t) { //3
1415          if (t == null)
1416            return this;
1417          if (this.referenceRange == null)
1418            this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
1419          this.referenceRange.add(t);
1420          return this;
1421        }
1422
1423        /**
1424         * @return The first repetition of repeating field {@link #referenceRange}, creating it if it does not already exist {3}
1425         */
1426        public ObservationReferenceRangeComponent getReferenceRangeFirstRep() { 
1427          if (getReferenceRange().isEmpty()) {
1428            addReferenceRange();
1429          }
1430          return getReferenceRange().get(0);
1431        }
1432
1433        protected void listChildren(List<Property> children) {
1434          super.listChildren(children);
1435          children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code));
1436          children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value));
1437          children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason));
1438          children.add(new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value.  For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation));
1439          children.add(new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange));
1440        }
1441
1442        @Override
1443        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1444          switch (_hash) {
1445          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code);
1446          case -1410166417: /*value[x]*/  return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1447          case 111972721: /*value*/  return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1448          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1449          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1450          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1451          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1452          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1453          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1454          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1455          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1456          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1457          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1458          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1459          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1460          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
1461          case 1034315687: /*dataAbsentReason*/  return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason);
1462          case -297950712: /*interpretation*/  return new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value.  For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation);
1463          case -1912545102: /*referenceRange*/  return new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange);
1464          default: return super.getNamedProperty(_hash, _name, _checkValid);
1465          }
1466
1467        }
1468
1469      @Override
1470      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1471        switch (hash) {
1472        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1473        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1474        case 1034315687: /*dataAbsentReason*/ return this.dataAbsentReason == null ? new Base[0] : new Base[] {this.dataAbsentReason}; // CodeableConcept
1475        case -297950712: /*interpretation*/ return this.interpretation == null ? new Base[0] : this.interpretation.toArray(new Base[this.interpretation.size()]); // CodeableConcept
1476        case -1912545102: /*referenceRange*/ return this.referenceRange == null ? new Base[0] : this.referenceRange.toArray(new Base[this.referenceRange.size()]); // ObservationReferenceRangeComponent
1477        default: return super.getProperty(hash, name, checkValid);
1478        }
1479
1480      }
1481
1482      @Override
1483      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1484        switch (hash) {
1485        case 3059181: // code
1486          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1487          return value;
1488        case 111972721: // value
1489          this.value = TypeConvertor.castToType(value); // DataType
1490          return value;
1491        case 1034315687: // dataAbsentReason
1492          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1493          return value;
1494        case -297950712: // interpretation
1495          this.getInterpretation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1496          return value;
1497        case -1912545102: // referenceRange
1498          this.getReferenceRange().add((ObservationReferenceRangeComponent) value); // ObservationReferenceRangeComponent
1499          return value;
1500        default: return super.setProperty(hash, name, value);
1501        }
1502
1503      }
1504
1505      @Override
1506      public Base setProperty(String name, Base value) throws FHIRException {
1507        if (name.equals("code")) {
1508          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1509        } else if (name.equals("value[x]")) {
1510          this.value = TypeConvertor.castToType(value); // DataType
1511        } else if (name.equals("dataAbsentReason")) {
1512          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1513        } else if (name.equals("interpretation")) {
1514          this.getInterpretation().add(TypeConvertor.castToCodeableConcept(value));
1515        } else if (name.equals("referenceRange")) {
1516          this.getReferenceRange().add((ObservationReferenceRangeComponent) value);
1517        } else
1518          return super.setProperty(name, value);
1519        return value;
1520      }
1521
1522  @Override
1523  public void removeChild(String name, Base value) throws FHIRException {
1524        if (name.equals("code")) {
1525          this.code = null;
1526        } else if (name.equals("value[x]")) {
1527          this.value = null;
1528        } else if (name.equals("dataAbsentReason")) {
1529          this.dataAbsentReason = null;
1530        } else if (name.equals("interpretation")) {
1531          this.getInterpretation().remove(value);
1532        } else if (name.equals("referenceRange")) {
1533          this.getReferenceRange().remove((ObservationReferenceRangeComponent) value);
1534        } else
1535          super.removeChild(name, value);
1536        
1537      }
1538
1539      @Override
1540      public Base makeProperty(int hash, String name) throws FHIRException {
1541        switch (hash) {
1542        case 3059181:  return getCode();
1543        case -1410166417:  return getValue();
1544        case 111972721:  return getValue();
1545        case 1034315687:  return getDataAbsentReason();
1546        case -297950712:  return addInterpretation(); 
1547        case -1912545102:  return addReferenceRange(); 
1548        default: return super.makeProperty(hash, name);
1549        }
1550
1551      }
1552
1553      @Override
1554      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1555        switch (hash) {
1556        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1557        case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "time", "dateTime", "Period", "Attachment", "Reference"};
1558        case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"};
1559        case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"};
1560        case -1912545102: /*referenceRange*/ return new String[] {"@Observation.referenceRange"};
1561        default: return super.getTypesForProperty(hash, name);
1562        }
1563
1564      }
1565
1566      @Override
1567      public Base addChild(String name) throws FHIRException {
1568        if (name.equals("code")) {
1569          this.code = new CodeableConcept();
1570          return this.code;
1571        }
1572        else if (name.equals("valueQuantity")) {
1573          this.value = new Quantity();
1574          return this.value;
1575        }
1576        else if (name.equals("valueCodeableConcept")) {
1577          this.value = new CodeableConcept();
1578          return this.value;
1579        }
1580        else if (name.equals("valueString")) {
1581          this.value = new StringType();
1582          return this.value;
1583        }
1584        else if (name.equals("valueBoolean")) {
1585          this.value = new BooleanType();
1586          return this.value;
1587        }
1588        else if (name.equals("valueInteger")) {
1589          this.value = new IntegerType();
1590          return this.value;
1591        }
1592        else if (name.equals("valueRange")) {
1593          this.value = new Range();
1594          return this.value;
1595        }
1596        else if (name.equals("valueRatio")) {
1597          this.value = new Ratio();
1598          return this.value;
1599        }
1600        else if (name.equals("valueSampledData")) {
1601          this.value = new SampledData();
1602          return this.value;
1603        }
1604        else if (name.equals("valueTime")) {
1605          this.value = new TimeType();
1606          return this.value;
1607        }
1608        else if (name.equals("valueDateTime")) {
1609          this.value = new DateTimeType();
1610          return this.value;
1611        }
1612        else if (name.equals("valuePeriod")) {
1613          this.value = new Period();
1614          return this.value;
1615        }
1616        else if (name.equals("valueAttachment")) {
1617          this.value = new Attachment();
1618          return this.value;
1619        }
1620        else if (name.equals("valueReference")) {
1621          this.value = new Reference();
1622          return this.value;
1623        }
1624        else if (name.equals("dataAbsentReason")) {
1625          this.dataAbsentReason = new CodeableConcept();
1626          return this.dataAbsentReason;
1627        }
1628        else if (name.equals("interpretation")) {
1629          return addInterpretation();
1630        }
1631        else if (name.equals("referenceRange")) {
1632          return addReferenceRange();
1633        }
1634        else
1635          return super.addChild(name);
1636      }
1637
1638      public ObservationComponentComponent copy() {
1639        ObservationComponentComponent dst = new ObservationComponentComponent();
1640        copyValues(dst);
1641        return dst;
1642      }
1643
1644      public void copyValues(ObservationComponentComponent dst) {
1645        super.copyValues(dst);
1646        dst.code = code == null ? null : code.copy();
1647        dst.value = value == null ? null : value.copy();
1648        dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy();
1649        if (interpretation != null) {
1650          dst.interpretation = new ArrayList<CodeableConcept>();
1651          for (CodeableConcept i : interpretation)
1652            dst.interpretation.add(i.copy());
1653        };
1654        if (referenceRange != null) {
1655          dst.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
1656          for (ObservationReferenceRangeComponent i : referenceRange)
1657            dst.referenceRange.add(i.copy());
1658        };
1659      }
1660
1661      @Override
1662      public boolean equalsDeep(Base other_) {
1663        if (!super.equalsDeep(other_))
1664          return false;
1665        if (!(other_ instanceof ObservationComponentComponent))
1666          return false;
1667        ObservationComponentComponent o = (ObservationComponentComponent) other_;
1668        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true)
1669           && compareDeep(interpretation, o.interpretation, true) && compareDeep(referenceRange, o.referenceRange, true)
1670          ;
1671      }
1672
1673      @Override
1674      public boolean equalsShallow(Base other_) {
1675        if (!super.equalsShallow(other_))
1676          return false;
1677        if (!(other_ instanceof ObservationComponentComponent))
1678          return false;
1679        ObservationComponentComponent o = (ObservationComponentComponent) other_;
1680        return true;
1681      }
1682
1683      public boolean isEmpty() {
1684        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, dataAbsentReason
1685          , interpretation, referenceRange);
1686      }
1687
1688  public String fhirType() {
1689    return "Observation.component";
1690
1691  }
1692
1693  }
1694
1695    /**
1696     * A unique identifier assigned to this observation.
1697     */
1698    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1699    @Description(shortDefinition="Business Identifier for observation", formalDefinition="A unique identifier assigned to this observation." )
1700    protected List<Identifier> identifier;
1701
1702    /**
1703     * The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.
1704     */
1705    @Child(name = "instantiates", type = {CanonicalType.class, ObservationDefinition.class}, order=1, min=0, max=1, modifier=false, summary=true)
1706    @Description(shortDefinition="Instantiates FHIR ObservationDefinition", formalDefinition="The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance." )
1707    protected DataType instantiates;
1708
1709    /**
1710     * A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.
1711     */
1712    @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1713    @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed." )
1714    protected List<Reference> basedOn;
1715
1716    /**
1717     * Identifies the observation(s) that triggered the performance of this observation.
1718     */
1719    @Child(name = "triggeredBy", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1720    @Description(shortDefinition="Triggering observation(s)", formalDefinition="Identifies the observation(s) that triggered the performance of this observation." )
1721    protected List<ObservationTriggeredByComponent> triggeredBy;
1722
1723    /**
1724     * A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.
1725     */
1726    @Child(name = "partOf", type = {MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Procedure.class, Immunization.class, ImagingStudy.class, GenomicStudy.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1727    @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure." )
1728    protected List<Reference> partOf;
1729
1730    /**
1731     * The status of the result value.
1732     */
1733    @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true)
1734    @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the result value." )
1735    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-status")
1736    protected Enumeration<ObservationStatus> status;
1737
1738    /**
1739     * A code that classifies the general type of observation being made.
1740     */
1741    @Child(name = "category", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1742    @Description(shortDefinition="Classification of  type of observation", formalDefinition="A code that classifies the general type of observation being made." )
1743    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-category")
1744    protected List<CodeableConcept> category;
1745
1746    /**
1747     * Describes what was observed. Sometimes this is called the observation "name".
1748     */
1749    @Child(name = "code", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=true)
1750    @Description(shortDefinition="Type of observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"name\"." )
1751    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
1752    protected CodeableConcept code;
1753
1754    /**
1755     * The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.
1756     */
1757    @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class, Organization.class, Procedure.class, Practitioner.class, Medication.class, Substance.class, BiologicallyDerivedProduct.class, NutritionProduct.class}, order=8, min=0, max=1, modifier=false, summary=true)
1758    @Description(shortDefinition="Who and/or what the observation is about", formalDefinition="The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." )
1759    protected Reference subject;
1760
1761    /**
1762     * The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.
1763     */
1764    @Child(name = "focus", type = {Reference.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1765    @Description(shortDefinition="What the observation is about, when it is not about the subject of record", formalDefinition="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." )
1766    protected List<Reference> focus;
1767
1768    /**
1769     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.
1770     */
1771    @Child(name = "encounter", type = {Encounter.class}, order=10, min=0, max=1, modifier=false, summary=true)
1772    @Description(shortDefinition="Healthcare event during which this observation is made", formalDefinition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made." )
1773    protected Reference encounter;
1774
1775    /**
1776     * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.
1777     */
1778    @Child(name = "effective", type = {DateTimeType.class, Period.class, Timing.class, InstantType.class}, order=11, min=0, max=1, modifier=false, summary=true)
1779    @Description(shortDefinition="Clinically relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." )
1780    protected DataType effective;
1781
1782    /**
1783     * The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.
1784     */
1785    @Child(name = "issued", type = {InstantType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1786    @Description(shortDefinition="Date/Time this version was made available", formalDefinition="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." )
1787    protected InstantType issued;
1788
1789    /**
1790     * Who was responsible for asserting the observed value as "true".
1791     */
1792    @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1793    @Description(shortDefinition="Who is responsible for the observation", formalDefinition="Who was responsible for asserting the observed value as \"true\"." )
1794    protected List<Reference> performer;
1795
1796    /**
1797     * The information determined as a result of making the observation, if the information has a simple value.
1798     */
1799    @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, TimeType.class, DateTimeType.class, Period.class, Attachment.class, MolecularSequence.class}, order=14, min=0, max=1, modifier=false, summary=true)
1800    @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." )
1801    protected DataType value;
1802
1803    /**
1804     * Provides a reason why the expected value in the element Observation.value[x] is missing.
1805     */
1806    @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=false)
1807    @Description(shortDefinition="Why the result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." )
1808    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/data-absent-reason")
1809    protected CodeableConcept dataAbsentReason;
1810
1811    /**
1812     * A categorical assessment of an observation value.  For example, high, low, normal.
1813     */
1814    @Child(name = "interpretation", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1815    @Description(shortDefinition="High, low, normal, etc", formalDefinition="A categorical assessment of an observation value.  For example, high, low, normal." )
1816    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-interpretation")
1817    protected List<CodeableConcept> interpretation;
1818
1819    /**
1820     * Comments about the observation or the results.
1821     */
1822    @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1823    @Description(shortDefinition="Comments about the observation", formalDefinition="Comments about the observation or the results." )
1824    protected List<Annotation> note;
1825
1826    /**
1827     * Indicates the site on the subject's body where the observation was made (i.e. the target site).
1828     */
1829    @Child(name = "bodySite", type = {CodeableConcept.class}, order=18, min=0, max=1, modifier=false, summary=false)
1830    @Description(shortDefinition="Observed body part", formalDefinition="Indicates the site on the subject's body where the observation was made (i.e. the target site)." )
1831    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
1832    protected CodeableConcept bodySite;
1833
1834    /**
1835     * Indicates the body structure on the subject's body where the observation was made (i.e. the target site).
1836     */
1837    @Child(name = "bodyStructure", type = {BodyStructure.class}, order=19, min=0, max=1, modifier=false, summary=false)
1838    @Description(shortDefinition="Observed body structure", formalDefinition="Indicates the body structure on the subject's body where the observation was made (i.e. the target site)." )
1839    protected Reference bodyStructure;
1840
1841    /**
1842     * Indicates the mechanism used to perform the observation.
1843     */
1844    @Child(name = "method", type = {CodeableConcept.class}, order=20, min=0, max=1, modifier=false, summary=false)
1845    @Description(shortDefinition="How it was done", formalDefinition="Indicates the mechanism used to perform the observation." )
1846    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-methods")
1847    protected CodeableConcept method;
1848
1849    /**
1850     * The specimen that was used when this observation was made.
1851     */
1852    @Child(name = "specimen", type = {Specimen.class, Group.class}, order=21, min=0, max=1, modifier=false, summary=false)
1853    @Description(shortDefinition="Specimen used for this observation", formalDefinition="The specimen that was used when this observation was made." )
1854    protected Reference specimen;
1855
1856    /**
1857     * A reference to the device that generates the measurements or the device settings for the device.
1858     */
1859    @Child(name = "device", type = {Device.class, DeviceMetric.class}, order=22, min=0, max=1, modifier=false, summary=false)
1860    @Description(shortDefinition="A reference to the device that generates the measurements or the device settings for the device", formalDefinition="A reference to the device that generates the measurements or the device settings for the device." )
1861    protected Reference device;
1862
1863    /**
1864     * Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an "OR".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.
1865     */
1866    @Child(name = "referenceRange", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1867    @Description(shortDefinition="Provides guide for interpretation", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an \"OR\".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used." )
1868    protected List<ObservationReferenceRangeComponent> referenceRange;
1869
1870    /**
1871     * This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.
1872     */
1873    @Child(name = "hasMember", type = {Observation.class, QuestionnaireResponse.class, MolecularSequence.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1874    @Description(shortDefinition="Related resource that belongs to the Observation group", formalDefinition="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group." )
1875    protected List<Reference> hasMember;
1876
1877    /**
1878     * The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.
1879     */
1880    @Child(name = "derivedFrom", type = {DocumentReference.class, ImagingStudy.class, ImagingSelection.class, QuestionnaireResponse.class, Observation.class, MolecularSequence.class, GenomicStudy.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1881    @Description(shortDefinition="Related resource from which the observation is made", formalDefinition="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." )
1882    protected List<Reference> derivedFrom;
1883
1884    /**
1885     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
1886     */
1887    @Child(name = "component", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1888    @Description(shortDefinition="Component results", formalDefinition="Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." )
1889    protected List<ObservationComponentComponent> component;
1890
1891    private static final long serialVersionUID = -44103660L;
1892
1893  /**
1894   * Constructor
1895   */
1896    public Observation() {
1897      super();
1898    }
1899
1900  /**
1901   * Constructor
1902   */
1903    public Observation(ObservationStatus status, CodeableConcept code) {
1904      super();
1905      this.setStatus(status);
1906      this.setCode(code);
1907    }
1908
1909    /**
1910     * @return {@link #identifier} (A unique identifier assigned to this observation.)
1911     */
1912    public List<Identifier> getIdentifier() { 
1913      if (this.identifier == null)
1914        this.identifier = new ArrayList<Identifier>();
1915      return this.identifier;
1916    }
1917
1918    /**
1919     * @return Returns a reference to <code>this</code> for easy method chaining
1920     */
1921    public Observation setIdentifier(List<Identifier> theIdentifier) { 
1922      this.identifier = theIdentifier;
1923      return this;
1924    }
1925
1926    public boolean hasIdentifier() { 
1927      if (this.identifier == null)
1928        return false;
1929      for (Identifier item : this.identifier)
1930        if (!item.isEmpty())
1931          return true;
1932      return false;
1933    }
1934
1935    public Identifier addIdentifier() { //3
1936      Identifier t = new Identifier();
1937      if (this.identifier == null)
1938        this.identifier = new ArrayList<Identifier>();
1939      this.identifier.add(t);
1940      return t;
1941    }
1942
1943    public Observation addIdentifier(Identifier t) { //3
1944      if (t == null)
1945        return this;
1946      if (this.identifier == null)
1947        this.identifier = new ArrayList<Identifier>();
1948      this.identifier.add(t);
1949      return this;
1950    }
1951
1952    /**
1953     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1954     */
1955    public Identifier getIdentifierFirstRep() { 
1956      if (getIdentifier().isEmpty()) {
1957        addIdentifier();
1958      }
1959      return getIdentifier().get(0);
1960    }
1961
1962    /**
1963     * @return {@link #instantiates} (The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.)
1964     */
1965    public DataType getInstantiates() { 
1966      return this.instantiates;
1967    }
1968
1969    /**
1970     * @return {@link #instantiates} (The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.)
1971     */
1972    public CanonicalType getInstantiatesCanonicalType() throws FHIRException { 
1973      if (this.instantiates == null)
1974        this.instantiates = new CanonicalType();
1975      if (!(this.instantiates instanceof CanonicalType))
1976        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.instantiates.getClass().getName()+" was encountered");
1977      return (CanonicalType) this.instantiates;
1978    }
1979
1980    public boolean hasInstantiatesCanonicalType() { 
1981      return this != null && this.instantiates instanceof CanonicalType;
1982    }
1983
1984    /**
1985     * @return {@link #instantiates} (The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.)
1986     */
1987    public Reference getInstantiatesReference() throws FHIRException { 
1988      if (this.instantiates == null)
1989        this.instantiates = new Reference();
1990      if (!(this.instantiates instanceof Reference))
1991        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.instantiates.getClass().getName()+" was encountered");
1992      return (Reference) this.instantiates;
1993    }
1994
1995    public boolean hasInstantiatesReference() { 
1996      return this != null && this.instantiates instanceof Reference;
1997    }
1998
1999    public boolean hasInstantiates() { 
2000      return this.instantiates != null && !this.instantiates.isEmpty();
2001    }
2002
2003    /**
2004     * @param value {@link #instantiates} (The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.)
2005     */
2006    public Observation setInstantiates(DataType value) { 
2007      if (value != null && !(value instanceof CanonicalType || value instanceof Reference))
2008        throw new FHIRException("Not the right type for Observation.instantiates[x]: "+value.fhirType());
2009      this.instantiates = value;
2010      return this;
2011    }
2012
2013    /**
2014     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.)
2015     */
2016    public List<Reference> getBasedOn() { 
2017      if (this.basedOn == null)
2018        this.basedOn = new ArrayList<Reference>();
2019      return this.basedOn;
2020    }
2021
2022    /**
2023     * @return Returns a reference to <code>this</code> for easy method chaining
2024     */
2025    public Observation setBasedOn(List<Reference> theBasedOn) { 
2026      this.basedOn = theBasedOn;
2027      return this;
2028    }
2029
2030    public boolean hasBasedOn() { 
2031      if (this.basedOn == null)
2032        return false;
2033      for (Reference item : this.basedOn)
2034        if (!item.isEmpty())
2035          return true;
2036      return false;
2037    }
2038
2039    public Reference addBasedOn() { //3
2040      Reference t = new Reference();
2041      if (this.basedOn == null)
2042        this.basedOn = new ArrayList<Reference>();
2043      this.basedOn.add(t);
2044      return t;
2045    }
2046
2047    public Observation addBasedOn(Reference t) { //3
2048      if (t == null)
2049        return this;
2050      if (this.basedOn == null)
2051        this.basedOn = new ArrayList<Reference>();
2052      this.basedOn.add(t);
2053      return this;
2054    }
2055
2056    /**
2057     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
2058     */
2059    public Reference getBasedOnFirstRep() { 
2060      if (getBasedOn().isEmpty()) {
2061        addBasedOn();
2062      }
2063      return getBasedOn().get(0);
2064    }
2065
2066    /**
2067     * @return {@link #triggeredBy} (Identifies the observation(s) that triggered the performance of this observation.)
2068     */
2069    public List<ObservationTriggeredByComponent> getTriggeredBy() { 
2070      if (this.triggeredBy == null)
2071        this.triggeredBy = new ArrayList<ObservationTriggeredByComponent>();
2072      return this.triggeredBy;
2073    }
2074
2075    /**
2076     * @return Returns a reference to <code>this</code> for easy method chaining
2077     */
2078    public Observation setTriggeredBy(List<ObservationTriggeredByComponent> theTriggeredBy) { 
2079      this.triggeredBy = theTriggeredBy;
2080      return this;
2081    }
2082
2083    public boolean hasTriggeredBy() { 
2084      if (this.triggeredBy == null)
2085        return false;
2086      for (ObservationTriggeredByComponent item : this.triggeredBy)
2087        if (!item.isEmpty())
2088          return true;
2089      return false;
2090    }
2091
2092    public ObservationTriggeredByComponent addTriggeredBy() { //3
2093      ObservationTriggeredByComponent t = new ObservationTriggeredByComponent();
2094      if (this.triggeredBy == null)
2095        this.triggeredBy = new ArrayList<ObservationTriggeredByComponent>();
2096      this.triggeredBy.add(t);
2097      return t;
2098    }
2099
2100    public Observation addTriggeredBy(ObservationTriggeredByComponent t) { //3
2101      if (t == null)
2102        return this;
2103      if (this.triggeredBy == null)
2104        this.triggeredBy = new ArrayList<ObservationTriggeredByComponent>();
2105      this.triggeredBy.add(t);
2106      return this;
2107    }
2108
2109    /**
2110     * @return The first repetition of repeating field {@link #triggeredBy}, creating it if it does not already exist {3}
2111     */
2112    public ObservationTriggeredByComponent getTriggeredByFirstRep() { 
2113      if (getTriggeredBy().isEmpty()) {
2114        addTriggeredBy();
2115      }
2116      return getTriggeredBy().get(0);
2117    }
2118
2119    /**
2120     * @return {@link #partOf} (A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.)
2121     */
2122    public List<Reference> getPartOf() { 
2123      if (this.partOf == null)
2124        this.partOf = new ArrayList<Reference>();
2125      return this.partOf;
2126    }
2127
2128    /**
2129     * @return Returns a reference to <code>this</code> for easy method chaining
2130     */
2131    public Observation setPartOf(List<Reference> thePartOf) { 
2132      this.partOf = thePartOf;
2133      return this;
2134    }
2135
2136    public boolean hasPartOf() { 
2137      if (this.partOf == null)
2138        return false;
2139      for (Reference item : this.partOf)
2140        if (!item.isEmpty())
2141          return true;
2142      return false;
2143    }
2144
2145    public Reference addPartOf() { //3
2146      Reference t = new Reference();
2147      if (this.partOf == null)
2148        this.partOf = new ArrayList<Reference>();
2149      this.partOf.add(t);
2150      return t;
2151    }
2152
2153    public Observation addPartOf(Reference t) { //3
2154      if (t == null)
2155        return this;
2156      if (this.partOf == null)
2157        this.partOf = new ArrayList<Reference>();
2158      this.partOf.add(t);
2159      return this;
2160    }
2161
2162    /**
2163     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
2164     */
2165    public Reference getPartOfFirstRep() { 
2166      if (getPartOf().isEmpty()) {
2167        addPartOf();
2168      }
2169      return getPartOf().get(0);
2170    }
2171
2172    /**
2173     * @return {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2174     */
2175    public Enumeration<ObservationStatus> getStatusElement() { 
2176      if (this.status == null)
2177        if (Configuration.errorOnAutoCreate())
2178          throw new Error("Attempt to auto-create Observation.status");
2179        else if (Configuration.doAutoCreate())
2180          this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory()); // bb
2181      return this.status;
2182    }
2183
2184    public boolean hasStatusElement() { 
2185      return this.status != null && !this.status.isEmpty();
2186    }
2187
2188    public boolean hasStatus() { 
2189      return this.status != null && !this.status.isEmpty();
2190    }
2191
2192    /**
2193     * @param value {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2194     */
2195    public Observation setStatusElement(Enumeration<ObservationStatus> value) { 
2196      this.status = value;
2197      return this;
2198    }
2199
2200    /**
2201     * @return The status of the result value.
2202     */
2203    public ObservationStatus getStatus() { 
2204      return this.status == null ? null : this.status.getValue();
2205    }
2206
2207    /**
2208     * @param value The status of the result value.
2209     */
2210    public Observation setStatus(ObservationStatus value) { 
2211        if (this.status == null)
2212          this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory());
2213        this.status.setValue(value);
2214      return this;
2215    }
2216
2217    /**
2218     * @return {@link #category} (A code that classifies the general type of observation being made.)
2219     */
2220    public List<CodeableConcept> getCategory() { 
2221      if (this.category == null)
2222        this.category = new ArrayList<CodeableConcept>();
2223      return this.category;
2224    }
2225
2226    /**
2227     * @return Returns a reference to <code>this</code> for easy method chaining
2228     */
2229    public Observation setCategory(List<CodeableConcept> theCategory) { 
2230      this.category = theCategory;
2231      return this;
2232    }
2233
2234    public boolean hasCategory() { 
2235      if (this.category == null)
2236        return false;
2237      for (CodeableConcept item : this.category)
2238        if (!item.isEmpty())
2239          return true;
2240      return false;
2241    }
2242
2243    public CodeableConcept addCategory() { //3
2244      CodeableConcept t = new CodeableConcept();
2245      if (this.category == null)
2246        this.category = new ArrayList<CodeableConcept>();
2247      this.category.add(t);
2248      return t;
2249    }
2250
2251    public Observation addCategory(CodeableConcept t) { //3
2252      if (t == null)
2253        return this;
2254      if (this.category == null)
2255        this.category = new ArrayList<CodeableConcept>();
2256      this.category.add(t);
2257      return this;
2258    }
2259
2260    /**
2261     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
2262     */
2263    public CodeableConcept getCategoryFirstRep() { 
2264      if (getCategory().isEmpty()) {
2265        addCategory();
2266      }
2267      return getCategory().get(0);
2268    }
2269
2270    /**
2271     * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "name".)
2272     */
2273    public CodeableConcept getCode() { 
2274      if (this.code == null)
2275        if (Configuration.errorOnAutoCreate())
2276          throw new Error("Attempt to auto-create Observation.code");
2277        else if (Configuration.doAutoCreate())
2278          this.code = new CodeableConcept(); // cc
2279      return this.code;
2280    }
2281
2282    public boolean hasCode() { 
2283      return this.code != null && !this.code.isEmpty();
2284    }
2285
2286    /**
2287     * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "name".)
2288     */
2289    public Observation setCode(CodeableConcept value) { 
2290      this.code = value;
2291      return this;
2292    }
2293
2294    /**
2295     * @return {@link #subject} (The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.)
2296     */
2297    public Reference getSubject() { 
2298      if (this.subject == null)
2299        if (Configuration.errorOnAutoCreate())
2300          throw new Error("Attempt to auto-create Observation.subject");
2301        else if (Configuration.doAutoCreate())
2302          this.subject = new Reference(); // cc
2303      return this.subject;
2304    }
2305
2306    public boolean hasSubject() { 
2307      return this.subject != null && !this.subject.isEmpty();
2308    }
2309
2310    /**
2311     * @param value {@link #subject} (The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.)
2312     */
2313    public Observation setSubject(Reference value) { 
2314      this.subject = value;
2315      return this;
2316    }
2317
2318    /**
2319     * @return {@link #focus} (The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.)
2320     */
2321    public List<Reference> getFocus() { 
2322      if (this.focus == null)
2323        this.focus = new ArrayList<Reference>();
2324      return this.focus;
2325    }
2326
2327    /**
2328     * @return Returns a reference to <code>this</code> for easy method chaining
2329     */
2330    public Observation setFocus(List<Reference> theFocus) { 
2331      this.focus = theFocus;
2332      return this;
2333    }
2334
2335    public boolean hasFocus() { 
2336      if (this.focus == null)
2337        return false;
2338      for (Reference item : this.focus)
2339        if (!item.isEmpty())
2340          return true;
2341      return false;
2342    }
2343
2344    public Reference addFocus() { //3
2345      Reference t = new Reference();
2346      if (this.focus == null)
2347        this.focus = new ArrayList<Reference>();
2348      this.focus.add(t);
2349      return t;
2350    }
2351
2352    public Observation addFocus(Reference t) { //3
2353      if (t == null)
2354        return this;
2355      if (this.focus == null)
2356        this.focus = new ArrayList<Reference>();
2357      this.focus.add(t);
2358      return this;
2359    }
2360
2361    /**
2362     * @return The first repetition of repeating field {@link #focus}, creating it if it does not already exist {3}
2363     */
2364    public Reference getFocusFirstRep() { 
2365      if (getFocus().isEmpty()) {
2366        addFocus();
2367      }
2368      return getFocus().get(0);
2369    }
2370
2371    /**
2372     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.)
2373     */
2374    public Reference getEncounter() { 
2375      if (this.encounter == null)
2376        if (Configuration.errorOnAutoCreate())
2377          throw new Error("Attempt to auto-create Observation.encounter");
2378        else if (Configuration.doAutoCreate())
2379          this.encounter = new Reference(); // cc
2380      return this.encounter;
2381    }
2382
2383    public boolean hasEncounter() { 
2384      return this.encounter != null && !this.encounter.isEmpty();
2385    }
2386
2387    /**
2388     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.)
2389     */
2390    public Observation setEncounter(Reference value) { 
2391      this.encounter = value;
2392      return this;
2393    }
2394
2395    /**
2396     * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2397     */
2398    public DataType getEffective() { 
2399      return this.effective;
2400    }
2401
2402    /**
2403     * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2404     */
2405    public DateTimeType getEffectiveDateTimeType() throws FHIRException { 
2406      if (this.effective == null)
2407        this.effective = new DateTimeType();
2408      if (!(this.effective instanceof DateTimeType))
2409        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
2410      return (DateTimeType) this.effective;
2411    }
2412
2413    public boolean hasEffectiveDateTimeType() { 
2414      return this != null && this.effective instanceof DateTimeType;
2415    }
2416
2417    /**
2418     * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2419     */
2420    public Period getEffectivePeriod() throws FHIRException { 
2421      if (this.effective == null)
2422        this.effective = new Period();
2423      if (!(this.effective instanceof Period))
2424        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
2425      return (Period) this.effective;
2426    }
2427
2428    public boolean hasEffectivePeriod() { 
2429      return this != null && this.effective instanceof Period;
2430    }
2431
2432    /**
2433     * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2434     */
2435    public Timing getEffectiveTiming() throws FHIRException { 
2436      if (this.effective == null)
2437        this.effective = new Timing();
2438      if (!(this.effective instanceof Timing))
2439        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.effective.getClass().getName()+" was encountered");
2440      return (Timing) this.effective;
2441    }
2442
2443    public boolean hasEffectiveTiming() { 
2444      return this != null && this.effective instanceof Timing;
2445    }
2446
2447    /**
2448     * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2449     */
2450    public InstantType getEffectiveInstantType() throws FHIRException { 
2451      if (this.effective == null)
2452        this.effective = new InstantType();
2453      if (!(this.effective instanceof InstantType))
2454        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.effective.getClass().getName()+" was encountered");
2455      return (InstantType) this.effective;
2456    }
2457
2458    public boolean hasEffectiveInstantType() { 
2459      return this != null && this.effective instanceof InstantType;
2460    }
2461
2462    public boolean hasEffective() { 
2463      return this.effective != null && !this.effective.isEmpty();
2464    }
2465
2466    /**
2467     * @param value {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.)
2468     */
2469    public Observation setEffective(DataType value) { 
2470      if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing || value instanceof InstantType))
2471        throw new FHIRException("Not the right type for Observation.effective[x]: "+value.fhirType());
2472      this.effective = value;
2473      return this;
2474    }
2475
2476    /**
2477     * @return {@link #issued} (The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
2478     */
2479    public InstantType getIssuedElement() { 
2480      if (this.issued == null)
2481        if (Configuration.errorOnAutoCreate())
2482          throw new Error("Attempt to auto-create Observation.issued");
2483        else if (Configuration.doAutoCreate())
2484          this.issued = new InstantType(); // bb
2485      return this.issued;
2486    }
2487
2488    public boolean hasIssuedElement() { 
2489      return this.issued != null && !this.issued.isEmpty();
2490    }
2491
2492    public boolean hasIssued() { 
2493      return this.issued != null && !this.issued.isEmpty();
2494    }
2495
2496    /**
2497     * @param value {@link #issued} (The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
2498     */
2499    public Observation setIssuedElement(InstantType value) { 
2500      this.issued = value;
2501      return this;
2502    }
2503
2504    /**
2505     * @return The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.
2506     */
2507    public Date getIssued() { 
2508      return this.issued == null ? null : this.issued.getValue();
2509    }
2510
2511    /**
2512     * @param value The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.
2513     */
2514    public Observation setIssued(Date value) { 
2515      if (value == null)
2516        this.issued = null;
2517      else {
2518        if (this.issued == null)
2519          this.issued = new InstantType();
2520        this.issued.setValue(value);
2521      }
2522      return this;
2523    }
2524
2525    /**
2526     * @return {@link #performer} (Who was responsible for asserting the observed value as "true".)
2527     */
2528    public List<Reference> getPerformer() { 
2529      if (this.performer == null)
2530        this.performer = new ArrayList<Reference>();
2531      return this.performer;
2532    }
2533
2534    /**
2535     * @return Returns a reference to <code>this</code> for easy method chaining
2536     */
2537    public Observation setPerformer(List<Reference> thePerformer) { 
2538      this.performer = thePerformer;
2539      return this;
2540    }
2541
2542    public boolean hasPerformer() { 
2543      if (this.performer == null)
2544        return false;
2545      for (Reference item : this.performer)
2546        if (!item.isEmpty())
2547          return true;
2548      return false;
2549    }
2550
2551    public Reference addPerformer() { //3
2552      Reference t = new Reference();
2553      if (this.performer == null)
2554        this.performer = new ArrayList<Reference>();
2555      this.performer.add(t);
2556      return t;
2557    }
2558
2559    public Observation addPerformer(Reference t) { //3
2560      if (t == null)
2561        return this;
2562      if (this.performer == null)
2563        this.performer = new ArrayList<Reference>();
2564      this.performer.add(t);
2565      return this;
2566    }
2567
2568    /**
2569     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
2570     */
2571    public Reference getPerformerFirstRep() { 
2572      if (getPerformer().isEmpty()) {
2573        addPerformer();
2574      }
2575      return getPerformer().get(0);
2576    }
2577
2578    /**
2579     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2580     */
2581    public DataType getValue() { 
2582      return this.value;
2583    }
2584
2585    /**
2586     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2587     */
2588    public Quantity getValueQuantity() throws FHIRException { 
2589      if (this.value == null)
2590        this.value = new Quantity();
2591      if (!(this.value instanceof Quantity))
2592        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
2593      return (Quantity) this.value;
2594    }
2595
2596    public boolean hasValueQuantity() { 
2597      return this != null && this.value instanceof Quantity;
2598    }
2599
2600    /**
2601     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2602     */
2603    public CodeableConcept getValueCodeableConcept() throws FHIRException { 
2604      if (this.value == null)
2605        this.value = new CodeableConcept();
2606      if (!(this.value instanceof CodeableConcept))
2607        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
2608      return (CodeableConcept) this.value;
2609    }
2610
2611    public boolean hasValueCodeableConcept() { 
2612      return this != null && this.value instanceof CodeableConcept;
2613    }
2614
2615    /**
2616     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2617     */
2618    public StringType getValueStringType() throws FHIRException { 
2619      if (this.value == null)
2620        this.value = new StringType();
2621      if (!(this.value instanceof StringType))
2622        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2623      return (StringType) this.value;
2624    }
2625
2626    public boolean hasValueStringType() { 
2627      return this != null && this.value instanceof StringType;
2628    }
2629
2630    /**
2631     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2632     */
2633    public BooleanType getValueBooleanType() throws FHIRException { 
2634      if (this.value == null)
2635        this.value = new BooleanType();
2636      if (!(this.value instanceof BooleanType))
2637        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2638      return (BooleanType) this.value;
2639    }
2640
2641    public boolean hasValueBooleanType() { 
2642      return this != null && this.value instanceof BooleanType;
2643    }
2644
2645    /**
2646     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2647     */
2648    public IntegerType getValueIntegerType() throws FHIRException { 
2649      if (this.value == null)
2650        this.value = new IntegerType();
2651      if (!(this.value instanceof IntegerType))
2652        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2653      return (IntegerType) this.value;
2654    }
2655
2656    public boolean hasValueIntegerType() { 
2657      return this != null && this.value instanceof IntegerType;
2658    }
2659
2660    /**
2661     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2662     */
2663    public Range getValueRange() throws FHIRException { 
2664      if (this.value == null)
2665        this.value = new Range();
2666      if (!(this.value instanceof Range))
2667        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
2668      return (Range) this.value;
2669    }
2670
2671    public boolean hasValueRange() { 
2672      return this != null && this.value instanceof Range;
2673    }
2674
2675    /**
2676     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2677     */
2678    public Ratio getValueRatio() throws FHIRException { 
2679      if (this.value == null)
2680        this.value = new Ratio();
2681      if (!(this.value instanceof Ratio))
2682        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
2683      return (Ratio) this.value;
2684    }
2685
2686    public boolean hasValueRatio() { 
2687      return this != null && this.value instanceof Ratio;
2688    }
2689
2690    /**
2691     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2692     */
2693    public SampledData getValueSampledData() throws FHIRException { 
2694      if (this.value == null)
2695        this.value = new SampledData();
2696      if (!(this.value instanceof SampledData))
2697        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
2698      return (SampledData) this.value;
2699    }
2700
2701    public boolean hasValueSampledData() { 
2702      return this != null && this.value instanceof SampledData;
2703    }
2704
2705    /**
2706     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2707     */
2708    public TimeType getValueTimeType() throws FHIRException { 
2709      if (this.value == null)
2710        this.value = new TimeType();
2711      if (!(this.value instanceof TimeType))
2712        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2713      return (TimeType) this.value;
2714    }
2715
2716    public boolean hasValueTimeType() { 
2717      return this != null && this.value instanceof TimeType;
2718    }
2719
2720    /**
2721     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2722     */
2723    public DateTimeType getValueDateTimeType() throws FHIRException { 
2724      if (this.value == null)
2725        this.value = new DateTimeType();
2726      if (!(this.value instanceof DateTimeType))
2727        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2728      return (DateTimeType) this.value;
2729    }
2730
2731    public boolean hasValueDateTimeType() { 
2732      return this != null && this.value instanceof DateTimeType;
2733    }
2734
2735    /**
2736     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2737     */
2738    public Period getValuePeriod() throws FHIRException { 
2739      if (this.value == null)
2740        this.value = new Period();
2741      if (!(this.value instanceof Period))
2742        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
2743      return (Period) this.value;
2744    }
2745
2746    public boolean hasValuePeriod() { 
2747      return this != null && this.value instanceof Period;
2748    }
2749
2750    /**
2751     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2752     */
2753    public Attachment getValueAttachment() throws FHIRException { 
2754      if (this.value == null)
2755        this.value = new Attachment();
2756      if (!(this.value instanceof Attachment))
2757        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
2758      return (Attachment) this.value;
2759    }
2760
2761    public boolean hasValueAttachment() { 
2762      return this != null && this.value instanceof Attachment;
2763    }
2764
2765    /**
2766     * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2767     */
2768    public Reference getValueReference() throws FHIRException { 
2769      if (this.value == null)
2770        this.value = new Reference();
2771      if (!(this.value instanceof Reference))
2772        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
2773      return (Reference) this.value;
2774    }
2775
2776    public boolean hasValueReference() { 
2777      return this != null && this.value instanceof Reference;
2778    }
2779
2780    public boolean hasValue() { 
2781      return this.value != null && !this.value.isEmpty();
2782    }
2783
2784    /**
2785     * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.)
2786     */
2787    public Observation setValue(DataType value) { 
2788      if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period || value instanceof Attachment || value instanceof Reference))
2789        throw new FHIRException("Not the right type for Observation.value[x]: "+value.fhirType());
2790      this.value = value;
2791      return this;
2792    }
2793
2794    /**
2795     * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.)
2796     */
2797    public CodeableConcept getDataAbsentReason() { 
2798      if (this.dataAbsentReason == null)
2799        if (Configuration.errorOnAutoCreate())
2800          throw new Error("Attempt to auto-create Observation.dataAbsentReason");
2801        else if (Configuration.doAutoCreate())
2802          this.dataAbsentReason = new CodeableConcept(); // cc
2803      return this.dataAbsentReason;
2804    }
2805
2806    public boolean hasDataAbsentReason() { 
2807      return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty();
2808    }
2809
2810    /**
2811     * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.)
2812     */
2813    public Observation setDataAbsentReason(CodeableConcept value) { 
2814      this.dataAbsentReason = value;
2815      return this;
2816    }
2817
2818    /**
2819     * @return {@link #interpretation} (A categorical assessment of an observation value.  For example, high, low, normal.)
2820     */
2821    public List<CodeableConcept> getInterpretation() { 
2822      if (this.interpretation == null)
2823        this.interpretation = new ArrayList<CodeableConcept>();
2824      return this.interpretation;
2825    }
2826
2827    /**
2828     * @return Returns a reference to <code>this</code> for easy method chaining
2829     */
2830    public Observation setInterpretation(List<CodeableConcept> theInterpretation) { 
2831      this.interpretation = theInterpretation;
2832      return this;
2833    }
2834
2835    public boolean hasInterpretation() { 
2836      if (this.interpretation == null)
2837        return false;
2838      for (CodeableConcept item : this.interpretation)
2839        if (!item.isEmpty())
2840          return true;
2841      return false;
2842    }
2843
2844    public CodeableConcept addInterpretation() { //3
2845      CodeableConcept t = new CodeableConcept();
2846      if (this.interpretation == null)
2847        this.interpretation = new ArrayList<CodeableConcept>();
2848      this.interpretation.add(t);
2849      return t;
2850    }
2851
2852    public Observation addInterpretation(CodeableConcept t) { //3
2853      if (t == null)
2854        return this;
2855      if (this.interpretation == null)
2856        this.interpretation = new ArrayList<CodeableConcept>();
2857      this.interpretation.add(t);
2858      return this;
2859    }
2860
2861    /**
2862     * @return The first repetition of repeating field {@link #interpretation}, creating it if it does not already exist {3}
2863     */
2864    public CodeableConcept getInterpretationFirstRep() { 
2865      if (getInterpretation().isEmpty()) {
2866        addInterpretation();
2867      }
2868      return getInterpretation().get(0);
2869    }
2870
2871    /**
2872     * @return {@link #note} (Comments about the observation or the results.)
2873     */
2874    public List<Annotation> getNote() { 
2875      if (this.note == null)
2876        this.note = new ArrayList<Annotation>();
2877      return this.note;
2878    }
2879
2880    /**
2881     * @return Returns a reference to <code>this</code> for easy method chaining
2882     */
2883    public Observation setNote(List<Annotation> theNote) { 
2884      this.note = theNote;
2885      return this;
2886    }
2887
2888    public boolean hasNote() { 
2889      if (this.note == null)
2890        return false;
2891      for (Annotation item : this.note)
2892        if (!item.isEmpty())
2893          return true;
2894      return false;
2895    }
2896
2897    public Annotation addNote() { //3
2898      Annotation t = new Annotation();
2899      if (this.note == null)
2900        this.note = new ArrayList<Annotation>();
2901      this.note.add(t);
2902      return t;
2903    }
2904
2905    public Observation addNote(Annotation t) { //3
2906      if (t == null)
2907        return this;
2908      if (this.note == null)
2909        this.note = new ArrayList<Annotation>();
2910      this.note.add(t);
2911      return this;
2912    }
2913
2914    /**
2915     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2916     */
2917    public Annotation getNoteFirstRep() { 
2918      if (getNote().isEmpty()) {
2919        addNote();
2920      }
2921      return getNote().get(0);
2922    }
2923
2924    /**
2925     * @return {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).)
2926     */
2927    public CodeableConcept getBodySite() { 
2928      if (this.bodySite == null)
2929        if (Configuration.errorOnAutoCreate())
2930          throw new Error("Attempt to auto-create Observation.bodySite");
2931        else if (Configuration.doAutoCreate())
2932          this.bodySite = new CodeableConcept(); // cc
2933      return this.bodySite;
2934    }
2935
2936    public boolean hasBodySite() { 
2937      return this.bodySite != null && !this.bodySite.isEmpty();
2938    }
2939
2940    /**
2941     * @param value {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).)
2942     */
2943    public Observation setBodySite(CodeableConcept value) { 
2944      this.bodySite = value;
2945      return this;
2946    }
2947
2948    /**
2949     * @return {@link #bodyStructure} (Indicates the body structure on the subject's body where the observation was made (i.e. the target site).)
2950     */
2951    public Reference getBodyStructure() { 
2952      if (this.bodyStructure == null)
2953        if (Configuration.errorOnAutoCreate())
2954          throw new Error("Attempt to auto-create Observation.bodyStructure");
2955        else if (Configuration.doAutoCreate())
2956          this.bodyStructure = new Reference(); // cc
2957      return this.bodyStructure;
2958    }
2959
2960    public boolean hasBodyStructure() { 
2961      return this.bodyStructure != null && !this.bodyStructure.isEmpty();
2962    }
2963
2964    /**
2965     * @param value {@link #bodyStructure} (Indicates the body structure on the subject's body where the observation was made (i.e. the target site).)
2966     */
2967    public Observation setBodyStructure(Reference value) { 
2968      this.bodyStructure = value;
2969      return this;
2970    }
2971
2972    /**
2973     * @return {@link #method} (Indicates the mechanism used to perform the observation.)
2974     */
2975    public CodeableConcept getMethod() { 
2976      if (this.method == null)
2977        if (Configuration.errorOnAutoCreate())
2978          throw new Error("Attempt to auto-create Observation.method");
2979        else if (Configuration.doAutoCreate())
2980          this.method = new CodeableConcept(); // cc
2981      return this.method;
2982    }
2983
2984    public boolean hasMethod() { 
2985      return this.method != null && !this.method.isEmpty();
2986    }
2987
2988    /**
2989     * @param value {@link #method} (Indicates the mechanism used to perform the observation.)
2990     */
2991    public Observation setMethod(CodeableConcept value) { 
2992      this.method = value;
2993      return this;
2994    }
2995
2996    /**
2997     * @return {@link #specimen} (The specimen that was used when this observation was made.)
2998     */
2999    public Reference getSpecimen() { 
3000      if (this.specimen == null)
3001        if (Configuration.errorOnAutoCreate())
3002          throw new Error("Attempt to auto-create Observation.specimen");
3003        else if (Configuration.doAutoCreate())
3004          this.specimen = new Reference(); // cc
3005      return this.specimen;
3006    }
3007
3008    public boolean hasSpecimen() { 
3009      return this.specimen != null && !this.specimen.isEmpty();
3010    }
3011
3012    /**
3013     * @param value {@link #specimen} (The specimen that was used when this observation was made.)
3014     */
3015    public Observation setSpecimen(Reference value) { 
3016      this.specimen = value;
3017      return this;
3018    }
3019
3020    /**
3021     * @return {@link #device} (A reference to the device that generates the measurements or the device settings for the device.)
3022     */
3023    public Reference getDevice() { 
3024      if (this.device == null)
3025        if (Configuration.errorOnAutoCreate())
3026          throw new Error("Attempt to auto-create Observation.device");
3027        else if (Configuration.doAutoCreate())
3028          this.device = new Reference(); // cc
3029      return this.device;
3030    }
3031
3032    public boolean hasDevice() { 
3033      return this.device != null && !this.device.isEmpty();
3034    }
3035
3036    /**
3037     * @param value {@link #device} (A reference to the device that generates the measurements or the device settings for the device.)
3038     */
3039    public Observation setDevice(Reference value) { 
3040      this.device = value;
3041      return this;
3042    }
3043
3044    /**
3045     * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an "OR".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.)
3046     */
3047    public List<ObservationReferenceRangeComponent> getReferenceRange() { 
3048      if (this.referenceRange == null)
3049        this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
3050      return this.referenceRange;
3051    }
3052
3053    /**
3054     * @return Returns a reference to <code>this</code> for easy method chaining
3055     */
3056    public Observation setReferenceRange(List<ObservationReferenceRangeComponent> theReferenceRange) { 
3057      this.referenceRange = theReferenceRange;
3058      return this;
3059    }
3060
3061    public boolean hasReferenceRange() { 
3062      if (this.referenceRange == null)
3063        return false;
3064      for (ObservationReferenceRangeComponent item : this.referenceRange)
3065        if (!item.isEmpty())
3066          return true;
3067      return false;
3068    }
3069
3070    public ObservationReferenceRangeComponent addReferenceRange() { //3
3071      ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent();
3072      if (this.referenceRange == null)
3073        this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
3074      this.referenceRange.add(t);
3075      return t;
3076    }
3077
3078    public Observation addReferenceRange(ObservationReferenceRangeComponent t) { //3
3079      if (t == null)
3080        return this;
3081      if (this.referenceRange == null)
3082        this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
3083      this.referenceRange.add(t);
3084      return this;
3085    }
3086
3087    /**
3088     * @return The first repetition of repeating field {@link #referenceRange}, creating it if it does not already exist {3}
3089     */
3090    public ObservationReferenceRangeComponent getReferenceRangeFirstRep() { 
3091      if (getReferenceRange().isEmpty()) {
3092        addReferenceRange();
3093      }
3094      return getReferenceRange().get(0);
3095    }
3096
3097    /**
3098     * @return {@link #hasMember} (This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.)
3099     */
3100    public List<Reference> getHasMember() { 
3101      if (this.hasMember == null)
3102        this.hasMember = new ArrayList<Reference>();
3103      return this.hasMember;
3104    }
3105
3106    /**
3107     * @return Returns a reference to <code>this</code> for easy method chaining
3108     */
3109    public Observation setHasMember(List<Reference> theHasMember) { 
3110      this.hasMember = theHasMember;
3111      return this;
3112    }
3113
3114    public boolean hasHasMember() { 
3115      if (this.hasMember == null)
3116        return false;
3117      for (Reference item : this.hasMember)
3118        if (!item.isEmpty())
3119          return true;
3120      return false;
3121    }
3122
3123    public Reference addHasMember() { //3
3124      Reference t = new Reference();
3125      if (this.hasMember == null)
3126        this.hasMember = new ArrayList<Reference>();
3127      this.hasMember.add(t);
3128      return t;
3129    }
3130
3131    public Observation addHasMember(Reference t) { //3
3132      if (t == null)
3133        return this;
3134      if (this.hasMember == null)
3135        this.hasMember = new ArrayList<Reference>();
3136      this.hasMember.add(t);
3137      return this;
3138    }
3139
3140    /**
3141     * @return The first repetition of repeating field {@link #hasMember}, creating it if it does not already exist {3}
3142     */
3143    public Reference getHasMemberFirstRep() { 
3144      if (getHasMember().isEmpty()) {
3145        addHasMember();
3146      }
3147      return getHasMember().get(0);
3148    }
3149
3150    /**
3151     * @return {@link #derivedFrom} (The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.)
3152     */
3153    public List<Reference> getDerivedFrom() { 
3154      if (this.derivedFrom == null)
3155        this.derivedFrom = new ArrayList<Reference>();
3156      return this.derivedFrom;
3157    }
3158
3159    /**
3160     * @return Returns a reference to <code>this</code> for easy method chaining
3161     */
3162    public Observation setDerivedFrom(List<Reference> theDerivedFrom) { 
3163      this.derivedFrom = theDerivedFrom;
3164      return this;
3165    }
3166
3167    public boolean hasDerivedFrom() { 
3168      if (this.derivedFrom == null)
3169        return false;
3170      for (Reference item : this.derivedFrom)
3171        if (!item.isEmpty())
3172          return true;
3173      return false;
3174    }
3175
3176    public Reference addDerivedFrom() { //3
3177      Reference t = new Reference();
3178      if (this.derivedFrom == null)
3179        this.derivedFrom = new ArrayList<Reference>();
3180      this.derivedFrom.add(t);
3181      return t;
3182    }
3183
3184    public Observation addDerivedFrom(Reference t) { //3
3185      if (t == null)
3186        return this;
3187      if (this.derivedFrom == null)
3188        this.derivedFrom = new ArrayList<Reference>();
3189      this.derivedFrom.add(t);
3190      return this;
3191    }
3192
3193    /**
3194     * @return The first repetition of repeating field {@link #derivedFrom}, creating it if it does not already exist {3}
3195     */
3196    public Reference getDerivedFromFirstRep() { 
3197      if (getDerivedFrom().isEmpty()) {
3198        addDerivedFrom();
3199      }
3200      return getDerivedFrom().get(0);
3201    }
3202
3203    /**
3204     * @return {@link #component} (Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.)
3205     */
3206    public List<ObservationComponentComponent> getComponent() { 
3207      if (this.component == null)
3208        this.component = new ArrayList<ObservationComponentComponent>();
3209      return this.component;
3210    }
3211
3212    /**
3213     * @return Returns a reference to <code>this</code> for easy method chaining
3214     */
3215    public Observation setComponent(List<ObservationComponentComponent> theComponent) { 
3216      this.component = theComponent;
3217      return this;
3218    }
3219
3220    public boolean hasComponent() { 
3221      if (this.component == null)
3222        return false;
3223      for (ObservationComponentComponent item : this.component)
3224        if (!item.isEmpty())
3225          return true;
3226      return false;
3227    }
3228
3229    public ObservationComponentComponent addComponent() { //3
3230      ObservationComponentComponent t = new ObservationComponentComponent();
3231      if (this.component == null)
3232        this.component = new ArrayList<ObservationComponentComponent>();
3233      this.component.add(t);
3234      return t;
3235    }
3236
3237    public Observation addComponent(ObservationComponentComponent t) { //3
3238      if (t == null)
3239        return this;
3240      if (this.component == null)
3241        this.component = new ArrayList<ObservationComponentComponent>();
3242      this.component.add(t);
3243      return this;
3244    }
3245
3246    /**
3247     * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3}
3248     */
3249    public ObservationComponentComponent getComponentFirstRep() { 
3250      if (getComponent().isEmpty()) {
3251        addComponent();
3252      }
3253      return getComponent().get(0);
3254    }
3255
3256      protected void listChildren(List<Property> children) {
3257        super.listChildren(children);
3258        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this observation.", 0, java.lang.Integer.MAX_VALUE, identifier));
3259        children.add(new Property("instantiates[x]", "canonical(ObservationDefinition)|Reference(ObservationDefinition)", "The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.", 0, 1, instantiates));
3260        children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.", 0, java.lang.Integer.MAX_VALUE, basedOn));
3261        children.add(new Property("triggeredBy", "", "Identifies the observation(s) that triggered the performance of this observation.", 0, java.lang.Integer.MAX_VALUE, triggeredBy));
3262        children.add(new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Immunization|ImagingStudy|GenomicStudy)", "A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf));
3263        children.add(new Property("status", "code", "The status of the result value.", 0, 1, status));
3264        children.add(new Property("category", "CodeableConcept", "A code that classifies the general type of observation being made.", 0, java.lang.Integer.MAX_VALUE, category));
3265        children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code));
3266        children.add(new Property("subject", "Reference(Patient|Group|Device|Location|Organization|Procedure|Practitioner|Medication|Substance|BiologicallyDerivedProduct|NutritionProduct)", "The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.", 0, 1, subject));
3267        children.add(new Property("focus", "Reference(Any)", "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", 0, java.lang.Integer.MAX_VALUE, focus));
3268        children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, encounter));
3269        children.add(new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective));
3270        children.add(new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued));
3271        children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer));
3272        children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value));
3273        children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason));
3274        children.add(new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value.  For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation));
3275        children.add(new Property("note", "Annotation", "Comments about the observation or the results.", 0, java.lang.Integer.MAX_VALUE, note));
3276        children.add(new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodySite));
3277        children.add(new Property("bodyStructure", "Reference(BodyStructure)", "Indicates the body structure on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodyStructure));
3278        children.add(new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, 1, method));
3279        children.add(new Property("specimen", "Reference(Specimen|Group)", "The specimen that was used when this observation was made.", 0, 1, specimen));
3280        children.add(new Property("device", "Reference(Device|DeviceMetric)", "A reference to the device that generates the measurements or the device settings for the device.", 0, 1, device));
3281        children.add(new Property("referenceRange", "", "Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an \"OR\".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.", 0, java.lang.Integer.MAX_VALUE, referenceRange));
3282        children.add(new Property("hasMember", "Reference(Observation|QuestionnaireResponse|MolecularSequence)", "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.", 0, java.lang.Integer.MAX_VALUE, hasMember));
3283        children.add(new Property("derivedFrom", "Reference(DocumentReference|ImagingStudy|ImagingSelection|QuestionnaireResponse|Observation|MolecularSequence|GenomicStudy)", "The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.", 0, java.lang.Integer.MAX_VALUE, derivedFrom));
3284        children.add(new Property("component", "", "Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", 0, java.lang.Integer.MAX_VALUE, component));
3285      }
3286
3287      @Override
3288      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3289        switch (_hash) {
3290        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this observation.", 0, java.lang.Integer.MAX_VALUE, identifier);
3291        case -1926387433: /*instantiates[x]*/  return new Property("instantiates[x]", "canonical(ObservationDefinition)|Reference(ObservationDefinition)", "The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.", 0, 1, instantiates);
3292        case -246883639: /*instantiates*/  return new Property("instantiates[x]", "canonical(ObservationDefinition)|Reference(ObservationDefinition)", "The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.", 0, 1, instantiates);
3293        case 8911915: /*instantiatesCanonical*/  return new Property("instantiates[x]", "canonical(ObservationDefinition)", "The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.", 0, 1, instantiates);
3294        case -1744595326: /*instantiatesReference*/  return new Property("instantiates[x]", "Reference(ObservationDefinition)", "The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.", 0, 1, instantiates);
3295        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|DeviceRequest|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.", 0, java.lang.Integer.MAX_VALUE, basedOn);
3296        case -680451314: /*triggeredBy*/  return new Property("triggeredBy", "", "Identifies the observation(s) that triggered the performance of this observation.", 0, java.lang.Integer.MAX_VALUE, triggeredBy);
3297        case -995410646: /*partOf*/  return new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Immunization|ImagingStudy|GenomicStudy)", "A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf);
3298        case -892481550: /*status*/  return new Property("status", "code", "The status of the result value.", 0, 1, status);
3299        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "A code that classifies the general type of observation being made.", 0, java.lang.Integer.MAX_VALUE, category);
3300        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code);
3301        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Device|Location|Organization|Procedure|Practitioner|Medication|Substance|BiologicallyDerivedProduct|NutritionProduct)", "The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.", 0, 1, subject);
3302        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", 0, java.lang.Integer.MAX_VALUE, focus);
3303        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, encounter);
3304        case 247104889: /*effective[x]*/  return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3305        case -1468651097: /*effective*/  return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3306        case -275306910: /*effectiveDateTime*/  return new Property("effective[x]", "dateTime", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3307        case -403934648: /*effectivePeriod*/  return new Property("effective[x]", "Period", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3308        case -285872943: /*effectiveTiming*/  return new Property("effective[x]", "Timing", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3309        case -1295730118: /*effectiveInstant*/  return new Property("effective[x]", "instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
3310        case -1179159893: /*issued*/  return new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued);
3311        case 481140686: /*performer*/  return new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer);
3312        case -1410166417: /*value[x]*/  return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3313        case 111972721: /*value*/  return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period|Attachment|Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3314        case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3315        case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3316        case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3317        case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3318        case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3319        case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3320        case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3321        case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3322        case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3323        case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3324        case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3325        case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3326        case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference(MolecularSequence)", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value);
3327        case 1034315687: /*dataAbsentReason*/  return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason);
3328        case -297950712: /*interpretation*/  return new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value.  For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation);
3329        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments about the observation or the results.", 0, java.lang.Integer.MAX_VALUE, note);
3330        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodySite);
3331        case -1001731599: /*bodyStructure*/  return new Property("bodyStructure", "Reference(BodyStructure)", "Indicates the body structure on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodyStructure);
3332        case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, 1, method);
3333        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen|Group)", "The specimen that was used when this observation was made.", 0, 1, specimen);
3334        case -1335157162: /*device*/  return new Property("device", "Reference(Device|DeviceMetric)", "A reference to the device that generates the measurements or the device settings for the device.", 0, 1, device);
3335        case -1912545102: /*referenceRange*/  return new Property("referenceRange", "", "Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an \"OR\".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.", 0, java.lang.Integer.MAX_VALUE, referenceRange);
3336        case -458019372: /*hasMember*/  return new Property("hasMember", "Reference(Observation|QuestionnaireResponse|MolecularSequence)", "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.", 0, java.lang.Integer.MAX_VALUE, hasMember);
3337        case 1077922663: /*derivedFrom*/  return new Property("derivedFrom", "Reference(DocumentReference|ImagingStudy|ImagingSelection|QuestionnaireResponse|Observation|MolecularSequence|GenomicStudy)", "The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.", 0, java.lang.Integer.MAX_VALUE, derivedFrom);
3338        case -1399907075: /*component*/  return new Property("component", "", "Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", 0, java.lang.Integer.MAX_VALUE, component);
3339        default: return super.getNamedProperty(_hash, _name, _checkValid);
3340        }
3341
3342      }
3343
3344      @Override
3345      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3346        switch (hash) {
3347        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3348        case -246883639: /*instantiates*/ return this.instantiates == null ? new Base[0] : new Base[] {this.instantiates}; // DataType
3349        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
3350        case -680451314: /*triggeredBy*/ return this.triggeredBy == null ? new Base[0] : this.triggeredBy.toArray(new Base[this.triggeredBy.size()]); // ObservationTriggeredByComponent
3351        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
3352        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ObservationStatus>
3353        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
3354        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
3355        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
3356        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // Reference
3357        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
3358        case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // DataType
3359        case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // InstantType
3360        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference
3361        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
3362        case 1034315687: /*dataAbsentReason*/ return this.dataAbsentReason == null ? new Base[0] : new Base[] {this.dataAbsentReason}; // CodeableConcept
3363        case -297950712: /*interpretation*/ return this.interpretation == null ? new Base[0] : this.interpretation.toArray(new Base[this.interpretation.size()]); // CodeableConcept
3364        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
3365        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept
3366        case -1001731599: /*bodyStructure*/ return this.bodyStructure == null ? new Base[0] : new Base[] {this.bodyStructure}; // Reference
3367        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
3368        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference
3369        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
3370        case -1912545102: /*referenceRange*/ return this.referenceRange == null ? new Base[0] : this.referenceRange.toArray(new Base[this.referenceRange.size()]); // ObservationReferenceRangeComponent
3371        case -458019372: /*hasMember*/ return this.hasMember == null ? new Base[0] : this.hasMember.toArray(new Base[this.hasMember.size()]); // Reference
3372        case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : this.derivedFrom.toArray(new Base[this.derivedFrom.size()]); // Reference
3373        case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ObservationComponentComponent
3374        default: return super.getProperty(hash, name, checkValid);
3375        }
3376
3377      }
3378
3379      @Override
3380      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3381        switch (hash) {
3382        case -1618432855: // identifier
3383          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3384          return value;
3385        case -246883639: // instantiates
3386          this.instantiates = TypeConvertor.castToType(value); // DataType
3387          return value;
3388        case -332612366: // basedOn
3389          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
3390          return value;
3391        case -680451314: // triggeredBy
3392          this.getTriggeredBy().add((ObservationTriggeredByComponent) value); // ObservationTriggeredByComponent
3393          return value;
3394        case -995410646: // partOf
3395          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
3396          return value;
3397        case -892481550: // status
3398          value = new ObservationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3399          this.status = (Enumeration) value; // Enumeration<ObservationStatus>
3400          return value;
3401        case 50511102: // category
3402          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3403          return value;
3404        case 3059181: // code
3405          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3406          return value;
3407        case -1867885268: // subject
3408          this.subject = TypeConvertor.castToReference(value); // Reference
3409          return value;
3410        case 97604824: // focus
3411          this.getFocus().add(TypeConvertor.castToReference(value)); // Reference
3412          return value;
3413        case 1524132147: // encounter
3414          this.encounter = TypeConvertor.castToReference(value); // Reference
3415          return value;
3416        case -1468651097: // effective
3417          this.effective = TypeConvertor.castToType(value); // DataType
3418          return value;
3419        case -1179159893: // issued
3420          this.issued = TypeConvertor.castToInstant(value); // InstantType
3421          return value;
3422        case 481140686: // performer
3423          this.getPerformer().add(TypeConvertor.castToReference(value)); // Reference
3424          return value;
3425        case 111972721: // value
3426          this.value = TypeConvertor.castToType(value); // DataType
3427          return value;
3428        case 1034315687: // dataAbsentReason
3429          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3430          return value;
3431        case -297950712: // interpretation
3432          this.getInterpretation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3433          return value;
3434        case 3387378: // note
3435          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
3436          return value;
3437        case 1702620169: // bodySite
3438          this.bodySite = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3439          return value;
3440        case -1001731599: // bodyStructure
3441          this.bodyStructure = TypeConvertor.castToReference(value); // Reference
3442          return value;
3443        case -1077554975: // method
3444          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3445          return value;
3446        case -2132868344: // specimen
3447          this.specimen = TypeConvertor.castToReference(value); // Reference
3448          return value;
3449        case -1335157162: // device
3450          this.device = TypeConvertor.castToReference(value); // Reference
3451          return value;
3452        case -1912545102: // referenceRange
3453          this.getReferenceRange().add((ObservationReferenceRangeComponent) value); // ObservationReferenceRangeComponent
3454          return value;
3455        case -458019372: // hasMember
3456          this.getHasMember().add(TypeConvertor.castToReference(value)); // Reference
3457          return value;
3458        case 1077922663: // derivedFrom
3459          this.getDerivedFrom().add(TypeConvertor.castToReference(value)); // Reference
3460          return value;
3461        case -1399907075: // component
3462          this.getComponent().add((ObservationComponentComponent) value); // ObservationComponentComponent
3463          return value;
3464        default: return super.setProperty(hash, name, value);
3465        }
3466
3467      }
3468
3469      @Override
3470      public Base setProperty(String name, Base value) throws FHIRException {
3471        if (name.equals("identifier")) {
3472          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3473        } else if (name.equals("instantiates[x]")) {
3474          this.instantiates = TypeConvertor.castToType(value); // DataType
3475        } else if (name.equals("basedOn")) {
3476          this.getBasedOn().add(TypeConvertor.castToReference(value));
3477        } else if (name.equals("triggeredBy")) {
3478          this.getTriggeredBy().add((ObservationTriggeredByComponent) value);
3479        } else if (name.equals("partOf")) {
3480          this.getPartOf().add(TypeConvertor.castToReference(value));
3481        } else if (name.equals("status")) {
3482          value = new ObservationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3483          this.status = (Enumeration) value; // Enumeration<ObservationStatus>
3484        } else if (name.equals("category")) {
3485          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
3486        } else if (name.equals("code")) {
3487          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3488        } else if (name.equals("subject")) {
3489          this.subject = TypeConvertor.castToReference(value); // Reference
3490        } else if (name.equals("focus")) {
3491          this.getFocus().add(TypeConvertor.castToReference(value));
3492        } else if (name.equals("encounter")) {
3493          this.encounter = TypeConvertor.castToReference(value); // Reference
3494        } else if (name.equals("effective[x]")) {
3495          this.effective = TypeConvertor.castToType(value); // DataType
3496        } else if (name.equals("issued")) {
3497          this.issued = TypeConvertor.castToInstant(value); // InstantType
3498        } else if (name.equals("performer")) {
3499          this.getPerformer().add(TypeConvertor.castToReference(value));
3500        } else if (name.equals("value[x]")) {
3501          this.value = TypeConvertor.castToType(value); // DataType
3502        } else if (name.equals("dataAbsentReason")) {
3503          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3504        } else if (name.equals("interpretation")) {
3505          this.getInterpretation().add(TypeConvertor.castToCodeableConcept(value));
3506        } else if (name.equals("note")) {
3507          this.getNote().add(TypeConvertor.castToAnnotation(value));
3508        } else if (name.equals("bodySite")) {
3509          this.bodySite = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3510        } else if (name.equals("bodyStructure")) {
3511          this.bodyStructure = TypeConvertor.castToReference(value); // Reference
3512        } else if (name.equals("method")) {
3513          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3514        } else if (name.equals("specimen")) {
3515          this.specimen = TypeConvertor.castToReference(value); // Reference
3516        } else if (name.equals("device")) {
3517          this.device = TypeConvertor.castToReference(value); // Reference
3518        } else if (name.equals("referenceRange")) {
3519          this.getReferenceRange().add((ObservationReferenceRangeComponent) value);
3520        } else if (name.equals("hasMember")) {
3521          this.getHasMember().add(TypeConvertor.castToReference(value));
3522        } else if (name.equals("derivedFrom")) {
3523          this.getDerivedFrom().add(TypeConvertor.castToReference(value));
3524        } else if (name.equals("component")) {
3525          this.getComponent().add((ObservationComponentComponent) value);
3526        } else
3527          return super.setProperty(name, value);
3528        return value;
3529      }
3530
3531  @Override
3532  public void removeChild(String name, Base value) throws FHIRException {
3533        if (name.equals("identifier")) {
3534          this.getIdentifier().remove(value);
3535        } else if (name.equals("instantiates[x]")) {
3536          this.instantiates = null;
3537        } else if (name.equals("basedOn")) {
3538          this.getBasedOn().remove(value);
3539        } else if (name.equals("triggeredBy")) {
3540          this.getTriggeredBy().remove((ObservationTriggeredByComponent) value);
3541        } else if (name.equals("partOf")) {
3542          this.getPartOf().remove(value);
3543        } else if (name.equals("status")) {
3544          value = new ObservationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3545          this.status = (Enumeration) value; // Enumeration<ObservationStatus>
3546        } else if (name.equals("category")) {
3547          this.getCategory().remove(value);
3548        } else if (name.equals("code")) {
3549          this.code = null;
3550        } else if (name.equals("subject")) {
3551          this.subject = null;
3552        } else if (name.equals("focus")) {
3553          this.getFocus().remove(value);
3554        } else if (name.equals("encounter")) {
3555          this.encounter = null;
3556        } else if (name.equals("effective[x]")) {
3557          this.effective = null;
3558        } else if (name.equals("issued")) {
3559          this.issued = null;
3560        } else if (name.equals("performer")) {
3561          this.getPerformer().remove(value);
3562        } else if (name.equals("value[x]")) {
3563          this.value = null;
3564        } else if (name.equals("dataAbsentReason")) {
3565          this.dataAbsentReason = null;
3566        } else if (name.equals("interpretation")) {
3567          this.getInterpretation().remove(value);
3568        } else if (name.equals("note")) {
3569          this.getNote().remove(value);
3570        } else if (name.equals("bodySite")) {
3571          this.bodySite = null;
3572        } else if (name.equals("bodyStructure")) {
3573          this.bodyStructure = null;
3574        } else if (name.equals("method")) {
3575          this.method = null;
3576        } else if (name.equals("specimen")) {
3577          this.specimen = null;
3578        } else if (name.equals("device")) {
3579          this.device = null;
3580        } else if (name.equals("referenceRange")) {
3581          this.getReferenceRange().remove((ObservationReferenceRangeComponent) value);
3582        } else if (name.equals("hasMember")) {
3583          this.getHasMember().remove(value);
3584        } else if (name.equals("derivedFrom")) {
3585          this.getDerivedFrom().remove(value);
3586        } else if (name.equals("component")) {
3587          this.getComponent().remove((ObservationComponentComponent) value);
3588        } else
3589          super.removeChild(name, value);
3590        
3591      }
3592
3593      @Override
3594      public Base makeProperty(int hash, String name) throws FHIRException {
3595        switch (hash) {
3596        case -1618432855:  return addIdentifier(); 
3597        case -1926387433:  return getInstantiates();
3598        case -246883639:  return getInstantiates();
3599        case -332612366:  return addBasedOn(); 
3600        case -680451314:  return addTriggeredBy(); 
3601        case -995410646:  return addPartOf(); 
3602        case -892481550:  return getStatusElement();
3603        case 50511102:  return addCategory(); 
3604        case 3059181:  return getCode();
3605        case -1867885268:  return getSubject();
3606        case 97604824:  return addFocus(); 
3607        case 1524132147:  return getEncounter();
3608        case 247104889:  return getEffective();
3609        case -1468651097:  return getEffective();
3610        case -1179159893:  return getIssuedElement();
3611        case 481140686:  return addPerformer(); 
3612        case -1410166417:  return getValue();
3613        case 111972721:  return getValue();
3614        case 1034315687:  return getDataAbsentReason();
3615        case -297950712:  return addInterpretation(); 
3616        case 3387378:  return addNote(); 
3617        case 1702620169:  return getBodySite();
3618        case -1001731599:  return getBodyStructure();
3619        case -1077554975:  return getMethod();
3620        case -2132868344:  return getSpecimen();
3621        case -1335157162:  return getDevice();
3622        case -1912545102:  return addReferenceRange(); 
3623        case -458019372:  return addHasMember(); 
3624        case 1077922663:  return addDerivedFrom(); 
3625        case -1399907075:  return addComponent(); 
3626        default: return super.makeProperty(hash, name);
3627        }
3628
3629      }
3630
3631      @Override
3632      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3633        switch (hash) {
3634        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3635        case -246883639: /*instantiates*/ return new String[] {"canonical", "Reference"};
3636        case -332612366: /*basedOn*/ return new String[] {"Reference"};
3637        case -680451314: /*triggeredBy*/ return new String[] {};
3638        case -995410646: /*partOf*/ return new String[] {"Reference"};
3639        case -892481550: /*status*/ return new String[] {"code"};
3640        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
3641        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
3642        case -1867885268: /*subject*/ return new String[] {"Reference"};
3643        case 97604824: /*focus*/ return new String[] {"Reference"};
3644        case 1524132147: /*encounter*/ return new String[] {"Reference"};
3645        case -1468651097: /*effective*/ return new String[] {"dateTime", "Period", "Timing", "instant"};
3646        case -1179159893: /*issued*/ return new String[] {"instant"};
3647        case 481140686: /*performer*/ return new String[] {"Reference"};
3648        case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "time", "dateTime", "Period", "Attachment", "Reference"};
3649        case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"};
3650        case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"};
3651        case 3387378: /*note*/ return new String[] {"Annotation"};
3652        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
3653        case -1001731599: /*bodyStructure*/ return new String[] {"Reference"};
3654        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
3655        case -2132868344: /*specimen*/ return new String[] {"Reference"};
3656        case -1335157162: /*device*/ return new String[] {"Reference"};
3657        case -1912545102: /*referenceRange*/ return new String[] {};
3658        case -458019372: /*hasMember*/ return new String[] {"Reference"};
3659        case 1077922663: /*derivedFrom*/ return new String[] {"Reference"};
3660        case -1399907075: /*component*/ return new String[] {};
3661        default: return super.getTypesForProperty(hash, name);
3662        }
3663
3664      }
3665
3666      @Override
3667      public Base addChild(String name) throws FHIRException {
3668        if (name.equals("identifier")) {
3669          return addIdentifier();
3670        }
3671        else if (name.equals("instantiatesCanonical")) {
3672          this.instantiates = new CanonicalType();
3673          return this.instantiates;
3674        }
3675        else if (name.equals("instantiatesReference")) {
3676          this.instantiates = new Reference();
3677          return this.instantiates;
3678        }
3679        else if (name.equals("basedOn")) {
3680          return addBasedOn();
3681        }
3682        else if (name.equals("triggeredBy")) {
3683          return addTriggeredBy();
3684        }
3685        else if (name.equals("partOf")) {
3686          return addPartOf();
3687        }
3688        else if (name.equals("status")) {
3689          throw new FHIRException("Cannot call addChild on a singleton property Observation.status");
3690        }
3691        else if (name.equals("category")) {
3692          return addCategory();
3693        }
3694        else if (name.equals("code")) {
3695          this.code = new CodeableConcept();
3696          return this.code;
3697        }
3698        else if (name.equals("subject")) {
3699          this.subject = new Reference();
3700          return this.subject;
3701        }
3702        else if (name.equals("focus")) {
3703          return addFocus();
3704        }
3705        else if (name.equals("encounter")) {
3706          this.encounter = new Reference();
3707          return this.encounter;
3708        }
3709        else if (name.equals("effectiveDateTime")) {
3710          this.effective = new DateTimeType();
3711          return this.effective;
3712        }
3713        else if (name.equals("effectivePeriod")) {
3714          this.effective = new Period();
3715          return this.effective;
3716        }
3717        else if (name.equals("effectiveTiming")) {
3718          this.effective = new Timing();
3719          return this.effective;
3720        }
3721        else if (name.equals("effectiveInstant")) {
3722          this.effective = new InstantType();
3723          return this.effective;
3724        }
3725        else if (name.equals("issued")) {
3726          throw new FHIRException("Cannot call addChild on a singleton property Observation.issued");
3727        }
3728        else if (name.equals("performer")) {
3729          return addPerformer();
3730        }
3731        else if (name.equals("valueQuantity")) {
3732          this.value = new Quantity();
3733          return this.value;
3734        }
3735        else if (name.equals("valueCodeableConcept")) {
3736          this.value = new CodeableConcept();
3737          return this.value;
3738        }
3739        else if (name.equals("valueString")) {
3740          this.value = new StringType();
3741          return this.value;
3742        }
3743        else if (name.equals("valueBoolean")) {
3744          this.value = new BooleanType();
3745          return this.value;
3746        }
3747        else if (name.equals("valueInteger")) {
3748          this.value = new IntegerType();
3749          return this.value;
3750        }
3751        else if (name.equals("valueRange")) {
3752          this.value = new Range();
3753          return this.value;
3754        }
3755        else if (name.equals("valueRatio")) {
3756          this.value = new Ratio();
3757          return this.value;
3758        }
3759        else if (name.equals("valueSampledData")) {
3760          this.value = new SampledData();
3761          return this.value;
3762        }
3763        else if (name.equals("valueTime")) {
3764          this.value = new TimeType();
3765          return this.value;
3766        }
3767        else if (name.equals("valueDateTime")) {
3768          this.value = new DateTimeType();
3769          return this.value;
3770        }
3771        else if (name.equals("valuePeriod")) {
3772          this.value = new Period();
3773          return this.value;
3774        }
3775        else if (name.equals("valueAttachment")) {
3776          this.value = new Attachment();
3777          return this.value;
3778        }
3779        else if (name.equals("valueReference")) {
3780          this.value = new Reference();
3781          return this.value;
3782        }
3783        else if (name.equals("dataAbsentReason")) {
3784          this.dataAbsentReason = new CodeableConcept();
3785          return this.dataAbsentReason;
3786        }
3787        else if (name.equals("interpretation")) {
3788          return addInterpretation();
3789        }
3790        else if (name.equals("note")) {
3791          return addNote();
3792        }
3793        else if (name.equals("bodySite")) {
3794          this.bodySite = new CodeableConcept();
3795          return this.bodySite;
3796        }
3797        else if (name.equals("bodyStructure")) {
3798          this.bodyStructure = new Reference();
3799          return this.bodyStructure;
3800        }
3801        else if (name.equals("method")) {
3802          this.method = new CodeableConcept();
3803          return this.method;
3804        }
3805        else if (name.equals("specimen")) {
3806          this.specimen = new Reference();
3807          return this.specimen;
3808        }
3809        else if (name.equals("device")) {
3810          this.device = new Reference();
3811          return this.device;
3812        }
3813        else if (name.equals("referenceRange")) {
3814          return addReferenceRange();
3815        }
3816        else if (name.equals("hasMember")) {
3817          return addHasMember();
3818        }
3819        else if (name.equals("derivedFrom")) {
3820          return addDerivedFrom();
3821        }
3822        else if (name.equals("component")) {
3823          return addComponent();
3824        }
3825        else
3826          return super.addChild(name);
3827      }
3828
3829  public String fhirType() {
3830    return "Observation";
3831
3832  }
3833
3834      public Observation copy() {
3835        Observation dst = new Observation();
3836        copyValues(dst);
3837        return dst;
3838      }
3839
3840      public void copyValues(Observation dst) {
3841        super.copyValues(dst);
3842        if (identifier != null) {
3843          dst.identifier = new ArrayList<Identifier>();
3844          for (Identifier i : identifier)
3845            dst.identifier.add(i.copy());
3846        };
3847        dst.instantiates = instantiates == null ? null : instantiates.copy();
3848        if (basedOn != null) {
3849          dst.basedOn = new ArrayList<Reference>();
3850          for (Reference i : basedOn)
3851            dst.basedOn.add(i.copy());
3852        };
3853        if (triggeredBy != null) {
3854          dst.triggeredBy = new ArrayList<ObservationTriggeredByComponent>();
3855          for (ObservationTriggeredByComponent i : triggeredBy)
3856            dst.triggeredBy.add(i.copy());
3857        };
3858        if (partOf != null) {
3859          dst.partOf = new ArrayList<Reference>();
3860          for (Reference i : partOf)
3861            dst.partOf.add(i.copy());
3862        };
3863        dst.status = status == null ? null : status.copy();
3864        if (category != null) {
3865          dst.category = new ArrayList<CodeableConcept>();
3866          for (CodeableConcept i : category)
3867            dst.category.add(i.copy());
3868        };
3869        dst.code = code == null ? null : code.copy();
3870        dst.subject = subject == null ? null : subject.copy();
3871        if (focus != null) {
3872          dst.focus = new ArrayList<Reference>();
3873          for (Reference i : focus)
3874            dst.focus.add(i.copy());
3875        };
3876        dst.encounter = encounter == null ? null : encounter.copy();
3877        dst.effective = effective == null ? null : effective.copy();
3878        dst.issued = issued == null ? null : issued.copy();
3879        if (performer != null) {
3880          dst.performer = new ArrayList<Reference>();
3881          for (Reference i : performer)
3882            dst.performer.add(i.copy());
3883        };
3884        dst.value = value == null ? null : value.copy();
3885        dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy();
3886        if (interpretation != null) {
3887          dst.interpretation = new ArrayList<CodeableConcept>();
3888          for (CodeableConcept i : interpretation)
3889            dst.interpretation.add(i.copy());
3890        };
3891        if (note != null) {
3892          dst.note = new ArrayList<Annotation>();
3893          for (Annotation i : note)
3894            dst.note.add(i.copy());
3895        };
3896        dst.bodySite = bodySite == null ? null : bodySite.copy();
3897        dst.bodyStructure = bodyStructure == null ? null : bodyStructure.copy();
3898        dst.method = method == null ? null : method.copy();
3899        dst.specimen = specimen == null ? null : specimen.copy();
3900        dst.device = device == null ? null : device.copy();
3901        if (referenceRange != null) {
3902          dst.referenceRange = new ArrayList<ObservationReferenceRangeComponent>();
3903          for (ObservationReferenceRangeComponent i : referenceRange)
3904            dst.referenceRange.add(i.copy());
3905        };
3906        if (hasMember != null) {
3907          dst.hasMember = new ArrayList<Reference>();
3908          for (Reference i : hasMember)
3909            dst.hasMember.add(i.copy());
3910        };
3911        if (derivedFrom != null) {
3912          dst.derivedFrom = new ArrayList<Reference>();
3913          for (Reference i : derivedFrom)
3914            dst.derivedFrom.add(i.copy());
3915        };
3916        if (component != null) {
3917          dst.component = new ArrayList<ObservationComponentComponent>();
3918          for (ObservationComponentComponent i : component)
3919            dst.component.add(i.copy());
3920        };
3921      }
3922
3923      protected Observation typedCopy() {
3924        return copy();
3925      }
3926
3927      @Override
3928      public boolean equalsDeep(Base other_) {
3929        if (!super.equalsDeep(other_))
3930          return false;
3931        if (!(other_ instanceof Observation))
3932          return false;
3933        Observation o = (Observation) other_;
3934        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiates, o.instantiates, true)
3935           && compareDeep(basedOn, o.basedOn, true) && compareDeep(triggeredBy, o.triggeredBy, true) && compareDeep(partOf, o.partOf, true)
3936           && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) && compareDeep(code, o.code, true)
3937           && compareDeep(subject, o.subject, true) && compareDeep(focus, o.focus, true) && compareDeep(encounter, o.encounter, true)
3938           && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true)
3939           && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true)
3940           && compareDeep(interpretation, o.interpretation, true) && compareDeep(note, o.note, true) && compareDeep(bodySite, o.bodySite, true)
3941           && compareDeep(bodyStructure, o.bodyStructure, true) && compareDeep(method, o.method, true) && compareDeep(specimen, o.specimen, true)
3942           && compareDeep(device, o.device, true) && compareDeep(referenceRange, o.referenceRange, true) && compareDeep(hasMember, o.hasMember, true)
3943           && compareDeep(derivedFrom, o.derivedFrom, true) && compareDeep(component, o.component, true);
3944      }
3945
3946      @Override
3947      public boolean equalsShallow(Base other_) {
3948        if (!super.equalsShallow(other_))
3949          return false;
3950        if (!(other_ instanceof Observation))
3951          return false;
3952        Observation o = (Observation) other_;
3953        return compareValues(status, o.status, true) && compareValues(issued, o.issued, true);
3954      }
3955
3956      public boolean isEmpty() {
3957        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiates, basedOn
3958          , triggeredBy, partOf, status, category, code, subject, focus, encounter, effective
3959          , issued, performer, value, dataAbsentReason, interpretation, note, bodySite, bodyStructure
3960          , method, specimen, device, referenceRange, hasMember, derivedFrom, component
3961          );
3962      }
3963
3964  @Override
3965  public ResourceType getResourceType() {
3966    return ResourceType.Observation;
3967   }
3968
3969 /**
3970   * Search parameter: <b>based-on</b>
3971   * <p>
3972   * Description: <b>Reference to the service request.</b><br>
3973   * Type: <b>reference</b><br>
3974   * Path: <b>Observation.basedOn</b><br>
3975   * </p>
3976   */
3977  @SearchParamDefinition(name="based-on", path="Observation.basedOn", description="Reference to the service request.", type="reference", target={CarePlan.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class } )
3978  public static final String SP_BASED_ON = "based-on";
3979 /**
3980   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
3981   * <p>
3982   * Description: <b>Reference to the service request.</b><br>
3983   * Type: <b>reference</b><br>
3984   * Path: <b>Observation.basedOn</b><br>
3985   * </p>
3986   */
3987  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
3988
3989/**
3990   * Constant for fluent queries to be used to add include statements. Specifies
3991   * the path value of "<b>Observation:based-on</b>".
3992   */
3993  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Observation:based-on").toLocked();
3994
3995 /**
3996   * Search parameter: <b>category</b>
3997   * <p>
3998   * Description: <b>The classification of the type of observation</b><br>
3999   * Type: <b>token</b><br>
4000   * Path: <b>Observation.category</b><br>
4001   * </p>
4002   */
4003  @SearchParamDefinition(name="category", path="Observation.category", description="The classification of the type of observation", type="token" )
4004  public static final String SP_CATEGORY = "category";
4005 /**
4006   * <b>Fluent Client</b> search parameter constant for <b>category</b>
4007   * <p>
4008   * Description: <b>The classification of the type of observation</b><br>
4009   * Type: <b>token</b><br>
4010   * Path: <b>Observation.category</b><br>
4011   * </p>
4012   */
4013  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
4014
4015 /**
4016   * Search parameter: <b>code-value-concept</b>
4017   * <p>
4018   * Description: <b>Code and coded value parameter pair</b><br>
4019   * Type: <b>composite</b><br>
4020   * Path: <b>Observation</b><br>
4021   * </p>
4022   */
4023  @SearchParamDefinition(name="code-value-concept", path="Observation", description="Code and coded value parameter pair", type="composite", compositeOf={"code", "value-concept"} )
4024  public static final String SP_CODE_VALUE_CONCEPT = "code-value-concept";
4025 /**
4026   * <b>Fluent Client</b> search parameter constant for <b>code-value-concept</b>
4027   * <p>
4028   * Description: <b>Code and coded value parameter pair</b><br>
4029   * Type: <b>composite</b><br>
4030   * Path: <b>Observation</b><br>
4031   * </p>
4032   */
4033  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CODE_VALUE_CONCEPT);
4034
4035 /**
4036   * Search parameter: <b>code-value-date</b>
4037   * <p>
4038   * Description: <b>Code and date/time value parameter pair</b><br>
4039   * Type: <b>composite</b><br>
4040   * Path: <b>Observation</b><br>
4041   * </p>
4042   */
4043  @SearchParamDefinition(name="code-value-date", path="Observation", description="Code and date/time value parameter pair", type="composite", compositeOf={"code", "value-date"} )
4044  public static final String SP_CODE_VALUE_DATE = "code-value-date";
4045 /**
4046   * <b>Fluent Client</b> search parameter constant for <b>code-value-date</b>
4047   * <p>
4048   * Description: <b>Code and date/time value parameter pair</b><br>
4049   * Type: <b>composite</b><br>
4050   * Path: <b>Observation</b><br>
4051   * </p>
4052   */
4053  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam> CODE_VALUE_DATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam>(SP_CODE_VALUE_DATE);
4054
4055 /**
4056   * Search parameter: <b>code-value-quantity</b>
4057   * <p>
4058   * Description: <b>Code and quantity value parameter pair</b><br>
4059   * Type: <b>composite</b><br>
4060   * Path: <b>Observation</b><br>
4061   * </p>
4062   */
4063  @SearchParamDefinition(name="code-value-quantity", path="Observation", description="Code and quantity value parameter pair", type="composite", compositeOf={"code", "value-quantity"} )
4064  public static final String SP_CODE_VALUE_QUANTITY = "code-value-quantity";
4065 /**
4066   * <b>Fluent Client</b> search parameter constant for <b>code-value-quantity</b>
4067   * <p>
4068   * Description: <b>Code and quantity value parameter pair</b><br>
4069   * Type: <b>composite</b><br>
4070   * Path: <b>Observation</b><br>
4071   * </p>
4072   */
4073  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CODE_VALUE_QUANTITY);
4074
4075 /**
4076   * Search parameter: <b>combo-code-value-concept</b>
4077   * <p>
4078   * Description: <b>Code and coded value parameter pair, including in components</b><br>
4079   * Type: <b>composite</b><br>
4080   * Path: <b>Observation | Observation.component</b><br>
4081   * </p>
4082   */
4083  @SearchParamDefinition(name="combo-code-value-concept", path="Observation | Observation.component", description="Code and coded value parameter pair, including in components", type="composite", compositeOf={"combo-code", "combo-value-concept"} )
4084  public static final String SP_COMBO_CODE_VALUE_CONCEPT = "combo-code-value-concept";
4085 /**
4086   * <b>Fluent Client</b> search parameter constant for <b>combo-code-value-concept</b>
4087   * <p>
4088   * Description: <b>Code and coded value parameter pair, including in components</b><br>
4089   * Type: <b>composite</b><br>
4090   * Path: <b>Observation | Observation.component</b><br>
4091   * </p>
4092   */
4093  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> COMBO_CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_COMBO_CODE_VALUE_CONCEPT);
4094
4095 /**
4096   * Search parameter: <b>combo-code-value-quantity</b>
4097   * <p>
4098   * Description: <b>Code and quantity value parameter pair, including in components</b><br>
4099   * Type: <b>composite</b><br>
4100   * Path: <b>Observation | Observation.component</b><br>
4101   * </p>
4102   */
4103  @SearchParamDefinition(name="combo-code-value-quantity", path="Observation | Observation.component", description="Code and quantity value parameter pair, including in components", type="composite", compositeOf={"combo-code", "combo-value-quantity"} )
4104  public static final String SP_COMBO_CODE_VALUE_QUANTITY = "combo-code-value-quantity";
4105 /**
4106   * <b>Fluent Client</b> search parameter constant for <b>combo-code-value-quantity</b>
4107   * <p>
4108   * Description: <b>Code and quantity value parameter pair, including in components</b><br>
4109   * Type: <b>composite</b><br>
4110   * Path: <b>Observation | Observation.component</b><br>
4111   * </p>
4112   */
4113  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> COMBO_CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_COMBO_CODE_VALUE_QUANTITY);
4114
4115 /**
4116   * Search parameter: <b>combo-code</b>
4117   * <p>
4118   * Description: <b>The code of the observation type or component type</b><br>
4119   * Type: <b>token</b><br>
4120   * Path: <b>Observation.code | Observation.component.code</b><br>
4121   * </p>
4122   */
4123  @SearchParamDefinition(name="combo-code", path="Observation.code | Observation.component.code", description="The code of the observation type or component type", type="token" )
4124  public static final String SP_COMBO_CODE = "combo-code";
4125 /**
4126   * <b>Fluent Client</b> search parameter constant for <b>combo-code</b>
4127   * <p>
4128   * Description: <b>The code of the observation type or component type</b><br>
4129   * Type: <b>token</b><br>
4130   * Path: <b>Observation.code | Observation.component.code</b><br>
4131   * </p>
4132   */
4133  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_CODE);
4134
4135 /**
4136   * Search parameter: <b>combo-data-absent-reason</b>
4137   * <p>
4138   * Description: <b>The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.</b><br>
4139   * Type: <b>token</b><br>
4140   * Path: <b>Observation.dataAbsentReason | Observation.component.dataAbsentReason</b><br>
4141   * </p>
4142   */
4143  @SearchParamDefinition(name="combo-data-absent-reason", path="Observation.dataAbsentReason | Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.", type="token" )
4144  public static final String SP_COMBO_DATA_ABSENT_REASON = "combo-data-absent-reason";
4145 /**
4146   * <b>Fluent Client</b> search parameter constant for <b>combo-data-absent-reason</b>
4147   * <p>
4148   * Description: <b>The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.</b><br>
4149   * Type: <b>token</b><br>
4150   * Path: <b>Observation.dataAbsentReason | Observation.component.dataAbsentReason</b><br>
4151   * </p>
4152   */
4153  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_DATA_ABSENT_REASON);
4154
4155 /**
4156   * Search parameter: <b>combo-value-concept</b>
4157   * <p>
4158   * Description: <b>The value or component value of the observation, if the value is a CodeableConcept</b><br>
4159   * Type: <b>token</b><br>
4160   * Path: <b>Observation.value.ofType(CodeableConcept) | Observation.component.value.ofType(CodeableConcept)</b><br>
4161   * </p>
4162   */
4163  @SearchParamDefinition(name="combo-value-concept", path="Observation.value.ofType(CodeableConcept) | Observation.component.value.ofType(CodeableConcept)", description="The value or component value of the observation, if the value is a CodeableConcept", type="token" )
4164  public static final String SP_COMBO_VALUE_CONCEPT = "combo-value-concept";
4165 /**
4166   * <b>Fluent Client</b> search parameter constant for <b>combo-value-concept</b>
4167   * <p>
4168   * Description: <b>The value or component value of the observation, if the value is a CodeableConcept</b><br>
4169   * Type: <b>token</b><br>
4170   * Path: <b>Observation.value.ofType(CodeableConcept) | Observation.component.value.ofType(CodeableConcept)</b><br>
4171   * </p>
4172   */
4173  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_VALUE_CONCEPT);
4174
4175 /**
4176   * Search parameter: <b>combo-value-quantity</b>
4177   * <p>
4178   * Description: <b>The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4179   * Type: <b>quantity</b><br>
4180   * Path: <b>Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData) | Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)</b><br>
4181   * </p>
4182   */
4183  @SearchParamDefinition(name="combo-value-quantity", path="Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData) | Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)", description="The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" )
4184  public static final String SP_COMBO_VALUE_QUANTITY = "combo-value-quantity";
4185 /**
4186   * <b>Fluent Client</b> search parameter constant for <b>combo-value-quantity</b>
4187   * <p>
4188   * Description: <b>The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4189   * Type: <b>quantity</b><br>
4190   * Path: <b>Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData) | Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)</b><br>
4191   * </p>
4192   */
4193  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam COMBO_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_COMBO_VALUE_QUANTITY);
4194
4195 /**
4196   * Search parameter: <b>component-code-value-concept</b>
4197   * <p>
4198   * Description: <b>Component code and component coded value parameter pair</b><br>
4199   * Type: <b>composite</b><br>
4200   * Path: <b>Observation.component</b><br>
4201   * </p>
4202   */
4203  @SearchParamDefinition(name="component-code-value-concept", path="Observation.component", description="Component code and component coded value parameter pair", type="composite", compositeOf={"component-code", "component-value-concept"} )
4204  public static final String SP_COMPONENT_CODE_VALUE_CONCEPT = "component-code-value-concept";
4205 /**
4206   * <b>Fluent Client</b> search parameter constant for <b>component-code-value-concept</b>
4207   * <p>
4208   * Description: <b>Component code and component coded value parameter pair</b><br>
4209   * Type: <b>composite</b><br>
4210   * Path: <b>Observation.component</b><br>
4211   * </p>
4212   */
4213  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> COMPONENT_CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_COMPONENT_CODE_VALUE_CONCEPT);
4214
4215 /**
4216   * Search parameter: <b>component-code-value-quantity</b>
4217   * <p>
4218   * Description: <b>Component code and component quantity value parameter pair</b><br>
4219   * Type: <b>composite</b><br>
4220   * Path: <b>Observation.component</b><br>
4221   * </p>
4222   */
4223  @SearchParamDefinition(name="component-code-value-quantity", path="Observation.component", description="Component code and component quantity value parameter pair", type="composite", compositeOf={"component-code", "component-value-quantity"} )
4224  public static final String SP_COMPONENT_CODE_VALUE_QUANTITY = "component-code-value-quantity";
4225 /**
4226   * <b>Fluent Client</b> search parameter constant for <b>component-code-value-quantity</b>
4227   * <p>
4228   * Description: <b>Component code and component quantity value parameter pair</b><br>
4229   * Type: <b>composite</b><br>
4230   * Path: <b>Observation.component</b><br>
4231   * </p>
4232   */
4233  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> COMPONENT_CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_COMPONENT_CODE_VALUE_QUANTITY);
4234
4235 /**
4236   * Search parameter: <b>component-code</b>
4237   * <p>
4238   * Description: <b>The component code of the observation type</b><br>
4239   * Type: <b>token</b><br>
4240   * Path: <b>Observation.component.code</b><br>
4241   * </p>
4242   */
4243  @SearchParamDefinition(name="component-code", path="Observation.component.code", description="The component code of the observation type", type="token" )
4244  public static final String SP_COMPONENT_CODE = "component-code";
4245 /**
4246   * <b>Fluent Client</b> search parameter constant for <b>component-code</b>
4247   * <p>
4248   * Description: <b>The component code of the observation type</b><br>
4249   * Type: <b>token</b><br>
4250   * Path: <b>Observation.component.code</b><br>
4251   * </p>
4252   */
4253  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_CODE);
4254
4255 /**
4256   * Search parameter: <b>component-data-absent-reason</b>
4257   * <p>
4258   * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br>
4259   * Type: <b>token</b><br>
4260   * Path: <b>Observation.component.dataAbsentReason</b><br>
4261   * </p>
4262   */
4263  @SearchParamDefinition(name="component-data-absent-reason", path="Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.component.value[x] is missing.", type="token" )
4264  public static final String SP_COMPONENT_DATA_ABSENT_REASON = "component-data-absent-reason";
4265 /**
4266   * <b>Fluent Client</b> search parameter constant for <b>component-data-absent-reason</b>
4267   * <p>
4268   * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br>
4269   * Type: <b>token</b><br>
4270   * Path: <b>Observation.component.dataAbsentReason</b><br>
4271   * </p>
4272   */
4273  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_DATA_ABSENT_REASON);
4274
4275 /**
4276   * Search parameter: <b>component-value-canonical</b>
4277   * <p>
4278   * Description: <b>URL contained in valueCanonical.</b><br>
4279   * Type: <b>uri</b><br>
4280   * Path: <b>Observation.component.value.ofType(canonical)</b><br>
4281   * </p>
4282   */
4283  @SearchParamDefinition(name="component-value-canonical", path="Observation.component.value.ofType(canonical)", description="URL contained in valueCanonical.", type="uri" )
4284  public static final String SP_COMPONENT_VALUE_CANONICAL = "component-value-canonical";
4285 /**
4286   * <b>Fluent Client</b> search parameter constant for <b>component-value-canonical</b>
4287   * <p>
4288   * Description: <b>URL contained in valueCanonical.</b><br>
4289   * Type: <b>uri</b><br>
4290   * Path: <b>Observation.component.value.ofType(canonical)</b><br>
4291   * </p>
4292   */
4293  public static final ca.uhn.fhir.rest.gclient.UriClientParam COMPONENT_VALUE_CANONICAL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_COMPONENT_VALUE_CANONICAL);
4294
4295 /**
4296   * Search parameter: <b>component-value-concept</b>
4297   * <p>
4298   * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br>
4299   * Type: <b>token</b><br>
4300   * Path: <b>Observation.component.value.ofType(CodeableConcept)</b><br>
4301   * </p>
4302   */
4303  @SearchParamDefinition(name="component-value-concept", path="Observation.component.value.ofType(CodeableConcept)", description="The value of the component observation, if the value is a CodeableConcept", type="token" )
4304  public static final String SP_COMPONENT_VALUE_CONCEPT = "component-value-concept";
4305 /**
4306   * <b>Fluent Client</b> search parameter constant for <b>component-value-concept</b>
4307   * <p>
4308   * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br>
4309   * Type: <b>token</b><br>
4310   * Path: <b>Observation.component.value.ofType(CodeableConcept)</b><br>
4311   * </p>
4312   */
4313  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_VALUE_CONCEPT);
4314
4315 /**
4316   * Search parameter: <b>component-value-quantity</b>
4317   * <p>
4318   * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4319   * Type: <b>quantity</b><br>
4320   * Path: <b>Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)</b><br>
4321   * </p>
4322   */
4323  @SearchParamDefinition(name="component-value-quantity", path="Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)", description="The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" )
4324  public static final String SP_COMPONENT_VALUE_QUANTITY = "component-value-quantity";
4325 /**
4326   * <b>Fluent Client</b> search parameter constant for <b>component-value-quantity</b>
4327   * <p>
4328   * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4329   * Type: <b>quantity</b><br>
4330   * Path: <b>Observation.component.value.ofType(Quantity) | Observation.component.value.ofType(SampledData)</b><br>
4331   * </p>
4332   */
4333  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam COMPONENT_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_COMPONENT_VALUE_QUANTITY);
4334
4335 /**
4336   * Search parameter: <b>component-value-reference</b>
4337   * <p>
4338   * Description: <b>Reference contained in valueReference.</b><br>
4339   * Type: <b>reference</b><br>
4340   * Path: <b>Observation.component.value.ofType(Reference)</b><br>
4341   * </p>
4342   */
4343  @SearchParamDefinition(name="component-value-reference", path="Observation.component.value.ofType(Reference)", description="Reference contained in valueReference.", type="reference", target={MolecularSequence.class } )
4344  public static final String SP_COMPONENT_VALUE_REFERENCE = "component-value-reference";
4345 /**
4346   * <b>Fluent Client</b> search parameter constant for <b>component-value-reference</b>
4347   * <p>
4348   * Description: <b>Reference contained in valueReference.</b><br>
4349   * Type: <b>reference</b><br>
4350   * Path: <b>Observation.component.value.ofType(Reference)</b><br>
4351   * </p>
4352   */
4353  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPONENT_VALUE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPONENT_VALUE_REFERENCE);
4354
4355/**
4356   * Constant for fluent queries to be used to add include statements. Specifies
4357   * the path value of "<b>Observation:component-value-reference</b>".
4358   */
4359  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPONENT_VALUE_REFERENCE = new ca.uhn.fhir.model.api.Include("Observation:component-value-reference").toLocked();
4360
4361 /**
4362   * Search parameter: <b>data-absent-reason</b>
4363   * <p>
4364   * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br>
4365   * Type: <b>token</b><br>
4366   * Path: <b>Observation.dataAbsentReason</b><br>
4367   * </p>
4368   */
4369  @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token" )
4370  public static final String SP_DATA_ABSENT_REASON = "data-absent-reason";
4371 /**
4372   * <b>Fluent Client</b> search parameter constant for <b>data-absent-reason</b>
4373   * <p>
4374   * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br>
4375   * Type: <b>token</b><br>
4376   * Path: <b>Observation.dataAbsentReason</b><br>
4377   * </p>
4378   */
4379  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DATA_ABSENT_REASON);
4380
4381 /**
4382   * Search parameter: <b>derived-from</b>
4383   * <p>
4384   * Description: <b>Related measurements the observation is made from</b><br>
4385   * Type: <b>reference</b><br>
4386   * Path: <b>Observation.derivedFrom</b><br>
4387   * </p>
4388   */
4389  @SearchParamDefinition(name="derived-from", path="Observation.derivedFrom", description="Related measurements the observation is made from", type="reference", target={DocumentReference.class, GenomicStudy.class, ImagingSelection.class, ImagingStudy.class, MolecularSequence.class, Observation.class, QuestionnaireResponse.class } )
4390  public static final String SP_DERIVED_FROM = "derived-from";
4391 /**
4392   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
4393   * <p>
4394   * Description: <b>Related measurements the observation is made from</b><br>
4395   * Type: <b>reference</b><br>
4396   * Path: <b>Observation.derivedFrom</b><br>
4397   * </p>
4398   */
4399  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
4400
4401/**
4402   * Constant for fluent queries to be used to add include statements. Specifies
4403   * the path value of "<b>Observation:derived-from</b>".
4404   */
4405  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("Observation:derived-from").toLocked();
4406
4407 /**
4408   * Search parameter: <b>device</b>
4409   * <p>
4410   * Description: <b>The Device that generated the observation data.</b><br>
4411   * Type: <b>reference</b><br>
4412   * Path: <b>Observation.device</b><br>
4413   * </p>
4414   */
4415  @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device") }, target={Device.class, DeviceMetric.class } )
4416  public static final String SP_DEVICE = "device";
4417 /**
4418   * <b>Fluent Client</b> search parameter constant for <b>device</b>
4419   * <p>
4420   * Description: <b>The Device that generated the observation data.</b><br>
4421   * Type: <b>reference</b><br>
4422   * Path: <b>Observation.device</b><br>
4423   * </p>
4424   */
4425  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE);
4426
4427/**
4428   * Constant for fluent queries to be used to add include statements. Specifies
4429   * the path value of "<b>Observation:device</b>".
4430   */
4431  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("Observation:device").toLocked();
4432
4433 /**
4434   * Search parameter: <b>focus</b>
4435   * <p>
4436   * Description: <b>The focus of an observation when the focus is not the patient of record.</b><br>
4437   * Type: <b>reference</b><br>
4438   * Path: <b>Observation.focus</b><br>
4439   * </p>
4440   */
4441  @SearchParamDefinition(name="focus", path="Observation.focus", description="The focus of an observation when the focus is not the patient of record.", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4442  public static final String SP_FOCUS = "focus";
4443 /**
4444   * <b>Fluent Client</b> search parameter constant for <b>focus</b>
4445   * <p>
4446   * Description: <b>The focus of an observation when the focus is not the patient of record.</b><br>
4447   * Type: <b>reference</b><br>
4448   * Path: <b>Observation.focus</b><br>
4449   * </p>
4450   */
4451  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS);
4452
4453/**
4454   * Constant for fluent queries to be used to add include statements. Specifies
4455   * the path value of "<b>Observation:focus</b>".
4456   */
4457  public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Observation:focus").toLocked();
4458
4459 /**
4460   * Search parameter: <b>has-member</b>
4461   * <p>
4462   * Description: <b>Related resource that belongs to the Observation group</b><br>
4463   * Type: <b>reference</b><br>
4464   * Path: <b>Observation.hasMember</b><br>
4465   * </p>
4466   */
4467  @SearchParamDefinition(name="has-member", path="Observation.hasMember", description="Related resource that belongs to the Observation group", type="reference", target={MolecularSequence.class, Observation.class, QuestionnaireResponse.class } )
4468  public static final String SP_HAS_MEMBER = "has-member";
4469 /**
4470   * <b>Fluent Client</b> search parameter constant for <b>has-member</b>
4471   * <p>
4472   * Description: <b>Related resource that belongs to the Observation group</b><br>
4473   * Type: <b>reference</b><br>
4474   * Path: <b>Observation.hasMember</b><br>
4475   * </p>
4476   */
4477  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam HAS_MEMBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_HAS_MEMBER);
4478
4479/**
4480   * Constant for fluent queries to be used to add include statements. Specifies
4481   * the path value of "<b>Observation:has-member</b>".
4482   */
4483  public static final ca.uhn.fhir.model.api.Include INCLUDE_HAS_MEMBER = new ca.uhn.fhir.model.api.Include("Observation:has-member").toLocked();
4484
4485 /**
4486   * Search parameter: <b>method</b>
4487   * <p>
4488   * Description: <b>The method used for the observation</b><br>
4489   * Type: <b>token</b><br>
4490   * Path: <b>Observation.method</b><br>
4491   * </p>
4492   */
4493  @SearchParamDefinition(name="method", path="Observation.method", description="The method used for the observation", type="token" )
4494  public static final String SP_METHOD = "method";
4495 /**
4496   * <b>Fluent Client</b> search parameter constant for <b>method</b>
4497   * <p>
4498   * Description: <b>The method used for the observation</b><br>
4499   * Type: <b>token</b><br>
4500   * Path: <b>Observation.method</b><br>
4501   * </p>
4502   */
4503  public static final ca.uhn.fhir.rest.gclient.TokenClientParam METHOD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_METHOD);
4504
4505 /**
4506   * Search parameter: <b>part-of</b>
4507   * <p>
4508   * Description: <b>Part of referenced event</b><br>
4509   * Type: <b>reference</b><br>
4510   * Path: <b>Observation.partOf</b><br>
4511   * </p>
4512   */
4513  @SearchParamDefinition(name="part-of", path="Observation.partOf", description="Part of referenced event", type="reference", target={GenomicStudy.class, ImagingStudy.class, Immunization.class, MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Procedure.class } )
4514  public static final String SP_PART_OF = "part-of";
4515 /**
4516   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
4517   * <p>
4518   * Description: <b>Part of referenced event</b><br>
4519   * Type: <b>reference</b><br>
4520   * Path: <b>Observation.partOf</b><br>
4521   * </p>
4522   */
4523  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
4524
4525/**
4526   * Constant for fluent queries to be used to add include statements. Specifies
4527   * the path value of "<b>Observation:part-of</b>".
4528   */
4529  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Observation:part-of").toLocked();
4530
4531 /**
4532   * Search parameter: <b>performer</b>
4533   * <p>
4534   * Description: <b>Who performed the observation</b><br>
4535   * Type: <b>reference</b><br>
4536   * Path: <b>Observation.performer</b><br>
4537   * </p>
4538   */
4539  @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", 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={CareTeam.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
4540  public static final String SP_PERFORMER = "performer";
4541 /**
4542   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
4543   * <p>
4544   * Description: <b>Who performed the observation</b><br>
4545   * Type: <b>reference</b><br>
4546   * Path: <b>Observation.performer</b><br>
4547   * </p>
4548   */
4549  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
4550
4551/**
4552   * Constant for fluent queries to be used to add include statements. Specifies
4553   * the path value of "<b>Observation:performer</b>".
4554   */
4555  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("Observation:performer").toLocked();
4556
4557 /**
4558   * Search parameter: <b>specimen</b>
4559   * <p>
4560   * Description: <b>Specimen used for this observation</b><br>
4561   * Type: <b>reference</b><br>
4562   * Path: <b>Observation.specimen</b><br>
4563   * </p>
4564   */
4565  @SearchParamDefinition(name="specimen", path="Observation.specimen", description="Specimen used for this observation", type="reference", target={Group.class, Specimen.class } )
4566  public static final String SP_SPECIMEN = "specimen";
4567 /**
4568   * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
4569   * <p>
4570   * Description: <b>Specimen used for this observation</b><br>
4571   * Type: <b>reference</b><br>
4572   * Path: <b>Observation.specimen</b><br>
4573   * </p>
4574   */
4575  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN);
4576
4577/**
4578   * Constant for fluent queries to be used to add include statements. Specifies
4579   * the path value of "<b>Observation:specimen</b>".
4580   */
4581  public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("Observation:specimen").toLocked();
4582
4583 /**
4584   * Search parameter: <b>status</b>
4585   * <p>
4586   * Description: <b>The status of the observation</b><br>
4587   * Type: <b>token</b><br>
4588   * Path: <b>Observation.status</b><br>
4589   * </p>
4590   */
4591  @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" )
4592  public static final String SP_STATUS = "status";
4593 /**
4594   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4595   * <p>
4596   * Description: <b>The status of the observation</b><br>
4597   * Type: <b>token</b><br>
4598   * Path: <b>Observation.status</b><br>
4599   * </p>
4600   */
4601  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4602
4603 /**
4604   * Search parameter: <b>subject</b>
4605   * <p>
4606   * Description: <b>The subject that the observation is about</b><br>
4607   * Type: <b>reference</b><br>
4608   * Path: <b>Observation.subject</b><br>
4609   * </p>
4610   */
4611  @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={BiologicallyDerivedProduct.class, Device.class, Group.class, Location.class, Medication.class, NutritionProduct.class, Organization.class, Patient.class, Practitioner.class, Procedure.class, Substance.class } )
4612  public static final String SP_SUBJECT = "subject";
4613 /**
4614   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
4615   * <p>
4616   * Description: <b>The subject that the observation is about</b><br>
4617   * Type: <b>reference</b><br>
4618   * Path: <b>Observation.subject</b><br>
4619   * </p>
4620   */
4621  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
4622
4623/**
4624   * Constant for fluent queries to be used to add include statements. Specifies
4625   * the path value of "<b>Observation:subject</b>".
4626   */
4627  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Observation:subject").toLocked();
4628
4629 /**
4630   * Search parameter: <b>value-canonical</b>
4631   * <p>
4632   * Description: <b>URL contained in valueCanonical.</b><br>
4633   * Type: <b>uri</b><br>
4634   * Path: <b>Observation.value.ofType(canonical)</b><br>
4635   * </p>
4636   */
4637  @SearchParamDefinition(name="value-canonical", path="Observation.value.ofType(canonical)", description="URL contained in valueCanonical.", type="uri" )
4638  public static final String SP_VALUE_CANONICAL = "value-canonical";
4639 /**
4640   * <b>Fluent Client</b> search parameter constant for <b>value-canonical</b>
4641   * <p>
4642   * Description: <b>URL contained in valueCanonical.</b><br>
4643   * Type: <b>uri</b><br>
4644   * Path: <b>Observation.value.ofType(canonical)</b><br>
4645   * </p>
4646   */
4647  public static final ca.uhn.fhir.rest.gclient.UriClientParam VALUE_CANONICAL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_VALUE_CANONICAL);
4648
4649 /**
4650   * Search parameter: <b>value-concept</b>
4651   * <p>
4652   * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br>
4653   * Type: <b>token</b><br>
4654   * Path: <b>Observation.value.ofType(CodeableConcept)</b><br>
4655   * </p>
4656   */
4657  @SearchParamDefinition(name="value-concept", path="Observation.value.ofType(CodeableConcept)", description="The value of the observation, if the value is a CodeableConcept", type="token" )
4658  public static final String SP_VALUE_CONCEPT = "value-concept";
4659 /**
4660   * <b>Fluent Client</b> search parameter constant for <b>value-concept</b>
4661   * <p>
4662   * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br>
4663   * Type: <b>token</b><br>
4664   * Path: <b>Observation.value.ofType(CodeableConcept)</b><br>
4665   * </p>
4666   */
4667  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VALUE_CONCEPT);
4668
4669 /**
4670   * Search parameter: <b>value-date</b>
4671   * <p>
4672   * Description: <b>The value of the observation, if the value is a date or period of time</b><br>
4673   * Type: <b>date</b><br>
4674   * Path: <b>Observation.value.ofType(dateTime) | Observation.value.ofType(Period)</b><br>
4675   * </p>
4676   */
4677  @SearchParamDefinition(name="value-date", path="Observation.value.ofType(dateTime) | Observation.value.ofType(Period)", description="The value of the observation, if the value is a date or period of time", type="date" )
4678  public static final String SP_VALUE_DATE = "value-date";
4679 /**
4680   * <b>Fluent Client</b> search parameter constant for <b>value-date</b>
4681   * <p>
4682   * Description: <b>The value of the observation, if the value is a date or period of time</b><br>
4683   * Type: <b>date</b><br>
4684   * Path: <b>Observation.value.ofType(dateTime) | Observation.value.ofType(Period)</b><br>
4685   * </p>
4686   */
4687  public static final ca.uhn.fhir.rest.gclient.DateClientParam VALUE_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_VALUE_DATE);
4688
4689 /**
4690   * Search parameter: <b>value-markdown</b>
4691   * <p>
4692   * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
4693   * Type: <b>string</b><br>
4694   * Path: <b>Observation.value.ofType(markdown) | Observation.value.ofType(CodeableConcept).text</b><br>
4695   * </p>
4696   */
4697  @SearchParamDefinition(name="value-markdown", path="Observation.value.ofType(markdown) | Observation.value.ofType(CodeableConcept).text", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" )
4698  public static final String SP_VALUE_MARKDOWN = "value-markdown";
4699 /**
4700   * <b>Fluent Client</b> search parameter constant for <b>value-markdown</b>
4701   * <p>
4702   * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
4703   * Type: <b>string</b><br>
4704   * Path: <b>Observation.value.ofType(markdown) | Observation.value.ofType(CodeableConcept).text</b><br>
4705   * </p>
4706   */
4707  public static final ca.uhn.fhir.rest.gclient.StringClientParam VALUE_MARKDOWN = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VALUE_MARKDOWN);
4708
4709 /**
4710   * Search parameter: <b>value-quantity</b>
4711   * <p>
4712   * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4713   * Type: <b>quantity</b><br>
4714   * Path: <b>Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData)</b><br>
4715   * </p>
4716   */
4717  @SearchParamDefinition(name="value-quantity", path="Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData)", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" )
4718  public static final String SP_VALUE_QUANTITY = "value-quantity";
4719 /**
4720   * <b>Fluent Client</b> search parameter constant for <b>value-quantity</b>
4721   * <p>
4722   * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
4723   * Type: <b>quantity</b><br>
4724   * Path: <b>Observation.value.ofType(Quantity) | Observation.value.ofType(SampledData)</b><br>
4725   * </p>
4726   */
4727  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_VALUE_QUANTITY);
4728
4729 /**
4730   * Search parameter: <b>value-reference</b>
4731   * <p>
4732   * Description: <b>Reference contained in valueReference.</b><br>
4733   * Type: <b>reference</b><br>
4734   * Path: <b>Observation.value.ofType(Reference)</b><br>
4735   * </p>
4736   */
4737  @SearchParamDefinition(name="value-reference", path="Observation.value.ofType(Reference)", description="Reference contained in valueReference.", type="reference", target={MolecularSequence.class } )
4738  public static final String SP_VALUE_REFERENCE = "value-reference";
4739 /**
4740   * <b>Fluent Client</b> search parameter constant for <b>value-reference</b>
4741   * <p>
4742   * Description: <b>Reference contained in valueReference.</b><br>
4743   * Type: <b>reference</b><br>
4744   * Path: <b>Observation.value.ofType(Reference)</b><br>
4745   * </p>
4746   */
4747  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam VALUE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_VALUE_REFERENCE);
4748
4749/**
4750   * Constant for fluent queries to be used to add include statements. Specifies
4751   * the path value of "<b>Observation:value-reference</b>".
4752   */
4753  public static final ca.uhn.fhir.model.api.Include INCLUDE_VALUE_REFERENCE = new ca.uhn.fhir.model.api.Include("Observation:value-reference").toLocked();
4754
4755 /**
4756   * Search parameter: <b>code</b>
4757   * <p>
4758   * Description: <b>Multiple Resources: 
4759
4760* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
4761* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
4762* [AuditEvent](auditevent.html): More specific code for the event
4763* [Basic](basic.html): Kind of Resource
4764* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
4765* [Condition](condition.html): Code for the condition
4766* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
4767* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
4768* [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
4769* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
4770* [ImagingSelection](imagingselection.html): The imaging selection status
4771* [List](list.html): What the purpose of this list is
4772* [Medication](medication.html): Returns medications for a specific code
4773* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
4774* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
4775* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
4776* [MedicationStatement](medicationstatement.html): Return statements of this medication code
4777* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
4778* [Observation](observation.html): The code of the observation type
4779* [Procedure](procedure.html): A code to identify a  procedure
4780* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
4781* [Task](task.html): Search by task code
4782</b><br>
4783   * Type: <b>token</b><br>
4784   * 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>
4785   * </p>
4786   */
4787  @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" )
4788  public static final String SP_CODE = "code";
4789 /**
4790   * <b>Fluent Client</b> search parameter constant for <b>code</b>
4791   * <p>
4792   * Description: <b>Multiple Resources: 
4793
4794* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
4795* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
4796* [AuditEvent](auditevent.html): More specific code for the event
4797* [Basic](basic.html): Kind of Resource
4798* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
4799* [Condition](condition.html): Code for the condition
4800* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
4801* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
4802* [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
4803* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
4804* [ImagingSelection](imagingselection.html): The imaging selection status
4805* [List](list.html): What the purpose of this list is
4806* [Medication](medication.html): Returns medications for a specific code
4807* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
4808* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
4809* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
4810* [MedicationStatement](medicationstatement.html): Return statements of this medication code
4811* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
4812* [Observation](observation.html): The code of the observation type
4813* [Procedure](procedure.html): A code to identify a  procedure
4814* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
4815* [Task](task.html): Search by task code
4816</b><br>
4817   * Type: <b>token</b><br>
4818   * 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>
4819   * </p>
4820   */
4821  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
4822
4823 /**
4824   * Search parameter: <b>date</b>
4825   * <p>
4826   * Description: <b>Multiple Resources: 
4827
4828* [AdverseEvent](adverseevent.html): When the event occurred
4829* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
4830* [Appointment](appointment.html): Appointment date/time.
4831* [AuditEvent](auditevent.html): Time when the event was recorded
4832* [CarePlan](careplan.html): Time period plan covers
4833* [CareTeam](careteam.html): A date within the coverage time period.
4834* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
4835* [Composition](composition.html): Composition editing time
4836* [Consent](consent.html): When consent was agreed to
4837* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
4838* [DocumentReference](documentreference.html): When this document reference was created
4839* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
4840* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
4841* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
4842* [Flag](flag.html): Time period when flag is active
4843* [Immunization](immunization.html): Vaccination  (non)-Administration Date
4844* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
4845* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
4846* [Invoice](invoice.html): Invoice date / posting date
4847* [List](list.html): When the list was prepared
4848* [MeasureReport](measurereport.html): The date of the measure report
4849* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
4850* [Observation](observation.html): Clinically relevant time/time-period for observation
4851* [Procedure](procedure.html): When the procedure occurred or is occurring
4852* [ResearchSubject](researchsubject.html): Start and end of participation
4853* [RiskAssessment](riskassessment.html): When was assessment made?
4854* [SupplyRequest](supplyrequest.html): When the request was made
4855</b><br>
4856   * Type: <b>date</b><br>
4857   * 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>
4858   * </p>
4859   */
4860  @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" )
4861  public static final String SP_DATE = "date";
4862 /**
4863   * <b>Fluent Client</b> search parameter constant for <b>date</b>
4864   * <p>
4865   * Description: <b>Multiple Resources: 
4866
4867* [AdverseEvent](adverseevent.html): When the event occurred
4868* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
4869* [Appointment](appointment.html): Appointment date/time.
4870* [AuditEvent](auditevent.html): Time when the event was recorded
4871* [CarePlan](careplan.html): Time period plan covers
4872* [CareTeam](careteam.html): A date within the coverage time period.
4873* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
4874* [Composition](composition.html): Composition editing time
4875* [Consent](consent.html): When consent was agreed to
4876* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
4877* [DocumentReference](documentreference.html): When this document reference was created
4878* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
4879* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
4880* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
4881* [Flag](flag.html): Time period when flag is active
4882* [Immunization](immunization.html): Vaccination  (non)-Administration Date
4883* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
4884* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
4885* [Invoice](invoice.html): Invoice date / posting date
4886* [List](list.html): When the list was prepared
4887* [MeasureReport](measurereport.html): The date of the measure report
4888* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
4889* [Observation](observation.html): Clinically relevant time/time-period for observation
4890* [Procedure](procedure.html): When the procedure occurred or is occurring
4891* [ResearchSubject](researchsubject.html): Start and end of participation
4892* [RiskAssessment](riskassessment.html): When was assessment made?
4893* [SupplyRequest](supplyrequest.html): When the request was made
4894</b><br>
4895   * Type: <b>date</b><br>
4896   * 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>
4897   * </p>
4898   */
4899  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
4900
4901 /**
4902   * Search parameter: <b>encounter</b>
4903   * <p>
4904   * Description: <b>Multiple Resources: 
4905
4906* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
4907* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
4908* [ChargeItem](chargeitem.html): Encounter associated with event
4909* [Claim](claim.html): Encounters associated with a billed line item
4910* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
4911* [Communication](communication.html): The Encounter during which this Communication was created
4912* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
4913* [Composition](composition.html): Context of the Composition
4914* [Condition](condition.html): The Encounter during which this Condition was created
4915* [DeviceRequest](devicerequest.html): Encounter during which request was created
4916* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
4917* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
4918* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
4919* [Flag](flag.html): Alert relevant during encounter
4920* [ImagingStudy](imagingstudy.html): The context of the study
4921* [List](list.html): Context in which list created
4922* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
4923* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
4924* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
4925* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
4926* [Observation](observation.html): Encounter related to the observation
4927* [Procedure](procedure.html): The Encounter during which this Procedure was created
4928* [Provenance](provenance.html): Encounter related to the Provenance
4929* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
4930* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
4931* [RiskAssessment](riskassessment.html): Where was assessment performed?
4932* [ServiceRequest](servicerequest.html): An encounter in which this request is made
4933* [Task](task.html): Search by encounter
4934* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
4935</b><br>
4936   * Type: <b>reference</b><br>
4937   * 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>
4938   * </p>
4939   */
4940  @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 } )
4941  public static final String SP_ENCOUNTER = "encounter";
4942 /**
4943   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
4944   * <p>
4945   * Description: <b>Multiple Resources: 
4946
4947* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
4948* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
4949* [ChargeItem](chargeitem.html): Encounter associated with event
4950* [Claim](claim.html): Encounters associated with a billed line item
4951* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
4952* [Communication](communication.html): The Encounter during which this Communication was created
4953* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
4954* [Composition](composition.html): Context of the Composition
4955* [Condition](condition.html): The Encounter during which this Condition was created
4956* [DeviceRequest](devicerequest.html): Encounter during which request was created
4957* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
4958* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
4959* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
4960* [Flag](flag.html): Alert relevant during encounter
4961* [ImagingStudy](imagingstudy.html): The context of the study
4962* [List](list.html): Context in which list created
4963* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
4964* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
4965* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
4966* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
4967* [Observation](observation.html): Encounter related to the observation
4968* [Procedure](procedure.html): The Encounter during which this Procedure was created
4969* [Provenance](provenance.html): Encounter related to the Provenance
4970* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
4971* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
4972* [RiskAssessment](riskassessment.html): Where was assessment performed?
4973* [ServiceRequest](servicerequest.html): An encounter in which this request is made
4974* [Task](task.html): Search by encounter
4975* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
4976</b><br>
4977   * Type: <b>reference</b><br>
4978   * 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>
4979   * </p>
4980   */
4981  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
4982
4983/**
4984   * Constant for fluent queries to be used to add include statements. Specifies
4985   * the path value of "<b>Observation:encounter</b>".
4986   */
4987  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Observation:encounter").toLocked();
4988
4989 /**
4990   * Search parameter: <b>identifier</b>
4991   * <p>
4992   * Description: <b>Multiple Resources: 
4993
4994* [Account](account.html): Account number
4995* [AdverseEvent](adverseevent.html): Business identifier for the event
4996* [AllergyIntolerance](allergyintolerance.html): External ids for this item
4997* [Appointment](appointment.html): An Identifier of the Appointment
4998* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
4999* [Basic](basic.html): Business identifier
5000* [BodyStructure](bodystructure.html): Bodystructure identifier
5001* [CarePlan](careplan.html): External Ids for this plan
5002* [CareTeam](careteam.html): External Ids for this team
5003* [ChargeItem](chargeitem.html): Business Identifier for item
5004* [Claim](claim.html): The primary identifier of the financial resource
5005* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
5006* [ClinicalImpression](clinicalimpression.html): Business identifier
5007* [Communication](communication.html): Unique identifier
5008* [CommunicationRequest](communicationrequest.html): Unique identifier
5009* [Composition](composition.html): Version-independent identifier for the Composition
5010* [Condition](condition.html): A unique identifier of the condition record
5011* [Consent](consent.html): Identifier for this record (external references)
5012* [Contract](contract.html): The identity of the contract
5013* [Coverage](coverage.html): The primary identifier of the insured and the coverage
5014* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
5015* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
5016* [DetectedIssue](detectedissue.html): Unique id for the detected issue
5017* [DeviceRequest](devicerequest.html): Business identifier for request/order
5018* [DeviceUsage](deviceusage.html): Search by identifier
5019* [DiagnosticReport](diagnosticreport.html): An identifier for the report
5020* [DocumentReference](documentreference.html): Identifier of the attachment binary
5021* [Encounter](encounter.html): Identifier(s) by which this encounter is known
5022* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
5023* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
5024* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
5025* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
5026* [Flag](flag.html): Business identifier
5027* [Goal](goal.html): External Ids for this goal
5028* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
5029* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
5030* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
5031* [Immunization](immunization.html): Business identifier
5032* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
5033* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
5034* [Invoice](invoice.html): Business Identifier for item
5035* [List](list.html): Business identifier
5036* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
5037* [Medication](medication.html): Returns medications with this external identifier
5038* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
5039* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
5040* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
5041* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
5042* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
5043* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
5044* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
5045* [Observation](observation.html): The unique id for a particular observation
5046* [Person](person.html): A person Identifier
5047* [Procedure](procedure.html): A unique identifier for a procedure
5048* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
5049* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
5050* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
5051* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
5052* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
5053* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
5054* [Specimen](specimen.html): The unique identifier associated with the specimen
5055* [SupplyDelivery](supplydelivery.html): External identifier
5056* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
5057* [Task](task.html): Search for a task instance by its business identifier
5058* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
5059</b><br>
5060   * Type: <b>token</b><br>
5061   * 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>
5062   * </p>
5063   */
5064  @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" )
5065  public static final String SP_IDENTIFIER = "identifier";
5066 /**
5067   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5068   * <p>
5069   * Description: <b>Multiple Resources: 
5070
5071* [Account](account.html): Account number
5072* [AdverseEvent](adverseevent.html): Business identifier for the event
5073* [AllergyIntolerance](allergyintolerance.html): External ids for this item
5074* [Appointment](appointment.html): An Identifier of the Appointment
5075* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
5076* [Basic](basic.html): Business identifier
5077* [BodyStructure](bodystructure.html): Bodystructure identifier
5078* [CarePlan](careplan.html): External Ids for this plan
5079* [CareTeam](careteam.html): External Ids for this team
5080* [ChargeItem](chargeitem.html): Business Identifier for item
5081* [Claim](claim.html): The primary identifier of the financial resource
5082* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
5083* [ClinicalImpression](clinicalimpression.html): Business identifier
5084* [Communication](communication.html): Unique identifier
5085* [CommunicationRequest](communicationrequest.html): Unique identifier
5086* [Composition](composition.html): Version-independent identifier for the Composition
5087* [Condition](condition.html): A unique identifier of the condition record
5088* [Consent](consent.html): Identifier for this record (external references)
5089* [Contract](contract.html): The identity of the contract
5090* [Coverage](coverage.html): The primary identifier of the insured and the coverage
5091* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
5092* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
5093* [DetectedIssue](detectedissue.html): Unique id for the detected issue
5094* [DeviceRequest](devicerequest.html): Business identifier for request/order
5095* [DeviceUsage](deviceusage.html): Search by identifier
5096* [DiagnosticReport](diagnosticreport.html): An identifier for the report
5097* [DocumentReference](documentreference.html): Identifier of the attachment binary
5098* [Encounter](encounter.html): Identifier(s) by which this encounter is known
5099* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
5100* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
5101* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
5102* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
5103* [Flag](flag.html): Business identifier
5104* [Goal](goal.html): External Ids for this goal
5105* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
5106* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
5107* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
5108* [Immunization](immunization.html): Business identifier
5109* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
5110* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
5111* [Invoice](invoice.html): Business Identifier for item
5112* [List](list.html): Business identifier
5113* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
5114* [Medication](medication.html): Returns medications with this external identifier
5115* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
5116* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
5117* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
5118* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
5119* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
5120* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
5121* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
5122* [Observation](observation.html): The unique id for a particular observation
5123* [Person](person.html): A person Identifier
5124* [Procedure](procedure.html): A unique identifier for a procedure
5125* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
5126* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
5127* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
5128* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
5129* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
5130* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
5131* [Specimen](specimen.html): The unique identifier associated with the specimen
5132* [SupplyDelivery](supplydelivery.html): External identifier
5133* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
5134* [Task](task.html): Search for a task instance by its business identifier
5135* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
5136</b><br>
5137   * Type: <b>token</b><br>
5138   * 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>
5139   * </p>
5140   */
5141  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5142
5143 /**
5144   * Search parameter: <b>patient</b>
5145   * <p>
5146   * Description: <b>Multiple Resources: 
5147
5148* [Account](account.html): The entity that caused the expenses
5149* [AdverseEvent](adverseevent.html): Subject impacted by event
5150* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
5151* [Appointment](appointment.html): One of the individuals of the appointment is this patient
5152* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
5153* [AuditEvent](auditevent.html): Where the activity involved patient data
5154* [Basic](basic.html): Identifies the focus of this resource
5155* [BodyStructure](bodystructure.html): Who this is about
5156* [CarePlan](careplan.html): Who the care plan is for
5157* [CareTeam](careteam.html): Who care team is for
5158* [ChargeItem](chargeitem.html): Individual service was done for/to
5159* [Claim](claim.html): Patient receiving the products or services
5160* [ClaimResponse](claimresponse.html): The subject of care
5161* [ClinicalImpression](clinicalimpression.html): Patient assessed
5162* [Communication](communication.html): Focus of message
5163* [CommunicationRequest](communicationrequest.html): Focus of message
5164* [Composition](composition.html): Who and/or what the composition is about
5165* [Condition](condition.html): Who has the condition?
5166* [Consent](consent.html): Who the consent applies to
5167* [Contract](contract.html): The identity of the subject of the contract (if a patient)
5168* [Coverage](coverage.html): Retrieve coverages for a patient
5169* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
5170* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
5171* [DetectedIssue](detectedissue.html): Associated patient
5172* [DeviceRequest](devicerequest.html): Individual the service is ordered for
5173* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
5174* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
5175* [DocumentReference](documentreference.html): Who/what is the subject of the document
5176* [Encounter](encounter.html): The patient present at the encounter
5177* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
5178* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
5179* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
5180* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
5181* [Flag](flag.html): The identity of a subject to list flags for
5182* [Goal](goal.html): Who this goal is intended for
5183* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
5184* [ImagingSelection](imagingselection.html): Who the study is about
5185* [ImagingStudy](imagingstudy.html): Who the study is about
5186* [Immunization](immunization.html): The patient for the vaccination record
5187* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
5188* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
5189* [Invoice](invoice.html): Recipient(s) of goods and services
5190* [List](list.html): If all resources have the same subject
5191* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
5192* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
5193* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
5194* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
5195* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
5196* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
5197* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
5198* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
5199* [Observation](observation.html): The subject that the observation is about (if patient)
5200* [Person](person.html): The Person links to this Patient
5201* [Procedure](procedure.html): Search by subject - a patient
5202* [Provenance](provenance.html): Where the activity involved patient data
5203* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
5204* [RelatedPerson](relatedperson.html): The patient this related person is related to
5205* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
5206* [ResearchSubject](researchsubject.html): Who or what is part of study
5207* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
5208* [ServiceRequest](servicerequest.html): Search by subject - a patient
5209* [Specimen](specimen.html): The patient the specimen comes from
5210* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
5211* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
5212* [Task](task.html): Search by patient
5213* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
5214</b><br>
5215   * Type: <b>reference</b><br>
5216   * 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>
5217   * </p>
5218   */
5219  @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 } )
5220  public static final String SP_PATIENT = "patient";
5221 /**
5222   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
5223   * <p>
5224   * Description: <b>Multiple Resources: 
5225
5226* [Account](account.html): The entity that caused the expenses
5227* [AdverseEvent](adverseevent.html): Subject impacted by event
5228* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
5229* [Appointment](appointment.html): One of the individuals of the appointment is this patient
5230* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
5231* [AuditEvent](auditevent.html): Where the activity involved patient data
5232* [Basic](basic.html): Identifies the focus of this resource
5233* [BodyStructure](bodystructure.html): Who this is about
5234* [CarePlan](careplan.html): Who the care plan is for
5235* [CareTeam](careteam.html): Who care team is for
5236* [ChargeItem](chargeitem.html): Individual service was done for/to
5237* [Claim](claim.html): Patient receiving the products or services
5238* [ClaimResponse](claimresponse.html): The subject of care
5239* [ClinicalImpression](clinicalimpression.html): Patient assessed
5240* [Communication](communication.html): Focus of message
5241* [CommunicationRequest](communicationrequest.html): Focus of message
5242* [Composition](composition.html): Who and/or what the composition is about
5243* [Condition](condition.html): Who has the condition?
5244* [Consent](consent.html): Who the consent applies to
5245* [Contract](contract.html): The identity of the subject of the contract (if a patient)
5246* [Coverage](coverage.html): Retrieve coverages for a patient
5247* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
5248* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
5249* [DetectedIssue](detectedissue.html): Associated patient
5250* [DeviceRequest](devicerequest.html): Individual the service is ordered for
5251* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
5252* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
5253* [DocumentReference](documentreference.html): Who/what is the subject of the document
5254* [Encounter](encounter.html): The patient present at the encounter
5255* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
5256* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
5257* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
5258* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
5259* [Flag](flag.html): The identity of a subject to list flags for
5260* [Goal](goal.html): Who this goal is intended for
5261* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
5262* [ImagingSelection](imagingselection.html): Who the study is about
5263* [ImagingStudy](imagingstudy.html): Who the study is about
5264* [Immunization](immunization.html): The patient for the vaccination record
5265* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
5266* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
5267* [Invoice](invoice.html): Recipient(s) of goods and services
5268* [List](list.html): If all resources have the same subject
5269* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
5270* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
5271* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
5272* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
5273* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
5274* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
5275* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
5276* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
5277* [Observation](observation.html): The subject that the observation is about (if patient)
5278* [Person](person.html): The Person links to this Patient
5279* [Procedure](procedure.html): Search by subject - a patient
5280* [Provenance](provenance.html): Where the activity involved patient data
5281* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
5282* [RelatedPerson](relatedperson.html): The patient this related person is related to
5283* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
5284* [ResearchSubject](researchsubject.html): Who or what is part of study
5285* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
5286* [ServiceRequest](servicerequest.html): Search by subject - a patient
5287* [Specimen](specimen.html): The patient the specimen comes from
5288* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
5289* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
5290* [Task](task.html): Search by patient
5291* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
5292</b><br>
5293   * Type: <b>reference</b><br>
5294   * 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>
5295   * </p>
5296   */
5297  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
5298
5299/**
5300   * Constant for fluent queries to be used to add include statements. Specifies
5301   * the path value of "<b>Observation:patient</b>".
5302   */
5303  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Observation:patient").toLocked();
5304
5305
5306}
5307