001package org.hl7.fhir.r4.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056
057import org.hl7.fhir.exceptions.FHIRException;
058import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
059
060import ca.uhn.fhir.model.api.annotation.Block;
061import ca.uhn.fhir.model.api.annotation.Child;
062import ca.uhn.fhir.model.api.annotation.Description;
063import ca.uhn.fhir.model.api.annotation.ResourceDef;
064import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
065/**
066 * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
067 */
068@ResourceDef(name="Condition", profile="http://hl7.org/fhir/StructureDefinition/Condition")
069public class Condition extends DomainResource {
070
071    @Block()
072    public static class ConditionStageComponent extends BackboneElement implements IBaseBackboneElement {
073        /**
074         * A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.
075         */
076        @Child(name = "summary", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
077        @Description(shortDefinition="Simple summary (disease specific)", formalDefinition="A simple summary of the stage such as \"Stage 3\". The determination of the stage is disease-specific." )
078        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-stage")
079        protected CodeableConcept summary;
080
081        /**
082         * Reference to a formal record of the evidence on which the staging assessment is based.
083         */
084        @Child(name = "assessment", type = {ClinicalImpression.class, DiagnosticReport.class, Observation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
085        @Description(shortDefinition="Formal record of assessment", formalDefinition="Reference to a formal record of the evidence on which the staging assessment is based." )
086        protected List<Reference> assessment;
087        /**
088         * The actual objects that are the target of the reference (Reference to a formal record of the evidence on which the staging assessment is based.)
089         */
090        protected List<Resource> assessmentTarget;
091
092
093        /**
094         * The kind of staging, such as pathological or clinical staging.
095         */
096        @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
097        @Description(shortDefinition="Kind of staging", formalDefinition="The kind of staging, such as pathological or clinical staging." )
098        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-stage-type")
099        protected CodeableConcept type;
100
101        private static final long serialVersionUID = 668627986L;
102
103    /**
104     * Constructor
105     */
106      public ConditionStageComponent() {
107        super();
108      }
109
110        /**
111         * @return {@link #summary} (A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.)
112         */
113        public CodeableConcept getSummary() { 
114          if (this.summary == null)
115            if (Configuration.errorOnAutoCreate())
116              throw new Error("Attempt to auto-create ConditionStageComponent.summary");
117            else if (Configuration.doAutoCreate())
118              this.summary = new CodeableConcept(); // cc
119          return this.summary;
120        }
121
122        public boolean hasSummary() { 
123          return this.summary != null && !this.summary.isEmpty();
124        }
125
126        /**
127         * @param value {@link #summary} (A simple summary of the stage such as "Stage 3". The determination of the stage is disease-specific.)
128         */
129        public ConditionStageComponent setSummary(CodeableConcept value) { 
130          this.summary = value;
131          return this;
132        }
133
134        /**
135         * @return {@link #assessment} (Reference to a formal record of the evidence on which the staging assessment is based.)
136         */
137        public List<Reference> getAssessment() { 
138          if (this.assessment == null)
139            this.assessment = new ArrayList<Reference>();
140          return this.assessment;
141        }
142
143        /**
144         * @return Returns a reference to <code>this</code> for easy method chaining
145         */
146        public ConditionStageComponent setAssessment(List<Reference> theAssessment) { 
147          this.assessment = theAssessment;
148          return this;
149        }
150
151        public boolean hasAssessment() { 
152          if (this.assessment == null)
153            return false;
154          for (Reference item : this.assessment)
155            if (!item.isEmpty())
156              return true;
157          return false;
158        }
159
160        public Reference addAssessment() { //3
161          Reference t = new Reference();
162          if (this.assessment == null)
163            this.assessment = new ArrayList<Reference>();
164          this.assessment.add(t);
165          return t;
166        }
167
168        public ConditionStageComponent addAssessment(Reference t) { //3
169          if (t == null)
170            return this;
171          if (this.assessment == null)
172            this.assessment = new ArrayList<Reference>();
173          this.assessment.add(t);
174          return this;
175        }
176
177        /**
178         * @return The first repetition of repeating field {@link #assessment}, creating it if it does not already exist
179         */
180        public Reference getAssessmentFirstRep() { 
181          if (getAssessment().isEmpty()) {
182            addAssessment();
183          }
184          return getAssessment().get(0);
185        }
186
187        /**
188         * @deprecated Use Reference#setResource(IBaseResource) instead
189         */
190        @Deprecated
191        public List<Resource> getAssessmentTarget() { 
192          if (this.assessmentTarget == null)
193            this.assessmentTarget = new ArrayList<Resource>();
194          return this.assessmentTarget;
195        }
196
197        /**
198         * @return {@link #type} (The kind of staging, such as pathological or clinical staging.)
199         */
200        public CodeableConcept getType() { 
201          if (this.type == null)
202            if (Configuration.errorOnAutoCreate())
203              throw new Error("Attempt to auto-create ConditionStageComponent.type");
204            else if (Configuration.doAutoCreate())
205              this.type = new CodeableConcept(); // cc
206          return this.type;
207        }
208
209        public boolean hasType() { 
210          return this.type != null && !this.type.isEmpty();
211        }
212
213        /**
214         * @param value {@link #type} (The kind of staging, such as pathological or clinical staging.)
215         */
216        public ConditionStageComponent setType(CodeableConcept value) { 
217          this.type = value;
218          return this;
219        }
220
221        protected void listChildren(List<Property> children) {
222          super.listChildren(children);
223          children.add(new Property("summary", "CodeableConcept", "A simple summary of the stage such as \"Stage 3\". The determination of the stage is disease-specific.", 0, 1, summary));
224          children.add(new Property("assessment", "Reference(ClinicalImpression|DiagnosticReport|Observation)", "Reference to a formal record of the evidence on which the staging assessment is based.", 0, java.lang.Integer.MAX_VALUE, assessment));
225          children.add(new Property("type", "CodeableConcept", "The kind of staging, such as pathological or clinical staging.", 0, 1, type));
226        }
227
228        @Override
229        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
230          switch (_hash) {
231          case -1857640538: /*summary*/  return new Property("summary", "CodeableConcept", "A simple summary of the stage such as \"Stage 3\". The determination of the stage is disease-specific.", 0, 1, summary);
232          case 2119382722: /*assessment*/  return new Property("assessment", "Reference(ClinicalImpression|DiagnosticReport|Observation)", "Reference to a formal record of the evidence on which the staging assessment is based.", 0, java.lang.Integer.MAX_VALUE, assessment);
233          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The kind of staging, such as pathological or clinical staging.", 0, 1, type);
234          default: return super.getNamedProperty(_hash, _name, _checkValid);
235          }
236
237        }
238
239      @Override
240      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
241        switch (hash) {
242        case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // CodeableConcept
243        case 2119382722: /*assessment*/ return this.assessment == null ? new Base[0] : this.assessment.toArray(new Base[this.assessment.size()]); // Reference
244        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
245        default: return super.getProperty(hash, name, checkValid);
246        }
247
248      }
249
250      @Override
251      public Base setProperty(int hash, String name, Base value) throws FHIRException {
252        switch (hash) {
253        case -1857640538: // summary
254          this.summary = castToCodeableConcept(value); // CodeableConcept
255          return value;
256        case 2119382722: // assessment
257          this.getAssessment().add(castToReference(value)); // Reference
258          return value;
259        case 3575610: // type
260          this.type = castToCodeableConcept(value); // CodeableConcept
261          return value;
262        default: return super.setProperty(hash, name, value);
263        }
264
265      }
266
267      @Override
268      public Base setProperty(String name, Base value) throws FHIRException {
269        if (name.equals("summary")) {
270          this.summary = castToCodeableConcept(value); // CodeableConcept
271        } else if (name.equals("assessment")) {
272          this.getAssessment().add(castToReference(value));
273        } else if (name.equals("type")) {
274          this.type = castToCodeableConcept(value); // CodeableConcept
275        } else
276          return super.setProperty(name, value);
277        return value;
278      }
279
280      @Override
281      public Base makeProperty(int hash, String name) throws FHIRException {
282        switch (hash) {
283        case -1857640538:  return getSummary(); 
284        case 2119382722:  return addAssessment(); 
285        case 3575610:  return getType(); 
286        default: return super.makeProperty(hash, name);
287        }
288
289      }
290
291      @Override
292      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
293        switch (hash) {
294        case -1857640538: /*summary*/ return new String[] {"CodeableConcept"};
295        case 2119382722: /*assessment*/ return new String[] {"Reference"};
296        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
297        default: return super.getTypesForProperty(hash, name);
298        }
299
300      }
301
302      @Override
303      public Base addChild(String name) throws FHIRException {
304        if (name.equals("summary")) {
305          this.summary = new CodeableConcept();
306          return this.summary;
307        }
308        else if (name.equals("assessment")) {
309          return addAssessment();
310        }
311        else if (name.equals("type")) {
312          this.type = new CodeableConcept();
313          return this.type;
314        }
315        else
316          return super.addChild(name);
317      }
318
319      public ConditionStageComponent copy() {
320        ConditionStageComponent dst = new ConditionStageComponent();
321        copyValues(dst);
322        dst.summary = summary == null ? null : summary.copy();
323        if (assessment != null) {
324          dst.assessment = new ArrayList<Reference>();
325          for (Reference i : assessment)
326            dst.assessment.add(i.copy());
327        };
328        dst.type = type == null ? null : type.copy();
329        return dst;
330      }
331
332      @Override
333      public boolean equalsDeep(Base other_) {
334        if (!super.equalsDeep(other_))
335          return false;
336        if (!(other_ instanceof ConditionStageComponent))
337          return false;
338        ConditionStageComponent o = (ConditionStageComponent) other_;
339        return compareDeep(summary, o.summary, true) && compareDeep(assessment, o.assessment, true) && compareDeep(type, o.type, true)
340          ;
341      }
342
343      @Override
344      public boolean equalsShallow(Base other_) {
345        if (!super.equalsShallow(other_))
346          return false;
347        if (!(other_ instanceof ConditionStageComponent))
348          return false;
349        ConditionStageComponent o = (ConditionStageComponent) other_;
350        return true;
351      }
352
353      public boolean isEmpty() {
354        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(summary, assessment, type
355          );
356      }
357
358  public String fhirType() {
359    return "Condition.stage";
360
361  }
362
363  }
364
365    @Block()
366    public static class ConditionEvidenceComponent extends BackboneElement implements IBaseBackboneElement {
367        /**
368         * A manifestation or symptom that led to the recording of this condition.
369         */
370        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
371        @Description(shortDefinition="Manifestation/symptom", formalDefinition="A manifestation or symptom that led to the recording of this condition." )
372        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/manifestation-or-symptom")
373        protected List<CodeableConcept> code;
374
375        /**
376         * Links to other relevant information, including pathology reports.
377         */
378        @Child(name = "detail", type = {Reference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
379        @Description(shortDefinition="Supporting information found elsewhere", formalDefinition="Links to other relevant information, including pathology reports." )
380        protected List<Reference> detail;
381        /**
382         * The actual objects that are the target of the reference (Links to other relevant information, including pathology reports.)
383         */
384        protected List<Resource> detailTarget;
385
386
387        private static final long serialVersionUID = 1135831276L;
388
389    /**
390     * Constructor
391     */
392      public ConditionEvidenceComponent() {
393        super();
394      }
395
396        /**
397         * @return {@link #code} (A manifestation or symptom that led to the recording of this condition.)
398         */
399        public List<CodeableConcept> getCode() { 
400          if (this.code == null)
401            this.code = new ArrayList<CodeableConcept>();
402          return this.code;
403        }
404
405        /**
406         * @return Returns a reference to <code>this</code> for easy method chaining
407         */
408        public ConditionEvidenceComponent setCode(List<CodeableConcept> theCode) { 
409          this.code = theCode;
410          return this;
411        }
412
413        public boolean hasCode() { 
414          if (this.code == null)
415            return false;
416          for (CodeableConcept item : this.code)
417            if (!item.isEmpty())
418              return true;
419          return false;
420        }
421
422        public CodeableConcept addCode() { //3
423          CodeableConcept t = new CodeableConcept();
424          if (this.code == null)
425            this.code = new ArrayList<CodeableConcept>();
426          this.code.add(t);
427          return t;
428        }
429
430        public ConditionEvidenceComponent addCode(CodeableConcept t) { //3
431          if (t == null)
432            return this;
433          if (this.code == null)
434            this.code = new ArrayList<CodeableConcept>();
435          this.code.add(t);
436          return this;
437        }
438
439        /**
440         * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
441         */
442        public CodeableConcept getCodeFirstRep() { 
443          if (getCode().isEmpty()) {
444            addCode();
445          }
446          return getCode().get(0);
447        }
448
449        /**
450         * @return {@link #detail} (Links to other relevant information, including pathology reports.)
451         */
452        public List<Reference> getDetail() { 
453          if (this.detail == null)
454            this.detail = new ArrayList<Reference>();
455          return this.detail;
456        }
457
458        /**
459         * @return Returns a reference to <code>this</code> for easy method chaining
460         */
461        public ConditionEvidenceComponent setDetail(List<Reference> theDetail) { 
462          this.detail = theDetail;
463          return this;
464        }
465
466        public boolean hasDetail() { 
467          if (this.detail == null)
468            return false;
469          for (Reference item : this.detail)
470            if (!item.isEmpty())
471              return true;
472          return false;
473        }
474
475        public Reference addDetail() { //3
476          Reference t = new Reference();
477          if (this.detail == null)
478            this.detail = new ArrayList<Reference>();
479          this.detail.add(t);
480          return t;
481        }
482
483        public ConditionEvidenceComponent addDetail(Reference t) { //3
484          if (t == null)
485            return this;
486          if (this.detail == null)
487            this.detail = new ArrayList<Reference>();
488          this.detail.add(t);
489          return this;
490        }
491
492        /**
493         * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist
494         */
495        public Reference getDetailFirstRep() { 
496          if (getDetail().isEmpty()) {
497            addDetail();
498          }
499          return getDetail().get(0);
500        }
501
502        /**
503         * @deprecated Use Reference#setResource(IBaseResource) instead
504         */
505        @Deprecated
506        public List<Resource> getDetailTarget() { 
507          if (this.detailTarget == null)
508            this.detailTarget = new ArrayList<Resource>();
509          return this.detailTarget;
510        }
511
512        protected void listChildren(List<Property> children) {
513          super.listChildren(children);
514          children.add(new Property("code", "CodeableConcept", "A manifestation or symptom that led to the recording of this condition.", 0, java.lang.Integer.MAX_VALUE, code));
515          children.add(new Property("detail", "Reference(Any)", "Links to other relevant information, including pathology reports.", 0, java.lang.Integer.MAX_VALUE, detail));
516        }
517
518        @Override
519        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
520          switch (_hash) {
521          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A manifestation or symptom that led to the recording of this condition.", 0, java.lang.Integer.MAX_VALUE, code);
522          case -1335224239: /*detail*/  return new Property("detail", "Reference(Any)", "Links to other relevant information, including pathology reports.", 0, java.lang.Integer.MAX_VALUE, detail);
523          default: return super.getNamedProperty(_hash, _name, _checkValid);
524          }
525
526        }
527
528      @Override
529      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
530        switch (hash) {
531        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
532        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference
533        default: return super.getProperty(hash, name, checkValid);
534        }
535
536      }
537
538      @Override
539      public Base setProperty(int hash, String name, Base value) throws FHIRException {
540        switch (hash) {
541        case 3059181: // code
542          this.getCode().add(castToCodeableConcept(value)); // CodeableConcept
543          return value;
544        case -1335224239: // detail
545          this.getDetail().add(castToReference(value)); // Reference
546          return value;
547        default: return super.setProperty(hash, name, value);
548        }
549
550      }
551
552      @Override
553      public Base setProperty(String name, Base value) throws FHIRException {
554        if (name.equals("code")) {
555          this.getCode().add(castToCodeableConcept(value));
556        } else if (name.equals("detail")) {
557          this.getDetail().add(castToReference(value));
558        } else
559          return super.setProperty(name, value);
560        return value;
561      }
562
563      @Override
564      public Base makeProperty(int hash, String name) throws FHIRException {
565        switch (hash) {
566        case 3059181:  return addCode(); 
567        case -1335224239:  return addDetail(); 
568        default: return super.makeProperty(hash, name);
569        }
570
571      }
572
573      @Override
574      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
575        switch (hash) {
576        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
577        case -1335224239: /*detail*/ return new String[] {"Reference"};
578        default: return super.getTypesForProperty(hash, name);
579        }
580
581      }
582
583      @Override
584      public Base addChild(String name) throws FHIRException {
585        if (name.equals("code")) {
586          return addCode();
587        }
588        else if (name.equals("detail")) {
589          return addDetail();
590        }
591        else
592          return super.addChild(name);
593      }
594
595      public ConditionEvidenceComponent copy() {
596        ConditionEvidenceComponent dst = new ConditionEvidenceComponent();
597        copyValues(dst);
598        if (code != null) {
599          dst.code = new ArrayList<CodeableConcept>();
600          for (CodeableConcept i : code)
601            dst.code.add(i.copy());
602        };
603        if (detail != null) {
604          dst.detail = new ArrayList<Reference>();
605          for (Reference i : detail)
606            dst.detail.add(i.copy());
607        };
608        return dst;
609      }
610
611      @Override
612      public boolean equalsDeep(Base other_) {
613        if (!super.equalsDeep(other_))
614          return false;
615        if (!(other_ instanceof ConditionEvidenceComponent))
616          return false;
617        ConditionEvidenceComponent o = (ConditionEvidenceComponent) other_;
618        return compareDeep(code, o.code, true) && compareDeep(detail, o.detail, true);
619      }
620
621      @Override
622      public boolean equalsShallow(Base other_) {
623        if (!super.equalsShallow(other_))
624          return false;
625        if (!(other_ instanceof ConditionEvidenceComponent))
626          return false;
627        ConditionEvidenceComponent o = (ConditionEvidenceComponent) other_;
628        return true;
629      }
630
631      public boolean isEmpty() {
632        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, detail);
633      }
634
635  public String fhirType() {
636    return "Condition.evidence";
637
638  }
639
640  }
641
642    /**
643     * Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
644     */
645    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
646    @Description(shortDefinition="External Ids for this condition", formalDefinition="Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
647    protected List<Identifier> identifier;
648
649    /**
650     * The clinical status of the condition.
651     */
652    @Child(name = "clinicalStatus", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=true, summary=true)
653    @Description(shortDefinition="active | recurrence | relapse | inactive | remission | resolved", formalDefinition="The clinical status of the condition." )
654    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-clinical")
655    protected CodeableConcept clinicalStatus;
656
657    /**
658     * The verification status to support the clinical status of the condition.
659     */
660    @Child(name = "verificationStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=true, summary=true)
661    @Description(shortDefinition="unconfirmed | provisional | differential | confirmed | refuted | entered-in-error", formalDefinition="The verification status to support the clinical status of the condition." )
662    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-ver-status")
663    protected CodeableConcept verificationStatus;
664
665    /**
666     * A category assigned to the condition.
667     */
668    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
669    @Description(shortDefinition="problem-list-item | encounter-diagnosis", formalDefinition="A category assigned to the condition." )
670    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-category")
671    protected List<CodeableConcept> category;
672
673    /**
674     * A subjective assessment of the severity of the condition as evaluated by the clinician.
675     */
676    @Child(name = "severity", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
677    @Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." )
678    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-severity")
679    protected CodeableConcept severity;
680
681    /**
682     * Identification of the condition, problem or diagnosis.
683     */
684    @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
685    @Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." )
686    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
687    protected CodeableConcept code;
688
689    /**
690     * The anatomical location where this condition manifests itself.
691     */
692    @Child(name = "bodySite", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
693    @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." )
694    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
695    protected List<CodeableConcept> bodySite;
696
697    /**
698     * Indicates the patient or group who the condition record is associated with.
699     */
700    @Child(name = "subject", type = {Patient.class, Group.class}, order=7, min=1, max=1, modifier=false, summary=true)
701    @Description(shortDefinition="Who has the condition?", formalDefinition="Indicates the patient or group who the condition record is associated with." )
702    protected Reference subject;
703
704    /**
705     * The actual object that is the target of the reference (Indicates the patient or group who the condition record is associated with.)
706     */
707    protected Resource subjectTarget;
708
709    /**
710     * The Encounter during which this Condition was created or to which the creation of this record is tightly associated.
711     */
712    @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=true)
713    @Description(shortDefinition="Encounter created as part of", formalDefinition="The Encounter during which this Condition was created or to which the creation of this record is tightly associated." )
714    protected Reference encounter;
715
716    /**
717     * The actual object that is the target of the reference (The Encounter during which this Condition was created or to which the creation of this record is tightly associated.)
718     */
719    protected Encounter encounterTarget;
720
721    /**
722     * Estimated or actual date or date-time  the condition began, in the opinion of the clinician.
723     */
724    @Child(name = "onset", type = {DateTimeType.class, Age.class, Period.class, Range.class, StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
725    @Description(shortDefinition="Estimated or actual date,  date-time, or age", formalDefinition="Estimated or actual date or date-time  the condition began, in the opinion of the clinician." )
726    protected Type onset;
727
728    /**
729     * The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.
730     */
731    @Child(name = "abatement", type = {DateTimeType.class, Age.class, Period.class, Range.class, StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
732    @Description(shortDefinition="When in resolution/remission", formalDefinition="The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate." )
733    protected Type abatement;
734
735    /**
736     * The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.
737     */
738    @Child(name = "recordedDate", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
739    @Description(shortDefinition="Date record was first recorded", formalDefinition="The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date." )
740    protected DateTimeType recordedDate;
741
742    /**
743     * Individual who recorded the record and takes responsibility for its content.
744     */
745    @Child(name = "recorder", type = {Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class}, order=12, min=0, max=1, modifier=false, summary=true)
746    @Description(shortDefinition="Who recorded the condition", formalDefinition="Individual who recorded the record and takes responsibility for its content." )
747    protected Reference recorder;
748
749    /**
750     * The actual object that is the target of the reference (Individual who recorded the record and takes responsibility for its content.)
751     */
752    protected Resource recorderTarget;
753
754    /**
755     * Individual who is making the condition statement.
756     */
757    @Child(name = "asserter", type = {Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=1, modifier=false, summary=true)
758    @Description(shortDefinition="Person who asserts this condition", formalDefinition="Individual who is making the condition statement." )
759    protected Reference asserter;
760
761    /**
762     * The actual object that is the target of the reference (Individual who is making the condition statement.)
763     */
764    protected Resource asserterTarget;
765
766    /**
767     * Clinical stage or grade of a condition. May include formal severity assessments.
768     */
769    @Child(name = "stage", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
770    @Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." )
771    protected List<ConditionStageComponent> stage;
772
773    /**
774     * Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.
775     */
776    @Child(name = "evidence", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
777    @Description(shortDefinition="Supporting evidence", formalDefinition="Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition." )
778    protected List<ConditionEvidenceComponent> evidence;
779
780    /**
781     * Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.
782     */
783    @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
784    @Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis." )
785    protected List<Annotation> note;
786
787    private static final long serialVersionUID = 186776568L;
788
789  /**
790   * Constructor
791   */
792    public Condition() {
793      super();
794    }
795
796  /**
797   * Constructor
798   */
799    public Condition(Reference subject) {
800      super();
801      this.subject = subject;
802    }
803
804    /**
805     * @return {@link #identifier} (Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
806     */
807    public List<Identifier> getIdentifier() { 
808      if (this.identifier == null)
809        this.identifier = new ArrayList<Identifier>();
810      return this.identifier;
811    }
812
813    /**
814     * @return Returns a reference to <code>this</code> for easy method chaining
815     */
816    public Condition setIdentifier(List<Identifier> theIdentifier) { 
817      this.identifier = theIdentifier;
818      return this;
819    }
820
821    public boolean hasIdentifier() { 
822      if (this.identifier == null)
823        return false;
824      for (Identifier item : this.identifier)
825        if (!item.isEmpty())
826          return true;
827      return false;
828    }
829
830    public Identifier addIdentifier() { //3
831      Identifier t = new Identifier();
832      if (this.identifier == null)
833        this.identifier = new ArrayList<Identifier>();
834      this.identifier.add(t);
835      return t;
836    }
837
838    public Condition addIdentifier(Identifier t) { //3
839      if (t == null)
840        return this;
841      if (this.identifier == null)
842        this.identifier = new ArrayList<Identifier>();
843      this.identifier.add(t);
844      return this;
845    }
846
847    /**
848     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
849     */
850    public Identifier getIdentifierFirstRep() { 
851      if (getIdentifier().isEmpty()) {
852        addIdentifier();
853      }
854      return getIdentifier().get(0);
855    }
856
857    /**
858     * @return {@link #clinicalStatus} (The clinical status of the condition.)
859     */
860    public CodeableConcept getClinicalStatus() { 
861      if (this.clinicalStatus == null)
862        if (Configuration.errorOnAutoCreate())
863          throw new Error("Attempt to auto-create Condition.clinicalStatus");
864        else if (Configuration.doAutoCreate())
865          this.clinicalStatus = new CodeableConcept(); // cc
866      return this.clinicalStatus;
867    }
868
869    public boolean hasClinicalStatus() { 
870      return this.clinicalStatus != null && !this.clinicalStatus.isEmpty();
871    }
872
873    /**
874     * @param value {@link #clinicalStatus} (The clinical status of the condition.)
875     */
876    public Condition setClinicalStatus(CodeableConcept value) { 
877      this.clinicalStatus = value;
878      return this;
879    }
880
881    /**
882     * @return {@link #verificationStatus} (The verification status to support the clinical status of the condition.)
883     */
884    public CodeableConcept getVerificationStatus() { 
885      if (this.verificationStatus == null)
886        if (Configuration.errorOnAutoCreate())
887          throw new Error("Attempt to auto-create Condition.verificationStatus");
888        else if (Configuration.doAutoCreate())
889          this.verificationStatus = new CodeableConcept(); // cc
890      return this.verificationStatus;
891    }
892
893    public boolean hasVerificationStatus() { 
894      return this.verificationStatus != null && !this.verificationStatus.isEmpty();
895    }
896
897    /**
898     * @param value {@link #verificationStatus} (The verification status to support the clinical status of the condition.)
899     */
900    public Condition setVerificationStatus(CodeableConcept value) { 
901      this.verificationStatus = value;
902      return this;
903    }
904
905    /**
906     * @return {@link #category} (A category assigned to the condition.)
907     */
908    public List<CodeableConcept> getCategory() { 
909      if (this.category == null)
910        this.category = new ArrayList<CodeableConcept>();
911      return this.category;
912    }
913
914    /**
915     * @return Returns a reference to <code>this</code> for easy method chaining
916     */
917    public Condition setCategory(List<CodeableConcept> theCategory) { 
918      this.category = theCategory;
919      return this;
920    }
921
922    public boolean hasCategory() { 
923      if (this.category == null)
924        return false;
925      for (CodeableConcept item : this.category)
926        if (!item.isEmpty())
927          return true;
928      return false;
929    }
930
931    public CodeableConcept addCategory() { //3
932      CodeableConcept t = new CodeableConcept();
933      if (this.category == null)
934        this.category = new ArrayList<CodeableConcept>();
935      this.category.add(t);
936      return t;
937    }
938
939    public Condition addCategory(CodeableConcept t) { //3
940      if (t == null)
941        return this;
942      if (this.category == null)
943        this.category = new ArrayList<CodeableConcept>();
944      this.category.add(t);
945      return this;
946    }
947
948    /**
949     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
950     */
951    public CodeableConcept getCategoryFirstRep() { 
952      if (getCategory().isEmpty()) {
953        addCategory();
954      }
955      return getCategory().get(0);
956    }
957
958    /**
959     * @return {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.)
960     */
961    public CodeableConcept getSeverity() { 
962      if (this.severity == null)
963        if (Configuration.errorOnAutoCreate())
964          throw new Error("Attempt to auto-create Condition.severity");
965        else if (Configuration.doAutoCreate())
966          this.severity = new CodeableConcept(); // cc
967      return this.severity;
968    }
969
970    public boolean hasSeverity() { 
971      return this.severity != null && !this.severity.isEmpty();
972    }
973
974    /**
975     * @param value {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.)
976     */
977    public Condition setSeverity(CodeableConcept value) { 
978      this.severity = value;
979      return this;
980    }
981
982    /**
983     * @return {@link #code} (Identification of the condition, problem or diagnosis.)
984     */
985    public CodeableConcept getCode() { 
986      if (this.code == null)
987        if (Configuration.errorOnAutoCreate())
988          throw new Error("Attempt to auto-create Condition.code");
989        else if (Configuration.doAutoCreate())
990          this.code = new CodeableConcept(); // cc
991      return this.code;
992    }
993
994    public boolean hasCode() { 
995      return this.code != null && !this.code.isEmpty();
996    }
997
998    /**
999     * @param value {@link #code} (Identification of the condition, problem or diagnosis.)
1000     */
1001    public Condition setCode(CodeableConcept value) { 
1002      this.code = value;
1003      return this;
1004    }
1005
1006    /**
1007     * @return {@link #bodySite} (The anatomical location where this condition manifests itself.)
1008     */
1009    public List<CodeableConcept> getBodySite() { 
1010      if (this.bodySite == null)
1011        this.bodySite = new ArrayList<CodeableConcept>();
1012      return this.bodySite;
1013    }
1014
1015    /**
1016     * @return Returns a reference to <code>this</code> for easy method chaining
1017     */
1018    public Condition setBodySite(List<CodeableConcept> theBodySite) { 
1019      this.bodySite = theBodySite;
1020      return this;
1021    }
1022
1023    public boolean hasBodySite() { 
1024      if (this.bodySite == null)
1025        return false;
1026      for (CodeableConcept item : this.bodySite)
1027        if (!item.isEmpty())
1028          return true;
1029      return false;
1030    }
1031
1032    public CodeableConcept addBodySite() { //3
1033      CodeableConcept t = new CodeableConcept();
1034      if (this.bodySite == null)
1035        this.bodySite = new ArrayList<CodeableConcept>();
1036      this.bodySite.add(t);
1037      return t;
1038    }
1039
1040    public Condition addBodySite(CodeableConcept t) { //3
1041      if (t == null)
1042        return this;
1043      if (this.bodySite == null)
1044        this.bodySite = new ArrayList<CodeableConcept>();
1045      this.bodySite.add(t);
1046      return this;
1047    }
1048
1049    /**
1050     * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist
1051     */
1052    public CodeableConcept getBodySiteFirstRep() { 
1053      if (getBodySite().isEmpty()) {
1054        addBodySite();
1055      }
1056      return getBodySite().get(0);
1057    }
1058
1059    /**
1060     * @return {@link #subject} (Indicates the patient or group who the condition record is associated with.)
1061     */
1062    public Reference getSubject() { 
1063      if (this.subject == null)
1064        if (Configuration.errorOnAutoCreate())
1065          throw new Error("Attempt to auto-create Condition.subject");
1066        else if (Configuration.doAutoCreate())
1067          this.subject = new Reference(); // cc
1068      return this.subject;
1069    }
1070
1071    public boolean hasSubject() { 
1072      return this.subject != null && !this.subject.isEmpty();
1073    }
1074
1075    /**
1076     * @param value {@link #subject} (Indicates the patient or group who the condition record is associated with.)
1077     */
1078    public Condition setSubject(Reference value) { 
1079      this.subject = value;
1080      return this;
1081    }
1082
1083    /**
1084     * @return {@link #subject} 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. (Indicates the patient or group who the condition record is associated with.)
1085     */
1086    public Resource getSubjectTarget() { 
1087      return this.subjectTarget;
1088    }
1089
1090    /**
1091     * @param value {@link #subject} 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. (Indicates the patient or group who the condition record is associated with.)
1092     */
1093    public Condition setSubjectTarget(Resource value) { 
1094      this.subjectTarget = value;
1095      return this;
1096    }
1097
1098    /**
1099     * @return {@link #encounter} (The Encounter during which this Condition was created or to which the creation of this record is tightly associated.)
1100     */
1101    public Reference getEncounter() { 
1102      if (this.encounter == null)
1103        if (Configuration.errorOnAutoCreate())
1104          throw new Error("Attempt to auto-create Condition.encounter");
1105        else if (Configuration.doAutoCreate())
1106          this.encounter = new Reference(); // cc
1107      return this.encounter;
1108    }
1109
1110    public boolean hasEncounter() { 
1111      return this.encounter != null && !this.encounter.isEmpty();
1112    }
1113
1114    /**
1115     * @param value {@link #encounter} (The Encounter during which this Condition was created or to which the creation of this record is tightly associated.)
1116     */
1117    public Condition setEncounter(Reference value) { 
1118      this.encounter = value;
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #encounter} 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 Encounter during which this Condition was created or to which the creation of this record is tightly associated.)
1124     */
1125    public Encounter getEncounterTarget() { 
1126      if (this.encounterTarget == null)
1127        if (Configuration.errorOnAutoCreate())
1128          throw new Error("Attempt to auto-create Condition.encounter");
1129        else if (Configuration.doAutoCreate())
1130          this.encounterTarget = new Encounter(); // aa
1131      return this.encounterTarget;
1132    }
1133
1134    /**
1135     * @param value {@link #encounter} 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 Encounter during which this Condition was created or to which the creation of this record is tightly associated.)
1136     */
1137    public Condition setEncounterTarget(Encounter value) { 
1138      this.encounterTarget = value;
1139      return this;
1140    }
1141
1142    /**
1143     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1144     */
1145    public Type getOnset() { 
1146      return this.onset;
1147    }
1148
1149    /**
1150     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1151     */
1152    public DateTimeType getOnsetDateTimeType() throws FHIRException { 
1153      if (this.onset == null)
1154        this.onset = new DateTimeType();
1155      if (!(this.onset instanceof DateTimeType))
1156        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.onset.getClass().getName()+" was encountered");
1157      return (DateTimeType) this.onset;
1158    }
1159
1160    public boolean hasOnsetDateTimeType() { 
1161      return this != null && this.onset instanceof DateTimeType;
1162    }
1163
1164    /**
1165     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1166     */
1167    public Age getOnsetAge() throws FHIRException { 
1168      if (this.onset == null)
1169        this.onset = new Age();
1170      if (!(this.onset instanceof Age))
1171        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered");
1172      return (Age) this.onset;
1173    }
1174
1175    public boolean hasOnsetAge() { 
1176      return this != null && this.onset instanceof Age;
1177    }
1178
1179    /**
1180     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1181     */
1182    public Period getOnsetPeriod() throws FHIRException { 
1183      if (this.onset == null)
1184        this.onset = new Period();
1185      if (!(this.onset instanceof Period))
1186        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered");
1187      return (Period) this.onset;
1188    }
1189
1190    public boolean hasOnsetPeriod() { 
1191      return this != null && this.onset instanceof Period;
1192    }
1193
1194    /**
1195     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1196     */
1197    public Range getOnsetRange() throws FHIRException { 
1198      if (this.onset == null)
1199        this.onset = new Range();
1200      if (!(this.onset instanceof Range))
1201        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered");
1202      return (Range) this.onset;
1203    }
1204
1205    public boolean hasOnsetRange() { 
1206      return this != null && this.onset instanceof Range;
1207    }
1208
1209    /**
1210     * @return {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1211     */
1212    public StringType getOnsetStringType() throws FHIRException { 
1213      if (this.onset == null)
1214        this.onset = new StringType();
1215      if (!(this.onset instanceof StringType))
1216        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered");
1217      return (StringType) this.onset;
1218    }
1219
1220    public boolean hasOnsetStringType() { 
1221      return this != null && this.onset instanceof StringType;
1222    }
1223
1224    public boolean hasOnset() { 
1225      return this.onset != null && !this.onset.isEmpty();
1226    }
1227
1228    /**
1229     * @param value {@link #onset} (Estimated or actual date or date-time  the condition began, in the opinion of the clinician.)
1230     */
1231    public Condition setOnset(Type value) { 
1232      if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Range || value instanceof StringType))
1233        throw new Error("Not the right type for Condition.onset[x]: "+value.fhirType());
1234      this.onset = value;
1235      return this;
1236    }
1237
1238    /**
1239     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1240     */
1241    public Type getAbatement() { 
1242      return this.abatement;
1243    }
1244
1245    /**
1246     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1247     */
1248    public DateTimeType getAbatementDateTimeType() throws FHIRException { 
1249      if (this.abatement == null)
1250        this.abatement = new DateTimeType();
1251      if (!(this.abatement instanceof DateTimeType))
1252        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.abatement.getClass().getName()+" was encountered");
1253      return (DateTimeType) this.abatement;
1254    }
1255
1256    public boolean hasAbatementDateTimeType() { 
1257      return this != null && this.abatement instanceof DateTimeType;
1258    }
1259
1260    /**
1261     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1262     */
1263    public Age getAbatementAge() throws FHIRException { 
1264      if (this.abatement == null)
1265        this.abatement = new Age();
1266      if (!(this.abatement instanceof Age))
1267        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.abatement.getClass().getName()+" was encountered");
1268      return (Age) this.abatement;
1269    }
1270
1271    public boolean hasAbatementAge() { 
1272      return this != null && this.abatement instanceof Age;
1273    }
1274
1275    /**
1276     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1277     */
1278    public Period getAbatementPeriod() throws FHIRException { 
1279      if (this.abatement == null)
1280        this.abatement = new Period();
1281      if (!(this.abatement instanceof Period))
1282        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.abatement.getClass().getName()+" was encountered");
1283      return (Period) this.abatement;
1284    }
1285
1286    public boolean hasAbatementPeriod() { 
1287      return this != null && this.abatement instanceof Period;
1288    }
1289
1290    /**
1291     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1292     */
1293    public Range getAbatementRange() throws FHIRException { 
1294      if (this.abatement == null)
1295        this.abatement = new Range();
1296      if (!(this.abatement instanceof Range))
1297        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.abatement.getClass().getName()+" was encountered");
1298      return (Range) this.abatement;
1299    }
1300
1301    public boolean hasAbatementRange() { 
1302      return this != null && this.abatement instanceof Range;
1303    }
1304
1305    /**
1306     * @return {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1307     */
1308    public StringType getAbatementStringType() throws FHIRException { 
1309      if (this.abatement == null)
1310        this.abatement = new StringType();
1311      if (!(this.abatement instanceof StringType))
1312        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.abatement.getClass().getName()+" was encountered");
1313      return (StringType) this.abatement;
1314    }
1315
1316    public boolean hasAbatementStringType() { 
1317      return this != null && this.abatement instanceof StringType;
1318    }
1319
1320    public boolean hasAbatement() { 
1321      return this.abatement != null && !this.abatement.isEmpty();
1322    }
1323
1324    /**
1325     * @param value {@link #abatement} (The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.)
1326     */
1327    public Condition setAbatement(Type value) { 
1328      if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Range || value instanceof StringType))
1329        throw new Error("Not the right type for Condition.abatement[x]: "+value.fhirType());
1330      this.abatement = value;
1331      return this;
1332    }
1333
1334    /**
1335     * @return {@link #recordedDate} (The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value
1336     */
1337    public DateTimeType getRecordedDateElement() { 
1338      if (this.recordedDate == null)
1339        if (Configuration.errorOnAutoCreate())
1340          throw new Error("Attempt to auto-create Condition.recordedDate");
1341        else if (Configuration.doAutoCreate())
1342          this.recordedDate = new DateTimeType(); // bb
1343      return this.recordedDate;
1344    }
1345
1346    public boolean hasRecordedDateElement() { 
1347      return this.recordedDate != null && !this.recordedDate.isEmpty();
1348    }
1349
1350    public boolean hasRecordedDate() { 
1351      return this.recordedDate != null && !this.recordedDate.isEmpty();
1352    }
1353
1354    /**
1355     * @param value {@link #recordedDate} (The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value
1356     */
1357    public Condition setRecordedDateElement(DateTimeType value) { 
1358      this.recordedDate = value;
1359      return this;
1360    }
1361
1362    /**
1363     * @return The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.
1364     */
1365    public Date getRecordedDate() { 
1366      return this.recordedDate == null ? null : this.recordedDate.getValue();
1367    }
1368
1369    /**
1370     * @param value The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.
1371     */
1372    public Condition setRecordedDate(Date value) { 
1373      if (value == null)
1374        this.recordedDate = null;
1375      else {
1376        if (this.recordedDate == null)
1377          this.recordedDate = new DateTimeType();
1378        this.recordedDate.setValue(value);
1379      }
1380      return this;
1381    }
1382
1383    /**
1384     * @return {@link #recorder} (Individual who recorded the record and takes responsibility for its content.)
1385     */
1386    public Reference getRecorder() { 
1387      if (this.recorder == null)
1388        if (Configuration.errorOnAutoCreate())
1389          throw new Error("Attempt to auto-create Condition.recorder");
1390        else if (Configuration.doAutoCreate())
1391          this.recorder = new Reference(); // cc
1392      return this.recorder;
1393    }
1394
1395    public boolean hasRecorder() { 
1396      return this.recorder != null && !this.recorder.isEmpty();
1397    }
1398
1399    /**
1400     * @param value {@link #recorder} (Individual who recorded the record and takes responsibility for its content.)
1401     */
1402    public Condition setRecorder(Reference value) { 
1403      this.recorder = value;
1404      return this;
1405    }
1406
1407    /**
1408     * @return {@link #recorder} 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. (Individual who recorded the record and takes responsibility for its content.)
1409     */
1410    public Resource getRecorderTarget() { 
1411      return this.recorderTarget;
1412    }
1413
1414    /**
1415     * @param value {@link #recorder} 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. (Individual who recorded the record and takes responsibility for its content.)
1416     */
1417    public Condition setRecorderTarget(Resource value) { 
1418      this.recorderTarget = value;
1419      return this;
1420    }
1421
1422    /**
1423     * @return {@link #asserter} (Individual who is making the condition statement.)
1424     */
1425    public Reference getAsserter() { 
1426      if (this.asserter == null)
1427        if (Configuration.errorOnAutoCreate())
1428          throw new Error("Attempt to auto-create Condition.asserter");
1429        else if (Configuration.doAutoCreate())
1430          this.asserter = new Reference(); // cc
1431      return this.asserter;
1432    }
1433
1434    public boolean hasAsserter() { 
1435      return this.asserter != null && !this.asserter.isEmpty();
1436    }
1437
1438    /**
1439     * @param value {@link #asserter} (Individual who is making the condition statement.)
1440     */
1441    public Condition setAsserter(Reference value) { 
1442      this.asserter = value;
1443      return this;
1444    }
1445
1446    /**
1447     * @return {@link #asserter} 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. (Individual who is making the condition statement.)
1448     */
1449    public Resource getAsserterTarget() { 
1450      return this.asserterTarget;
1451    }
1452
1453    /**
1454     * @param value {@link #asserter} 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. (Individual who is making the condition statement.)
1455     */
1456    public Condition setAsserterTarget(Resource value) { 
1457      this.asserterTarget = value;
1458      return this;
1459    }
1460
1461    /**
1462     * @return {@link #stage} (Clinical stage or grade of a condition. May include formal severity assessments.)
1463     */
1464    public List<ConditionStageComponent> getStage() { 
1465      if (this.stage == null)
1466        this.stage = new ArrayList<ConditionStageComponent>();
1467      return this.stage;
1468    }
1469
1470    /**
1471     * @return Returns a reference to <code>this</code> for easy method chaining
1472     */
1473    public Condition setStage(List<ConditionStageComponent> theStage) { 
1474      this.stage = theStage;
1475      return this;
1476    }
1477
1478    public boolean hasStage() { 
1479      if (this.stage == null)
1480        return false;
1481      for (ConditionStageComponent item : this.stage)
1482        if (!item.isEmpty())
1483          return true;
1484      return false;
1485    }
1486
1487    public ConditionStageComponent addStage() { //3
1488      ConditionStageComponent t = new ConditionStageComponent();
1489      if (this.stage == null)
1490        this.stage = new ArrayList<ConditionStageComponent>();
1491      this.stage.add(t);
1492      return t;
1493    }
1494
1495    public Condition addStage(ConditionStageComponent t) { //3
1496      if (t == null)
1497        return this;
1498      if (this.stage == null)
1499        this.stage = new ArrayList<ConditionStageComponent>();
1500      this.stage.add(t);
1501      return this;
1502    }
1503
1504    /**
1505     * @return The first repetition of repeating field {@link #stage}, creating it if it does not already exist
1506     */
1507    public ConditionStageComponent getStageFirstRep() { 
1508      if (getStage().isEmpty()) {
1509        addStage();
1510      }
1511      return getStage().get(0);
1512    }
1513
1514    /**
1515     * @return {@link #evidence} (Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.)
1516     */
1517    public List<ConditionEvidenceComponent> getEvidence() { 
1518      if (this.evidence == null)
1519        this.evidence = new ArrayList<ConditionEvidenceComponent>();
1520      return this.evidence;
1521    }
1522
1523    /**
1524     * @return Returns a reference to <code>this</code> for easy method chaining
1525     */
1526    public Condition setEvidence(List<ConditionEvidenceComponent> theEvidence) { 
1527      this.evidence = theEvidence;
1528      return this;
1529    }
1530
1531    public boolean hasEvidence() { 
1532      if (this.evidence == null)
1533        return false;
1534      for (ConditionEvidenceComponent item : this.evidence)
1535        if (!item.isEmpty())
1536          return true;
1537      return false;
1538    }
1539
1540    public ConditionEvidenceComponent addEvidence() { //3
1541      ConditionEvidenceComponent t = new ConditionEvidenceComponent();
1542      if (this.evidence == null)
1543        this.evidence = new ArrayList<ConditionEvidenceComponent>();
1544      this.evidence.add(t);
1545      return t;
1546    }
1547
1548    public Condition addEvidence(ConditionEvidenceComponent t) { //3
1549      if (t == null)
1550        return this;
1551      if (this.evidence == null)
1552        this.evidence = new ArrayList<ConditionEvidenceComponent>();
1553      this.evidence.add(t);
1554      return this;
1555    }
1556
1557    /**
1558     * @return The first repetition of repeating field {@link #evidence}, creating it if it does not already exist
1559     */
1560    public ConditionEvidenceComponent getEvidenceFirstRep() { 
1561      if (getEvidence().isEmpty()) {
1562        addEvidence();
1563      }
1564      return getEvidence().get(0);
1565    }
1566
1567    /**
1568     * @return {@link #note} (Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.)
1569     */
1570    public List<Annotation> getNote() { 
1571      if (this.note == null)
1572        this.note = new ArrayList<Annotation>();
1573      return this.note;
1574    }
1575
1576    /**
1577     * @return Returns a reference to <code>this</code> for easy method chaining
1578     */
1579    public Condition setNote(List<Annotation> theNote) { 
1580      this.note = theNote;
1581      return this;
1582    }
1583
1584    public boolean hasNote() { 
1585      if (this.note == null)
1586        return false;
1587      for (Annotation item : this.note)
1588        if (!item.isEmpty())
1589          return true;
1590      return false;
1591    }
1592
1593    public Annotation addNote() { //3
1594      Annotation t = new Annotation();
1595      if (this.note == null)
1596        this.note = new ArrayList<Annotation>();
1597      this.note.add(t);
1598      return t;
1599    }
1600
1601    public Condition addNote(Annotation t) { //3
1602      if (t == null)
1603        return this;
1604      if (this.note == null)
1605        this.note = new ArrayList<Annotation>();
1606      this.note.add(t);
1607      return this;
1608    }
1609
1610    /**
1611     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
1612     */
1613    public Annotation getNoteFirstRep() { 
1614      if (getNote().isEmpty()) {
1615        addNote();
1616      }
1617      return getNote().get(0);
1618    }
1619
1620      protected void listChildren(List<Property> children) {
1621        super.listChildren(children);
1622        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1623        children.add(new Property("clinicalStatus", "CodeableConcept", "The clinical status of the condition.", 0, 1, clinicalStatus));
1624        children.add(new Property("verificationStatus", "CodeableConcept", "The verification status to support the clinical status of the condition.", 0, 1, verificationStatus));
1625        children.add(new Property("category", "CodeableConcept", "A category assigned to the condition.", 0, java.lang.Integer.MAX_VALUE, category));
1626        children.add(new Property("severity", "CodeableConcept", "A subjective assessment of the severity of the condition as evaluated by the clinician.", 0, 1, severity));
1627        children.add(new Property("code", "CodeableConcept", "Identification of the condition, problem or diagnosis.", 0, 1, code));
1628        children.add(new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, java.lang.Integer.MAX_VALUE, bodySite));
1629        children.add(new Property("subject", "Reference(Patient|Group)", "Indicates the patient or group who the condition record is associated with.", 0, 1, subject));
1630        children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this Condition was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1631        children.add(new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset));
1632        children.add(new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement));
1633        children.add(new Property("recordedDate", "dateTime", "The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.", 0, 1, recordedDate));
1634        children.add(new Property("recorder", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who recorded the record and takes responsibility for its content.", 0, 1, recorder));
1635        children.add(new Property("asserter", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who is making the condition statement.", 0, 1, asserter));
1636        children.add(new Property("stage", "", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, java.lang.Integer.MAX_VALUE, stage));
1637        children.add(new Property("evidence", "", "Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.", 0, java.lang.Integer.MAX_VALUE, evidence));
1638        children.add(new Property("note", "Annotation", "Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.", 0, java.lang.Integer.MAX_VALUE, note));
1639      }
1640
1641      @Override
1642      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1643        switch (_hash) {
1644        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1645        case -462853915: /*clinicalStatus*/  return new Property("clinicalStatus", "CodeableConcept", "The clinical status of the condition.", 0, 1, clinicalStatus);
1646        case -842509843: /*verificationStatus*/  return new Property("verificationStatus", "CodeableConcept", "The verification status to support the clinical status of the condition.", 0, 1, verificationStatus);
1647        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "A category assigned to the condition.", 0, java.lang.Integer.MAX_VALUE, category);
1648        case 1478300413: /*severity*/  return new Property("severity", "CodeableConcept", "A subjective assessment of the severity of the condition as evaluated by the clinician.", 0, 1, severity);
1649        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Identification of the condition, problem or diagnosis.", 0, 1, code);
1650        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, java.lang.Integer.MAX_VALUE, bodySite);
1651        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "Indicates the patient or group who the condition record is associated with.", 0, 1, subject);
1652        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter during which this Condition was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1653        case -1886216323: /*onset[x]*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1654        case 105901603: /*onset*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1655        case -1701663010: /*onsetDateTime*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1656        case -1886241828: /*onsetAge*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1657        case -1545082428: /*onsetPeriod*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1658        case -186664742: /*onsetRange*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1659        case -1445342188: /*onsetString*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date or date-time  the condition began, in the opinion of the clinician.", 0, 1, onset);
1660        case -584196495: /*abatement[x]*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1661        case -921554001: /*abatement*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1662        case 44869738: /*abatementDateTime*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1663        case -584222000: /*abatementAge*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1664        case -922036656: /*abatementPeriod*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1665        case 1218906830: /*abatementRange*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1666        case -822296416: /*abatementString*/  return new Property("abatement[x]", "dateTime|Age|Period|Range|string", "The date or estimated date that the condition resolved or went into remission. This is called \"abatement\" because of the many overloaded connotations associated with \"remission\" or \"resolution\" - Conditions are never really resolved, but they can abate.", 0, 1, abatement);
1667        case -1952893826: /*recordedDate*/  return new Property("recordedDate", "dateTime", "The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.", 0, 1, recordedDate);
1668        case -799233858: /*recorder*/  return new Property("recorder", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who recorded the record and takes responsibility for its content.", 0, 1, recorder);
1669        case -373242253: /*asserter*/  return new Property("asserter", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "Individual who is making the condition statement.", 0, 1, asserter);
1670        case 109757182: /*stage*/  return new Property("stage", "", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, java.lang.Integer.MAX_VALUE, stage);
1671        case 382967383: /*evidence*/  return new Property("evidence", "", "Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.", 0, java.lang.Integer.MAX_VALUE, evidence);
1672        case 3387378: /*note*/  return new Property("note", "Annotation", "Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.", 0, java.lang.Integer.MAX_VALUE, note);
1673        default: return super.getNamedProperty(_hash, _name, _checkValid);
1674        }
1675
1676      }
1677
1678      @Override
1679      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1680        switch (hash) {
1681        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1682        case -462853915: /*clinicalStatus*/ return this.clinicalStatus == null ? new Base[0] : new Base[] {this.clinicalStatus}; // CodeableConcept
1683        case -842509843: /*verificationStatus*/ return this.verificationStatus == null ? new Base[0] : new Base[] {this.verificationStatus}; // CodeableConcept
1684        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1685        case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // CodeableConcept
1686        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1687        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
1688        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1689        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1690        case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // Type
1691        case -921554001: /*abatement*/ return this.abatement == null ? new Base[0] : new Base[] {this.abatement}; // Type
1692        case -1952893826: /*recordedDate*/ return this.recordedDate == null ? new Base[0] : new Base[] {this.recordedDate}; // DateTimeType
1693        case -799233858: /*recorder*/ return this.recorder == null ? new Base[0] : new Base[] {this.recorder}; // Reference
1694        case -373242253: /*asserter*/ return this.asserter == null ? new Base[0] : new Base[] {this.asserter}; // Reference
1695        case 109757182: /*stage*/ return this.stage == null ? new Base[0] : this.stage.toArray(new Base[this.stage.size()]); // ConditionStageComponent
1696        case 382967383: /*evidence*/ return this.evidence == null ? new Base[0] : this.evidence.toArray(new Base[this.evidence.size()]); // ConditionEvidenceComponent
1697        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1698        default: return super.getProperty(hash, name, checkValid);
1699        }
1700
1701      }
1702
1703      @Override
1704      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1705        switch (hash) {
1706        case -1618432855: // identifier
1707          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1708          return value;
1709        case -462853915: // clinicalStatus
1710          this.clinicalStatus = castToCodeableConcept(value); // CodeableConcept
1711          return value;
1712        case -842509843: // verificationStatus
1713          this.verificationStatus = castToCodeableConcept(value); // CodeableConcept
1714          return value;
1715        case 50511102: // category
1716          this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept
1717          return value;
1718        case 1478300413: // severity
1719          this.severity = castToCodeableConcept(value); // CodeableConcept
1720          return value;
1721        case 3059181: // code
1722          this.code = castToCodeableConcept(value); // CodeableConcept
1723          return value;
1724        case 1702620169: // bodySite
1725          this.getBodySite().add(castToCodeableConcept(value)); // CodeableConcept
1726          return value;
1727        case -1867885268: // subject
1728          this.subject = castToReference(value); // Reference
1729          return value;
1730        case 1524132147: // encounter
1731          this.encounter = castToReference(value); // Reference
1732          return value;
1733        case 105901603: // onset
1734          this.onset = castToType(value); // Type
1735          return value;
1736        case -921554001: // abatement
1737          this.abatement = castToType(value); // Type
1738          return value;
1739        case -1952893826: // recordedDate
1740          this.recordedDate = castToDateTime(value); // DateTimeType
1741          return value;
1742        case -799233858: // recorder
1743          this.recorder = castToReference(value); // Reference
1744          return value;
1745        case -373242253: // asserter
1746          this.asserter = castToReference(value); // Reference
1747          return value;
1748        case 109757182: // stage
1749          this.getStage().add((ConditionStageComponent) value); // ConditionStageComponent
1750          return value;
1751        case 382967383: // evidence
1752          this.getEvidence().add((ConditionEvidenceComponent) value); // ConditionEvidenceComponent
1753          return value;
1754        case 3387378: // note
1755          this.getNote().add(castToAnnotation(value)); // Annotation
1756          return value;
1757        default: return super.setProperty(hash, name, value);
1758        }
1759
1760      }
1761
1762      @Override
1763      public Base setProperty(String name, Base value) throws FHIRException {
1764        if (name.equals("identifier")) {
1765          this.getIdentifier().add(castToIdentifier(value));
1766        } else if (name.equals("clinicalStatus")) {
1767          this.clinicalStatus = castToCodeableConcept(value); // CodeableConcept
1768        } else if (name.equals("verificationStatus")) {
1769          this.verificationStatus = castToCodeableConcept(value); // CodeableConcept
1770        } else if (name.equals("category")) {
1771          this.getCategory().add(castToCodeableConcept(value));
1772        } else if (name.equals("severity")) {
1773          this.severity = castToCodeableConcept(value); // CodeableConcept
1774        } else if (name.equals("code")) {
1775          this.code = castToCodeableConcept(value); // CodeableConcept
1776        } else if (name.equals("bodySite")) {
1777          this.getBodySite().add(castToCodeableConcept(value));
1778        } else if (name.equals("subject")) {
1779          this.subject = castToReference(value); // Reference
1780        } else if (name.equals("encounter")) {
1781          this.encounter = castToReference(value); // Reference
1782        } else if (name.equals("onset[x]")) {
1783          this.onset = castToType(value); // Type
1784        } else if (name.equals("abatement[x]")) {
1785          this.abatement = castToType(value); // Type
1786        } else if (name.equals("recordedDate")) {
1787          this.recordedDate = castToDateTime(value); // DateTimeType
1788        } else if (name.equals("recorder")) {
1789          this.recorder = castToReference(value); // Reference
1790        } else if (name.equals("asserter")) {
1791          this.asserter = castToReference(value); // Reference
1792        } else if (name.equals("stage")) {
1793          this.getStage().add((ConditionStageComponent) value);
1794        } else if (name.equals("evidence")) {
1795          this.getEvidence().add((ConditionEvidenceComponent) value);
1796        } else if (name.equals("note")) {
1797          this.getNote().add(castToAnnotation(value));
1798        } else
1799          return super.setProperty(name, value);
1800        return value;
1801      }
1802
1803      @Override
1804      public Base makeProperty(int hash, String name) throws FHIRException {
1805        switch (hash) {
1806        case -1618432855:  return addIdentifier(); 
1807        case -462853915:  return getClinicalStatus(); 
1808        case -842509843:  return getVerificationStatus(); 
1809        case 50511102:  return addCategory(); 
1810        case 1478300413:  return getSeverity(); 
1811        case 3059181:  return getCode(); 
1812        case 1702620169:  return addBodySite(); 
1813        case -1867885268:  return getSubject(); 
1814        case 1524132147:  return getEncounter(); 
1815        case -1886216323:  return getOnset(); 
1816        case 105901603:  return getOnset(); 
1817        case -584196495:  return getAbatement(); 
1818        case -921554001:  return getAbatement(); 
1819        case -1952893826:  return getRecordedDateElement();
1820        case -799233858:  return getRecorder(); 
1821        case -373242253:  return getAsserter(); 
1822        case 109757182:  return addStage(); 
1823        case 382967383:  return addEvidence(); 
1824        case 3387378:  return addNote(); 
1825        default: return super.makeProperty(hash, name);
1826        }
1827
1828      }
1829
1830      @Override
1831      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1832        switch (hash) {
1833        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1834        case -462853915: /*clinicalStatus*/ return new String[] {"CodeableConcept"};
1835        case -842509843: /*verificationStatus*/ return new String[] {"CodeableConcept"};
1836        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1837        case 1478300413: /*severity*/ return new String[] {"CodeableConcept"};
1838        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1839        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
1840        case -1867885268: /*subject*/ return new String[] {"Reference"};
1841        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1842        case 105901603: /*onset*/ return new String[] {"dateTime", "Age", "Period", "Range", "string"};
1843        case -921554001: /*abatement*/ return new String[] {"dateTime", "Age", "Period", "Range", "string"};
1844        case -1952893826: /*recordedDate*/ return new String[] {"dateTime"};
1845        case -799233858: /*recorder*/ return new String[] {"Reference"};
1846        case -373242253: /*asserter*/ return new String[] {"Reference"};
1847        case 109757182: /*stage*/ return new String[] {};
1848        case 382967383: /*evidence*/ return new String[] {};
1849        case 3387378: /*note*/ return new String[] {"Annotation"};
1850        default: return super.getTypesForProperty(hash, name);
1851        }
1852
1853      }
1854
1855      @Override
1856      public Base addChild(String name) throws FHIRException {
1857        if (name.equals("identifier")) {
1858          return addIdentifier();
1859        }
1860        else if (name.equals("clinicalStatus")) {
1861          this.clinicalStatus = new CodeableConcept();
1862          return this.clinicalStatus;
1863        }
1864        else if (name.equals("verificationStatus")) {
1865          this.verificationStatus = new CodeableConcept();
1866          return this.verificationStatus;
1867        }
1868        else if (name.equals("category")) {
1869          return addCategory();
1870        }
1871        else if (name.equals("severity")) {
1872          this.severity = new CodeableConcept();
1873          return this.severity;
1874        }
1875        else if (name.equals("code")) {
1876          this.code = new CodeableConcept();
1877          return this.code;
1878        }
1879        else if (name.equals("bodySite")) {
1880          return addBodySite();
1881        }
1882        else if (name.equals("subject")) {
1883          this.subject = new Reference();
1884          return this.subject;
1885        }
1886        else if (name.equals("encounter")) {
1887          this.encounter = new Reference();
1888          return this.encounter;
1889        }
1890        else if (name.equals("onsetDateTime")) {
1891          this.onset = new DateTimeType();
1892          return this.onset;
1893        }
1894        else if (name.equals("onsetAge")) {
1895          this.onset = new Age();
1896          return this.onset;
1897        }
1898        else if (name.equals("onsetPeriod")) {
1899          this.onset = new Period();
1900          return this.onset;
1901        }
1902        else if (name.equals("onsetRange")) {
1903          this.onset = new Range();
1904          return this.onset;
1905        }
1906        else if (name.equals("onsetString")) {
1907          this.onset = new StringType();
1908          return this.onset;
1909        }
1910        else if (name.equals("abatementDateTime")) {
1911          this.abatement = new DateTimeType();
1912          return this.abatement;
1913        }
1914        else if (name.equals("abatementAge")) {
1915          this.abatement = new Age();
1916          return this.abatement;
1917        }
1918        else if (name.equals("abatementPeriod")) {
1919          this.abatement = new Period();
1920          return this.abatement;
1921        }
1922        else if (name.equals("abatementRange")) {
1923          this.abatement = new Range();
1924          return this.abatement;
1925        }
1926        else if (name.equals("abatementString")) {
1927          this.abatement = new StringType();
1928          return this.abatement;
1929        }
1930        else if (name.equals("recordedDate")) {
1931          throw new FHIRException("Cannot call addChild on a primitive type Condition.recordedDate");
1932        }
1933        else if (name.equals("recorder")) {
1934          this.recorder = new Reference();
1935          return this.recorder;
1936        }
1937        else if (name.equals("asserter")) {
1938          this.asserter = new Reference();
1939          return this.asserter;
1940        }
1941        else if (name.equals("stage")) {
1942          return addStage();
1943        }
1944        else if (name.equals("evidence")) {
1945          return addEvidence();
1946        }
1947        else if (name.equals("note")) {
1948          return addNote();
1949        }
1950        else
1951          return super.addChild(name);
1952      }
1953
1954  public String fhirType() {
1955    return "Condition";
1956
1957  }
1958
1959      public Condition copy() {
1960        Condition dst = new Condition();
1961        copyValues(dst);
1962        if (identifier != null) {
1963          dst.identifier = new ArrayList<Identifier>();
1964          for (Identifier i : identifier)
1965            dst.identifier.add(i.copy());
1966        };
1967        dst.clinicalStatus = clinicalStatus == null ? null : clinicalStatus.copy();
1968        dst.verificationStatus = verificationStatus == null ? null : verificationStatus.copy();
1969        if (category != null) {
1970          dst.category = new ArrayList<CodeableConcept>();
1971          for (CodeableConcept i : category)
1972            dst.category.add(i.copy());
1973        };
1974        dst.severity = severity == null ? null : severity.copy();
1975        dst.code = code == null ? null : code.copy();
1976        if (bodySite != null) {
1977          dst.bodySite = new ArrayList<CodeableConcept>();
1978          for (CodeableConcept i : bodySite)
1979            dst.bodySite.add(i.copy());
1980        };
1981        dst.subject = subject == null ? null : subject.copy();
1982        dst.encounter = encounter == null ? null : encounter.copy();
1983        dst.onset = onset == null ? null : onset.copy();
1984        dst.abatement = abatement == null ? null : abatement.copy();
1985        dst.recordedDate = recordedDate == null ? null : recordedDate.copy();
1986        dst.recorder = recorder == null ? null : recorder.copy();
1987        dst.asserter = asserter == null ? null : asserter.copy();
1988        if (stage != null) {
1989          dst.stage = new ArrayList<ConditionStageComponent>();
1990          for (ConditionStageComponent i : stage)
1991            dst.stage.add(i.copy());
1992        };
1993        if (evidence != null) {
1994          dst.evidence = new ArrayList<ConditionEvidenceComponent>();
1995          for (ConditionEvidenceComponent i : evidence)
1996            dst.evidence.add(i.copy());
1997        };
1998        if (note != null) {
1999          dst.note = new ArrayList<Annotation>();
2000          for (Annotation i : note)
2001            dst.note.add(i.copy());
2002        };
2003        return dst;
2004      }
2005
2006      protected Condition typedCopy() {
2007        return copy();
2008      }
2009
2010      @Override
2011      public boolean equalsDeep(Base other_) {
2012        if (!super.equalsDeep(other_))
2013          return false;
2014        if (!(other_ instanceof Condition))
2015          return false;
2016        Condition o = (Condition) other_;
2017        return compareDeep(identifier, o.identifier, true) && compareDeep(clinicalStatus, o.clinicalStatus, true)
2018           && compareDeep(verificationStatus, o.verificationStatus, true) && compareDeep(category, o.category, true)
2019           && compareDeep(severity, o.severity, true) && compareDeep(code, o.code, true) && compareDeep(bodySite, o.bodySite, true)
2020           && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(onset, o.onset, true)
2021           && compareDeep(abatement, o.abatement, true) && compareDeep(recordedDate, o.recordedDate, true)
2022           && compareDeep(recorder, o.recorder, true) && compareDeep(asserter, o.asserter, true) && compareDeep(stage, o.stage, true)
2023           && compareDeep(evidence, o.evidence, true) && compareDeep(note, o.note, true);
2024      }
2025
2026      @Override
2027      public boolean equalsShallow(Base other_) {
2028        if (!super.equalsShallow(other_))
2029          return false;
2030        if (!(other_ instanceof Condition))
2031          return false;
2032        Condition o = (Condition) other_;
2033        return compareValues(recordedDate, o.recordedDate, true);
2034      }
2035
2036      public boolean isEmpty() {
2037        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, clinicalStatus
2038          , verificationStatus, category, severity, code, bodySite, subject, encounter, onset
2039          , abatement, recordedDate, recorder, asserter, stage, evidence, note);
2040      }
2041
2042  @Override
2043  public ResourceType getResourceType() {
2044    return ResourceType.Condition;
2045   }
2046
2047 /**
2048   * Search parameter: <b>severity</b>
2049   * <p>
2050   * Description: <b>The severity of the condition</b><br>
2051   * Type: <b>token</b><br>
2052   * Path: <b>Condition.severity</b><br>
2053   * </p>
2054   */
2055  @SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token" )
2056  public static final String SP_SEVERITY = "severity";
2057 /**
2058   * <b>Fluent Client</b> search parameter constant for <b>severity</b>
2059   * <p>
2060   * Description: <b>The severity of the condition</b><br>
2061   * Type: <b>token</b><br>
2062   * Path: <b>Condition.severity</b><br>
2063   * </p>
2064   */
2065  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SEVERITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SEVERITY);
2066
2067 /**
2068   * Search parameter: <b>evidence-detail</b>
2069   * <p>
2070   * Description: <b>Supporting information found elsewhere</b><br>
2071   * Type: <b>reference</b><br>
2072   * Path: <b>Condition.evidence.detail</b><br>
2073   * </p>
2074   */
2075  @SearchParamDefinition(name="evidence-detail", path="Condition.evidence.detail", description="Supporting information found elsewhere", type="reference" )
2076  public static final String SP_EVIDENCE_DETAIL = "evidence-detail";
2077 /**
2078   * <b>Fluent Client</b> search parameter constant for <b>evidence-detail</b>
2079   * <p>
2080   * Description: <b>Supporting information found elsewhere</b><br>
2081   * Type: <b>reference</b><br>
2082   * Path: <b>Condition.evidence.detail</b><br>
2083   * </p>
2084   */
2085  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EVIDENCE_DETAIL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EVIDENCE_DETAIL);
2086
2087/**
2088   * Constant for fluent queries to be used to add include statements. Specifies
2089   * the path value of "<b>Condition:evidence-detail</b>".
2090   */
2091  public static final ca.uhn.fhir.model.api.Include INCLUDE_EVIDENCE_DETAIL = new ca.uhn.fhir.model.api.Include("Condition:evidence-detail").toLocked();
2092
2093 /**
2094   * Search parameter: <b>identifier</b>
2095   * <p>
2096   * Description: <b>A unique identifier of the condition record</b><br>
2097   * Type: <b>token</b><br>
2098   * Path: <b>Condition.identifier</b><br>
2099   * </p>
2100   */
2101  @SearchParamDefinition(name="identifier", path="Condition.identifier", description="A unique identifier of the condition record", type="token" )
2102  public static final String SP_IDENTIFIER = "identifier";
2103 /**
2104   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2105   * <p>
2106   * Description: <b>A unique identifier of the condition record</b><br>
2107   * Type: <b>token</b><br>
2108   * Path: <b>Condition.identifier</b><br>
2109   * </p>
2110   */
2111  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2112
2113 /**
2114   * Search parameter: <b>onset-info</b>
2115   * <p>
2116   * Description: <b>Onsets as a string</b><br>
2117   * Type: <b>string</b><br>
2118   * Path: <b>Condition.onset[x]</b><br>
2119   * </p>
2120   */
2121  @SearchParamDefinition(name="onset-info", path="Condition.onset.as(string)", description="Onsets as a string", type="string" )
2122  public static final String SP_ONSET_INFO = "onset-info";
2123 /**
2124   * <b>Fluent Client</b> search parameter constant for <b>onset-info</b>
2125   * <p>
2126   * Description: <b>Onsets as a string</b><br>
2127   * Type: <b>string</b><br>
2128   * Path: <b>Condition.onset[x]</b><br>
2129   * </p>
2130   */
2131  public static final ca.uhn.fhir.rest.gclient.StringClientParam ONSET_INFO = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ONSET_INFO);
2132
2133 /**
2134   * Search parameter: <b>recorded-date</b>
2135   * <p>
2136   * Description: <b>Date record was first recorded</b><br>
2137   * Type: <b>date</b><br>
2138   * Path: <b>Condition.recordedDate</b><br>
2139   * </p>
2140   */
2141  @SearchParamDefinition(name="recorded-date", path="Condition.recordedDate", description="Date record was first recorded", type="date" )
2142  public static final String SP_RECORDED_DATE = "recorded-date";
2143 /**
2144   * <b>Fluent Client</b> search parameter constant for <b>recorded-date</b>
2145   * <p>
2146   * Description: <b>Date record was first recorded</b><br>
2147   * Type: <b>date</b><br>
2148   * Path: <b>Condition.recordedDate</b><br>
2149   * </p>
2150   */
2151  public static final ca.uhn.fhir.rest.gclient.DateClientParam RECORDED_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_RECORDED_DATE);
2152
2153 /**
2154   * Search parameter: <b>code</b>
2155   * <p>
2156   * Description: <b>Code for the condition</b><br>
2157   * Type: <b>token</b><br>
2158   * Path: <b>Condition.code</b><br>
2159   * </p>
2160   */
2161  @SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" )
2162  public static final String SP_CODE = "code";
2163 /**
2164   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2165   * <p>
2166   * Description: <b>Code for the condition</b><br>
2167   * Type: <b>token</b><br>
2168   * Path: <b>Condition.code</b><br>
2169   * </p>
2170   */
2171  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2172
2173 /**
2174   * Search parameter: <b>evidence</b>
2175   * <p>
2176   * Description: <b>Manifestation/symptom</b><br>
2177   * Type: <b>token</b><br>
2178   * Path: <b>Condition.evidence.code</b><br>
2179   * </p>
2180   */
2181  @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" )
2182  public static final String SP_EVIDENCE = "evidence";
2183 /**
2184   * <b>Fluent Client</b> search parameter constant for <b>evidence</b>
2185   * <p>
2186   * Description: <b>Manifestation/symptom</b><br>
2187   * Type: <b>token</b><br>
2188   * Path: <b>Condition.evidence.code</b><br>
2189   * </p>
2190   */
2191  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVIDENCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVIDENCE);
2192
2193 /**
2194   * Search parameter: <b>subject</b>
2195   * <p>
2196   * Description: <b>Who has the condition?</b><br>
2197   * Type: <b>reference</b><br>
2198   * Path: <b>Condition.subject</b><br>
2199   * </p>
2200   */
2201  @SearchParamDefinition(name="subject", path="Condition.subject", description="Who has the condition?", type="reference", target={Group.class, Patient.class } )
2202  public static final String SP_SUBJECT = "subject";
2203 /**
2204   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2205   * <p>
2206   * Description: <b>Who has the condition?</b><br>
2207   * Type: <b>reference</b><br>
2208   * Path: <b>Condition.subject</b><br>
2209   * </p>
2210   */
2211  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2212
2213/**
2214   * Constant for fluent queries to be used to add include statements. Specifies
2215   * the path value of "<b>Condition:subject</b>".
2216   */
2217  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Condition:subject").toLocked();
2218
2219 /**
2220   * Search parameter: <b>verification-status</b>
2221   * <p>
2222   * Description: <b>unconfirmed | provisional | differential | confirmed | refuted | entered-in-error</b><br>
2223   * Type: <b>token</b><br>
2224   * Path: <b>Condition.verificationStatus</b><br>
2225   * </p>
2226   */
2227  @SearchParamDefinition(name="verification-status", path="Condition.verificationStatus", description="unconfirmed | provisional | differential | confirmed | refuted | entered-in-error", type="token" )
2228  public static final String SP_VERIFICATION_STATUS = "verification-status";
2229 /**
2230   * <b>Fluent Client</b> search parameter constant for <b>verification-status</b>
2231   * <p>
2232   * Description: <b>unconfirmed | provisional | differential | confirmed | refuted | entered-in-error</b><br>
2233   * Type: <b>token</b><br>
2234   * Path: <b>Condition.verificationStatus</b><br>
2235   * </p>
2236   */
2237  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERIFICATION_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERIFICATION_STATUS);
2238
2239 /**
2240   * Search parameter: <b>clinical-status</b>
2241   * <p>
2242   * Description: <b>The clinical status of the condition</b><br>
2243   * Type: <b>token</b><br>
2244   * Path: <b>Condition.clinicalStatus</b><br>
2245   * </p>
2246   */
2247  @SearchParamDefinition(name="clinical-status", path="Condition.clinicalStatus", description="The clinical status of the condition", type="token" )
2248  public static final String SP_CLINICAL_STATUS = "clinical-status";
2249 /**
2250   * <b>Fluent Client</b> search parameter constant for <b>clinical-status</b>
2251   * <p>
2252   * Description: <b>The clinical status of the condition</b><br>
2253   * Type: <b>token</b><br>
2254   * Path: <b>Condition.clinicalStatus</b><br>
2255   * </p>
2256   */
2257  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLINICAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLINICAL_STATUS);
2258
2259 /**
2260   * Search parameter: <b>encounter</b>
2261   * <p>
2262   * Description: <b>Encounter created as part of</b><br>
2263   * Type: <b>reference</b><br>
2264   * Path: <b>Condition.encounter</b><br>
2265   * </p>
2266   */
2267  @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter created as part of", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } )
2268  public static final String SP_ENCOUNTER = "encounter";
2269 /**
2270   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2271   * <p>
2272   * Description: <b>Encounter created as part of</b><br>
2273   * Type: <b>reference</b><br>
2274   * Path: <b>Condition.encounter</b><br>
2275   * </p>
2276   */
2277  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2278
2279/**
2280   * Constant for fluent queries to be used to add include statements. Specifies
2281   * the path value of "<b>Condition:encounter</b>".
2282   */
2283  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Condition:encounter").toLocked();
2284
2285 /**
2286   * Search parameter: <b>onset-date</b>
2287   * <p>
2288   * Description: <b>Date related onsets (dateTime and Period)</b><br>
2289   * Type: <b>date</b><br>
2290   * Path: <b>Condition.onset[x]</b><br>
2291   * </p>
2292   */
2293  @SearchParamDefinition(name="onset-date", path="Condition.onset.as(dateTime) | Condition.onset.as(Period)", description="Date related onsets (dateTime and Period)", type="date" )
2294  public static final String SP_ONSET_DATE = "onset-date";
2295 /**
2296   * <b>Fluent Client</b> search parameter constant for <b>onset-date</b>
2297   * <p>
2298   * Description: <b>Date related onsets (dateTime and Period)</b><br>
2299   * Type: <b>date</b><br>
2300   * Path: <b>Condition.onset[x]</b><br>
2301   * </p>
2302   */
2303  public static final ca.uhn.fhir.rest.gclient.DateClientParam ONSET_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ONSET_DATE);
2304
2305 /**
2306   * Search parameter: <b>abatement-date</b>
2307   * <p>
2308   * Description: <b>Date-related abatements (dateTime and period)</b><br>
2309   * Type: <b>date</b><br>
2310   * Path: <b>Condition.abatement[x]</b><br>
2311   * </p>
2312   */
2313  @SearchParamDefinition(name="abatement-date", path="Condition.abatement.as(dateTime) | Condition.abatement.as(Period)", description="Date-related abatements (dateTime and period)", type="date" )
2314  public static final String SP_ABATEMENT_DATE = "abatement-date";
2315 /**
2316   * <b>Fluent Client</b> search parameter constant for <b>abatement-date</b>
2317   * <p>
2318   * Description: <b>Date-related abatements (dateTime and period)</b><br>
2319   * Type: <b>date</b><br>
2320   * Path: <b>Condition.abatement[x]</b><br>
2321   * </p>
2322   */
2323  public static final ca.uhn.fhir.rest.gclient.DateClientParam ABATEMENT_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ABATEMENT_DATE);
2324
2325 /**
2326   * Search parameter: <b>asserter</b>
2327   * <p>
2328   * Description: <b>Person who asserts this condition</b><br>
2329   * Type: <b>reference</b><br>
2330   * Path: <b>Condition.asserter</b><br>
2331   * </p>
2332   */
2333  @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2334  public static final String SP_ASSERTER = "asserter";
2335 /**
2336   * <b>Fluent Client</b> search parameter constant for <b>asserter</b>
2337   * <p>
2338   * Description: <b>Person who asserts this condition</b><br>
2339   * Type: <b>reference</b><br>
2340   * Path: <b>Condition.asserter</b><br>
2341   * </p>
2342   */
2343  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ASSERTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ASSERTER);
2344
2345/**
2346   * Constant for fluent queries to be used to add include statements. Specifies
2347   * the path value of "<b>Condition:asserter</b>".
2348   */
2349  public static final ca.uhn.fhir.model.api.Include INCLUDE_ASSERTER = new ca.uhn.fhir.model.api.Include("Condition:asserter").toLocked();
2350
2351 /**
2352   * Search parameter: <b>stage</b>
2353   * <p>
2354   * Description: <b>Simple summary (disease specific)</b><br>
2355   * Type: <b>token</b><br>
2356   * Path: <b>Condition.stage.summary</b><br>
2357   * </p>
2358   */
2359  @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" )
2360  public static final String SP_STAGE = "stage";
2361 /**
2362   * <b>Fluent Client</b> search parameter constant for <b>stage</b>
2363   * <p>
2364   * Description: <b>Simple summary (disease specific)</b><br>
2365   * Type: <b>token</b><br>
2366   * Path: <b>Condition.stage.summary</b><br>
2367   * </p>
2368   */
2369  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STAGE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STAGE);
2370
2371 /**
2372   * Search parameter: <b>abatement-string</b>
2373   * <p>
2374   * Description: <b>Abatement as a string</b><br>
2375   * Type: <b>string</b><br>
2376   * Path: <b>Condition.abatement[x]</b><br>
2377   * </p>
2378   */
2379  @SearchParamDefinition(name="abatement-string", path="Condition.abatement.as(string)", description="Abatement as a string", type="string" )
2380  public static final String SP_ABATEMENT_STRING = "abatement-string";
2381 /**
2382   * <b>Fluent Client</b> search parameter constant for <b>abatement-string</b>
2383   * <p>
2384   * Description: <b>Abatement as a string</b><br>
2385   * Type: <b>string</b><br>
2386   * Path: <b>Condition.abatement[x]</b><br>
2387   * </p>
2388   */
2389  public static final ca.uhn.fhir.rest.gclient.StringClientParam ABATEMENT_STRING = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ABATEMENT_STRING);
2390
2391 /**
2392   * Search parameter: <b>patient</b>
2393   * <p>
2394   * Description: <b>Who has the condition?</b><br>
2395   * Type: <b>reference</b><br>
2396   * Path: <b>Condition.subject</b><br>
2397   * </p>
2398   */
2399  @SearchParamDefinition(name="patient", path="Condition.subject.where(resolve() is Patient)", description="Who has the condition?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } )
2400  public static final String SP_PATIENT = "patient";
2401 /**
2402   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2403   * <p>
2404   * Description: <b>Who has the condition?</b><br>
2405   * Type: <b>reference</b><br>
2406   * Path: <b>Condition.subject</b><br>
2407   * </p>
2408   */
2409  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2410
2411/**
2412   * Constant for fluent queries to be used to add include statements. Specifies
2413   * the path value of "<b>Condition:patient</b>".
2414   */
2415  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Condition:patient").toLocked();
2416
2417 /**
2418   * Search parameter: <b>onset-age</b>
2419   * <p>
2420   * Description: <b>Onsets as age or age range</b><br>
2421   * Type: <b>quantity</b><br>
2422   * Path: <b>Condition.onset[x]</b><br>
2423   * </p>
2424   */
2425  @SearchParamDefinition(name="onset-age", path="Condition.onset.as(Age) | Condition.onset.as(Range)", description="Onsets as age or age range", type="quantity" )
2426  public static final String SP_ONSET_AGE = "onset-age";
2427 /**
2428   * <b>Fluent Client</b> search parameter constant for <b>onset-age</b>
2429   * <p>
2430   * Description: <b>Onsets as age or age range</b><br>
2431   * Type: <b>quantity</b><br>
2432   * Path: <b>Condition.onset[x]</b><br>
2433   * </p>
2434   */
2435  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam ONSET_AGE = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_ONSET_AGE);
2436
2437 /**
2438   * Search parameter: <b>abatement-age</b>
2439   * <p>
2440   * Description: <b>Abatement as age or age range</b><br>
2441   * Type: <b>quantity</b><br>
2442   * Path: <b>Condition.abatement[x]</b><br>
2443   * </p>
2444   */
2445  @SearchParamDefinition(name="abatement-age", path="Condition.abatement.as(Age) | Condition.abatement.as(Range)", description="Abatement as age or age range", type="quantity" )
2446  public static final String SP_ABATEMENT_AGE = "abatement-age";
2447 /**
2448   * <b>Fluent Client</b> search parameter constant for <b>abatement-age</b>
2449   * <p>
2450   * Description: <b>Abatement as age or age range</b><br>
2451   * Type: <b>quantity</b><br>
2452   * Path: <b>Condition.abatement[x]</b><br>
2453   * </p>
2454   */
2455  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam ABATEMENT_AGE = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_ABATEMENT_AGE);
2456
2457 /**
2458   * Search parameter: <b>category</b>
2459   * <p>
2460   * Description: <b>The category of the condition</b><br>
2461   * Type: <b>token</b><br>
2462   * Path: <b>Condition.category</b><br>
2463   * </p>
2464   */
2465  @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" )
2466  public static final String SP_CATEGORY = "category";
2467 /**
2468   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2469   * <p>
2470   * Description: <b>The category of the condition</b><br>
2471   * Type: <b>token</b><br>
2472   * Path: <b>Condition.category</b><br>
2473   * </p>
2474   */
2475  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2476
2477 /**
2478   * Search parameter: <b>body-site</b>
2479   * <p>
2480   * Description: <b>Anatomical location, if relevant</b><br>
2481   * Type: <b>token</b><br>
2482   * Path: <b>Condition.bodySite</b><br>
2483   * </p>
2484   */
2485  @SearchParamDefinition(name="body-site", path="Condition.bodySite", description="Anatomical location, if relevant", type="token" )
2486  public static final String SP_BODY_SITE = "body-site";
2487 /**
2488   * <b>Fluent Client</b> search parameter constant for <b>body-site</b>
2489   * <p>
2490   * Description: <b>Anatomical location, if relevant</b><br>
2491   * Type: <b>token</b><br>
2492   * Path: <b>Condition.bodySite</b><br>
2493   * </p>
2494   */
2495  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODY_SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODY_SITE);
2496
2497
2498}
2499