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 Tue, Dec 13, 2022 17:53+1100 for FHIR vcurrent
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score.
052 */
053@ResourceDef(name="ClinicalImpression", profile="http://hl7.org/fhir/StructureDefinition/ClinicalImpression")
054public class ClinicalImpression extends DomainResource {
055
056    @Block()
057    public static class ClinicalImpressionFindingComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.
060         */
061        @Child(name = "item", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="What was found", formalDefinition="Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
064        protected CodeableReference item;
065
066        /**
067         * Which investigations support finding or diagnosis.
068         */
069        @Child(name = "basis", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="Which investigations support finding", formalDefinition="Which investigations support finding or diagnosis." )
071        protected StringType basis;
072
073        private static final long serialVersionUID = -1363589306L;
074
075    /**
076     * Constructor
077     */
078      public ClinicalImpressionFindingComponent() {
079        super();
080      }
081
082        /**
083         * @return {@link #item} (Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.)
084         */
085        public CodeableReference getItem() { 
086          if (this.item == null)
087            if (Configuration.errorOnAutoCreate())
088              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.item");
089            else if (Configuration.doAutoCreate())
090              this.item = new CodeableReference(); // cc
091          return this.item;
092        }
093
094        public boolean hasItem() { 
095          return this.item != null && !this.item.isEmpty();
096        }
097
098        /**
099         * @param value {@link #item} (Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.)
100         */
101        public ClinicalImpressionFindingComponent setItem(CodeableReference value) { 
102          this.item = value;
103          return this;
104        }
105
106        /**
107         * @return {@link #basis} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getBasis" gives direct access to the value
108         */
109        public StringType getBasisElement() { 
110          if (this.basis == null)
111            if (Configuration.errorOnAutoCreate())
112              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.basis");
113            else if (Configuration.doAutoCreate())
114              this.basis = new StringType(); // bb
115          return this.basis;
116        }
117
118        public boolean hasBasisElement() { 
119          return this.basis != null && !this.basis.isEmpty();
120        }
121
122        public boolean hasBasis() { 
123          return this.basis != null && !this.basis.isEmpty();
124        }
125
126        /**
127         * @param value {@link #basis} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getBasis" gives direct access to the value
128         */
129        public ClinicalImpressionFindingComponent setBasisElement(StringType value) { 
130          this.basis = value;
131          return this;
132        }
133
134        /**
135         * @return Which investigations support finding or diagnosis.
136         */
137        public String getBasis() { 
138          return this.basis == null ? null : this.basis.getValue();
139        }
140
141        /**
142         * @param value Which investigations support finding or diagnosis.
143         */
144        public ClinicalImpressionFindingComponent setBasis(String value) { 
145          if (Utilities.noString(value))
146            this.basis = null;
147          else {
148            if (this.basis == null)
149              this.basis = new StringType();
150            this.basis.setValue(value);
151          }
152          return this;
153        }
154
155        protected void listChildren(List<Property> children) {
156          super.listChildren(children);
157          children.add(new Property("item", "CodeableReference(Condition|Observation|DocumentReference)", "Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, item));
158          children.add(new Property("basis", "string", "Which investigations support finding or diagnosis.", 0, 1, basis));
159        }
160
161        @Override
162        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
163          switch (_hash) {
164          case 3242771: /*item*/  return new Property("item", "CodeableReference(Condition|Observation|DocumentReference)", "Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, item);
165          case 93508670: /*basis*/  return new Property("basis", "string", "Which investigations support finding or diagnosis.", 0, 1, basis);
166          default: return super.getNamedProperty(_hash, _name, _checkValid);
167          }
168
169        }
170
171      @Override
172      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
173        switch (hash) {
174        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableReference
175        case 93508670: /*basis*/ return this.basis == null ? new Base[0] : new Base[] {this.basis}; // StringType
176        default: return super.getProperty(hash, name, checkValid);
177        }
178
179      }
180
181      @Override
182      public Base setProperty(int hash, String name, Base value) throws FHIRException {
183        switch (hash) {
184        case 3242771: // item
185          this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference
186          return value;
187        case 93508670: // basis
188          this.basis = TypeConvertor.castToString(value); // StringType
189          return value;
190        default: return super.setProperty(hash, name, value);
191        }
192
193      }
194
195      @Override
196      public Base setProperty(String name, Base value) throws FHIRException {
197        if (name.equals("item")) {
198          this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference
199        } else if (name.equals("basis")) {
200          this.basis = TypeConvertor.castToString(value); // StringType
201        } else
202          return super.setProperty(name, value);
203        return value;
204      }
205
206      @Override
207      public Base makeProperty(int hash, String name) throws FHIRException {
208        switch (hash) {
209        case 3242771:  return getItem();
210        case 93508670:  return getBasisElement();
211        default: return super.makeProperty(hash, name);
212        }
213
214      }
215
216      @Override
217      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
218        switch (hash) {
219        case 3242771: /*item*/ return new String[] {"CodeableReference"};
220        case 93508670: /*basis*/ return new String[] {"string"};
221        default: return super.getTypesForProperty(hash, name);
222        }
223
224      }
225
226      @Override
227      public Base addChild(String name) throws FHIRException {
228        if (name.equals("item")) {
229          this.item = new CodeableReference();
230          return this.item;
231        }
232        else if (name.equals("basis")) {
233          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.finding.basis");
234        }
235        else
236          return super.addChild(name);
237      }
238
239      public ClinicalImpressionFindingComponent copy() {
240        ClinicalImpressionFindingComponent dst = new ClinicalImpressionFindingComponent();
241        copyValues(dst);
242        return dst;
243      }
244
245      public void copyValues(ClinicalImpressionFindingComponent dst) {
246        super.copyValues(dst);
247        dst.item = item == null ? null : item.copy();
248        dst.basis = basis == null ? null : basis.copy();
249      }
250
251      @Override
252      public boolean equalsDeep(Base other_) {
253        if (!super.equalsDeep(other_))
254          return false;
255        if (!(other_ instanceof ClinicalImpressionFindingComponent))
256          return false;
257        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other_;
258        return compareDeep(item, o.item, true) && compareDeep(basis, o.basis, true);
259      }
260
261      @Override
262      public boolean equalsShallow(Base other_) {
263        if (!super.equalsShallow(other_))
264          return false;
265        if (!(other_ instanceof ClinicalImpressionFindingComponent))
266          return false;
267        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other_;
268        return compareValues(basis, o.basis, true);
269      }
270
271      public boolean isEmpty() {
272        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, basis);
273      }
274
275  public String fhirType() {
276    return "ClinicalImpression.finding";
277
278  }
279
280  }
281
282    /**
283     * Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
284     */
285    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
286    @Description(shortDefinition="Business identifier", formalDefinition="Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
287    protected List<Identifier> identifier;
288
289    /**
290     * Identifies the workflow status of the assessment.
291     */
292    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
293    @Description(shortDefinition="preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", formalDefinition="Identifies the workflow status of the assessment." )
294    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/event-status")
295    protected Enumeration<EventStatus> status;
296
297    /**
298     * Captures the reason for the current state of the ClinicalImpression.
299     */
300    @Child(name = "statusReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
301    @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current state of the ClinicalImpression." )
302    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinicalimpression-status-reason")
303    protected CodeableConcept statusReason;
304
305    /**
306     * A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.
307     */
308    @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
309    @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it." )
310    protected StringType description;
311
312    /**
313     * The patient or group of individuals assessed as part of this record.
314     */
315    @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=1, max=1, modifier=false, summary=true)
316    @Description(shortDefinition="Patient or group assessed", formalDefinition="The patient or group of individuals assessed as part of this record." )
317    protected Reference subject;
318
319    /**
320     * The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.
321     */
322    @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=true)
323    @Description(shortDefinition="The Encounter during which this ClinicalImpression was created", formalDefinition="The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated." )
324    protected Reference encounter;
325
326    /**
327     * The point in time or period over which the subject was assessed.
328     */
329    @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
330    @Description(shortDefinition="Time of assessment", formalDefinition="The point in time or period over which the subject was assessed." )
331    protected DataType effective;
332
333    /**
334     * Indicates when the documentation of the assessment was complete.
335     */
336    @Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
337    @Description(shortDefinition="When the assessment was documented", formalDefinition="Indicates when the documentation of the assessment was complete." )
338    protected DateTimeType date;
339
340    /**
341     * The clinician performing the assessment.
342     */
343    @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=true)
344    @Description(shortDefinition="The clinician performing the assessment", formalDefinition="The clinician performing the assessment." )
345    protected Reference performer;
346
347    /**
348     * A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.
349     */
350    @Child(name = "previous", type = {ClinicalImpression.class}, order=9, min=0, max=1, modifier=false, summary=false)
351    @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." )
352    protected Reference previous;
353
354    /**
355     * A list of the relevant problems/conditions for a patient.
356     */
357    @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
358    @Description(shortDefinition="Relevant impressions of patient state", formalDefinition="A list of the relevant problems/conditions for a patient." )
359    protected List<Reference> problem;
360
361    /**
362     * Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change.
363     */
364    @Child(name = "changePattern", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=false)
365    @Description(shortDefinition="Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change", formalDefinition="Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change." )
366    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinicalimpression-change-pattern")
367    protected CodeableConcept changePattern;
368
369    /**
370     * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
371     */
372    @Child(name = "protocol", type = {UriType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
373    @Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." )
374    protected List<UriType> protocol;
375
376    /**
377     * A text summary of the investigations and the diagnosis.
378     */
379    @Child(name = "summary", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
380    @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." )
381    protected StringType summary;
382
383    /**
384     * Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.
385     */
386    @Child(name = "finding", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
387    @Description(shortDefinition="Possible or likely findings and diagnoses", formalDefinition="Specific findings or diagnoses that were considered likely or relevant to ongoing treatment." )
388    protected List<ClinicalImpressionFindingComponent> finding;
389
390    /**
391     * Estimate of likely outcome.
392     */
393    @Child(name = "prognosisCodeableConcept", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
394    @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." )
395    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis")
396    protected List<CodeableConcept> prognosisCodeableConcept;
397
398    /**
399     * RiskAssessment expressing likely outcome.
400     */
401    @Child(name = "prognosisReference", type = {RiskAssessment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
402    @Description(shortDefinition="RiskAssessment expressing likely outcome", formalDefinition="RiskAssessment expressing likely outcome." )
403    protected List<Reference> prognosisReference;
404
405    /**
406     * Information supporting the clinical impression, which can contain investigation results.
407     */
408    @Child(name = "supportingInfo", type = {Reference.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
409    @Description(shortDefinition="Information supporting the clinical impression", formalDefinition="Information supporting the clinical impression, which can contain investigation results." )
410    protected List<Reference> supportingInfo;
411
412    /**
413     * Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.
414     */
415    @Child(name = "note", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
416    @Description(shortDefinition="Comments made about the ClinicalImpression", formalDefinition="Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear." )
417    protected List<Annotation> note;
418
419    private static final long serialVersionUID = -1360437701L;
420
421  /**
422   * Constructor
423   */
424    public ClinicalImpression() {
425      super();
426    }
427
428  /**
429   * Constructor
430   */
431    public ClinicalImpression(EventStatus status, Reference subject) {
432      super();
433      this.setStatus(status);
434      this.setSubject(subject);
435    }
436
437    /**
438     * @return {@link #identifier} (Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
439     */
440    public List<Identifier> getIdentifier() { 
441      if (this.identifier == null)
442        this.identifier = new ArrayList<Identifier>();
443      return this.identifier;
444    }
445
446    /**
447     * @return Returns a reference to <code>this</code> for easy method chaining
448     */
449    public ClinicalImpression setIdentifier(List<Identifier> theIdentifier) { 
450      this.identifier = theIdentifier;
451      return this;
452    }
453
454    public boolean hasIdentifier() { 
455      if (this.identifier == null)
456        return false;
457      for (Identifier item : this.identifier)
458        if (!item.isEmpty())
459          return true;
460      return false;
461    }
462
463    public Identifier addIdentifier() { //3
464      Identifier t = new Identifier();
465      if (this.identifier == null)
466        this.identifier = new ArrayList<Identifier>();
467      this.identifier.add(t);
468      return t;
469    }
470
471    public ClinicalImpression addIdentifier(Identifier t) { //3
472      if (t == null)
473        return this;
474      if (this.identifier == null)
475        this.identifier = new ArrayList<Identifier>();
476      this.identifier.add(t);
477      return this;
478    }
479
480    /**
481     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
482     */
483    public Identifier getIdentifierFirstRep() { 
484      if (getIdentifier().isEmpty()) {
485        addIdentifier();
486      }
487      return getIdentifier().get(0);
488    }
489
490    /**
491     * @return {@link #status} (Identifies the workflow status of the assessment.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
492     */
493    public Enumeration<EventStatus> getStatusElement() { 
494      if (this.status == null)
495        if (Configuration.errorOnAutoCreate())
496          throw new Error("Attempt to auto-create ClinicalImpression.status");
497        else if (Configuration.doAutoCreate())
498          this.status = new Enumeration<EventStatus>(new EventStatusEnumFactory()); // bb
499      return this.status;
500    }
501
502    public boolean hasStatusElement() { 
503      return this.status != null && !this.status.isEmpty();
504    }
505
506    public boolean hasStatus() { 
507      return this.status != null && !this.status.isEmpty();
508    }
509
510    /**
511     * @param value {@link #status} (Identifies the workflow status of the assessment.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
512     */
513    public ClinicalImpression setStatusElement(Enumeration<EventStatus> value) { 
514      this.status = value;
515      return this;
516    }
517
518    /**
519     * @return Identifies the workflow status of the assessment.
520     */
521    public EventStatus getStatus() { 
522      return this.status == null ? null : this.status.getValue();
523    }
524
525    /**
526     * @param value Identifies the workflow status of the assessment.
527     */
528    public ClinicalImpression setStatus(EventStatus value) { 
529        if (this.status == null)
530          this.status = new Enumeration<EventStatus>(new EventStatusEnumFactory());
531        this.status.setValue(value);
532      return this;
533    }
534
535    /**
536     * @return {@link #statusReason} (Captures the reason for the current state of the ClinicalImpression.)
537     */
538    public CodeableConcept getStatusReason() { 
539      if (this.statusReason == null)
540        if (Configuration.errorOnAutoCreate())
541          throw new Error("Attempt to auto-create ClinicalImpression.statusReason");
542        else if (Configuration.doAutoCreate())
543          this.statusReason = new CodeableConcept(); // cc
544      return this.statusReason;
545    }
546
547    public boolean hasStatusReason() { 
548      return this.statusReason != null && !this.statusReason.isEmpty();
549    }
550
551    /**
552     * @param value {@link #statusReason} (Captures the reason for the current state of the ClinicalImpression.)
553     */
554    public ClinicalImpression setStatusReason(CodeableConcept value) { 
555      this.statusReason = value;
556      return this;
557    }
558
559    /**
560     * @return {@link #description} (A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
561     */
562    public StringType getDescriptionElement() { 
563      if (this.description == null)
564        if (Configuration.errorOnAutoCreate())
565          throw new Error("Attempt to auto-create ClinicalImpression.description");
566        else if (Configuration.doAutoCreate())
567          this.description = new StringType(); // bb
568      return this.description;
569    }
570
571    public boolean hasDescriptionElement() { 
572      return this.description != null && !this.description.isEmpty();
573    }
574
575    public boolean hasDescription() { 
576      return this.description != null && !this.description.isEmpty();
577    }
578
579    /**
580     * @param value {@link #description} (A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
581     */
582    public ClinicalImpression setDescriptionElement(StringType value) { 
583      this.description = value;
584      return this;
585    }
586
587    /**
588     * @return A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.
589     */
590    public String getDescription() { 
591      return this.description == null ? null : this.description.getValue();
592    }
593
594    /**
595     * @param value A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.
596     */
597    public ClinicalImpression setDescription(String value) { 
598      if (Utilities.noString(value))
599        this.description = null;
600      else {
601        if (this.description == null)
602          this.description = new StringType();
603        this.description.setValue(value);
604      }
605      return this;
606    }
607
608    /**
609     * @return {@link #subject} (The patient or group of individuals assessed as part of this record.)
610     */
611    public Reference getSubject() { 
612      if (this.subject == null)
613        if (Configuration.errorOnAutoCreate())
614          throw new Error("Attempt to auto-create ClinicalImpression.subject");
615        else if (Configuration.doAutoCreate())
616          this.subject = new Reference(); // cc
617      return this.subject;
618    }
619
620    public boolean hasSubject() { 
621      return this.subject != null && !this.subject.isEmpty();
622    }
623
624    /**
625     * @param value {@link #subject} (The patient or group of individuals assessed as part of this record.)
626     */
627    public ClinicalImpression setSubject(Reference value) { 
628      this.subject = value;
629      return this;
630    }
631
632    /**
633     * @return {@link #encounter} (The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.)
634     */
635    public Reference getEncounter() { 
636      if (this.encounter == null)
637        if (Configuration.errorOnAutoCreate())
638          throw new Error("Attempt to auto-create ClinicalImpression.encounter");
639        else if (Configuration.doAutoCreate())
640          this.encounter = new Reference(); // cc
641      return this.encounter;
642    }
643
644    public boolean hasEncounter() { 
645      return this.encounter != null && !this.encounter.isEmpty();
646    }
647
648    /**
649     * @param value {@link #encounter} (The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.)
650     */
651    public ClinicalImpression setEncounter(Reference value) { 
652      this.encounter = value;
653      return this;
654    }
655
656    /**
657     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
658     */
659    public DataType getEffective() { 
660      return this.effective;
661    }
662
663    /**
664     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
665     */
666    public DateTimeType getEffectiveDateTimeType() throws FHIRException { 
667      if (this.effective == null)
668        this.effective = new DateTimeType();
669      if (!(this.effective instanceof DateTimeType))
670        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
671      return (DateTimeType) this.effective;
672    }
673
674    public boolean hasEffectiveDateTimeType() { 
675      return this != null && this.effective instanceof DateTimeType;
676    }
677
678    /**
679     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
680     */
681    public Period getEffectivePeriod() throws FHIRException { 
682      if (this.effective == null)
683        this.effective = new Period();
684      if (!(this.effective instanceof Period))
685        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
686      return (Period) this.effective;
687    }
688
689    public boolean hasEffectivePeriod() { 
690      return this != null && this.effective instanceof Period;
691    }
692
693    public boolean hasEffective() { 
694      return this.effective != null && !this.effective.isEmpty();
695    }
696
697    /**
698     * @param value {@link #effective} (The point in time or period over which the subject was assessed.)
699     */
700    public ClinicalImpression setEffective(DataType value) { 
701      if (value != null && !(value instanceof DateTimeType || value instanceof Period))
702        throw new Error("Not the right type for ClinicalImpression.effective[x]: "+value.fhirType());
703      this.effective = value;
704      return this;
705    }
706
707    /**
708     * @return {@link #date} (Indicates when the documentation of the assessment was complete.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
709     */
710    public DateTimeType getDateElement() { 
711      if (this.date == null)
712        if (Configuration.errorOnAutoCreate())
713          throw new Error("Attempt to auto-create ClinicalImpression.date");
714        else if (Configuration.doAutoCreate())
715          this.date = new DateTimeType(); // bb
716      return this.date;
717    }
718
719    public boolean hasDateElement() { 
720      return this.date != null && !this.date.isEmpty();
721    }
722
723    public boolean hasDate() { 
724      return this.date != null && !this.date.isEmpty();
725    }
726
727    /**
728     * @param value {@link #date} (Indicates when the documentation of the assessment was complete.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
729     */
730    public ClinicalImpression setDateElement(DateTimeType value) { 
731      this.date = value;
732      return this;
733    }
734
735    /**
736     * @return Indicates when the documentation of the assessment was complete.
737     */
738    public Date getDate() { 
739      return this.date == null ? null : this.date.getValue();
740    }
741
742    /**
743     * @param value Indicates when the documentation of the assessment was complete.
744     */
745    public ClinicalImpression setDate(Date value) { 
746      if (value == null)
747        this.date = null;
748      else {
749        if (this.date == null)
750          this.date = new DateTimeType();
751        this.date.setValue(value);
752      }
753      return this;
754    }
755
756    /**
757     * @return {@link #performer} (The clinician performing the assessment.)
758     */
759    public Reference getPerformer() { 
760      if (this.performer == null)
761        if (Configuration.errorOnAutoCreate())
762          throw new Error("Attempt to auto-create ClinicalImpression.performer");
763        else if (Configuration.doAutoCreate())
764          this.performer = new Reference(); // cc
765      return this.performer;
766    }
767
768    public boolean hasPerformer() { 
769      return this.performer != null && !this.performer.isEmpty();
770    }
771
772    /**
773     * @param value {@link #performer} (The clinician performing the assessment.)
774     */
775    public ClinicalImpression setPerformer(Reference value) { 
776      this.performer = value;
777      return this;
778    }
779
780    /**
781     * @return {@link #previous} (A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.)
782     */
783    public Reference getPrevious() { 
784      if (this.previous == null)
785        if (Configuration.errorOnAutoCreate())
786          throw new Error("Attempt to auto-create ClinicalImpression.previous");
787        else if (Configuration.doAutoCreate())
788          this.previous = new Reference(); // cc
789      return this.previous;
790    }
791
792    public boolean hasPrevious() { 
793      return this.previous != null && !this.previous.isEmpty();
794    }
795
796    /**
797     * @param value {@link #previous} (A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.)
798     */
799    public ClinicalImpression setPrevious(Reference value) { 
800      this.previous = value;
801      return this;
802    }
803
804    /**
805     * @return {@link #problem} (A list of the relevant problems/conditions for a patient.)
806     */
807    public List<Reference> getProblem() { 
808      if (this.problem == null)
809        this.problem = new ArrayList<Reference>();
810      return this.problem;
811    }
812
813    /**
814     * @return Returns a reference to <code>this</code> for easy method chaining
815     */
816    public ClinicalImpression setProblem(List<Reference> theProblem) { 
817      this.problem = theProblem;
818      return this;
819    }
820
821    public boolean hasProblem() { 
822      if (this.problem == null)
823        return false;
824      for (Reference item : this.problem)
825        if (!item.isEmpty())
826          return true;
827      return false;
828    }
829
830    public Reference addProblem() { //3
831      Reference t = new Reference();
832      if (this.problem == null)
833        this.problem = new ArrayList<Reference>();
834      this.problem.add(t);
835      return t;
836    }
837
838    public ClinicalImpression addProblem(Reference t) { //3
839      if (t == null)
840        return this;
841      if (this.problem == null)
842        this.problem = new ArrayList<Reference>();
843      this.problem.add(t);
844      return this;
845    }
846
847    /**
848     * @return The first repetition of repeating field {@link #problem}, creating it if it does not already exist {3}
849     */
850    public Reference getProblemFirstRep() { 
851      if (getProblem().isEmpty()) {
852        addProblem();
853      }
854      return getProblem().get(0);
855    }
856
857    /**
858     * @return {@link #changePattern} (Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change.)
859     */
860    public CodeableConcept getChangePattern() { 
861      if (this.changePattern == null)
862        if (Configuration.errorOnAutoCreate())
863          throw new Error("Attempt to auto-create ClinicalImpression.changePattern");
864        else if (Configuration.doAutoCreate())
865          this.changePattern = new CodeableConcept(); // cc
866      return this.changePattern;
867    }
868
869    public boolean hasChangePattern() { 
870      return this.changePattern != null && !this.changePattern.isEmpty();
871    }
872
873    /**
874     * @param value {@link #changePattern} (Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change.)
875     */
876    public ClinicalImpression setChangePattern(CodeableConcept value) { 
877      this.changePattern = value;
878      return this;
879    }
880
881    /**
882     * @return {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.)
883     */
884    public List<UriType> getProtocol() { 
885      if (this.protocol == null)
886        this.protocol = new ArrayList<UriType>();
887      return this.protocol;
888    }
889
890    /**
891     * @return Returns a reference to <code>this</code> for easy method chaining
892     */
893    public ClinicalImpression setProtocol(List<UriType> theProtocol) { 
894      this.protocol = theProtocol;
895      return this;
896    }
897
898    public boolean hasProtocol() { 
899      if (this.protocol == null)
900        return false;
901      for (UriType item : this.protocol)
902        if (!item.isEmpty())
903          return true;
904      return false;
905    }
906
907    /**
908     * @return {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.)
909     */
910    public UriType addProtocolElement() {//2 
911      UriType t = new UriType();
912      if (this.protocol == null)
913        this.protocol = new ArrayList<UriType>();
914      this.protocol.add(t);
915      return t;
916    }
917
918    /**
919     * @param value {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.)
920     */
921    public ClinicalImpression addProtocol(String value) { //1
922      UriType t = new UriType();
923      t.setValue(value);
924      if (this.protocol == null)
925        this.protocol = new ArrayList<UriType>();
926      this.protocol.add(t);
927      return this;
928    }
929
930    /**
931     * @param value {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.)
932     */
933    public boolean hasProtocol(String value) { 
934      if (this.protocol == null)
935        return false;
936      for (UriType v : this.protocol)
937        if (v.getValue().equals(value)) // uri
938          return true;
939      return false;
940    }
941
942    /**
943     * @return {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value
944     */
945    public StringType getSummaryElement() { 
946      if (this.summary == null)
947        if (Configuration.errorOnAutoCreate())
948          throw new Error("Attempt to auto-create ClinicalImpression.summary");
949        else if (Configuration.doAutoCreate())
950          this.summary = new StringType(); // bb
951      return this.summary;
952    }
953
954    public boolean hasSummaryElement() { 
955      return this.summary != null && !this.summary.isEmpty();
956    }
957
958    public boolean hasSummary() { 
959      return this.summary != null && !this.summary.isEmpty();
960    }
961
962    /**
963     * @param value {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value
964     */
965    public ClinicalImpression setSummaryElement(StringType value) { 
966      this.summary = value;
967      return this;
968    }
969
970    /**
971     * @return A text summary of the investigations and the diagnosis.
972     */
973    public String getSummary() { 
974      return this.summary == null ? null : this.summary.getValue();
975    }
976
977    /**
978     * @param value A text summary of the investigations and the diagnosis.
979     */
980    public ClinicalImpression setSummary(String value) { 
981      if (Utilities.noString(value))
982        this.summary = null;
983      else {
984        if (this.summary == null)
985          this.summary = new StringType();
986        this.summary.setValue(value);
987      }
988      return this;
989    }
990
991    /**
992     * @return {@link #finding} (Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.)
993     */
994    public List<ClinicalImpressionFindingComponent> getFinding() { 
995      if (this.finding == null)
996        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
997      return this.finding;
998    }
999
1000    /**
1001     * @return Returns a reference to <code>this</code> for easy method chaining
1002     */
1003    public ClinicalImpression setFinding(List<ClinicalImpressionFindingComponent> theFinding) { 
1004      this.finding = theFinding;
1005      return this;
1006    }
1007
1008    public boolean hasFinding() { 
1009      if (this.finding == null)
1010        return false;
1011      for (ClinicalImpressionFindingComponent item : this.finding)
1012        if (!item.isEmpty())
1013          return true;
1014      return false;
1015    }
1016
1017    public ClinicalImpressionFindingComponent addFinding() { //3
1018      ClinicalImpressionFindingComponent t = new ClinicalImpressionFindingComponent();
1019      if (this.finding == null)
1020        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1021      this.finding.add(t);
1022      return t;
1023    }
1024
1025    public ClinicalImpression addFinding(ClinicalImpressionFindingComponent t) { //3
1026      if (t == null)
1027        return this;
1028      if (this.finding == null)
1029        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1030      this.finding.add(t);
1031      return this;
1032    }
1033
1034    /**
1035     * @return The first repetition of repeating field {@link #finding}, creating it if it does not already exist {3}
1036     */
1037    public ClinicalImpressionFindingComponent getFindingFirstRep() { 
1038      if (getFinding().isEmpty()) {
1039        addFinding();
1040      }
1041      return getFinding().get(0);
1042    }
1043
1044    /**
1045     * @return {@link #prognosisCodeableConcept} (Estimate of likely outcome.)
1046     */
1047    public List<CodeableConcept> getPrognosisCodeableConcept() { 
1048      if (this.prognosisCodeableConcept == null)
1049        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1050      return this.prognosisCodeableConcept;
1051    }
1052
1053    /**
1054     * @return Returns a reference to <code>this</code> for easy method chaining
1055     */
1056    public ClinicalImpression setPrognosisCodeableConcept(List<CodeableConcept> thePrognosisCodeableConcept) { 
1057      this.prognosisCodeableConcept = thePrognosisCodeableConcept;
1058      return this;
1059    }
1060
1061    public boolean hasPrognosisCodeableConcept() { 
1062      if (this.prognosisCodeableConcept == null)
1063        return false;
1064      for (CodeableConcept item : this.prognosisCodeableConcept)
1065        if (!item.isEmpty())
1066          return true;
1067      return false;
1068    }
1069
1070    public CodeableConcept addPrognosisCodeableConcept() { //3
1071      CodeableConcept t = new CodeableConcept();
1072      if (this.prognosisCodeableConcept == null)
1073        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1074      this.prognosisCodeableConcept.add(t);
1075      return t;
1076    }
1077
1078    public ClinicalImpression addPrognosisCodeableConcept(CodeableConcept t) { //3
1079      if (t == null)
1080        return this;
1081      if (this.prognosisCodeableConcept == null)
1082        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1083      this.prognosisCodeableConcept.add(t);
1084      return this;
1085    }
1086
1087    /**
1088     * @return The first repetition of repeating field {@link #prognosisCodeableConcept}, creating it if it does not already exist {3}
1089     */
1090    public CodeableConcept getPrognosisCodeableConceptFirstRep() { 
1091      if (getPrognosisCodeableConcept().isEmpty()) {
1092        addPrognosisCodeableConcept();
1093      }
1094      return getPrognosisCodeableConcept().get(0);
1095    }
1096
1097    /**
1098     * @return {@link #prognosisReference} (RiskAssessment expressing likely outcome.)
1099     */
1100    public List<Reference> getPrognosisReference() { 
1101      if (this.prognosisReference == null)
1102        this.prognosisReference = new ArrayList<Reference>();
1103      return this.prognosisReference;
1104    }
1105
1106    /**
1107     * @return Returns a reference to <code>this</code> for easy method chaining
1108     */
1109    public ClinicalImpression setPrognosisReference(List<Reference> thePrognosisReference) { 
1110      this.prognosisReference = thePrognosisReference;
1111      return this;
1112    }
1113
1114    public boolean hasPrognosisReference() { 
1115      if (this.prognosisReference == null)
1116        return false;
1117      for (Reference item : this.prognosisReference)
1118        if (!item.isEmpty())
1119          return true;
1120      return false;
1121    }
1122
1123    public Reference addPrognosisReference() { //3
1124      Reference t = new Reference();
1125      if (this.prognosisReference == null)
1126        this.prognosisReference = new ArrayList<Reference>();
1127      this.prognosisReference.add(t);
1128      return t;
1129    }
1130
1131    public ClinicalImpression addPrognosisReference(Reference t) { //3
1132      if (t == null)
1133        return this;
1134      if (this.prognosisReference == null)
1135        this.prognosisReference = new ArrayList<Reference>();
1136      this.prognosisReference.add(t);
1137      return this;
1138    }
1139
1140    /**
1141     * @return The first repetition of repeating field {@link #prognosisReference}, creating it if it does not already exist {3}
1142     */
1143    public Reference getPrognosisReferenceFirstRep() { 
1144      if (getPrognosisReference().isEmpty()) {
1145        addPrognosisReference();
1146      }
1147      return getPrognosisReference().get(0);
1148    }
1149
1150    /**
1151     * @return {@link #supportingInfo} (Information supporting the clinical impression, which can contain investigation results.)
1152     */
1153    public List<Reference> getSupportingInfo() { 
1154      if (this.supportingInfo == null)
1155        this.supportingInfo = new ArrayList<Reference>();
1156      return this.supportingInfo;
1157    }
1158
1159    /**
1160     * @return Returns a reference to <code>this</code> for easy method chaining
1161     */
1162    public ClinicalImpression setSupportingInfo(List<Reference> theSupportingInfo) { 
1163      this.supportingInfo = theSupportingInfo;
1164      return this;
1165    }
1166
1167    public boolean hasSupportingInfo() { 
1168      if (this.supportingInfo == null)
1169        return false;
1170      for (Reference item : this.supportingInfo)
1171        if (!item.isEmpty())
1172          return true;
1173      return false;
1174    }
1175
1176    public Reference addSupportingInfo() { //3
1177      Reference t = new Reference();
1178      if (this.supportingInfo == null)
1179        this.supportingInfo = new ArrayList<Reference>();
1180      this.supportingInfo.add(t);
1181      return t;
1182    }
1183
1184    public ClinicalImpression addSupportingInfo(Reference t) { //3
1185      if (t == null)
1186        return this;
1187      if (this.supportingInfo == null)
1188        this.supportingInfo = new ArrayList<Reference>();
1189      this.supportingInfo.add(t);
1190      return this;
1191    }
1192
1193    /**
1194     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3}
1195     */
1196    public Reference getSupportingInfoFirstRep() { 
1197      if (getSupportingInfo().isEmpty()) {
1198        addSupportingInfo();
1199      }
1200      return getSupportingInfo().get(0);
1201    }
1202
1203    /**
1204     * @return {@link #note} (Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.)
1205     */
1206    public List<Annotation> getNote() { 
1207      if (this.note == null)
1208        this.note = new ArrayList<Annotation>();
1209      return this.note;
1210    }
1211
1212    /**
1213     * @return Returns a reference to <code>this</code> for easy method chaining
1214     */
1215    public ClinicalImpression setNote(List<Annotation> theNote) { 
1216      this.note = theNote;
1217      return this;
1218    }
1219
1220    public boolean hasNote() { 
1221      if (this.note == null)
1222        return false;
1223      for (Annotation item : this.note)
1224        if (!item.isEmpty())
1225          return true;
1226      return false;
1227    }
1228
1229    public Annotation addNote() { //3
1230      Annotation t = new Annotation();
1231      if (this.note == null)
1232        this.note = new ArrayList<Annotation>();
1233      this.note.add(t);
1234      return t;
1235    }
1236
1237    public ClinicalImpression addNote(Annotation t) { //3
1238      if (t == null)
1239        return this;
1240      if (this.note == null)
1241        this.note = new ArrayList<Annotation>();
1242      this.note.add(t);
1243      return this;
1244    }
1245
1246    /**
1247     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1248     */
1249    public Annotation getNoteFirstRep() { 
1250      if (getNote().isEmpty()) {
1251        addNote();
1252      }
1253      return getNote().get(0);
1254    }
1255
1256      protected void listChildren(List<Property> children) {
1257        super.listChildren(children);
1258        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1259        children.add(new Property("status", "code", "Identifies the workflow status of the assessment.", 0, 1, status));
1260        children.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the ClinicalImpression.", 0, 1, statusReason));
1261        children.add(new Property("description", "string", "A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.", 0, 1, description));
1262        children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group of individuals assessed as part of this record.", 0, 1, subject));
1263        children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1264        children.add(new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective));
1265        children.add(new Property("date", "dateTime", "Indicates when the documentation of the assessment was complete.", 0, 1, date));
1266        children.add(new Property("performer", "Reference(Practitioner|PractitionerRole)", "The clinician performing the assessment.", 0, 1, performer));
1267        children.add(new Property("previous", "Reference(ClinicalImpression)", "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", 0, 1, previous));
1268        children.add(new Property("problem", "Reference(Condition|AllergyIntolerance)", "A list of the relevant problems/conditions for a patient.", 0, java.lang.Integer.MAX_VALUE, problem));
1269        children.add(new Property("changePattern", "CodeableConcept", "Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change.", 0, 1, changePattern));
1270        children.add(new Property("protocol", "uri", "Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.", 0, java.lang.Integer.MAX_VALUE, protocol));
1271        children.add(new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, 1, summary));
1272        children.add(new Property("finding", "", "Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.", 0, java.lang.Integer.MAX_VALUE, finding));
1273        children.add(new Property("prognosisCodeableConcept", "CodeableConcept", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisCodeableConcept));
1274        children.add(new Property("prognosisReference", "Reference(RiskAssessment)", "RiskAssessment expressing likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisReference));
1275        children.add(new Property("supportingInfo", "Reference(Any)", "Information supporting the clinical impression, which can contain investigation results.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
1276        children.add(new Property("note", "Annotation", "Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.", 0, java.lang.Integer.MAX_VALUE, note));
1277      }
1278
1279      @Override
1280      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1281        switch (_hash) {
1282        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1283        case -892481550: /*status*/  return new Property("status", "code", "Identifies the workflow status of the assessment.", 0, 1, status);
1284        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the ClinicalImpression.", 0, 1, statusReason);
1285        case -1724546052: /*description*/  return new Property("description", "string", "A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.", 0, 1, description);
1286        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "The patient or group of individuals assessed as part of this record.", 0, 1, subject);
1287        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1288        case 247104889: /*effective[x]*/  return new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1289        case -1468651097: /*effective*/  return new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1290        case -275306910: /*effectiveDateTime*/  return new Property("effective[x]", "dateTime", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1291        case -403934648: /*effectivePeriod*/  return new Property("effective[x]", "Period", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1292        case 3076014: /*date*/  return new Property("date", "dateTime", "Indicates when the documentation of the assessment was complete.", 0, 1, date);
1293        case 481140686: /*performer*/  return new Property("performer", "Reference(Practitioner|PractitionerRole)", "The clinician performing the assessment.", 0, 1, performer);
1294        case -1273775369: /*previous*/  return new Property("previous", "Reference(ClinicalImpression)", "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", 0, 1, previous);
1295        case -309542241: /*problem*/  return new Property("problem", "Reference(Condition|AllergyIntolerance)", "A list of the relevant problems/conditions for a patient.", 0, java.lang.Integer.MAX_VALUE, problem);
1296        case -1770133056: /*changePattern*/  return new Property("changePattern", "CodeableConcept", "Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change.", 0, 1, changePattern);
1297        case -989163880: /*protocol*/  return new Property("protocol", "uri", "Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.", 0, java.lang.Integer.MAX_VALUE, protocol);
1298        case -1857640538: /*summary*/  return new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, 1, summary);
1299        case -853173367: /*finding*/  return new Property("finding", "", "Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.", 0, java.lang.Integer.MAX_VALUE, finding);
1300        case -676337953: /*prognosisCodeableConcept*/  return new Property("prognosisCodeableConcept", "CodeableConcept", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisCodeableConcept);
1301        case -587137783: /*prognosisReference*/  return new Property("prognosisReference", "Reference(RiskAssessment)", "RiskAssessment expressing likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisReference);
1302        case 1922406657: /*supportingInfo*/  return new Property("supportingInfo", "Reference(Any)", "Information supporting the clinical impression, which can contain investigation results.", 0, java.lang.Integer.MAX_VALUE, supportingInfo);
1303        case 3387378: /*note*/  return new Property("note", "Annotation", "Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.", 0, java.lang.Integer.MAX_VALUE, note);
1304        default: return super.getNamedProperty(_hash, _name, _checkValid);
1305        }
1306
1307      }
1308
1309      @Override
1310      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1311        switch (hash) {
1312        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1313        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EventStatus>
1314        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
1315        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1316        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1317        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1318        case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // DataType
1319        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1320        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
1321        case -1273775369: /*previous*/ return this.previous == null ? new Base[0] : new Base[] {this.previous}; // Reference
1322        case -309542241: /*problem*/ return this.problem == null ? new Base[0] : this.problem.toArray(new Base[this.problem.size()]); // Reference
1323        case -1770133056: /*changePattern*/ return this.changePattern == null ? new Base[0] : new Base[] {this.changePattern}; // CodeableConcept
1324        case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : this.protocol.toArray(new Base[this.protocol.size()]); // UriType
1325        case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // StringType
1326        case -853173367: /*finding*/ return this.finding == null ? new Base[0] : this.finding.toArray(new Base[this.finding.size()]); // ClinicalImpressionFindingComponent
1327        case -676337953: /*prognosisCodeableConcept*/ return this.prognosisCodeableConcept == null ? new Base[0] : this.prognosisCodeableConcept.toArray(new Base[this.prognosisCodeableConcept.size()]); // CodeableConcept
1328        case -587137783: /*prognosisReference*/ return this.prognosisReference == null ? new Base[0] : this.prognosisReference.toArray(new Base[this.prognosisReference.size()]); // Reference
1329        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference
1330        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1331        default: return super.getProperty(hash, name, checkValid);
1332        }
1333
1334      }
1335
1336      @Override
1337      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1338        switch (hash) {
1339        case -1618432855: // identifier
1340          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1341          return value;
1342        case -892481550: // status
1343          value = new EventStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1344          this.status = (Enumeration) value; // Enumeration<EventStatus>
1345          return value;
1346        case 2051346646: // statusReason
1347          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1348          return value;
1349        case -1724546052: // description
1350          this.description = TypeConvertor.castToString(value); // StringType
1351          return value;
1352        case -1867885268: // subject
1353          this.subject = TypeConvertor.castToReference(value); // Reference
1354          return value;
1355        case 1524132147: // encounter
1356          this.encounter = TypeConvertor.castToReference(value); // Reference
1357          return value;
1358        case -1468651097: // effective
1359          this.effective = TypeConvertor.castToType(value); // DataType
1360          return value;
1361        case 3076014: // date
1362          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1363          return value;
1364        case 481140686: // performer
1365          this.performer = TypeConvertor.castToReference(value); // Reference
1366          return value;
1367        case -1273775369: // previous
1368          this.previous = TypeConvertor.castToReference(value); // Reference
1369          return value;
1370        case -309542241: // problem
1371          this.getProblem().add(TypeConvertor.castToReference(value)); // Reference
1372          return value;
1373        case -1770133056: // changePattern
1374          this.changePattern = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1375          return value;
1376        case -989163880: // protocol
1377          this.getProtocol().add(TypeConvertor.castToUri(value)); // UriType
1378          return value;
1379        case -1857640538: // summary
1380          this.summary = TypeConvertor.castToString(value); // StringType
1381          return value;
1382        case -853173367: // finding
1383          this.getFinding().add((ClinicalImpressionFindingComponent) value); // ClinicalImpressionFindingComponent
1384          return value;
1385        case -676337953: // prognosisCodeableConcept
1386          this.getPrognosisCodeableConcept().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1387          return value;
1388        case -587137783: // prognosisReference
1389          this.getPrognosisReference().add(TypeConvertor.castToReference(value)); // Reference
1390          return value;
1391        case 1922406657: // supportingInfo
1392          this.getSupportingInfo().add(TypeConvertor.castToReference(value)); // Reference
1393          return value;
1394        case 3387378: // note
1395          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1396          return value;
1397        default: return super.setProperty(hash, name, value);
1398        }
1399
1400      }
1401
1402      @Override
1403      public Base setProperty(String name, Base value) throws FHIRException {
1404        if (name.equals("identifier")) {
1405          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1406        } else if (name.equals("status")) {
1407          value = new EventStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1408          this.status = (Enumeration) value; // Enumeration<EventStatus>
1409        } else if (name.equals("statusReason")) {
1410          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1411        } else if (name.equals("description")) {
1412          this.description = TypeConvertor.castToString(value); // StringType
1413        } else if (name.equals("subject")) {
1414          this.subject = TypeConvertor.castToReference(value); // Reference
1415        } else if (name.equals("encounter")) {
1416          this.encounter = TypeConvertor.castToReference(value); // Reference
1417        } else if (name.equals("effective[x]")) {
1418          this.effective = TypeConvertor.castToType(value); // DataType
1419        } else if (name.equals("date")) {
1420          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1421        } else if (name.equals("performer")) {
1422          this.performer = TypeConvertor.castToReference(value); // Reference
1423        } else if (name.equals("previous")) {
1424          this.previous = TypeConvertor.castToReference(value); // Reference
1425        } else if (name.equals("problem")) {
1426          this.getProblem().add(TypeConvertor.castToReference(value));
1427        } else if (name.equals("changePattern")) {
1428          this.changePattern = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1429        } else if (name.equals("protocol")) {
1430          this.getProtocol().add(TypeConvertor.castToUri(value));
1431        } else if (name.equals("summary")) {
1432          this.summary = TypeConvertor.castToString(value); // StringType
1433        } else if (name.equals("finding")) {
1434          this.getFinding().add((ClinicalImpressionFindingComponent) value);
1435        } else if (name.equals("prognosisCodeableConcept")) {
1436          this.getPrognosisCodeableConcept().add(TypeConvertor.castToCodeableConcept(value));
1437        } else if (name.equals("prognosisReference")) {
1438          this.getPrognosisReference().add(TypeConvertor.castToReference(value));
1439        } else if (name.equals("supportingInfo")) {
1440          this.getSupportingInfo().add(TypeConvertor.castToReference(value));
1441        } else if (name.equals("note")) {
1442          this.getNote().add(TypeConvertor.castToAnnotation(value));
1443        } else
1444          return super.setProperty(name, value);
1445        return value;
1446      }
1447
1448      @Override
1449      public Base makeProperty(int hash, String name) throws FHIRException {
1450        switch (hash) {
1451        case -1618432855:  return addIdentifier(); 
1452        case -892481550:  return getStatusElement();
1453        case 2051346646:  return getStatusReason();
1454        case -1724546052:  return getDescriptionElement();
1455        case -1867885268:  return getSubject();
1456        case 1524132147:  return getEncounter();
1457        case 247104889:  return getEffective();
1458        case -1468651097:  return getEffective();
1459        case 3076014:  return getDateElement();
1460        case 481140686:  return getPerformer();
1461        case -1273775369:  return getPrevious();
1462        case -309542241:  return addProblem(); 
1463        case -1770133056:  return getChangePattern();
1464        case -989163880:  return addProtocolElement();
1465        case -1857640538:  return getSummaryElement();
1466        case -853173367:  return addFinding(); 
1467        case -676337953:  return addPrognosisCodeableConcept(); 
1468        case -587137783:  return addPrognosisReference(); 
1469        case 1922406657:  return addSupportingInfo(); 
1470        case 3387378:  return addNote(); 
1471        default: return super.makeProperty(hash, name);
1472        }
1473
1474      }
1475
1476      @Override
1477      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1478        switch (hash) {
1479        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1480        case -892481550: /*status*/ return new String[] {"code"};
1481        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
1482        case -1724546052: /*description*/ return new String[] {"string"};
1483        case -1867885268: /*subject*/ return new String[] {"Reference"};
1484        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1485        case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"};
1486        case 3076014: /*date*/ return new String[] {"dateTime"};
1487        case 481140686: /*performer*/ return new String[] {"Reference"};
1488        case -1273775369: /*previous*/ return new String[] {"Reference"};
1489        case -309542241: /*problem*/ return new String[] {"Reference"};
1490        case -1770133056: /*changePattern*/ return new String[] {"CodeableConcept"};
1491        case -989163880: /*protocol*/ return new String[] {"uri"};
1492        case -1857640538: /*summary*/ return new String[] {"string"};
1493        case -853173367: /*finding*/ return new String[] {};
1494        case -676337953: /*prognosisCodeableConcept*/ return new String[] {"CodeableConcept"};
1495        case -587137783: /*prognosisReference*/ return new String[] {"Reference"};
1496        case 1922406657: /*supportingInfo*/ return new String[] {"Reference"};
1497        case 3387378: /*note*/ return new String[] {"Annotation"};
1498        default: return super.getTypesForProperty(hash, name);
1499        }
1500
1501      }
1502
1503      @Override
1504      public Base addChild(String name) throws FHIRException {
1505        if (name.equals("identifier")) {
1506          return addIdentifier();
1507        }
1508        else if (name.equals("status")) {
1509          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.status");
1510        }
1511        else if (name.equals("statusReason")) {
1512          this.statusReason = new CodeableConcept();
1513          return this.statusReason;
1514        }
1515        else if (name.equals("description")) {
1516          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.description");
1517        }
1518        else if (name.equals("subject")) {
1519          this.subject = new Reference();
1520          return this.subject;
1521        }
1522        else if (name.equals("encounter")) {
1523          this.encounter = new Reference();
1524          return this.encounter;
1525        }
1526        else if (name.equals("effectiveDateTime")) {
1527          this.effective = new DateTimeType();
1528          return this.effective;
1529        }
1530        else if (name.equals("effectivePeriod")) {
1531          this.effective = new Period();
1532          return this.effective;
1533        }
1534        else if (name.equals("date")) {
1535          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.date");
1536        }
1537        else if (name.equals("performer")) {
1538          this.performer = new Reference();
1539          return this.performer;
1540        }
1541        else if (name.equals("previous")) {
1542          this.previous = new Reference();
1543          return this.previous;
1544        }
1545        else if (name.equals("problem")) {
1546          return addProblem();
1547        }
1548        else if (name.equals("changePattern")) {
1549          this.changePattern = new CodeableConcept();
1550          return this.changePattern;
1551        }
1552        else if (name.equals("protocol")) {
1553          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.protocol");
1554        }
1555        else if (name.equals("summary")) {
1556          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.summary");
1557        }
1558        else if (name.equals("finding")) {
1559          return addFinding();
1560        }
1561        else if (name.equals("prognosisCodeableConcept")) {
1562          return addPrognosisCodeableConcept();
1563        }
1564        else if (name.equals("prognosisReference")) {
1565          return addPrognosisReference();
1566        }
1567        else if (name.equals("supportingInfo")) {
1568          return addSupportingInfo();
1569        }
1570        else if (name.equals("note")) {
1571          return addNote();
1572        }
1573        else
1574          return super.addChild(name);
1575      }
1576
1577  public String fhirType() {
1578    return "ClinicalImpression";
1579
1580  }
1581
1582      public ClinicalImpression copy() {
1583        ClinicalImpression dst = new ClinicalImpression();
1584        copyValues(dst);
1585        return dst;
1586      }
1587
1588      public void copyValues(ClinicalImpression dst) {
1589        super.copyValues(dst);
1590        if (identifier != null) {
1591          dst.identifier = new ArrayList<Identifier>();
1592          for (Identifier i : identifier)
1593            dst.identifier.add(i.copy());
1594        };
1595        dst.status = status == null ? null : status.copy();
1596        dst.statusReason = statusReason == null ? null : statusReason.copy();
1597        dst.description = description == null ? null : description.copy();
1598        dst.subject = subject == null ? null : subject.copy();
1599        dst.encounter = encounter == null ? null : encounter.copy();
1600        dst.effective = effective == null ? null : effective.copy();
1601        dst.date = date == null ? null : date.copy();
1602        dst.performer = performer == null ? null : performer.copy();
1603        dst.previous = previous == null ? null : previous.copy();
1604        if (problem != null) {
1605          dst.problem = new ArrayList<Reference>();
1606          for (Reference i : problem)
1607            dst.problem.add(i.copy());
1608        };
1609        dst.changePattern = changePattern == null ? null : changePattern.copy();
1610        if (protocol != null) {
1611          dst.protocol = new ArrayList<UriType>();
1612          for (UriType i : protocol)
1613            dst.protocol.add(i.copy());
1614        };
1615        dst.summary = summary == null ? null : summary.copy();
1616        if (finding != null) {
1617          dst.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1618          for (ClinicalImpressionFindingComponent i : finding)
1619            dst.finding.add(i.copy());
1620        };
1621        if (prognosisCodeableConcept != null) {
1622          dst.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1623          for (CodeableConcept i : prognosisCodeableConcept)
1624            dst.prognosisCodeableConcept.add(i.copy());
1625        };
1626        if (prognosisReference != null) {
1627          dst.prognosisReference = new ArrayList<Reference>();
1628          for (Reference i : prognosisReference)
1629            dst.prognosisReference.add(i.copy());
1630        };
1631        if (supportingInfo != null) {
1632          dst.supportingInfo = new ArrayList<Reference>();
1633          for (Reference i : supportingInfo)
1634            dst.supportingInfo.add(i.copy());
1635        };
1636        if (note != null) {
1637          dst.note = new ArrayList<Annotation>();
1638          for (Annotation i : note)
1639            dst.note.add(i.copy());
1640        };
1641      }
1642
1643      protected ClinicalImpression typedCopy() {
1644        return copy();
1645      }
1646
1647      @Override
1648      public boolean equalsDeep(Base other_) {
1649        if (!super.equalsDeep(other_))
1650          return false;
1651        if (!(other_ instanceof ClinicalImpression))
1652          return false;
1653        ClinicalImpression o = (ClinicalImpression) other_;
1654        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true)
1655           && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
1656           && compareDeep(effective, o.effective, true) && compareDeep(date, o.date, true) && compareDeep(performer, o.performer, true)
1657           && compareDeep(previous, o.previous, true) && compareDeep(problem, o.problem, true) && compareDeep(changePattern, o.changePattern, true)
1658           && compareDeep(protocol, o.protocol, true) && compareDeep(summary, o.summary, true) && compareDeep(finding, o.finding, true)
1659           && compareDeep(prognosisCodeableConcept, o.prognosisCodeableConcept, true) && compareDeep(prognosisReference, o.prognosisReference, true)
1660           && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(note, o.note, true);
1661      }
1662
1663      @Override
1664      public boolean equalsShallow(Base other_) {
1665        if (!super.equalsShallow(other_))
1666          return false;
1667        if (!(other_ instanceof ClinicalImpression))
1668          return false;
1669        ClinicalImpression o = (ClinicalImpression) other_;
1670        return compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(date, o.date, true)
1671           && compareValues(protocol, o.protocol, true) && compareValues(summary, o.summary, true);
1672      }
1673
1674      public boolean isEmpty() {
1675        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusReason
1676          , description, subject, encounter, effective, date, performer, previous, problem
1677          , changePattern, protocol, summary, finding, prognosisCodeableConcept, prognosisReference
1678          , supportingInfo, note);
1679      }
1680
1681  @Override
1682  public ResourceType getResourceType() {
1683    return ResourceType.ClinicalImpression;
1684   }
1685
1686 /**
1687   * Search parameter: <b>encounter</b>
1688   * <p>
1689   * Description: <b>The Encounter during which this ClinicalImpression was created</b><br>
1690   * Type: <b>reference</b><br>
1691   * Path: <b>ClinicalImpression.encounter</b><br>
1692   * </p>
1693   */
1694  @SearchParamDefinition(name="encounter", path="ClinicalImpression.encounter", description="The Encounter during which this ClinicalImpression was created", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
1695  public static final String SP_ENCOUNTER = "encounter";
1696 /**
1697   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
1698   * <p>
1699   * Description: <b>The Encounter during which this ClinicalImpression was created</b><br>
1700   * Type: <b>reference</b><br>
1701   * Path: <b>ClinicalImpression.encounter</b><br>
1702   * </p>
1703   */
1704  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
1705
1706/**
1707   * Constant for fluent queries to be used to add include statements. Specifies
1708   * the path value of "<b>ClinicalImpression:encounter</b>".
1709   */
1710  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ClinicalImpression:encounter").toLocked();
1711
1712 /**
1713   * Search parameter: <b>finding-code</b>
1714   * <p>
1715   * Description: <b>Reference to a concept (by class)</b><br>
1716   * Type: <b>token</b><br>
1717   * Path: <b>ClinicalImpression.finding.item.concept</b><br>
1718   * </p>
1719   */
1720  @SearchParamDefinition(name="finding-code", path="ClinicalImpression.finding.item.concept", description="Reference to a concept (by class)", type="token" )
1721  public static final String SP_FINDING_CODE = "finding-code";
1722 /**
1723   * <b>Fluent Client</b> search parameter constant for <b>finding-code</b>
1724   * <p>
1725   * Description: <b>Reference to a concept (by class)</b><br>
1726   * Type: <b>token</b><br>
1727   * Path: <b>ClinicalImpression.finding.item.concept</b><br>
1728   * </p>
1729   */
1730  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FINDING_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FINDING_CODE);
1731
1732 /**
1733   * Search parameter: <b>finding-ref</b>
1734   * <p>
1735   * Description: <b>Reference to a resource (by instance)</b><br>
1736   * Type: <b>reference</b><br>
1737   * Path: <b>ClinicalImpression.finding.item.reference</b><br>
1738   * </p>
1739   */
1740  @SearchParamDefinition(name="finding-ref", path="ClinicalImpression.finding.item.reference", description="Reference to a resource (by instance)", type="reference" )
1741  public static final String SP_FINDING_REF = "finding-ref";
1742 /**
1743   * <b>Fluent Client</b> search parameter constant for <b>finding-ref</b>
1744   * <p>
1745   * Description: <b>Reference to a resource (by instance)</b><br>
1746   * Type: <b>reference</b><br>
1747   * Path: <b>ClinicalImpression.finding.item.reference</b><br>
1748   * </p>
1749   */
1750  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FINDING_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FINDING_REF);
1751
1752/**
1753   * Constant for fluent queries to be used to add include statements. Specifies
1754   * the path value of "<b>ClinicalImpression:finding-ref</b>".
1755   */
1756  public static final ca.uhn.fhir.model.api.Include INCLUDE_FINDING_REF = new ca.uhn.fhir.model.api.Include("ClinicalImpression:finding-ref").toLocked();
1757
1758 /**
1759   * Search parameter: <b>identifier</b>
1760   * <p>
1761   * Description: <b>Business identifier</b><br>
1762   * Type: <b>token</b><br>
1763   * Path: <b>ClinicalImpression.identifier</b><br>
1764   * </p>
1765   */
1766  @SearchParamDefinition(name="identifier", path="ClinicalImpression.identifier", description="Business identifier", type="token" )
1767  public static final String SP_IDENTIFIER = "identifier";
1768 /**
1769   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1770   * <p>
1771   * Description: <b>Business identifier</b><br>
1772   * Type: <b>token</b><br>
1773   * Path: <b>ClinicalImpression.identifier</b><br>
1774   * </p>
1775   */
1776  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1777
1778 /**
1779   * Search parameter: <b>performer</b>
1780   * <p>
1781   * Description: <b>The clinician performing the assessment</b><br>
1782   * Type: <b>reference</b><br>
1783   * Path: <b>ClinicalImpression.performer</b><br>
1784   * </p>
1785   */
1786  @SearchParamDefinition(name="performer", path="ClinicalImpression.performer", description="The clinician performing the assessment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class, PractitionerRole.class } )
1787  public static final String SP_PERFORMER = "performer";
1788 /**
1789   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
1790   * <p>
1791   * Description: <b>The clinician performing the assessment</b><br>
1792   * Type: <b>reference</b><br>
1793   * Path: <b>ClinicalImpression.performer</b><br>
1794   * </p>
1795   */
1796  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
1797
1798/**
1799   * Constant for fluent queries to be used to add include statements. Specifies
1800   * the path value of "<b>ClinicalImpression:performer</b>".
1801   */
1802  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("ClinicalImpression:performer").toLocked();
1803
1804 /**
1805   * Search parameter: <b>previous</b>
1806   * <p>
1807   * Description: <b>Reference to last assessment</b><br>
1808   * Type: <b>reference</b><br>
1809   * Path: <b>ClinicalImpression.previous</b><br>
1810   * </p>
1811   */
1812  @SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference", target={ClinicalImpression.class } )
1813  public static final String SP_PREVIOUS = "previous";
1814 /**
1815   * <b>Fluent Client</b> search parameter constant for <b>previous</b>
1816   * <p>
1817   * Description: <b>Reference to last assessment</b><br>
1818   * Type: <b>reference</b><br>
1819   * Path: <b>ClinicalImpression.previous</b><br>
1820   * </p>
1821   */
1822  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREVIOUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREVIOUS);
1823
1824/**
1825   * Constant for fluent queries to be used to add include statements. Specifies
1826   * the path value of "<b>ClinicalImpression:previous</b>".
1827   */
1828  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREVIOUS = new ca.uhn.fhir.model.api.Include("ClinicalImpression:previous").toLocked();
1829
1830 /**
1831   * Search parameter: <b>problem</b>
1832   * <p>
1833   * Description: <b>Relevant impressions of patient state</b><br>
1834   * Type: <b>reference</b><br>
1835   * Path: <b>ClinicalImpression.problem</b><br>
1836   * </p>
1837   */
1838  @SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="Relevant impressions of patient state", type="reference", target={AllergyIntolerance.class, Condition.class } )
1839  public static final String SP_PROBLEM = "problem";
1840 /**
1841   * <b>Fluent Client</b> search parameter constant for <b>problem</b>
1842   * <p>
1843   * Description: <b>Relevant impressions of patient state</b><br>
1844   * Type: <b>reference</b><br>
1845   * Path: <b>ClinicalImpression.problem</b><br>
1846   * </p>
1847   */
1848  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROBLEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROBLEM);
1849
1850/**
1851   * Constant for fluent queries to be used to add include statements. Specifies
1852   * the path value of "<b>ClinicalImpression:problem</b>".
1853   */
1854  public static final ca.uhn.fhir.model.api.Include INCLUDE_PROBLEM = new ca.uhn.fhir.model.api.Include("ClinicalImpression:problem").toLocked();
1855
1856 /**
1857   * Search parameter: <b>status</b>
1858   * <p>
1859   * Description: <b>preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</b><br>
1860   * Type: <b>token</b><br>
1861   * Path: <b>ClinicalImpression.status</b><br>
1862   * </p>
1863   */
1864  @SearchParamDefinition(name="status", path="ClinicalImpression.status", description="preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", type="token" )
1865  public static final String SP_STATUS = "status";
1866 /**
1867   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1868   * <p>
1869   * Description: <b>preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</b><br>
1870   * Type: <b>token</b><br>
1871   * Path: <b>ClinicalImpression.status</b><br>
1872   * </p>
1873   */
1874  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1875
1876 /**
1877   * Search parameter: <b>subject</b>
1878   * <p>
1879   * Description: <b>Patient or group assessed</b><br>
1880   * Type: <b>reference</b><br>
1881   * Path: <b>ClinicalImpression.subject</b><br>
1882   * </p>
1883   */
1884  @SearchParamDefinition(name="subject", path="ClinicalImpression.subject", description="Patient or group assessed", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } )
1885  public static final String SP_SUBJECT = "subject";
1886 /**
1887   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1888   * <p>
1889   * Description: <b>Patient or group assessed</b><br>
1890   * Type: <b>reference</b><br>
1891   * Path: <b>ClinicalImpression.subject</b><br>
1892   * </p>
1893   */
1894  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1895
1896/**
1897   * Constant for fluent queries to be used to add include statements. Specifies
1898   * the path value of "<b>ClinicalImpression:subject</b>".
1899   */
1900  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ClinicalImpression:subject").toLocked();
1901
1902 /**
1903   * Search parameter: <b>supporting-info</b>
1904   * <p>
1905   * Description: <b>Information supporting the clinical impression</b><br>
1906   * Type: <b>reference</b><br>
1907   * Path: <b>ClinicalImpression.supportingInfo</b><br>
1908   * </p>
1909   */
1910  @SearchParamDefinition(name="supporting-info", path="ClinicalImpression.supportingInfo", description="Information supporting the clinical impression", 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, 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, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.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, 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, MedicationUsage.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, 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, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
1911  public static final String SP_SUPPORTING_INFO = "supporting-info";
1912 /**
1913   * <b>Fluent Client</b> search parameter constant for <b>supporting-info</b>
1914   * <p>
1915   * Description: <b>Information supporting the clinical impression</b><br>
1916   * Type: <b>reference</b><br>
1917   * Path: <b>ClinicalImpression.supportingInfo</b><br>
1918   * </p>
1919   */
1920  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTING_INFO = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTING_INFO);
1921
1922/**
1923   * Constant for fluent queries to be used to add include statements. Specifies
1924   * the path value of "<b>ClinicalImpression:supporting-info</b>".
1925   */
1926  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTING_INFO = new ca.uhn.fhir.model.api.Include("ClinicalImpression:supporting-info").toLocked();
1927
1928 /**
1929   * Search parameter: <b>date</b>
1930   * <p>
1931   * Description: <b>Multiple Resources: 
1932
1933* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1934* [CarePlan](careplan.html): Time period plan covers
1935* [CareTeam](careteam.html): A date within the coverage time period.
1936* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1937* [Composition](composition.html): Composition editing time
1938* [Consent](consent.html): When consent was agreed to
1939* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1940* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1941* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1942* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1943* [Flag](flag.html): Time period when flag is active
1944* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1945* [List](list.html): When the list was prepared
1946* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1947* [Procedure](procedure.html): When the procedure occurred or is occurring
1948* [RiskAssessment](riskassessment.html): When was assessment made?
1949* [SupplyRequest](supplyrequest.html): When the request was made
1950</b><br>
1951   * Type: <b>date</b><br>
1952   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1953   * </p>
1954   */
1955  @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance 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* [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* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
1956  public static final String SP_DATE = "date";
1957 /**
1958   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1959   * <p>
1960   * Description: <b>Multiple Resources: 
1961
1962* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1963* [CarePlan](careplan.html): Time period plan covers
1964* [CareTeam](careteam.html): A date within the coverage time period.
1965* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1966* [Composition](composition.html): Composition editing time
1967* [Consent](consent.html): When consent was agreed to
1968* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1969* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1970* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1971* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1972* [Flag](flag.html): Time period when flag is active
1973* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1974* [List](list.html): When the list was prepared
1975* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1976* [Procedure](procedure.html): When the procedure occurred or is occurring
1977* [RiskAssessment](riskassessment.html): When was assessment made?
1978* [SupplyRequest](supplyrequest.html): When the request was made
1979</b><br>
1980   * Type: <b>date</b><br>
1981   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1982   * </p>
1983   */
1984  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1985
1986 /**
1987   * Search parameter: <b>patient</b>
1988   * <p>
1989   * Description: <b>Multiple Resources: 
1990
1991* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1992* [CarePlan](careplan.html): Who the care plan is for
1993* [CareTeam](careteam.html): Who care team is for
1994* [ClinicalImpression](clinicalimpression.html): Patient assessed
1995* [Composition](composition.html): Who and/or what the composition is about
1996* [Condition](condition.html): Who has the condition?
1997* [Consent](consent.html): Who the consent applies to
1998* [DetectedIssue](detectedissue.html): Associated patient
1999* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2000* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2001* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2002* [DocumentManifest](documentmanifest.html): The subject of the set of documents
2003* [DocumentReference](documentreference.html): Who/what is the subject of the document
2004* [Encounter](encounter.html): The patient present at the encounter
2005* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2006* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2007* [Flag](flag.html): The identity of a subject to list flags for
2008* [Goal](goal.html): Who this goal is intended for
2009* [ImagingStudy](imagingstudy.html): Who the study is about
2010* [Immunization](immunization.html): The patient for the vaccination record
2011* [List](list.html): If all resources have the same subject
2012* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2013* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2014* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2015* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
2016* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2017* [Observation](observation.html): The subject that the observation is about (if patient)
2018* [Procedure](procedure.html): Search by subject - a patient
2019* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2020* [ServiceRequest](servicerequest.html): Search by subject - a patient
2021* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2022* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2023* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2024</b><br>
2025   * Type: <b>reference</b><br>
2026   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient</b><br>
2027   * </p>
2028   */
2029  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\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* [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* [DocumentManifest](documentmanifest.html): The subject of the set of documents\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* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\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* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\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* [MedicationUsage](medicationusage.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* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\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* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={BiologicallyDerivedProduct.class, Device.class, Group.class, Location.class, Medication.class, NutritionProduct.class, Organization.class, Patient.class, Practitioner.class, Procedure.class, Substance.class } )
2030  public static final String SP_PATIENT = "patient";
2031 /**
2032   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2033   * <p>
2034   * Description: <b>Multiple Resources: 
2035
2036* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2037* [CarePlan](careplan.html): Who the care plan is for
2038* [CareTeam](careteam.html): Who care team is for
2039* [ClinicalImpression](clinicalimpression.html): Patient assessed
2040* [Composition](composition.html): Who and/or what the composition is about
2041* [Condition](condition.html): Who has the condition?
2042* [Consent](consent.html): Who the consent applies to
2043* [DetectedIssue](detectedissue.html): Associated patient
2044* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2045* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2046* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2047* [DocumentManifest](documentmanifest.html): The subject of the set of documents
2048* [DocumentReference](documentreference.html): Who/what is the subject of the document
2049* [Encounter](encounter.html): The patient present at the encounter
2050* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2051* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2052* [Flag](flag.html): The identity of a subject to list flags for
2053* [Goal](goal.html): Who this goal is intended for
2054* [ImagingStudy](imagingstudy.html): Who the study is about
2055* [Immunization](immunization.html): The patient for the vaccination record
2056* [List](list.html): If all resources have the same subject
2057* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2058* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2059* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2060* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
2061* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2062* [Observation](observation.html): The subject that the observation is about (if patient)
2063* [Procedure](procedure.html): Search by subject - a patient
2064* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2065* [ServiceRequest](servicerequest.html): Search by subject - a patient
2066* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2067* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2068* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2069</b><br>
2070   * Type: <b>reference</b><br>
2071   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | VisionPrescription.patient</b><br>
2072   * </p>
2073   */
2074  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2075
2076/**
2077   * Constant for fluent queries to be used to add include statements. Specifies
2078   * the path value of "<b>ClinicalImpression:patient</b>".
2079   */
2080  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ClinicalImpression:patient").toLocked();
2081
2082
2083}
2084