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