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