001package org.hl7.fhir.dstu2016may.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
042import org.hl7.fhir.utilities.Utilities;
043
044import ca.uhn.fhir.model.api.annotation.Block;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.ResourceDef;
048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
049/**
050 * 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.
051 */
052@ResourceDef(name="ClinicalImpression", profile="http://hl7.org/fhir/Profile/ClinicalImpression")
053public class ClinicalImpression extends DomainResource {
054
055    public enum ClinicalImpressionStatus {
056        /**
057         * The assessment is still on-going and results are not yet final.
058         */
059        INPROGRESS, 
060        /**
061         * The assessment is done and the results are final.
062         */
063        COMPLETED, 
064        /**
065         * This assessment was never actually done and the record is erroneous (e.g. Wrong patient).
066         */
067        ENTEREDINERROR, 
068        /**
069         * added to help the parsers
070         */
071        NULL;
072        public static ClinicalImpressionStatus fromCode(String codeString) throws FHIRException {
073            if (codeString == null || "".equals(codeString))
074                return null;
075        if ("in-progress".equals(codeString))
076          return INPROGRESS;
077        if ("completed".equals(codeString))
078          return COMPLETED;
079        if ("entered-in-error".equals(codeString))
080          return ENTEREDINERROR;
081        throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
082        }
083        public String toCode() {
084          switch (this) {
085            case INPROGRESS: return "in-progress";
086            case COMPLETED: return "completed";
087            case ENTEREDINERROR: return "entered-in-error";
088            case NULL: return null;
089            default: return "?";
090          }
091        }
092        public String getSystem() {
093          switch (this) {
094            case INPROGRESS: return "http://hl7.org/fhir/clinical-impression-status";
095            case COMPLETED: return "http://hl7.org/fhir/clinical-impression-status";
096            case ENTEREDINERROR: return "http://hl7.org/fhir/clinical-impression-status";
097            case NULL: return null;
098            default: return "?";
099          }
100        }
101        public String getDefinition() {
102          switch (this) {
103            case INPROGRESS: return "The assessment is still on-going and results are not yet final.";
104            case COMPLETED: return "The assessment is done and the results are final.";
105            case ENTEREDINERROR: return "This assessment was never actually done and the record is erroneous (e.g. Wrong patient).";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getDisplay() {
111          switch (this) {
112            case INPROGRESS: return "In progress";
113            case COMPLETED: return "Completed";
114            case ENTEREDINERROR: return "Entered in Error";
115            case NULL: return null;
116            default: return "?";
117          }
118        }
119    }
120
121  public static class ClinicalImpressionStatusEnumFactory implements EnumFactory<ClinicalImpressionStatus> {
122    public ClinicalImpressionStatus fromCode(String codeString) throws IllegalArgumentException {
123      if (codeString == null || "".equals(codeString))
124            if (codeString == null || "".equals(codeString))
125                return null;
126        if ("in-progress".equals(codeString))
127          return ClinicalImpressionStatus.INPROGRESS;
128        if ("completed".equals(codeString))
129          return ClinicalImpressionStatus.COMPLETED;
130        if ("entered-in-error".equals(codeString))
131          return ClinicalImpressionStatus.ENTEREDINERROR;
132        throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
133        }
134        public Enumeration<ClinicalImpressionStatus> fromType(Base code) throws FHIRException {
135          if (code == null || code.isEmpty())
136            return null;
137          String codeString = ((PrimitiveType) code).asStringValue();
138          if (codeString == null || "".equals(codeString))
139            return null;
140        if ("in-progress".equals(codeString))
141          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.INPROGRESS);
142        if ("completed".equals(codeString))
143          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.COMPLETED);
144        if ("entered-in-error".equals(codeString))
145          return new Enumeration<ClinicalImpressionStatus>(this, ClinicalImpressionStatus.ENTEREDINERROR);
146        throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
147        }
148    public String toCode(ClinicalImpressionStatus code) {
149      if (code == ClinicalImpressionStatus.INPROGRESS)
150        return "in-progress";
151      if (code == ClinicalImpressionStatus.COMPLETED)
152        return "completed";
153      if (code == ClinicalImpressionStatus.ENTEREDINERROR)
154        return "entered-in-error";
155      return "?";
156      }
157    public String toSystem(ClinicalImpressionStatus code) {
158      return code.getSystem();
159      }
160    }
161
162    @Block()
163    public static class ClinicalImpressionInvestigationsComponent extends BackboneElement implements IBaseBackboneElement {
164        /**
165         * A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.
166         */
167        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
168        @Description(shortDefinition="A name/code for the set", formalDefinition="A name/code for the group (\"set\") of investigations. Typically, this will be something like \"signs\", \"symptoms\", \"clinical\", \"diagnostic\", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used." )
169        protected CodeableConcept code;
170
171        /**
172         * A record of a specific investigation that was undertaken.
173         */
174        @Child(name = "item", type = {Observation.class, QuestionnaireResponse.class, FamilyMemberHistory.class, DiagnosticReport.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
175        @Description(shortDefinition="Record of a specific investigation", formalDefinition="A record of a specific investigation that was undertaken." )
176        protected List<Reference> item;
177        /**
178         * The actual objects that are the target of the reference (A record of a specific investigation that was undertaken.)
179         */
180        protected List<Resource> itemTarget;
181
182
183        private static final long serialVersionUID = -301363326L;
184
185    /**
186     * Constructor
187     */
188      public ClinicalImpressionInvestigationsComponent() {
189        super();
190      }
191
192    /**
193     * Constructor
194     */
195      public ClinicalImpressionInvestigationsComponent(CodeableConcept code) {
196        super();
197        this.code = code;
198      }
199
200        /**
201         * @return {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.)
202         */
203        public CodeableConcept getCode() { 
204          if (this.code == null)
205            if (Configuration.errorOnAutoCreate())
206              throw new Error("Attempt to auto-create ClinicalImpressionInvestigationsComponent.code");
207            else if (Configuration.doAutoCreate())
208              this.code = new CodeableConcept(); // cc
209          return this.code;
210        }
211
212        public boolean hasCode() { 
213          return this.code != null && !this.code.isEmpty();
214        }
215
216        /**
217         * @param value {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.)
218         */
219        public ClinicalImpressionInvestigationsComponent setCode(CodeableConcept value) { 
220          this.code = value;
221          return this;
222        }
223
224        /**
225         * @return {@link #item} (A record of a specific investigation that was undertaken.)
226         */
227        public List<Reference> getItem() { 
228          if (this.item == null)
229            this.item = new ArrayList<Reference>();
230          return this.item;
231        }
232
233        public boolean hasItem() { 
234          if (this.item == null)
235            return false;
236          for (Reference item : this.item)
237            if (!item.isEmpty())
238              return true;
239          return false;
240        }
241
242        /**
243         * @return {@link #item} (A record of a specific investigation that was undertaken.)
244         */
245    // syntactic sugar
246        public Reference addItem() { //3
247          Reference t = new Reference();
248          if (this.item == null)
249            this.item = new ArrayList<Reference>();
250          this.item.add(t);
251          return t;
252        }
253
254    // syntactic sugar
255        public ClinicalImpressionInvestigationsComponent addItem(Reference t) { //3
256          if (t == null)
257            return this;
258          if (this.item == null)
259            this.item = new ArrayList<Reference>();
260          this.item.add(t);
261          return this;
262        }
263
264        /**
265         * @return {@link #item} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A record of a specific investigation that was undertaken.)
266         */
267        public List<Resource> getItemTarget() { 
268          if (this.itemTarget == null)
269            this.itemTarget = new ArrayList<Resource>();
270          return this.itemTarget;
271        }
272
273        protected void listChildren(List<Property> childrenList) {
274          super.listChildren(childrenList);
275          childrenList.add(new Property("code", "CodeableConcept", "A name/code for the group (\"set\") of investigations. Typically, this will be something like \"signs\", \"symptoms\", \"clinical\", \"diagnostic\", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", 0, java.lang.Integer.MAX_VALUE, code));
276          childrenList.add(new Property("item", "Reference(Observation|QuestionnaireResponse|FamilyMemberHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item));
277        }
278
279      @Override
280      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
281        switch (hash) {
282        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
283        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // Reference
284        default: return super.getProperty(hash, name, checkValid);
285        }
286
287      }
288
289      @Override
290      public void setProperty(int hash, String name, Base value) throws FHIRException {
291        switch (hash) {
292        case 3059181: // code
293          this.code = castToCodeableConcept(value); // CodeableConcept
294          break;
295        case 3242771: // item
296          this.getItem().add(castToReference(value)); // Reference
297          break;
298        default: super.setProperty(hash, name, value);
299        }
300
301      }
302
303      @Override
304      public void setProperty(String name, Base value) throws FHIRException {
305        if (name.equals("code"))
306          this.code = castToCodeableConcept(value); // CodeableConcept
307        else if (name.equals("item"))
308          this.getItem().add(castToReference(value));
309        else
310          super.setProperty(name, value);
311      }
312
313      @Override
314      public Base makeProperty(int hash, String name) throws FHIRException {
315        switch (hash) {
316        case 3059181:  return getCode(); // CodeableConcept
317        case 3242771:  return addItem(); // Reference
318        default: return super.makeProperty(hash, name);
319        }
320
321      }
322
323      @Override
324      public Base addChild(String name) throws FHIRException {
325        if (name.equals("code")) {
326          this.code = new CodeableConcept();
327          return this.code;
328        }
329        else if (name.equals("item")) {
330          return addItem();
331        }
332        else
333          return super.addChild(name);
334      }
335
336      public ClinicalImpressionInvestigationsComponent copy() {
337        ClinicalImpressionInvestigationsComponent dst = new ClinicalImpressionInvestigationsComponent();
338        copyValues(dst);
339        dst.code = code == null ? null : code.copy();
340        if (item != null) {
341          dst.item = new ArrayList<Reference>();
342          for (Reference i : item)
343            dst.item.add(i.copy());
344        };
345        return dst;
346      }
347
348      @Override
349      public boolean equalsDeep(Base other) {
350        if (!super.equalsDeep(other))
351          return false;
352        if (!(other instanceof ClinicalImpressionInvestigationsComponent))
353          return false;
354        ClinicalImpressionInvestigationsComponent o = (ClinicalImpressionInvestigationsComponent) other;
355        return compareDeep(code, o.code, true) && compareDeep(item, o.item, true);
356      }
357
358      @Override
359      public boolean equalsShallow(Base other) {
360        if (!super.equalsShallow(other))
361          return false;
362        if (!(other instanceof ClinicalImpressionInvestigationsComponent))
363          return false;
364        ClinicalImpressionInvestigationsComponent o = (ClinicalImpressionInvestigationsComponent) other;
365        return true;
366      }
367
368      public boolean isEmpty() {
369        return super.isEmpty() && (code == null || code.isEmpty()) && (item == null || item.isEmpty())
370          ;
371      }
372
373  public String fhirType() {
374    return "ClinicalImpression.investigations";
375
376  }
377
378  }
379
380    @Block()
381    public static class ClinicalImpressionFindingComponent extends BackboneElement implements IBaseBackboneElement {
382        /**
383         * Specific text of code for finding or diagnosis.
384         */
385        @Child(name = "item", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
386        @Description(shortDefinition="Specific text or code for finding", formalDefinition="Specific text of code for finding or diagnosis." )
387        protected CodeableConcept item;
388
389        /**
390         * Which investigations support finding or diagnosis.
391         */
392        @Child(name = "cause", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
393        @Description(shortDefinition="Which investigations support finding", formalDefinition="Which investigations support finding or diagnosis." )
394        protected StringType cause;
395
396        private static final long serialVersionUID = -888590978L;
397
398    /**
399     * Constructor
400     */
401      public ClinicalImpressionFindingComponent() {
402        super();
403      }
404
405    /**
406     * Constructor
407     */
408      public ClinicalImpressionFindingComponent(CodeableConcept item) {
409        super();
410        this.item = item;
411      }
412
413        /**
414         * @return {@link #item} (Specific text of code for finding or diagnosis.)
415         */
416        public CodeableConcept getItem() { 
417          if (this.item == null)
418            if (Configuration.errorOnAutoCreate())
419              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.item");
420            else if (Configuration.doAutoCreate())
421              this.item = new CodeableConcept(); // cc
422          return this.item;
423        }
424
425        public boolean hasItem() { 
426          return this.item != null && !this.item.isEmpty();
427        }
428
429        /**
430         * @param value {@link #item} (Specific text of code for finding or diagnosis.)
431         */
432        public ClinicalImpressionFindingComponent setItem(CodeableConcept value) { 
433          this.item = value;
434          return this;
435        }
436
437        /**
438         * @return {@link #cause} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value
439         */
440        public StringType getCauseElement() { 
441          if (this.cause == null)
442            if (Configuration.errorOnAutoCreate())
443              throw new Error("Attempt to auto-create ClinicalImpressionFindingComponent.cause");
444            else if (Configuration.doAutoCreate())
445              this.cause = new StringType(); // bb
446          return this.cause;
447        }
448
449        public boolean hasCauseElement() { 
450          return this.cause != null && !this.cause.isEmpty();
451        }
452
453        public boolean hasCause() { 
454          return this.cause != null && !this.cause.isEmpty();
455        }
456
457        /**
458         * @param value {@link #cause} (Which investigations support finding or diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value
459         */
460        public ClinicalImpressionFindingComponent setCauseElement(StringType value) { 
461          this.cause = value;
462          return this;
463        }
464
465        /**
466         * @return Which investigations support finding or diagnosis.
467         */
468        public String getCause() { 
469          return this.cause == null ? null : this.cause.getValue();
470        }
471
472        /**
473         * @param value Which investigations support finding or diagnosis.
474         */
475        public ClinicalImpressionFindingComponent setCause(String value) { 
476          if (Utilities.noString(value))
477            this.cause = null;
478          else {
479            if (this.cause == null)
480              this.cause = new StringType();
481            this.cause.setValue(value);
482          }
483          return this;
484        }
485
486        protected void listChildren(List<Property> childrenList) {
487          super.listChildren(childrenList);
488          childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, item));
489          childrenList.add(new Property("cause", "string", "Which investigations support finding or diagnosis.", 0, java.lang.Integer.MAX_VALUE, cause));
490        }
491
492      @Override
493      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
494        switch (hash) {
495        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableConcept
496        case 94434409: /*cause*/ return this.cause == null ? new Base[0] : new Base[] {this.cause}; // StringType
497        default: return super.getProperty(hash, name, checkValid);
498        }
499
500      }
501
502      @Override
503      public void setProperty(int hash, String name, Base value) throws FHIRException {
504        switch (hash) {
505        case 3242771: // item
506          this.item = castToCodeableConcept(value); // CodeableConcept
507          break;
508        case 94434409: // cause
509          this.cause = castToString(value); // StringType
510          break;
511        default: super.setProperty(hash, name, value);
512        }
513
514      }
515
516      @Override
517      public void setProperty(String name, Base value) throws FHIRException {
518        if (name.equals("item"))
519          this.item = castToCodeableConcept(value); // CodeableConcept
520        else if (name.equals("cause"))
521          this.cause = castToString(value); // StringType
522        else
523          super.setProperty(name, value);
524      }
525
526      @Override
527      public Base makeProperty(int hash, String name) throws FHIRException {
528        switch (hash) {
529        case 3242771:  return getItem(); // CodeableConcept
530        case 94434409: throw new FHIRException("Cannot make property cause as it is not a complex type"); // StringType
531        default: return super.makeProperty(hash, name);
532        }
533
534      }
535
536      @Override
537      public Base addChild(String name) throws FHIRException {
538        if (name.equals("item")) {
539          this.item = new CodeableConcept();
540          return this.item;
541        }
542        else if (name.equals("cause")) {
543          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.cause");
544        }
545        else
546          return super.addChild(name);
547      }
548
549      public ClinicalImpressionFindingComponent copy() {
550        ClinicalImpressionFindingComponent dst = new ClinicalImpressionFindingComponent();
551        copyValues(dst);
552        dst.item = item == null ? null : item.copy();
553        dst.cause = cause == null ? null : cause.copy();
554        return dst;
555      }
556
557      @Override
558      public boolean equalsDeep(Base other) {
559        if (!super.equalsDeep(other))
560          return false;
561        if (!(other instanceof ClinicalImpressionFindingComponent))
562          return false;
563        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other;
564        return compareDeep(item, o.item, true) && compareDeep(cause, o.cause, true);
565      }
566
567      @Override
568      public boolean equalsShallow(Base other) {
569        if (!super.equalsShallow(other))
570          return false;
571        if (!(other instanceof ClinicalImpressionFindingComponent))
572          return false;
573        ClinicalImpressionFindingComponent o = (ClinicalImpressionFindingComponent) other;
574        return compareValues(cause, o.cause, true);
575      }
576
577      public boolean isEmpty() {
578        return super.isEmpty() && (item == null || item.isEmpty()) && (cause == null || cause.isEmpty())
579          ;
580      }
581
582  public String fhirType() {
583    return "ClinicalImpression.finding";
584
585  }
586
587  }
588
589    @Block()
590    public static class ClinicalImpressionRuledOutComponent extends BackboneElement implements IBaseBackboneElement {
591        /**
592         * Specific text of code for diagnosis.
593         */
594        @Child(name = "item", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
595        @Description(shortDefinition="Specific text of code for diagnosis", formalDefinition="Specific text of code for diagnosis." )
596        protected CodeableConcept item;
597
598        /**
599         * Grounds for elimination.
600         */
601        @Child(name = "reason", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
602        @Description(shortDefinition="Grounds for elimination", formalDefinition="Grounds for elimination." )
603        protected StringType reason;
604
605        private static final long serialVersionUID = -1001661243L;
606
607    /**
608     * Constructor
609     */
610      public ClinicalImpressionRuledOutComponent() {
611        super();
612      }
613
614    /**
615     * Constructor
616     */
617      public ClinicalImpressionRuledOutComponent(CodeableConcept item) {
618        super();
619        this.item = item;
620      }
621
622        /**
623         * @return {@link #item} (Specific text of code for diagnosis.)
624         */
625        public CodeableConcept getItem() { 
626          if (this.item == null)
627            if (Configuration.errorOnAutoCreate())
628              throw new Error("Attempt to auto-create ClinicalImpressionRuledOutComponent.item");
629            else if (Configuration.doAutoCreate())
630              this.item = new CodeableConcept(); // cc
631          return this.item;
632        }
633
634        public boolean hasItem() { 
635          return this.item != null && !this.item.isEmpty();
636        }
637
638        /**
639         * @param value {@link #item} (Specific text of code for diagnosis.)
640         */
641        public ClinicalImpressionRuledOutComponent setItem(CodeableConcept value) { 
642          this.item = value;
643          return this;
644        }
645
646        /**
647         * @return {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
648         */
649        public StringType getReasonElement() { 
650          if (this.reason == null)
651            if (Configuration.errorOnAutoCreate())
652              throw new Error("Attempt to auto-create ClinicalImpressionRuledOutComponent.reason");
653            else if (Configuration.doAutoCreate())
654              this.reason = new StringType(); // bb
655          return this.reason;
656        }
657
658        public boolean hasReasonElement() { 
659          return this.reason != null && !this.reason.isEmpty();
660        }
661
662        public boolean hasReason() { 
663          return this.reason != null && !this.reason.isEmpty();
664        }
665
666        /**
667         * @param value {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
668         */
669        public ClinicalImpressionRuledOutComponent setReasonElement(StringType value) { 
670          this.reason = value;
671          return this;
672        }
673
674        /**
675         * @return Grounds for elimination.
676         */
677        public String getReason() { 
678          return this.reason == null ? null : this.reason.getValue();
679        }
680
681        /**
682         * @param value Grounds for elimination.
683         */
684        public ClinicalImpressionRuledOutComponent setReason(String value) { 
685          if (Utilities.noString(value))
686            this.reason = null;
687          else {
688            if (this.reason == null)
689              this.reason = new StringType();
690            this.reason.setValue(value);
691          }
692          return this;
693        }
694
695        protected void listChildren(List<Property> childrenList) {
696          super.listChildren(childrenList);
697          childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for diagnosis.", 0, java.lang.Integer.MAX_VALUE, item));
698          childrenList.add(new Property("reason", "string", "Grounds for elimination.", 0, java.lang.Integer.MAX_VALUE, reason));
699        }
700
701      @Override
702      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
703        switch (hash) {
704        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableConcept
705        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // StringType
706        default: return super.getProperty(hash, name, checkValid);
707        }
708
709      }
710
711      @Override
712      public void setProperty(int hash, String name, Base value) throws FHIRException {
713        switch (hash) {
714        case 3242771: // item
715          this.item = castToCodeableConcept(value); // CodeableConcept
716          break;
717        case -934964668: // reason
718          this.reason = castToString(value); // StringType
719          break;
720        default: super.setProperty(hash, name, value);
721        }
722
723      }
724
725      @Override
726      public void setProperty(String name, Base value) throws FHIRException {
727        if (name.equals("item"))
728          this.item = castToCodeableConcept(value); // CodeableConcept
729        else if (name.equals("reason"))
730          this.reason = castToString(value); // StringType
731        else
732          super.setProperty(name, value);
733      }
734
735      @Override
736      public Base makeProperty(int hash, String name) throws FHIRException {
737        switch (hash) {
738        case 3242771:  return getItem(); // CodeableConcept
739        case -934964668: throw new FHIRException("Cannot make property reason as it is not a complex type"); // StringType
740        default: return super.makeProperty(hash, name);
741        }
742
743      }
744
745      @Override
746      public Base addChild(String name) throws FHIRException {
747        if (name.equals("item")) {
748          this.item = new CodeableConcept();
749          return this.item;
750        }
751        else if (name.equals("reason")) {
752          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.reason");
753        }
754        else
755          return super.addChild(name);
756      }
757
758      public ClinicalImpressionRuledOutComponent copy() {
759        ClinicalImpressionRuledOutComponent dst = new ClinicalImpressionRuledOutComponent();
760        copyValues(dst);
761        dst.item = item == null ? null : item.copy();
762        dst.reason = reason == null ? null : reason.copy();
763        return dst;
764      }
765
766      @Override
767      public boolean equalsDeep(Base other) {
768        if (!super.equalsDeep(other))
769          return false;
770        if (!(other instanceof ClinicalImpressionRuledOutComponent))
771          return false;
772        ClinicalImpressionRuledOutComponent o = (ClinicalImpressionRuledOutComponent) other;
773        return compareDeep(item, o.item, true) && compareDeep(reason, o.reason, true);
774      }
775
776      @Override
777      public boolean equalsShallow(Base other) {
778        if (!super.equalsShallow(other))
779          return false;
780        if (!(other instanceof ClinicalImpressionRuledOutComponent))
781          return false;
782        ClinicalImpressionRuledOutComponent o = (ClinicalImpressionRuledOutComponent) other;
783        return compareValues(reason, o.reason, true);
784      }
785
786      public boolean isEmpty() {
787        return super.isEmpty() && (item == null || item.isEmpty()) && (reason == null || reason.isEmpty())
788          ;
789      }
790
791  public String fhirType() {
792    return "ClinicalImpression.ruledOut";
793
794  }
795
796  }
797
798    /**
799     * The patient being assessed.
800     */
801    @Child(name = "patient", type = {Patient.class}, order=0, min=1, max=1, modifier=false, summary=true)
802    @Description(shortDefinition="The patient being assessed", formalDefinition="The patient being assessed." )
803    protected Reference patient;
804
805    /**
806     * The actual object that is the target of the reference (The patient being assessed.)
807     */
808    protected Patient patientTarget;
809
810    /**
811     * The clinician performing the assessment.
812     */
813    @Child(name = "assessor", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true)
814    @Description(shortDefinition="The clinician performing the assessment", formalDefinition="The clinician performing the assessment." )
815    protected Reference assessor;
816
817    /**
818     * The actual object that is the target of the reference (The clinician performing the assessment.)
819     */
820    protected Practitioner assessorTarget;
821
822    /**
823     * Identifies the workflow status of the assessment.
824     */
825    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
826    @Description(shortDefinition="in-progress | completed | entered-in-error", formalDefinition="Identifies the workflow status of the assessment." )
827    protected Enumeration<ClinicalImpressionStatus> status;
828
829    /**
830     * The point in time at which the assessment was concluded (not when it was recorded).
831     */
832    @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
833    @Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." )
834    protected DateTimeType date;
835
836    /**
837     * A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.
838     */
839    @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
840    @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." )
841    protected StringType description;
842
843    /**
844     * A reference to the last assesment that was conducted bon 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.
845     */
846    @Child(name = "previous", type = {ClinicalImpression.class}, order=5, min=0, max=1, modifier=false, summary=false)
847    @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon 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." )
848    protected Reference previous;
849
850    /**
851     * The actual object that is the target of the reference (A reference to the last assesment that was conducted bon 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.)
852     */
853    protected ClinicalImpression previousTarget;
854
855    /**
856     * This a list of the general problems/conditions for a patient.
857     */
858    @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
859    @Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." )
860    protected List<Reference> problem;
861    /**
862     * The actual objects that are the target of the reference (This a list of the general problems/conditions for a patient.)
863     */
864    protected List<Resource> problemTarget;
865
866
867    /**
868     * The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.
869     */
870    @Child(name = "trigger", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false)
871    @Description(shortDefinition="Request or event that necessitated this assessment", formalDefinition="The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource." )
872    protected Type trigger;
873
874    /**
875     * One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.
876     */
877    @Child(name = "investigations", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
878    @Description(shortDefinition="One or more sets of investigations (signs, symptions, etc.)", formalDefinition="One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." )
879    protected List<ClinicalImpressionInvestigationsComponent> investigations;
880
881    /**
882     * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
883     */
884    @Child(name = "protocol", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=false)
885    @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." )
886    protected UriType protocol;
887
888    /**
889     * A text summary of the investigations and the diagnosis.
890     */
891    @Child(name = "summary", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
892    @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." )
893    protected StringType summary;
894
895    /**
896     * Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.
897     */
898    @Child(name = "finding", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
899    @Description(shortDefinition="Possible or likely findings and diagnoses", formalDefinition="Specific findings or diagnoses that was considered likely or relevant to ongoing treatment." )
900    protected List<ClinicalImpressionFindingComponent> finding;
901
902    /**
903     * Diagnoses/conditions resolved since the last assessment.
904     */
905    @Child(name = "resolved", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
906    @Description(shortDefinition="Diagnoses/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." )
907    protected List<CodeableConcept> resolved;
908
909    /**
910     * Diagnosis considered not possible.
911     */
912    @Child(name = "ruledOut", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
913    @Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." )
914    protected List<ClinicalImpressionRuledOutComponent> ruledOut;
915
916    /**
917     * Estimate of likely outcome.
918     */
919    @Child(name = "prognosis", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false)
920    @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." )
921    protected StringType prognosis;
922
923    /**
924     * Plan of action after assessment.
925     */
926    @Child(name = "plan", type = {CarePlan.class, Appointment.class, CommunicationRequest.class, DeviceUseRequest.class, DiagnosticOrder.class, MedicationOrder.class, NutritionOrder.class, Order.class, ProcedureRequest.class, ProcessRequest.class, ReferralRequest.class, SupplyRequest.class, VisionPrescription.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
927    @Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." )
928    protected List<Reference> plan;
929    /**
930     * The actual objects that are the target of the reference (Plan of action after assessment.)
931     */
932    protected List<Resource> planTarget;
933
934
935    /**
936     * Actions taken during assessment.
937     */
938    @Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationOrder.class, DiagnosticOrder.class, NutritionOrder.class, SupplyRequest.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
939    @Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." )
940    protected List<Reference> action;
941    /**
942     * The actual objects that are the target of the reference (Actions taken during assessment.)
943     */
944    protected List<Resource> actionTarget;
945
946
947    private static final long serialVersionUID = 1650458630L;
948
949  /**
950   * Constructor
951   */
952    public ClinicalImpression() {
953      super();
954    }
955
956  /**
957   * Constructor
958   */
959    public ClinicalImpression(Reference patient, Enumeration<ClinicalImpressionStatus> status) {
960      super();
961      this.patient = patient;
962      this.status = status;
963    }
964
965    /**
966     * @return {@link #patient} (The patient being assessed.)
967     */
968    public Reference getPatient() { 
969      if (this.patient == null)
970        if (Configuration.errorOnAutoCreate())
971          throw new Error("Attempt to auto-create ClinicalImpression.patient");
972        else if (Configuration.doAutoCreate())
973          this.patient = new Reference(); // cc
974      return this.patient;
975    }
976
977    public boolean hasPatient() { 
978      return this.patient != null && !this.patient.isEmpty();
979    }
980
981    /**
982     * @param value {@link #patient} (The patient being assessed.)
983     */
984    public ClinicalImpression setPatient(Reference value) { 
985      this.patient = value;
986      return this;
987    }
988
989    /**
990     * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient being assessed.)
991     */
992    public Patient getPatientTarget() { 
993      if (this.patientTarget == null)
994        if (Configuration.errorOnAutoCreate())
995          throw new Error("Attempt to auto-create ClinicalImpression.patient");
996        else if (Configuration.doAutoCreate())
997          this.patientTarget = new Patient(); // aa
998      return this.patientTarget;
999    }
1000
1001    /**
1002     * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient being assessed.)
1003     */
1004    public ClinicalImpression setPatientTarget(Patient value) { 
1005      this.patientTarget = value;
1006      return this;
1007    }
1008
1009    /**
1010     * @return {@link #assessor} (The clinician performing the assessment.)
1011     */
1012    public Reference getAssessor() { 
1013      if (this.assessor == null)
1014        if (Configuration.errorOnAutoCreate())
1015          throw new Error("Attempt to auto-create ClinicalImpression.assessor");
1016        else if (Configuration.doAutoCreate())
1017          this.assessor = new Reference(); // cc
1018      return this.assessor;
1019    }
1020
1021    public boolean hasAssessor() { 
1022      return this.assessor != null && !this.assessor.isEmpty();
1023    }
1024
1025    /**
1026     * @param value {@link #assessor} (The clinician performing the assessment.)
1027     */
1028    public ClinicalImpression setAssessor(Reference value) { 
1029      this.assessor = value;
1030      return this;
1031    }
1032
1033    /**
1034     * @return {@link #assessor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The clinician performing the assessment.)
1035     */
1036    public Practitioner getAssessorTarget() { 
1037      if (this.assessorTarget == null)
1038        if (Configuration.errorOnAutoCreate())
1039          throw new Error("Attempt to auto-create ClinicalImpression.assessor");
1040        else if (Configuration.doAutoCreate())
1041          this.assessorTarget = new Practitioner(); // aa
1042      return this.assessorTarget;
1043    }
1044
1045    /**
1046     * @param value {@link #assessor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The clinician performing the assessment.)
1047     */
1048    public ClinicalImpression setAssessorTarget(Practitioner value) { 
1049      this.assessorTarget = value;
1050      return this;
1051    }
1052
1053    /**
1054     * @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
1055     */
1056    public Enumeration<ClinicalImpressionStatus> getStatusElement() { 
1057      if (this.status == null)
1058        if (Configuration.errorOnAutoCreate())
1059          throw new Error("Attempt to auto-create ClinicalImpression.status");
1060        else if (Configuration.doAutoCreate())
1061          this.status = new Enumeration<ClinicalImpressionStatus>(new ClinicalImpressionStatusEnumFactory()); // bb
1062      return this.status;
1063    }
1064
1065    public boolean hasStatusElement() { 
1066      return this.status != null && !this.status.isEmpty();
1067    }
1068
1069    public boolean hasStatus() { 
1070      return this.status != null && !this.status.isEmpty();
1071    }
1072
1073    /**
1074     * @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
1075     */
1076    public ClinicalImpression setStatusElement(Enumeration<ClinicalImpressionStatus> value) { 
1077      this.status = value;
1078      return this;
1079    }
1080
1081    /**
1082     * @return Identifies the workflow status of the assessment.
1083     */
1084    public ClinicalImpressionStatus getStatus() { 
1085      return this.status == null ? null : this.status.getValue();
1086    }
1087
1088    /**
1089     * @param value Identifies the workflow status of the assessment.
1090     */
1091    public ClinicalImpression setStatus(ClinicalImpressionStatus value) { 
1092        if (this.status == null)
1093          this.status = new Enumeration<ClinicalImpressionStatus>(new ClinicalImpressionStatusEnumFactory());
1094        this.status.setValue(value);
1095      return this;
1096    }
1097
1098    /**
1099     * @return {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1100     */
1101    public DateTimeType getDateElement() { 
1102      if (this.date == null)
1103        if (Configuration.errorOnAutoCreate())
1104          throw new Error("Attempt to auto-create ClinicalImpression.date");
1105        else if (Configuration.doAutoCreate())
1106          this.date = new DateTimeType(); // bb
1107      return this.date;
1108    }
1109
1110    public boolean hasDateElement() { 
1111      return this.date != null && !this.date.isEmpty();
1112    }
1113
1114    public boolean hasDate() { 
1115      return this.date != null && !this.date.isEmpty();
1116    }
1117
1118    /**
1119     * @param value {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1120     */
1121    public ClinicalImpression setDateElement(DateTimeType value) { 
1122      this.date = value;
1123      return this;
1124    }
1125
1126    /**
1127     * @return The point in time at which the assessment was concluded (not when it was recorded).
1128     */
1129    public Date getDate() { 
1130      return this.date == null ? null : this.date.getValue();
1131    }
1132
1133    /**
1134     * @param value The point in time at which the assessment was concluded (not when it was recorded).
1135     */
1136    public ClinicalImpression setDate(Date value) { 
1137      if (value == null)
1138        this.date = null;
1139      else {
1140        if (this.date == null)
1141          this.date = new DateTimeType();
1142        this.date.setValue(value);
1143      }
1144      return this;
1145    }
1146
1147    /**
1148     * @return {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1149     */
1150    public StringType getDescriptionElement() { 
1151      if (this.description == null)
1152        if (Configuration.errorOnAutoCreate())
1153          throw new Error("Attempt to auto-create ClinicalImpression.description");
1154        else if (Configuration.doAutoCreate())
1155          this.description = new StringType(); // bb
1156      return this.description;
1157    }
1158
1159    public boolean hasDescriptionElement() { 
1160      return this.description != null && !this.description.isEmpty();
1161    }
1162
1163    public boolean hasDescription() { 
1164      return this.description != null && !this.description.isEmpty();
1165    }
1166
1167    /**
1168     * @param value {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1169     */
1170    public ClinicalImpression setDescriptionElement(StringType value) { 
1171      this.description = value;
1172      return this;
1173    }
1174
1175    /**
1176     * @return A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.
1177     */
1178    public String getDescription() { 
1179      return this.description == null ? null : this.description.getValue();
1180    }
1181
1182    /**
1183     * @param value A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.
1184     */
1185    public ClinicalImpression setDescription(String value) { 
1186      if (Utilities.noString(value))
1187        this.description = null;
1188      else {
1189        if (this.description == null)
1190          this.description = new StringType();
1191        this.description.setValue(value);
1192      }
1193      return this;
1194    }
1195
1196    /**
1197     * @return {@link #previous} (A reference to the last assesment that was conducted bon 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.)
1198     */
1199    public Reference getPrevious() { 
1200      if (this.previous == null)
1201        if (Configuration.errorOnAutoCreate())
1202          throw new Error("Attempt to auto-create ClinicalImpression.previous");
1203        else if (Configuration.doAutoCreate())
1204          this.previous = new Reference(); // cc
1205      return this.previous;
1206    }
1207
1208    public boolean hasPrevious() { 
1209      return this.previous != null && !this.previous.isEmpty();
1210    }
1211
1212    /**
1213     * @param value {@link #previous} (A reference to the last assesment that was conducted bon 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.)
1214     */
1215    public ClinicalImpression setPrevious(Reference value) { 
1216      this.previous = value;
1217      return this;
1218    }
1219
1220    /**
1221     * @return {@link #previous} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon 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.)
1222     */
1223    public ClinicalImpression getPreviousTarget() { 
1224      if (this.previousTarget == null)
1225        if (Configuration.errorOnAutoCreate())
1226          throw new Error("Attempt to auto-create ClinicalImpression.previous");
1227        else if (Configuration.doAutoCreate())
1228          this.previousTarget = new ClinicalImpression(); // aa
1229      return this.previousTarget;
1230    }
1231
1232    /**
1233     * @param value {@link #previous} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon 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.)
1234     */
1235    public ClinicalImpression setPreviousTarget(ClinicalImpression value) { 
1236      this.previousTarget = value;
1237      return this;
1238    }
1239
1240    /**
1241     * @return {@link #problem} (This a list of the general problems/conditions for a patient.)
1242     */
1243    public List<Reference> getProblem() { 
1244      if (this.problem == null)
1245        this.problem = new ArrayList<Reference>();
1246      return this.problem;
1247    }
1248
1249    public boolean hasProblem() { 
1250      if (this.problem == null)
1251        return false;
1252      for (Reference item : this.problem)
1253        if (!item.isEmpty())
1254          return true;
1255      return false;
1256    }
1257
1258    /**
1259     * @return {@link #problem} (This a list of the general problems/conditions for a patient.)
1260     */
1261    // syntactic sugar
1262    public Reference addProblem() { //3
1263      Reference t = new Reference();
1264      if (this.problem == null)
1265        this.problem = new ArrayList<Reference>();
1266      this.problem.add(t);
1267      return t;
1268    }
1269
1270    // syntactic sugar
1271    public ClinicalImpression addProblem(Reference t) { //3
1272      if (t == null)
1273        return this;
1274      if (this.problem == null)
1275        this.problem = new ArrayList<Reference>();
1276      this.problem.add(t);
1277      return this;
1278    }
1279
1280    /**
1281     * @return {@link #problem} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. This a list of the general problems/conditions for a patient.)
1282     */
1283    public List<Resource> getProblemTarget() { 
1284      if (this.problemTarget == null)
1285        this.problemTarget = new ArrayList<Resource>();
1286      return this.problemTarget;
1287    }
1288
1289    /**
1290     * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.)
1291     */
1292    public Type getTrigger() { 
1293      return this.trigger;
1294    }
1295
1296    /**
1297     * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.)
1298     */
1299    public CodeableConcept getTriggerCodeableConcept() throws FHIRException { 
1300      if (!(this.trigger instanceof CodeableConcept))
1301        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.trigger.getClass().getName()+" was encountered");
1302      return (CodeableConcept) this.trigger;
1303    }
1304
1305    public boolean hasTriggerCodeableConcept() { 
1306      return this.trigger instanceof CodeableConcept;
1307    }
1308
1309    /**
1310     * @return {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.)
1311     */
1312    public Reference getTriggerReference() throws FHIRException { 
1313      if (!(this.trigger instanceof Reference))
1314        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.trigger.getClass().getName()+" was encountered");
1315      return (Reference) this.trigger;
1316    }
1317
1318    public boolean hasTriggerReference() { 
1319      return this.trigger instanceof Reference;
1320    }
1321
1322    public boolean hasTrigger() { 
1323      return this.trigger != null && !this.trigger.isEmpty();
1324    }
1325
1326    /**
1327     * @param value {@link #trigger} (The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.)
1328     */
1329    public ClinicalImpression setTrigger(Type value) { 
1330      this.trigger = value;
1331      return this;
1332    }
1333
1334    /**
1335     * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.)
1336     */
1337    public List<ClinicalImpressionInvestigationsComponent> getInvestigations() { 
1338      if (this.investigations == null)
1339        this.investigations = new ArrayList<ClinicalImpressionInvestigationsComponent>();
1340      return this.investigations;
1341    }
1342
1343    public boolean hasInvestigations() { 
1344      if (this.investigations == null)
1345        return false;
1346      for (ClinicalImpressionInvestigationsComponent item : this.investigations)
1347        if (!item.isEmpty())
1348          return true;
1349      return false;
1350    }
1351
1352    /**
1353     * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.)
1354     */
1355    // syntactic sugar
1356    public ClinicalImpressionInvestigationsComponent addInvestigations() { //3
1357      ClinicalImpressionInvestigationsComponent t = new ClinicalImpressionInvestigationsComponent();
1358      if (this.investigations == null)
1359        this.investigations = new ArrayList<ClinicalImpressionInvestigationsComponent>();
1360      this.investigations.add(t);
1361      return t;
1362    }
1363
1364    // syntactic sugar
1365    public ClinicalImpression addInvestigations(ClinicalImpressionInvestigationsComponent t) { //3
1366      if (t == null)
1367        return this;
1368      if (this.investigations == null)
1369        this.investigations = new ArrayList<ClinicalImpressionInvestigationsComponent>();
1370      this.investigations.add(t);
1371      return this;
1372    }
1373
1374    /**
1375     * @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.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value
1376     */
1377    public UriType getProtocolElement() { 
1378      if (this.protocol == null)
1379        if (Configuration.errorOnAutoCreate())
1380          throw new Error("Attempt to auto-create ClinicalImpression.protocol");
1381        else if (Configuration.doAutoCreate())
1382          this.protocol = new UriType(); // bb
1383      return this.protocol;
1384    }
1385
1386    public boolean hasProtocolElement() { 
1387      return this.protocol != null && !this.protocol.isEmpty();
1388    }
1389
1390    public boolean hasProtocol() { 
1391      return this.protocol != null && !this.protocol.isEmpty();
1392    }
1393
1394    /**
1395     * @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.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value
1396     */
1397    public ClinicalImpression setProtocolElement(UriType value) { 
1398      this.protocol = value;
1399      return this;
1400    }
1401
1402    /**
1403     * @return Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
1404     */
1405    public String getProtocol() { 
1406      return this.protocol == null ? null : this.protocol.getValue();
1407    }
1408
1409    /**
1410     * @param value Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
1411     */
1412    public ClinicalImpression setProtocol(String value) { 
1413      if (Utilities.noString(value))
1414        this.protocol = null;
1415      else {
1416        if (this.protocol == null)
1417          this.protocol = new UriType();
1418        this.protocol.setValue(value);
1419      }
1420      return this;
1421    }
1422
1423    /**
1424     * @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
1425     */
1426    public StringType getSummaryElement() { 
1427      if (this.summary == null)
1428        if (Configuration.errorOnAutoCreate())
1429          throw new Error("Attempt to auto-create ClinicalImpression.summary");
1430        else if (Configuration.doAutoCreate())
1431          this.summary = new StringType(); // bb
1432      return this.summary;
1433    }
1434
1435    public boolean hasSummaryElement() { 
1436      return this.summary != null && !this.summary.isEmpty();
1437    }
1438
1439    public boolean hasSummary() { 
1440      return this.summary != null && !this.summary.isEmpty();
1441    }
1442
1443    /**
1444     * @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
1445     */
1446    public ClinicalImpression setSummaryElement(StringType value) { 
1447      this.summary = value;
1448      return this;
1449    }
1450
1451    /**
1452     * @return A text summary of the investigations and the diagnosis.
1453     */
1454    public String getSummary() { 
1455      return this.summary == null ? null : this.summary.getValue();
1456    }
1457
1458    /**
1459     * @param value A text summary of the investigations and the diagnosis.
1460     */
1461    public ClinicalImpression setSummary(String value) { 
1462      if (Utilities.noString(value))
1463        this.summary = null;
1464      else {
1465        if (this.summary == null)
1466          this.summary = new StringType();
1467        this.summary.setValue(value);
1468      }
1469      return this;
1470    }
1471
1472    /**
1473     * @return {@link #finding} (Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.)
1474     */
1475    public List<ClinicalImpressionFindingComponent> getFinding() { 
1476      if (this.finding == null)
1477        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1478      return this.finding;
1479    }
1480
1481    public boolean hasFinding() { 
1482      if (this.finding == null)
1483        return false;
1484      for (ClinicalImpressionFindingComponent item : this.finding)
1485        if (!item.isEmpty())
1486          return true;
1487      return false;
1488    }
1489
1490    /**
1491     * @return {@link #finding} (Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.)
1492     */
1493    // syntactic sugar
1494    public ClinicalImpressionFindingComponent addFinding() { //3
1495      ClinicalImpressionFindingComponent t = new ClinicalImpressionFindingComponent();
1496      if (this.finding == null)
1497        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1498      this.finding.add(t);
1499      return t;
1500    }
1501
1502    // syntactic sugar
1503    public ClinicalImpression addFinding(ClinicalImpressionFindingComponent t) { //3
1504      if (t == null)
1505        return this;
1506      if (this.finding == null)
1507        this.finding = new ArrayList<ClinicalImpressionFindingComponent>();
1508      this.finding.add(t);
1509      return this;
1510    }
1511
1512    /**
1513     * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.)
1514     */
1515    public List<CodeableConcept> getResolved() { 
1516      if (this.resolved == null)
1517        this.resolved = new ArrayList<CodeableConcept>();
1518      return this.resolved;
1519    }
1520
1521    public boolean hasResolved() { 
1522      if (this.resolved == null)
1523        return false;
1524      for (CodeableConcept item : this.resolved)
1525        if (!item.isEmpty())
1526          return true;
1527      return false;
1528    }
1529
1530    /**
1531     * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.)
1532     */
1533    // syntactic sugar
1534    public CodeableConcept addResolved() { //3
1535      CodeableConcept t = new CodeableConcept();
1536      if (this.resolved == null)
1537        this.resolved = new ArrayList<CodeableConcept>();
1538      this.resolved.add(t);
1539      return t;
1540    }
1541
1542    // syntactic sugar
1543    public ClinicalImpression addResolved(CodeableConcept t) { //3
1544      if (t == null)
1545        return this;
1546      if (this.resolved == null)
1547        this.resolved = new ArrayList<CodeableConcept>();
1548      this.resolved.add(t);
1549      return this;
1550    }
1551
1552    /**
1553     * @return {@link #ruledOut} (Diagnosis considered not possible.)
1554     */
1555    public List<ClinicalImpressionRuledOutComponent> getRuledOut() { 
1556      if (this.ruledOut == null)
1557        this.ruledOut = new ArrayList<ClinicalImpressionRuledOutComponent>();
1558      return this.ruledOut;
1559    }
1560
1561    public boolean hasRuledOut() { 
1562      if (this.ruledOut == null)
1563        return false;
1564      for (ClinicalImpressionRuledOutComponent item : this.ruledOut)
1565        if (!item.isEmpty())
1566          return true;
1567      return false;
1568    }
1569
1570    /**
1571     * @return {@link #ruledOut} (Diagnosis considered not possible.)
1572     */
1573    // syntactic sugar
1574    public ClinicalImpressionRuledOutComponent addRuledOut() { //3
1575      ClinicalImpressionRuledOutComponent t = new ClinicalImpressionRuledOutComponent();
1576      if (this.ruledOut == null)
1577        this.ruledOut = new ArrayList<ClinicalImpressionRuledOutComponent>();
1578      this.ruledOut.add(t);
1579      return t;
1580    }
1581
1582    // syntactic sugar
1583    public ClinicalImpression addRuledOut(ClinicalImpressionRuledOutComponent t) { //3
1584      if (t == null)
1585        return this;
1586      if (this.ruledOut == null)
1587        this.ruledOut = new ArrayList<ClinicalImpressionRuledOutComponent>();
1588      this.ruledOut.add(t);
1589      return this;
1590    }
1591
1592    /**
1593     * @return {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value
1594     */
1595    public StringType getPrognosisElement() { 
1596      if (this.prognosis == null)
1597        if (Configuration.errorOnAutoCreate())
1598          throw new Error("Attempt to auto-create ClinicalImpression.prognosis");
1599        else if (Configuration.doAutoCreate())
1600          this.prognosis = new StringType(); // bb
1601      return this.prognosis;
1602    }
1603
1604    public boolean hasPrognosisElement() { 
1605      return this.prognosis != null && !this.prognosis.isEmpty();
1606    }
1607
1608    public boolean hasPrognosis() { 
1609      return this.prognosis != null && !this.prognosis.isEmpty();
1610    }
1611
1612    /**
1613     * @param value {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value
1614     */
1615    public ClinicalImpression setPrognosisElement(StringType value) { 
1616      this.prognosis = value;
1617      return this;
1618    }
1619
1620    /**
1621     * @return Estimate of likely outcome.
1622     */
1623    public String getPrognosis() { 
1624      return this.prognosis == null ? null : this.prognosis.getValue();
1625    }
1626
1627    /**
1628     * @param value Estimate of likely outcome.
1629     */
1630    public ClinicalImpression setPrognosis(String value) { 
1631      if (Utilities.noString(value))
1632        this.prognosis = null;
1633      else {
1634        if (this.prognosis == null)
1635          this.prognosis = new StringType();
1636        this.prognosis.setValue(value);
1637      }
1638      return this;
1639    }
1640
1641    /**
1642     * @return {@link #plan} (Plan of action after assessment.)
1643     */
1644    public List<Reference> getPlan() { 
1645      if (this.plan == null)
1646        this.plan = new ArrayList<Reference>();
1647      return this.plan;
1648    }
1649
1650    public boolean hasPlan() { 
1651      if (this.plan == null)
1652        return false;
1653      for (Reference item : this.plan)
1654        if (!item.isEmpty())
1655          return true;
1656      return false;
1657    }
1658
1659    /**
1660     * @return {@link #plan} (Plan of action after assessment.)
1661     */
1662    // syntactic sugar
1663    public Reference addPlan() { //3
1664      Reference t = new Reference();
1665      if (this.plan == null)
1666        this.plan = new ArrayList<Reference>();
1667      this.plan.add(t);
1668      return t;
1669    }
1670
1671    // syntactic sugar
1672    public ClinicalImpression addPlan(Reference t) { //3
1673      if (t == null)
1674        return this;
1675      if (this.plan == null)
1676        this.plan = new ArrayList<Reference>();
1677      this.plan.add(t);
1678      return this;
1679    }
1680
1681    /**
1682     * @return {@link #plan} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Plan of action after assessment.)
1683     */
1684    public List<Resource> getPlanTarget() { 
1685      if (this.planTarget == null)
1686        this.planTarget = new ArrayList<Resource>();
1687      return this.planTarget;
1688    }
1689
1690    /**
1691     * @return {@link #action} (Actions taken during assessment.)
1692     */
1693    public List<Reference> getAction() { 
1694      if (this.action == null)
1695        this.action = new ArrayList<Reference>();
1696      return this.action;
1697    }
1698
1699    public boolean hasAction() { 
1700      if (this.action == null)
1701        return false;
1702      for (Reference item : this.action)
1703        if (!item.isEmpty())
1704          return true;
1705      return false;
1706    }
1707
1708    /**
1709     * @return {@link #action} (Actions taken during assessment.)
1710     */
1711    // syntactic sugar
1712    public Reference addAction() { //3
1713      Reference t = new Reference();
1714      if (this.action == null)
1715        this.action = new ArrayList<Reference>();
1716      this.action.add(t);
1717      return t;
1718    }
1719
1720    // syntactic sugar
1721    public ClinicalImpression addAction(Reference t) { //3
1722      if (t == null)
1723        return this;
1724      if (this.action == null)
1725        this.action = new ArrayList<Reference>();
1726      this.action.add(t);
1727      return this;
1728    }
1729
1730    /**
1731     * @return {@link #action} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Actions taken during assessment.)
1732     */
1733    public List<Resource> getActionTarget() { 
1734      if (this.actionTarget == null)
1735        this.actionTarget = new ArrayList<Resource>();
1736      return this.actionTarget;
1737    }
1738
1739      protected void listChildren(List<Property> childrenList) {
1740        super.listChildren(childrenList);
1741        childrenList.add(new Property("patient", "Reference(Patient)", "The patient being assessed.", 0, java.lang.Integer.MAX_VALUE, patient));
1742        childrenList.add(new Property("assessor", "Reference(Practitioner)", "The clinician performing the assessment.", 0, java.lang.Integer.MAX_VALUE, assessor));
1743        childrenList.add(new Property("status", "code", "Identifies the workflow status of the assessment.", 0, java.lang.Integer.MAX_VALUE, status));
1744        childrenList.add(new Property("date", "dateTime", "The point in time at which the assessment was concluded (not when it was recorded).", 0, java.lang.Integer.MAX_VALUE, date));
1745        childrenList.add(new Property("description", "string", "A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.", 0, java.lang.Integer.MAX_VALUE, description));
1746        childrenList.add(new Property("previous", "Reference(ClinicalImpression)", "A reference to the last assesment that was conducted bon 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, java.lang.Integer.MAX_VALUE, previous));
1747        childrenList.add(new Property("problem", "Reference(Condition|AllergyIntolerance)", "This a list of the general problems/conditions for a patient.", 0, java.lang.Integer.MAX_VALUE, problem));
1748        childrenList.add(new Property("trigger[x]", "CodeableConcept|Reference(Any)", "The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.", 0, java.lang.Integer.MAX_VALUE, trigger));
1749        childrenList.add(new Property("investigations", "", "One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.", 0, java.lang.Integer.MAX_VALUE, investigations));
1750        childrenList.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));
1751        childrenList.add(new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, java.lang.Integer.MAX_VALUE, summary));
1752        childrenList.add(new Property("finding", "", "Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.", 0, java.lang.Integer.MAX_VALUE, finding));
1753        childrenList.add(new Property("resolved", "CodeableConcept", "Diagnoses/conditions resolved since the last assessment.", 0, java.lang.Integer.MAX_VALUE, resolved));
1754        childrenList.add(new Property("ruledOut", "", "Diagnosis considered not possible.", 0, java.lang.Integer.MAX_VALUE, ruledOut));
1755        childrenList.add(new Property("prognosis", "string", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosis));
1756        childrenList.add(new Property("plan", "Reference(CarePlan|Appointment|CommunicationRequest|DeviceUseRequest|DiagnosticOrder|MedicationOrder|NutritionOrder|Order|ProcedureRequest|ProcessRequest|ReferralRequest|SupplyRequest|VisionPrescription)", "Plan of action after assessment.", 0, java.lang.Integer.MAX_VALUE, plan));
1757        childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationOrder|DiagnosticOrder|NutritionOrder|SupplyRequest|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action));
1758      }
1759
1760      @Override
1761      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1762        switch (hash) {
1763        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1764        case -373213113: /*assessor*/ return this.assessor == null ? new Base[0] : new Base[] {this.assessor}; // Reference
1765        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ClinicalImpressionStatus>
1766        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1767        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1768        case -1273775369: /*previous*/ return this.previous == null ? new Base[0] : new Base[] {this.previous}; // Reference
1769        case -309542241: /*problem*/ return this.problem == null ? new Base[0] : this.problem.toArray(new Base[this.problem.size()]); // Reference
1770        case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : new Base[] {this.trigger}; // Type
1771        case -428294735: /*investigations*/ return this.investigations == null ? new Base[0] : this.investigations.toArray(new Base[this.investigations.size()]); // ClinicalImpressionInvestigationsComponent
1772        case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : new Base[] {this.protocol}; // UriType
1773        case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // StringType
1774        case -853173367: /*finding*/ return this.finding == null ? new Base[0] : this.finding.toArray(new Base[this.finding.size()]); // ClinicalImpressionFindingComponent
1775        case -341328904: /*resolved*/ return this.resolved == null ? new Base[0] : this.resolved.toArray(new Base[this.resolved.size()]); // CodeableConcept
1776        case 763913542: /*ruledOut*/ return this.ruledOut == null ? new Base[0] : this.ruledOut.toArray(new Base[this.ruledOut.size()]); // ClinicalImpressionRuledOutComponent
1777        case -972050334: /*prognosis*/ return this.prognosis == null ? new Base[0] : new Base[] {this.prognosis}; // StringType
1778        case 3443497: /*plan*/ return this.plan == null ? new Base[0] : this.plan.toArray(new Base[this.plan.size()]); // Reference
1779        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // Reference
1780        default: return super.getProperty(hash, name, checkValid);
1781        }
1782
1783      }
1784
1785      @Override
1786      public void setProperty(int hash, String name, Base value) throws FHIRException {
1787        switch (hash) {
1788        case -791418107: // patient
1789          this.patient = castToReference(value); // Reference
1790          break;
1791        case -373213113: // assessor
1792          this.assessor = castToReference(value); // Reference
1793          break;
1794        case -892481550: // status
1795          this.status = new ClinicalImpressionStatusEnumFactory().fromType(value); // Enumeration<ClinicalImpressionStatus>
1796          break;
1797        case 3076014: // date
1798          this.date = castToDateTime(value); // DateTimeType
1799          break;
1800        case -1724546052: // description
1801          this.description = castToString(value); // StringType
1802          break;
1803        case -1273775369: // previous
1804          this.previous = castToReference(value); // Reference
1805          break;
1806        case -309542241: // problem
1807          this.getProblem().add(castToReference(value)); // Reference
1808          break;
1809        case -1059891784: // trigger
1810          this.trigger = (Type) value; // Type
1811          break;
1812        case -428294735: // investigations
1813          this.getInvestigations().add((ClinicalImpressionInvestigationsComponent) value); // ClinicalImpressionInvestigationsComponent
1814          break;
1815        case -989163880: // protocol
1816          this.protocol = castToUri(value); // UriType
1817          break;
1818        case -1857640538: // summary
1819          this.summary = castToString(value); // StringType
1820          break;
1821        case -853173367: // finding
1822          this.getFinding().add((ClinicalImpressionFindingComponent) value); // ClinicalImpressionFindingComponent
1823          break;
1824        case -341328904: // resolved
1825          this.getResolved().add(castToCodeableConcept(value)); // CodeableConcept
1826          break;
1827        case 763913542: // ruledOut
1828          this.getRuledOut().add((ClinicalImpressionRuledOutComponent) value); // ClinicalImpressionRuledOutComponent
1829          break;
1830        case -972050334: // prognosis
1831          this.prognosis = castToString(value); // StringType
1832          break;
1833        case 3443497: // plan
1834          this.getPlan().add(castToReference(value)); // Reference
1835          break;
1836        case -1422950858: // action
1837          this.getAction().add(castToReference(value)); // Reference
1838          break;
1839        default: super.setProperty(hash, name, value);
1840        }
1841
1842      }
1843
1844      @Override
1845      public void setProperty(String name, Base value) throws FHIRException {
1846        if (name.equals("patient"))
1847          this.patient = castToReference(value); // Reference
1848        else if (name.equals("assessor"))
1849          this.assessor = castToReference(value); // Reference
1850        else if (name.equals("status"))
1851          this.status = new ClinicalImpressionStatusEnumFactory().fromType(value); // Enumeration<ClinicalImpressionStatus>
1852        else if (name.equals("date"))
1853          this.date = castToDateTime(value); // DateTimeType
1854        else if (name.equals("description"))
1855          this.description = castToString(value); // StringType
1856        else if (name.equals("previous"))
1857          this.previous = castToReference(value); // Reference
1858        else if (name.equals("problem"))
1859          this.getProblem().add(castToReference(value));
1860        else if (name.equals("trigger[x]"))
1861          this.trigger = (Type) value; // Type
1862        else if (name.equals("investigations"))
1863          this.getInvestigations().add((ClinicalImpressionInvestigationsComponent) value);
1864        else if (name.equals("protocol"))
1865          this.protocol = castToUri(value); // UriType
1866        else if (name.equals("summary"))
1867          this.summary = castToString(value); // StringType
1868        else if (name.equals("finding"))
1869          this.getFinding().add((ClinicalImpressionFindingComponent) value);
1870        else if (name.equals("resolved"))
1871          this.getResolved().add(castToCodeableConcept(value));
1872        else if (name.equals("ruledOut"))
1873          this.getRuledOut().add((ClinicalImpressionRuledOutComponent) value);
1874        else if (name.equals("prognosis"))
1875          this.prognosis = castToString(value); // StringType
1876        else if (name.equals("plan"))
1877          this.getPlan().add(castToReference(value));
1878        else if (name.equals("action"))
1879          this.getAction().add(castToReference(value));
1880        else
1881          super.setProperty(name, value);
1882      }
1883
1884      @Override
1885      public Base makeProperty(int hash, String name) throws FHIRException {
1886        switch (hash) {
1887        case -791418107:  return getPatient(); // Reference
1888        case -373213113:  return getAssessor(); // Reference
1889        case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ClinicalImpressionStatus>
1890        case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
1891        case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
1892        case -1273775369:  return getPrevious(); // Reference
1893        case -309542241:  return addProblem(); // Reference
1894        case 1363514312:  return getTrigger(); // Type
1895        case -428294735:  return addInvestigations(); // ClinicalImpressionInvestigationsComponent
1896        case -989163880: throw new FHIRException("Cannot make property protocol as it is not a complex type"); // UriType
1897        case -1857640538: throw new FHIRException("Cannot make property summary as it is not a complex type"); // StringType
1898        case -853173367:  return addFinding(); // ClinicalImpressionFindingComponent
1899        case -341328904:  return addResolved(); // CodeableConcept
1900        case 763913542:  return addRuledOut(); // ClinicalImpressionRuledOutComponent
1901        case -972050334: throw new FHIRException("Cannot make property prognosis as it is not a complex type"); // StringType
1902        case 3443497:  return addPlan(); // Reference
1903        case -1422950858:  return addAction(); // Reference
1904        default: return super.makeProperty(hash, name);
1905        }
1906
1907      }
1908
1909      @Override
1910      public Base addChild(String name) throws FHIRException {
1911        if (name.equals("patient")) {
1912          this.patient = new Reference();
1913          return this.patient;
1914        }
1915        else if (name.equals("assessor")) {
1916          this.assessor = new Reference();
1917          return this.assessor;
1918        }
1919        else if (name.equals("status")) {
1920          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.status");
1921        }
1922        else if (name.equals("date")) {
1923          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.date");
1924        }
1925        else if (name.equals("description")) {
1926          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.description");
1927        }
1928        else if (name.equals("previous")) {
1929          this.previous = new Reference();
1930          return this.previous;
1931        }
1932        else if (name.equals("problem")) {
1933          return addProblem();
1934        }
1935        else if (name.equals("triggerCodeableConcept")) {
1936          this.trigger = new CodeableConcept();
1937          return this.trigger;
1938        }
1939        else if (name.equals("triggerReference")) {
1940          this.trigger = new Reference();
1941          return this.trigger;
1942        }
1943        else if (name.equals("investigations")) {
1944          return addInvestigations();
1945        }
1946        else if (name.equals("protocol")) {
1947          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.protocol");
1948        }
1949        else if (name.equals("summary")) {
1950          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.summary");
1951        }
1952        else if (name.equals("finding")) {
1953          return addFinding();
1954        }
1955        else if (name.equals("resolved")) {
1956          return addResolved();
1957        }
1958        else if (name.equals("ruledOut")) {
1959          return addRuledOut();
1960        }
1961        else if (name.equals("prognosis")) {
1962          throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.prognosis");
1963        }
1964        else if (name.equals("plan")) {
1965          return addPlan();
1966        }
1967        else if (name.equals("action")) {
1968          return addAction();
1969        }
1970        else
1971          return super.addChild(name);
1972      }
1973
1974  public String fhirType() {
1975    return "ClinicalImpression";
1976
1977  }
1978
1979      public ClinicalImpression copy() {
1980        ClinicalImpression dst = new ClinicalImpression();
1981        copyValues(dst);
1982        dst.patient = patient == null ? null : patient.copy();
1983        dst.assessor = assessor == null ? null : assessor.copy();
1984        dst.status = status == null ? null : status.copy();
1985        dst.date = date == null ? null : date.copy();
1986        dst.description = description == null ? null : description.copy();
1987        dst.previous = previous == null ? null : previous.copy();
1988        if (problem != null) {
1989          dst.problem = new ArrayList<Reference>();
1990          for (Reference i : problem)
1991            dst.problem.add(i.copy());
1992        };
1993        dst.trigger = trigger == null ? null : trigger.copy();
1994        if (investigations != null) {
1995          dst.investigations = new ArrayList<ClinicalImpressionInvestigationsComponent>();
1996          for (ClinicalImpressionInvestigationsComponent i : investigations)
1997            dst.investigations.add(i.copy());
1998        };
1999        dst.protocol = protocol == null ? null : protocol.copy();
2000        dst.summary = summary == null ? null : summary.copy();
2001        if (finding != null) {
2002          dst.finding = new ArrayList<ClinicalImpressionFindingComponent>();
2003          for (ClinicalImpressionFindingComponent i : finding)
2004            dst.finding.add(i.copy());
2005        };
2006        if (resolved != null) {
2007          dst.resolved = new ArrayList<CodeableConcept>();
2008          for (CodeableConcept i : resolved)
2009            dst.resolved.add(i.copy());
2010        };
2011        if (ruledOut != null) {
2012          dst.ruledOut = new ArrayList<ClinicalImpressionRuledOutComponent>();
2013          for (ClinicalImpressionRuledOutComponent i : ruledOut)
2014            dst.ruledOut.add(i.copy());
2015        };
2016        dst.prognosis = prognosis == null ? null : prognosis.copy();
2017        if (plan != null) {
2018          dst.plan = new ArrayList<Reference>();
2019          for (Reference i : plan)
2020            dst.plan.add(i.copy());
2021        };
2022        if (action != null) {
2023          dst.action = new ArrayList<Reference>();
2024          for (Reference i : action)
2025            dst.action.add(i.copy());
2026        };
2027        return dst;
2028      }
2029
2030      protected ClinicalImpression typedCopy() {
2031        return copy();
2032      }
2033
2034      @Override
2035      public boolean equalsDeep(Base other) {
2036        if (!super.equalsDeep(other))
2037          return false;
2038        if (!(other instanceof ClinicalImpression))
2039          return false;
2040        ClinicalImpression o = (ClinicalImpression) other;
2041        return compareDeep(patient, o.patient, true) && compareDeep(assessor, o.assessor, true) && compareDeep(status, o.status, true)
2042           && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) && compareDeep(previous, o.previous, true)
2043           && compareDeep(problem, o.problem, true) && compareDeep(trigger, o.trigger, true) && compareDeep(investigations, o.investigations, true)
2044           && compareDeep(protocol, o.protocol, true) && compareDeep(summary, o.summary, true) && compareDeep(finding, o.finding, true)
2045           && compareDeep(resolved, o.resolved, true) && compareDeep(ruledOut, o.ruledOut, true) && compareDeep(prognosis, o.prognosis, true)
2046           && compareDeep(plan, o.plan, true) && compareDeep(action, o.action, true);
2047      }
2048
2049      @Override
2050      public boolean equalsShallow(Base other) {
2051        if (!super.equalsShallow(other))
2052          return false;
2053        if (!(other instanceof ClinicalImpression))
2054          return false;
2055        ClinicalImpression o = (ClinicalImpression) other;
2056        return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true)
2057           && compareValues(protocol, o.protocol, true) && compareValues(summary, o.summary, true) && compareValues(prognosis, o.prognosis, true)
2058          ;
2059      }
2060
2061      public boolean isEmpty() {
2062        return super.isEmpty() && (patient == null || patient.isEmpty()) && (assessor == null || assessor.isEmpty())
2063           && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
2064           && (previous == null || previous.isEmpty()) && (problem == null || problem.isEmpty()) && (trigger == null || trigger.isEmpty())
2065           && (investigations == null || investigations.isEmpty()) && (protocol == null || protocol.isEmpty())
2066           && (summary == null || summary.isEmpty()) && (finding == null || finding.isEmpty()) && (resolved == null || resolved.isEmpty())
2067           && (ruledOut == null || ruledOut.isEmpty()) && (prognosis == null || prognosis.isEmpty())
2068           && (plan == null || plan.isEmpty()) && (action == null || action.isEmpty());
2069      }
2070
2071  @Override
2072  public ResourceType getResourceType() {
2073    return ResourceType.ClinicalImpression;
2074   }
2075
2076 /**
2077   * Search parameter: <b>assessor</b>
2078   * <p>
2079   * Description: <b>The clinician performing the assessment</b><br>
2080   * Type: <b>reference</b><br>
2081   * Path: <b>ClinicalImpression.assessor</b><br>
2082   * </p>
2083   */
2084  @SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference" )
2085  public static final String SP_ASSESSOR = "assessor";
2086 /**
2087   * <b>Fluent Client</b> search parameter constant for <b>assessor</b>
2088   * <p>
2089   * Description: <b>The clinician performing the assessment</b><br>
2090   * Type: <b>reference</b><br>
2091   * Path: <b>ClinicalImpression.assessor</b><br>
2092   * </p>
2093   */
2094  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ASSESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ASSESSOR);
2095
2096/**
2097   * Constant for fluent queries to be used to add include statements. Specifies
2098   * the path value of "<b>ClinicalImpression:assessor</b>".
2099   */
2100  public static final ca.uhn.fhir.model.api.Include INCLUDE_ASSESSOR = new ca.uhn.fhir.model.api.Include("ClinicalImpression:assessor").toLocked();
2101
2102 /**
2103   * Search parameter: <b>trigger</b>
2104   * <p>
2105   * Description: <b>Request or event that necessitated this assessment</b><br>
2106   * Type: <b>reference</b><br>
2107   * Path: <b>ClinicalImpression.triggerReference</b><br>
2108   * </p>
2109   */
2110  @SearchParamDefinition(name="trigger", path="ClinicalImpression.trigger.as(Reference)", description="Request or event that necessitated this assessment", type="reference" )
2111  public static final String SP_TRIGGER = "trigger";
2112 /**
2113   * <b>Fluent Client</b> search parameter constant for <b>trigger</b>
2114   * <p>
2115   * Description: <b>Request or event that necessitated this assessment</b><br>
2116   * Type: <b>reference</b><br>
2117   * Path: <b>ClinicalImpression.triggerReference</b><br>
2118   * </p>
2119   */
2120  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TRIGGER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TRIGGER);
2121
2122/**
2123   * Constant for fluent queries to be used to add include statements. Specifies
2124   * the path value of "<b>ClinicalImpression:trigger</b>".
2125   */
2126  public static final ca.uhn.fhir.model.api.Include INCLUDE_TRIGGER = new ca.uhn.fhir.model.api.Include("ClinicalImpression:trigger").toLocked();
2127
2128 /**
2129   * Search parameter: <b>patient</b>
2130   * <p>
2131   * Description: <b>The patient being assessed</b><br>
2132   * Type: <b>reference</b><br>
2133   * Path: <b>ClinicalImpression.patient</b><br>
2134   * </p>
2135   */
2136  @SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference" )
2137  public static final String SP_PATIENT = "patient";
2138 /**
2139   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2140   * <p>
2141   * Description: <b>The patient being assessed</b><br>
2142   * Type: <b>reference</b><br>
2143   * Path: <b>ClinicalImpression.patient</b><br>
2144   * </p>
2145   */
2146  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2147
2148/**
2149   * Constant for fluent queries to be used to add include statements. Specifies
2150   * the path value of "<b>ClinicalImpression:patient</b>".
2151   */
2152  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ClinicalImpression:patient").toLocked();
2153
2154 /**
2155   * Search parameter: <b>plan</b>
2156   * <p>
2157   * Description: <b>Plan of action after assessment</b><br>
2158   * Type: <b>reference</b><br>
2159   * Path: <b>ClinicalImpression.plan</b><br>
2160   * </p>
2161   */
2162  @SearchParamDefinition(name="plan", path="ClinicalImpression.plan", description="Plan of action after assessment", type="reference" )
2163  public static final String SP_PLAN = "plan";
2164 /**
2165   * <b>Fluent Client</b> search parameter constant for <b>plan</b>
2166   * <p>
2167   * Description: <b>Plan of action after assessment</b><br>
2168   * Type: <b>reference</b><br>
2169   * Path: <b>ClinicalImpression.plan</b><br>
2170   * </p>
2171   */
2172  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PLAN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PLAN);
2173
2174/**
2175   * Constant for fluent queries to be used to add include statements. Specifies
2176   * the path value of "<b>ClinicalImpression:plan</b>".
2177   */
2178  public static final ca.uhn.fhir.model.api.Include INCLUDE_PLAN = new ca.uhn.fhir.model.api.Include("ClinicalImpression:plan").toLocked();
2179
2180 /**
2181   * Search parameter: <b>resolved</b>
2182   * <p>
2183   * Description: <b>Diagnoses/conditions resolved since previous assessment</b><br>
2184   * Type: <b>token</b><br>
2185   * Path: <b>ClinicalImpression.resolved</b><br>
2186   * </p>
2187   */
2188  @SearchParamDefinition(name="resolved", path="ClinicalImpression.resolved", description="Diagnoses/conditions resolved since previous assessment", type="token" )
2189  public static final String SP_RESOLVED = "resolved";
2190 /**
2191   * <b>Fluent Client</b> search parameter constant for <b>resolved</b>
2192   * <p>
2193   * Description: <b>Diagnoses/conditions resolved since previous assessment</b><br>
2194   * Type: <b>token</b><br>
2195   * Path: <b>ClinicalImpression.resolved</b><br>
2196   * </p>
2197   */
2198  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOLVED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOLVED);
2199
2200 /**
2201   * Search parameter: <b>trigger-code</b>
2202   * <p>
2203   * Description: <b>Request or event that necessitated this assessment</b><br>
2204   * Type: <b>token</b><br>
2205   * Path: <b>ClinicalImpression.triggerCodeableConcept</b><br>
2206   * </p>
2207   */
2208  @SearchParamDefinition(name="trigger-code", path="ClinicalImpression.trigger.as(CodeableConcept)", description="Request or event that necessitated this assessment", type="token" )
2209  public static final String SP_TRIGGER_CODE = "trigger-code";
2210 /**
2211   * <b>Fluent Client</b> search parameter constant for <b>trigger-code</b>
2212   * <p>
2213   * Description: <b>Request or event that necessitated this assessment</b><br>
2214   * Type: <b>token</b><br>
2215   * Path: <b>ClinicalImpression.triggerCodeableConcept</b><br>
2216   * </p>
2217   */
2218  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TRIGGER_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TRIGGER_CODE);
2219
2220 /**
2221   * Search parameter: <b>previous</b>
2222   * <p>
2223   * Description: <b>Reference to last assessment</b><br>
2224   * Type: <b>reference</b><br>
2225   * Path: <b>ClinicalImpression.previous</b><br>
2226   * </p>
2227   */
2228  @SearchParamDefinition(name="previous", path="ClinicalImpression.previous", description="Reference to last assessment", type="reference" )
2229  public static final String SP_PREVIOUS = "previous";
2230 /**
2231   * <b>Fluent Client</b> search parameter constant for <b>previous</b>
2232   * <p>
2233   * Description: <b>Reference to last assessment</b><br>
2234   * Type: <b>reference</b><br>
2235   * Path: <b>ClinicalImpression.previous</b><br>
2236   * </p>
2237   */
2238  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREVIOUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREVIOUS);
2239
2240/**
2241   * Constant for fluent queries to be used to add include statements. Specifies
2242   * the path value of "<b>ClinicalImpression:previous</b>".
2243   */
2244  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREVIOUS = new ca.uhn.fhir.model.api.Include("ClinicalImpression:previous").toLocked();
2245
2246 /**
2247   * Search parameter: <b>status</b>
2248   * <p>
2249   * Description: <b>in-progress | completed | entered-in-error</b><br>
2250   * Type: <b>token</b><br>
2251   * Path: <b>ClinicalImpression.status</b><br>
2252   * </p>
2253   */
2254  @SearchParamDefinition(name="status", path="ClinicalImpression.status", description="in-progress | completed | entered-in-error", type="token" )
2255  public static final String SP_STATUS = "status";
2256 /**
2257   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2258   * <p>
2259   * Description: <b>in-progress | completed | entered-in-error</b><br>
2260   * Type: <b>token</b><br>
2261   * Path: <b>ClinicalImpression.status</b><br>
2262   * </p>
2263   */
2264  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2265
2266 /**
2267   * Search parameter: <b>action</b>
2268   * <p>
2269   * Description: <b>Actions taken during assessment</b><br>
2270   * Type: <b>reference</b><br>
2271   * Path: <b>ClinicalImpression.action</b><br>
2272   * </p>
2273   */
2274  @SearchParamDefinition(name="action", path="ClinicalImpression.action", description="Actions taken during assessment", type="reference" )
2275  public static final String SP_ACTION = "action";
2276 /**
2277   * <b>Fluent Client</b> search parameter constant for <b>action</b>
2278   * <p>
2279   * Description: <b>Actions taken during assessment</b><br>
2280   * Type: <b>reference</b><br>
2281   * Path: <b>ClinicalImpression.action</b><br>
2282   * </p>
2283   */
2284  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTION);
2285
2286/**
2287   * Constant for fluent queries to be used to add include statements. Specifies
2288   * the path value of "<b>ClinicalImpression:action</b>".
2289   */
2290  public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTION = new ca.uhn.fhir.model.api.Include("ClinicalImpression:action").toLocked();
2291
2292 /**
2293   * Search parameter: <b>finding</b>
2294   * <p>
2295   * Description: <b>Specific text or code for finding</b><br>
2296   * Type: <b>token</b><br>
2297   * Path: <b>ClinicalImpression.finding.item</b><br>
2298   * </p>
2299   */
2300  @SearchParamDefinition(name="finding", path="ClinicalImpression.finding.item", description="Specific text or code for finding", type="token" )
2301  public static final String SP_FINDING = "finding";
2302 /**
2303   * <b>Fluent Client</b> search parameter constant for <b>finding</b>
2304   * <p>
2305   * Description: <b>Specific text or code for finding</b><br>
2306   * Type: <b>token</b><br>
2307   * Path: <b>ClinicalImpression.finding.item</b><br>
2308   * </p>
2309   */
2310  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FINDING = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FINDING);
2311
2312 /**
2313   * Search parameter: <b>investigation</b>
2314   * <p>
2315   * Description: <b>Record of a specific investigation</b><br>
2316   * Type: <b>reference</b><br>
2317   * Path: <b>ClinicalImpression.investigations.item</b><br>
2318   * </p>
2319   */
2320  @SearchParamDefinition(name="investigation", path="ClinicalImpression.investigations.item", description="Record of a specific investigation", type="reference" )
2321  public static final String SP_INVESTIGATION = "investigation";
2322 /**
2323   * <b>Fluent Client</b> search parameter constant for <b>investigation</b>
2324   * <p>
2325   * Description: <b>Record of a specific investigation</b><br>
2326   * Type: <b>reference</b><br>
2327   * Path: <b>ClinicalImpression.investigations.item</b><br>
2328   * </p>
2329   */
2330  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INVESTIGATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INVESTIGATION);
2331
2332/**
2333   * Constant for fluent queries to be used to add include statements. Specifies
2334   * the path value of "<b>ClinicalImpression:investigation</b>".
2335   */
2336  public static final ca.uhn.fhir.model.api.Include INCLUDE_INVESTIGATION = new ca.uhn.fhir.model.api.Include("ClinicalImpression:investigation").toLocked();
2337
2338 /**
2339   * Search parameter: <b>problem</b>
2340   * <p>
2341   * Description: <b>General assessment of patient state</b><br>
2342   * Type: <b>reference</b><br>
2343   * Path: <b>ClinicalImpression.problem</b><br>
2344   * </p>
2345   */
2346  @SearchParamDefinition(name="problem", path="ClinicalImpression.problem", description="General assessment of patient state", type="reference" )
2347  public static final String SP_PROBLEM = "problem";
2348 /**
2349   * <b>Fluent Client</b> search parameter constant for <b>problem</b>
2350   * <p>
2351   * Description: <b>General assessment of patient state</b><br>
2352   * Type: <b>reference</b><br>
2353   * Path: <b>ClinicalImpression.problem</b><br>
2354   * </p>
2355   */
2356  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROBLEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROBLEM);
2357
2358/**
2359   * Constant for fluent queries to be used to add include statements. Specifies
2360   * the path value of "<b>ClinicalImpression:problem</b>".
2361   */
2362  public static final ca.uhn.fhir.model.api.Include INCLUDE_PROBLEM = new ca.uhn.fhir.model.api.Include("ClinicalImpression:problem").toLocked();
2363
2364 /**
2365   * Search parameter: <b>date</b>
2366   * <p>
2367   * Description: <b>When the assessment occurred</b><br>
2368   * Type: <b>date</b><br>
2369   * Path: <b>ClinicalImpression.date</b><br>
2370   * </p>
2371   */
2372  @SearchParamDefinition(name="date", path="ClinicalImpression.date", description="When the assessment occurred", type="date" )
2373  public static final String SP_DATE = "date";
2374 /**
2375   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2376   * <p>
2377   * Description: <b>When the assessment occurred</b><br>
2378   * Type: <b>date</b><br>
2379   * Path: <b>ClinicalImpression.date</b><br>
2380   * </p>
2381   */
2382  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2383
2384 /**
2385   * Search parameter: <b>ruledout</b>
2386   * <p>
2387   * Description: <b>Specific text of code for diagnosis</b><br>
2388   * Type: <b>token</b><br>
2389   * Path: <b>ClinicalImpression.ruledOut.item</b><br>
2390   * </p>
2391   */
2392  @SearchParamDefinition(name="ruledout", path="ClinicalImpression.ruledOut.item", description="Specific text of code for diagnosis", type="token" )
2393  public static final String SP_RULEDOUT = "ruledout";
2394 /**
2395   * <b>Fluent Client</b> search parameter constant for <b>ruledout</b>
2396   * <p>
2397   * Description: <b>Specific text of code for diagnosis</b><br>
2398   * Type: <b>token</b><br>
2399   * Path: <b>ClinicalImpression.ruledOut.item</b><br>
2400   * </p>
2401   */
2402  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RULEDOUT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RULEDOUT);
2403
2404
2405}