001package org.hl7.fhir.r5.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.instance.model.api.ICompositeType;
058
059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
060import org.hl7.fhir.utilities.Utilities;
061import ca.uhn.fhir.model.api.annotation.ResourceDef;
062import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
063import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
064import ca.uhn.fhir.model.api.annotation.Child;
065import ca.uhn.fhir.model.api.annotation.ChildOrder;
066import ca.uhn.fhir.model.api.annotation.Description;
067import ca.uhn.fhir.model.api.annotation.Block;
068/**
069 * 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.
070 */
071@ResourceDef(name="ClinicalImpression", profile="http://hl7.org/fhir/StructureDefinition/ClinicalImpression")
072public class ClinicalImpression extends DomainResource {
073
074    public enum ClinicalImpressionStatus {
075        /**
076         * The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.
077         */
078        PREPARATION, 
079        /**
080         * The event is currently occurring.
081         */
082        INPROGRESS, 
083        /**
084         * The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.
085         */
086        NOTDONE, 
087        /**
088         * The event has been temporarily stopped but is expected to resume in the future.
089         */
090        ONHOLD, 
091        /**
092         * The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.
093         */
094        STOPPED, 
095        /**
096         * The event has now concluded.
097         */
098        COMPLETED, 
099        /**
100         * This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".).
101         */
102        ENTEREDINERROR, 
103        /**
104         * The authoring/source system does not know which of the status values currently applies for this event.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.
105         */
106        UNKNOWN, 
107        /**
108         * added to help the parsers with the generic types
109         */
110        NULL;
111        public static ClinicalImpressionStatus fromCode(String codeString) throws FHIRException {
112            if (codeString == null || "".equals(codeString))
113                return null;
114        if ("preparation".equals(codeString))
115          return PREPARATION;
116        if ("in-progress".equals(codeString))
117          return INPROGRESS;
118        if ("not-done".equals(codeString))
119          return NOTDONE;
120        if ("on-hold".equals(codeString))
121          return ONHOLD;
122        if ("stopped".equals(codeString))
123          return STOPPED;
124        if ("completed".equals(codeString))
125          return COMPLETED;
126        if ("entered-in-error".equals(codeString))
127          return ENTEREDINERROR;
128        if ("unknown".equals(codeString))
129          return UNKNOWN;
130        if (Configuration.isAcceptInvalidEnums())
131          return null;
132        else
133          throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
134        }
135        public String toCode() {
136          switch (this) {
137            case PREPARATION: return "preparation";
138            case INPROGRESS: return "in-progress";
139            case NOTDONE: return "not-done";
140            case ONHOLD: return "on-hold";
141            case STOPPED: return "stopped";
142            case COMPLETED: return "completed";
143            case ENTEREDINERROR: return "entered-in-error";
144            case UNKNOWN: return "unknown";
145            default: return "?";
146          }
147        }
148        public String getSystem() {
149          switch (this) {
150            case PREPARATION: return "http://hl7.org/fhir/event-status";
151            case INPROGRESS: return "http://hl7.org/fhir/event-status";
152            case NOTDONE: return "http://hl7.org/fhir/event-status";
153            case ONHOLD: return "http://hl7.org/fhir/event-status";
154            case STOPPED: return "http://hl7.org/fhir/event-status";
155            case COMPLETED: return "http://hl7.org/fhir/event-status";
156            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
157            case UNKNOWN: return "http://hl7.org/fhir/event-status";
158            default: return "?";
159          }
160        }
161        public String getDefinition() {
162          switch (this) {
163            case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.";
164            case INPROGRESS: return "The event is currently occurring.";
165            case NOTDONE: return "The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.";
166            case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future.";
167            case STOPPED: return "The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.";
168            case COMPLETED: return "The event has now concluded.";
169            case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
170            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this event.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.";
171            default: return "?";
172          }
173        }
174        public String getDisplay() {
175          switch (this) {
176            case PREPARATION: return "Preparation";
177            case INPROGRESS: return "In Progress";
178            case NOTDONE: return "Not Done";
179            case ONHOLD: return "On Hold";
180            case STOPPED: return "Stopped";
181            case COMPLETED: return "Completed";
182            case ENTEREDINERROR: return "Entered in Error";
183            case UNKNOWN: return "Unknown";
184            default: return "?";
185          }
186        }
187    }
188
189  public static class ClinicalImpressionStatusEnumFactory implements EnumFactory<ClinicalImpressionStatus> {
190    public ClinicalImpressionStatus fromCode(String codeString) throws IllegalArgumentException {
191      if (codeString == null || "".equals(codeString))
192            if (codeString == null || "".equals(codeString))
193                return null;
194        if ("preparation".equals(codeString))
195          return ClinicalImpressionStatus.PREPARATION;
196        if ("in-progress".equals(codeString))
197          return ClinicalImpressionStatus.INPROGRESS;
198        if ("not-done".equals(codeString))
199          return ClinicalImpressionStatus.NOTDONE;
200        if ("on-hold".equals(codeString))
201          return ClinicalImpressionStatus.ONHOLD;
202        if ("stopped".equals(codeString))
203          return ClinicalImpressionStatus.STOPPED;
204        if ("completed".equals(codeString))
205          return ClinicalImpressionStatus.COMPLETED;
206        if ("entered-in-error".equals(codeString))
207          return ClinicalImpressionStatus.ENTEREDINERROR;
208        if ("unknown".equals(codeString))
209          return ClinicalImpressionStatus.UNKNOWN;
210        throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
211        }
212        public Enumeration<ClinicalImpressionStatus> fromType(Base code) throws FHIRException {
213          if (code == null)
214            return null;
215          if (code.isEmpty())
216            return new Enumeration<ClinicalImpressionStatus>(this);
217          String codeString = ((PrimitiveType) code).asStringValue();
218          if (codeString == null || "".equals(codeString))
219            return null;
220        if ("preparation".equals(codeString))
221          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.PREPARATION);
222        if ("in-progress".equals(codeString))
223          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.INPROGRESS);
224        if ("not-done".equals(codeString))
225          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.NOTDONE);
226        if ("on-hold".equals(codeString))
227          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.ONHOLD);
228        if ("stopped".equals(codeString))
229          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.STOPPED);
230        if ("completed".equals(codeString))
231          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.COMPLETED);
232        if ("entered-in-error".equals(codeString))
233          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.ENTEREDINERROR);
234        if ("unknown".equals(codeString))
235          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.UNKNOWN);
236        throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
237        }
238    public String toCode(ClinicalImpressionStatus code) {
239      if (code == ClinicalImpressionStatus.PREPARATION)
240        return "preparation";
241      if (code == ClinicalImpressionStatus.INPROGRESS)
242        return "in-progress";
243      if (code == ClinicalImpressionStatus.NOTDONE)
244        return "not-done";
245      if (code == ClinicalImpressionStatus.ONHOLD)
246        return "on-hold";
247      if (code == ClinicalImpressionStatus.STOPPED)
248        return "stopped";
249      if (code == ClinicalImpressionStatus.COMPLETED)
250        return "completed";
251      if (code == ClinicalImpressionStatus.ENTEREDINERROR)
252        return "entered-in-error";
253      if (code == ClinicalImpressionStatus.UNKNOWN)
254        return "unknown";
255      return "?";
256      }
257    public String toSystem(ClinicalImpressionStatus code) {
258      return code.getSystem();
259      }
260    }
261
262    @Block()
263    public static class ClinicalImpressionFindingComponent extends BackboneElement implements IBaseBackboneElement {
264        /**
265         * Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.
266         */
267        @Child(name = "itemCodeableConcept", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
268        @Description(shortDefinition="What was found", formalDefinition="Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions." )
269        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
270        protected CodeableConcept itemCodeableConcept;
271
272        /**
273         * Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.
274         */
275        @Child(name = "itemReference", type = {Condition.class, Observation.class, DocumentReference.class}, order=2, min=0, max=1, modifier=false, summary=false)
276        @Description(shortDefinition="What was found", formalDefinition="Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions." )
277        protected Reference itemReference;
278
279        /**
280         * Which investigations support finding or diagnosis.
281         */
282        @Child(name = "basis", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
283        @Description(shortDefinition="Which investigations support finding", formalDefinition="Which investigations support finding or diagnosis." )
284        protected StringType basis;
285
286        private static final long serialVersionUID = -101631301L;
287
288    /**
289     * Constructor
290     */
291      public ClinicalImpressionFindingComponent() {
292        super();
293      }
294
295        /**
296         * @return {@link #itemCodeableConcept} (Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.)
297         */
298        public CodeableConcept getItemCodeableConcept() { 
299          if (this.itemCodeableConcept == null)
300            if (Configuration.errorOnAutoCreate())
301              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.itemCodeableConcept");
302            else if (Configuration.doAutoCreate())
303              this.itemCodeableConcept = new CodeableConcept(); // cc
304          return this.itemCodeableConcept;
305        }
306
307        public boolean hasItemCodeableConcept() { 
308          return this.itemCodeableConcept != null && !this.itemCodeableConcept.isEmpty();
309        }
310
311        /**
312         * @param value {@link #itemCodeableConcept} (Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.)
313         */
314        public ClinicalImpressionFindingComponent setItemCodeableConcept(CodeableConcept value) { 
315          this.itemCodeableConcept = value;
316          return this;
317        }
318
319        /**
320         * @return {@link #itemReference} (Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.)
321         */
322        public Reference getItemReference() { 
323          if (this.itemReference == null)
324            if (Configuration.errorOnAutoCreate())
325              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.itemReference");
326            else if (Configuration.doAutoCreate())
327              this.itemReference = new Reference(); // cc
328          return this.itemReference;
329        }
330
331        public boolean hasItemReference() { 
332          return this.itemReference != null && !this.itemReference.isEmpty();
333        }
334
335        /**
336         * @param value {@link #itemReference} (Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.)
337         */
338        public ClinicalImpressionFindingComponent setItemReference(Reference value) { 
339          this.itemReference = value;
340          return this;
341        }
342
343        /**
344         * @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
345         */
346        public StringType getBasisElement() { 
347          if (this.basis == null)
348            if (Configuration.errorOnAutoCreate())
349              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.basis");
350            else if (Configuration.doAutoCreate())
351              this.basis = new StringType(); // bb
352          return this.basis;
353        }
354
355        public boolean hasBasisElement() { 
356          return this.basis != null && !this.basis.isEmpty();
357        }
358
359        public boolean hasBasis() { 
360          return this.basis != null && !this.basis.isEmpty();
361        }
362
363        /**
364         * @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
365         */
366        public ClinicalImpressionFindingComponent setBasisElement(StringType value) { 
367          this.basis = value;
368          return this;
369        }
370
371        /**
372         * @return Which investigations support finding or diagnosis.
373         */
374        public String getBasis() { 
375          return this.basis == null ? null : this.basis.getValue();
376        }
377
378        /**
379         * @param value Which investigations support finding or diagnosis.
380         */
381        public ClinicalImpressionFindingComponent setBasis(String value) { 
382          if (Utilities.noString(value))
383            this.basis = null;
384          else {
385            if (this.basis == null)
386              this.basis = new StringType();
387            this.basis.setValue(value);
388          }
389          return this;
390        }
391
392        protected void listChildren(List<Property> children) {
393          super.listChildren(children);
394          children.add(new Property("itemCodeableConcept", "CodeableConcept", "Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, itemCodeableConcept));
395          children.add(new Property("itemReference", "Reference(Condition|Observation|DocumentReference)", "Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, itemReference));
396          children.add(new Property("basis", "string", "Which investigations support finding or diagnosis.", 0, 1, basis));
397        }
398
399        @Override
400        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
401          switch (_hash) {
402          case 106644494: /*itemCodeableConcept*/  return new Property("itemCodeableConcept", "CodeableConcept", "Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, itemCodeableConcept);
403          case 1376364920: /*itemReference*/  return new Property("itemReference", "Reference(Condition|Observation|DocumentReference)", "Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.", 0, 1, itemReference);
404          case 93508670: /*basis*/  return new Property("basis", "string", "Which investigations support finding or diagnosis.", 0, 1, basis);
405          default: return super.getNamedProperty(_hash, _name, _checkValid);
406          }
407
408        }
409
410      @Override
411      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
412        switch (hash) {
413        case 106644494: /*itemCodeableConcept*/ return this.itemCodeableConcept == null ? new Base[0] : new Base[] {this.itemCodeableConcept}; // CodeableConcept
414        case 1376364920: /*itemReference*/ return this.itemReference == null ? new Base[0] : new Base[] {this.itemReference}; // Reference
415        case 93508670: /*basis*/ return this.basis == null ? new Base[0] : new Base[] {this.basis}; // StringType
416        default: return super.getProperty(hash, name, checkValid);
417        }
418
419      }
420
421      @Override
422      public Base setProperty(int hash, String name, Base value) throws FHIRException {
423        switch (hash) {
424        case 106644494: // itemCodeableConcept
425          this.itemCodeableConcept = castToCodeableConcept(value); // CodeableConcept
426          return value;
427        case 1376364920: // itemReference
428          this.itemReference = castToReference(value); // Reference
429          return value;
430        case 93508670: // basis
431          this.basis = castToString(value); // StringType
432          return value;
433        default: return super.setProperty(hash, name, value);
434        }
435
436      }
437
438      @Override
439      public Base setProperty(String name, Base value) throws FHIRException {
440        if (name.equals("itemCodeableConcept")) {
441          this.itemCodeableConcept = castToCodeableConcept(value); // CodeableConcept
442        } else if (name.equals("itemReference")) {
443          this.itemReference = castToReference(value); // Reference
444        } else if (name.equals("basis")) {
445          this.basis = castToString(value); // StringType
446        } else
447          return super.setProperty(name, value);
448        return value;
449      }
450
451      @Override
452      public Base makeProperty(int hash, String name) throws FHIRException {
453        switch (hash) {
454        case 106644494:  return getItemCodeableConcept();
455        case 1376364920:  return getItemReference();
456        case 93508670:  return getBasisElement();
457        default: return super.makeProperty(hash, name);
458        }
459
460      }
461
462      @Override
463      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
464        switch (hash) {
465        case 106644494: /*itemCodeableConcept*/ return new String[] {"CodeableConcept"};
466        case 1376364920: /*itemReference*/ return new String[] {"Reference"};
467        case 93508670: /*basis*/ return new String[] {"string"};
468        default: return super.getTypesForProperty(hash, name);
469        }
470
471      }
472
473      @Override
474      public Base addChild(String name) throws FHIRException {
475        if (name.equals("itemCodeableConcept")) {
476          this.itemCodeableConcept = new CodeableConcept();
477          return this.itemCodeableConcept;
478        }
479        else if (name.equals("itemReference")) {
480          this.itemReference = new Reference();
481          return this.itemReference;
482        }
483        else if (name.equals("basis")) {
484          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.basis");
485        }
486        else
487          return super.addChild(name);
488      }
489
490      public ClinicalImpressionFindingComponent copy() {
491        ClinicalImpressionFindingComponent dst = new ClinicalImpressionFindingComponent();
492        copyValues(dst);
493        return dst;
494      }
495
496      public void copyValues(ClinicalImpressionFindingComponent dst) {
497        super.copyValues(dst);
498        dst.itemCodeableConcept = itemCodeableConcept == null ? null : itemCodeableConcept.copy();
499        dst.itemReference = itemReference == null ? null : itemReference.copy();
500        dst.basis = basis == null ? null : basis.copy();
501      }
502
503      @Override
504      public boolean equalsDeep(Base other_) {
505        if (!super.equalsDeep(other_))
506          return false;
507        if (!(other_ instanceof ClinicalImpressionFindingComponent))
508          return false;
509        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other_;
510        return compareDeep(itemCodeableConcept, o.itemCodeableConcept, true) && compareDeep(itemReference, o.itemReference, true)
511           && compareDeep(basis, o.basis, true);
512      }
513
514      @Override
515      public boolean equalsShallow(Base other_) {
516        if (!super.equalsShallow(other_))
517          return false;
518        if (!(other_ instanceof ClinicalImpressionFindingComponent))
519          return false;
520        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other_;
521        return compareValues(basis, o.basis, true);
522      }
523
524      public boolean isEmpty() {
525        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(itemCodeableConcept, itemReference
526          , basis);
527      }
528
529  public String fhirType() {
530    return "ClinicalImpression.finding";
531
532  }
533
534  }
535
536    /**
537     * 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.
538     */
539    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
540    @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." )
541    protected List<Identifier> identifier;
542
543    /**
544     * Identifies the workflow status of the assessment.
545     */
546    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
547    @Description(shortDefinition="preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", formalDefinition="Identifies the workflow status of the assessment." )
548    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/event-status")
549    protected Enumeration<ClinicalImpressionStatus> status;
550
551    /**
552     * Captures the reason for the current state of the ClinicalImpression.
553     */
554    @Child(name = "statusReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
555    @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current state of the ClinicalImpression." )
556    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinicalimpression-status-reason")
557    protected CodeableConcept statusReason;
558
559    /**
560     * Categorizes the type of clinical assessment performed.
561     */
562    @Child(name = "code", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
563    @Description(shortDefinition="Kind of assessment performed", formalDefinition="Categorizes the type of clinical assessment performed." )
564    protected CodeableConcept code;
565
566    /**
567     * A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.
568     */
569    @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
570    @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." )
571    protected StringType description;
572
573    /**
574     * The patient or group of individuals assessed as part of this record.
575     */
576    @Child(name = "subject", type = {Patient.class, Group.class}, order=5, min=1, max=1, modifier=false, summary=true)
577    @Description(shortDefinition="Patient or group assessed", formalDefinition="The patient or group of individuals assessed as part of this record." )
578    protected Reference subject;
579
580    /**
581     * The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.
582     */
583    @Child(name = "encounter", type = {Encounter.class}, order=6, min=0, max=1, modifier=false, summary=true)
584    @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." )
585    protected Reference encounter;
586
587    /**
588     * The point in time or period over which the subject was assessed.
589     */
590    @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true)
591    @Description(shortDefinition="Time of assessment", formalDefinition="The point in time or period over which the subject was assessed." )
592    protected Type effective;
593
594    /**
595     * Indicates when the documentation of the assessment was complete.
596     */
597    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
598    @Description(shortDefinition="When the assessment was documented", formalDefinition="Indicates when the documentation of the assessment was complete." )
599    protected DateTimeType date;
600
601    /**
602     * The clinician performing the assessment.
603     */
604    @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class}, order=9, min=0, max=1, modifier=false, summary=true)
605    @Description(shortDefinition="The clinician performing the assessment", formalDefinition="The clinician performing the assessment." )
606    protected Reference performer;
607
608    /**
609     * 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.
610     */
611    @Child(name = "previous", type = {ClinicalImpression.class}, order=10, min=0, max=1, modifier=false, summary=false)
612    @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." )
613    protected Reference previous;
614
615    /**
616     * A list of the relevant problems/conditions for a patient.
617     */
618    @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
619    @Description(shortDefinition="Relevant impressions of patient state", formalDefinition="A list of the relevant problems/conditions for a patient." )
620    protected List<Reference> problem;
621
622    /**
623     * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
624     */
625    @Child(name = "protocol", type = {UriType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
626    @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." )
627    protected List<UriType> protocol;
628
629    /**
630     * A text summary of the investigations and the diagnosis.
631     */
632    @Child(name = "summary", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
633    @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." )
634    protected StringType summary;
635
636    /**
637     * Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.
638     */
639    @Child(name = "finding", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
640    @Description(shortDefinition="Possible or likely findings and diagnoses", formalDefinition="Specific findings or diagnoses that were considered likely or relevant to ongoing treatment." )
641    protected List<ClinicalImpressionFindingComponent> finding;
642
643    /**
644     * Estimate of likely outcome.
645     */
646    @Child(name = "prognosisCodeableConcept", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
647    @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." )
648    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis")
649    protected List<CodeableConcept> prognosisCodeableConcept;
650
651    /**
652     * RiskAssessment expressing likely outcome.
653     */
654    @Child(name = "prognosisReference", type = {RiskAssessment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
655    @Description(shortDefinition="RiskAssessment expressing likely outcome", formalDefinition="RiskAssessment expressing likely outcome." )
656    protected List<Reference> prognosisReference;
657
658    /**
659     * Information supporting the clinical impression, which can contain investigation results.
660     */
661    @Child(name = "supportingInfo", type = {Reference.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
662    @Description(shortDefinition="Information supporting the clinical impression", formalDefinition="Information supporting the clinical impression, which can contain investigation results." )
663    protected List<Reference> supportingInfo;
664
665    /**
666     * Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.
667     */
668    @Child(name = "note", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
669    @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." )
670    protected List<Annotation> note;
671
672    private static final long serialVersionUID = 33409762L;
673
674  /**
675   * Constructor
676   */
677    public ClinicalImpression() {
678      super();
679    }
680
681  /**
682   * Constructor
683   */
684    public ClinicalImpression(Enumeration<ClinicalImpressionStatus> status, Reference subject) {
685      super();
686      this.status = status;
687      this.subject = subject;
688    }
689
690    /**
691     * @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.)
692     */
693    public List<Identifier> getIdentifier() { 
694      if (this.identifier == null)
695        this.identifier = new ArrayList<Identifier>();
696      return this.identifier;
697    }
698
699    /**
700     * @return Returns a reference to <code>this</code> for easy method chaining
701     */
702    public ClinicalImpression setIdentifier(List<Identifier> theIdentifier) { 
703      this.identifier = theIdentifier;
704      return this;
705    }
706
707    public boolean hasIdentifier() { 
708      if (this.identifier == null)
709        return false;
710      for (Identifier item : this.identifier)
711        if (!item.isEmpty())
712          return true;
713      return false;
714    }
715
716    public Identifier addIdentifier() { //3
717      Identifier t = new Identifier();
718      if (this.identifier == null)
719        this.identifier = new ArrayList<Identifier>();
720      this.identifier.add(t);
721      return t;
722    }
723
724    public ClinicalImpression addIdentifier(Identifier t) { //3
725      if (t == null)
726        return this;
727      if (this.identifier == null)
728        this.identifier = new ArrayList<Identifier>();
729      this.identifier.add(t);
730      return this;
731    }
732
733    /**
734     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
735     */
736    public Identifier getIdentifierFirstRep() { 
737      if (getIdentifier().isEmpty()) {
738        addIdentifier();
739      }
740      return getIdentifier().get(0);
741    }
742
743    /**
744     * @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
745     */
746    public Enumeration<ClinicalImpressionStatus> getStatusElement() { 
747      if (this.status == null)
748        if (Configuration.errorOnAutoCreate())
749          throw new Error("Attempt to auto-create ClinicalImpression.status");
750        else if (Configuration.doAutoCreate())
751          this.status = new Enumeration<ClinicalImpressionStatus>(new ClinicalImpressionStatusEnumFactory()); // bb
752      return this.status;
753    }
754
755    public boolean hasStatusElement() { 
756      return this.status != null && !this.status.isEmpty();
757    }
758
759    public boolean hasStatus() { 
760      return this.status != null && !this.status.isEmpty();
761    }
762
763    /**
764     * @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
765     */
766    public ClinicalImpression setStatusElement(Enumeration<ClinicalImpressionStatus> value) { 
767      this.status = value;
768      return this;
769    }
770
771    /**
772     * @return Identifies the workflow status of the assessment.
773     */
774    public ClinicalImpressionStatus getStatus() { 
775      return this.status == null ? null : this.status.getValue();
776    }
777
778    /**
779     * @param value Identifies the workflow status of the assessment.
780     */
781    public ClinicalImpression setStatus(ClinicalImpressionStatus value) { 
782        if (this.status == null)
783          this.status = new Enumeration<ClinicalImpressionStatus>(new ClinicalImpressionStatusEnumFactory());
784        this.status.setValue(value);
785      return this;
786    }
787
788    /**
789     * @return {@link #statusReason} (Captures the reason for the current state of the ClinicalImpression.)
790     */
791    public CodeableConcept getStatusReason() { 
792      if (this.statusReason == null)
793        if (Configuration.errorOnAutoCreate())
794          throw new Error("Attempt to auto-create ClinicalImpression.statusReason");
795        else if (Configuration.doAutoCreate())
796          this.statusReason = new CodeableConcept(); // cc
797      return this.statusReason;
798    }
799
800    public boolean hasStatusReason() { 
801      return this.statusReason != null && !this.statusReason.isEmpty();
802    }
803
804    /**
805     * @param value {@link #statusReason} (Captures the reason for the current state of the ClinicalImpression.)
806     */
807    public ClinicalImpression setStatusReason(CodeableConcept value) { 
808      this.statusReason = value;
809      return this;
810    }
811
812    /**
813     * @return {@link #code} (Categorizes the type of clinical assessment performed.)
814     */
815    public CodeableConcept getCode() { 
816      if (this.code == null)
817        if (Configuration.errorOnAutoCreate())
818          throw new Error("Attempt to auto-create ClinicalImpression.code");
819        else if (Configuration.doAutoCreate())
820          this.code = new CodeableConcept(); // cc
821      return this.code;
822    }
823
824    public boolean hasCode() { 
825      return this.code != null && !this.code.isEmpty();
826    }
827
828    /**
829     * @param value {@link #code} (Categorizes the type of clinical assessment performed.)
830     */
831    public ClinicalImpression setCode(CodeableConcept value) { 
832      this.code = value;
833      return this;
834    }
835
836    /**
837     * @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
838     */
839    public StringType getDescriptionElement() { 
840      if (this.description == null)
841        if (Configuration.errorOnAutoCreate())
842          throw new Error("Attempt to auto-create ClinicalImpression.description");
843        else if (Configuration.doAutoCreate())
844          this.description = new StringType(); // bb
845      return this.description;
846    }
847
848    public boolean hasDescriptionElement() { 
849      return this.description != null && !this.description.isEmpty();
850    }
851
852    public boolean hasDescription() { 
853      return this.description != null && !this.description.isEmpty();
854    }
855
856    /**
857     * @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
858     */
859    public ClinicalImpression setDescriptionElement(StringType value) { 
860      this.description = value;
861      return this;
862    }
863
864    /**
865     * @return A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.
866     */
867    public String getDescription() { 
868      return this.description == null ? null : this.description.getValue();
869    }
870
871    /**
872     * @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.
873     */
874    public ClinicalImpression setDescription(String value) { 
875      if (Utilities.noString(value))
876        this.description = null;
877      else {
878        if (this.description == null)
879          this.description = new StringType();
880        this.description.setValue(value);
881      }
882      return this;
883    }
884
885    /**
886     * @return {@link #subject} (The patient or group of individuals assessed as part of this record.)
887     */
888    public Reference getSubject() { 
889      if (this.subject == null)
890        if (Configuration.errorOnAutoCreate())
891          throw new Error("Attempt to auto-create ClinicalImpression.subject");
892        else if (Configuration.doAutoCreate())
893          this.subject = new Reference(); // cc
894      return this.subject;
895    }
896
897    public boolean hasSubject() { 
898      return this.subject != null && !this.subject.isEmpty();
899    }
900
901    /**
902     * @param value {@link #subject} (The patient or group of individuals assessed as part of this record.)
903     */
904    public ClinicalImpression setSubject(Reference value) { 
905      this.subject = value;
906      return this;
907    }
908
909    /**
910     * @return {@link #encounter} (The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.)
911     */
912    public Reference getEncounter() { 
913      if (this.encounter == null)
914        if (Configuration.errorOnAutoCreate())
915          throw new Error("Attempt to auto-create ClinicalImpression.encounter");
916        else if (Configuration.doAutoCreate())
917          this.encounter = new Reference(); // cc
918      return this.encounter;
919    }
920
921    public boolean hasEncounter() { 
922      return this.encounter != null && !this.encounter.isEmpty();
923    }
924
925    /**
926     * @param value {@link #encounter} (The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.)
927     */
928    public ClinicalImpression setEncounter(Reference value) { 
929      this.encounter = value;
930      return this;
931    }
932
933    /**
934     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
935     */
936    public Type getEffective() { 
937      return this.effective;
938    }
939
940    /**
941     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
942     */
943    public DateTimeType getEffectiveDateTimeType() throws FHIRException { 
944      if (this.effective == null)
945        this.effective = new DateTimeType();
946      if (!(this.effective instanceof DateTimeType))
947        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
948      return (DateTimeType) this.effective;
949    }
950
951    public boolean hasEffectiveDateTimeType() { 
952      return this != null && this.effective instanceof DateTimeType;
953    }
954
955    /**
956     * @return {@link #effective} (The point in time or period over which the subject was assessed.)
957     */
958    public Period getEffectivePeriod() throws FHIRException { 
959      if (this.effective == null)
960        this.effective = new Period();
961      if (!(this.effective instanceof Period))
962        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
963      return (Period) this.effective;
964    }
965
966    public boolean hasEffectivePeriod() { 
967      return this != null && this.effective instanceof Period;
968    }
969
970    public boolean hasEffective() { 
971      return this.effective != null && !this.effective.isEmpty();
972    }
973
974    /**
975     * @param value {@link #effective} (The point in time or period over which the subject was assessed.)
976     */
977    public ClinicalImpression setEffective(Type value) { 
978      if (value != null && !(value instanceof DateTimeType || value instanceof Period))
979        throw new Error("Not the right type for ClinicalImpression.effective[x]: "+value.fhirType());
980      this.effective = value;
981      return this;
982    }
983
984    /**
985     * @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
986     */
987    public DateTimeType getDateElement() { 
988      if (this.date == null)
989        if (Configuration.errorOnAutoCreate())
990          throw new Error("Attempt to auto-create ClinicalImpression.date");
991        else if (Configuration.doAutoCreate())
992          this.date = new DateTimeType(); // bb
993      return this.date;
994    }
995
996    public boolean hasDateElement() { 
997      return this.date != null && !this.date.isEmpty();
998    }
999
1000    public boolean hasDate() { 
1001      return this.date != null && !this.date.isEmpty();
1002    }
1003
1004    /**
1005     * @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
1006     */
1007    public ClinicalImpression setDateElement(DateTimeType value) { 
1008      this.date = value;
1009      return this;
1010    }
1011
1012    /**
1013     * @return Indicates when the documentation of the assessment was complete.
1014     */
1015    public Date getDate() { 
1016      return this.date == null ? null : this.date.getValue();
1017    }
1018
1019    /**
1020     * @param value Indicates when the documentation of the assessment was complete.
1021     */
1022    public ClinicalImpression setDate(Date value) { 
1023      if (value == null)
1024        this.date = null;
1025      else {
1026        if (this.date == null)
1027          this.date = new DateTimeType();
1028        this.date.setValue(value);
1029      }
1030      return this;
1031    }
1032
1033    /**
1034     * @return {@link #performer} (The clinician performing the assessment.)
1035     */
1036    public Reference getPerformer() { 
1037      if (this.performer == null)
1038        if (Configuration.errorOnAutoCreate())
1039          throw new Error("Attempt to auto-create ClinicalImpression.performer");
1040        else if (Configuration.doAutoCreate())
1041          this.performer = new Reference(); // cc
1042      return this.performer;
1043    }
1044
1045    public boolean hasPerformer() { 
1046      return this.performer != null && !this.performer.isEmpty();
1047    }
1048
1049    /**
1050     * @param value {@link #performer} (The clinician performing the assessment.)
1051     */
1052    public ClinicalImpression setPerformer(Reference value) { 
1053      this.performer = value;
1054      return this;
1055    }
1056
1057    /**
1058     * @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.)
1059     */
1060    public Reference getPrevious() { 
1061      if (this.previous == null)
1062        if (Configuration.errorOnAutoCreate())
1063          throw new Error("Attempt to auto-create ClinicalImpression.previous");
1064        else if (Configuration.doAutoCreate())
1065          this.previous = new Reference(); // cc
1066      return this.previous;
1067    }
1068
1069    public boolean hasPrevious() { 
1070      return this.previous != null && !this.previous.isEmpty();
1071    }
1072
1073    /**
1074     * @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.)
1075     */
1076    public ClinicalImpression setPrevious(Reference value) { 
1077      this.previous = value;
1078      return this;
1079    }
1080
1081    /**
1082     * @return {@link #problem} (A list of the relevant problems/conditions for a patient.)
1083     */
1084    public List<Reference> getProblem() { 
1085      if (this.problem == null)
1086        this.problem = new ArrayList<Reference>();
1087      return this.problem;
1088    }
1089
1090    /**
1091     * @return Returns a reference to <code>this</code> for easy method chaining
1092     */
1093    public ClinicalImpression setProblem(List<Reference> theProblem) { 
1094      this.problem = theProblem;
1095      return this;
1096    }
1097
1098    public boolean hasProblem() { 
1099      if (this.problem == null)
1100        return false;
1101      for (Reference item : this.problem)
1102        if (!item.isEmpty())
1103          return true;
1104      return false;
1105    }
1106
1107    public Reference addProblem() { //3
1108      Reference t = new Reference();
1109      if (this.problem == null)
1110        this.problem = new ArrayList<Reference>();
1111      this.problem.add(t);
1112      return t;
1113    }
1114
1115    public ClinicalImpression addProblem(Reference t) { //3
1116      if (t == null)
1117        return this;
1118      if (this.problem == null)
1119        this.problem = new ArrayList<Reference>();
1120      this.problem.add(t);
1121      return this;
1122    }
1123
1124    /**
1125     * @return The first repetition of repeating field {@link #problem}, creating it if it does not already exist
1126     */
1127    public Reference getProblemFirstRep() { 
1128      if (getProblem().isEmpty()) {
1129        addProblem();
1130      }
1131      return getProblem().get(0);
1132    }
1133
1134    /**
1135     * @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.)
1136     */
1137    public List<UriType> getProtocol() { 
1138      if (this.protocol == null)
1139        this.protocol = new ArrayList<UriType>();
1140      return this.protocol;
1141    }
1142
1143    /**
1144     * @return Returns a reference to <code>this</code> for easy method chaining
1145     */
1146    public ClinicalImpression setProtocol(List<UriType> theProtocol) { 
1147      this.protocol = theProtocol;
1148      return this;
1149    }
1150
1151    public boolean hasProtocol() { 
1152      if (this.protocol == null)
1153        return false;
1154      for (UriType item : this.protocol)
1155        if (!item.isEmpty())
1156          return true;
1157      return false;
1158    }
1159
1160    /**
1161     * @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.)
1162     */
1163    public UriType addProtocolElement() {//2 
1164      UriType t = new UriType();
1165      if (this.protocol == null)
1166        this.protocol = new ArrayList<UriType>();
1167      this.protocol.add(t);
1168      return t;
1169    }
1170
1171    /**
1172     * @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.)
1173     */
1174    public ClinicalImpression addProtocol(String value) { //1
1175      UriType t = new UriType();
1176      t.setValue(value);
1177      if (this.protocol == null)
1178        this.protocol = new ArrayList<UriType>();
1179      this.protocol.add(t);
1180      return this;
1181    }
1182
1183    /**
1184     * @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.)
1185     */
1186    public boolean hasProtocol(String value) { 
1187      if (this.protocol == null)
1188        return false;
1189      for (UriType v : this.protocol)
1190        if (v.getValue().equals(value)) // uri
1191          return true;
1192      return false;
1193    }
1194
1195    /**
1196     * @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
1197     */
1198    public StringType getSummaryElement() { 
1199      if (this.summary == null)
1200        if (Configuration.errorOnAutoCreate())
1201          throw new Error("Attempt to auto-create ClinicalImpression.summary");
1202        else if (Configuration.doAutoCreate())
1203          this.summary = new StringType(); // bb
1204      return this.summary;
1205    }
1206
1207    public boolean hasSummaryElement() { 
1208      return this.summary != null && !this.summary.isEmpty();
1209    }
1210
1211    public boolean hasSummary() { 
1212      return this.summary != null && !this.summary.isEmpty();
1213    }
1214
1215    /**
1216     * @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
1217     */
1218    public ClinicalImpression setSummaryElement(StringType value) { 
1219      this.summary = value;
1220      return this;
1221    }
1222
1223    /**
1224     * @return A text summary of the investigations and the diagnosis.
1225     */
1226    public String getSummary() { 
1227      return this.summary == null ? null : this.summary.getValue();
1228    }
1229
1230    /**
1231     * @param value A text summary of the investigations and the diagnosis.
1232     */
1233    public ClinicalImpression setSummary(String value) { 
1234      if (Utilities.noString(value))
1235        this.summary = null;
1236      else {
1237        if (this.summary == null)
1238          this.summary = new StringType();
1239        this.summary.setValue(value);
1240      }
1241      return this;
1242    }
1243
1244    /**
1245     * @return {@link #finding} (Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.)
1246     */
1247    public List<ClinicalImpressionFindingComponent> getFinding() { 
1248      if (this.finding == null)
1249        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1250      return this.finding;
1251    }
1252
1253    /**
1254     * @return Returns a reference to <code>this</code> for easy method chaining
1255     */
1256    public ClinicalImpression setFinding(List<ClinicalImpressionFindingComponent> theFinding) { 
1257      this.finding = theFinding;
1258      return this;
1259    }
1260
1261    public boolean hasFinding() { 
1262      if (this.finding == null)
1263        return false;
1264      for (ClinicalImpressionFindingComponent item : this.finding)
1265        if (!item.isEmpty())
1266          return true;
1267      return false;
1268    }
1269
1270    public ClinicalImpressionFindingComponent addFinding() { //3
1271      ClinicalImpressionFindingComponent t = new ClinicalImpressionFindingComponent();
1272      if (this.finding == null)
1273        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1274      this.finding.add(t);
1275      return t;
1276    }
1277
1278    public ClinicalImpression addFinding(ClinicalImpressionFindingComponent t) { //3
1279      if (t == null)
1280        return this;
1281      if (this.finding == null)
1282        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1283      this.finding.add(t);
1284      return this;
1285    }
1286
1287    /**
1288     * @return The first repetition of repeating field {@link #finding}, creating it if it does not already exist
1289     */
1290    public ClinicalImpressionFindingComponent getFindingFirstRep() { 
1291      if (getFinding().isEmpty()) {
1292        addFinding();
1293      }
1294      return getFinding().get(0);
1295    }
1296
1297    /**
1298     * @return {@link #prognosisCodeableConcept} (Estimate of likely outcome.)
1299     */
1300    public List<CodeableConcept> getPrognosisCodeableConcept() { 
1301      if (this.prognosisCodeableConcept == null)
1302        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1303      return this.prognosisCodeableConcept;
1304    }
1305
1306    /**
1307     * @return Returns a reference to <code>this</code> for easy method chaining
1308     */
1309    public ClinicalImpression setPrognosisCodeableConcept(List<CodeableConcept> thePrognosisCodeableConcept) { 
1310      this.prognosisCodeableConcept = thePrognosisCodeableConcept;
1311      return this;
1312    }
1313
1314    public boolean hasPrognosisCodeableConcept() { 
1315      if (this.prognosisCodeableConcept == null)
1316        return false;
1317      for (CodeableConcept item : this.prognosisCodeableConcept)
1318        if (!item.isEmpty())
1319          return true;
1320      return false;
1321    }
1322
1323    public CodeableConcept addPrognosisCodeableConcept() { //3
1324      CodeableConcept t = new CodeableConcept();
1325      if (this.prognosisCodeableConcept == null)
1326        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1327      this.prognosisCodeableConcept.add(t);
1328      return t;
1329    }
1330
1331    public ClinicalImpression addPrognosisCodeableConcept(CodeableConcept t) { //3
1332      if (t == null)
1333        return this;
1334      if (this.prognosisCodeableConcept == null)
1335        this.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1336      this.prognosisCodeableConcept.add(t);
1337      return this;
1338    }
1339
1340    /**
1341     * @return The first repetition of repeating field {@link #prognosisCodeableConcept}, creating it if it does not already exist
1342     */
1343    public CodeableConcept getPrognosisCodeableConceptFirstRep() { 
1344      if (getPrognosisCodeableConcept().isEmpty()) {
1345        addPrognosisCodeableConcept();
1346      }
1347      return getPrognosisCodeableConcept().get(0);
1348    }
1349
1350    /**
1351     * @return {@link #prognosisReference} (RiskAssessment expressing likely outcome.)
1352     */
1353    public List<Reference> getPrognosisReference() { 
1354      if (this.prognosisReference == null)
1355        this.prognosisReference = new ArrayList<Reference>();
1356      return this.prognosisReference;
1357    }
1358
1359    /**
1360     * @return Returns a reference to <code>this</code> for easy method chaining
1361     */
1362    public ClinicalImpression setPrognosisReference(List<Reference> thePrognosisReference) { 
1363      this.prognosisReference = thePrognosisReference;
1364      return this;
1365    }
1366
1367    public boolean hasPrognosisReference() { 
1368      if (this.prognosisReference == null)
1369        return false;
1370      for (Reference item : this.prognosisReference)
1371        if (!item.isEmpty())
1372          return true;
1373      return false;
1374    }
1375
1376    public Reference addPrognosisReference() { //3
1377      Reference t = new Reference();
1378      if (this.prognosisReference == null)
1379        this.prognosisReference = new ArrayList<Reference>();
1380      this.prognosisReference.add(t);
1381      return t;
1382    }
1383
1384    public ClinicalImpression addPrognosisReference(Reference t) { //3
1385      if (t == null)
1386        return this;
1387      if (this.prognosisReference == null)
1388        this.prognosisReference = new ArrayList<Reference>();
1389      this.prognosisReference.add(t);
1390      return this;
1391    }
1392
1393    /**
1394     * @return The first repetition of repeating field {@link #prognosisReference}, creating it if it does not already exist
1395     */
1396    public Reference getPrognosisReferenceFirstRep() { 
1397      if (getPrognosisReference().isEmpty()) {
1398        addPrognosisReference();
1399      }
1400      return getPrognosisReference().get(0);
1401    }
1402
1403    /**
1404     * @return {@link #supportingInfo} (Information supporting the clinical impression, which can contain investigation results.)
1405     */
1406    public List<Reference> getSupportingInfo() { 
1407      if (this.supportingInfo == null)
1408        this.supportingInfo = new ArrayList<Reference>();
1409      return this.supportingInfo;
1410    }
1411
1412    /**
1413     * @return Returns a reference to <code>this</code> for easy method chaining
1414     */
1415    public ClinicalImpression setSupportingInfo(List<Reference> theSupportingInfo) { 
1416      this.supportingInfo = theSupportingInfo;
1417      return this;
1418    }
1419
1420    public boolean hasSupportingInfo() { 
1421      if (this.supportingInfo == null)
1422        return false;
1423      for (Reference item : this.supportingInfo)
1424        if (!item.isEmpty())
1425          return true;
1426      return false;
1427    }
1428
1429    public Reference addSupportingInfo() { //3
1430      Reference t = new Reference();
1431      if (this.supportingInfo == null)
1432        this.supportingInfo = new ArrayList<Reference>();
1433      this.supportingInfo.add(t);
1434      return t;
1435    }
1436
1437    public ClinicalImpression addSupportingInfo(Reference t) { //3
1438      if (t == null)
1439        return this;
1440      if (this.supportingInfo == null)
1441        this.supportingInfo = new ArrayList<Reference>();
1442      this.supportingInfo.add(t);
1443      return this;
1444    }
1445
1446    /**
1447     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist
1448     */
1449    public Reference getSupportingInfoFirstRep() { 
1450      if (getSupportingInfo().isEmpty()) {
1451        addSupportingInfo();
1452      }
1453      return getSupportingInfo().get(0);
1454    }
1455
1456    /**
1457     * @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.)
1458     */
1459    public List<Annotation> getNote() { 
1460      if (this.note == null)
1461        this.note = new ArrayList<Annotation>();
1462      return this.note;
1463    }
1464
1465    /**
1466     * @return Returns a reference to <code>this</code> for easy method chaining
1467     */
1468    public ClinicalImpression setNote(List<Annotation> theNote) { 
1469      this.note = theNote;
1470      return this;
1471    }
1472
1473    public boolean hasNote() { 
1474      if (this.note == null)
1475        return false;
1476      for (Annotation item : this.note)
1477        if (!item.isEmpty())
1478          return true;
1479      return false;
1480    }
1481
1482    public Annotation addNote() { //3
1483      Annotation t = new Annotation();
1484      if (this.note == null)
1485        this.note = new ArrayList<Annotation>();
1486      this.note.add(t);
1487      return t;
1488    }
1489
1490    public ClinicalImpression addNote(Annotation t) { //3
1491      if (t == null)
1492        return this;
1493      if (this.note == null)
1494        this.note = new ArrayList<Annotation>();
1495      this.note.add(t);
1496      return this;
1497    }
1498
1499    /**
1500     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
1501     */
1502    public Annotation getNoteFirstRep() { 
1503      if (getNote().isEmpty()) {
1504        addNote();
1505      }
1506      return getNote().get(0);
1507    }
1508
1509      protected void listChildren(List<Property> children) {
1510        super.listChildren(children);
1511        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));
1512        children.add(new Property("status", "code", "Identifies the workflow status of the assessment.", 0, 1, status));
1513        children.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the ClinicalImpression.", 0, 1, statusReason));
1514        children.add(new Property("code", "CodeableConcept", "Categorizes the type of clinical assessment performed.", 0, 1, code));
1515        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));
1516        children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group of individuals assessed as part of this record.", 0, 1, subject));
1517        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));
1518        children.add(new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective));
1519        children.add(new Property("date", "dateTime", "Indicates when the documentation of the assessment was complete.", 0, 1, date));
1520        children.add(new Property("performer", "Reference(Practitioner|PractitionerRole)", "The clinician performing the assessment.", 0, 1, performer));
1521        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));
1522        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));
1523        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));
1524        children.add(new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, 1, summary));
1525        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));
1526        children.add(new Property("prognosisCodeableConcept", "CodeableConcept", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisCodeableConcept));
1527        children.add(new Property("prognosisReference", "Reference(RiskAssessment)", "RiskAssessment expressing likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisReference));
1528        children.add(new Property("supportingInfo", "Reference(Any)", "Information supporting the clinical impression, which can contain investigation results.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
1529        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));
1530      }
1531
1532      @Override
1533      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1534        switch (_hash) {
1535        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);
1536        case -892481550: /*status*/  return new Property("status", "code", "Identifies the workflow status of the assessment.", 0, 1, status);
1537        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the ClinicalImpression.", 0, 1, statusReason);
1538        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Categorizes the type of clinical assessment performed.", 0, 1, code);
1539        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);
1540        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);
1541        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);
1542        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);
1543        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);
1544        case -275306910: /*effectiveDateTime*/  return new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1545        case -403934648: /*effectivePeriod*/  return new Property("effective[x]", "dateTime|Period", "The point in time or period over which the subject was assessed.", 0, 1, effective);
1546        case 3076014: /*date*/  return new Property("date", "dateTime", "Indicates when the documentation of the assessment was complete.", 0, 1, date);
1547        case 481140686: /*performer*/  return new Property("performer", "Reference(Practitioner|PractitionerRole)", "The clinician performing the assessment.", 0, 1, performer);
1548        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);
1549        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);
1550        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);
1551        case -1857640538: /*summary*/  return new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, 1, summary);
1552        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);
1553        case -676337953: /*prognosisCodeableConcept*/  return new Property("prognosisCodeableConcept", "CodeableConcept", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisCodeableConcept);
1554        case -587137783: /*prognosisReference*/  return new Property("prognosisReference", "Reference(RiskAssessment)", "RiskAssessment expressing likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosisReference);
1555        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);
1556        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);
1557        default: return super.getNamedProperty(_hash, _name, _checkValid);
1558        }
1559
1560      }
1561
1562      @Override
1563      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1564        switch (hash) {
1565        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1566        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ClinicalImpressionStatus>
1567        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
1568        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1569        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1570        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1571        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1572        case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Type
1573        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1574        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
1575        case -1273775369: /*previous*/ return this.previous == null ? new Base[0] : new Base[] {this.previous}; // Reference
1576        case -309542241: /*problem*/ return this.problem == null ? new Base[0] : this.problem.toArray(new Base[this.problem.size()]); // Reference
1577        case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : this.protocol.toArray(new Base[this.protocol.size()]); // UriType
1578        case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // StringType
1579        case -853173367: /*finding*/ return this.finding == null ? new Base[0] : this.finding.toArray(new Base[this.finding.size()]); // ClinicalImpressionFindingComponent
1580        case -676337953: /*prognosisCodeableConcept*/ return this.prognosisCodeableConcept == null ? new Base[0] : this.prognosisCodeableConcept.toArray(new Base[this.prognosisCodeableConcept.size()]); // CodeableConcept
1581        case -587137783: /*prognosisReference*/ return this.prognosisReference == null ? new Base[0] : this.prognosisReference.toArray(new Base[this.prognosisReference.size()]); // Reference
1582        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference
1583        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1584        default: return super.getProperty(hash, name, checkValid);
1585        }
1586
1587      }
1588
1589      @Override
1590      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1591        switch (hash) {
1592        case -1618432855: // identifier
1593          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1594          return value;
1595        case -892481550: // status
1596          value = new ClinicalImpressionStatusEnumFactory().fromType(castToCode(value));
1597          this.status = (Enumeration) value; // Enumeration<ClinicalImpressionStatus>
1598          return value;
1599        case 2051346646: // statusReason
1600          this.statusReason = castToCodeableConcept(value); // CodeableConcept
1601          return value;
1602        case 3059181: // code
1603          this.code = castToCodeableConcept(value); // CodeableConcept
1604          return value;
1605        case -1724546052: // description
1606          this.description = castToString(value); // StringType
1607          return value;
1608        case -1867885268: // subject
1609          this.subject = castToReference(value); // Reference
1610          return value;
1611        case 1524132147: // encounter
1612          this.encounter = castToReference(value); // Reference
1613          return value;
1614        case -1468651097: // effective
1615          this.effective = castToType(value); // Type
1616          return value;
1617        case 3076014: // date
1618          this.date = castToDateTime(value); // DateTimeType
1619          return value;
1620        case 481140686: // performer
1621          this.performer = castToReference(value); // Reference
1622          return value;
1623        case -1273775369: // previous
1624          this.previous = castToReference(value); // Reference
1625          return value;
1626        case -309542241: // problem
1627          this.getProblem().add(castToReference(value)); // Reference
1628          return value;
1629        case -989163880: // protocol
1630          this.getProtocol().add(castToUri(value)); // UriType
1631          return value;
1632        case -1857640538: // summary
1633          this.summary = castToString(value); // StringType
1634          return value;
1635        case -853173367: // finding
1636          this.getFinding().add((ClinicalImpressionFindingComponent) value); // ClinicalImpressionFindingComponent
1637          return value;
1638        case -676337953: // prognosisCodeableConcept
1639          this.getPrognosisCodeableConcept().add(castToCodeableConcept(value)); // CodeableConcept
1640          return value;
1641        case -587137783: // prognosisReference
1642          this.getPrognosisReference().add(castToReference(value)); // Reference
1643          return value;
1644        case 1922406657: // supportingInfo
1645          this.getSupportingInfo().add(castToReference(value)); // Reference
1646          return value;
1647        case 3387378: // note
1648          this.getNote().add(castToAnnotation(value)); // Annotation
1649          return value;
1650        default: return super.setProperty(hash, name, value);
1651        }
1652
1653      }
1654
1655      @Override
1656      public Base setProperty(String name, Base value) throws FHIRException {
1657        if (name.equals("identifier")) {
1658          this.getIdentifier().add(castToIdentifier(value));
1659        } else if (name.equals("status")) {
1660          value = new ClinicalImpressionStatusEnumFactory().fromType(castToCode(value));
1661          this.status = (Enumeration) value; // Enumeration<ClinicalImpressionStatus>
1662        } else if (name.equals("statusReason")) {
1663          this.statusReason = castToCodeableConcept(value); // CodeableConcept
1664        } else if (name.equals("code")) {
1665          this.code = castToCodeableConcept(value); // CodeableConcept
1666        } else if (name.equals("description")) {
1667          this.description = castToString(value); // StringType
1668        } else if (name.equals("subject")) {
1669          this.subject = castToReference(value); // Reference
1670        } else if (name.equals("encounter")) {
1671          this.encounter = castToReference(value); // Reference
1672        } else if (name.equals("effective[x]")) {
1673          this.effective = castToType(value); // Type
1674        } else if (name.equals("date")) {
1675          this.date = castToDateTime(value); // DateTimeType
1676        } else if (name.equals("performer")) {
1677          this.performer = castToReference(value); // Reference
1678        } else if (name.equals("previous")) {
1679          this.previous = castToReference(value); // Reference
1680        } else if (name.equals("problem")) {
1681          this.getProblem().add(castToReference(value));
1682        } else if (name.equals("protocol")) {
1683          this.getProtocol().add(castToUri(value));
1684        } else if (name.equals("summary")) {
1685          this.summary = castToString(value); // StringType
1686        } else if (name.equals("finding")) {
1687          this.getFinding().add((ClinicalImpressionFindingComponent) value);
1688        } else if (name.equals("prognosisCodeableConcept")) {
1689          this.getPrognosisCodeableConcept().add(castToCodeableConcept(value));
1690        } else if (name.equals("prognosisReference")) {
1691          this.getPrognosisReference().add(castToReference(value));
1692        } else if (name.equals("supportingInfo")) {
1693          this.getSupportingInfo().add(castToReference(value));
1694        } else if (name.equals("note")) {
1695          this.getNote().add(castToAnnotation(value));
1696        } else
1697          return super.setProperty(name, value);
1698        return value;
1699      }
1700
1701      @Override
1702      public Base makeProperty(int hash, String name) throws FHIRException {
1703        switch (hash) {
1704        case -1618432855:  return addIdentifier(); 
1705        case -892481550:  return getStatusElement();
1706        case 2051346646:  return getStatusReason();
1707        case 3059181:  return getCode();
1708        case -1724546052:  return getDescriptionElement();
1709        case -1867885268:  return getSubject();
1710        case 1524132147:  return getEncounter();
1711        case 247104889:  return getEffective();
1712        case -1468651097:  return getEffective();
1713        case 3076014:  return getDateElement();
1714        case 481140686:  return getPerformer();
1715        case -1273775369:  return getPrevious();
1716        case -309542241:  return addProblem(); 
1717        case -989163880:  return addProtocolElement();
1718        case -1857640538:  return getSummaryElement();
1719        case -853173367:  return addFinding(); 
1720        case -676337953:  return addPrognosisCodeableConcept(); 
1721        case -587137783:  return addPrognosisReference(); 
1722        case 1922406657:  return addSupportingInfo(); 
1723        case 3387378:  return addNote(); 
1724        default: return super.makeProperty(hash, name);
1725        }
1726
1727      }
1728
1729      @Override
1730      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1731        switch (hash) {
1732        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1733        case -892481550: /*status*/ return new String[] {"code"};
1734        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
1735        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1736        case -1724546052: /*description*/ return new String[] {"string"};
1737        case -1867885268: /*subject*/ return new String[] {"Reference"};
1738        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1739        case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"};
1740        case 3076014: /*date*/ return new String[] {"dateTime"};
1741        case 481140686: /*performer*/ return new String[] {"Reference"};
1742        case -1273775369: /*previous*/ return new String[] {"Reference"};
1743        case -309542241: /*problem*/ return new String[] {"Reference"};
1744        case -989163880: /*protocol*/ return new String[] {"uri"};
1745        case -1857640538: /*summary*/ return new String[] {"string"};
1746        case -853173367: /*finding*/ return new String[] {};
1747        case -676337953: /*prognosisCodeableConcept*/ return new String[] {"CodeableConcept"};
1748        case -587137783: /*prognosisReference*/ return new String[] {"Reference"};
1749        case 1922406657: /*supportingInfo*/ return new String[] {"Reference"};
1750        case 3387378: /*note*/ return new String[] {"Annotation"};
1751        default: return super.getTypesForProperty(hash, name);
1752        }
1753
1754      }
1755
1756      @Override
1757      public Base addChild(String name) throws FHIRException {
1758        if (name.equals("identifier")) {
1759          return addIdentifier();
1760        }
1761        else if (name.equals("status")) {
1762          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.status");
1763        }
1764        else if (name.equals("statusReason")) {
1765          this.statusReason = new CodeableConcept();
1766          return this.statusReason;
1767        }
1768        else if (name.equals("code")) {
1769          this.code = new CodeableConcept();
1770          return this.code;
1771        }
1772        else if (name.equals("description")) {
1773          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.description");
1774        }
1775        else if (name.equals("subject")) {
1776          this.subject = new Reference();
1777          return this.subject;
1778        }
1779        else if (name.equals("encounter")) {
1780          this.encounter = new Reference();
1781          return this.encounter;
1782        }
1783        else if (name.equals("effectiveDateTime")) {
1784          this.effective = new DateTimeType();
1785          return this.effective;
1786        }
1787        else if (name.equals("effectivePeriod")) {
1788          this.effective = new Period();
1789          return this.effective;
1790        }
1791        else if (name.equals("date")) {
1792          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.date");
1793        }
1794        else if (name.equals("performer")) {
1795          this.performer = new Reference();
1796          return this.performer;
1797        }
1798        else if (name.equals("previous")) {
1799          this.previous = new Reference();
1800          return this.previous;
1801        }
1802        else if (name.equals("problem")) {
1803          return addProblem();
1804        }
1805        else if (name.equals("protocol")) {
1806          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.protocol");
1807        }
1808        else if (name.equals("summary")) {
1809          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.summary");
1810        }
1811        else if (name.equals("finding")) {
1812          return addFinding();
1813        }
1814        else if (name.equals("prognosisCodeableConcept")) {
1815          return addPrognosisCodeableConcept();
1816        }
1817        else if (name.equals("prognosisReference")) {
1818          return addPrognosisReference();
1819        }
1820        else if (name.equals("supportingInfo")) {
1821          return addSupportingInfo();
1822        }
1823        else if (name.equals("note")) {
1824          return addNote();
1825        }
1826        else
1827          return super.addChild(name);
1828      }
1829
1830  public String fhirType() {
1831    return "ClinicalImpression";
1832
1833  }
1834
1835      public ClinicalImpression copy() {
1836        ClinicalImpression dst = new ClinicalImpression();
1837        copyValues(dst);
1838        return dst;
1839      }
1840
1841      public void copyValues(ClinicalImpression dst) {
1842        super.copyValues(dst);
1843        if (identifier != null) {
1844          dst.identifier = new ArrayList<Identifier>();
1845          for (Identifier i : identifier)
1846            dst.identifier.add(i.copy());
1847        };
1848        dst.status = status == null ? null : status.copy();
1849        dst.statusReason = statusReason == null ? null : statusReason.copy();
1850        dst.code = code == null ? null : code.copy();
1851        dst.description = description == null ? null : description.copy();
1852        dst.subject = subject == null ? null : subject.copy();
1853        dst.encounter = encounter == null ? null : encounter.copy();
1854        dst.effective = effective == null ? null : effective.copy();
1855        dst.date = date == null ? null : date.copy();
1856        dst.performer = performer == null ? null : performer.copy();
1857        dst.previous = previous == null ? null : previous.copy();
1858        if (problem != null) {
1859          dst.problem = new ArrayList<Reference>();
1860          for (Reference i : problem)
1861            dst.problem.add(i.copy());
1862        };
1863        if (protocol != null) {
1864          dst.protocol = new ArrayList<UriType>();
1865          for (UriType i : protocol)
1866            dst.protocol.add(i.copy());
1867        };
1868        dst.summary = summary == null ? null : summary.copy();
1869        if (finding != null) {
1870          dst.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1871          for (ClinicalImpressionFindingComponent i : finding)
1872            dst.finding.add(i.copy());
1873        };
1874        if (prognosisCodeableConcept != null) {
1875          dst.prognosisCodeableConcept = new ArrayList<CodeableConcept>();
1876          for (CodeableConcept i : prognosisCodeableConcept)
1877            dst.prognosisCodeableConcept.add(i.copy());
1878        };
1879        if (prognosisReference != null) {
1880          dst.prognosisReference = new ArrayList<Reference>();
1881          for (Reference i : prognosisReference)
1882            dst.prognosisReference.add(i.copy());
1883        };
1884        if (supportingInfo != null) {
1885          dst.supportingInfo = new ArrayList<Reference>();
1886          for (Reference i : supportingInfo)
1887            dst.supportingInfo.add(i.copy());
1888        };
1889        if (note != null) {
1890          dst.note = new ArrayList<Annotation>();
1891          for (Annotation i : note)
1892            dst.note.add(i.copy());
1893        };
1894      }
1895
1896      protected ClinicalImpression typedCopy() {
1897        return copy();
1898      }
1899
1900      @Override
1901      public boolean equalsDeep(Base other_) {
1902        if (!super.equalsDeep(other_))
1903          return false;
1904        if (!(other_ instanceof ClinicalImpression))
1905          return false;
1906        ClinicalImpression o = (ClinicalImpression) other_;
1907        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true)
1908           && compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(subject, o.subject, true)
1909           && compareDeep(encounter, o.encounter, true) && compareDeep(effective, o.effective, true) && compareDeep(date, o.date, true)
1910           && compareDeep(performer, o.performer, true) && compareDeep(previous, o.previous, true) && compareDeep(problem, o.problem, true)
1911           && compareDeep(protocol, o.protocol, true) && compareDeep(summary, o.summary, true) && compareDeep(finding, o.finding, true)
1912           && compareDeep(prognosisCodeableConcept, o.prognosisCodeableConcept, true) && compareDeep(prognosisReference, o.prognosisReference, true)
1913           && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(note, o.note, true);
1914      }
1915
1916      @Override
1917      public boolean equalsShallow(Base other_) {
1918        if (!super.equalsShallow(other_))
1919          return false;
1920        if (!(other_ instanceof ClinicalImpression))
1921          return false;
1922        ClinicalImpression o = (ClinicalImpression) other_;
1923        return compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(date, o.date, true)
1924           && compareValues(protocol, o.protocol, true) && compareValues(summary, o.summary, true);
1925      }
1926
1927      public boolean isEmpty() {
1928        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusReason
1929          , code, description, subject, encounter, effective, date, performer, previous
1930          , problem, protocol, summary, finding, prognosisCodeableConcept, prognosisReference
1931          , supportingInfo, note);
1932      }
1933
1934  @Override
1935  public ResourceType getResourceType() {
1936    return ResourceType.ClinicalImpression;
1937   }
1938
1939 /**
1940   * Search parameter: <b>date</b>
1941   * <p>
1942   * Description: <b>When the assessment was documented</b><br>
1943   * Type: <b>date</b><br>
1944   * Path: <b>ClinicalImpression.date</b><br>
1945   * </p>
1946   */
1947  @SearchParamDefinition(name="date", path="ClinicalImpression.date", description="When the assessment was documented", type="date" )
1948  public static final String SP_DATE = "date";
1949 /**
1950   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1951   * <p>
1952   * Description: <b>When the assessment was documented</b><br>
1953   * Type: <b>date</b><br>
1954   * Path: <b>ClinicalImpression.date</b><br>
1955   * </p>
1956   */
1957  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1958
1959 /**
1960   * Search parameter: <b>identifier</b>
1961   * <p>
1962   * Description: <b>Business identifier</b><br>
1963   * Type: <b>token</b><br>
1964   * Path: <b>ClinicalImpression.identifier</b><br>
1965   * </p>
1966   */
1967  @SearchParamDefinition(name="identifier", path="ClinicalImpression.identifier", description="Business identifier", type="token" )
1968  public static final String SP_IDENTIFIER = "identifier";
1969 /**
1970   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1971   * <p>
1972   * Description: <b>Business identifier</b><br>
1973   * Type: <b>token</b><br>
1974   * Path: <b>ClinicalImpression.identifier</b><br>
1975   * </p>
1976   */
1977  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1978
1979 /**
1980   * Search parameter: <b>problem</b>
1981   * <p>
1982   * Description: <b>Relevant impressions of patient state</b><br>
1983   * Type: <b>reference</b><br>
1984   * Path: <b>ClinicalImpression.problem</b><br>
1985   * </p>
1986   */
1987  @SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="Relevant impressions of patient state", type="reference", target={AllergyIntolerance.class, Condition.class } )
1988  public static final String SP_PROBLEM = "problem";
1989 /**
1990   * <b>Fluent Client</b> search parameter constant for <b>problem</b>
1991   * <p>
1992   * Description: <b>Relevant impressions of patient state</b><br>
1993   * Type: <b>reference</b><br>
1994   * Path: <b>ClinicalImpression.problem</b><br>
1995   * </p>
1996   */
1997  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROBLEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROBLEM);
1998
1999/**
2000   * Constant for fluent queries to be used to add include statements. Specifies
2001   * the path value of "<b>ClinicalImpression:problem</b>".
2002   */
2003  public static final ca.uhn.fhir.model.api.Include INCLUDE_PROBLEM = new ca.uhn.fhir.model.api.Include("ClinicalImpression:problem").toLocked();
2004
2005 /**
2006   * Search parameter: <b>performer</b>
2007   * <p>
2008   * Description: <b>The clinician performing the assessment</b><br>
2009   * Type: <b>reference</b><br>
2010   * Path: <b>ClinicalImpression.performer</b><br>
2011   * </p>
2012   */
2013  @SearchParamDefinition(name="performer", path="ClinicalImpression.performer", description="The clinician performing the assessment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class, PractitionerRole.class } )
2014  public static final String SP_PERFORMER = "performer";
2015 /**
2016   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
2017   * <p>
2018   * Description: <b>The clinician performing the assessment</b><br>
2019   * Type: <b>reference</b><br>
2020   * Path: <b>ClinicalImpression.performer</b><br>
2021   * </p>
2022   */
2023  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
2024
2025/**
2026   * Constant for fluent queries to be used to add include statements. Specifies
2027   * the path value of "<b>ClinicalImpression:performer</b>".
2028   */
2029  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("ClinicalImpression:performer").toLocked();
2030
2031 /**
2032   * Search parameter: <b>previous</b>
2033   * <p>
2034   * Description: <b>Reference to last assessment</b><br>
2035   * Type: <b>reference</b><br>
2036   * Path: <b>ClinicalImpression.previous</b><br>
2037   * </p>
2038   */
2039  @SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference", target={ClinicalImpression.class } )
2040  public static final String SP_PREVIOUS = "previous";
2041 /**
2042   * <b>Fluent Client</b> search parameter constant for <b>previous</b>
2043   * <p>
2044   * Description: <b>Reference to last assessment</b><br>
2045   * Type: <b>reference</b><br>
2046   * Path: <b>ClinicalImpression.previous</b><br>
2047   * </p>
2048   */
2049  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREVIOUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREVIOUS);
2050
2051/**
2052   * Constant for fluent queries to be used to add include statements. Specifies
2053   * the path value of "<b>ClinicalImpression:previous</b>".
2054   */
2055  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREVIOUS = new ca.uhn.fhir.model.api.Include("ClinicalImpression:previous").toLocked();
2056
2057 /**
2058   * Search parameter: <b>finding-code</b>
2059   * <p>
2060   * Description: <b>What was found</b><br>
2061   * Type: <b>token</b><br>
2062   * Path: <b>ClinicalImpression.finding.itemCodeableConcept</b><br>
2063   * </p>
2064   */
2065  @SearchParamDefinition(name="finding-code", path="ClinicalImpression.finding.itemCodeableConcept", description="What was found", type="token" )
2066  public static final String SP_FINDING_CODE = "finding-code";
2067 /**
2068   * <b>Fluent Client</b> search parameter constant for <b>finding-code</b>
2069   * <p>
2070   * Description: <b>What was found</b><br>
2071   * Type: <b>token</b><br>
2072   * Path: <b>ClinicalImpression.finding.itemCodeableConcept</b><br>
2073   * </p>
2074   */
2075  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FINDING_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FINDING_CODE);
2076
2077 /**
2078   * Search parameter: <b>patient</b>
2079   * <p>
2080   * Description: <b>Patient or group assessed</b><br>
2081   * Type: <b>reference</b><br>
2082   * Path: <b>ClinicalImpression.subject</b><br>
2083   * </p>
2084   */
2085  @SearchParamDefinition(name="patient", path="ClinicalImpression.subject.where(resolve() is Patient)", description="Patient or group assessed", type="reference", target={Patient.class } )
2086  public static final String SP_PATIENT = "patient";
2087 /**
2088   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2089   * <p>
2090   * Description: <b>Patient or group assessed</b><br>
2091   * Type: <b>reference</b><br>
2092   * Path: <b>ClinicalImpression.subject</b><br>
2093   * </p>
2094   */
2095  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2096
2097/**
2098   * Constant for fluent queries to be used to add include statements. Specifies
2099   * the path value of "<b>ClinicalImpression:patient</b>".
2100   */
2101  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ClinicalImpression:patient").toLocked();
2102
2103 /**
2104   * Search parameter: <b>subject</b>
2105   * <p>
2106   * Description: <b>Patient or group assessed</b><br>
2107   * Type: <b>reference</b><br>
2108   * Path: <b>ClinicalImpression.subject</b><br>
2109   * </p>
2110   */
2111  @SearchParamDefinition(name="subject", path="ClinicalImpression.subject", description="Patient or group assessed", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Group.class, Patient.class } )
2112  public static final String SP_SUBJECT = "subject";
2113 /**
2114   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2115   * <p>
2116   * Description: <b>Patient or group assessed</b><br>
2117   * Type: <b>reference</b><br>
2118   * Path: <b>ClinicalImpression.subject</b><br>
2119   * </p>
2120   */
2121  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2122
2123/**
2124   * Constant for fluent queries to be used to add include statements. Specifies
2125   * the path value of "<b>ClinicalImpression:subject</b>".
2126   */
2127  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ClinicalImpression:subject").toLocked();
2128
2129 /**
2130   * Search parameter: <b>supporting-info</b>
2131   * <p>
2132   * Description: <b>Information supporting the clinical impression</b><br>
2133   * Type: <b>reference</b><br>
2134   * Path: <b>ClinicalImpression.supportingInfo</b><br>
2135   * </p>
2136   */
2137  @SearchParamDefinition(name="supporting-info", path="ClinicalImpression.supportingInfo", description="Information supporting the clinical impression", type="reference" )
2138  public static final String SP_SUPPORTING_INFO = "supporting-info";
2139 /**
2140   * <b>Fluent Client</b> search parameter constant for <b>supporting-info</b>
2141   * <p>
2142   * Description: <b>Information supporting the clinical impression</b><br>
2143   * Type: <b>reference</b><br>
2144   * Path: <b>ClinicalImpression.supportingInfo</b><br>
2145   * </p>
2146   */
2147  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTING_INFO = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTING_INFO);
2148
2149/**
2150   * Constant for fluent queries to be used to add include statements. Specifies
2151   * the path value of "<b>ClinicalImpression:supporting-info</b>".
2152   */
2153  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTING_INFO = new ca.uhn.fhir.model.api.Include("ClinicalImpression:supporting-info").toLocked();
2154
2155 /**
2156   * Search parameter: <b>encounter</b>
2157   * <p>
2158   * Description: <b>The Encounter during which this ClinicalImpression was created</b><br>
2159   * Type: <b>reference</b><br>
2160   * Path: <b>ClinicalImpression.encounter</b><br>
2161   * </p>
2162   */
2163  @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="Encounter") }, target={Encounter.class } )
2164  public static final String SP_ENCOUNTER = "encounter";
2165 /**
2166   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2167   * <p>
2168   * Description: <b>The Encounter during which this ClinicalImpression was created</b><br>
2169   * Type: <b>reference</b><br>
2170   * Path: <b>ClinicalImpression.encounter</b><br>
2171   * </p>
2172   */
2173  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2174
2175/**
2176   * Constant for fluent queries to be used to add include statements. Specifies
2177   * the path value of "<b>ClinicalImpression:encounter</b>".
2178   */
2179  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ClinicalImpression:encounter").toLocked();
2180
2181 /**
2182   * Search parameter: <b>finding-ref</b>
2183   * <p>
2184   * Description: <b>What was found</b><br>
2185   * Type: <b>reference</b><br>
2186   * Path: <b>ClinicalImpression.finding.itemReference</b><br>
2187   * </p>
2188   */
2189  @SearchParamDefinition(name="finding-ref", path="ClinicalImpression.finding.itemReference", description="What was found", type="reference", target={Condition.class, DocumentReference.class, Observation.class } )
2190  public static final String SP_FINDING_REF = "finding-ref";
2191 /**
2192   * <b>Fluent Client</b> search parameter constant for <b>finding-ref</b>
2193   * <p>
2194   * Description: <b>What was found</b><br>
2195   * Type: <b>reference</b><br>
2196   * Path: <b>ClinicalImpression.finding.itemReference</b><br>
2197   * </p>
2198   */
2199  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FINDING_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FINDING_REF);
2200
2201/**
2202   * Constant for fluent queries to be used to add include statements. Specifies
2203   * the path value of "<b>ClinicalImpression:finding-ref</b>".
2204   */
2205  public static final ca.uhn.fhir.model.api.Include INCLUDE_FINDING_REF = new ca.uhn.fhir.model.api.Include("ClinicalImpression:finding-ref").toLocked();
2206
2207 /**
2208   * Search parameter: <b>status</b>
2209   * <p>
2210   * Description: <b>preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</b><br>
2211   * Type: <b>token</b><br>
2212   * Path: <b>ClinicalImpression.status</b><br>
2213   * </p>
2214   */
2215  @SearchParamDefinition(name="status", path="ClinicalImpression.status", description="preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown", type="token" )
2216  public static final String SP_STATUS = "status";
2217 /**
2218   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2219   * <p>
2220   * Description: <b>preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</b><br>
2221   * Type: <b>token</b><br>
2222   * Path: <b>ClinicalImpression.status</b><br>
2223   * </p>
2224   */
2225  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2226
2227
2228}
2229