001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A definition of a condition and information relevant to managing it.
052 */
053@ResourceDef(name="ConditionDefinition", profile="http://hl7.org/fhir/StructureDefinition/ConditionDefinition")
054public class ConditionDefinition extends MetadataResource {
055
056    public enum ConditionPreconditionType {
057        /**
058         * The observation is very sensitive for the condition, but may also indicate other conditions.
059         */
060        SENSITIVE, 
061        /**
062         * The observation is very specific for this condition, but not particularly sensitive.
063         */
064        SPECIFIC, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static ConditionPreconditionType fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("sensitive".equals(codeString))
073          return SENSITIVE;
074        if ("specific".equals(codeString))
075          return SPECIFIC;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown ConditionPreconditionType code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case SENSITIVE: return "sensitive";
084            case SPECIFIC: return "specific";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case SENSITIVE: return "http://hl7.org/fhir/condition-precondition-type";
092            case SPECIFIC: return "http://hl7.org/fhir/condition-precondition-type";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case SENSITIVE: return "The observation is very sensitive for the condition, but may also indicate other conditions.";
100            case SPECIFIC: return "The observation is very specific for this condition, but not particularly sensitive.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case SENSITIVE: return "Sensitive";
108            case SPECIFIC: return "Specific";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class ConditionPreconditionTypeEnumFactory implements EnumFactory<ConditionPreconditionType> {
116    public ConditionPreconditionType fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("sensitive".equals(codeString))
121          return ConditionPreconditionType.SENSITIVE;
122        if ("specific".equals(codeString))
123          return ConditionPreconditionType.SPECIFIC;
124        throw new IllegalArgumentException("Unknown ConditionPreconditionType code '"+codeString+"'");
125        }
126        public Enumeration<ConditionPreconditionType> fromType(Base code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<ConditionPreconditionType>(this);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return null;
134        if ("sensitive".equals(codeString))
135          return new Enumeration<ConditionPreconditionType>(this, ConditionPreconditionType.SENSITIVE);
136        if ("specific".equals(codeString))
137          return new Enumeration<ConditionPreconditionType>(this, ConditionPreconditionType.SPECIFIC);
138        throw new FHIRException("Unknown ConditionPreconditionType code '"+codeString+"'");
139        }
140    public String toCode(ConditionPreconditionType code) {
141      if (code == ConditionPreconditionType.SENSITIVE)
142        return "sensitive";
143      if (code == ConditionPreconditionType.SPECIFIC)
144        return "specific";
145      return "?";
146      }
147    public String toSystem(ConditionPreconditionType code) {
148      return code.getSystem();
149      }
150    }
151
152    public enum ConditionQuestionnairePurpose {
153        /**
154         * A pre-admit questionnaire.
155         */
156        PREADMIT, 
157        /**
158         * A questionnaire that helps with diferential diagnosis.
159         */
160        DIFFDIAGNOSIS, 
161        /**
162         * A questionnaire to check on outcomes for the patient.
163         */
164        OUTCOME, 
165        /**
166         * added to help the parsers with the generic types
167         */
168        NULL;
169        public static ConditionQuestionnairePurpose fromCode(String codeString) throws FHIRException {
170            if (codeString == null || "".equals(codeString))
171                return null;
172        if ("preadmit".equals(codeString))
173          return PREADMIT;
174        if ("diff-diagnosis".equals(codeString))
175          return DIFFDIAGNOSIS;
176        if ("outcome".equals(codeString))
177          return OUTCOME;
178        if (Configuration.isAcceptInvalidEnums())
179          return null;
180        else
181          throw new FHIRException("Unknown ConditionQuestionnairePurpose code '"+codeString+"'");
182        }
183        public String toCode() {
184          switch (this) {
185            case PREADMIT: return "preadmit";
186            case DIFFDIAGNOSIS: return "diff-diagnosis";
187            case OUTCOME: return "outcome";
188            case NULL: return null;
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          switch (this) {
194            case PREADMIT: return "http://hl7.org/fhir/condition-questionnaire-purpose";
195            case DIFFDIAGNOSIS: return "http://hl7.org/fhir/condition-questionnaire-purpose";
196            case OUTCOME: return "http://hl7.org/fhir/condition-questionnaire-purpose";
197            case NULL: return null;
198            default: return "?";
199          }
200        }
201        public String getDefinition() {
202          switch (this) {
203            case PREADMIT: return "A pre-admit questionnaire.";
204            case DIFFDIAGNOSIS: return "A questionnaire that helps with diferential diagnosis.";
205            case OUTCOME: return "A questionnaire to check on outcomes for the patient.";
206            case NULL: return null;
207            default: return "?";
208          }
209        }
210        public String getDisplay() {
211          switch (this) {
212            case PREADMIT: return "Pre-admit";
213            case DIFFDIAGNOSIS: return "Diff Diagnosis";
214            case OUTCOME: return "Outcome";
215            case NULL: return null;
216            default: return "?";
217          }
218        }
219    }
220
221  public static class ConditionQuestionnairePurposeEnumFactory implements EnumFactory<ConditionQuestionnairePurpose> {
222    public ConditionQuestionnairePurpose fromCode(String codeString) throws IllegalArgumentException {
223      if (codeString == null || "".equals(codeString))
224            if (codeString == null || "".equals(codeString))
225                return null;
226        if ("preadmit".equals(codeString))
227          return ConditionQuestionnairePurpose.PREADMIT;
228        if ("diff-diagnosis".equals(codeString))
229          return ConditionQuestionnairePurpose.DIFFDIAGNOSIS;
230        if ("outcome".equals(codeString))
231          return ConditionQuestionnairePurpose.OUTCOME;
232        throw new IllegalArgumentException("Unknown ConditionQuestionnairePurpose code '"+codeString+"'");
233        }
234        public Enumeration<ConditionQuestionnairePurpose> fromType(Base code) throws FHIRException {
235          if (code == null)
236            return null;
237          if (code.isEmpty())
238            return new Enumeration<ConditionQuestionnairePurpose>(this);
239          String codeString = ((PrimitiveType) code).asStringValue();
240          if (codeString == null || "".equals(codeString))
241            return null;
242        if ("preadmit".equals(codeString))
243          return new Enumeration<ConditionQuestionnairePurpose>(this, ConditionQuestionnairePurpose.PREADMIT);
244        if ("diff-diagnosis".equals(codeString))
245          return new Enumeration<ConditionQuestionnairePurpose>(this, ConditionQuestionnairePurpose.DIFFDIAGNOSIS);
246        if ("outcome".equals(codeString))
247          return new Enumeration<ConditionQuestionnairePurpose>(this, ConditionQuestionnairePurpose.OUTCOME);
248        throw new FHIRException("Unknown ConditionQuestionnairePurpose code '"+codeString+"'");
249        }
250    public String toCode(ConditionQuestionnairePurpose code) {
251      if (code == ConditionQuestionnairePurpose.PREADMIT)
252        return "preadmit";
253      if (code == ConditionQuestionnairePurpose.DIFFDIAGNOSIS)
254        return "diff-diagnosis";
255      if (code == ConditionQuestionnairePurpose.OUTCOME)
256        return "outcome";
257      return "?";
258      }
259    public String toSystem(ConditionQuestionnairePurpose code) {
260      return code.getSystem();
261      }
262    }
263
264    @Block()
265    public static class ConditionDefinitionObservationComponent extends BackboneElement implements IBaseBackboneElement {
266        /**
267         * Category that is relevant.
268         */
269        @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
270        @Description(shortDefinition="Category that is relevant", formalDefinition="Category that is relevant." )
271        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-category")
272        protected CodeableConcept category;
273
274        /**
275         * Code for relevant Observation.
276         */
277        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
278        @Description(shortDefinition="Code for relevant Observation", formalDefinition="Code for relevant Observation." )
279        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
280        protected CodeableConcept code;
281
282        private static final long serialVersionUID = -1433986479L;
283
284    /**
285     * Constructor
286     */
287      public ConditionDefinitionObservationComponent() {
288        super();
289      }
290
291        /**
292         * @return {@link #category} (Category that is relevant.)
293         */
294        public CodeableConcept getCategory() { 
295          if (this.category == null)
296            if (Configuration.errorOnAutoCreate())
297              throw new Error("Attempt to auto-create ConditionDefinitionObservationComponent.category");
298            else if (Configuration.doAutoCreate())
299              this.category = new CodeableConcept(); // cc
300          return this.category;
301        }
302
303        public boolean hasCategory() { 
304          return this.category != null && !this.category.isEmpty();
305        }
306
307        /**
308         * @param value {@link #category} (Category that is relevant.)
309         */
310        public ConditionDefinitionObservationComponent setCategory(CodeableConcept value) { 
311          this.category = value;
312          return this;
313        }
314
315        /**
316         * @return {@link #code} (Code for relevant Observation.)
317         */
318        public CodeableConcept getCode() { 
319          if (this.code == null)
320            if (Configuration.errorOnAutoCreate())
321              throw new Error("Attempt to auto-create ConditionDefinitionObservationComponent.code");
322            else if (Configuration.doAutoCreate())
323              this.code = new CodeableConcept(); // cc
324          return this.code;
325        }
326
327        public boolean hasCode() { 
328          return this.code != null && !this.code.isEmpty();
329        }
330
331        /**
332         * @param value {@link #code} (Code for relevant Observation.)
333         */
334        public ConditionDefinitionObservationComponent setCode(CodeableConcept value) { 
335          this.code = value;
336          return this;
337        }
338
339        protected void listChildren(List<Property> children) {
340          super.listChildren(children);
341          children.add(new Property("category", "CodeableConcept", "Category that is relevant.", 0, 1, category));
342          children.add(new Property("code", "CodeableConcept", "Code for relevant Observation.", 0, 1, code));
343        }
344
345        @Override
346        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
347          switch (_hash) {
348          case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Category that is relevant.", 0, 1, category);
349          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Code for relevant Observation.", 0, 1, code);
350          default: return super.getNamedProperty(_hash, _name, _checkValid);
351          }
352
353        }
354
355      @Override
356      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
357        switch (hash) {
358        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
359        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
360        default: return super.getProperty(hash, name, checkValid);
361        }
362
363      }
364
365      @Override
366      public Base setProperty(int hash, String name, Base value) throws FHIRException {
367        switch (hash) {
368        case 50511102: // category
369          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
370          return value;
371        case 3059181: // code
372          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
373          return value;
374        default: return super.setProperty(hash, name, value);
375        }
376
377      }
378
379      @Override
380      public Base setProperty(String name, Base value) throws FHIRException {
381        if (name.equals("category")) {
382          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
383        } else if (name.equals("code")) {
384          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
385        } else
386          return super.setProperty(name, value);
387        return value;
388      }
389
390      @Override
391      public Base makeProperty(int hash, String name) throws FHIRException {
392        switch (hash) {
393        case 50511102:  return getCategory();
394        case 3059181:  return getCode();
395        default: return super.makeProperty(hash, name);
396        }
397
398      }
399
400      @Override
401      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
402        switch (hash) {
403        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
404        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
405        default: return super.getTypesForProperty(hash, name);
406        }
407
408      }
409
410      @Override
411      public Base addChild(String name) throws FHIRException {
412        if (name.equals("category")) {
413          this.category = new CodeableConcept();
414          return this.category;
415        }
416        else if (name.equals("code")) {
417          this.code = new CodeableConcept();
418          return this.code;
419        }
420        else
421          return super.addChild(name);
422      }
423
424      public ConditionDefinitionObservationComponent copy() {
425        ConditionDefinitionObservationComponent dst = new ConditionDefinitionObservationComponent();
426        copyValues(dst);
427        return dst;
428      }
429
430      public void copyValues(ConditionDefinitionObservationComponent dst) {
431        super.copyValues(dst);
432        dst.category = category == null ? null : category.copy();
433        dst.code = code == null ? null : code.copy();
434      }
435
436      @Override
437      public boolean equalsDeep(Base other_) {
438        if (!super.equalsDeep(other_))
439          return false;
440        if (!(other_ instanceof ConditionDefinitionObservationComponent))
441          return false;
442        ConditionDefinitionObservationComponent o = (ConditionDefinitionObservationComponent) other_;
443        return compareDeep(category, o.category, true) && compareDeep(code, o.code, true);
444      }
445
446      @Override
447      public boolean equalsShallow(Base other_) {
448        if (!super.equalsShallow(other_))
449          return false;
450        if (!(other_ instanceof ConditionDefinitionObservationComponent))
451          return false;
452        ConditionDefinitionObservationComponent o = (ConditionDefinitionObservationComponent) other_;
453        return true;
454      }
455
456      public boolean isEmpty() {
457        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, code);
458      }
459
460  public String fhirType() {
461    return "ConditionDefinition.observation";
462
463  }
464
465  }
466
467    @Block()
468    public static class ConditionDefinitionMedicationComponent extends BackboneElement implements IBaseBackboneElement {
469        /**
470         * Category that is relevant.
471         */
472        @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
473        @Description(shortDefinition="Category that is relevant", formalDefinition="Category that is relevant." )
474        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-category")
475        protected CodeableConcept category;
476
477        /**
478         * Code for relevant Medication.
479         */
480        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
481        @Description(shortDefinition="Code for relevant Medication", formalDefinition="Code for relevant Medication." )
482        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes")
483        protected CodeableConcept code;
484
485        private static final long serialVersionUID = -1433986479L;
486
487    /**
488     * Constructor
489     */
490      public ConditionDefinitionMedicationComponent() {
491        super();
492      }
493
494        /**
495         * @return {@link #category} (Category that is relevant.)
496         */
497        public CodeableConcept getCategory() { 
498          if (this.category == null)
499            if (Configuration.errorOnAutoCreate())
500              throw new Error("Attempt to auto-create ConditionDefinitionMedicationComponent.category");
501            else if (Configuration.doAutoCreate())
502              this.category = new CodeableConcept(); // cc
503          return this.category;
504        }
505
506        public boolean hasCategory() { 
507          return this.category != null && !this.category.isEmpty();
508        }
509
510        /**
511         * @param value {@link #category} (Category that is relevant.)
512         */
513        public ConditionDefinitionMedicationComponent setCategory(CodeableConcept value) { 
514          this.category = value;
515          return this;
516        }
517
518        /**
519         * @return {@link #code} (Code for relevant Medication.)
520         */
521        public CodeableConcept getCode() { 
522          if (this.code == null)
523            if (Configuration.errorOnAutoCreate())
524              throw new Error("Attempt to auto-create ConditionDefinitionMedicationComponent.code");
525            else if (Configuration.doAutoCreate())
526              this.code = new CodeableConcept(); // cc
527          return this.code;
528        }
529
530        public boolean hasCode() { 
531          return this.code != null && !this.code.isEmpty();
532        }
533
534        /**
535         * @param value {@link #code} (Code for relevant Medication.)
536         */
537        public ConditionDefinitionMedicationComponent setCode(CodeableConcept value) { 
538          this.code = value;
539          return this;
540        }
541
542        protected void listChildren(List<Property> children) {
543          super.listChildren(children);
544          children.add(new Property("category", "CodeableConcept", "Category that is relevant.", 0, 1, category));
545          children.add(new Property("code", "CodeableConcept", "Code for relevant Medication.", 0, 1, code));
546        }
547
548        @Override
549        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
550          switch (_hash) {
551          case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Category that is relevant.", 0, 1, category);
552          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Code for relevant Medication.", 0, 1, code);
553          default: return super.getNamedProperty(_hash, _name, _checkValid);
554          }
555
556        }
557
558      @Override
559      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
560        switch (hash) {
561        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
562        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
563        default: return super.getProperty(hash, name, checkValid);
564        }
565
566      }
567
568      @Override
569      public Base setProperty(int hash, String name, Base value) throws FHIRException {
570        switch (hash) {
571        case 50511102: // category
572          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
573          return value;
574        case 3059181: // code
575          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
576          return value;
577        default: return super.setProperty(hash, name, value);
578        }
579
580      }
581
582      @Override
583      public Base setProperty(String name, Base value) throws FHIRException {
584        if (name.equals("category")) {
585          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
586        } else if (name.equals("code")) {
587          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
588        } else
589          return super.setProperty(name, value);
590        return value;
591      }
592
593      @Override
594      public Base makeProperty(int hash, String name) throws FHIRException {
595        switch (hash) {
596        case 50511102:  return getCategory();
597        case 3059181:  return getCode();
598        default: return super.makeProperty(hash, name);
599        }
600
601      }
602
603      @Override
604      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
605        switch (hash) {
606        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
607        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
608        default: return super.getTypesForProperty(hash, name);
609        }
610
611      }
612
613      @Override
614      public Base addChild(String name) throws FHIRException {
615        if (name.equals("category")) {
616          this.category = new CodeableConcept();
617          return this.category;
618        }
619        else if (name.equals("code")) {
620          this.code = new CodeableConcept();
621          return this.code;
622        }
623        else
624          return super.addChild(name);
625      }
626
627      public ConditionDefinitionMedicationComponent copy() {
628        ConditionDefinitionMedicationComponent dst = new ConditionDefinitionMedicationComponent();
629        copyValues(dst);
630        return dst;
631      }
632
633      public void copyValues(ConditionDefinitionMedicationComponent dst) {
634        super.copyValues(dst);
635        dst.category = category == null ? null : category.copy();
636        dst.code = code == null ? null : code.copy();
637      }
638
639      @Override
640      public boolean equalsDeep(Base other_) {
641        if (!super.equalsDeep(other_))
642          return false;
643        if (!(other_ instanceof ConditionDefinitionMedicationComponent))
644          return false;
645        ConditionDefinitionMedicationComponent o = (ConditionDefinitionMedicationComponent) other_;
646        return compareDeep(category, o.category, true) && compareDeep(code, o.code, true);
647      }
648
649      @Override
650      public boolean equalsShallow(Base other_) {
651        if (!super.equalsShallow(other_))
652          return false;
653        if (!(other_ instanceof ConditionDefinitionMedicationComponent))
654          return false;
655        ConditionDefinitionMedicationComponent o = (ConditionDefinitionMedicationComponent) other_;
656        return true;
657      }
658
659      public boolean isEmpty() {
660        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, code);
661      }
662
663  public String fhirType() {
664    return "ConditionDefinition.medication";
665
666  }
667
668  }
669
670    @Block()
671    public static class ConditionDefinitionPreconditionComponent extends BackboneElement implements IBaseBackboneElement {
672        /**
673         * Kind of pre-condition.
674         */
675        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
676        @Description(shortDefinition="sensitive | specific", formalDefinition="Kind of pre-condition." )
677        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-precondition-type")
678        protected Enumeration<ConditionPreconditionType> type;
679
680        /**
681         * Code for relevant Observation.
682         */
683        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false)
684        @Description(shortDefinition="Code for relevant Observation", formalDefinition="Code for relevant Observation." )
685        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
686        protected CodeableConcept code;
687
688        /**
689         * Value of Observation.
690         */
691        @Child(name = "value", type = {CodeableConcept.class, Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false)
692        @Description(shortDefinition="Value of Observation", formalDefinition="Value of Observation." )
693        protected DataType value;
694
695        private static final long serialVersionUID = -1210333235L;
696
697    /**
698     * Constructor
699     */
700      public ConditionDefinitionPreconditionComponent() {
701        super();
702      }
703
704    /**
705     * Constructor
706     */
707      public ConditionDefinitionPreconditionComponent(ConditionPreconditionType type, CodeableConcept code) {
708        super();
709        this.setType(type);
710        this.setCode(code);
711      }
712
713        /**
714         * @return {@link #type} (Kind of pre-condition.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
715         */
716        public Enumeration<ConditionPreconditionType> getTypeElement() { 
717          if (this.type == null)
718            if (Configuration.errorOnAutoCreate())
719              throw new Error("Attempt to auto-create ConditionDefinitionPreconditionComponent.type");
720            else if (Configuration.doAutoCreate())
721              this.type = new Enumeration<ConditionPreconditionType>(new ConditionPreconditionTypeEnumFactory()); // bb
722          return this.type;
723        }
724
725        public boolean hasTypeElement() { 
726          return this.type != null && !this.type.isEmpty();
727        }
728
729        public boolean hasType() { 
730          return this.type != null && !this.type.isEmpty();
731        }
732
733        /**
734         * @param value {@link #type} (Kind of pre-condition.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
735         */
736        public ConditionDefinitionPreconditionComponent setTypeElement(Enumeration<ConditionPreconditionType> value) { 
737          this.type = value;
738          return this;
739        }
740
741        /**
742         * @return Kind of pre-condition.
743         */
744        public ConditionPreconditionType getType() { 
745          return this.type == null ? null : this.type.getValue();
746        }
747
748        /**
749         * @param value Kind of pre-condition.
750         */
751        public ConditionDefinitionPreconditionComponent setType(ConditionPreconditionType value) { 
752            if (this.type == null)
753              this.type = new Enumeration<ConditionPreconditionType>(new ConditionPreconditionTypeEnumFactory());
754            this.type.setValue(value);
755          return this;
756        }
757
758        /**
759         * @return {@link #code} (Code for relevant Observation.)
760         */
761        public CodeableConcept getCode() { 
762          if (this.code == null)
763            if (Configuration.errorOnAutoCreate())
764              throw new Error("Attempt to auto-create ConditionDefinitionPreconditionComponent.code");
765            else if (Configuration.doAutoCreate())
766              this.code = new CodeableConcept(); // cc
767          return this.code;
768        }
769
770        public boolean hasCode() { 
771          return this.code != null && !this.code.isEmpty();
772        }
773
774        /**
775         * @param value {@link #code} (Code for relevant Observation.)
776         */
777        public ConditionDefinitionPreconditionComponent setCode(CodeableConcept value) { 
778          this.code = value;
779          return this;
780        }
781
782        /**
783         * @return {@link #value} (Value of Observation.)
784         */
785        public DataType getValue() { 
786          return this.value;
787        }
788
789        /**
790         * @return {@link #value} (Value of Observation.)
791         */
792        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
793          if (this.value == null)
794            this.value = new CodeableConcept();
795          if (!(this.value instanceof CodeableConcept))
796            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
797          return (CodeableConcept) this.value;
798        }
799
800        public boolean hasValueCodeableConcept() { 
801          return this != null && this.value instanceof CodeableConcept;
802        }
803
804        /**
805         * @return {@link #value} (Value of Observation.)
806         */
807        public Quantity getValueQuantity() throws FHIRException { 
808          if (this.value == null)
809            this.value = new Quantity();
810          if (!(this.value instanceof Quantity))
811            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
812          return (Quantity) this.value;
813        }
814
815        public boolean hasValueQuantity() { 
816          return this != null && this.value instanceof Quantity;
817        }
818
819        public boolean hasValue() { 
820          return this.value != null && !this.value.isEmpty();
821        }
822
823        /**
824         * @param value {@link #value} (Value of Observation.)
825         */
826        public ConditionDefinitionPreconditionComponent setValue(DataType value) { 
827          if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity))
828            throw new Error("Not the right type for ConditionDefinition.precondition.value[x]: "+value.fhirType());
829          this.value = value;
830          return this;
831        }
832
833        protected void listChildren(List<Property> children) {
834          super.listChildren(children);
835          children.add(new Property("type", "code", "Kind of pre-condition.", 0, 1, type));
836          children.add(new Property("code", "CodeableConcept", "Code for relevant Observation.", 0, 1, code));
837          children.add(new Property("value[x]", "CodeableConcept|Quantity", "Value of Observation.", 0, 1, value));
838        }
839
840        @Override
841        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
842          switch (_hash) {
843          case 3575610: /*type*/  return new Property("type", "code", "Kind of pre-condition.", 0, 1, type);
844          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Code for relevant Observation.", 0, 1, code);
845          case -1410166417: /*value[x]*/  return new Property("value[x]", "CodeableConcept|Quantity", "Value of Observation.", 0, 1, value);
846          case 111972721: /*value*/  return new Property("value[x]", "CodeableConcept|Quantity", "Value of Observation.", 0, 1, value);
847          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "Value of Observation.", 0, 1, value);
848          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "Value of Observation.", 0, 1, value);
849          default: return super.getNamedProperty(_hash, _name, _checkValid);
850          }
851
852        }
853
854      @Override
855      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
856        switch (hash) {
857        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ConditionPreconditionType>
858        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
859        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
860        default: return super.getProperty(hash, name, checkValid);
861        }
862
863      }
864
865      @Override
866      public Base setProperty(int hash, String name, Base value) throws FHIRException {
867        switch (hash) {
868        case 3575610: // type
869          value = new ConditionPreconditionTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
870          this.type = (Enumeration) value; // Enumeration<ConditionPreconditionType>
871          return value;
872        case 3059181: // code
873          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
874          return value;
875        case 111972721: // value
876          this.value = TypeConvertor.castToType(value); // DataType
877          return value;
878        default: return super.setProperty(hash, name, value);
879        }
880
881      }
882
883      @Override
884      public Base setProperty(String name, Base value) throws FHIRException {
885        if (name.equals("type")) {
886          value = new ConditionPreconditionTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
887          this.type = (Enumeration) value; // Enumeration<ConditionPreconditionType>
888        } else if (name.equals("code")) {
889          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
890        } else if (name.equals("value[x]")) {
891          this.value = TypeConvertor.castToType(value); // DataType
892        } else
893          return super.setProperty(name, value);
894        return value;
895      }
896
897      @Override
898      public Base makeProperty(int hash, String name) throws FHIRException {
899        switch (hash) {
900        case 3575610:  return getTypeElement();
901        case 3059181:  return getCode();
902        case -1410166417:  return getValue();
903        case 111972721:  return getValue();
904        default: return super.makeProperty(hash, name);
905        }
906
907      }
908
909      @Override
910      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
911        switch (hash) {
912        case 3575610: /*type*/ return new String[] {"code"};
913        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
914        case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity"};
915        default: return super.getTypesForProperty(hash, name);
916        }
917
918      }
919
920      @Override
921      public Base addChild(String name) throws FHIRException {
922        if (name.equals("type")) {
923          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.precondition.type");
924        }
925        else if (name.equals("code")) {
926          this.code = new CodeableConcept();
927          return this.code;
928        }
929        else if (name.equals("valueCodeableConcept")) {
930          this.value = new CodeableConcept();
931          return this.value;
932        }
933        else if (name.equals("valueQuantity")) {
934          this.value = new Quantity();
935          return this.value;
936        }
937        else
938          return super.addChild(name);
939      }
940
941      public ConditionDefinitionPreconditionComponent copy() {
942        ConditionDefinitionPreconditionComponent dst = new ConditionDefinitionPreconditionComponent();
943        copyValues(dst);
944        return dst;
945      }
946
947      public void copyValues(ConditionDefinitionPreconditionComponent dst) {
948        super.copyValues(dst);
949        dst.type = type == null ? null : type.copy();
950        dst.code = code == null ? null : code.copy();
951        dst.value = value == null ? null : value.copy();
952      }
953
954      @Override
955      public boolean equalsDeep(Base other_) {
956        if (!super.equalsDeep(other_))
957          return false;
958        if (!(other_ instanceof ConditionDefinitionPreconditionComponent))
959          return false;
960        ConditionDefinitionPreconditionComponent o = (ConditionDefinitionPreconditionComponent) other_;
961        return compareDeep(type, o.type, true) && compareDeep(code, o.code, true) && compareDeep(value, o.value, true)
962          ;
963      }
964
965      @Override
966      public boolean equalsShallow(Base other_) {
967        if (!super.equalsShallow(other_))
968          return false;
969        if (!(other_ instanceof ConditionDefinitionPreconditionComponent))
970          return false;
971        ConditionDefinitionPreconditionComponent o = (ConditionDefinitionPreconditionComponent) other_;
972        return compareValues(type, o.type, true);
973      }
974
975      public boolean isEmpty() {
976        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, code, value);
977      }
978
979  public String fhirType() {
980    return "ConditionDefinition.precondition";
981
982  }
983
984  }
985
986    @Block()
987    public static class ConditionDefinitionQuestionnaireComponent extends BackboneElement implements IBaseBackboneElement {
988        /**
989         * Use of the questionnaire.
990         */
991        @Child(name = "purpose", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
992        @Description(shortDefinition="preadmit | diff-diagnosis | outcome", formalDefinition="Use of the questionnaire." )
993        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-questionnaire-purpose")
994        protected Enumeration<ConditionQuestionnairePurpose> purpose;
995
996        /**
997         * Specific Questionnaire.
998         */
999        @Child(name = "reference", type = {Questionnaire.class}, order=2, min=1, max=1, modifier=false, summary=false)
1000        @Description(shortDefinition="Specific Questionnaire", formalDefinition="Specific Questionnaire." )
1001        protected Reference reference;
1002
1003        private static final long serialVersionUID = -1791379681L;
1004
1005    /**
1006     * Constructor
1007     */
1008      public ConditionDefinitionQuestionnaireComponent() {
1009        super();
1010      }
1011
1012    /**
1013     * Constructor
1014     */
1015      public ConditionDefinitionQuestionnaireComponent(ConditionQuestionnairePurpose purpose, Reference reference) {
1016        super();
1017        this.setPurpose(purpose);
1018        this.setReference(reference);
1019      }
1020
1021        /**
1022         * @return {@link #purpose} (Use of the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
1023         */
1024        public Enumeration<ConditionQuestionnairePurpose> getPurposeElement() { 
1025          if (this.purpose == null)
1026            if (Configuration.errorOnAutoCreate())
1027              throw new Error("Attempt to auto-create ConditionDefinitionQuestionnaireComponent.purpose");
1028            else if (Configuration.doAutoCreate())
1029              this.purpose = new Enumeration<ConditionQuestionnairePurpose>(new ConditionQuestionnairePurposeEnumFactory()); // bb
1030          return this.purpose;
1031        }
1032
1033        public boolean hasPurposeElement() { 
1034          return this.purpose != null && !this.purpose.isEmpty();
1035        }
1036
1037        public boolean hasPurpose() { 
1038          return this.purpose != null && !this.purpose.isEmpty();
1039        }
1040
1041        /**
1042         * @param value {@link #purpose} (Use of the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
1043         */
1044        public ConditionDefinitionQuestionnaireComponent setPurposeElement(Enumeration<ConditionQuestionnairePurpose> value) { 
1045          this.purpose = value;
1046          return this;
1047        }
1048
1049        /**
1050         * @return Use of the questionnaire.
1051         */
1052        public ConditionQuestionnairePurpose getPurpose() { 
1053          return this.purpose == null ? null : this.purpose.getValue();
1054        }
1055
1056        /**
1057         * @param value Use of the questionnaire.
1058         */
1059        public ConditionDefinitionQuestionnaireComponent setPurpose(ConditionQuestionnairePurpose value) { 
1060            if (this.purpose == null)
1061              this.purpose = new Enumeration<ConditionQuestionnairePurpose>(new ConditionQuestionnairePurposeEnumFactory());
1062            this.purpose.setValue(value);
1063          return this;
1064        }
1065
1066        /**
1067         * @return {@link #reference} (Specific Questionnaire.)
1068         */
1069        public Reference getReference() { 
1070          if (this.reference == null)
1071            if (Configuration.errorOnAutoCreate())
1072              throw new Error("Attempt to auto-create ConditionDefinitionQuestionnaireComponent.reference");
1073            else if (Configuration.doAutoCreate())
1074              this.reference = new Reference(); // cc
1075          return this.reference;
1076        }
1077
1078        public boolean hasReference() { 
1079          return this.reference != null && !this.reference.isEmpty();
1080        }
1081
1082        /**
1083         * @param value {@link #reference} (Specific Questionnaire.)
1084         */
1085        public ConditionDefinitionQuestionnaireComponent setReference(Reference value) { 
1086          this.reference = value;
1087          return this;
1088        }
1089
1090        protected void listChildren(List<Property> children) {
1091          super.listChildren(children);
1092          children.add(new Property("purpose", "code", "Use of the questionnaire.", 0, 1, purpose));
1093          children.add(new Property("reference", "Reference(Questionnaire)", "Specific Questionnaire.", 0, 1, reference));
1094        }
1095
1096        @Override
1097        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1098          switch (_hash) {
1099          case -220463842: /*purpose*/  return new Property("purpose", "code", "Use of the questionnaire.", 0, 1, purpose);
1100          case -925155509: /*reference*/  return new Property("reference", "Reference(Questionnaire)", "Specific Questionnaire.", 0, 1, reference);
1101          default: return super.getNamedProperty(_hash, _name, _checkValid);
1102          }
1103
1104        }
1105
1106      @Override
1107      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1108        switch (hash) {
1109        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // Enumeration<ConditionQuestionnairePurpose>
1110        case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
1111        default: return super.getProperty(hash, name, checkValid);
1112        }
1113
1114      }
1115
1116      @Override
1117      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1118        switch (hash) {
1119        case -220463842: // purpose
1120          value = new ConditionQuestionnairePurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
1121          this.purpose = (Enumeration) value; // Enumeration<ConditionQuestionnairePurpose>
1122          return value;
1123        case -925155509: // reference
1124          this.reference = TypeConvertor.castToReference(value); // Reference
1125          return value;
1126        default: return super.setProperty(hash, name, value);
1127        }
1128
1129      }
1130
1131      @Override
1132      public Base setProperty(String name, Base value) throws FHIRException {
1133        if (name.equals("purpose")) {
1134          value = new ConditionQuestionnairePurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
1135          this.purpose = (Enumeration) value; // Enumeration<ConditionQuestionnairePurpose>
1136        } else if (name.equals("reference")) {
1137          this.reference = TypeConvertor.castToReference(value); // Reference
1138        } else
1139          return super.setProperty(name, value);
1140        return value;
1141      }
1142
1143      @Override
1144      public Base makeProperty(int hash, String name) throws FHIRException {
1145        switch (hash) {
1146        case -220463842:  return getPurposeElement();
1147        case -925155509:  return getReference();
1148        default: return super.makeProperty(hash, name);
1149        }
1150
1151      }
1152
1153      @Override
1154      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1155        switch (hash) {
1156        case -220463842: /*purpose*/ return new String[] {"code"};
1157        case -925155509: /*reference*/ return new String[] {"Reference"};
1158        default: return super.getTypesForProperty(hash, name);
1159        }
1160
1161      }
1162
1163      @Override
1164      public Base addChild(String name) throws FHIRException {
1165        if (name.equals("purpose")) {
1166          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.questionnaire.purpose");
1167        }
1168        else if (name.equals("reference")) {
1169          this.reference = new Reference();
1170          return this.reference;
1171        }
1172        else
1173          return super.addChild(name);
1174      }
1175
1176      public ConditionDefinitionQuestionnaireComponent copy() {
1177        ConditionDefinitionQuestionnaireComponent dst = new ConditionDefinitionQuestionnaireComponent();
1178        copyValues(dst);
1179        return dst;
1180      }
1181
1182      public void copyValues(ConditionDefinitionQuestionnaireComponent dst) {
1183        super.copyValues(dst);
1184        dst.purpose = purpose == null ? null : purpose.copy();
1185        dst.reference = reference == null ? null : reference.copy();
1186      }
1187
1188      @Override
1189      public boolean equalsDeep(Base other_) {
1190        if (!super.equalsDeep(other_))
1191          return false;
1192        if (!(other_ instanceof ConditionDefinitionQuestionnaireComponent))
1193          return false;
1194        ConditionDefinitionQuestionnaireComponent o = (ConditionDefinitionQuestionnaireComponent) other_;
1195        return compareDeep(purpose, o.purpose, true) && compareDeep(reference, o.reference, true);
1196      }
1197
1198      @Override
1199      public boolean equalsShallow(Base other_) {
1200        if (!super.equalsShallow(other_))
1201          return false;
1202        if (!(other_ instanceof ConditionDefinitionQuestionnaireComponent))
1203          return false;
1204        ConditionDefinitionQuestionnaireComponent o = (ConditionDefinitionQuestionnaireComponent) other_;
1205        return compareValues(purpose, o.purpose, true);
1206      }
1207
1208      public boolean isEmpty() {
1209        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, reference);
1210      }
1211
1212  public String fhirType() {
1213    return "ConditionDefinition.questionnaire";
1214
1215  }
1216
1217  }
1218
1219    @Block()
1220    public static class ConditionDefinitionPlanComponent extends BackboneElement implements IBaseBackboneElement {
1221        /**
1222         * Use for the plan.
1223         */
1224        @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1225        @Description(shortDefinition="Use for the plan", formalDefinition="Use for the plan." )
1226        protected CodeableConcept role;
1227
1228        /**
1229         * The actual plan.
1230         */
1231        @Child(name = "reference", type = {PlanDefinition.class}, order=2, min=1, max=1, modifier=false, summary=false)
1232        @Description(shortDefinition="The actual plan", formalDefinition="The actual plan." )
1233        protected Reference reference;
1234
1235        private static final long serialVersionUID = -1992921787L;
1236
1237    /**
1238     * Constructor
1239     */
1240      public ConditionDefinitionPlanComponent() {
1241        super();
1242      }
1243
1244    /**
1245     * Constructor
1246     */
1247      public ConditionDefinitionPlanComponent(Reference reference) {
1248        super();
1249        this.setReference(reference);
1250      }
1251
1252        /**
1253         * @return {@link #role} (Use for the plan.)
1254         */
1255        public CodeableConcept getRole() { 
1256          if (this.role == null)
1257            if (Configuration.errorOnAutoCreate())
1258              throw new Error("Attempt to auto-create ConditionDefinitionPlanComponent.role");
1259            else if (Configuration.doAutoCreate())
1260              this.role = new CodeableConcept(); // cc
1261          return this.role;
1262        }
1263
1264        public boolean hasRole() { 
1265          return this.role != null && !this.role.isEmpty();
1266        }
1267
1268        /**
1269         * @param value {@link #role} (Use for the plan.)
1270         */
1271        public ConditionDefinitionPlanComponent setRole(CodeableConcept value) { 
1272          this.role = value;
1273          return this;
1274        }
1275
1276        /**
1277         * @return {@link #reference} (The actual plan.)
1278         */
1279        public Reference getReference() { 
1280          if (this.reference == null)
1281            if (Configuration.errorOnAutoCreate())
1282              throw new Error("Attempt to auto-create ConditionDefinitionPlanComponent.reference");
1283            else if (Configuration.doAutoCreate())
1284              this.reference = new Reference(); // cc
1285          return this.reference;
1286        }
1287
1288        public boolean hasReference() { 
1289          return this.reference != null && !this.reference.isEmpty();
1290        }
1291
1292        /**
1293         * @param value {@link #reference} (The actual plan.)
1294         */
1295        public ConditionDefinitionPlanComponent setReference(Reference value) { 
1296          this.reference = value;
1297          return this;
1298        }
1299
1300        protected void listChildren(List<Property> children) {
1301          super.listChildren(children);
1302          children.add(new Property("role", "CodeableConcept", "Use for the plan.", 0, 1, role));
1303          children.add(new Property("reference", "Reference(PlanDefinition)", "The actual plan.", 0, 1, reference));
1304        }
1305
1306        @Override
1307        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1308          switch (_hash) {
1309          case 3506294: /*role*/  return new Property("role", "CodeableConcept", "Use for the plan.", 0, 1, role);
1310          case -925155509: /*reference*/  return new Property("reference", "Reference(PlanDefinition)", "The actual plan.", 0, 1, reference);
1311          default: return super.getNamedProperty(_hash, _name, _checkValid);
1312          }
1313
1314        }
1315
1316      @Override
1317      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1318        switch (hash) {
1319        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
1320        case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
1321        default: return super.getProperty(hash, name, checkValid);
1322        }
1323
1324      }
1325
1326      @Override
1327      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1328        switch (hash) {
1329        case 3506294: // role
1330          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1331          return value;
1332        case -925155509: // reference
1333          this.reference = TypeConvertor.castToReference(value); // Reference
1334          return value;
1335        default: return super.setProperty(hash, name, value);
1336        }
1337
1338      }
1339
1340      @Override
1341      public Base setProperty(String name, Base value) throws FHIRException {
1342        if (name.equals("role")) {
1343          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1344        } else if (name.equals("reference")) {
1345          this.reference = TypeConvertor.castToReference(value); // Reference
1346        } else
1347          return super.setProperty(name, value);
1348        return value;
1349      }
1350
1351      @Override
1352      public Base makeProperty(int hash, String name) throws FHIRException {
1353        switch (hash) {
1354        case 3506294:  return getRole();
1355        case -925155509:  return getReference();
1356        default: return super.makeProperty(hash, name);
1357        }
1358
1359      }
1360
1361      @Override
1362      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1363        switch (hash) {
1364        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
1365        case -925155509: /*reference*/ return new String[] {"Reference"};
1366        default: return super.getTypesForProperty(hash, name);
1367        }
1368
1369      }
1370
1371      @Override
1372      public Base addChild(String name) throws FHIRException {
1373        if (name.equals("role")) {
1374          this.role = new CodeableConcept();
1375          return this.role;
1376        }
1377        else if (name.equals("reference")) {
1378          this.reference = new Reference();
1379          return this.reference;
1380        }
1381        else
1382          return super.addChild(name);
1383      }
1384
1385      public ConditionDefinitionPlanComponent copy() {
1386        ConditionDefinitionPlanComponent dst = new ConditionDefinitionPlanComponent();
1387        copyValues(dst);
1388        return dst;
1389      }
1390
1391      public void copyValues(ConditionDefinitionPlanComponent dst) {
1392        super.copyValues(dst);
1393        dst.role = role == null ? null : role.copy();
1394        dst.reference = reference == null ? null : reference.copy();
1395      }
1396
1397      @Override
1398      public boolean equalsDeep(Base other_) {
1399        if (!super.equalsDeep(other_))
1400          return false;
1401        if (!(other_ instanceof ConditionDefinitionPlanComponent))
1402          return false;
1403        ConditionDefinitionPlanComponent o = (ConditionDefinitionPlanComponent) other_;
1404        return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true);
1405      }
1406
1407      @Override
1408      public boolean equalsShallow(Base other_) {
1409        if (!super.equalsShallow(other_))
1410          return false;
1411        if (!(other_ instanceof ConditionDefinitionPlanComponent))
1412          return false;
1413        ConditionDefinitionPlanComponent o = (ConditionDefinitionPlanComponent) other_;
1414        return true;
1415      }
1416
1417      public boolean isEmpty() {
1418        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, reference);
1419      }
1420
1421  public String fhirType() {
1422    return "ConditionDefinition.plan";
1423
1424  }
1425
1426  }
1427
1428    /**
1429     * An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.
1430     */
1431    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1432    @Description(shortDefinition="Canonical identifier for this condition definition, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers." )
1433    protected UriType url;
1434
1435    /**
1436     * A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance.
1437     */
1438    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1439    @Description(shortDefinition="Additional identifier for the condition definition", formalDefinition="A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1440    protected List<Identifier> identifier;
1441
1442    /**
1443     * The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
1444     */
1445    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1446    @Description(shortDefinition="Business version of the condition definition", formalDefinition="The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." )
1447    protected StringType version;
1448
1449    /**
1450     * A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1451     */
1452    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1453    @Description(shortDefinition="Name for this condition definition (computer friendly)", formalDefinition="A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
1454    protected StringType name;
1455
1456    /**
1457     * A short, descriptive, user-friendly title for the condition definition.
1458     */
1459    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1460    @Description(shortDefinition="Name for this condition definition (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the condition definition." )
1461    protected StringType title;
1462
1463    /**
1464     * An explanatory or alternate title for the event definition giving additional information about its content.
1465     */
1466    @Child(name = "subtitle", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1467    @Description(shortDefinition="Subordinate title of the event definition", formalDefinition="An explanatory or alternate title for the event definition giving additional information about its content." )
1468    protected StringType subtitle;
1469
1470    /**
1471     * The status of this condition definition. Enables tracking the life-cycle of the content.
1472     */
1473    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
1474    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this condition definition. Enables tracking the life-cycle of the content." )
1475    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
1476    protected Enumeration<PublicationStatus> status;
1477
1478    /**
1479     * A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1480     */
1481    @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1482    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
1483    protected BooleanType experimental;
1484
1485    /**
1486     * The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.
1487     */
1488    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1489    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes." )
1490    protected DateTimeType date;
1491
1492    /**
1493     * The name of the organization or individual that published the condition definition.
1494     */
1495    @Child(name = "publisher", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1496    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the condition definition." )
1497    protected StringType publisher;
1498
1499    /**
1500     * Contact details to assist a user in finding and communicating with the publisher.
1501     */
1502    @Child(name = "contact", type = {ContactDetail.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1503    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
1504    protected List<ContactDetail> contact;
1505
1506    /**
1507     * A free text natural language description of the condition definition from a consumer's perspective.
1508     */
1509    @Child(name = "description", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1510    @Description(shortDefinition="Natural language description of the condition definition", formalDefinition="A free text natural language description of the condition definition from a consumer's perspective." )
1511    protected MarkdownType description;
1512
1513    /**
1514     * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances.
1515     */
1516    @Child(name = "useContext", type = {UsageContext.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1517    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances." )
1518    protected List<UsageContext> useContext;
1519
1520    /**
1521     * A legal or geographic region in which the condition definition is intended to be used.
1522     */
1523    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1524    @Description(shortDefinition="Intended jurisdiction for condition definition (if applicable)", formalDefinition="A legal or geographic region in which the condition definition is intended to be used." )
1525    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
1526    protected List<CodeableConcept> jurisdiction;
1527
1528    /**
1529     * Identification of the condition, problem or diagnosis.
1530     */
1531    @Child(name = "code", type = {CodeableConcept.class}, order=14, min=1, max=1, modifier=false, summary=true)
1532    @Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." )
1533    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
1534    protected CodeableConcept code;
1535
1536    /**
1537     * A subjective assessment of the severity of the condition as evaluated by the clinician.
1538     */
1539    @Child(name = "severity", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=true)
1540    @Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." )
1541    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-severity")
1542    protected CodeableConcept severity;
1543
1544    /**
1545     * The anatomical location where this condition manifests itself.
1546     */
1547    @Child(name = "bodySite", type = {CodeableConcept.class}, order=16, min=0, max=1, modifier=false, summary=true)
1548    @Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." )
1549    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
1550    protected CodeableConcept bodySite;
1551
1552    /**
1553     * Clinical stage or grade of a condition. May include formal severity assessments.
1554     */
1555    @Child(name = "stage", type = {CodeableConcept.class}, order=17, min=0, max=1, modifier=false, summary=true)
1556    @Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." )
1557    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-stage")
1558    protected CodeableConcept stage;
1559
1560    /**
1561     * Whether Severity is appropriate to collect for this condition.
1562     */
1563    @Child(name = "hasSeverity", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false)
1564    @Description(shortDefinition="Whether Severity is appropriate", formalDefinition="Whether Severity is appropriate to collect for this condition." )
1565    protected BooleanType hasSeverity;
1566
1567    /**
1568     * Whether bodySite is appropriate to collect for this condition.
1569     */
1570    @Child(name = "hasBodySite", type = {BooleanType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1571    @Description(shortDefinition="Whether bodySite is appropriate", formalDefinition="Whether bodySite is appropriate to collect for this condition." )
1572    protected BooleanType hasBodySite;
1573
1574    /**
1575     * Whether stage is appropriate to collect for this condition.
1576     */
1577    @Child(name = "hasStage", type = {BooleanType.class}, order=20, min=0, max=1, modifier=false, summary=false)
1578    @Description(shortDefinition="Whether stage is appropriate", formalDefinition="Whether stage is appropriate to collect for this condition." )
1579    protected BooleanType hasStage;
1580
1581    /**
1582     * Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.
1583     */
1584    @Child(name = "definition", type = {UriType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1585    @Description(shortDefinition="Formal Definition for the condition", formalDefinition="Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers." )
1586    protected List<UriType> definition;
1587
1588    /**
1589     * Observations particularly relevant to this condition.
1590     */
1591    @Child(name = "observation", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1592    @Description(shortDefinition="Observations particularly relevant to this condition", formalDefinition="Observations particularly relevant to this condition." )
1593    protected List<ConditionDefinitionObservationComponent> observation;
1594
1595    /**
1596     * Medications particularly relevant for this condition.
1597     */
1598    @Child(name = "medication", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1599    @Description(shortDefinition="Medications particularly relevant for this condition", formalDefinition="Medications particularly relevant for this condition." )
1600    protected List<ConditionDefinitionMedicationComponent> medication;
1601
1602    /**
1603     * An observation that suggests that this condition applies.
1604     */
1605    @Child(name = "precondition", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1606    @Description(shortDefinition="Observation that suggets this condition", formalDefinition="An observation that suggests that this condition applies." )
1607    protected List<ConditionDefinitionPreconditionComponent> precondition;
1608
1609    /**
1610     * Appropriate team for this condition.
1611     */
1612    @Child(name = "team", type = {CareTeam.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1613    @Description(shortDefinition="Appropriate team for this condition", formalDefinition="Appropriate team for this condition." )
1614    protected List<Reference> team;
1615
1616    /**
1617     * Questionnaire for this condition.
1618     */
1619    @Child(name = "questionnaire", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1620    @Description(shortDefinition="Questionnaire for this condition", formalDefinition="Questionnaire for this condition." )
1621    protected List<ConditionDefinitionQuestionnaireComponent> questionnaire;
1622
1623    /**
1624     * Plan that is appropriate.
1625     */
1626    @Child(name = "plan", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1627    @Description(shortDefinition="Plan that is appropriate", formalDefinition="Plan that is appropriate." )
1628    protected List<ConditionDefinitionPlanComponent> plan;
1629
1630    private static final long serialVersionUID = 1798806914L;
1631
1632  /**
1633   * Constructor
1634   */
1635    public ConditionDefinition() {
1636      super();
1637    }
1638
1639  /**
1640   * Constructor
1641   */
1642    public ConditionDefinition(PublicationStatus status, CodeableConcept code) {
1643      super();
1644      this.setStatus(status);
1645      this.setCode(code);
1646    }
1647
1648    /**
1649     * @return {@link #url} (An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1650     */
1651    public UriType getUrlElement() { 
1652      if (this.url == null)
1653        if (Configuration.errorOnAutoCreate())
1654          throw new Error("Attempt to auto-create ConditionDefinition.url");
1655        else if (Configuration.doAutoCreate())
1656          this.url = new UriType(); // bb
1657      return this.url;
1658    }
1659
1660    public boolean hasUrlElement() { 
1661      return this.url != null && !this.url.isEmpty();
1662    }
1663
1664    public boolean hasUrl() { 
1665      return this.url != null && !this.url.isEmpty();
1666    }
1667
1668    /**
1669     * @param value {@link #url} (An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1670     */
1671    public ConditionDefinition setUrlElement(UriType value) { 
1672      this.url = value;
1673      return this;
1674    }
1675
1676    /**
1677     * @return An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.
1678     */
1679    public String getUrl() { 
1680      return this.url == null ? null : this.url.getValue();
1681    }
1682
1683    /**
1684     * @param value An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.
1685     */
1686    public ConditionDefinition setUrl(String value) { 
1687      if (Utilities.noString(value))
1688        this.url = null;
1689      else {
1690        if (this.url == null)
1691          this.url = new UriType();
1692        this.url.setValue(value);
1693      }
1694      return this;
1695    }
1696
1697    /**
1698     * @return {@link #identifier} (A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance.)
1699     */
1700    public List<Identifier> getIdentifier() { 
1701      if (this.identifier == null)
1702        this.identifier = new ArrayList<Identifier>();
1703      return this.identifier;
1704    }
1705
1706    /**
1707     * @return Returns a reference to <code>this</code> for easy method chaining
1708     */
1709    public ConditionDefinition setIdentifier(List<Identifier> theIdentifier) { 
1710      this.identifier = theIdentifier;
1711      return this;
1712    }
1713
1714    public boolean hasIdentifier() { 
1715      if (this.identifier == null)
1716        return false;
1717      for (Identifier item : this.identifier)
1718        if (!item.isEmpty())
1719          return true;
1720      return false;
1721    }
1722
1723    public Identifier addIdentifier() { //3
1724      Identifier t = new Identifier();
1725      if (this.identifier == null)
1726        this.identifier = new ArrayList<Identifier>();
1727      this.identifier.add(t);
1728      return t;
1729    }
1730
1731    public ConditionDefinition addIdentifier(Identifier t) { //3
1732      if (t == null)
1733        return this;
1734      if (this.identifier == null)
1735        this.identifier = new ArrayList<Identifier>();
1736      this.identifier.add(t);
1737      return this;
1738    }
1739
1740    /**
1741     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1742     */
1743    public Identifier getIdentifierFirstRep() { 
1744      if (getIdentifier().isEmpty()) {
1745        addIdentifier();
1746      }
1747      return getIdentifier().get(0);
1748    }
1749
1750    /**
1751     * @return {@link #version} (The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1752     */
1753    public StringType getVersionElement() { 
1754      if (this.version == null)
1755        if (Configuration.errorOnAutoCreate())
1756          throw new Error("Attempt to auto-create ConditionDefinition.version");
1757        else if (Configuration.doAutoCreate())
1758          this.version = new StringType(); // bb
1759      return this.version;
1760    }
1761
1762    public boolean hasVersionElement() { 
1763      return this.version != null && !this.version.isEmpty();
1764    }
1765
1766    public boolean hasVersion() { 
1767      return this.version != null && !this.version.isEmpty();
1768    }
1769
1770    /**
1771     * @param value {@link #version} (The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1772     */
1773    public ConditionDefinition setVersionElement(StringType value) { 
1774      this.version = value;
1775      return this;
1776    }
1777
1778    /**
1779     * @return The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
1780     */
1781    public String getVersion() { 
1782      return this.version == null ? null : this.version.getValue();
1783    }
1784
1785    /**
1786     * @param value The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
1787     */
1788    public ConditionDefinition setVersion(String value) { 
1789      if (Utilities.noString(value))
1790        this.version = null;
1791      else {
1792        if (this.version == null)
1793          this.version = new StringType();
1794        this.version.setValue(value);
1795      }
1796      return this;
1797    }
1798
1799    /**
1800     * @return {@link #name} (A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1801     */
1802    public StringType getNameElement() { 
1803      if (this.name == null)
1804        if (Configuration.errorOnAutoCreate())
1805          throw new Error("Attempt to auto-create ConditionDefinition.name");
1806        else if (Configuration.doAutoCreate())
1807          this.name = new StringType(); // bb
1808      return this.name;
1809    }
1810
1811    public boolean hasNameElement() { 
1812      return this.name != null && !this.name.isEmpty();
1813    }
1814
1815    public boolean hasName() { 
1816      return this.name != null && !this.name.isEmpty();
1817    }
1818
1819    /**
1820     * @param value {@link #name} (A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1821     */
1822    public ConditionDefinition setNameElement(StringType value) { 
1823      this.name = value;
1824      return this;
1825    }
1826
1827    /**
1828     * @return A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1829     */
1830    public String getName() { 
1831      return this.name == null ? null : this.name.getValue();
1832    }
1833
1834    /**
1835     * @param value A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1836     */
1837    public ConditionDefinition setName(String value) { 
1838      if (Utilities.noString(value))
1839        this.name = null;
1840      else {
1841        if (this.name == null)
1842          this.name = new StringType();
1843        this.name.setValue(value);
1844      }
1845      return this;
1846    }
1847
1848    /**
1849     * @return {@link #title} (A short, descriptive, user-friendly title for the condition definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1850     */
1851    public StringType getTitleElement() { 
1852      if (this.title == null)
1853        if (Configuration.errorOnAutoCreate())
1854          throw new Error("Attempt to auto-create ConditionDefinition.title");
1855        else if (Configuration.doAutoCreate())
1856          this.title = new StringType(); // bb
1857      return this.title;
1858    }
1859
1860    public boolean hasTitleElement() { 
1861      return this.title != null && !this.title.isEmpty();
1862    }
1863
1864    public boolean hasTitle() { 
1865      return this.title != null && !this.title.isEmpty();
1866    }
1867
1868    /**
1869     * @param value {@link #title} (A short, descriptive, user-friendly title for the condition definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1870     */
1871    public ConditionDefinition setTitleElement(StringType value) { 
1872      this.title = value;
1873      return this;
1874    }
1875
1876    /**
1877     * @return A short, descriptive, user-friendly title for the condition definition.
1878     */
1879    public String getTitle() { 
1880      return this.title == null ? null : this.title.getValue();
1881    }
1882
1883    /**
1884     * @param value A short, descriptive, user-friendly title for the condition definition.
1885     */
1886    public ConditionDefinition setTitle(String value) { 
1887      if (Utilities.noString(value))
1888        this.title = null;
1889      else {
1890        if (this.title == null)
1891          this.title = new StringType();
1892        this.title.setValue(value);
1893      }
1894      return this;
1895    }
1896
1897    /**
1898     * @return {@link #subtitle} (An explanatory or alternate title for the event definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1899     */
1900    public StringType getSubtitleElement() { 
1901      if (this.subtitle == null)
1902        if (Configuration.errorOnAutoCreate())
1903          throw new Error("Attempt to auto-create ConditionDefinition.subtitle");
1904        else if (Configuration.doAutoCreate())
1905          this.subtitle = new StringType(); // bb
1906      return this.subtitle;
1907    }
1908
1909    public boolean hasSubtitleElement() { 
1910      return this.subtitle != null && !this.subtitle.isEmpty();
1911    }
1912
1913    public boolean hasSubtitle() { 
1914      return this.subtitle != null && !this.subtitle.isEmpty();
1915    }
1916
1917    /**
1918     * @param value {@link #subtitle} (An explanatory or alternate title for the event definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1919     */
1920    public ConditionDefinition setSubtitleElement(StringType value) { 
1921      this.subtitle = value;
1922      return this;
1923    }
1924
1925    /**
1926     * @return An explanatory or alternate title for the event definition giving additional information about its content.
1927     */
1928    public String getSubtitle() { 
1929      return this.subtitle == null ? null : this.subtitle.getValue();
1930    }
1931
1932    /**
1933     * @param value An explanatory or alternate title for the event definition giving additional information about its content.
1934     */
1935    public ConditionDefinition setSubtitle(String value) { 
1936      if (Utilities.noString(value))
1937        this.subtitle = null;
1938      else {
1939        if (this.subtitle == null)
1940          this.subtitle = new StringType();
1941        this.subtitle.setValue(value);
1942      }
1943      return this;
1944    }
1945
1946    /**
1947     * @return {@link #status} (The status of this condition definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1948     */
1949    public Enumeration<PublicationStatus> getStatusElement() { 
1950      if (this.status == null)
1951        if (Configuration.errorOnAutoCreate())
1952          throw new Error("Attempt to auto-create ConditionDefinition.status");
1953        else if (Configuration.doAutoCreate())
1954          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1955      return this.status;
1956    }
1957
1958    public boolean hasStatusElement() { 
1959      return this.status != null && !this.status.isEmpty();
1960    }
1961
1962    public boolean hasStatus() { 
1963      return this.status != null && !this.status.isEmpty();
1964    }
1965
1966    /**
1967     * @param value {@link #status} (The status of this condition definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1968     */
1969    public ConditionDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
1970      this.status = value;
1971      return this;
1972    }
1973
1974    /**
1975     * @return The status of this condition definition. Enables tracking the life-cycle of the content.
1976     */
1977    public PublicationStatus getStatus() { 
1978      return this.status == null ? null : this.status.getValue();
1979    }
1980
1981    /**
1982     * @param value The status of this condition definition. Enables tracking the life-cycle of the content.
1983     */
1984    public ConditionDefinition setStatus(PublicationStatus value) { 
1985        if (this.status == null)
1986          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1987        this.status.setValue(value);
1988      return this;
1989    }
1990
1991    /**
1992     * @return {@link #experimental} (A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1993     */
1994    public BooleanType getExperimentalElement() { 
1995      if (this.experimental == null)
1996        if (Configuration.errorOnAutoCreate())
1997          throw new Error("Attempt to auto-create ConditionDefinition.experimental");
1998        else if (Configuration.doAutoCreate())
1999          this.experimental = new BooleanType(); // bb
2000      return this.experimental;
2001    }
2002
2003    public boolean hasExperimentalElement() { 
2004      return this.experimental != null && !this.experimental.isEmpty();
2005    }
2006
2007    public boolean hasExperimental() { 
2008      return this.experimental != null && !this.experimental.isEmpty();
2009    }
2010
2011    /**
2012     * @param value {@link #experimental} (A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2013     */
2014    public ConditionDefinition setExperimentalElement(BooleanType value) { 
2015      this.experimental = value;
2016      return this;
2017    }
2018
2019    /**
2020     * @return A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2021     */
2022    public boolean getExperimental() { 
2023      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2024    }
2025
2026    /**
2027     * @param value A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2028     */
2029    public ConditionDefinition setExperimental(boolean value) { 
2030        if (this.experimental == null)
2031          this.experimental = new BooleanType();
2032        this.experimental.setValue(value);
2033      return this;
2034    }
2035
2036    /**
2037     * @return {@link #date} (The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2038     */
2039    public DateTimeType getDateElement() { 
2040      if (this.date == null)
2041        if (Configuration.errorOnAutoCreate())
2042          throw new Error("Attempt to auto-create ConditionDefinition.date");
2043        else if (Configuration.doAutoCreate())
2044          this.date = new DateTimeType(); // bb
2045      return this.date;
2046    }
2047
2048    public boolean hasDateElement() { 
2049      return this.date != null && !this.date.isEmpty();
2050    }
2051
2052    public boolean hasDate() { 
2053      return this.date != null && !this.date.isEmpty();
2054    }
2055
2056    /**
2057     * @param value {@link #date} (The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2058     */
2059    public ConditionDefinition setDateElement(DateTimeType value) { 
2060      this.date = value;
2061      return this;
2062    }
2063
2064    /**
2065     * @return The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.
2066     */
2067    public Date getDate() { 
2068      return this.date == null ? null : this.date.getValue();
2069    }
2070
2071    /**
2072     * @param value The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.
2073     */
2074    public ConditionDefinition setDate(Date value) { 
2075      if (value == null)
2076        this.date = null;
2077      else {
2078        if (this.date == null)
2079          this.date = new DateTimeType();
2080        this.date.setValue(value);
2081      }
2082      return this;
2083    }
2084
2085    /**
2086     * @return {@link #publisher} (The name of the organization or individual that published the condition definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2087     */
2088    public StringType getPublisherElement() { 
2089      if (this.publisher == null)
2090        if (Configuration.errorOnAutoCreate())
2091          throw new Error("Attempt to auto-create ConditionDefinition.publisher");
2092        else if (Configuration.doAutoCreate())
2093          this.publisher = new StringType(); // bb
2094      return this.publisher;
2095    }
2096
2097    public boolean hasPublisherElement() { 
2098      return this.publisher != null && !this.publisher.isEmpty();
2099    }
2100
2101    public boolean hasPublisher() { 
2102      return this.publisher != null && !this.publisher.isEmpty();
2103    }
2104
2105    /**
2106     * @param value {@link #publisher} (The name of the organization or individual that published the condition definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2107     */
2108    public ConditionDefinition setPublisherElement(StringType value) { 
2109      this.publisher = value;
2110      return this;
2111    }
2112
2113    /**
2114     * @return The name of the organization or individual that published the condition definition.
2115     */
2116    public String getPublisher() { 
2117      return this.publisher == null ? null : this.publisher.getValue();
2118    }
2119
2120    /**
2121     * @param value The name of the organization or individual that published the condition definition.
2122     */
2123    public ConditionDefinition setPublisher(String value) { 
2124      if (Utilities.noString(value))
2125        this.publisher = null;
2126      else {
2127        if (this.publisher == null)
2128          this.publisher = new StringType();
2129        this.publisher.setValue(value);
2130      }
2131      return this;
2132    }
2133
2134    /**
2135     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2136     */
2137    public List<ContactDetail> getContact() { 
2138      if (this.contact == null)
2139        this.contact = new ArrayList<ContactDetail>();
2140      return this.contact;
2141    }
2142
2143    /**
2144     * @return Returns a reference to <code>this</code> for easy method chaining
2145     */
2146    public ConditionDefinition setContact(List<ContactDetail> theContact) { 
2147      this.contact = theContact;
2148      return this;
2149    }
2150
2151    public boolean hasContact() { 
2152      if (this.contact == null)
2153        return false;
2154      for (ContactDetail item : this.contact)
2155        if (!item.isEmpty())
2156          return true;
2157      return false;
2158    }
2159
2160    public ContactDetail addContact() { //3
2161      ContactDetail t = new ContactDetail();
2162      if (this.contact == null)
2163        this.contact = new ArrayList<ContactDetail>();
2164      this.contact.add(t);
2165      return t;
2166    }
2167
2168    public ConditionDefinition addContact(ContactDetail t) { //3
2169      if (t == null)
2170        return this;
2171      if (this.contact == null)
2172        this.contact = new ArrayList<ContactDetail>();
2173      this.contact.add(t);
2174      return this;
2175    }
2176
2177    /**
2178     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
2179     */
2180    public ContactDetail getContactFirstRep() { 
2181      if (getContact().isEmpty()) {
2182        addContact();
2183      }
2184      return getContact().get(0);
2185    }
2186
2187    /**
2188     * @return {@link #description} (A free text natural language description of the condition definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2189     */
2190    public MarkdownType getDescriptionElement() { 
2191      if (this.description == null)
2192        if (Configuration.errorOnAutoCreate())
2193          throw new Error("Attempt to auto-create ConditionDefinition.description");
2194        else if (Configuration.doAutoCreate())
2195          this.description = new MarkdownType(); // bb
2196      return this.description;
2197    }
2198
2199    public boolean hasDescriptionElement() { 
2200      return this.description != null && !this.description.isEmpty();
2201    }
2202
2203    public boolean hasDescription() { 
2204      return this.description != null && !this.description.isEmpty();
2205    }
2206
2207    /**
2208     * @param value {@link #description} (A free text natural language description of the condition definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2209     */
2210    public ConditionDefinition setDescriptionElement(MarkdownType value) { 
2211      this.description = value;
2212      return this;
2213    }
2214
2215    /**
2216     * @return A free text natural language description of the condition definition from a consumer's perspective.
2217     */
2218    public String getDescription() { 
2219      return this.description == null ? null : this.description.getValue();
2220    }
2221
2222    /**
2223     * @param value A free text natural language description of the condition definition from a consumer's perspective.
2224     */
2225    public ConditionDefinition setDescription(String value) { 
2226      if (value == null)
2227        this.description = null;
2228      else {
2229        if (this.description == null)
2230          this.description = new MarkdownType();
2231        this.description.setValue(value);
2232      }
2233      return this;
2234    }
2235
2236    /**
2237     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances.)
2238     */
2239    public List<UsageContext> getUseContext() { 
2240      if (this.useContext == null)
2241        this.useContext = new ArrayList<UsageContext>();
2242      return this.useContext;
2243    }
2244
2245    /**
2246     * @return Returns a reference to <code>this</code> for easy method chaining
2247     */
2248    public ConditionDefinition setUseContext(List<UsageContext> theUseContext) { 
2249      this.useContext = theUseContext;
2250      return this;
2251    }
2252
2253    public boolean hasUseContext() { 
2254      if (this.useContext == null)
2255        return false;
2256      for (UsageContext item : this.useContext)
2257        if (!item.isEmpty())
2258          return true;
2259      return false;
2260    }
2261
2262    public UsageContext addUseContext() { //3
2263      UsageContext t = new UsageContext();
2264      if (this.useContext == null)
2265        this.useContext = new ArrayList<UsageContext>();
2266      this.useContext.add(t);
2267      return t;
2268    }
2269
2270    public ConditionDefinition addUseContext(UsageContext t) { //3
2271      if (t == null)
2272        return this;
2273      if (this.useContext == null)
2274        this.useContext = new ArrayList<UsageContext>();
2275      this.useContext.add(t);
2276      return this;
2277    }
2278
2279    /**
2280     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
2281     */
2282    public UsageContext getUseContextFirstRep() { 
2283      if (getUseContext().isEmpty()) {
2284        addUseContext();
2285      }
2286      return getUseContext().get(0);
2287    }
2288
2289    /**
2290     * @return {@link #jurisdiction} (A legal or geographic region in which the condition definition is intended to be used.)
2291     */
2292    public List<CodeableConcept> getJurisdiction() { 
2293      if (this.jurisdiction == null)
2294        this.jurisdiction = new ArrayList<CodeableConcept>();
2295      return this.jurisdiction;
2296    }
2297
2298    /**
2299     * @return Returns a reference to <code>this</code> for easy method chaining
2300     */
2301    public ConditionDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2302      this.jurisdiction = theJurisdiction;
2303      return this;
2304    }
2305
2306    public boolean hasJurisdiction() { 
2307      if (this.jurisdiction == null)
2308        return false;
2309      for (CodeableConcept item : this.jurisdiction)
2310        if (!item.isEmpty())
2311          return true;
2312      return false;
2313    }
2314
2315    public CodeableConcept addJurisdiction() { //3
2316      CodeableConcept t = new CodeableConcept();
2317      if (this.jurisdiction == null)
2318        this.jurisdiction = new ArrayList<CodeableConcept>();
2319      this.jurisdiction.add(t);
2320      return t;
2321    }
2322
2323    public ConditionDefinition addJurisdiction(CodeableConcept t) { //3
2324      if (t == null)
2325        return this;
2326      if (this.jurisdiction == null)
2327        this.jurisdiction = new ArrayList<CodeableConcept>();
2328      this.jurisdiction.add(t);
2329      return this;
2330    }
2331
2332    /**
2333     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
2334     */
2335    public CodeableConcept getJurisdictionFirstRep() { 
2336      if (getJurisdiction().isEmpty()) {
2337        addJurisdiction();
2338      }
2339      return getJurisdiction().get(0);
2340    }
2341
2342    /**
2343     * @return {@link #code} (Identification of the condition, problem or diagnosis.)
2344     */
2345    public CodeableConcept getCode() { 
2346      if (this.code == null)
2347        if (Configuration.errorOnAutoCreate())
2348          throw new Error("Attempt to auto-create ConditionDefinition.code");
2349        else if (Configuration.doAutoCreate())
2350          this.code = new CodeableConcept(); // cc
2351      return this.code;
2352    }
2353
2354    public boolean hasCode() { 
2355      return this.code != null && !this.code.isEmpty();
2356    }
2357
2358    /**
2359     * @param value {@link #code} (Identification of the condition, problem or diagnosis.)
2360     */
2361    public ConditionDefinition setCode(CodeableConcept value) { 
2362      this.code = value;
2363      return this;
2364    }
2365
2366    /**
2367     * @return {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.)
2368     */
2369    public CodeableConcept getSeverity() { 
2370      if (this.severity == null)
2371        if (Configuration.errorOnAutoCreate())
2372          throw new Error("Attempt to auto-create ConditionDefinition.severity");
2373        else if (Configuration.doAutoCreate())
2374          this.severity = new CodeableConcept(); // cc
2375      return this.severity;
2376    }
2377
2378    public boolean hasSeverity() { 
2379      return this.severity != null && !this.severity.isEmpty();
2380    }
2381
2382    /**
2383     * @param value {@link #severity} (A subjective assessment of the severity of the condition as evaluated by the clinician.)
2384     */
2385    public ConditionDefinition setSeverity(CodeableConcept value) { 
2386      this.severity = value;
2387      return this;
2388    }
2389
2390    /**
2391     * @return {@link #bodySite} (The anatomical location where this condition manifests itself.)
2392     */
2393    public CodeableConcept getBodySite() { 
2394      if (this.bodySite == null)
2395        if (Configuration.errorOnAutoCreate())
2396          throw new Error("Attempt to auto-create ConditionDefinition.bodySite");
2397        else if (Configuration.doAutoCreate())
2398          this.bodySite = new CodeableConcept(); // cc
2399      return this.bodySite;
2400    }
2401
2402    public boolean hasBodySite() { 
2403      return this.bodySite != null && !this.bodySite.isEmpty();
2404    }
2405
2406    /**
2407     * @param value {@link #bodySite} (The anatomical location where this condition manifests itself.)
2408     */
2409    public ConditionDefinition setBodySite(CodeableConcept value) { 
2410      this.bodySite = value;
2411      return this;
2412    }
2413
2414    /**
2415     * @return {@link #stage} (Clinical stage or grade of a condition. May include formal severity assessments.)
2416     */
2417    public CodeableConcept getStage() { 
2418      if (this.stage == null)
2419        if (Configuration.errorOnAutoCreate())
2420          throw new Error("Attempt to auto-create ConditionDefinition.stage");
2421        else if (Configuration.doAutoCreate())
2422          this.stage = new CodeableConcept(); // cc
2423      return this.stage;
2424    }
2425
2426    public boolean hasStage() { 
2427      return this.stage != null && !this.stage.isEmpty();
2428    }
2429
2430    /**
2431     * @param value {@link #stage} (Clinical stage or grade of a condition. May include formal severity assessments.)
2432     */
2433    public ConditionDefinition setStage(CodeableConcept value) { 
2434      this.stage = value;
2435      return this;
2436    }
2437
2438    /**
2439     * @return {@link #hasSeverity} (Whether Severity is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasSeverity" gives direct access to the value
2440     */
2441    public BooleanType getHasSeverityElement() { 
2442      if (this.hasSeverity == null)
2443        if (Configuration.errorOnAutoCreate())
2444          throw new Error("Attempt to auto-create ConditionDefinition.hasSeverity");
2445        else if (Configuration.doAutoCreate())
2446          this.hasSeverity = new BooleanType(); // bb
2447      return this.hasSeverity;
2448    }
2449
2450    public boolean hasHasSeverityElement() { 
2451      return this.hasSeverity != null && !this.hasSeverity.isEmpty();
2452    }
2453
2454    public boolean hasHasSeverity() { 
2455      return this.hasSeverity != null && !this.hasSeverity.isEmpty();
2456    }
2457
2458    /**
2459     * @param value {@link #hasSeverity} (Whether Severity is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasSeverity" gives direct access to the value
2460     */
2461    public ConditionDefinition setHasSeverityElement(BooleanType value) { 
2462      this.hasSeverity = value;
2463      return this;
2464    }
2465
2466    /**
2467     * @return Whether Severity is appropriate to collect for this condition.
2468     */
2469    public boolean getHasSeverity() { 
2470      return this.hasSeverity == null || this.hasSeverity.isEmpty() ? false : this.hasSeverity.getValue();
2471    }
2472
2473    /**
2474     * @param value Whether Severity is appropriate to collect for this condition.
2475     */
2476    public ConditionDefinition setHasSeverity(boolean value) { 
2477        if (this.hasSeverity == null)
2478          this.hasSeverity = new BooleanType();
2479        this.hasSeverity.setValue(value);
2480      return this;
2481    }
2482
2483    /**
2484     * @return {@link #hasBodySite} (Whether bodySite is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasBodySite" gives direct access to the value
2485     */
2486    public BooleanType getHasBodySiteElement() { 
2487      if (this.hasBodySite == null)
2488        if (Configuration.errorOnAutoCreate())
2489          throw new Error("Attempt to auto-create ConditionDefinition.hasBodySite");
2490        else if (Configuration.doAutoCreate())
2491          this.hasBodySite = new BooleanType(); // bb
2492      return this.hasBodySite;
2493    }
2494
2495    public boolean hasHasBodySiteElement() { 
2496      return this.hasBodySite != null && !this.hasBodySite.isEmpty();
2497    }
2498
2499    public boolean hasHasBodySite() { 
2500      return this.hasBodySite != null && !this.hasBodySite.isEmpty();
2501    }
2502
2503    /**
2504     * @param value {@link #hasBodySite} (Whether bodySite is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasBodySite" gives direct access to the value
2505     */
2506    public ConditionDefinition setHasBodySiteElement(BooleanType value) { 
2507      this.hasBodySite = value;
2508      return this;
2509    }
2510
2511    /**
2512     * @return Whether bodySite is appropriate to collect for this condition.
2513     */
2514    public boolean getHasBodySite() { 
2515      return this.hasBodySite == null || this.hasBodySite.isEmpty() ? false : this.hasBodySite.getValue();
2516    }
2517
2518    /**
2519     * @param value Whether bodySite is appropriate to collect for this condition.
2520     */
2521    public ConditionDefinition setHasBodySite(boolean value) { 
2522        if (this.hasBodySite == null)
2523          this.hasBodySite = new BooleanType();
2524        this.hasBodySite.setValue(value);
2525      return this;
2526    }
2527
2528    /**
2529     * @return {@link #hasStage} (Whether stage is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasStage" gives direct access to the value
2530     */
2531    public BooleanType getHasStageElement() { 
2532      if (this.hasStage == null)
2533        if (Configuration.errorOnAutoCreate())
2534          throw new Error("Attempt to auto-create ConditionDefinition.hasStage");
2535        else if (Configuration.doAutoCreate())
2536          this.hasStage = new BooleanType(); // bb
2537      return this.hasStage;
2538    }
2539
2540    public boolean hasHasStageElement() { 
2541      return this.hasStage != null && !this.hasStage.isEmpty();
2542    }
2543
2544    public boolean hasHasStage() { 
2545      return this.hasStage != null && !this.hasStage.isEmpty();
2546    }
2547
2548    /**
2549     * @param value {@link #hasStage} (Whether stage is appropriate to collect for this condition.). This is the underlying object with id, value and extensions. The accessor "getHasStage" gives direct access to the value
2550     */
2551    public ConditionDefinition setHasStageElement(BooleanType value) { 
2552      this.hasStage = value;
2553      return this;
2554    }
2555
2556    /**
2557     * @return Whether stage is appropriate to collect for this condition.
2558     */
2559    public boolean getHasStage() { 
2560      return this.hasStage == null || this.hasStage.isEmpty() ? false : this.hasStage.getValue();
2561    }
2562
2563    /**
2564     * @param value Whether stage is appropriate to collect for this condition.
2565     */
2566    public ConditionDefinition setHasStage(boolean value) { 
2567        if (this.hasStage == null)
2568          this.hasStage = new BooleanType();
2569        this.hasStage.setValue(value);
2570      return this;
2571    }
2572
2573    /**
2574     * @return {@link #definition} (Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.)
2575     */
2576    public List<UriType> getDefinition() { 
2577      if (this.definition == null)
2578        this.definition = new ArrayList<UriType>();
2579      return this.definition;
2580    }
2581
2582    /**
2583     * @return Returns a reference to <code>this</code> for easy method chaining
2584     */
2585    public ConditionDefinition setDefinition(List<UriType> theDefinition) { 
2586      this.definition = theDefinition;
2587      return this;
2588    }
2589
2590    public boolean hasDefinition() { 
2591      if (this.definition == null)
2592        return false;
2593      for (UriType item : this.definition)
2594        if (!item.isEmpty())
2595          return true;
2596      return false;
2597    }
2598
2599    /**
2600     * @return {@link #definition} (Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.)
2601     */
2602    public UriType addDefinitionElement() {//2 
2603      UriType t = new UriType();
2604      if (this.definition == null)
2605        this.definition = new ArrayList<UriType>();
2606      this.definition.add(t);
2607      return t;
2608    }
2609
2610    /**
2611     * @param value {@link #definition} (Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.)
2612     */
2613    public ConditionDefinition addDefinition(String value) { //1
2614      UriType t = new UriType();
2615      t.setValue(value);
2616      if (this.definition == null)
2617        this.definition = new ArrayList<UriType>();
2618      this.definition.add(t);
2619      return this;
2620    }
2621
2622    /**
2623     * @param value {@link #definition} (Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.)
2624     */
2625    public boolean hasDefinition(String value) { 
2626      if (this.definition == null)
2627        return false;
2628      for (UriType v : this.definition)
2629        if (v.getValue().equals(value)) // uri
2630          return true;
2631      return false;
2632    }
2633
2634    /**
2635     * @return {@link #observation} (Observations particularly relevant to this condition.)
2636     */
2637    public List<ConditionDefinitionObservationComponent> getObservation() { 
2638      if (this.observation == null)
2639        this.observation = new ArrayList<ConditionDefinitionObservationComponent>();
2640      return this.observation;
2641    }
2642
2643    /**
2644     * @return Returns a reference to <code>this</code> for easy method chaining
2645     */
2646    public ConditionDefinition setObservation(List<ConditionDefinitionObservationComponent> theObservation) { 
2647      this.observation = theObservation;
2648      return this;
2649    }
2650
2651    public boolean hasObservation() { 
2652      if (this.observation == null)
2653        return false;
2654      for (ConditionDefinitionObservationComponent item : this.observation)
2655        if (!item.isEmpty())
2656          return true;
2657      return false;
2658    }
2659
2660    public ConditionDefinitionObservationComponent addObservation() { //3
2661      ConditionDefinitionObservationComponent t = new ConditionDefinitionObservationComponent();
2662      if (this.observation == null)
2663        this.observation = new ArrayList<ConditionDefinitionObservationComponent>();
2664      this.observation.add(t);
2665      return t;
2666    }
2667
2668    public ConditionDefinition addObservation(ConditionDefinitionObservationComponent t) { //3
2669      if (t == null)
2670        return this;
2671      if (this.observation == null)
2672        this.observation = new ArrayList<ConditionDefinitionObservationComponent>();
2673      this.observation.add(t);
2674      return this;
2675    }
2676
2677    /**
2678     * @return The first repetition of repeating field {@link #observation}, creating it if it does not already exist {3}
2679     */
2680    public ConditionDefinitionObservationComponent getObservationFirstRep() { 
2681      if (getObservation().isEmpty()) {
2682        addObservation();
2683      }
2684      return getObservation().get(0);
2685    }
2686
2687    /**
2688     * @return {@link #medication} (Medications particularly relevant for this condition.)
2689     */
2690    public List<ConditionDefinitionMedicationComponent> getMedication() { 
2691      if (this.medication == null)
2692        this.medication = new ArrayList<ConditionDefinitionMedicationComponent>();
2693      return this.medication;
2694    }
2695
2696    /**
2697     * @return Returns a reference to <code>this</code> for easy method chaining
2698     */
2699    public ConditionDefinition setMedication(List<ConditionDefinitionMedicationComponent> theMedication) { 
2700      this.medication = theMedication;
2701      return this;
2702    }
2703
2704    public boolean hasMedication() { 
2705      if (this.medication == null)
2706        return false;
2707      for (ConditionDefinitionMedicationComponent item : this.medication)
2708        if (!item.isEmpty())
2709          return true;
2710      return false;
2711    }
2712
2713    public ConditionDefinitionMedicationComponent addMedication() { //3
2714      ConditionDefinitionMedicationComponent t = new ConditionDefinitionMedicationComponent();
2715      if (this.medication == null)
2716        this.medication = new ArrayList<ConditionDefinitionMedicationComponent>();
2717      this.medication.add(t);
2718      return t;
2719    }
2720
2721    public ConditionDefinition addMedication(ConditionDefinitionMedicationComponent t) { //3
2722      if (t == null)
2723        return this;
2724      if (this.medication == null)
2725        this.medication = new ArrayList<ConditionDefinitionMedicationComponent>();
2726      this.medication.add(t);
2727      return this;
2728    }
2729
2730    /**
2731     * @return The first repetition of repeating field {@link #medication}, creating it if it does not already exist {3}
2732     */
2733    public ConditionDefinitionMedicationComponent getMedicationFirstRep() { 
2734      if (getMedication().isEmpty()) {
2735        addMedication();
2736      }
2737      return getMedication().get(0);
2738    }
2739
2740    /**
2741     * @return {@link #precondition} (An observation that suggests that this condition applies.)
2742     */
2743    public List<ConditionDefinitionPreconditionComponent> getPrecondition() { 
2744      if (this.precondition == null)
2745        this.precondition = new ArrayList<ConditionDefinitionPreconditionComponent>();
2746      return this.precondition;
2747    }
2748
2749    /**
2750     * @return Returns a reference to <code>this</code> for easy method chaining
2751     */
2752    public ConditionDefinition setPrecondition(List<ConditionDefinitionPreconditionComponent> thePrecondition) { 
2753      this.precondition = thePrecondition;
2754      return this;
2755    }
2756
2757    public boolean hasPrecondition() { 
2758      if (this.precondition == null)
2759        return false;
2760      for (ConditionDefinitionPreconditionComponent item : this.precondition)
2761        if (!item.isEmpty())
2762          return true;
2763      return false;
2764    }
2765
2766    public ConditionDefinitionPreconditionComponent addPrecondition() { //3
2767      ConditionDefinitionPreconditionComponent t = new ConditionDefinitionPreconditionComponent();
2768      if (this.precondition == null)
2769        this.precondition = new ArrayList<ConditionDefinitionPreconditionComponent>();
2770      this.precondition.add(t);
2771      return t;
2772    }
2773
2774    public ConditionDefinition addPrecondition(ConditionDefinitionPreconditionComponent t) { //3
2775      if (t == null)
2776        return this;
2777      if (this.precondition == null)
2778        this.precondition = new ArrayList<ConditionDefinitionPreconditionComponent>();
2779      this.precondition.add(t);
2780      return this;
2781    }
2782
2783    /**
2784     * @return The first repetition of repeating field {@link #precondition}, creating it if it does not already exist {3}
2785     */
2786    public ConditionDefinitionPreconditionComponent getPreconditionFirstRep() { 
2787      if (getPrecondition().isEmpty()) {
2788        addPrecondition();
2789      }
2790      return getPrecondition().get(0);
2791    }
2792
2793    /**
2794     * @return {@link #team} (Appropriate team for this condition.)
2795     */
2796    public List<Reference> getTeam() { 
2797      if (this.team == null)
2798        this.team = new ArrayList<Reference>();
2799      return this.team;
2800    }
2801
2802    /**
2803     * @return Returns a reference to <code>this</code> for easy method chaining
2804     */
2805    public ConditionDefinition setTeam(List<Reference> theTeam) { 
2806      this.team = theTeam;
2807      return this;
2808    }
2809
2810    public boolean hasTeam() { 
2811      if (this.team == null)
2812        return false;
2813      for (Reference item : this.team)
2814        if (!item.isEmpty())
2815          return true;
2816      return false;
2817    }
2818
2819    public Reference addTeam() { //3
2820      Reference t = new Reference();
2821      if (this.team == null)
2822        this.team = new ArrayList<Reference>();
2823      this.team.add(t);
2824      return t;
2825    }
2826
2827    public ConditionDefinition addTeam(Reference t) { //3
2828      if (t == null)
2829        return this;
2830      if (this.team == null)
2831        this.team = new ArrayList<Reference>();
2832      this.team.add(t);
2833      return this;
2834    }
2835
2836    /**
2837     * @return The first repetition of repeating field {@link #team}, creating it if it does not already exist {3}
2838     */
2839    public Reference getTeamFirstRep() { 
2840      if (getTeam().isEmpty()) {
2841        addTeam();
2842      }
2843      return getTeam().get(0);
2844    }
2845
2846    /**
2847     * @return {@link #questionnaire} (Questionnaire for this condition.)
2848     */
2849    public List<ConditionDefinitionQuestionnaireComponent> getQuestionnaire() { 
2850      if (this.questionnaire == null)
2851        this.questionnaire = new ArrayList<ConditionDefinitionQuestionnaireComponent>();
2852      return this.questionnaire;
2853    }
2854
2855    /**
2856     * @return Returns a reference to <code>this</code> for easy method chaining
2857     */
2858    public ConditionDefinition setQuestionnaire(List<ConditionDefinitionQuestionnaireComponent> theQuestionnaire) { 
2859      this.questionnaire = theQuestionnaire;
2860      return this;
2861    }
2862
2863    public boolean hasQuestionnaire() { 
2864      if (this.questionnaire == null)
2865        return false;
2866      for (ConditionDefinitionQuestionnaireComponent item : this.questionnaire)
2867        if (!item.isEmpty())
2868          return true;
2869      return false;
2870    }
2871
2872    public ConditionDefinitionQuestionnaireComponent addQuestionnaire() { //3
2873      ConditionDefinitionQuestionnaireComponent t = new ConditionDefinitionQuestionnaireComponent();
2874      if (this.questionnaire == null)
2875        this.questionnaire = new ArrayList<ConditionDefinitionQuestionnaireComponent>();
2876      this.questionnaire.add(t);
2877      return t;
2878    }
2879
2880    public ConditionDefinition addQuestionnaire(ConditionDefinitionQuestionnaireComponent t) { //3
2881      if (t == null)
2882        return this;
2883      if (this.questionnaire == null)
2884        this.questionnaire = new ArrayList<ConditionDefinitionQuestionnaireComponent>();
2885      this.questionnaire.add(t);
2886      return this;
2887    }
2888
2889    /**
2890     * @return The first repetition of repeating field {@link #questionnaire}, creating it if it does not already exist {3}
2891     */
2892    public ConditionDefinitionQuestionnaireComponent getQuestionnaireFirstRep() { 
2893      if (getQuestionnaire().isEmpty()) {
2894        addQuestionnaire();
2895      }
2896      return getQuestionnaire().get(0);
2897    }
2898
2899    /**
2900     * @return {@link #plan} (Plan that is appropriate.)
2901     */
2902    public List<ConditionDefinitionPlanComponent> getPlan() { 
2903      if (this.plan == null)
2904        this.plan = new ArrayList<ConditionDefinitionPlanComponent>();
2905      return this.plan;
2906    }
2907
2908    /**
2909     * @return Returns a reference to <code>this</code> for easy method chaining
2910     */
2911    public ConditionDefinition setPlan(List<ConditionDefinitionPlanComponent> thePlan) { 
2912      this.plan = thePlan;
2913      return this;
2914    }
2915
2916    public boolean hasPlan() { 
2917      if (this.plan == null)
2918        return false;
2919      for (ConditionDefinitionPlanComponent item : this.plan)
2920        if (!item.isEmpty())
2921          return true;
2922      return false;
2923    }
2924
2925    public ConditionDefinitionPlanComponent addPlan() { //3
2926      ConditionDefinitionPlanComponent t = new ConditionDefinitionPlanComponent();
2927      if (this.plan == null)
2928        this.plan = new ArrayList<ConditionDefinitionPlanComponent>();
2929      this.plan.add(t);
2930      return t;
2931    }
2932
2933    public ConditionDefinition addPlan(ConditionDefinitionPlanComponent t) { //3
2934      if (t == null)
2935        return this;
2936      if (this.plan == null)
2937        this.plan = new ArrayList<ConditionDefinitionPlanComponent>();
2938      this.plan.add(t);
2939      return this;
2940    }
2941
2942    /**
2943     * @return The first repetition of repeating field {@link #plan}, creating it if it does not already exist {3}
2944     */
2945    public ConditionDefinitionPlanComponent getPlanFirstRep() { 
2946      if (getPlan().isEmpty()) {
2947        addPlan();
2948      }
2949      return getPlan().get(0);
2950    }
2951
2952    /**
2953     * not supported on this implementation
2954     */
2955    @Override
2956    public int getPurposeMax() { 
2957      return 0;
2958    }
2959    /**
2960     * @return {@link #purpose} (Explanation of why this condition definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2961     */
2962    public MarkdownType getPurposeElement() { 
2963      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"purpose\"");
2964    }
2965
2966    public boolean hasPurposeElement() { 
2967      return false;
2968    }
2969    public boolean hasPurpose() {
2970      return false;
2971    }
2972
2973    /**
2974     * @param value {@link #purpose} (Explanation of why this condition definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2975     */
2976    public ConditionDefinition setPurposeElement(MarkdownType value) { 
2977      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"purpose\"");
2978    }
2979    public String getPurpose() { 
2980      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"purpose\"");
2981    }
2982    /**
2983     * @param value Explanation of why this condition definition is needed and why it has been designed as it has.
2984     */
2985    public ConditionDefinition setPurpose(String value) { 
2986      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"purpose\"");
2987    }
2988    /**
2989     * not supported on this implementation
2990     */
2991    @Override
2992    public int getCopyrightMax() { 
2993      return 0;
2994    }
2995    /**
2996     * @return {@link #copyright} (A copyright statement relating to the condition definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the condition definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2997     */
2998    public MarkdownType getCopyrightElement() { 
2999      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"copyright\"");
3000    }
3001
3002    public boolean hasCopyrightElement() { 
3003      return false;
3004    }
3005    public boolean hasCopyright() {
3006      return false;
3007    }
3008
3009    /**
3010     * @param value {@link #copyright} (A copyright statement relating to the condition definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the condition definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
3011     */
3012    public ConditionDefinition setCopyrightElement(MarkdownType value) { 
3013      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"copyright\"");
3014    }
3015    public String getCopyright() { 
3016      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"copyright\"");
3017    }
3018    /**
3019     * @param value A copyright statement relating to the condition definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the condition definition.
3020     */
3021    public ConditionDefinition setCopyright(String value) { 
3022      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"copyright\"");
3023    }
3024    /**
3025     * not supported on this implementation
3026     */
3027    @Override
3028    public int getApprovalDateMax() { 
3029      return 0;
3030    }
3031    /**
3032     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
3033     */
3034    public DateType getApprovalDateElement() { 
3035      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"approvalDate\"");
3036    }
3037
3038    public boolean hasApprovalDateElement() { 
3039      return false;
3040    }
3041    public boolean hasApprovalDate() {
3042      return false;
3043    }
3044
3045    /**
3046     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
3047     */
3048    public ConditionDefinition setApprovalDateElement(DateType value) { 
3049      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"approvalDate\"");
3050    }
3051    public Date getApprovalDate() { 
3052      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"approvalDate\"");
3053    }
3054    /**
3055     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3056     */
3057    public ConditionDefinition setApprovalDate(Date value) { 
3058      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"approvalDate\"");
3059    }
3060    /**
3061     * not supported on this implementation
3062     */
3063    @Override
3064    public int getLastReviewDateMax() { 
3065      return 0;
3066    }
3067    /**
3068     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3069     */
3070    public DateType getLastReviewDateElement() { 
3071      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"lastReviewDate\"");
3072    }
3073
3074    public boolean hasLastReviewDateElement() { 
3075      return false;
3076    }
3077    public boolean hasLastReviewDate() {
3078      return false;
3079    }
3080
3081    /**
3082     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3083     */
3084    public ConditionDefinition setLastReviewDateElement(DateType value) { 
3085      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"lastReviewDate\"");
3086    }
3087    public Date getLastReviewDate() { 
3088      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"lastReviewDate\"");
3089    }
3090    /**
3091     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
3092     */
3093    public ConditionDefinition setLastReviewDate(Date value) { 
3094      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"lastReviewDate\"");
3095    }
3096    /**
3097     * not supported on this implementation
3098     */
3099    @Override
3100    public int getEffectivePeriodMax() { 
3101      return 0;
3102    }
3103    /**
3104     * @return {@link #effectivePeriod} (The period during which the condition definition content was or is planned to be in active use.)
3105     */
3106    public Period getEffectivePeriod() { 
3107      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"effectivePeriod\"");
3108    }
3109    public boolean hasEffectivePeriod() { 
3110      return false;
3111    }
3112    /**
3113     * @param value {@link #effectivePeriod} (The period during which the condition definition content was or is planned to be in active use.)
3114     */
3115    public ConditionDefinition setEffectivePeriod(Period value) { 
3116      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"effectivePeriod\"");
3117    }
3118
3119    /**
3120     * not supported on this implementation
3121     */
3122    @Override
3123    public int getTopicMax() { 
3124      return 0;
3125    }
3126    /**
3127     * @return {@link #topic} (Descriptive topics related to the content of the condition definition. Topics provide a high-level categorization of the condition definition that can be useful for filtering and searching.)
3128     */
3129    public List<CodeableConcept> getTopic() { 
3130      return new ArrayList<>();
3131    }
3132    /**
3133     * @return Returns a reference to <code>this</code> for easy method chaining
3134     */
3135    public ConditionDefinition setTopic(List<CodeableConcept> theTopic) { 
3136      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"topic\"");
3137    }
3138    public boolean hasTopic() { 
3139      return false;
3140    }
3141
3142    public CodeableConcept addTopic() { //3
3143      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"topic\"");
3144    }
3145    public ConditionDefinition addTopic(CodeableConcept t) { //3
3146      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"topic\"");
3147    }
3148    /**
3149     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {2}
3150     */
3151    public CodeableConcept getTopicFirstRep() { 
3152      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"topic\"");
3153    }
3154    /**
3155     * not supported on this implementation
3156     */
3157    @Override
3158    public int getAuthorMax() { 
3159      return 0;
3160    }
3161    /**
3162     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the condition definition.)
3163     */
3164    public List<ContactDetail> getAuthor() { 
3165      return new ArrayList<>();
3166    }
3167    /**
3168     * @return Returns a reference to <code>this</code> for easy method chaining
3169     */
3170    public ConditionDefinition setAuthor(List<ContactDetail> theAuthor) { 
3171      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"author\"");
3172    }
3173    public boolean hasAuthor() { 
3174      return false;
3175    }
3176
3177    public ContactDetail addAuthor() { //3
3178      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"author\"");
3179    }
3180    public ConditionDefinition addAuthor(ContactDetail t) { //3
3181      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"author\"");
3182    }
3183    /**
3184     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {2}
3185     */
3186    public ContactDetail getAuthorFirstRep() { 
3187      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"author\"");
3188    }
3189    /**
3190     * not supported on this implementation
3191     */
3192    @Override
3193    public int getEditorMax() { 
3194      return 0;
3195    }
3196    /**
3197     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the condition definition.)
3198     */
3199    public List<ContactDetail> getEditor() { 
3200      return new ArrayList<>();
3201    }
3202    /**
3203     * @return Returns a reference to <code>this</code> for easy method chaining
3204     */
3205    public ConditionDefinition setEditor(List<ContactDetail> theEditor) { 
3206      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"editor\"");
3207    }
3208    public boolean hasEditor() { 
3209      return false;
3210    }
3211
3212    public ContactDetail addEditor() { //3
3213      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"editor\"");
3214    }
3215    public ConditionDefinition addEditor(ContactDetail t) { //3
3216      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"editor\"");
3217    }
3218    /**
3219     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {2}
3220     */
3221    public ContactDetail getEditorFirstRep() { 
3222      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"editor\"");
3223    }
3224    /**
3225     * not supported on this implementation
3226     */
3227    @Override
3228    public int getReviewerMax() { 
3229      return 0;
3230    }
3231    /**
3232     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the condition definition.)
3233     */
3234    public List<ContactDetail> getReviewer() { 
3235      return new ArrayList<>();
3236    }
3237    /**
3238     * @return Returns a reference to <code>this</code> for easy method chaining
3239     */
3240    public ConditionDefinition setReviewer(List<ContactDetail> theReviewer) { 
3241      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"reviewer\"");
3242    }
3243    public boolean hasReviewer() { 
3244      return false;
3245    }
3246
3247    public ContactDetail addReviewer() { //3
3248      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"reviewer\"");
3249    }
3250    public ConditionDefinition addReviewer(ContactDetail t) { //3
3251      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"reviewer\"");
3252    }
3253    /**
3254     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {2}
3255     */
3256    public ContactDetail getReviewerFirstRep() { 
3257      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"reviewer\"");
3258    }
3259    /**
3260     * not supported on this implementation
3261     */
3262    @Override
3263    public int getEndorserMax() { 
3264      return 0;
3265    }
3266    /**
3267     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the condition definition for use in some setting.)
3268     */
3269    public List<ContactDetail> getEndorser() { 
3270      return new ArrayList<>();
3271    }
3272    /**
3273     * @return Returns a reference to <code>this</code> for easy method chaining
3274     */
3275    public ConditionDefinition setEndorser(List<ContactDetail> theEndorser) { 
3276      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"endorser\"");
3277    }
3278    public boolean hasEndorser() { 
3279      return false;
3280    }
3281
3282    public ContactDetail addEndorser() { //3
3283      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"endorser\"");
3284    }
3285    public ConditionDefinition addEndorser(ContactDetail t) { //3
3286      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"endorser\"");
3287    }
3288    /**
3289     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {2}
3290     */
3291    public ContactDetail getEndorserFirstRep() { 
3292      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"endorser\"");
3293    }
3294    /**
3295     * not supported on this implementation
3296     */
3297    @Override
3298    public int getRelatedArtifactMax() { 
3299      return 0;
3300    }
3301    /**
3302     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.)
3303     */
3304    public List<RelatedArtifact> getRelatedArtifact() { 
3305      return new ArrayList<>();
3306    }
3307    /**
3308     * @return Returns a reference to <code>this</code> for easy method chaining
3309     */
3310    public ConditionDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
3311      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"relatedArtifact\"");
3312    }
3313    public boolean hasRelatedArtifact() { 
3314      return false;
3315    }
3316
3317    public RelatedArtifact addRelatedArtifact() { //3
3318      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"relatedArtifact\"");
3319    }
3320    public ConditionDefinition addRelatedArtifact(RelatedArtifact t) { //3
3321      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"relatedArtifact\"");
3322    }
3323    /**
3324     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {2}
3325     */
3326    public RelatedArtifact getRelatedArtifactFirstRep() { 
3327      throw new Error("The resource type \"ConditionDefinition\" does not implement the property \"relatedArtifact\"");
3328    }
3329      protected void listChildren(List<Property> children) {
3330        super.listChildren(children);
3331        children.add(new Property("url", "uri", "An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.", 0, 1, url));
3332        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
3333        children.add(new Property("version", "string", "The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
3334        children.add(new Property("name", "string", "A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
3335        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the condition definition.", 0, 1, title));
3336        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the event definition giving additional information about its content.", 0, 1, subtitle));
3337        children.add(new Property("status", "code", "The status of this condition definition. Enables tracking the life-cycle of the content.", 0, 1, status));
3338        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
3339        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.", 0, 1, date));
3340        children.add(new Property("publisher", "string", "The name of the organization or individual that published the condition definition.", 0, 1, publisher));
3341        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
3342        children.add(new Property("description", "markdown", "A free text natural language description of the condition definition from a consumer's perspective.", 0, 1, description));
3343        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
3344        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the condition definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3345        children.add(new Property("code", "CodeableConcept", "Identification of the condition, problem or diagnosis.", 0, 1, code));
3346        children.add(new Property("severity", "CodeableConcept", "A subjective assessment of the severity of the condition as evaluated by the clinician.", 0, 1, severity));
3347        children.add(new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, 1, bodySite));
3348        children.add(new Property("stage", "CodeableConcept", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, 1, stage));
3349        children.add(new Property("hasSeverity", "boolean", "Whether Severity is appropriate to collect for this condition.", 0, 1, hasSeverity));
3350        children.add(new Property("hasBodySite", "boolean", "Whether bodySite is appropriate to collect for this condition.", 0, 1, hasBodySite));
3351        children.add(new Property("hasStage", "boolean", "Whether stage is appropriate to collect for this condition.", 0, 1, hasStage));
3352        children.add(new Property("definition", "uri", "Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.", 0, java.lang.Integer.MAX_VALUE, definition));
3353        children.add(new Property("observation", "", "Observations particularly relevant to this condition.", 0, java.lang.Integer.MAX_VALUE, observation));
3354        children.add(new Property("medication", "", "Medications particularly relevant for this condition.", 0, java.lang.Integer.MAX_VALUE, medication));
3355        children.add(new Property("precondition", "", "An observation that suggests that this condition applies.", 0, java.lang.Integer.MAX_VALUE, precondition));
3356        children.add(new Property("team", "Reference(CareTeam)", "Appropriate team for this condition.", 0, java.lang.Integer.MAX_VALUE, team));
3357        children.add(new Property("questionnaire", "", "Questionnaire for this condition.", 0, java.lang.Integer.MAX_VALUE, questionnaire));
3358        children.add(new Property("plan", "", "Plan that is appropriate.", 0, java.lang.Integer.MAX_VALUE, plan));
3359      }
3360
3361      @Override
3362      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3363        switch (_hash) {
3364        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.", 0, 1, url);
3365        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
3366        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
3367        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
3368        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the condition definition.", 0, 1, title);
3369        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the event definition giving additional information about its content.", 0, 1, subtitle);
3370        case -892481550: /*status*/  return new Property("status", "code", "The status of this condition definition. Enables tracking the life-cycle of the content.", 0, 1, status);
3371        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
3372        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the condition definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.", 0, 1, date);
3373        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the condition definition.", 0, 1, publisher);
3374        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
3375        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the condition definition from a consumer's perspective.", 0, 1, description);
3376        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
3377        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the condition definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
3378        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Identification of the condition, problem or diagnosis.", 0, 1, code);
3379        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);
3380        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableConcept", "The anatomical location where this condition manifests itself.", 0, 1, bodySite);
3381        case 109757182: /*stage*/  return new Property("stage", "CodeableConcept", "Clinical stage or grade of a condition. May include formal severity assessments.", 0, 1, stage);
3382        case 57790391: /*hasSeverity*/  return new Property("hasSeverity", "boolean", "Whether Severity is appropriate to collect for this condition.", 0, 1, hasSeverity);
3383        case 282110147: /*hasBodySite*/  return new Property("hasBodySite", "boolean", "Whether bodySite is appropriate to collect for this condition.", 0, 1, hasBodySite);
3384        case 129749124: /*hasStage*/  return new Property("hasStage", "boolean", "Whether stage is appropriate to collect for this condition.", 0, 1, hasStage);
3385        case -1014418093: /*definition*/  return new Property("definition", "uri", "Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.", 0, java.lang.Integer.MAX_VALUE, definition);
3386        case 122345516: /*observation*/  return new Property("observation", "", "Observations particularly relevant to this condition.", 0, java.lang.Integer.MAX_VALUE, observation);
3387        case 1998965455: /*medication*/  return new Property("medication", "", "Medications particularly relevant for this condition.", 0, java.lang.Integer.MAX_VALUE, medication);
3388        case -650968616: /*precondition*/  return new Property("precondition", "", "An observation that suggests that this condition applies.", 0, java.lang.Integer.MAX_VALUE, precondition);
3389        case 3555933: /*team*/  return new Property("team", "Reference(CareTeam)", "Appropriate team for this condition.", 0, java.lang.Integer.MAX_VALUE, team);
3390        case -1017049693: /*questionnaire*/  return new Property("questionnaire", "", "Questionnaire for this condition.", 0, java.lang.Integer.MAX_VALUE, questionnaire);
3391        case 3443497: /*plan*/  return new Property("plan", "", "Plan that is appropriate.", 0, java.lang.Integer.MAX_VALUE, plan);
3392        default: return super.getNamedProperty(_hash, _name, _checkValid);
3393        }
3394
3395      }
3396
3397      @Override
3398      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3399        switch (hash) {
3400        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3401        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3402        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3403        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3404        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3405        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
3406        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3407        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3408        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3409        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3410        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3411        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3412        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3413        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3414        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
3415        case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // CodeableConcept
3416        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept
3417        case 109757182: /*stage*/ return this.stage == null ? new Base[0] : new Base[] {this.stage}; // CodeableConcept
3418        case 57790391: /*hasSeverity*/ return this.hasSeverity == null ? new Base[0] : new Base[] {this.hasSeverity}; // BooleanType
3419        case 282110147: /*hasBodySite*/ return this.hasBodySite == null ? new Base[0] : new Base[] {this.hasBodySite}; // BooleanType
3420        case 129749124: /*hasStage*/ return this.hasStage == null ? new Base[0] : new Base[] {this.hasStage}; // BooleanType
3421        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : this.definition.toArray(new Base[this.definition.size()]); // UriType
3422        case 122345516: /*observation*/ return this.observation == null ? new Base[0] : this.observation.toArray(new Base[this.observation.size()]); // ConditionDefinitionObservationComponent
3423        case 1998965455: /*medication*/ return this.medication == null ? new Base[0] : this.medication.toArray(new Base[this.medication.size()]); // ConditionDefinitionMedicationComponent
3424        case -650968616: /*precondition*/ return this.precondition == null ? new Base[0] : this.precondition.toArray(new Base[this.precondition.size()]); // ConditionDefinitionPreconditionComponent
3425        case 3555933: /*team*/ return this.team == null ? new Base[0] : this.team.toArray(new Base[this.team.size()]); // Reference
3426        case -1017049693: /*questionnaire*/ return this.questionnaire == null ? new Base[0] : this.questionnaire.toArray(new Base[this.questionnaire.size()]); // ConditionDefinitionQuestionnaireComponent
3427        case 3443497: /*plan*/ return this.plan == null ? new Base[0] : this.plan.toArray(new Base[this.plan.size()]); // ConditionDefinitionPlanComponent
3428        default: return super.getProperty(hash, name, checkValid);
3429        }
3430
3431      }
3432
3433      @Override
3434      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3435        switch (hash) {
3436        case 116079: // url
3437          this.url = TypeConvertor.castToUri(value); // UriType
3438          return value;
3439        case -1618432855: // identifier
3440          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3441          return value;
3442        case 351608024: // version
3443          this.version = TypeConvertor.castToString(value); // StringType
3444          return value;
3445        case 3373707: // name
3446          this.name = TypeConvertor.castToString(value); // StringType
3447          return value;
3448        case 110371416: // title
3449          this.title = TypeConvertor.castToString(value); // StringType
3450          return value;
3451        case -2060497896: // subtitle
3452          this.subtitle = TypeConvertor.castToString(value); // StringType
3453          return value;
3454        case -892481550: // status
3455          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3456          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3457          return value;
3458        case -404562712: // experimental
3459          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3460          return value;
3461        case 3076014: // date
3462          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3463          return value;
3464        case 1447404028: // publisher
3465          this.publisher = TypeConvertor.castToString(value); // StringType
3466          return value;
3467        case 951526432: // contact
3468          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3469          return value;
3470        case -1724546052: // description
3471          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3472          return value;
3473        case -669707736: // useContext
3474          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
3475          return value;
3476        case -507075711: // jurisdiction
3477          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3478          return value;
3479        case 3059181: // code
3480          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3481          return value;
3482        case 1478300413: // severity
3483          this.severity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3484          return value;
3485        case 1702620169: // bodySite
3486          this.bodySite = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3487          return value;
3488        case 109757182: // stage
3489          this.stage = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3490          return value;
3491        case 57790391: // hasSeverity
3492          this.hasSeverity = TypeConvertor.castToBoolean(value); // BooleanType
3493          return value;
3494        case 282110147: // hasBodySite
3495          this.hasBodySite = TypeConvertor.castToBoolean(value); // BooleanType
3496          return value;
3497        case 129749124: // hasStage
3498          this.hasStage = TypeConvertor.castToBoolean(value); // BooleanType
3499          return value;
3500        case -1014418093: // definition
3501          this.getDefinition().add(TypeConvertor.castToUri(value)); // UriType
3502          return value;
3503        case 122345516: // observation
3504          this.getObservation().add((ConditionDefinitionObservationComponent) value); // ConditionDefinitionObservationComponent
3505          return value;
3506        case 1998965455: // medication
3507          this.getMedication().add((ConditionDefinitionMedicationComponent) value); // ConditionDefinitionMedicationComponent
3508          return value;
3509        case -650968616: // precondition
3510          this.getPrecondition().add((ConditionDefinitionPreconditionComponent) value); // ConditionDefinitionPreconditionComponent
3511          return value;
3512        case 3555933: // team
3513          this.getTeam().add(TypeConvertor.castToReference(value)); // Reference
3514          return value;
3515        case -1017049693: // questionnaire
3516          this.getQuestionnaire().add((ConditionDefinitionQuestionnaireComponent) value); // ConditionDefinitionQuestionnaireComponent
3517          return value;
3518        case 3443497: // plan
3519          this.getPlan().add((ConditionDefinitionPlanComponent) value); // ConditionDefinitionPlanComponent
3520          return value;
3521        default: return super.setProperty(hash, name, value);
3522        }
3523
3524      }
3525
3526      @Override
3527      public Base setProperty(String name, Base value) throws FHIRException {
3528        if (name.equals("url")) {
3529          this.url = TypeConvertor.castToUri(value); // UriType
3530        } else if (name.equals("identifier")) {
3531          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3532        } else if (name.equals("version")) {
3533          this.version = TypeConvertor.castToString(value); // StringType
3534        } else if (name.equals("name")) {
3535          this.name = TypeConvertor.castToString(value); // StringType
3536        } else if (name.equals("title")) {
3537          this.title = TypeConvertor.castToString(value); // StringType
3538        } else if (name.equals("subtitle")) {
3539          this.subtitle = TypeConvertor.castToString(value); // StringType
3540        } else if (name.equals("status")) {
3541          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3542          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3543        } else if (name.equals("experimental")) {
3544          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3545        } else if (name.equals("date")) {
3546          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3547        } else if (name.equals("publisher")) {
3548          this.publisher = TypeConvertor.castToString(value); // StringType
3549        } else if (name.equals("contact")) {
3550          this.getContact().add(TypeConvertor.castToContactDetail(value));
3551        } else if (name.equals("description")) {
3552          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3553        } else if (name.equals("useContext")) {
3554          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
3555        } else if (name.equals("jurisdiction")) {
3556          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
3557        } else if (name.equals("code")) {
3558          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3559        } else if (name.equals("severity")) {
3560          this.severity = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3561        } else if (name.equals("bodySite")) {
3562          this.bodySite = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3563        } else if (name.equals("stage")) {
3564          this.stage = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3565        } else if (name.equals("hasSeverity")) {
3566          this.hasSeverity = TypeConvertor.castToBoolean(value); // BooleanType
3567        } else if (name.equals("hasBodySite")) {
3568          this.hasBodySite = TypeConvertor.castToBoolean(value); // BooleanType
3569        } else if (name.equals("hasStage")) {
3570          this.hasStage = TypeConvertor.castToBoolean(value); // BooleanType
3571        } else if (name.equals("definition")) {
3572          this.getDefinition().add(TypeConvertor.castToUri(value));
3573        } else if (name.equals("observation")) {
3574          this.getObservation().add((ConditionDefinitionObservationComponent) value);
3575        } else if (name.equals("medication")) {
3576          this.getMedication().add((ConditionDefinitionMedicationComponent) value);
3577        } else if (name.equals("precondition")) {
3578          this.getPrecondition().add((ConditionDefinitionPreconditionComponent) value);
3579        } else if (name.equals("team")) {
3580          this.getTeam().add(TypeConvertor.castToReference(value));
3581        } else if (name.equals("questionnaire")) {
3582          this.getQuestionnaire().add((ConditionDefinitionQuestionnaireComponent) value);
3583        } else if (name.equals("plan")) {
3584          this.getPlan().add((ConditionDefinitionPlanComponent) value);
3585        } else
3586          return super.setProperty(name, value);
3587        return value;
3588      }
3589
3590      @Override
3591      public Base makeProperty(int hash, String name) throws FHIRException {
3592        switch (hash) {
3593        case 116079:  return getUrlElement();
3594        case -1618432855:  return addIdentifier(); 
3595        case 351608024:  return getVersionElement();
3596        case 3373707:  return getNameElement();
3597        case 110371416:  return getTitleElement();
3598        case -2060497896:  return getSubtitleElement();
3599        case -892481550:  return getStatusElement();
3600        case -404562712:  return getExperimentalElement();
3601        case 3076014:  return getDateElement();
3602        case 1447404028:  return getPublisherElement();
3603        case 951526432:  return addContact(); 
3604        case -1724546052:  return getDescriptionElement();
3605        case -669707736:  return addUseContext(); 
3606        case -507075711:  return addJurisdiction(); 
3607        case 3059181:  return getCode();
3608        case 1478300413:  return getSeverity();
3609        case 1702620169:  return getBodySite();
3610        case 109757182:  return getStage();
3611        case 57790391:  return getHasSeverityElement();
3612        case 282110147:  return getHasBodySiteElement();
3613        case 129749124:  return getHasStageElement();
3614        case -1014418093:  return addDefinitionElement();
3615        case 122345516:  return addObservation(); 
3616        case 1998965455:  return addMedication(); 
3617        case -650968616:  return addPrecondition(); 
3618        case 3555933:  return addTeam(); 
3619        case -1017049693:  return addQuestionnaire(); 
3620        case 3443497:  return addPlan(); 
3621        default: return super.makeProperty(hash, name);
3622        }
3623
3624      }
3625
3626      @Override
3627      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3628        switch (hash) {
3629        case 116079: /*url*/ return new String[] {"uri"};
3630        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3631        case 351608024: /*version*/ return new String[] {"string"};
3632        case 3373707: /*name*/ return new String[] {"string"};
3633        case 110371416: /*title*/ return new String[] {"string"};
3634        case -2060497896: /*subtitle*/ return new String[] {"string"};
3635        case -892481550: /*status*/ return new String[] {"code"};
3636        case -404562712: /*experimental*/ return new String[] {"boolean"};
3637        case 3076014: /*date*/ return new String[] {"dateTime"};
3638        case 1447404028: /*publisher*/ return new String[] {"string"};
3639        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3640        case -1724546052: /*description*/ return new String[] {"markdown"};
3641        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3642        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3643        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
3644        case 1478300413: /*severity*/ return new String[] {"CodeableConcept"};
3645        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
3646        case 109757182: /*stage*/ return new String[] {"CodeableConcept"};
3647        case 57790391: /*hasSeverity*/ return new String[] {"boolean"};
3648        case 282110147: /*hasBodySite*/ return new String[] {"boolean"};
3649        case 129749124: /*hasStage*/ return new String[] {"boolean"};
3650        case -1014418093: /*definition*/ return new String[] {"uri"};
3651        case 122345516: /*observation*/ return new String[] {};
3652        case 1998965455: /*medication*/ return new String[] {};
3653        case -650968616: /*precondition*/ return new String[] {};
3654        case 3555933: /*team*/ return new String[] {"Reference"};
3655        case -1017049693: /*questionnaire*/ return new String[] {};
3656        case 3443497: /*plan*/ return new String[] {};
3657        default: return super.getTypesForProperty(hash, name);
3658        }
3659
3660      }
3661
3662      @Override
3663      public Base addChild(String name) throws FHIRException {
3664        if (name.equals("url")) {
3665          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.url");
3666        }
3667        else if (name.equals("identifier")) {
3668          return addIdentifier();
3669        }
3670        else if (name.equals("version")) {
3671          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.version");
3672        }
3673        else if (name.equals("name")) {
3674          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.name");
3675        }
3676        else if (name.equals("title")) {
3677          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.title");
3678        }
3679        else if (name.equals("subtitle")) {
3680          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.subtitle");
3681        }
3682        else if (name.equals("status")) {
3683          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.status");
3684        }
3685        else if (name.equals("experimental")) {
3686          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.experimental");
3687        }
3688        else if (name.equals("date")) {
3689          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.date");
3690        }
3691        else if (name.equals("publisher")) {
3692          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.publisher");
3693        }
3694        else if (name.equals("contact")) {
3695          return addContact();
3696        }
3697        else if (name.equals("description")) {
3698          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.description");
3699        }
3700        else if (name.equals("useContext")) {
3701          return addUseContext();
3702        }
3703        else if (name.equals("jurisdiction")) {
3704          return addJurisdiction();
3705        }
3706        else if (name.equals("code")) {
3707          this.code = new CodeableConcept();
3708          return this.code;
3709        }
3710        else if (name.equals("severity")) {
3711          this.severity = new CodeableConcept();
3712          return this.severity;
3713        }
3714        else if (name.equals("bodySite")) {
3715          this.bodySite = new CodeableConcept();
3716          return this.bodySite;
3717        }
3718        else if (name.equals("stage")) {
3719          this.stage = new CodeableConcept();
3720          return this.stage;
3721        }
3722        else if (name.equals("hasSeverity")) {
3723          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.hasSeverity");
3724        }
3725        else if (name.equals("hasBodySite")) {
3726          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.hasBodySite");
3727        }
3728        else if (name.equals("hasStage")) {
3729          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.hasStage");
3730        }
3731        else if (name.equals("definition")) {
3732          throw new FHIRException("Cannot call addChild on a primitive type ConditionDefinition.definition");
3733        }
3734        else if (name.equals("observation")) {
3735          return addObservation();
3736        }
3737        else if (name.equals("medication")) {
3738          return addMedication();
3739        }
3740        else if (name.equals("precondition")) {
3741          return addPrecondition();
3742        }
3743        else if (name.equals("team")) {
3744          return addTeam();
3745        }
3746        else if (name.equals("questionnaire")) {
3747          return addQuestionnaire();
3748        }
3749        else if (name.equals("plan")) {
3750          return addPlan();
3751        }
3752        else
3753          return super.addChild(name);
3754      }
3755
3756  public String fhirType() {
3757    return "ConditionDefinition";
3758
3759  }
3760
3761      public ConditionDefinition copy() {
3762        ConditionDefinition dst = new ConditionDefinition();
3763        copyValues(dst);
3764        return dst;
3765      }
3766
3767      public void copyValues(ConditionDefinition dst) {
3768        super.copyValues(dst);
3769        dst.url = url == null ? null : url.copy();
3770        if (identifier != null) {
3771          dst.identifier = new ArrayList<Identifier>();
3772          for (Identifier i : identifier)
3773            dst.identifier.add(i.copy());
3774        };
3775        dst.version = version == null ? null : version.copy();
3776        dst.name = name == null ? null : name.copy();
3777        dst.title = title == null ? null : title.copy();
3778        dst.subtitle = subtitle == null ? null : subtitle.copy();
3779        dst.status = status == null ? null : status.copy();
3780        dst.experimental = experimental == null ? null : experimental.copy();
3781        dst.date = date == null ? null : date.copy();
3782        dst.publisher = publisher == null ? null : publisher.copy();
3783        if (contact != null) {
3784          dst.contact = new ArrayList<ContactDetail>();
3785          for (ContactDetail i : contact)
3786            dst.contact.add(i.copy());
3787        };
3788        dst.description = description == null ? null : description.copy();
3789        if (useContext != null) {
3790          dst.useContext = new ArrayList<UsageContext>();
3791          for (UsageContext i : useContext)
3792            dst.useContext.add(i.copy());
3793        };
3794        if (jurisdiction != null) {
3795          dst.jurisdiction = new ArrayList<CodeableConcept>();
3796          for (CodeableConcept i : jurisdiction)
3797            dst.jurisdiction.add(i.copy());
3798        };
3799        dst.code = code == null ? null : code.copy();
3800        dst.severity = severity == null ? null : severity.copy();
3801        dst.bodySite = bodySite == null ? null : bodySite.copy();
3802        dst.stage = stage == null ? null : stage.copy();
3803        dst.hasSeverity = hasSeverity == null ? null : hasSeverity.copy();
3804        dst.hasBodySite = hasBodySite == null ? null : hasBodySite.copy();
3805        dst.hasStage = hasStage == null ? null : hasStage.copy();
3806        if (definition != null) {
3807          dst.definition = new ArrayList<UriType>();
3808          for (UriType i : definition)
3809            dst.definition.add(i.copy());
3810        };
3811        if (observation != null) {
3812          dst.observation = new ArrayList<ConditionDefinitionObservationComponent>();
3813          for (ConditionDefinitionObservationComponent i : observation)
3814            dst.observation.add(i.copy());
3815        };
3816        if (medication != null) {
3817          dst.medication = new ArrayList<ConditionDefinitionMedicationComponent>();
3818          for (ConditionDefinitionMedicationComponent i : medication)
3819            dst.medication.add(i.copy());
3820        };
3821        if (precondition != null) {
3822          dst.precondition = new ArrayList<ConditionDefinitionPreconditionComponent>();
3823          for (ConditionDefinitionPreconditionComponent i : precondition)
3824            dst.precondition.add(i.copy());
3825        };
3826        if (team != null) {
3827          dst.team = new ArrayList<Reference>();
3828          for (Reference i : team)
3829            dst.team.add(i.copy());
3830        };
3831        if (questionnaire != null) {
3832          dst.questionnaire = new ArrayList<ConditionDefinitionQuestionnaireComponent>();
3833          for (ConditionDefinitionQuestionnaireComponent i : questionnaire)
3834            dst.questionnaire.add(i.copy());
3835        };
3836        if (plan != null) {
3837          dst.plan = new ArrayList<ConditionDefinitionPlanComponent>();
3838          for (ConditionDefinitionPlanComponent i : plan)
3839            dst.plan.add(i.copy());
3840        };
3841      }
3842
3843      protected ConditionDefinition typedCopy() {
3844        return copy();
3845      }
3846
3847      @Override
3848      public boolean equalsDeep(Base other_) {
3849        if (!super.equalsDeep(other_))
3850          return false;
3851        if (!(other_ instanceof ConditionDefinition))
3852          return false;
3853        ConditionDefinition o = (ConditionDefinition) other_;
3854        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
3855           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(subtitle, o.subtitle, true)
3856           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true)
3857           && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true)
3858           && compareDeep(useContext, o.useContext, true) && compareDeep(jurisdiction, o.jurisdiction, true)
3859           && compareDeep(code, o.code, true) && compareDeep(severity, o.severity, true) && compareDeep(bodySite, o.bodySite, true)
3860           && compareDeep(stage, o.stage, true) && compareDeep(hasSeverity, o.hasSeverity, true) && compareDeep(hasBodySite, o.hasBodySite, true)
3861           && compareDeep(hasStage, o.hasStage, true) && compareDeep(definition, o.definition, true) && compareDeep(observation, o.observation, true)
3862           && compareDeep(medication, o.medication, true) && compareDeep(precondition, o.precondition, true)
3863           && compareDeep(team, o.team, true) && compareDeep(questionnaire, o.questionnaire, true) && compareDeep(plan, o.plan, true)
3864          ;
3865      }
3866
3867      @Override
3868      public boolean equalsShallow(Base other_) {
3869        if (!super.equalsShallow(other_))
3870          return false;
3871        if (!(other_ instanceof ConditionDefinition))
3872          return false;
3873        ConditionDefinition o = (ConditionDefinition) other_;
3874        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
3875           && compareValues(title, o.title, true) && compareValues(subtitle, o.subtitle, true) && compareValues(status, o.status, true)
3876           && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true)
3877           && compareValues(description, o.description, true) && compareValues(hasSeverity, o.hasSeverity, true)
3878           && compareValues(hasBodySite, o.hasBodySite, true) && compareValues(hasStage, o.hasStage, true) && compareValues(definition, o.definition, true)
3879          ;
3880      }
3881
3882      public boolean isEmpty() {
3883        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
3884          , name, title, subtitle, status, experimental, date, publisher, contact, description
3885          , useContext, jurisdiction, code, severity, bodySite, stage, hasSeverity, hasBodySite
3886          , hasStage, definition, observation, medication, precondition, team, questionnaire
3887          , plan);
3888      }
3889
3890  @Override
3891  public ResourceType getResourceType() {
3892    return ResourceType.ConditionDefinition;
3893   }
3894
3895 /**
3896   * Search parameter: <b>context-quantity</b>
3897   * <p>
3898   * Description: <b>A quantity- or range-valued use context assigned to the condition definition</b><br>
3899   * Type: <b>quantity</b><br>
3900   * Path: <b>(ConditionDefinition.useContext.value as Quantity) | (ConditionDefinition.useContext.value as Range)</b><br>
3901   * </p>
3902   */
3903  @SearchParamDefinition(name="context-quantity", path="(ConditionDefinition.useContext.value as Quantity) | (ConditionDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the condition definition", type="quantity" )
3904  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
3905 /**
3906   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
3907   * <p>
3908   * Description: <b>A quantity- or range-valued use context assigned to the condition definition</b><br>
3909   * Type: <b>quantity</b><br>
3910   * Path: <b>(ConditionDefinition.useContext.value as Quantity) | (ConditionDefinition.useContext.value as Range)</b><br>
3911   * </p>
3912   */
3913  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
3914
3915 /**
3916   * Search parameter: <b>context-type-quantity</b>
3917   * <p>
3918   * Description: <b>A use context type and quantity- or range-based value assigned to the condition definition</b><br>
3919   * Type: <b>composite</b><br>
3920   * Path: <b>ConditionDefinition.useContext</b><br>
3921   * </p>
3922   */
3923  @SearchParamDefinition(name="context-type-quantity", path="ConditionDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the condition definition", type="composite", compositeOf={"context-type", "context-quantity"} )
3924  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
3925 /**
3926   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
3927   * <p>
3928   * Description: <b>A use context type and quantity- or range-based value assigned to the condition definition</b><br>
3929   * Type: <b>composite</b><br>
3930   * Path: <b>ConditionDefinition.useContext</b><br>
3931   * </p>
3932   */
3933  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
3934
3935 /**
3936   * Search parameter: <b>context-type-value</b>
3937   * <p>
3938   * Description: <b>A use context type and value assigned to the condition definition</b><br>
3939   * Type: <b>composite</b><br>
3940   * Path: <b>ConditionDefinition.useContext</b><br>
3941   * </p>
3942   */
3943  @SearchParamDefinition(name="context-type-value", path="ConditionDefinition.useContext", description="A use context type and value assigned to the condition definition", type="composite", compositeOf={"context-type", "context"} )
3944  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
3945 /**
3946   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
3947   * <p>
3948   * Description: <b>A use context type and value assigned to the condition definition</b><br>
3949   * Type: <b>composite</b><br>
3950   * Path: <b>ConditionDefinition.useContext</b><br>
3951   * </p>
3952   */
3953  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
3954
3955 /**
3956   * Search parameter: <b>context-type</b>
3957   * <p>
3958   * Description: <b>A type of use context assigned to the condition definition</b><br>
3959   * Type: <b>token</b><br>
3960   * Path: <b>ConditionDefinition.useContext.code</b><br>
3961   * </p>
3962   */
3963  @SearchParamDefinition(name="context-type", path="ConditionDefinition.useContext.code", description="A type of use context assigned to the condition definition", type="token" )
3964  public static final String SP_CONTEXT_TYPE = "context-type";
3965 /**
3966   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
3967   * <p>
3968   * Description: <b>A type of use context assigned to the condition definition</b><br>
3969   * Type: <b>token</b><br>
3970   * Path: <b>ConditionDefinition.useContext.code</b><br>
3971   * </p>
3972   */
3973  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
3974
3975 /**
3976   * Search parameter: <b>context</b>
3977   * <p>
3978   * Description: <b>A use context assigned to the condition definition</b><br>
3979   * Type: <b>token</b><br>
3980   * Path: <b>(ConditionDefinition.useContext.value as CodeableConcept)</b><br>
3981   * </p>
3982   */
3983  @SearchParamDefinition(name="context", path="(ConditionDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the condition definition", type="token" )
3984  public static final String SP_CONTEXT = "context";
3985 /**
3986   * <b>Fluent Client</b> search parameter constant for <b>context</b>
3987   * <p>
3988   * Description: <b>A use context assigned to the condition definition</b><br>
3989   * Type: <b>token</b><br>
3990   * Path: <b>(ConditionDefinition.useContext.value as CodeableConcept)</b><br>
3991   * </p>
3992   */
3993  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
3994
3995 /**
3996   * Search parameter: <b>date</b>
3997   * <p>
3998   * Description: <b>The condition definition publication date</b><br>
3999   * Type: <b>date</b><br>
4000   * Path: <b>ConditionDefinition.date</b><br>
4001   * </p>
4002   */
4003  @SearchParamDefinition(name="date", path="ConditionDefinition.date", description="The condition definition publication date", type="date" )
4004  public static final String SP_DATE = "date";
4005 /**
4006   * <b>Fluent Client</b> search parameter constant for <b>date</b>
4007   * <p>
4008   * Description: <b>The condition definition publication date</b><br>
4009   * Type: <b>date</b><br>
4010   * Path: <b>ConditionDefinition.date</b><br>
4011   * </p>
4012   */
4013  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
4014
4015 /**
4016   * Search parameter: <b>description</b>
4017   * <p>
4018   * Description: <b>The description of the condition definition</b><br>
4019   * Type: <b>string</b><br>
4020   * Path: <b>ConditionDefinition.description</b><br>
4021   * </p>
4022   */
4023  @SearchParamDefinition(name="description", path="ConditionDefinition.description", description="The description of the condition definition", type="string" )
4024  public static final String SP_DESCRIPTION = "description";
4025 /**
4026   * <b>Fluent Client</b> search parameter constant for <b>description</b>
4027   * <p>
4028   * Description: <b>The description of the condition definition</b><br>
4029   * Type: <b>string</b><br>
4030   * Path: <b>ConditionDefinition.description</b><br>
4031   * </p>
4032   */
4033  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
4034
4035 /**
4036   * Search parameter: <b>identifier</b>
4037   * <p>
4038   * Description: <b>External identifier for the condition definition</b><br>
4039   * Type: <b>token</b><br>
4040   * Path: <b>ConditionDefinition.identifier</b><br>
4041   * </p>
4042   */
4043  @SearchParamDefinition(name="identifier", path="ConditionDefinition.identifier", description="External identifier for the condition definition", type="token" )
4044  public static final String SP_IDENTIFIER = "identifier";
4045 /**
4046   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4047   * <p>
4048   * Description: <b>External identifier for the condition definition</b><br>
4049   * Type: <b>token</b><br>
4050   * Path: <b>ConditionDefinition.identifier</b><br>
4051   * </p>
4052   */
4053  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4054
4055 /**
4056   * Search parameter: <b>jurisdiction</b>
4057   * <p>
4058   * Description: <b>Intended jurisdiction for the condition definition</b><br>
4059   * Type: <b>token</b><br>
4060   * Path: <b>ConditionDefinition.jurisdiction</b><br>
4061   * </p>
4062   */
4063  @SearchParamDefinition(name="jurisdiction", path="ConditionDefinition.jurisdiction", description="Intended jurisdiction for the condition definition", type="token" )
4064  public static final String SP_JURISDICTION = "jurisdiction";
4065 /**
4066   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
4067   * <p>
4068   * Description: <b>Intended jurisdiction for the condition definition</b><br>
4069   * Type: <b>token</b><br>
4070   * Path: <b>ConditionDefinition.jurisdiction</b><br>
4071   * </p>
4072   */
4073  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
4074
4075 /**
4076   * Search parameter: <b>name</b>
4077   * <p>
4078   * Description: <b>Computationally friendly name of the condition definition</b><br>
4079   * Type: <b>string</b><br>
4080   * Path: <b>ConditionDefinition.name</b><br>
4081   * </p>
4082   */
4083  @SearchParamDefinition(name="name", path="ConditionDefinition.name", description="Computationally friendly name of the condition definition", type="string" )
4084  public static final String SP_NAME = "name";
4085 /**
4086   * <b>Fluent Client</b> search parameter constant for <b>name</b>
4087   * <p>
4088   * Description: <b>Computationally friendly name of the condition definition</b><br>
4089   * Type: <b>string</b><br>
4090   * Path: <b>ConditionDefinition.name</b><br>
4091   * </p>
4092   */
4093  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
4094
4095 /**
4096   * Search parameter: <b>publisher</b>
4097   * <p>
4098   * Description: <b>Name of the publisher of the condition definition</b><br>
4099   * Type: <b>string</b><br>
4100   * Path: <b>ConditionDefinition.publisher</b><br>
4101   * </p>
4102   */
4103  @SearchParamDefinition(name="publisher", path="ConditionDefinition.publisher", description="Name of the publisher of the condition definition", type="string" )
4104  public static final String SP_PUBLISHER = "publisher";
4105 /**
4106   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
4107   * <p>
4108   * Description: <b>Name of the publisher of the condition definition</b><br>
4109   * Type: <b>string</b><br>
4110   * Path: <b>ConditionDefinition.publisher</b><br>
4111   * </p>
4112   */
4113  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
4114
4115 /**
4116   * Search parameter: <b>status</b>
4117   * <p>
4118   * Description: <b>The current status of the condition definition</b><br>
4119   * Type: <b>token</b><br>
4120   * Path: <b>ConditionDefinition.status</b><br>
4121   * </p>
4122   */
4123  @SearchParamDefinition(name="status", path="ConditionDefinition.status", description="The current status of the condition definition", type="token" )
4124  public static final String SP_STATUS = "status";
4125 /**
4126   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4127   * <p>
4128   * Description: <b>The current status of the condition definition</b><br>
4129   * Type: <b>token</b><br>
4130   * Path: <b>ConditionDefinition.status</b><br>
4131   * </p>
4132   */
4133  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4134
4135 /**
4136   * Search parameter: <b>title</b>
4137   * <p>
4138   * Description: <b>The human-friendly name of the condition definition</b><br>
4139   * Type: <b>string</b><br>
4140   * Path: <b>ConditionDefinition.title</b><br>
4141   * </p>
4142   */
4143  @SearchParamDefinition(name="title", path="ConditionDefinition.title", description="The human-friendly name of the condition definition", type="string" )
4144  public static final String SP_TITLE = "title";
4145 /**
4146   * <b>Fluent Client</b> search parameter constant for <b>title</b>
4147   * <p>
4148   * Description: <b>The human-friendly name of the condition definition</b><br>
4149   * Type: <b>string</b><br>
4150   * Path: <b>ConditionDefinition.title</b><br>
4151   * </p>
4152   */
4153  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
4154
4155 /**
4156   * Search parameter: <b>url</b>
4157   * <p>
4158   * Description: <b>The uri that identifies the condition definition</b><br>
4159   * Type: <b>uri</b><br>
4160   * Path: <b>ConditionDefinition.url</b><br>
4161   * </p>
4162   */
4163  @SearchParamDefinition(name="url", path="ConditionDefinition.url", description="The uri that identifies the condition definition", type="uri" )
4164  public static final String SP_URL = "url";
4165 /**
4166   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4167   * <p>
4168   * Description: <b>The uri that identifies the condition definition</b><br>
4169   * Type: <b>uri</b><br>
4170   * Path: <b>ConditionDefinition.url</b><br>
4171   * </p>
4172   */
4173  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4174
4175 /**
4176   * Search parameter: <b>version</b>
4177   * <p>
4178   * Description: <b>The business version of the condition definition</b><br>
4179   * Type: <b>token</b><br>
4180   * Path: <b>ConditionDefinition.version</b><br>
4181   * </p>
4182   */
4183  @SearchParamDefinition(name="version", path="ConditionDefinition.version", description="The business version of the condition definition", type="token" )
4184  public static final String SP_VERSION = "version";
4185 /**
4186   * <b>Fluent Client</b> search parameter constant for <b>version</b>
4187   * <p>
4188   * Description: <b>The business version of the condition definition</b><br>
4189   * Type: <b>token</b><br>
4190   * Path: <b>ConditionDefinition.version</b><br>
4191   * </p>
4192   */
4193  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
4194
4195
4196}
4197