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