001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4b.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure. 052 */ 053@ResourceDef(name="ClinicalUseDefinition", profile="http://hl7.org/fhir/StructureDefinition/ClinicalUseDefinition") 054public class ClinicalUseDefinition extends DomainResource { 055 056 public enum ClinicalUseIssueType { 057 /** 058 * A reason for giving the medicaton. 059 */ 060 INDICATION, 061 /** 062 * A reason for not giving the medicaition. 063 */ 064 CONTRAINDICATION, 065 /** 066 * Interactions between the medication and other substances. 067 */ 068 INTERACTION, 069 /** 070 * Side effects or adverse effects associated with the medication. 071 */ 072 UNDESIRABLEEFFECT, 073 /** 074 * A general warning or issue that is not specifically one of the other types. 075 */ 076 WARNING, 077 /** 078 * added to help the parsers with the generic types 079 */ 080 NULL; 081 public static ClinicalUseIssueType fromCode(String codeString) throws FHIRException { 082 if (codeString == null || "".equals(codeString)) 083 return null; 084 if ("indication".equals(codeString)) 085 return INDICATION; 086 if ("contraindication".equals(codeString)) 087 return CONTRAINDICATION; 088 if ("interaction".equals(codeString)) 089 return INTERACTION; 090 if ("undesirable-effect".equals(codeString)) 091 return UNDESIRABLEEFFECT; 092 if ("warning".equals(codeString)) 093 return WARNING; 094 if (Configuration.isAcceptInvalidEnums()) 095 return null; 096 else 097 throw new FHIRException("Unknown ClinicalUseIssueType code '"+codeString+"'"); 098 } 099 public String toCode() { 100 switch (this) { 101 case INDICATION: return "indication"; 102 case CONTRAINDICATION: return "contraindication"; 103 case INTERACTION: return "interaction"; 104 case UNDESIRABLEEFFECT: return "undesirable-effect"; 105 case WARNING: return "warning"; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getSystem() { 111 switch (this) { 112 case INDICATION: return "http://hl7.org/fhir/clinical-use-issue-type"; 113 case CONTRAINDICATION: return "http://hl7.org/fhir/clinical-use-issue-type"; 114 case INTERACTION: return "http://hl7.org/fhir/clinical-use-issue-type"; 115 case UNDESIRABLEEFFECT: return "http://hl7.org/fhir/clinical-use-issue-type"; 116 case WARNING: return "http://hl7.org/fhir/clinical-use-issue-type"; 117 case NULL: return null; 118 default: return "?"; 119 } 120 } 121 public String getDefinition() { 122 switch (this) { 123 case INDICATION: return "A reason for giving the medicaton."; 124 case CONTRAINDICATION: return "A reason for not giving the medicaition."; 125 case INTERACTION: return "Interactions between the medication and other substances."; 126 case UNDESIRABLEEFFECT: return "Side effects or adverse effects associated with the medication."; 127 case WARNING: return "A general warning or issue that is not specifically one of the other types."; 128 case NULL: return null; 129 default: return "?"; 130 } 131 } 132 public String getDisplay() { 133 switch (this) { 134 case INDICATION: return "Indication"; 135 case CONTRAINDICATION: return "Contraindication"; 136 case INTERACTION: return "Interaction"; 137 case UNDESIRABLEEFFECT: return "Undesirable Effect"; 138 case WARNING: return "Warning"; 139 case NULL: return null; 140 default: return "?"; 141 } 142 } 143 } 144 145 public static class ClinicalUseIssueTypeEnumFactory implements EnumFactory<ClinicalUseIssueType> { 146 public ClinicalUseIssueType fromCode(String codeString) throws IllegalArgumentException { 147 if (codeString == null || "".equals(codeString)) 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("indication".equals(codeString)) 151 return ClinicalUseIssueType.INDICATION; 152 if ("contraindication".equals(codeString)) 153 return ClinicalUseIssueType.CONTRAINDICATION; 154 if ("interaction".equals(codeString)) 155 return ClinicalUseIssueType.INTERACTION; 156 if ("undesirable-effect".equals(codeString)) 157 return ClinicalUseIssueType.UNDESIRABLEEFFECT; 158 if ("warning".equals(codeString)) 159 return ClinicalUseIssueType.WARNING; 160 throw new IllegalArgumentException("Unknown ClinicalUseIssueType code '"+codeString+"'"); 161 } 162 public Enumeration<ClinicalUseIssueType> fromType(Base code) throws FHIRException { 163 if (code == null) 164 return null; 165 if (code.isEmpty()) 166 return new Enumeration<ClinicalUseIssueType>(this); 167 String codeString = ((PrimitiveType) code).asStringValue(); 168 if (codeString == null || "".equals(codeString)) 169 return null; 170 if ("indication".equals(codeString)) 171 return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.INDICATION); 172 if ("contraindication".equals(codeString)) 173 return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.CONTRAINDICATION); 174 if ("interaction".equals(codeString)) 175 return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.INTERACTION); 176 if ("undesirable-effect".equals(codeString)) 177 return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.UNDESIRABLEEFFECT); 178 if ("warning".equals(codeString)) 179 return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.WARNING); 180 throw new FHIRException("Unknown ClinicalUseIssueType code '"+codeString+"'"); 181 } 182 public String toCode(ClinicalUseIssueType code) { 183 if (code == ClinicalUseIssueType.INDICATION) 184 return "indication"; 185 if (code == ClinicalUseIssueType.CONTRAINDICATION) 186 return "contraindication"; 187 if (code == ClinicalUseIssueType.INTERACTION) 188 return "interaction"; 189 if (code == ClinicalUseIssueType.UNDESIRABLEEFFECT) 190 return "undesirable-effect"; 191 if (code == ClinicalUseIssueType.WARNING) 192 return "warning"; 193 return "?"; 194 } 195 public String toSystem(ClinicalUseIssueType code) { 196 return code.getSystem(); 197 } 198 } 199 200 @Block() 201 public static class ClinicalUseDefinitionContraindicationComponent extends BackboneElement implements IBaseBackboneElement { 202 /** 203 * The situation that is being documented as contraindicating against this item. 204 */ 205 @Child(name = "diseaseSymptomProcedure", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 206 @Description(shortDefinition="The situation that is being documented as contraindicating against this item", formalDefinition="The situation that is being documented as contraindicating against this item." ) 207 protected CodeableReference diseaseSymptomProcedure; 208 209 /** 210 * The status of the disease or symptom for the contraindication. 211 */ 212 @Child(name = "diseaseStatus", type = {CodeableReference.class}, order=2, min=0, max=1, modifier=false, summary=true) 213 @Description(shortDefinition="The status of the disease or symptom for the contraindication", formalDefinition="The status of the disease or symptom for the contraindication." ) 214 protected CodeableReference diseaseStatus; 215 216 /** 217 * A comorbidity (concurrent condition) or coinfection. 218 */ 219 @Child(name = "comorbidity", type = {CodeableReference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 220 @Description(shortDefinition="A comorbidity (concurrent condition) or coinfection", formalDefinition="A comorbidity (concurrent condition) or coinfection." ) 221 protected List<CodeableReference> comorbidity; 222 223 /** 224 * The indication which this is a contraidication for. 225 */ 226 @Child(name = "indication", type = {ClinicalUseDefinition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 227 @Description(shortDefinition="The indication which this is a contraidication for", formalDefinition="The indication which this is a contraidication for." ) 228 protected List<Reference> indication; 229 230 /** 231 * Information about the use of the medicinal product in relation to other therapies described as part of the contraindication. 232 */ 233 @Child(name = "otherTherapy", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 234 @Description(shortDefinition="Information about the use of the medicinal product in relation to other therapies described as part of the contraindication", formalDefinition="Information about the use of the medicinal product in relation to other therapies described as part of the contraindication." ) 235 protected List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> otherTherapy; 236 237 private static final long serialVersionUID = 832395863L; 238 239 /** 240 * Constructor 241 */ 242 public ClinicalUseDefinitionContraindicationComponent() { 243 super(); 244 } 245 246 /** 247 * @return {@link #diseaseSymptomProcedure} (The situation that is being documented as contraindicating against this item.) 248 */ 249 public CodeableReference getDiseaseSymptomProcedure() { 250 if (this.diseaseSymptomProcedure == null) 251 if (Configuration.errorOnAutoCreate()) 252 throw new Error("Attempt to auto-create ClinicalUseDefinitionContraindicationComponent.diseaseSymptomProcedure"); 253 else if (Configuration.doAutoCreate()) 254 this.diseaseSymptomProcedure = new CodeableReference(); // cc 255 return this.diseaseSymptomProcedure; 256 } 257 258 public boolean hasDiseaseSymptomProcedure() { 259 return this.diseaseSymptomProcedure != null && !this.diseaseSymptomProcedure.isEmpty(); 260 } 261 262 /** 263 * @param value {@link #diseaseSymptomProcedure} (The situation that is being documented as contraindicating against this item.) 264 */ 265 public ClinicalUseDefinitionContraindicationComponent setDiseaseSymptomProcedure(CodeableReference value) { 266 this.diseaseSymptomProcedure = value; 267 return this; 268 } 269 270 /** 271 * @return {@link #diseaseStatus} (The status of the disease or symptom for the contraindication.) 272 */ 273 public CodeableReference getDiseaseStatus() { 274 if (this.diseaseStatus == null) 275 if (Configuration.errorOnAutoCreate()) 276 throw new Error("Attempt to auto-create ClinicalUseDefinitionContraindicationComponent.diseaseStatus"); 277 else if (Configuration.doAutoCreate()) 278 this.diseaseStatus = new CodeableReference(); // cc 279 return this.diseaseStatus; 280 } 281 282 public boolean hasDiseaseStatus() { 283 return this.diseaseStatus != null && !this.diseaseStatus.isEmpty(); 284 } 285 286 /** 287 * @param value {@link #diseaseStatus} (The status of the disease or symptom for the contraindication.) 288 */ 289 public ClinicalUseDefinitionContraindicationComponent setDiseaseStatus(CodeableReference value) { 290 this.diseaseStatus = value; 291 return this; 292 } 293 294 /** 295 * @return {@link #comorbidity} (A comorbidity (concurrent condition) or coinfection.) 296 */ 297 public List<CodeableReference> getComorbidity() { 298 if (this.comorbidity == null) 299 this.comorbidity = new ArrayList<CodeableReference>(); 300 return this.comorbidity; 301 } 302 303 /** 304 * @return Returns a reference to <code>this</code> for easy method chaining 305 */ 306 public ClinicalUseDefinitionContraindicationComponent setComorbidity(List<CodeableReference> theComorbidity) { 307 this.comorbidity = theComorbidity; 308 return this; 309 } 310 311 public boolean hasComorbidity() { 312 if (this.comorbidity == null) 313 return false; 314 for (CodeableReference item : this.comorbidity) 315 if (!item.isEmpty()) 316 return true; 317 return false; 318 } 319 320 public CodeableReference addComorbidity() { //3 321 CodeableReference t = new CodeableReference(); 322 if (this.comorbidity == null) 323 this.comorbidity = new ArrayList<CodeableReference>(); 324 this.comorbidity.add(t); 325 return t; 326 } 327 328 public ClinicalUseDefinitionContraindicationComponent addComorbidity(CodeableReference t) { //3 329 if (t == null) 330 return this; 331 if (this.comorbidity == null) 332 this.comorbidity = new ArrayList<CodeableReference>(); 333 this.comorbidity.add(t); 334 return this; 335 } 336 337 /** 338 * @return The first repetition of repeating field {@link #comorbidity}, creating it if it does not already exist {3} 339 */ 340 public CodeableReference getComorbidityFirstRep() { 341 if (getComorbidity().isEmpty()) { 342 addComorbidity(); 343 } 344 return getComorbidity().get(0); 345 } 346 347 /** 348 * @return {@link #indication} (The indication which this is a contraidication for.) 349 */ 350 public List<Reference> getIndication() { 351 if (this.indication == null) 352 this.indication = new ArrayList<Reference>(); 353 return this.indication; 354 } 355 356 /** 357 * @return Returns a reference to <code>this</code> for easy method chaining 358 */ 359 public ClinicalUseDefinitionContraindicationComponent setIndication(List<Reference> theIndication) { 360 this.indication = theIndication; 361 return this; 362 } 363 364 public boolean hasIndication() { 365 if (this.indication == null) 366 return false; 367 for (Reference item : this.indication) 368 if (!item.isEmpty()) 369 return true; 370 return false; 371 } 372 373 public Reference addIndication() { //3 374 Reference t = new Reference(); 375 if (this.indication == null) 376 this.indication = new ArrayList<Reference>(); 377 this.indication.add(t); 378 return t; 379 } 380 381 public ClinicalUseDefinitionContraindicationComponent addIndication(Reference t) { //3 382 if (t == null) 383 return this; 384 if (this.indication == null) 385 this.indication = new ArrayList<Reference>(); 386 this.indication.add(t); 387 return this; 388 } 389 390 /** 391 * @return The first repetition of repeating field {@link #indication}, creating it if it does not already exist {3} 392 */ 393 public Reference getIndicationFirstRep() { 394 if (getIndication().isEmpty()) { 395 addIndication(); 396 } 397 return getIndication().get(0); 398 } 399 400 /** 401 * @return {@link #otherTherapy} (Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.) 402 */ 403 public List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> getOtherTherapy() { 404 if (this.otherTherapy == null) 405 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 406 return this.otherTherapy; 407 } 408 409 /** 410 * @return Returns a reference to <code>this</code> for easy method chaining 411 */ 412 public ClinicalUseDefinitionContraindicationComponent setOtherTherapy(List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> theOtherTherapy) { 413 this.otherTherapy = theOtherTherapy; 414 return this; 415 } 416 417 public boolean hasOtherTherapy() { 418 if (this.otherTherapy == null) 419 return false; 420 for (ClinicalUseDefinitionContraindicationOtherTherapyComponent item : this.otherTherapy) 421 if (!item.isEmpty()) 422 return true; 423 return false; 424 } 425 426 public ClinicalUseDefinitionContraindicationOtherTherapyComponent addOtherTherapy() { //3 427 ClinicalUseDefinitionContraindicationOtherTherapyComponent t = new ClinicalUseDefinitionContraindicationOtherTherapyComponent(); 428 if (this.otherTherapy == null) 429 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 430 this.otherTherapy.add(t); 431 return t; 432 } 433 434 public ClinicalUseDefinitionContraindicationComponent addOtherTherapy(ClinicalUseDefinitionContraindicationOtherTherapyComponent t) { //3 435 if (t == null) 436 return this; 437 if (this.otherTherapy == null) 438 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 439 this.otherTherapy.add(t); 440 return this; 441 } 442 443 /** 444 * @return The first repetition of repeating field {@link #otherTherapy}, creating it if it does not already exist {3} 445 */ 446 public ClinicalUseDefinitionContraindicationOtherTherapyComponent getOtherTherapyFirstRep() { 447 if (getOtherTherapy().isEmpty()) { 448 addOtherTherapy(); 449 } 450 return getOtherTherapy().get(0); 451 } 452 453 protected void listChildren(List<Property> children) { 454 super.listChildren(children); 455 children.add(new Property("diseaseSymptomProcedure", "CodeableReference(ObservationDefinition)", "The situation that is being documented as contraindicating against this item.", 0, 1, diseaseSymptomProcedure)); 456 children.add(new Property("diseaseStatus", "CodeableReference(ObservationDefinition)", "The status of the disease or symptom for the contraindication.", 0, 1, diseaseStatus)); 457 children.add(new Property("comorbidity", "CodeableReference(ObservationDefinition)", "A comorbidity (concurrent condition) or coinfection.", 0, java.lang.Integer.MAX_VALUE, comorbidity)); 458 children.add(new Property("indication", "Reference(ClinicalUseDefinition)", "The indication which this is a contraidication for.", 0, java.lang.Integer.MAX_VALUE, indication)); 459 children.add(new Property("otherTherapy", "", "Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.", 0, java.lang.Integer.MAX_VALUE, otherTherapy)); 460 } 461 462 @Override 463 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 464 switch (_hash) { 465 case -1497395130: /*diseaseSymptomProcedure*/ return new Property("diseaseSymptomProcedure", "CodeableReference(ObservationDefinition)", "The situation that is being documented as contraindicating against this item.", 0, 1, diseaseSymptomProcedure); 466 case -505503602: /*diseaseStatus*/ return new Property("diseaseStatus", "CodeableReference(ObservationDefinition)", "The status of the disease or symptom for the contraindication.", 0, 1, diseaseStatus); 467 case -406395211: /*comorbidity*/ return new Property("comorbidity", "CodeableReference(ObservationDefinition)", "A comorbidity (concurrent condition) or coinfection.", 0, java.lang.Integer.MAX_VALUE, comorbidity); 468 case -597168804: /*indication*/ return new Property("indication", "Reference(ClinicalUseDefinition)", "The indication which this is a contraidication for.", 0, java.lang.Integer.MAX_VALUE, indication); 469 case -544509127: /*otherTherapy*/ return new Property("otherTherapy", "", "Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.", 0, java.lang.Integer.MAX_VALUE, otherTherapy); 470 default: return super.getNamedProperty(_hash, _name, _checkValid); 471 } 472 473 } 474 475 @Override 476 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 477 switch (hash) { 478 case -1497395130: /*diseaseSymptomProcedure*/ return this.diseaseSymptomProcedure == null ? new Base[0] : new Base[] {this.diseaseSymptomProcedure}; // CodeableReference 479 case -505503602: /*diseaseStatus*/ return this.diseaseStatus == null ? new Base[0] : new Base[] {this.diseaseStatus}; // CodeableReference 480 case -406395211: /*comorbidity*/ return this.comorbidity == null ? new Base[0] : this.comorbidity.toArray(new Base[this.comorbidity.size()]); // CodeableReference 481 case -597168804: /*indication*/ return this.indication == null ? new Base[0] : this.indication.toArray(new Base[this.indication.size()]); // Reference 482 case -544509127: /*otherTherapy*/ return this.otherTherapy == null ? new Base[0] : this.otherTherapy.toArray(new Base[this.otherTherapy.size()]); // ClinicalUseDefinitionContraindicationOtherTherapyComponent 483 default: return super.getProperty(hash, name, checkValid); 484 } 485 486 } 487 488 @Override 489 public Base setProperty(int hash, String name, Base value) throws FHIRException { 490 switch (hash) { 491 case -1497395130: // diseaseSymptomProcedure 492 this.diseaseSymptomProcedure = TypeConvertor.castToCodeableReference(value); // CodeableReference 493 return value; 494 case -505503602: // diseaseStatus 495 this.diseaseStatus = TypeConvertor.castToCodeableReference(value); // CodeableReference 496 return value; 497 case -406395211: // comorbidity 498 this.getComorbidity().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 499 return value; 500 case -597168804: // indication 501 this.getIndication().add(TypeConvertor.castToReference(value)); // Reference 502 return value; 503 case -544509127: // otherTherapy 504 this.getOtherTherapy().add((ClinicalUseDefinitionContraindicationOtherTherapyComponent) value); // ClinicalUseDefinitionContraindicationOtherTherapyComponent 505 return value; 506 default: return super.setProperty(hash, name, value); 507 } 508 509 } 510 511 @Override 512 public Base setProperty(String name, Base value) throws FHIRException { 513 if (name.equals("diseaseSymptomProcedure")) { 514 this.diseaseSymptomProcedure = TypeConvertor.castToCodeableReference(value); // CodeableReference 515 } else if (name.equals("diseaseStatus")) { 516 this.diseaseStatus = TypeConvertor.castToCodeableReference(value); // CodeableReference 517 } else if (name.equals("comorbidity")) { 518 this.getComorbidity().add(TypeConvertor.castToCodeableReference(value)); 519 } else if (name.equals("indication")) { 520 this.getIndication().add(TypeConvertor.castToReference(value)); 521 } else if (name.equals("otherTherapy")) { 522 this.getOtherTherapy().add((ClinicalUseDefinitionContraindicationOtherTherapyComponent) value); 523 } else 524 return super.setProperty(name, value); 525 return value; 526 } 527 528 @Override 529 public Base makeProperty(int hash, String name) throws FHIRException { 530 switch (hash) { 531 case -1497395130: return getDiseaseSymptomProcedure(); 532 case -505503602: return getDiseaseStatus(); 533 case -406395211: return addComorbidity(); 534 case -597168804: return addIndication(); 535 case -544509127: return addOtherTherapy(); 536 default: return super.makeProperty(hash, name); 537 } 538 539 } 540 541 @Override 542 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 543 switch (hash) { 544 case -1497395130: /*diseaseSymptomProcedure*/ return new String[] {"CodeableReference"}; 545 case -505503602: /*diseaseStatus*/ return new String[] {"CodeableReference"}; 546 case -406395211: /*comorbidity*/ return new String[] {"CodeableReference"}; 547 case -597168804: /*indication*/ return new String[] {"Reference"}; 548 case -544509127: /*otherTherapy*/ return new String[] {}; 549 default: return super.getTypesForProperty(hash, name); 550 } 551 552 } 553 554 @Override 555 public Base addChild(String name) throws FHIRException { 556 if (name.equals("diseaseSymptomProcedure")) { 557 this.diseaseSymptomProcedure = new CodeableReference(); 558 return this.diseaseSymptomProcedure; 559 } 560 else if (name.equals("diseaseStatus")) { 561 this.diseaseStatus = new CodeableReference(); 562 return this.diseaseStatus; 563 } 564 else if (name.equals("comorbidity")) { 565 return addComorbidity(); 566 } 567 else if (name.equals("indication")) { 568 return addIndication(); 569 } 570 else if (name.equals("otherTherapy")) { 571 return addOtherTherapy(); 572 } 573 else 574 return super.addChild(name); 575 } 576 577 public ClinicalUseDefinitionContraindicationComponent copy() { 578 ClinicalUseDefinitionContraindicationComponent dst = new ClinicalUseDefinitionContraindicationComponent(); 579 copyValues(dst); 580 return dst; 581 } 582 583 public void copyValues(ClinicalUseDefinitionContraindicationComponent dst) { 584 super.copyValues(dst); 585 dst.diseaseSymptomProcedure = diseaseSymptomProcedure == null ? null : diseaseSymptomProcedure.copy(); 586 dst.diseaseStatus = diseaseStatus == null ? null : diseaseStatus.copy(); 587 if (comorbidity != null) { 588 dst.comorbidity = new ArrayList<CodeableReference>(); 589 for (CodeableReference i : comorbidity) 590 dst.comorbidity.add(i.copy()); 591 }; 592 if (indication != null) { 593 dst.indication = new ArrayList<Reference>(); 594 for (Reference i : indication) 595 dst.indication.add(i.copy()); 596 }; 597 if (otherTherapy != null) { 598 dst.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 599 for (ClinicalUseDefinitionContraindicationOtherTherapyComponent i : otherTherapy) 600 dst.otherTherapy.add(i.copy()); 601 }; 602 } 603 604 @Override 605 public boolean equalsDeep(Base other_) { 606 if (!super.equalsDeep(other_)) 607 return false; 608 if (!(other_ instanceof ClinicalUseDefinitionContraindicationComponent)) 609 return false; 610 ClinicalUseDefinitionContraindicationComponent o = (ClinicalUseDefinitionContraindicationComponent) other_; 611 return compareDeep(diseaseSymptomProcedure, o.diseaseSymptomProcedure, true) && compareDeep(diseaseStatus, o.diseaseStatus, true) 612 && compareDeep(comorbidity, o.comorbidity, true) && compareDeep(indication, o.indication, true) 613 && compareDeep(otherTherapy, o.otherTherapy, true); 614 } 615 616 @Override 617 public boolean equalsShallow(Base other_) { 618 if (!super.equalsShallow(other_)) 619 return false; 620 if (!(other_ instanceof ClinicalUseDefinitionContraindicationComponent)) 621 return false; 622 ClinicalUseDefinitionContraindicationComponent o = (ClinicalUseDefinitionContraindicationComponent) other_; 623 return true; 624 } 625 626 public boolean isEmpty() { 627 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(diseaseSymptomProcedure, diseaseStatus 628 , comorbidity, indication, otherTherapy); 629 } 630 631 public String fhirType() { 632 return "ClinicalUseDefinition.contraindication"; 633 634 } 635 636 } 637 638 @Block() 639 public static class ClinicalUseDefinitionContraindicationOtherTherapyComponent extends BackboneElement implements IBaseBackboneElement { 640 /** 641 * The type of relationship between the medicinal product indication or contraindication and another therapy. 642 */ 643 @Child(name = "relationshipType", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 644 @Description(shortDefinition="The type of relationship between the medicinal product indication or contraindication and another therapy", formalDefinition="The type of relationship between the medicinal product indication or contraindication and another therapy." ) 645 protected CodeableConcept relationshipType; 646 647 /** 648 * Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication. 649 */ 650 @Child(name = "therapy", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) 651 @Description(shortDefinition="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication", formalDefinition="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication." ) 652 protected CodeableReference therapy; 653 654 private static final long serialVersionUID = -363440718L; 655 656 /** 657 * Constructor 658 */ 659 public ClinicalUseDefinitionContraindicationOtherTherapyComponent() { 660 super(); 661 } 662 663 /** 664 * Constructor 665 */ 666 public ClinicalUseDefinitionContraindicationOtherTherapyComponent(CodeableConcept relationshipType, CodeableReference therapy) { 667 super(); 668 this.setRelationshipType(relationshipType); 669 this.setTherapy(therapy); 670 } 671 672 /** 673 * @return {@link #relationshipType} (The type of relationship between the medicinal product indication or contraindication and another therapy.) 674 */ 675 public CodeableConcept getRelationshipType() { 676 if (this.relationshipType == null) 677 if (Configuration.errorOnAutoCreate()) 678 throw new Error("Attempt to auto-create ClinicalUseDefinitionContraindicationOtherTherapyComponent.relationshipType"); 679 else if (Configuration.doAutoCreate()) 680 this.relationshipType = new CodeableConcept(); // cc 681 return this.relationshipType; 682 } 683 684 public boolean hasRelationshipType() { 685 return this.relationshipType != null && !this.relationshipType.isEmpty(); 686 } 687 688 /** 689 * @param value {@link #relationshipType} (The type of relationship between the medicinal product indication or contraindication and another therapy.) 690 */ 691 public ClinicalUseDefinitionContraindicationOtherTherapyComponent setRelationshipType(CodeableConcept value) { 692 this.relationshipType = value; 693 return this; 694 } 695 696 /** 697 * @return {@link #therapy} (Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.) 698 */ 699 public CodeableReference getTherapy() { 700 if (this.therapy == null) 701 if (Configuration.errorOnAutoCreate()) 702 throw new Error("Attempt to auto-create ClinicalUseDefinitionContraindicationOtherTherapyComponent.therapy"); 703 else if (Configuration.doAutoCreate()) 704 this.therapy = new CodeableReference(); // cc 705 return this.therapy; 706 } 707 708 public boolean hasTherapy() { 709 return this.therapy != null && !this.therapy.isEmpty(); 710 } 711 712 /** 713 * @param value {@link #therapy} (Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.) 714 */ 715 public ClinicalUseDefinitionContraindicationOtherTherapyComponent setTherapy(CodeableReference value) { 716 this.therapy = value; 717 return this; 718 } 719 720 protected void listChildren(List<Property> children) { 721 super.listChildren(children); 722 children.add(new Property("relationshipType", "CodeableConcept", "The type of relationship between the medicinal product indication or contraindication and another therapy.", 0, 1, relationshipType)); 723 children.add(new Property("therapy", "CodeableReference(MedicinalProductDefinition|Medication|Substance|SubstanceDefinition|ActivityDefinition)", "Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", 0, 1, therapy)); 724 } 725 726 @Override 727 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 728 switch (_hash) { 729 case -1602839150: /*relationshipType*/ return new Property("relationshipType", "CodeableConcept", "The type of relationship between the medicinal product indication or contraindication and another therapy.", 0, 1, relationshipType); 730 case -1349555095: /*therapy*/ return new Property("therapy", "CodeableReference(MedicinalProductDefinition|Medication|Substance|SubstanceDefinition|ActivityDefinition)", "Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.", 0, 1, therapy); 731 default: return super.getNamedProperty(_hash, _name, _checkValid); 732 } 733 734 } 735 736 @Override 737 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 738 switch (hash) { 739 case -1602839150: /*relationshipType*/ return this.relationshipType == null ? new Base[0] : new Base[] {this.relationshipType}; // CodeableConcept 740 case -1349555095: /*therapy*/ return this.therapy == null ? new Base[0] : new Base[] {this.therapy}; // CodeableReference 741 default: return super.getProperty(hash, name, checkValid); 742 } 743 744 } 745 746 @Override 747 public Base setProperty(int hash, String name, Base value) throws FHIRException { 748 switch (hash) { 749 case -1602839150: // relationshipType 750 this.relationshipType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 751 return value; 752 case -1349555095: // therapy 753 this.therapy = TypeConvertor.castToCodeableReference(value); // CodeableReference 754 return value; 755 default: return super.setProperty(hash, name, value); 756 } 757 758 } 759 760 @Override 761 public Base setProperty(String name, Base value) throws FHIRException { 762 if (name.equals("relationshipType")) { 763 this.relationshipType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 764 } else if (name.equals("therapy")) { 765 this.therapy = TypeConvertor.castToCodeableReference(value); // CodeableReference 766 } else 767 return super.setProperty(name, value); 768 return value; 769 } 770 771 @Override 772 public Base makeProperty(int hash, String name) throws FHIRException { 773 switch (hash) { 774 case -1602839150: return getRelationshipType(); 775 case -1349555095: return getTherapy(); 776 default: return super.makeProperty(hash, name); 777 } 778 779 } 780 781 @Override 782 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 783 switch (hash) { 784 case -1602839150: /*relationshipType*/ return new String[] {"CodeableConcept"}; 785 case -1349555095: /*therapy*/ return new String[] {"CodeableReference"}; 786 default: return super.getTypesForProperty(hash, name); 787 } 788 789 } 790 791 @Override 792 public Base addChild(String name) throws FHIRException { 793 if (name.equals("relationshipType")) { 794 this.relationshipType = new CodeableConcept(); 795 return this.relationshipType; 796 } 797 else if (name.equals("therapy")) { 798 this.therapy = new CodeableReference(); 799 return this.therapy; 800 } 801 else 802 return super.addChild(name); 803 } 804 805 public ClinicalUseDefinitionContraindicationOtherTherapyComponent copy() { 806 ClinicalUseDefinitionContraindicationOtherTherapyComponent dst = new ClinicalUseDefinitionContraindicationOtherTherapyComponent(); 807 copyValues(dst); 808 return dst; 809 } 810 811 public void copyValues(ClinicalUseDefinitionContraindicationOtherTherapyComponent dst) { 812 super.copyValues(dst); 813 dst.relationshipType = relationshipType == null ? null : relationshipType.copy(); 814 dst.therapy = therapy == null ? null : therapy.copy(); 815 } 816 817 @Override 818 public boolean equalsDeep(Base other_) { 819 if (!super.equalsDeep(other_)) 820 return false; 821 if (!(other_ instanceof ClinicalUseDefinitionContraindicationOtherTherapyComponent)) 822 return false; 823 ClinicalUseDefinitionContraindicationOtherTherapyComponent o = (ClinicalUseDefinitionContraindicationOtherTherapyComponent) other_; 824 return compareDeep(relationshipType, o.relationshipType, true) && compareDeep(therapy, o.therapy, true) 825 ; 826 } 827 828 @Override 829 public boolean equalsShallow(Base other_) { 830 if (!super.equalsShallow(other_)) 831 return false; 832 if (!(other_ instanceof ClinicalUseDefinitionContraindicationOtherTherapyComponent)) 833 return false; 834 ClinicalUseDefinitionContraindicationOtherTherapyComponent o = (ClinicalUseDefinitionContraindicationOtherTherapyComponent) other_; 835 return true; 836 } 837 838 public boolean isEmpty() { 839 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationshipType, therapy 840 ); 841 } 842 843 public String fhirType() { 844 return "ClinicalUseDefinition.contraindication.otherTherapy"; 845 846 } 847 848 } 849 850 @Block() 851 public static class ClinicalUseDefinitionIndicationComponent extends BackboneElement implements IBaseBackboneElement { 852 /** 853 * The situation that is being documented as an indicaton for this item. 854 */ 855 @Child(name = "diseaseSymptomProcedure", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 856 @Description(shortDefinition="The situation that is being documented as an indicaton for this item", formalDefinition="The situation that is being documented as an indicaton for this item." ) 857 protected CodeableReference diseaseSymptomProcedure; 858 859 /** 860 * The status of the disease or symptom for the indication. 861 */ 862 @Child(name = "diseaseStatus", type = {CodeableReference.class}, order=2, min=0, max=1, modifier=false, summary=true) 863 @Description(shortDefinition="The status of the disease or symptom for the indication", formalDefinition="The status of the disease or symptom for the indication." ) 864 protected CodeableReference diseaseStatus; 865 866 /** 867 * A comorbidity (concurrent condition) or coinfection as part of the indication. 868 */ 869 @Child(name = "comorbidity", type = {CodeableReference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 870 @Description(shortDefinition="A comorbidity (concurrent condition) or coinfection as part of the indication", formalDefinition="A comorbidity (concurrent condition) or coinfection as part of the indication." ) 871 protected List<CodeableReference> comorbidity; 872 873 /** 874 * The intended effect, aim or strategy to be achieved. 875 */ 876 @Child(name = "intendedEffect", type = {CodeableReference.class}, order=4, min=0, max=1, modifier=false, summary=true) 877 @Description(shortDefinition="The intended effect, aim or strategy to be achieved", formalDefinition="The intended effect, aim or strategy to be achieved." ) 878 protected CodeableReference intendedEffect; 879 880 /** 881 * Timing or duration information. 882 */ 883 @Child(name = "duration", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=true) 884 @Description(shortDefinition="Timing or duration information", formalDefinition="Timing or duration information." ) 885 protected Quantity duration; 886 887 /** 888 * The specific undesirable effects of the medicinal product. 889 */ 890 @Child(name = "undesirableEffect", type = {ClinicalUseDefinition.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 891 @Description(shortDefinition="The specific undesirable effects of the medicinal product", formalDefinition="The specific undesirable effects of the medicinal product." ) 892 protected List<Reference> undesirableEffect; 893 894 /** 895 * Information about the use of the medicinal product in relation to other therapies described as part of the indication. 896 */ 897 @Child(name = "otherTherapy", type = {ClinicalUseDefinitionContraindicationOtherTherapyComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 898 @Description(shortDefinition="Information about the use of the medicinal product in relation to other therapies described as part of the indication", formalDefinition="Information about the use of the medicinal product in relation to other therapies described as part of the indication." ) 899 protected List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> otherTherapy; 900 901 private static final long serialVersionUID = 1882904823L; 902 903 /** 904 * Constructor 905 */ 906 public ClinicalUseDefinitionIndicationComponent() { 907 super(); 908 } 909 910 /** 911 * @return {@link #diseaseSymptomProcedure} (The situation that is being documented as an indicaton for this item.) 912 */ 913 public CodeableReference getDiseaseSymptomProcedure() { 914 if (this.diseaseSymptomProcedure == null) 915 if (Configuration.errorOnAutoCreate()) 916 throw new Error("Attempt to auto-create ClinicalUseDefinitionIndicationComponent.diseaseSymptomProcedure"); 917 else if (Configuration.doAutoCreate()) 918 this.diseaseSymptomProcedure = new CodeableReference(); // cc 919 return this.diseaseSymptomProcedure; 920 } 921 922 public boolean hasDiseaseSymptomProcedure() { 923 return this.diseaseSymptomProcedure != null && !this.diseaseSymptomProcedure.isEmpty(); 924 } 925 926 /** 927 * @param value {@link #diseaseSymptomProcedure} (The situation that is being documented as an indicaton for this item.) 928 */ 929 public ClinicalUseDefinitionIndicationComponent setDiseaseSymptomProcedure(CodeableReference value) { 930 this.diseaseSymptomProcedure = value; 931 return this; 932 } 933 934 /** 935 * @return {@link #diseaseStatus} (The status of the disease or symptom for the indication.) 936 */ 937 public CodeableReference getDiseaseStatus() { 938 if (this.diseaseStatus == null) 939 if (Configuration.errorOnAutoCreate()) 940 throw new Error("Attempt to auto-create ClinicalUseDefinitionIndicationComponent.diseaseStatus"); 941 else if (Configuration.doAutoCreate()) 942 this.diseaseStatus = new CodeableReference(); // cc 943 return this.diseaseStatus; 944 } 945 946 public boolean hasDiseaseStatus() { 947 return this.diseaseStatus != null && !this.diseaseStatus.isEmpty(); 948 } 949 950 /** 951 * @param value {@link #diseaseStatus} (The status of the disease or symptom for the indication.) 952 */ 953 public ClinicalUseDefinitionIndicationComponent setDiseaseStatus(CodeableReference value) { 954 this.diseaseStatus = value; 955 return this; 956 } 957 958 /** 959 * @return {@link #comorbidity} (A comorbidity (concurrent condition) or coinfection as part of the indication.) 960 */ 961 public List<CodeableReference> getComorbidity() { 962 if (this.comorbidity == null) 963 this.comorbidity = new ArrayList<CodeableReference>(); 964 return this.comorbidity; 965 } 966 967 /** 968 * @return Returns a reference to <code>this</code> for easy method chaining 969 */ 970 public ClinicalUseDefinitionIndicationComponent setComorbidity(List<CodeableReference> theComorbidity) { 971 this.comorbidity = theComorbidity; 972 return this; 973 } 974 975 public boolean hasComorbidity() { 976 if (this.comorbidity == null) 977 return false; 978 for (CodeableReference item : this.comorbidity) 979 if (!item.isEmpty()) 980 return true; 981 return false; 982 } 983 984 public CodeableReference addComorbidity() { //3 985 CodeableReference t = new CodeableReference(); 986 if (this.comorbidity == null) 987 this.comorbidity = new ArrayList<CodeableReference>(); 988 this.comorbidity.add(t); 989 return t; 990 } 991 992 public ClinicalUseDefinitionIndicationComponent addComorbidity(CodeableReference t) { //3 993 if (t == null) 994 return this; 995 if (this.comorbidity == null) 996 this.comorbidity = new ArrayList<CodeableReference>(); 997 this.comorbidity.add(t); 998 return this; 999 } 1000 1001 /** 1002 * @return The first repetition of repeating field {@link #comorbidity}, creating it if it does not already exist {3} 1003 */ 1004 public CodeableReference getComorbidityFirstRep() { 1005 if (getComorbidity().isEmpty()) { 1006 addComorbidity(); 1007 } 1008 return getComorbidity().get(0); 1009 } 1010 1011 /** 1012 * @return {@link #intendedEffect} (The intended effect, aim or strategy to be achieved.) 1013 */ 1014 public CodeableReference getIntendedEffect() { 1015 if (this.intendedEffect == null) 1016 if (Configuration.errorOnAutoCreate()) 1017 throw new Error("Attempt to auto-create ClinicalUseDefinitionIndicationComponent.intendedEffect"); 1018 else if (Configuration.doAutoCreate()) 1019 this.intendedEffect = new CodeableReference(); // cc 1020 return this.intendedEffect; 1021 } 1022 1023 public boolean hasIntendedEffect() { 1024 return this.intendedEffect != null && !this.intendedEffect.isEmpty(); 1025 } 1026 1027 /** 1028 * @param value {@link #intendedEffect} (The intended effect, aim or strategy to be achieved.) 1029 */ 1030 public ClinicalUseDefinitionIndicationComponent setIntendedEffect(CodeableReference value) { 1031 this.intendedEffect = value; 1032 return this; 1033 } 1034 1035 /** 1036 * @return {@link #duration} (Timing or duration information.) 1037 */ 1038 public Quantity getDuration() { 1039 if (this.duration == null) 1040 if (Configuration.errorOnAutoCreate()) 1041 throw new Error("Attempt to auto-create ClinicalUseDefinitionIndicationComponent.duration"); 1042 else if (Configuration.doAutoCreate()) 1043 this.duration = new Quantity(); // cc 1044 return this.duration; 1045 } 1046 1047 public boolean hasDuration() { 1048 return this.duration != null && !this.duration.isEmpty(); 1049 } 1050 1051 /** 1052 * @param value {@link #duration} (Timing or duration information.) 1053 */ 1054 public ClinicalUseDefinitionIndicationComponent setDuration(Quantity value) { 1055 this.duration = value; 1056 return this; 1057 } 1058 1059 /** 1060 * @return {@link #undesirableEffect} (The specific undesirable effects of the medicinal product.) 1061 */ 1062 public List<Reference> getUndesirableEffect() { 1063 if (this.undesirableEffect == null) 1064 this.undesirableEffect = new ArrayList<Reference>(); 1065 return this.undesirableEffect; 1066 } 1067 1068 /** 1069 * @return Returns a reference to <code>this</code> for easy method chaining 1070 */ 1071 public ClinicalUseDefinitionIndicationComponent setUndesirableEffect(List<Reference> theUndesirableEffect) { 1072 this.undesirableEffect = theUndesirableEffect; 1073 return this; 1074 } 1075 1076 public boolean hasUndesirableEffect() { 1077 if (this.undesirableEffect == null) 1078 return false; 1079 for (Reference item : this.undesirableEffect) 1080 if (!item.isEmpty()) 1081 return true; 1082 return false; 1083 } 1084 1085 public Reference addUndesirableEffect() { //3 1086 Reference t = new Reference(); 1087 if (this.undesirableEffect == null) 1088 this.undesirableEffect = new ArrayList<Reference>(); 1089 this.undesirableEffect.add(t); 1090 return t; 1091 } 1092 1093 public ClinicalUseDefinitionIndicationComponent addUndesirableEffect(Reference t) { //3 1094 if (t == null) 1095 return this; 1096 if (this.undesirableEffect == null) 1097 this.undesirableEffect = new ArrayList<Reference>(); 1098 this.undesirableEffect.add(t); 1099 return this; 1100 } 1101 1102 /** 1103 * @return The first repetition of repeating field {@link #undesirableEffect}, creating it if it does not already exist {3} 1104 */ 1105 public Reference getUndesirableEffectFirstRep() { 1106 if (getUndesirableEffect().isEmpty()) { 1107 addUndesirableEffect(); 1108 } 1109 return getUndesirableEffect().get(0); 1110 } 1111 1112 /** 1113 * @return {@link #otherTherapy} (Information about the use of the medicinal product in relation to other therapies described as part of the indication.) 1114 */ 1115 public List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> getOtherTherapy() { 1116 if (this.otherTherapy == null) 1117 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 1118 return this.otherTherapy; 1119 } 1120 1121 /** 1122 * @return Returns a reference to <code>this</code> for easy method chaining 1123 */ 1124 public ClinicalUseDefinitionIndicationComponent setOtherTherapy(List<ClinicalUseDefinitionContraindicationOtherTherapyComponent> theOtherTherapy) { 1125 this.otherTherapy = theOtherTherapy; 1126 return this; 1127 } 1128 1129 public boolean hasOtherTherapy() { 1130 if (this.otherTherapy == null) 1131 return false; 1132 for (ClinicalUseDefinitionContraindicationOtherTherapyComponent item : this.otherTherapy) 1133 if (!item.isEmpty()) 1134 return true; 1135 return false; 1136 } 1137 1138 public ClinicalUseDefinitionContraindicationOtherTherapyComponent addOtherTherapy() { //3 1139 ClinicalUseDefinitionContraindicationOtherTherapyComponent t = new ClinicalUseDefinitionContraindicationOtherTherapyComponent(); 1140 if (this.otherTherapy == null) 1141 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 1142 this.otherTherapy.add(t); 1143 return t; 1144 } 1145 1146 public ClinicalUseDefinitionIndicationComponent addOtherTherapy(ClinicalUseDefinitionContraindicationOtherTherapyComponent t) { //3 1147 if (t == null) 1148 return this; 1149 if (this.otherTherapy == null) 1150 this.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 1151 this.otherTherapy.add(t); 1152 return this; 1153 } 1154 1155 /** 1156 * @return The first repetition of repeating field {@link #otherTherapy}, creating it if it does not already exist {3} 1157 */ 1158 public ClinicalUseDefinitionContraindicationOtherTherapyComponent getOtherTherapyFirstRep() { 1159 if (getOtherTherapy().isEmpty()) { 1160 addOtherTherapy(); 1161 } 1162 return getOtherTherapy().get(0); 1163 } 1164 1165 protected void listChildren(List<Property> children) { 1166 super.listChildren(children); 1167 children.add(new Property("diseaseSymptomProcedure", "CodeableReference(ObservationDefinition)", "The situation that is being documented as an indicaton for this item.", 0, 1, diseaseSymptomProcedure)); 1168 children.add(new Property("diseaseStatus", "CodeableReference(ObservationDefinition)", "The status of the disease or symptom for the indication.", 0, 1, diseaseStatus)); 1169 children.add(new Property("comorbidity", "CodeableReference(ObservationDefinition)", "A comorbidity (concurrent condition) or coinfection as part of the indication.", 0, java.lang.Integer.MAX_VALUE, comorbidity)); 1170 children.add(new Property("intendedEffect", "CodeableReference(ObservationDefinition)", "The intended effect, aim or strategy to be achieved.", 0, 1, intendedEffect)); 1171 children.add(new Property("duration", "Quantity", "Timing or duration information.", 0, 1, duration)); 1172 children.add(new Property("undesirableEffect", "Reference(ClinicalUseDefinition)", "The specific undesirable effects of the medicinal product.", 0, java.lang.Integer.MAX_VALUE, undesirableEffect)); 1173 children.add(new Property("otherTherapy", "@ClinicalUseDefinition.contraindication.otherTherapy", "Information about the use of the medicinal product in relation to other therapies described as part of the indication.", 0, java.lang.Integer.MAX_VALUE, otherTherapy)); 1174 } 1175 1176 @Override 1177 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1178 switch (_hash) { 1179 case -1497395130: /*diseaseSymptomProcedure*/ return new Property("diseaseSymptomProcedure", "CodeableReference(ObservationDefinition)", "The situation that is being documented as an indicaton for this item.", 0, 1, diseaseSymptomProcedure); 1180 case -505503602: /*diseaseStatus*/ return new Property("diseaseStatus", "CodeableReference(ObservationDefinition)", "The status of the disease or symptom for the indication.", 0, 1, diseaseStatus); 1181 case -406395211: /*comorbidity*/ return new Property("comorbidity", "CodeableReference(ObservationDefinition)", "A comorbidity (concurrent condition) or coinfection as part of the indication.", 0, java.lang.Integer.MAX_VALUE, comorbidity); 1182 case 1587112348: /*intendedEffect*/ return new Property("intendedEffect", "CodeableReference(ObservationDefinition)", "The intended effect, aim or strategy to be achieved.", 0, 1, intendedEffect); 1183 case -1992012396: /*duration*/ return new Property("duration", "Quantity", "Timing or duration information.", 0, 1, duration); 1184 case 444367565: /*undesirableEffect*/ return new Property("undesirableEffect", "Reference(ClinicalUseDefinition)", "The specific undesirable effects of the medicinal product.", 0, java.lang.Integer.MAX_VALUE, undesirableEffect); 1185 case -544509127: /*otherTherapy*/ return new Property("otherTherapy", "@ClinicalUseDefinition.contraindication.otherTherapy", "Information about the use of the medicinal product in relation to other therapies described as part of the indication.", 0, java.lang.Integer.MAX_VALUE, otherTherapy); 1186 default: return super.getNamedProperty(_hash, _name, _checkValid); 1187 } 1188 1189 } 1190 1191 @Override 1192 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1193 switch (hash) { 1194 case -1497395130: /*diseaseSymptomProcedure*/ return this.diseaseSymptomProcedure == null ? new Base[0] : new Base[] {this.diseaseSymptomProcedure}; // CodeableReference 1195 case -505503602: /*diseaseStatus*/ return this.diseaseStatus == null ? new Base[0] : new Base[] {this.diseaseStatus}; // CodeableReference 1196 case -406395211: /*comorbidity*/ return this.comorbidity == null ? new Base[0] : this.comorbidity.toArray(new Base[this.comorbidity.size()]); // CodeableReference 1197 case 1587112348: /*intendedEffect*/ return this.intendedEffect == null ? new Base[0] : new Base[] {this.intendedEffect}; // CodeableReference 1198 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // Quantity 1199 case 444367565: /*undesirableEffect*/ return this.undesirableEffect == null ? new Base[0] : this.undesirableEffect.toArray(new Base[this.undesirableEffect.size()]); // Reference 1200 case -544509127: /*otherTherapy*/ return this.otherTherapy == null ? new Base[0] : this.otherTherapy.toArray(new Base[this.otherTherapy.size()]); // ClinicalUseDefinitionContraindicationOtherTherapyComponent 1201 default: return super.getProperty(hash, name, checkValid); 1202 } 1203 1204 } 1205 1206 @Override 1207 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1208 switch (hash) { 1209 case -1497395130: // diseaseSymptomProcedure 1210 this.diseaseSymptomProcedure = TypeConvertor.castToCodeableReference(value); // CodeableReference 1211 return value; 1212 case -505503602: // diseaseStatus 1213 this.diseaseStatus = TypeConvertor.castToCodeableReference(value); // CodeableReference 1214 return value; 1215 case -406395211: // comorbidity 1216 this.getComorbidity().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 1217 return value; 1218 case 1587112348: // intendedEffect 1219 this.intendedEffect = TypeConvertor.castToCodeableReference(value); // CodeableReference 1220 return value; 1221 case -1992012396: // duration 1222 this.duration = TypeConvertor.castToQuantity(value); // Quantity 1223 return value; 1224 case 444367565: // undesirableEffect 1225 this.getUndesirableEffect().add(TypeConvertor.castToReference(value)); // Reference 1226 return value; 1227 case -544509127: // otherTherapy 1228 this.getOtherTherapy().add((ClinicalUseDefinitionContraindicationOtherTherapyComponent) value); // ClinicalUseDefinitionContraindicationOtherTherapyComponent 1229 return value; 1230 default: return super.setProperty(hash, name, value); 1231 } 1232 1233 } 1234 1235 @Override 1236 public Base setProperty(String name, Base value) throws FHIRException { 1237 if (name.equals("diseaseSymptomProcedure")) { 1238 this.diseaseSymptomProcedure = TypeConvertor.castToCodeableReference(value); // CodeableReference 1239 } else if (name.equals("diseaseStatus")) { 1240 this.diseaseStatus = TypeConvertor.castToCodeableReference(value); // CodeableReference 1241 } else if (name.equals("comorbidity")) { 1242 this.getComorbidity().add(TypeConvertor.castToCodeableReference(value)); 1243 } else if (name.equals("intendedEffect")) { 1244 this.intendedEffect = TypeConvertor.castToCodeableReference(value); // CodeableReference 1245 } else if (name.equals("duration")) { 1246 this.duration = TypeConvertor.castToQuantity(value); // Quantity 1247 } else if (name.equals("undesirableEffect")) { 1248 this.getUndesirableEffect().add(TypeConvertor.castToReference(value)); 1249 } else if (name.equals("otherTherapy")) { 1250 this.getOtherTherapy().add((ClinicalUseDefinitionContraindicationOtherTherapyComponent) value); 1251 } else 1252 return super.setProperty(name, value); 1253 return value; 1254 } 1255 1256 @Override 1257 public Base makeProperty(int hash, String name) throws FHIRException { 1258 switch (hash) { 1259 case -1497395130: return getDiseaseSymptomProcedure(); 1260 case -505503602: return getDiseaseStatus(); 1261 case -406395211: return addComorbidity(); 1262 case 1587112348: return getIntendedEffect(); 1263 case -1992012396: return getDuration(); 1264 case 444367565: return addUndesirableEffect(); 1265 case -544509127: return addOtherTherapy(); 1266 default: return super.makeProperty(hash, name); 1267 } 1268 1269 } 1270 1271 @Override 1272 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1273 switch (hash) { 1274 case -1497395130: /*diseaseSymptomProcedure*/ return new String[] {"CodeableReference"}; 1275 case -505503602: /*diseaseStatus*/ return new String[] {"CodeableReference"}; 1276 case -406395211: /*comorbidity*/ return new String[] {"CodeableReference"}; 1277 case 1587112348: /*intendedEffect*/ return new String[] {"CodeableReference"}; 1278 case -1992012396: /*duration*/ return new String[] {"Quantity"}; 1279 case 444367565: /*undesirableEffect*/ return new String[] {"Reference"}; 1280 case -544509127: /*otherTherapy*/ return new String[] {"@ClinicalUseDefinition.contraindication.otherTherapy"}; 1281 default: return super.getTypesForProperty(hash, name); 1282 } 1283 1284 } 1285 1286 @Override 1287 public Base addChild(String name) throws FHIRException { 1288 if (name.equals("diseaseSymptomProcedure")) { 1289 this.diseaseSymptomProcedure = new CodeableReference(); 1290 return this.diseaseSymptomProcedure; 1291 } 1292 else if (name.equals("diseaseStatus")) { 1293 this.diseaseStatus = new CodeableReference(); 1294 return this.diseaseStatus; 1295 } 1296 else if (name.equals("comorbidity")) { 1297 return addComorbidity(); 1298 } 1299 else if (name.equals("intendedEffect")) { 1300 this.intendedEffect = new CodeableReference(); 1301 return this.intendedEffect; 1302 } 1303 else if (name.equals("duration")) { 1304 this.duration = new Quantity(); 1305 return this.duration; 1306 } 1307 else if (name.equals("undesirableEffect")) { 1308 return addUndesirableEffect(); 1309 } 1310 else if (name.equals("otherTherapy")) { 1311 return addOtherTherapy(); 1312 } 1313 else 1314 return super.addChild(name); 1315 } 1316 1317 public ClinicalUseDefinitionIndicationComponent copy() { 1318 ClinicalUseDefinitionIndicationComponent dst = new ClinicalUseDefinitionIndicationComponent(); 1319 copyValues(dst); 1320 return dst; 1321 } 1322 1323 public void copyValues(ClinicalUseDefinitionIndicationComponent dst) { 1324 super.copyValues(dst); 1325 dst.diseaseSymptomProcedure = diseaseSymptomProcedure == null ? null : diseaseSymptomProcedure.copy(); 1326 dst.diseaseStatus = diseaseStatus == null ? null : diseaseStatus.copy(); 1327 if (comorbidity != null) { 1328 dst.comorbidity = new ArrayList<CodeableReference>(); 1329 for (CodeableReference i : comorbidity) 1330 dst.comorbidity.add(i.copy()); 1331 }; 1332 dst.intendedEffect = intendedEffect == null ? null : intendedEffect.copy(); 1333 dst.duration = duration == null ? null : duration.copy(); 1334 if (undesirableEffect != null) { 1335 dst.undesirableEffect = new ArrayList<Reference>(); 1336 for (Reference i : undesirableEffect) 1337 dst.undesirableEffect.add(i.copy()); 1338 }; 1339 if (otherTherapy != null) { 1340 dst.otherTherapy = new ArrayList<ClinicalUseDefinitionContraindicationOtherTherapyComponent>(); 1341 for (ClinicalUseDefinitionContraindicationOtherTherapyComponent i : otherTherapy) 1342 dst.otherTherapy.add(i.copy()); 1343 }; 1344 } 1345 1346 @Override 1347 public boolean equalsDeep(Base other_) { 1348 if (!super.equalsDeep(other_)) 1349 return false; 1350 if (!(other_ instanceof ClinicalUseDefinitionIndicationComponent)) 1351 return false; 1352 ClinicalUseDefinitionIndicationComponent o = (ClinicalUseDefinitionIndicationComponent) other_; 1353 return compareDeep(diseaseSymptomProcedure, o.diseaseSymptomProcedure, true) && compareDeep(diseaseStatus, o.diseaseStatus, true) 1354 && compareDeep(comorbidity, o.comorbidity, true) && compareDeep(intendedEffect, o.intendedEffect, true) 1355 && compareDeep(duration, o.duration, true) && compareDeep(undesirableEffect, o.undesirableEffect, true) 1356 && compareDeep(otherTherapy, o.otherTherapy, true); 1357 } 1358 1359 @Override 1360 public boolean equalsShallow(Base other_) { 1361 if (!super.equalsShallow(other_)) 1362 return false; 1363 if (!(other_ instanceof ClinicalUseDefinitionIndicationComponent)) 1364 return false; 1365 ClinicalUseDefinitionIndicationComponent o = (ClinicalUseDefinitionIndicationComponent) other_; 1366 return true; 1367 } 1368 1369 public boolean isEmpty() { 1370 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(diseaseSymptomProcedure, diseaseStatus 1371 , comorbidity, intendedEffect, duration, undesirableEffect, otherTherapy); 1372 } 1373 1374 public String fhirType() { 1375 return "ClinicalUseDefinition.indication"; 1376 1377 } 1378 1379 } 1380 1381 @Block() 1382 public static class ClinicalUseDefinitionInteractionComponent extends BackboneElement implements IBaseBackboneElement { 1383 /** 1384 * The specific medication, food, substance or laboratory test that interacts. 1385 */ 1386 @Child(name = "interactant", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1387 @Description(shortDefinition="The specific medication, food, substance or laboratory test that interacts", formalDefinition="The specific medication, food, substance or laboratory test that interacts." ) 1388 protected List<ClinicalUseDefinitionInteractionInteractantComponent> interactant; 1389 1390 /** 1391 * The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction. 1392 */ 1393 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1394 @Description(shortDefinition="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction", formalDefinition="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction." ) 1395 protected CodeableConcept type; 1396 1397 /** 1398 * The effect of the interaction, for example "reduced gastric absorption of primary medication". 1399 */ 1400 @Child(name = "effect", type = {CodeableReference.class}, order=3, min=0, max=1, modifier=false, summary=true) 1401 @Description(shortDefinition="The effect of the interaction, for example \"reduced gastric absorption of primary medication\"", formalDefinition="The effect of the interaction, for example \"reduced gastric absorption of primary medication\"." ) 1402 protected CodeableReference effect; 1403 1404 /** 1405 * The incidence of the interaction, e.g. theoretical, observed. 1406 */ 1407 @Child(name = "incidence", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 1408 @Description(shortDefinition="The incidence of the interaction, e.g. theoretical, observed", formalDefinition="The incidence of the interaction, e.g. theoretical, observed." ) 1409 protected CodeableConcept incidence; 1410 1411 /** 1412 * Actions for managing the interaction. 1413 */ 1414 @Child(name = "management", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1415 @Description(shortDefinition="Actions for managing the interaction", formalDefinition="Actions for managing the interaction." ) 1416 protected List<CodeableConcept> management; 1417 1418 private static final long serialVersionUID = 2072955553L; 1419 1420 /** 1421 * Constructor 1422 */ 1423 public ClinicalUseDefinitionInteractionComponent() { 1424 super(); 1425 } 1426 1427 /** 1428 * @return {@link #interactant} (The specific medication, food, substance or laboratory test that interacts.) 1429 */ 1430 public List<ClinicalUseDefinitionInteractionInteractantComponent> getInteractant() { 1431 if (this.interactant == null) 1432 this.interactant = new ArrayList<ClinicalUseDefinitionInteractionInteractantComponent>(); 1433 return this.interactant; 1434 } 1435 1436 /** 1437 * @return Returns a reference to <code>this</code> for easy method chaining 1438 */ 1439 public ClinicalUseDefinitionInteractionComponent setInteractant(List<ClinicalUseDefinitionInteractionInteractantComponent> theInteractant) { 1440 this.interactant = theInteractant; 1441 return this; 1442 } 1443 1444 public boolean hasInteractant() { 1445 if (this.interactant == null) 1446 return false; 1447 for (ClinicalUseDefinitionInteractionInteractantComponent item : this.interactant) 1448 if (!item.isEmpty()) 1449 return true; 1450 return false; 1451 } 1452 1453 public ClinicalUseDefinitionInteractionInteractantComponent addInteractant() { //3 1454 ClinicalUseDefinitionInteractionInteractantComponent t = new ClinicalUseDefinitionInteractionInteractantComponent(); 1455 if (this.interactant == null) 1456 this.interactant = new ArrayList<ClinicalUseDefinitionInteractionInteractantComponent>(); 1457 this.interactant.add(t); 1458 return t; 1459 } 1460 1461 public ClinicalUseDefinitionInteractionComponent addInteractant(ClinicalUseDefinitionInteractionInteractantComponent t) { //3 1462 if (t == null) 1463 return this; 1464 if (this.interactant == null) 1465 this.interactant = new ArrayList<ClinicalUseDefinitionInteractionInteractantComponent>(); 1466 this.interactant.add(t); 1467 return this; 1468 } 1469 1470 /** 1471 * @return The first repetition of repeating field {@link #interactant}, creating it if it does not already exist {3} 1472 */ 1473 public ClinicalUseDefinitionInteractionInteractantComponent getInteractantFirstRep() { 1474 if (getInteractant().isEmpty()) { 1475 addInteractant(); 1476 } 1477 return getInteractant().get(0); 1478 } 1479 1480 /** 1481 * @return {@link #type} (The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.) 1482 */ 1483 public CodeableConcept getType() { 1484 if (this.type == null) 1485 if (Configuration.errorOnAutoCreate()) 1486 throw new Error("Attempt to auto-create ClinicalUseDefinitionInteractionComponent.type"); 1487 else if (Configuration.doAutoCreate()) 1488 this.type = new CodeableConcept(); // cc 1489 return this.type; 1490 } 1491 1492 public boolean hasType() { 1493 return this.type != null && !this.type.isEmpty(); 1494 } 1495 1496 /** 1497 * @param value {@link #type} (The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.) 1498 */ 1499 public ClinicalUseDefinitionInteractionComponent setType(CodeableConcept value) { 1500 this.type = value; 1501 return this; 1502 } 1503 1504 /** 1505 * @return {@link #effect} (The effect of the interaction, for example "reduced gastric absorption of primary medication".) 1506 */ 1507 public CodeableReference getEffect() { 1508 if (this.effect == null) 1509 if (Configuration.errorOnAutoCreate()) 1510 throw new Error("Attempt to auto-create ClinicalUseDefinitionInteractionComponent.effect"); 1511 else if (Configuration.doAutoCreate()) 1512 this.effect = new CodeableReference(); // cc 1513 return this.effect; 1514 } 1515 1516 public boolean hasEffect() { 1517 return this.effect != null && !this.effect.isEmpty(); 1518 } 1519 1520 /** 1521 * @param value {@link #effect} (The effect of the interaction, for example "reduced gastric absorption of primary medication".) 1522 */ 1523 public ClinicalUseDefinitionInteractionComponent setEffect(CodeableReference value) { 1524 this.effect = value; 1525 return this; 1526 } 1527 1528 /** 1529 * @return {@link #incidence} (The incidence of the interaction, e.g. theoretical, observed.) 1530 */ 1531 public CodeableConcept getIncidence() { 1532 if (this.incidence == null) 1533 if (Configuration.errorOnAutoCreate()) 1534 throw new Error("Attempt to auto-create ClinicalUseDefinitionInteractionComponent.incidence"); 1535 else if (Configuration.doAutoCreate()) 1536 this.incidence = new CodeableConcept(); // cc 1537 return this.incidence; 1538 } 1539 1540 public boolean hasIncidence() { 1541 return this.incidence != null && !this.incidence.isEmpty(); 1542 } 1543 1544 /** 1545 * @param value {@link #incidence} (The incidence of the interaction, e.g. theoretical, observed.) 1546 */ 1547 public ClinicalUseDefinitionInteractionComponent setIncidence(CodeableConcept value) { 1548 this.incidence = value; 1549 return this; 1550 } 1551 1552 /** 1553 * @return {@link #management} (Actions for managing the interaction.) 1554 */ 1555 public List<CodeableConcept> getManagement() { 1556 if (this.management == null) 1557 this.management = new ArrayList<CodeableConcept>(); 1558 return this.management; 1559 } 1560 1561 /** 1562 * @return Returns a reference to <code>this</code> for easy method chaining 1563 */ 1564 public ClinicalUseDefinitionInteractionComponent setManagement(List<CodeableConcept> theManagement) { 1565 this.management = theManagement; 1566 return this; 1567 } 1568 1569 public boolean hasManagement() { 1570 if (this.management == null) 1571 return false; 1572 for (CodeableConcept item : this.management) 1573 if (!item.isEmpty()) 1574 return true; 1575 return false; 1576 } 1577 1578 public CodeableConcept addManagement() { //3 1579 CodeableConcept t = new CodeableConcept(); 1580 if (this.management == null) 1581 this.management = new ArrayList<CodeableConcept>(); 1582 this.management.add(t); 1583 return t; 1584 } 1585 1586 public ClinicalUseDefinitionInteractionComponent addManagement(CodeableConcept t) { //3 1587 if (t == null) 1588 return this; 1589 if (this.management == null) 1590 this.management = new ArrayList<CodeableConcept>(); 1591 this.management.add(t); 1592 return this; 1593 } 1594 1595 /** 1596 * @return The first repetition of repeating field {@link #management}, creating it if it does not already exist {3} 1597 */ 1598 public CodeableConcept getManagementFirstRep() { 1599 if (getManagement().isEmpty()) { 1600 addManagement(); 1601 } 1602 return getManagement().get(0); 1603 } 1604 1605 protected void listChildren(List<Property> children) { 1606 super.listChildren(children); 1607 children.add(new Property("interactant", "", "The specific medication, food, substance or laboratory test that interacts.", 0, java.lang.Integer.MAX_VALUE, interactant)); 1608 children.add(new Property("type", "CodeableConcept", "The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.", 0, 1, type)); 1609 children.add(new Property("effect", "CodeableReference(ObservationDefinition)", "The effect of the interaction, for example \"reduced gastric absorption of primary medication\".", 0, 1, effect)); 1610 children.add(new Property("incidence", "CodeableConcept", "The incidence of the interaction, e.g. theoretical, observed.", 0, 1, incidence)); 1611 children.add(new Property("management", "CodeableConcept", "Actions for managing the interaction.", 0, java.lang.Integer.MAX_VALUE, management)); 1612 } 1613 1614 @Override 1615 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1616 switch (_hash) { 1617 case 1844097009: /*interactant*/ return new Property("interactant", "", "The specific medication, food, substance or laboratory test that interacts.", 0, java.lang.Integer.MAX_VALUE, interactant); 1618 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.", 0, 1, type); 1619 case -1306084975: /*effect*/ return new Property("effect", "CodeableReference(ObservationDefinition)", "The effect of the interaction, for example \"reduced gastric absorption of primary medication\".", 0, 1, effect); 1620 case -1598467132: /*incidence*/ return new Property("incidence", "CodeableConcept", "The incidence of the interaction, e.g. theoretical, observed.", 0, 1, incidence); 1621 case -1799980989: /*management*/ return new Property("management", "CodeableConcept", "Actions for managing the interaction.", 0, java.lang.Integer.MAX_VALUE, management); 1622 default: return super.getNamedProperty(_hash, _name, _checkValid); 1623 } 1624 1625 } 1626 1627 @Override 1628 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1629 switch (hash) { 1630 case 1844097009: /*interactant*/ return this.interactant == null ? new Base[0] : this.interactant.toArray(new Base[this.interactant.size()]); // ClinicalUseDefinitionInteractionInteractantComponent 1631 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1632 case -1306084975: /*effect*/ return this.effect == null ? new Base[0] : new Base[] {this.effect}; // CodeableReference 1633 case -1598467132: /*incidence*/ return this.incidence == null ? new Base[0] : new Base[] {this.incidence}; // CodeableConcept 1634 case -1799980989: /*management*/ return this.management == null ? new Base[0] : this.management.toArray(new Base[this.management.size()]); // CodeableConcept 1635 default: return super.getProperty(hash, name, checkValid); 1636 } 1637 1638 } 1639 1640 @Override 1641 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1642 switch (hash) { 1643 case 1844097009: // interactant 1644 this.getInteractant().add((ClinicalUseDefinitionInteractionInteractantComponent) value); // ClinicalUseDefinitionInteractionInteractantComponent 1645 return value; 1646 case 3575610: // type 1647 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1648 return value; 1649 case -1306084975: // effect 1650 this.effect = TypeConvertor.castToCodeableReference(value); // CodeableReference 1651 return value; 1652 case -1598467132: // incidence 1653 this.incidence = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1654 return value; 1655 case -1799980989: // management 1656 this.getManagement().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1657 return value; 1658 default: return super.setProperty(hash, name, value); 1659 } 1660 1661 } 1662 1663 @Override 1664 public Base setProperty(String name, Base value) throws FHIRException { 1665 if (name.equals("interactant")) { 1666 this.getInteractant().add((ClinicalUseDefinitionInteractionInteractantComponent) value); 1667 } else if (name.equals("type")) { 1668 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1669 } else if (name.equals("effect")) { 1670 this.effect = TypeConvertor.castToCodeableReference(value); // CodeableReference 1671 } else if (name.equals("incidence")) { 1672 this.incidence = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1673 } else if (name.equals("management")) { 1674 this.getManagement().add(TypeConvertor.castToCodeableConcept(value)); 1675 } else 1676 return super.setProperty(name, value); 1677 return value; 1678 } 1679 1680 @Override 1681 public Base makeProperty(int hash, String name) throws FHIRException { 1682 switch (hash) { 1683 case 1844097009: return addInteractant(); 1684 case 3575610: return getType(); 1685 case -1306084975: return getEffect(); 1686 case -1598467132: return getIncidence(); 1687 case -1799980989: return addManagement(); 1688 default: return super.makeProperty(hash, name); 1689 } 1690 1691 } 1692 1693 @Override 1694 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1695 switch (hash) { 1696 case 1844097009: /*interactant*/ return new String[] {}; 1697 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1698 case -1306084975: /*effect*/ return new String[] {"CodeableReference"}; 1699 case -1598467132: /*incidence*/ return new String[] {"CodeableConcept"}; 1700 case -1799980989: /*management*/ return new String[] {"CodeableConcept"}; 1701 default: return super.getTypesForProperty(hash, name); 1702 } 1703 1704 } 1705 1706 @Override 1707 public Base addChild(String name) throws FHIRException { 1708 if (name.equals("interactant")) { 1709 return addInteractant(); 1710 } 1711 else if (name.equals("type")) { 1712 this.type = new CodeableConcept(); 1713 return this.type; 1714 } 1715 else if (name.equals("effect")) { 1716 this.effect = new CodeableReference(); 1717 return this.effect; 1718 } 1719 else if (name.equals("incidence")) { 1720 this.incidence = new CodeableConcept(); 1721 return this.incidence; 1722 } 1723 else if (name.equals("management")) { 1724 return addManagement(); 1725 } 1726 else 1727 return super.addChild(name); 1728 } 1729 1730 public ClinicalUseDefinitionInteractionComponent copy() { 1731 ClinicalUseDefinitionInteractionComponent dst = new ClinicalUseDefinitionInteractionComponent(); 1732 copyValues(dst); 1733 return dst; 1734 } 1735 1736 public void copyValues(ClinicalUseDefinitionInteractionComponent dst) { 1737 super.copyValues(dst); 1738 if (interactant != null) { 1739 dst.interactant = new ArrayList<ClinicalUseDefinitionInteractionInteractantComponent>(); 1740 for (ClinicalUseDefinitionInteractionInteractantComponent i : interactant) 1741 dst.interactant.add(i.copy()); 1742 }; 1743 dst.type = type == null ? null : type.copy(); 1744 dst.effect = effect == null ? null : effect.copy(); 1745 dst.incidence = incidence == null ? null : incidence.copy(); 1746 if (management != null) { 1747 dst.management = new ArrayList<CodeableConcept>(); 1748 for (CodeableConcept i : management) 1749 dst.management.add(i.copy()); 1750 }; 1751 } 1752 1753 @Override 1754 public boolean equalsDeep(Base other_) { 1755 if (!super.equalsDeep(other_)) 1756 return false; 1757 if (!(other_ instanceof ClinicalUseDefinitionInteractionComponent)) 1758 return false; 1759 ClinicalUseDefinitionInteractionComponent o = (ClinicalUseDefinitionInteractionComponent) other_; 1760 return compareDeep(interactant, o.interactant, true) && compareDeep(type, o.type, true) && compareDeep(effect, o.effect, true) 1761 && compareDeep(incidence, o.incidence, true) && compareDeep(management, o.management, true); 1762 } 1763 1764 @Override 1765 public boolean equalsShallow(Base other_) { 1766 if (!super.equalsShallow(other_)) 1767 return false; 1768 if (!(other_ instanceof ClinicalUseDefinitionInteractionComponent)) 1769 return false; 1770 ClinicalUseDefinitionInteractionComponent o = (ClinicalUseDefinitionInteractionComponent) other_; 1771 return true; 1772 } 1773 1774 public boolean isEmpty() { 1775 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(interactant, type, effect 1776 , incidence, management); 1777 } 1778 1779 public String fhirType() { 1780 return "ClinicalUseDefinition.interaction"; 1781 1782 } 1783 1784 } 1785 1786 @Block() 1787 public static class ClinicalUseDefinitionInteractionInteractantComponent extends BackboneElement implements IBaseBackboneElement { 1788 /** 1789 * The specific medication, food or laboratory test that interacts. 1790 */ 1791 @Child(name = "item", type = {MedicinalProductDefinition.class, Medication.class, Substance.class, ObservationDefinition.class, CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 1792 @Description(shortDefinition="The specific medication, food or laboratory test that interacts", formalDefinition="The specific medication, food or laboratory test that interacts." ) 1793 protected DataType item; 1794 1795 private static final long serialVersionUID = 1847936859L; 1796 1797 /** 1798 * Constructor 1799 */ 1800 public ClinicalUseDefinitionInteractionInteractantComponent() { 1801 super(); 1802 } 1803 1804 /** 1805 * Constructor 1806 */ 1807 public ClinicalUseDefinitionInteractionInteractantComponent(DataType item) { 1808 super(); 1809 this.setItem(item); 1810 } 1811 1812 /** 1813 * @return {@link #item} (The specific medication, food or laboratory test that interacts.) 1814 */ 1815 public DataType getItem() { 1816 return this.item; 1817 } 1818 1819 /** 1820 * @return {@link #item} (The specific medication, food or laboratory test that interacts.) 1821 */ 1822 public Reference getItemReference() throws FHIRException { 1823 if (this.item == null) 1824 this.item = new Reference(); 1825 if (!(this.item instanceof Reference)) 1826 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered"); 1827 return (Reference) this.item; 1828 } 1829 1830 public boolean hasItemReference() { 1831 return this != null && this.item instanceof Reference; 1832 } 1833 1834 /** 1835 * @return {@link #item} (The specific medication, food or laboratory test that interacts.) 1836 */ 1837 public CodeableConcept getItemCodeableConcept() throws FHIRException { 1838 if (this.item == null) 1839 this.item = new CodeableConcept(); 1840 if (!(this.item instanceof CodeableConcept)) 1841 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered"); 1842 return (CodeableConcept) this.item; 1843 } 1844 1845 public boolean hasItemCodeableConcept() { 1846 return this != null && this.item instanceof CodeableConcept; 1847 } 1848 1849 public boolean hasItem() { 1850 return this.item != null && !this.item.isEmpty(); 1851 } 1852 1853 /** 1854 * @param value {@link #item} (The specific medication, food or laboratory test that interacts.) 1855 */ 1856 public ClinicalUseDefinitionInteractionInteractantComponent setItem(DataType value) { 1857 if (value != null && !(value instanceof Reference || value instanceof CodeableConcept)) 1858 throw new Error("Not the right type for ClinicalUseDefinition.interaction.interactant.item[x]: "+value.fhirType()); 1859 this.item = value; 1860 return this; 1861 } 1862 1863 protected void listChildren(List<Property> children) { 1864 super.listChildren(children); 1865 children.add(new Property("item[x]", "Reference(MedicinalProductDefinition|Medication|Substance|ObservationDefinition)|CodeableConcept", "The specific medication, food or laboratory test that interacts.", 0, 1, item)); 1866 } 1867 1868 @Override 1869 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1870 switch (_hash) { 1871 case 2116201613: /*item[x]*/ return new Property("item[x]", "Reference(MedicinalProductDefinition|Medication|Substance|ObservationDefinition)|CodeableConcept", "The specific medication, food or laboratory test that interacts.", 0, 1, item); 1872 case 3242771: /*item*/ return new Property("item[x]", "Reference(MedicinalProductDefinition|Medication|Substance|ObservationDefinition)|CodeableConcept", "The specific medication, food or laboratory test that interacts.", 0, 1, item); 1873 case 1376364920: /*itemReference*/ return new Property("item[x]", "Reference(MedicinalProductDefinition|Medication|Substance|ObservationDefinition)", "The specific medication, food or laboratory test that interacts.", 0, 1, item); 1874 case 106644494: /*itemCodeableConcept*/ return new Property("item[x]", "CodeableConcept", "The specific medication, food or laboratory test that interacts.", 0, 1, item); 1875 default: return super.getNamedProperty(_hash, _name, _checkValid); 1876 } 1877 1878 } 1879 1880 @Override 1881 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1882 switch (hash) { 1883 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // DataType 1884 default: return super.getProperty(hash, name, checkValid); 1885 } 1886 1887 } 1888 1889 @Override 1890 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1891 switch (hash) { 1892 case 3242771: // item 1893 this.item = TypeConvertor.castToType(value); // DataType 1894 return value; 1895 default: return super.setProperty(hash, name, value); 1896 } 1897 1898 } 1899 1900 @Override 1901 public Base setProperty(String name, Base value) throws FHIRException { 1902 if (name.equals("item[x]")) { 1903 this.item = TypeConvertor.castToType(value); // DataType 1904 } else 1905 return super.setProperty(name, value); 1906 return value; 1907 } 1908 1909 @Override 1910 public Base makeProperty(int hash, String name) throws FHIRException { 1911 switch (hash) { 1912 case 2116201613: return getItem(); 1913 case 3242771: return getItem(); 1914 default: return super.makeProperty(hash, name); 1915 } 1916 1917 } 1918 1919 @Override 1920 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1921 switch (hash) { 1922 case 3242771: /*item*/ return new String[] {"Reference", "CodeableConcept"}; 1923 default: return super.getTypesForProperty(hash, name); 1924 } 1925 1926 } 1927 1928 @Override 1929 public Base addChild(String name) throws FHIRException { 1930 if (name.equals("itemReference")) { 1931 this.item = new Reference(); 1932 return this.item; 1933 } 1934 else if (name.equals("itemCodeableConcept")) { 1935 this.item = new CodeableConcept(); 1936 return this.item; 1937 } 1938 else 1939 return super.addChild(name); 1940 } 1941 1942 public ClinicalUseDefinitionInteractionInteractantComponent copy() { 1943 ClinicalUseDefinitionInteractionInteractantComponent dst = new ClinicalUseDefinitionInteractionInteractantComponent(); 1944 copyValues(dst); 1945 return dst; 1946 } 1947 1948 public void copyValues(ClinicalUseDefinitionInteractionInteractantComponent dst) { 1949 super.copyValues(dst); 1950 dst.item = item == null ? null : item.copy(); 1951 } 1952 1953 @Override 1954 public boolean equalsDeep(Base other_) { 1955 if (!super.equalsDeep(other_)) 1956 return false; 1957 if (!(other_ instanceof ClinicalUseDefinitionInteractionInteractantComponent)) 1958 return false; 1959 ClinicalUseDefinitionInteractionInteractantComponent o = (ClinicalUseDefinitionInteractionInteractantComponent) other_; 1960 return compareDeep(item, o.item, true); 1961 } 1962 1963 @Override 1964 public boolean equalsShallow(Base other_) { 1965 if (!super.equalsShallow(other_)) 1966 return false; 1967 if (!(other_ instanceof ClinicalUseDefinitionInteractionInteractantComponent)) 1968 return false; 1969 ClinicalUseDefinitionInteractionInteractantComponent o = (ClinicalUseDefinitionInteractionInteractantComponent) other_; 1970 return true; 1971 } 1972 1973 public boolean isEmpty() { 1974 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item); 1975 } 1976 1977 public String fhirType() { 1978 return "ClinicalUseDefinition.interaction.interactant"; 1979 1980 } 1981 1982 } 1983 1984 @Block() 1985 public static class ClinicalUseDefinitionUndesirableEffectComponent extends BackboneElement implements IBaseBackboneElement { 1986 /** 1987 * The situation in which the undesirable effect may manifest. 1988 */ 1989 @Child(name = "symptomConditionEffect", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 1990 @Description(shortDefinition="The situation in which the undesirable effect may manifest", formalDefinition="The situation in which the undesirable effect may manifest." ) 1991 protected CodeableReference symptomConditionEffect; 1992 1993 /** 1994 * High level classification of the effect. 1995 */ 1996 @Child(name = "classification", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1997 @Description(shortDefinition="High level classification of the effect", formalDefinition="High level classification of the effect." ) 1998 protected CodeableConcept classification; 1999 2000 /** 2001 * How often the effect is seen. 2002 */ 2003 @Child(name = "frequencyOfOccurrence", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 2004 @Description(shortDefinition="How often the effect is seen", formalDefinition="How often the effect is seen." ) 2005 protected CodeableConcept frequencyOfOccurrence; 2006 2007 private static final long serialVersionUID = -55472609L; 2008 2009 /** 2010 * Constructor 2011 */ 2012 public ClinicalUseDefinitionUndesirableEffectComponent() { 2013 super(); 2014 } 2015 2016 /** 2017 * @return {@link #symptomConditionEffect} (The situation in which the undesirable effect may manifest.) 2018 */ 2019 public CodeableReference getSymptomConditionEffect() { 2020 if (this.symptomConditionEffect == null) 2021 if (Configuration.errorOnAutoCreate()) 2022 throw new Error("Attempt to auto-create ClinicalUseDefinitionUndesirableEffectComponent.symptomConditionEffect"); 2023 else if (Configuration.doAutoCreate()) 2024 this.symptomConditionEffect = new CodeableReference(); // cc 2025 return this.symptomConditionEffect; 2026 } 2027 2028 public boolean hasSymptomConditionEffect() { 2029 return this.symptomConditionEffect != null && !this.symptomConditionEffect.isEmpty(); 2030 } 2031 2032 /** 2033 * @param value {@link #symptomConditionEffect} (The situation in which the undesirable effect may manifest.) 2034 */ 2035 public ClinicalUseDefinitionUndesirableEffectComponent setSymptomConditionEffect(CodeableReference value) { 2036 this.symptomConditionEffect = value; 2037 return this; 2038 } 2039 2040 /** 2041 * @return {@link #classification} (High level classification of the effect.) 2042 */ 2043 public CodeableConcept getClassification() { 2044 if (this.classification == null) 2045 if (Configuration.errorOnAutoCreate()) 2046 throw new Error("Attempt to auto-create ClinicalUseDefinitionUndesirableEffectComponent.classification"); 2047 else if (Configuration.doAutoCreate()) 2048 this.classification = new CodeableConcept(); // cc 2049 return this.classification; 2050 } 2051 2052 public boolean hasClassification() { 2053 return this.classification != null && !this.classification.isEmpty(); 2054 } 2055 2056 /** 2057 * @param value {@link #classification} (High level classification of the effect.) 2058 */ 2059 public ClinicalUseDefinitionUndesirableEffectComponent setClassification(CodeableConcept value) { 2060 this.classification = value; 2061 return this; 2062 } 2063 2064 /** 2065 * @return {@link #frequencyOfOccurrence} (How often the effect is seen.) 2066 */ 2067 public CodeableConcept getFrequencyOfOccurrence() { 2068 if (this.frequencyOfOccurrence == null) 2069 if (Configuration.errorOnAutoCreate()) 2070 throw new Error("Attempt to auto-create ClinicalUseDefinitionUndesirableEffectComponent.frequencyOfOccurrence"); 2071 else if (Configuration.doAutoCreate()) 2072 this.frequencyOfOccurrence = new CodeableConcept(); // cc 2073 return this.frequencyOfOccurrence; 2074 } 2075 2076 public boolean hasFrequencyOfOccurrence() { 2077 return this.frequencyOfOccurrence != null && !this.frequencyOfOccurrence.isEmpty(); 2078 } 2079 2080 /** 2081 * @param value {@link #frequencyOfOccurrence} (How often the effect is seen.) 2082 */ 2083 public ClinicalUseDefinitionUndesirableEffectComponent setFrequencyOfOccurrence(CodeableConcept value) { 2084 this.frequencyOfOccurrence = value; 2085 return this; 2086 } 2087 2088 protected void listChildren(List<Property> children) { 2089 super.listChildren(children); 2090 children.add(new Property("symptomConditionEffect", "CodeableReference(ObservationDefinition)", "The situation in which the undesirable effect may manifest.", 0, 1, symptomConditionEffect)); 2091 children.add(new Property("classification", "CodeableConcept", "High level classification of the effect.", 0, 1, classification)); 2092 children.add(new Property("frequencyOfOccurrence", "CodeableConcept", "How often the effect is seen.", 0, 1, frequencyOfOccurrence)); 2093 } 2094 2095 @Override 2096 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2097 switch (_hash) { 2098 case -650549981: /*symptomConditionEffect*/ return new Property("symptomConditionEffect", "CodeableReference(ObservationDefinition)", "The situation in which the undesirable effect may manifest.", 0, 1, symptomConditionEffect); 2099 case 382350310: /*classification*/ return new Property("classification", "CodeableConcept", "High level classification of the effect.", 0, 1, classification); 2100 case 791175812: /*frequencyOfOccurrence*/ return new Property("frequencyOfOccurrence", "CodeableConcept", "How often the effect is seen.", 0, 1, frequencyOfOccurrence); 2101 default: return super.getNamedProperty(_hash, _name, _checkValid); 2102 } 2103 2104 } 2105 2106 @Override 2107 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2108 switch (hash) { 2109 case -650549981: /*symptomConditionEffect*/ return this.symptomConditionEffect == null ? new Base[0] : new Base[] {this.symptomConditionEffect}; // CodeableReference 2110 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : new Base[] {this.classification}; // CodeableConcept 2111 case 791175812: /*frequencyOfOccurrence*/ return this.frequencyOfOccurrence == null ? new Base[0] : new Base[] {this.frequencyOfOccurrence}; // CodeableConcept 2112 default: return super.getProperty(hash, name, checkValid); 2113 } 2114 2115 } 2116 2117 @Override 2118 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2119 switch (hash) { 2120 case -650549981: // symptomConditionEffect 2121 this.symptomConditionEffect = TypeConvertor.castToCodeableReference(value); // CodeableReference 2122 return value; 2123 case 382350310: // classification 2124 this.classification = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2125 return value; 2126 case 791175812: // frequencyOfOccurrence 2127 this.frequencyOfOccurrence = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2128 return value; 2129 default: return super.setProperty(hash, name, value); 2130 } 2131 2132 } 2133 2134 @Override 2135 public Base setProperty(String name, Base value) throws FHIRException { 2136 if (name.equals("symptomConditionEffect")) { 2137 this.symptomConditionEffect = TypeConvertor.castToCodeableReference(value); // CodeableReference 2138 } else if (name.equals("classification")) { 2139 this.classification = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2140 } else if (name.equals("frequencyOfOccurrence")) { 2141 this.frequencyOfOccurrence = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2142 } else 2143 return super.setProperty(name, value); 2144 return value; 2145 } 2146 2147 @Override 2148 public Base makeProperty(int hash, String name) throws FHIRException { 2149 switch (hash) { 2150 case -650549981: return getSymptomConditionEffect(); 2151 case 382350310: return getClassification(); 2152 case 791175812: return getFrequencyOfOccurrence(); 2153 default: return super.makeProperty(hash, name); 2154 } 2155 2156 } 2157 2158 @Override 2159 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2160 switch (hash) { 2161 case -650549981: /*symptomConditionEffect*/ return new String[] {"CodeableReference"}; 2162 case 382350310: /*classification*/ return new String[] {"CodeableConcept"}; 2163 case 791175812: /*frequencyOfOccurrence*/ return new String[] {"CodeableConcept"}; 2164 default: return super.getTypesForProperty(hash, name); 2165 } 2166 2167 } 2168 2169 @Override 2170 public Base addChild(String name) throws FHIRException { 2171 if (name.equals("symptomConditionEffect")) { 2172 this.symptomConditionEffect = new CodeableReference(); 2173 return this.symptomConditionEffect; 2174 } 2175 else if (name.equals("classification")) { 2176 this.classification = new CodeableConcept(); 2177 return this.classification; 2178 } 2179 else if (name.equals("frequencyOfOccurrence")) { 2180 this.frequencyOfOccurrence = new CodeableConcept(); 2181 return this.frequencyOfOccurrence; 2182 } 2183 else 2184 return super.addChild(name); 2185 } 2186 2187 public ClinicalUseDefinitionUndesirableEffectComponent copy() { 2188 ClinicalUseDefinitionUndesirableEffectComponent dst = new ClinicalUseDefinitionUndesirableEffectComponent(); 2189 copyValues(dst); 2190 return dst; 2191 } 2192 2193 public void copyValues(ClinicalUseDefinitionUndesirableEffectComponent dst) { 2194 super.copyValues(dst); 2195 dst.symptomConditionEffect = symptomConditionEffect == null ? null : symptomConditionEffect.copy(); 2196 dst.classification = classification == null ? null : classification.copy(); 2197 dst.frequencyOfOccurrence = frequencyOfOccurrence == null ? null : frequencyOfOccurrence.copy(); 2198 } 2199 2200 @Override 2201 public boolean equalsDeep(Base other_) { 2202 if (!super.equalsDeep(other_)) 2203 return false; 2204 if (!(other_ instanceof ClinicalUseDefinitionUndesirableEffectComponent)) 2205 return false; 2206 ClinicalUseDefinitionUndesirableEffectComponent o = (ClinicalUseDefinitionUndesirableEffectComponent) other_; 2207 return compareDeep(symptomConditionEffect, o.symptomConditionEffect, true) && compareDeep(classification, o.classification, true) 2208 && compareDeep(frequencyOfOccurrence, o.frequencyOfOccurrence, true); 2209 } 2210 2211 @Override 2212 public boolean equalsShallow(Base other_) { 2213 if (!super.equalsShallow(other_)) 2214 return false; 2215 if (!(other_ instanceof ClinicalUseDefinitionUndesirableEffectComponent)) 2216 return false; 2217 ClinicalUseDefinitionUndesirableEffectComponent o = (ClinicalUseDefinitionUndesirableEffectComponent) other_; 2218 return true; 2219 } 2220 2221 public boolean isEmpty() { 2222 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(symptomConditionEffect, classification 2223 , frequencyOfOccurrence); 2224 } 2225 2226 public String fhirType() { 2227 return "ClinicalUseDefinition.undesirableEffect"; 2228 2229 } 2230 2231 } 2232 2233 @Block() 2234 public static class ClinicalUseDefinitionWarningComponent extends BackboneElement implements IBaseBackboneElement { 2235 /** 2236 * A textual definition of this warning, with formatting. 2237 */ 2238 @Child(name = "description", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=true) 2239 @Description(shortDefinition="A textual definition of this warning, with formatting", formalDefinition="A textual definition of this warning, with formatting." ) 2240 protected MarkdownType description; 2241 2242 /** 2243 * A coded or unformatted textual definition of this warning. 2244 */ 2245 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 2246 @Description(shortDefinition="A coded or unformatted textual definition of this warning", formalDefinition="A coded or unformatted textual definition of this warning." ) 2247 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/warning-type") 2248 protected CodeableConcept code; 2249 2250 private static final long serialVersionUID = 213710553L; 2251 2252 /** 2253 * Constructor 2254 */ 2255 public ClinicalUseDefinitionWarningComponent() { 2256 super(); 2257 } 2258 2259 /** 2260 * @return {@link #description} (A textual definition of this warning, with formatting.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2261 */ 2262 public MarkdownType getDescriptionElement() { 2263 if (this.description == null) 2264 if (Configuration.errorOnAutoCreate()) 2265 throw new Error("Attempt to auto-create ClinicalUseDefinitionWarningComponent.description"); 2266 else if (Configuration.doAutoCreate()) 2267 this.description = new MarkdownType(); // bb 2268 return this.description; 2269 } 2270 2271 public boolean hasDescriptionElement() { 2272 return this.description != null && !this.description.isEmpty(); 2273 } 2274 2275 public boolean hasDescription() { 2276 return this.description != null && !this.description.isEmpty(); 2277 } 2278 2279 /** 2280 * @param value {@link #description} (A textual definition of this warning, with formatting.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2281 */ 2282 public ClinicalUseDefinitionWarningComponent setDescriptionElement(MarkdownType value) { 2283 this.description = value; 2284 return this; 2285 } 2286 2287 /** 2288 * @return A textual definition of this warning, with formatting. 2289 */ 2290 public String getDescription() { 2291 return this.description == null ? null : this.description.getValue(); 2292 } 2293 2294 /** 2295 * @param value A textual definition of this warning, with formatting. 2296 */ 2297 public ClinicalUseDefinitionWarningComponent setDescription(String value) { 2298 if (value == null) 2299 this.description = null; 2300 else { 2301 if (this.description == null) 2302 this.description = new MarkdownType(); 2303 this.description.setValue(value); 2304 } 2305 return this; 2306 } 2307 2308 /** 2309 * @return {@link #code} (A coded or unformatted textual definition of this warning.) 2310 */ 2311 public CodeableConcept getCode() { 2312 if (this.code == null) 2313 if (Configuration.errorOnAutoCreate()) 2314 throw new Error("Attempt to auto-create ClinicalUseDefinitionWarningComponent.code"); 2315 else if (Configuration.doAutoCreate()) 2316 this.code = new CodeableConcept(); // cc 2317 return this.code; 2318 } 2319 2320 public boolean hasCode() { 2321 return this.code != null && !this.code.isEmpty(); 2322 } 2323 2324 /** 2325 * @param value {@link #code} (A coded or unformatted textual definition of this warning.) 2326 */ 2327 public ClinicalUseDefinitionWarningComponent setCode(CodeableConcept value) { 2328 this.code = value; 2329 return this; 2330 } 2331 2332 protected void listChildren(List<Property> children) { 2333 super.listChildren(children); 2334 children.add(new Property("description", "markdown", "A textual definition of this warning, with formatting.", 0, 1, description)); 2335 children.add(new Property("code", "CodeableConcept", "A coded or unformatted textual definition of this warning.", 0, 1, code)); 2336 } 2337 2338 @Override 2339 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2340 switch (_hash) { 2341 case -1724546052: /*description*/ return new Property("description", "markdown", "A textual definition of this warning, with formatting.", 0, 1, description); 2342 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A coded or unformatted textual definition of this warning.", 0, 1, code); 2343 default: return super.getNamedProperty(_hash, _name, _checkValid); 2344 } 2345 2346 } 2347 2348 @Override 2349 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2350 switch (hash) { 2351 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 2352 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 2353 default: return super.getProperty(hash, name, checkValid); 2354 } 2355 2356 } 2357 2358 @Override 2359 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2360 switch (hash) { 2361 case -1724546052: // description 2362 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 2363 return value; 2364 case 3059181: // code 2365 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2366 return value; 2367 default: return super.setProperty(hash, name, value); 2368 } 2369 2370 } 2371 2372 @Override 2373 public Base setProperty(String name, Base value) throws FHIRException { 2374 if (name.equals("description")) { 2375 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 2376 } else if (name.equals("code")) { 2377 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2378 } else 2379 return super.setProperty(name, value); 2380 return value; 2381 } 2382 2383 @Override 2384 public Base makeProperty(int hash, String name) throws FHIRException { 2385 switch (hash) { 2386 case -1724546052: return getDescriptionElement(); 2387 case 3059181: return getCode(); 2388 default: return super.makeProperty(hash, name); 2389 } 2390 2391 } 2392 2393 @Override 2394 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2395 switch (hash) { 2396 case -1724546052: /*description*/ return new String[] {"markdown"}; 2397 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 2398 default: return super.getTypesForProperty(hash, name); 2399 } 2400 2401 } 2402 2403 @Override 2404 public Base addChild(String name) throws FHIRException { 2405 if (name.equals("description")) { 2406 throw new FHIRException("Cannot call addChild on a primitive type ClinicalUseDefinition.warning.description"); 2407 } 2408 else if (name.equals("code")) { 2409 this.code = new CodeableConcept(); 2410 return this.code; 2411 } 2412 else 2413 return super.addChild(name); 2414 } 2415 2416 public ClinicalUseDefinitionWarningComponent copy() { 2417 ClinicalUseDefinitionWarningComponent dst = new ClinicalUseDefinitionWarningComponent(); 2418 copyValues(dst); 2419 return dst; 2420 } 2421 2422 public void copyValues(ClinicalUseDefinitionWarningComponent dst) { 2423 super.copyValues(dst); 2424 dst.description = description == null ? null : description.copy(); 2425 dst.code = code == null ? null : code.copy(); 2426 } 2427 2428 @Override 2429 public boolean equalsDeep(Base other_) { 2430 if (!super.equalsDeep(other_)) 2431 return false; 2432 if (!(other_ instanceof ClinicalUseDefinitionWarningComponent)) 2433 return false; 2434 ClinicalUseDefinitionWarningComponent o = (ClinicalUseDefinitionWarningComponent) other_; 2435 return compareDeep(description, o.description, true) && compareDeep(code, o.code, true); 2436 } 2437 2438 @Override 2439 public boolean equalsShallow(Base other_) { 2440 if (!super.equalsShallow(other_)) 2441 return false; 2442 if (!(other_ instanceof ClinicalUseDefinitionWarningComponent)) 2443 return false; 2444 ClinicalUseDefinitionWarningComponent o = (ClinicalUseDefinitionWarningComponent) other_; 2445 return compareValues(description, o.description, true); 2446 } 2447 2448 public boolean isEmpty() { 2449 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, code); 2450 } 2451 2452 public String fhirType() { 2453 return "ClinicalUseDefinition.warning"; 2454 2455 } 2456 2457 } 2458 2459 /** 2460 * Business identifier for this issue. 2461 */ 2462 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2463 @Description(shortDefinition="Business identifier for this issue", formalDefinition="Business identifier for this issue." ) 2464 protected List<Identifier> identifier; 2465 2466 /** 2467 * indication | contraindication | interaction | undesirable-effect | warning. 2468 */ 2469 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2470 @Description(shortDefinition="indication | contraindication | interaction | undesirable-effect | warning", formalDefinition="indication | contraindication | interaction | undesirable-effect | warning." ) 2471 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-use-issue-type") 2472 protected Enumeration<ClinicalUseIssueType> type; 2473 2474 /** 2475 * A categorisation of the issue, primarily for dividing warnings into subject heading areas such as "Pregnancy and Lactation", "Overdose", "Effects on Ability to Drive and Use Machines". 2476 */ 2477 @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2478 @Description(shortDefinition="A categorisation of the issue, primarily for dividing warnings into subject heading areas such as \"Pregnancy and Lactation\", \"Overdose\", \"Effects on Ability to Drive and Use Machines\"", formalDefinition="A categorisation of the issue, primarily for dividing warnings into subject heading areas such as \"Pregnancy and Lactation\", \"Overdose\", \"Effects on Ability to Drive and Use Machines\"." ) 2479 protected List<CodeableConcept> category; 2480 2481 /** 2482 * The medication or procedure for which this is an indication. 2483 */ 2484 @Child(name = "subject", type = {MedicinalProductDefinition.class, Medication.class, ActivityDefinition.class, PlanDefinition.class, Device.class, DeviceDefinition.class, Substance.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2485 @Description(shortDefinition="The medication or procedure for which this is an indication", formalDefinition="The medication or procedure for which this is an indication." ) 2486 protected List<Reference> subject; 2487 2488 /** 2489 * Whether this is a current issue or one that has been retired etc. 2490 */ 2491 @Child(name = "status", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 2492 @Description(shortDefinition="Whether this is a current issue or one that has been retired etc", formalDefinition="Whether this is a current issue or one that has been retired etc." ) 2493 protected CodeableConcept status; 2494 2495 /** 2496 * Specifics for when this is a contraindication. 2497 */ 2498 @Child(name = "contraindication", type = {}, order=5, min=0, max=1, modifier=false, summary=true) 2499 @Description(shortDefinition="Specifics for when this is a contraindication", formalDefinition="Specifics for when this is a contraindication." ) 2500 protected ClinicalUseDefinitionContraindicationComponent contraindication; 2501 2502 /** 2503 * Specifics for when this is an indication. 2504 */ 2505 @Child(name = "indication", type = {}, order=6, min=0, max=1, modifier=false, summary=true) 2506 @Description(shortDefinition="Specifics for when this is an indication", formalDefinition="Specifics for when this is an indication." ) 2507 protected ClinicalUseDefinitionIndicationComponent indication; 2508 2509 /** 2510 * Specifics for when this is an interaction. 2511 */ 2512 @Child(name = "interaction", type = {}, order=7, min=0, max=1, modifier=false, summary=true) 2513 @Description(shortDefinition="Specifics for when this is an interaction", formalDefinition="Specifics for when this is an interaction." ) 2514 protected ClinicalUseDefinitionInteractionComponent interaction; 2515 2516 /** 2517 * The population group to which this applies. 2518 */ 2519 @Child(name = "population", type = {Group.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2520 @Description(shortDefinition="The population group to which this applies", formalDefinition="The population group to which this applies." ) 2521 protected List<Reference> population; 2522 2523 /** 2524 * Describe the undesirable effects of the medicinal product. 2525 */ 2526 @Child(name = "undesirableEffect", type = {}, order=9, min=0, max=1, modifier=false, summary=true) 2527 @Description(shortDefinition="A possible negative outcome from the use of this treatment", formalDefinition="Describe the undesirable effects of the medicinal product." ) 2528 protected ClinicalUseDefinitionUndesirableEffectComponent undesirableEffect; 2529 2530 /** 2531 * A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'. 2532 */ 2533 @Child(name = "warning", type = {}, order=10, min=0, max=1, modifier=false, summary=true) 2534 @Description(shortDefinition="A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness' or 'Get medical advice/attention if you feel unwell'", formalDefinition="A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'." ) 2535 protected ClinicalUseDefinitionWarningComponent warning; 2536 2537 private static final long serialVersionUID = 258286207L; 2538 2539 /** 2540 * Constructor 2541 */ 2542 public ClinicalUseDefinition() { 2543 super(); 2544 } 2545 2546 /** 2547 * Constructor 2548 */ 2549 public ClinicalUseDefinition(ClinicalUseIssueType type) { 2550 super(); 2551 this.setType(type); 2552 } 2553 2554 /** 2555 * @return {@link #identifier} (Business identifier for this issue.) 2556 */ 2557 public List<Identifier> getIdentifier() { 2558 if (this.identifier == null) 2559 this.identifier = new ArrayList<Identifier>(); 2560 return this.identifier; 2561 } 2562 2563 /** 2564 * @return Returns a reference to <code>this</code> for easy method chaining 2565 */ 2566 public ClinicalUseDefinition setIdentifier(List<Identifier> theIdentifier) { 2567 this.identifier = theIdentifier; 2568 return this; 2569 } 2570 2571 public boolean hasIdentifier() { 2572 if (this.identifier == null) 2573 return false; 2574 for (Identifier item : this.identifier) 2575 if (!item.isEmpty()) 2576 return true; 2577 return false; 2578 } 2579 2580 public Identifier addIdentifier() { //3 2581 Identifier t = new Identifier(); 2582 if (this.identifier == null) 2583 this.identifier = new ArrayList<Identifier>(); 2584 this.identifier.add(t); 2585 return t; 2586 } 2587 2588 public ClinicalUseDefinition addIdentifier(Identifier t) { //3 2589 if (t == null) 2590 return this; 2591 if (this.identifier == null) 2592 this.identifier = new ArrayList<Identifier>(); 2593 this.identifier.add(t); 2594 return this; 2595 } 2596 2597 /** 2598 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2599 */ 2600 public Identifier getIdentifierFirstRep() { 2601 if (getIdentifier().isEmpty()) { 2602 addIdentifier(); 2603 } 2604 return getIdentifier().get(0); 2605 } 2606 2607 /** 2608 * @return {@link #type} (indication | contraindication | interaction | undesirable-effect | warning.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2609 */ 2610 public Enumeration<ClinicalUseIssueType> getTypeElement() { 2611 if (this.type == null) 2612 if (Configuration.errorOnAutoCreate()) 2613 throw new Error("Attempt to auto-create ClinicalUseDefinition.type"); 2614 else if (Configuration.doAutoCreate()) 2615 this.type = new Enumeration<ClinicalUseIssueType>(new ClinicalUseIssueTypeEnumFactory()); // bb 2616 return this.type; 2617 } 2618 2619 public boolean hasTypeElement() { 2620 return this.type != null && !this.type.isEmpty(); 2621 } 2622 2623 public boolean hasType() { 2624 return this.type != null && !this.type.isEmpty(); 2625 } 2626 2627 /** 2628 * @param value {@link #type} (indication | contraindication | interaction | undesirable-effect | warning.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2629 */ 2630 public ClinicalUseDefinition setTypeElement(Enumeration<ClinicalUseIssueType> value) { 2631 this.type = value; 2632 return this; 2633 } 2634 2635 /** 2636 * @return indication | contraindication | interaction | undesirable-effect | warning. 2637 */ 2638 public ClinicalUseIssueType getType() { 2639 return this.type == null ? null : this.type.getValue(); 2640 } 2641 2642 /** 2643 * @param value indication | contraindication | interaction | undesirable-effect | warning. 2644 */ 2645 public ClinicalUseDefinition setType(ClinicalUseIssueType value) { 2646 if (this.type == null) 2647 this.type = new Enumeration<ClinicalUseIssueType>(new ClinicalUseIssueTypeEnumFactory()); 2648 this.type.setValue(value); 2649 return this; 2650 } 2651 2652 /** 2653 * @return {@link #category} (A categorisation of the issue, primarily for dividing warnings into subject heading areas such as "Pregnancy and Lactation", "Overdose", "Effects on Ability to Drive and Use Machines".) 2654 */ 2655 public List<CodeableConcept> getCategory() { 2656 if (this.category == null) 2657 this.category = new ArrayList<CodeableConcept>(); 2658 return this.category; 2659 } 2660 2661 /** 2662 * @return Returns a reference to <code>this</code> for easy method chaining 2663 */ 2664 public ClinicalUseDefinition setCategory(List<CodeableConcept> theCategory) { 2665 this.category = theCategory; 2666 return this; 2667 } 2668 2669 public boolean hasCategory() { 2670 if (this.category == null) 2671 return false; 2672 for (CodeableConcept item : this.category) 2673 if (!item.isEmpty()) 2674 return true; 2675 return false; 2676 } 2677 2678 public CodeableConcept addCategory() { //3 2679 CodeableConcept t = new CodeableConcept(); 2680 if (this.category == null) 2681 this.category = new ArrayList<CodeableConcept>(); 2682 this.category.add(t); 2683 return t; 2684 } 2685 2686 public ClinicalUseDefinition addCategory(CodeableConcept t) { //3 2687 if (t == null) 2688 return this; 2689 if (this.category == null) 2690 this.category = new ArrayList<CodeableConcept>(); 2691 this.category.add(t); 2692 return this; 2693 } 2694 2695 /** 2696 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} 2697 */ 2698 public CodeableConcept getCategoryFirstRep() { 2699 if (getCategory().isEmpty()) { 2700 addCategory(); 2701 } 2702 return getCategory().get(0); 2703 } 2704 2705 /** 2706 * @return {@link #subject} (The medication or procedure for which this is an indication.) 2707 */ 2708 public List<Reference> getSubject() { 2709 if (this.subject == null) 2710 this.subject = new ArrayList<Reference>(); 2711 return this.subject; 2712 } 2713 2714 /** 2715 * @return Returns a reference to <code>this</code> for easy method chaining 2716 */ 2717 public ClinicalUseDefinition setSubject(List<Reference> theSubject) { 2718 this.subject = theSubject; 2719 return this; 2720 } 2721 2722 public boolean hasSubject() { 2723 if (this.subject == null) 2724 return false; 2725 for (Reference item : this.subject) 2726 if (!item.isEmpty()) 2727 return true; 2728 return false; 2729 } 2730 2731 public Reference addSubject() { //3 2732 Reference t = new Reference(); 2733 if (this.subject == null) 2734 this.subject = new ArrayList<Reference>(); 2735 this.subject.add(t); 2736 return t; 2737 } 2738 2739 public ClinicalUseDefinition addSubject(Reference t) { //3 2740 if (t == null) 2741 return this; 2742 if (this.subject == null) 2743 this.subject = new ArrayList<Reference>(); 2744 this.subject.add(t); 2745 return this; 2746 } 2747 2748 /** 2749 * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist {3} 2750 */ 2751 public Reference getSubjectFirstRep() { 2752 if (getSubject().isEmpty()) { 2753 addSubject(); 2754 } 2755 return getSubject().get(0); 2756 } 2757 2758 /** 2759 * @return {@link #status} (Whether this is a current issue or one that has been retired etc.) 2760 */ 2761 public CodeableConcept getStatus() { 2762 if (this.status == null) 2763 if (Configuration.errorOnAutoCreate()) 2764 throw new Error("Attempt to auto-create ClinicalUseDefinition.status"); 2765 else if (Configuration.doAutoCreate()) 2766 this.status = new CodeableConcept(); // cc 2767 return this.status; 2768 } 2769 2770 public boolean hasStatus() { 2771 return this.status != null && !this.status.isEmpty(); 2772 } 2773 2774 /** 2775 * @param value {@link #status} (Whether this is a current issue or one that has been retired etc.) 2776 */ 2777 public ClinicalUseDefinition setStatus(CodeableConcept value) { 2778 this.status = value; 2779 return this; 2780 } 2781 2782 /** 2783 * @return {@link #contraindication} (Specifics for when this is a contraindication.) 2784 */ 2785 public ClinicalUseDefinitionContraindicationComponent getContraindication() { 2786 if (this.contraindication == null) 2787 if (Configuration.errorOnAutoCreate()) 2788 throw new Error("Attempt to auto-create ClinicalUseDefinition.contraindication"); 2789 else if (Configuration.doAutoCreate()) 2790 this.contraindication = new ClinicalUseDefinitionContraindicationComponent(); // cc 2791 return this.contraindication; 2792 } 2793 2794 public boolean hasContraindication() { 2795 return this.contraindication != null && !this.contraindication.isEmpty(); 2796 } 2797 2798 /** 2799 * @param value {@link #contraindication} (Specifics for when this is a contraindication.) 2800 */ 2801 public ClinicalUseDefinition setContraindication(ClinicalUseDefinitionContraindicationComponent value) { 2802 this.contraindication = value; 2803 return this; 2804 } 2805 2806 /** 2807 * @return {@link #indication} (Specifics for when this is an indication.) 2808 */ 2809 public ClinicalUseDefinitionIndicationComponent getIndication() { 2810 if (this.indication == null) 2811 if (Configuration.errorOnAutoCreate()) 2812 throw new Error("Attempt to auto-create ClinicalUseDefinition.indication"); 2813 else if (Configuration.doAutoCreate()) 2814 this.indication = new ClinicalUseDefinitionIndicationComponent(); // cc 2815 return this.indication; 2816 } 2817 2818 public boolean hasIndication() { 2819 return this.indication != null && !this.indication.isEmpty(); 2820 } 2821 2822 /** 2823 * @param value {@link #indication} (Specifics for when this is an indication.) 2824 */ 2825 public ClinicalUseDefinition setIndication(ClinicalUseDefinitionIndicationComponent value) { 2826 this.indication = value; 2827 return this; 2828 } 2829 2830 /** 2831 * @return {@link #interaction} (Specifics for when this is an interaction.) 2832 */ 2833 public ClinicalUseDefinitionInteractionComponent getInteraction() { 2834 if (this.interaction == null) 2835 if (Configuration.errorOnAutoCreate()) 2836 throw new Error("Attempt to auto-create ClinicalUseDefinition.interaction"); 2837 else if (Configuration.doAutoCreate()) 2838 this.interaction = new ClinicalUseDefinitionInteractionComponent(); // cc 2839 return this.interaction; 2840 } 2841 2842 public boolean hasInteraction() { 2843 return this.interaction != null && !this.interaction.isEmpty(); 2844 } 2845 2846 /** 2847 * @param value {@link #interaction} (Specifics for when this is an interaction.) 2848 */ 2849 public ClinicalUseDefinition setInteraction(ClinicalUseDefinitionInteractionComponent value) { 2850 this.interaction = value; 2851 return this; 2852 } 2853 2854 /** 2855 * @return {@link #population} (The population group to which this applies.) 2856 */ 2857 public List<Reference> getPopulation() { 2858 if (this.population == null) 2859 this.population = new ArrayList<Reference>(); 2860 return this.population; 2861 } 2862 2863 /** 2864 * @return Returns a reference to <code>this</code> for easy method chaining 2865 */ 2866 public ClinicalUseDefinition setPopulation(List<Reference> thePopulation) { 2867 this.population = thePopulation; 2868 return this; 2869 } 2870 2871 public boolean hasPopulation() { 2872 if (this.population == null) 2873 return false; 2874 for (Reference item : this.population) 2875 if (!item.isEmpty()) 2876 return true; 2877 return false; 2878 } 2879 2880 public Reference addPopulation() { //3 2881 Reference t = new Reference(); 2882 if (this.population == null) 2883 this.population = new ArrayList<Reference>(); 2884 this.population.add(t); 2885 return t; 2886 } 2887 2888 public ClinicalUseDefinition addPopulation(Reference t) { //3 2889 if (t == null) 2890 return this; 2891 if (this.population == null) 2892 this.population = new ArrayList<Reference>(); 2893 this.population.add(t); 2894 return this; 2895 } 2896 2897 /** 2898 * @return The first repetition of repeating field {@link #population}, creating it if it does not already exist {3} 2899 */ 2900 public Reference getPopulationFirstRep() { 2901 if (getPopulation().isEmpty()) { 2902 addPopulation(); 2903 } 2904 return getPopulation().get(0); 2905 } 2906 2907 /** 2908 * @return {@link #undesirableEffect} (Describe the undesirable effects of the medicinal product.) 2909 */ 2910 public ClinicalUseDefinitionUndesirableEffectComponent getUndesirableEffect() { 2911 if (this.undesirableEffect == null) 2912 if (Configuration.errorOnAutoCreate()) 2913 throw new Error("Attempt to auto-create ClinicalUseDefinition.undesirableEffect"); 2914 else if (Configuration.doAutoCreate()) 2915 this.undesirableEffect = new ClinicalUseDefinitionUndesirableEffectComponent(); // cc 2916 return this.undesirableEffect; 2917 } 2918 2919 public boolean hasUndesirableEffect() { 2920 return this.undesirableEffect != null && !this.undesirableEffect.isEmpty(); 2921 } 2922 2923 /** 2924 * @param value {@link #undesirableEffect} (Describe the undesirable effects of the medicinal product.) 2925 */ 2926 public ClinicalUseDefinition setUndesirableEffect(ClinicalUseDefinitionUndesirableEffectComponent value) { 2927 this.undesirableEffect = value; 2928 return this; 2929 } 2930 2931 /** 2932 * @return {@link #warning} (A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'.) 2933 */ 2934 public ClinicalUseDefinitionWarningComponent getWarning() { 2935 if (this.warning == null) 2936 if (Configuration.errorOnAutoCreate()) 2937 throw new Error("Attempt to auto-create ClinicalUseDefinition.warning"); 2938 else if (Configuration.doAutoCreate()) 2939 this.warning = new ClinicalUseDefinitionWarningComponent(); // cc 2940 return this.warning; 2941 } 2942 2943 public boolean hasWarning() { 2944 return this.warning != null && !this.warning.isEmpty(); 2945 } 2946 2947 /** 2948 * @param value {@link #warning} (A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'.) 2949 */ 2950 public ClinicalUseDefinition setWarning(ClinicalUseDefinitionWarningComponent value) { 2951 this.warning = value; 2952 return this; 2953 } 2954 2955 protected void listChildren(List<Property> children) { 2956 super.listChildren(children); 2957 children.add(new Property("identifier", "Identifier", "Business identifier for this issue.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2958 children.add(new Property("type", "code", "indication | contraindication | interaction | undesirable-effect | warning.", 0, 1, type)); 2959 children.add(new Property("category", "CodeableConcept", "A categorisation of the issue, primarily for dividing warnings into subject heading areas such as \"Pregnancy and Lactation\", \"Overdose\", \"Effects on Ability to Drive and Use Machines\".", 0, java.lang.Integer.MAX_VALUE, category)); 2960 children.add(new Property("subject", "Reference(MedicinalProductDefinition|Medication|ActivityDefinition|PlanDefinition|Device|DeviceDefinition|Substance)", "The medication or procedure for which this is an indication.", 0, java.lang.Integer.MAX_VALUE, subject)); 2961 children.add(new Property("status", "CodeableConcept", "Whether this is a current issue or one that has been retired etc.", 0, 1, status)); 2962 children.add(new Property("contraindication", "", "Specifics for when this is a contraindication.", 0, 1, contraindication)); 2963 children.add(new Property("indication", "", "Specifics for when this is an indication.", 0, 1, indication)); 2964 children.add(new Property("interaction", "", "Specifics for when this is an interaction.", 0, 1, interaction)); 2965 children.add(new Property("population", "Reference(Group)", "The population group to which this applies.", 0, java.lang.Integer.MAX_VALUE, population)); 2966 children.add(new Property("undesirableEffect", "", "Describe the undesirable effects of the medicinal product.", 0, 1, undesirableEffect)); 2967 children.add(new Property("warning", "", "A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'.", 0, 1, warning)); 2968 } 2969 2970 @Override 2971 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2972 switch (_hash) { 2973 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier for this issue.", 0, java.lang.Integer.MAX_VALUE, identifier); 2974 case 3575610: /*type*/ return new Property("type", "code", "indication | contraindication | interaction | undesirable-effect | warning.", 0, 1, type); 2975 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A categorisation of the issue, primarily for dividing warnings into subject heading areas such as \"Pregnancy and Lactation\", \"Overdose\", \"Effects on Ability to Drive and Use Machines\".", 0, java.lang.Integer.MAX_VALUE, category); 2976 case -1867885268: /*subject*/ return new Property("subject", "Reference(MedicinalProductDefinition|Medication|ActivityDefinition|PlanDefinition|Device|DeviceDefinition|Substance)", "The medication or procedure for which this is an indication.", 0, java.lang.Integer.MAX_VALUE, subject); 2977 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "Whether this is a current issue or one that has been retired etc.", 0, 1, status); 2978 case 107135229: /*contraindication*/ return new Property("contraindication", "", "Specifics for when this is a contraindication.", 0, 1, contraindication); 2979 case -597168804: /*indication*/ return new Property("indication", "", "Specifics for when this is an indication.", 0, 1, indication); 2980 case 1844104722: /*interaction*/ return new Property("interaction", "", "Specifics for when this is an interaction.", 0, 1, interaction); 2981 case -2023558323: /*population*/ return new Property("population", "Reference(Group)", "The population group to which this applies.", 0, java.lang.Integer.MAX_VALUE, population); 2982 case 444367565: /*undesirableEffect*/ return new Property("undesirableEffect", "", "Describe the undesirable effects of the medicinal product.", 0, 1, undesirableEffect); 2983 case 1124446108: /*warning*/ return new Property("warning", "", "A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'.", 0, 1, warning); 2984 default: return super.getNamedProperty(_hash, _name, _checkValid); 2985 } 2986 2987 } 2988 2989 @Override 2990 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2991 switch (hash) { 2992 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2993 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ClinicalUseIssueType> 2994 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 2995 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference 2996 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 2997 case 107135229: /*contraindication*/ return this.contraindication == null ? new Base[0] : new Base[] {this.contraindication}; // ClinicalUseDefinitionContraindicationComponent 2998 case -597168804: /*indication*/ return this.indication == null ? new Base[0] : new Base[] {this.indication}; // ClinicalUseDefinitionIndicationComponent 2999 case 1844104722: /*interaction*/ return this.interaction == null ? new Base[0] : new Base[] {this.interaction}; // ClinicalUseDefinitionInteractionComponent 3000 case -2023558323: /*population*/ return this.population == null ? new Base[0] : this.population.toArray(new Base[this.population.size()]); // Reference 3001 case 444367565: /*undesirableEffect*/ return this.undesirableEffect == null ? new Base[0] : new Base[] {this.undesirableEffect}; // ClinicalUseDefinitionUndesirableEffectComponent 3002 case 1124446108: /*warning*/ return this.warning == null ? new Base[0] : new Base[] {this.warning}; // ClinicalUseDefinitionWarningComponent 3003 default: return super.getProperty(hash, name, checkValid); 3004 } 3005 3006 } 3007 3008 @Override 3009 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3010 switch (hash) { 3011 case -1618432855: // identifier 3012 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3013 return value; 3014 case 3575610: // type 3015 value = new ClinicalUseIssueTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3016 this.type = (Enumeration) value; // Enumeration<ClinicalUseIssueType> 3017 return value; 3018 case 50511102: // category 3019 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3020 return value; 3021 case -1867885268: // subject 3022 this.getSubject().add(TypeConvertor.castToReference(value)); // Reference 3023 return value; 3024 case -892481550: // status 3025 this.status = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3026 return value; 3027 case 107135229: // contraindication 3028 this.contraindication = (ClinicalUseDefinitionContraindicationComponent) value; // ClinicalUseDefinitionContraindicationComponent 3029 return value; 3030 case -597168804: // indication 3031 this.indication = (ClinicalUseDefinitionIndicationComponent) value; // ClinicalUseDefinitionIndicationComponent 3032 return value; 3033 case 1844104722: // interaction 3034 this.interaction = (ClinicalUseDefinitionInteractionComponent) value; // ClinicalUseDefinitionInteractionComponent 3035 return value; 3036 case -2023558323: // population 3037 this.getPopulation().add(TypeConvertor.castToReference(value)); // Reference 3038 return value; 3039 case 444367565: // undesirableEffect 3040 this.undesirableEffect = (ClinicalUseDefinitionUndesirableEffectComponent) value; // ClinicalUseDefinitionUndesirableEffectComponent 3041 return value; 3042 case 1124446108: // warning 3043 this.warning = (ClinicalUseDefinitionWarningComponent) value; // ClinicalUseDefinitionWarningComponent 3044 return value; 3045 default: return super.setProperty(hash, name, value); 3046 } 3047 3048 } 3049 3050 @Override 3051 public Base setProperty(String name, Base value) throws FHIRException { 3052 if (name.equals("identifier")) { 3053 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 3054 } else if (name.equals("type")) { 3055 value = new ClinicalUseIssueTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3056 this.type = (Enumeration) value; // Enumeration<ClinicalUseIssueType> 3057 } else if (name.equals("category")) { 3058 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); 3059 } else if (name.equals("subject")) { 3060 this.getSubject().add(TypeConvertor.castToReference(value)); 3061 } else if (name.equals("status")) { 3062 this.status = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3063 } else if (name.equals("contraindication")) { 3064 this.contraindication = (ClinicalUseDefinitionContraindicationComponent) value; // ClinicalUseDefinitionContraindicationComponent 3065 } else if (name.equals("indication")) { 3066 this.indication = (ClinicalUseDefinitionIndicationComponent) value; // ClinicalUseDefinitionIndicationComponent 3067 } else if (name.equals("interaction")) { 3068 this.interaction = (ClinicalUseDefinitionInteractionComponent) value; // ClinicalUseDefinitionInteractionComponent 3069 } else if (name.equals("population")) { 3070 this.getPopulation().add(TypeConvertor.castToReference(value)); 3071 } else if (name.equals("undesirableEffect")) { 3072 this.undesirableEffect = (ClinicalUseDefinitionUndesirableEffectComponent) value; // ClinicalUseDefinitionUndesirableEffectComponent 3073 } else if (name.equals("warning")) { 3074 this.warning = (ClinicalUseDefinitionWarningComponent) value; // ClinicalUseDefinitionWarningComponent 3075 } else 3076 return super.setProperty(name, value); 3077 return value; 3078 } 3079 3080 @Override 3081 public Base makeProperty(int hash, String name) throws FHIRException { 3082 switch (hash) { 3083 case -1618432855: return addIdentifier(); 3084 case 3575610: return getTypeElement(); 3085 case 50511102: return addCategory(); 3086 case -1867885268: return addSubject(); 3087 case -892481550: return getStatus(); 3088 case 107135229: return getContraindication(); 3089 case -597168804: return getIndication(); 3090 case 1844104722: return getInteraction(); 3091 case -2023558323: return addPopulation(); 3092 case 444367565: return getUndesirableEffect(); 3093 case 1124446108: return getWarning(); 3094 default: return super.makeProperty(hash, name); 3095 } 3096 3097 } 3098 3099 @Override 3100 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3101 switch (hash) { 3102 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3103 case 3575610: /*type*/ return new String[] {"code"}; 3104 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 3105 case -1867885268: /*subject*/ return new String[] {"Reference"}; 3106 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 3107 case 107135229: /*contraindication*/ return new String[] {}; 3108 case -597168804: /*indication*/ return new String[] {}; 3109 case 1844104722: /*interaction*/ return new String[] {}; 3110 case -2023558323: /*population*/ return new String[] {"Reference"}; 3111 case 444367565: /*undesirableEffect*/ return new String[] {}; 3112 case 1124446108: /*warning*/ return new String[] {}; 3113 default: return super.getTypesForProperty(hash, name); 3114 } 3115 3116 } 3117 3118 @Override 3119 public Base addChild(String name) throws FHIRException { 3120 if (name.equals("identifier")) { 3121 return addIdentifier(); 3122 } 3123 else if (name.equals("type")) { 3124 throw new FHIRException("Cannot call addChild on a primitive type ClinicalUseDefinition.type"); 3125 } 3126 else if (name.equals("category")) { 3127 return addCategory(); 3128 } 3129 else if (name.equals("subject")) { 3130 return addSubject(); 3131 } 3132 else if (name.equals("status")) { 3133 this.status = new CodeableConcept(); 3134 return this.status; 3135 } 3136 else if (name.equals("contraindication")) { 3137 this.contraindication = new ClinicalUseDefinitionContraindicationComponent(); 3138 return this.contraindication; 3139 } 3140 else if (name.equals("indication")) { 3141 this.indication = new ClinicalUseDefinitionIndicationComponent(); 3142 return this.indication; 3143 } 3144 else if (name.equals("interaction")) { 3145 this.interaction = new ClinicalUseDefinitionInteractionComponent(); 3146 return this.interaction; 3147 } 3148 else if (name.equals("population")) { 3149 return addPopulation(); 3150 } 3151 else if (name.equals("undesirableEffect")) { 3152 this.undesirableEffect = new ClinicalUseDefinitionUndesirableEffectComponent(); 3153 return this.undesirableEffect; 3154 } 3155 else if (name.equals("warning")) { 3156 this.warning = new ClinicalUseDefinitionWarningComponent(); 3157 return this.warning; 3158 } 3159 else 3160 return super.addChild(name); 3161 } 3162 3163 public String fhirType() { 3164 return "ClinicalUseDefinition"; 3165 3166 } 3167 3168 public ClinicalUseDefinition copy() { 3169 ClinicalUseDefinition dst = new ClinicalUseDefinition(); 3170 copyValues(dst); 3171 return dst; 3172 } 3173 3174 public void copyValues(ClinicalUseDefinition dst) { 3175 super.copyValues(dst); 3176 if (identifier != null) { 3177 dst.identifier = new ArrayList<Identifier>(); 3178 for (Identifier i : identifier) 3179 dst.identifier.add(i.copy()); 3180 }; 3181 dst.type = type == null ? null : type.copy(); 3182 if (category != null) { 3183 dst.category = new ArrayList<CodeableConcept>(); 3184 for (CodeableConcept i : category) 3185 dst.category.add(i.copy()); 3186 }; 3187 if (subject != null) { 3188 dst.subject = new ArrayList<Reference>(); 3189 for (Reference i : subject) 3190 dst.subject.add(i.copy()); 3191 }; 3192 dst.status = status == null ? null : status.copy(); 3193 dst.contraindication = contraindication == null ? null : contraindication.copy(); 3194 dst.indication = indication == null ? null : indication.copy(); 3195 dst.interaction = interaction == null ? null : interaction.copy(); 3196 if (population != null) { 3197 dst.population = new ArrayList<Reference>(); 3198 for (Reference i : population) 3199 dst.population.add(i.copy()); 3200 }; 3201 dst.undesirableEffect = undesirableEffect == null ? null : undesirableEffect.copy(); 3202 dst.warning = warning == null ? null : warning.copy(); 3203 } 3204 3205 protected ClinicalUseDefinition typedCopy() { 3206 return copy(); 3207 } 3208 3209 @Override 3210 public boolean equalsDeep(Base other_) { 3211 if (!super.equalsDeep(other_)) 3212 return false; 3213 if (!(other_ instanceof ClinicalUseDefinition)) 3214 return false; 3215 ClinicalUseDefinition o = (ClinicalUseDefinition) other_; 3216 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(category, o.category, true) 3217 && compareDeep(subject, o.subject, true) && compareDeep(status, o.status, true) && compareDeep(contraindication, o.contraindication, true) 3218 && compareDeep(indication, o.indication, true) && compareDeep(interaction, o.interaction, true) 3219 && compareDeep(population, o.population, true) && compareDeep(undesirableEffect, o.undesirableEffect, true) 3220 && compareDeep(warning, o.warning, true); 3221 } 3222 3223 @Override 3224 public boolean equalsShallow(Base other_) { 3225 if (!super.equalsShallow(other_)) 3226 return false; 3227 if (!(other_ instanceof ClinicalUseDefinition)) 3228 return false; 3229 ClinicalUseDefinition o = (ClinicalUseDefinition) other_; 3230 return compareValues(type, o.type, true); 3231 } 3232 3233 public boolean isEmpty() { 3234 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, category 3235 , subject, status, contraindication, indication, interaction, population, undesirableEffect 3236 , warning); 3237 } 3238 3239 @Override 3240 public ResourceType getResourceType() { 3241 return ResourceType.ClinicalUseDefinition; 3242 } 3243 3244 /** 3245 * Search parameter: <b>contraindication-reference</b> 3246 * <p> 3247 * Description: <b>The situation that is being documented as contraindicating against this item, as a reference</b><br> 3248 * Type: <b>reference</b><br> 3249 * Path: <b>ClinicalUseDefinition.contraindication.diseaseSymptomProcedure</b><br> 3250 * </p> 3251 */ 3252 @SearchParamDefinition(name="contraindication-reference", path="ClinicalUseDefinition.contraindication.diseaseSymptomProcedure", description="The situation that is being documented as contraindicating against this item, as a reference", type="reference" ) 3253 public static final String SP_CONTRAINDICATION_REFERENCE = "contraindication-reference"; 3254 /** 3255 * <b>Fluent Client</b> search parameter constant for <b>contraindication-reference</b> 3256 * <p> 3257 * Description: <b>The situation that is being documented as contraindicating against this item, as a reference</b><br> 3258 * Type: <b>reference</b><br> 3259 * Path: <b>ClinicalUseDefinition.contraindication.diseaseSymptomProcedure</b><br> 3260 * </p> 3261 */ 3262 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTRAINDICATION_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTRAINDICATION_REFERENCE); 3263 3264/** 3265 * Constant for fluent queries to be used to add include statements. Specifies 3266 * the path value of "<b>ClinicalUseDefinition:contraindication-reference</b>". 3267 */ 3268 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTRAINDICATION_REFERENCE = new ca.uhn.fhir.model.api.Include("ClinicalUseDefinition:contraindication-reference").toLocked(); 3269 3270 /** 3271 * Search parameter: <b>contraindication</b> 3272 * <p> 3273 * Description: <b>The situation that is being documented as contraindicating against this item, as a code</b><br> 3274 * Type: <b>token</b><br> 3275 * Path: <b>ClinicalUseDefinition.contraindication.diseaseSymptomProcedure</b><br> 3276 * </p> 3277 */ 3278 @SearchParamDefinition(name="contraindication", path="ClinicalUseDefinition.contraindication.diseaseSymptomProcedure", description="The situation that is being documented as contraindicating against this item, as a code", type="token" ) 3279 public static final String SP_CONTRAINDICATION = "contraindication"; 3280 /** 3281 * <b>Fluent Client</b> search parameter constant for <b>contraindication</b> 3282 * <p> 3283 * Description: <b>The situation that is being documented as contraindicating against this item, as a code</b><br> 3284 * Type: <b>token</b><br> 3285 * Path: <b>ClinicalUseDefinition.contraindication.diseaseSymptomProcedure</b><br> 3286 * </p> 3287 */ 3288 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTRAINDICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTRAINDICATION); 3289 3290 /** 3291 * Search parameter: <b>effect-reference</b> 3292 * <p> 3293 * Description: <b>The situation in which the undesirable effect may manifest, as a reference</b><br> 3294 * Type: <b>reference</b><br> 3295 * Path: <b>ClinicalUseDefinition.undesirableEffect.symptomConditionEffect</b><br> 3296 * </p> 3297 */ 3298 @SearchParamDefinition(name="effect-reference", path="ClinicalUseDefinition.undesirableEffect.symptomConditionEffect", description="The situation in which the undesirable effect may manifest, as a reference", type="reference" ) 3299 public static final String SP_EFFECT_REFERENCE = "effect-reference"; 3300 /** 3301 * <b>Fluent Client</b> search parameter constant for <b>effect-reference</b> 3302 * <p> 3303 * Description: <b>The situation in which the undesirable effect may manifest, as a reference</b><br> 3304 * Type: <b>reference</b><br> 3305 * Path: <b>ClinicalUseDefinition.undesirableEffect.symptomConditionEffect</b><br> 3306 * </p> 3307 */ 3308 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EFFECT_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EFFECT_REFERENCE); 3309 3310/** 3311 * Constant for fluent queries to be used to add include statements. Specifies 3312 * the path value of "<b>ClinicalUseDefinition:effect-reference</b>". 3313 */ 3314 public static final ca.uhn.fhir.model.api.Include INCLUDE_EFFECT_REFERENCE = new ca.uhn.fhir.model.api.Include("ClinicalUseDefinition:effect-reference").toLocked(); 3315 3316 /** 3317 * Search parameter: <b>effect</b> 3318 * <p> 3319 * Description: <b>The situation in which the undesirable effect may manifest, as a code</b><br> 3320 * Type: <b>token</b><br> 3321 * Path: <b>ClinicalUseDefinition.undesirableEffect.symptomConditionEffect</b><br> 3322 * </p> 3323 */ 3324 @SearchParamDefinition(name="effect", path="ClinicalUseDefinition.undesirableEffect.symptomConditionEffect", description="The situation in which the undesirable effect may manifest, as a code", type="token" ) 3325 public static final String SP_EFFECT = "effect"; 3326 /** 3327 * <b>Fluent Client</b> search parameter constant for <b>effect</b> 3328 * <p> 3329 * Description: <b>The situation in which the undesirable effect may manifest, as a code</b><br> 3330 * Type: <b>token</b><br> 3331 * Path: <b>ClinicalUseDefinition.undesirableEffect.symptomConditionEffect</b><br> 3332 * </p> 3333 */ 3334 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EFFECT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EFFECT); 3335 3336 /** 3337 * Search parameter: <b>identifier</b> 3338 * <p> 3339 * Description: <b>Business identifier for this issue</b><br> 3340 * Type: <b>token</b><br> 3341 * Path: <b>ClinicalUseDefinition.identifier</b><br> 3342 * </p> 3343 */ 3344 @SearchParamDefinition(name="identifier", path="ClinicalUseDefinition.identifier", description="Business identifier for this issue", type="token" ) 3345 public static final String SP_IDENTIFIER = "identifier"; 3346 /** 3347 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3348 * <p> 3349 * Description: <b>Business identifier for this issue</b><br> 3350 * Type: <b>token</b><br> 3351 * Path: <b>ClinicalUseDefinition.identifier</b><br> 3352 * </p> 3353 */ 3354 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3355 3356 /** 3357 * Search parameter: <b>indication-reference</b> 3358 * <p> 3359 * Description: <b>The situation that is being documented as an indicaton for this item, as a reference</b><br> 3360 * Type: <b>reference</b><br> 3361 * Path: <b>ClinicalUseDefinition.indication.diseaseSymptomProcedure</b><br> 3362 * </p> 3363 */ 3364 @SearchParamDefinition(name="indication-reference", path="ClinicalUseDefinition.indication.diseaseSymptomProcedure", description="The situation that is being documented as an indicaton for this item, as a reference", type="reference" ) 3365 public static final String SP_INDICATION_REFERENCE = "indication-reference"; 3366 /** 3367 * <b>Fluent Client</b> search parameter constant for <b>indication-reference</b> 3368 * <p> 3369 * Description: <b>The situation that is being documented as an indicaton for this item, as a reference</b><br> 3370 * Type: <b>reference</b><br> 3371 * Path: <b>ClinicalUseDefinition.indication.diseaseSymptomProcedure</b><br> 3372 * </p> 3373 */ 3374 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INDICATION_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INDICATION_REFERENCE); 3375 3376/** 3377 * Constant for fluent queries to be used to add include statements. Specifies 3378 * the path value of "<b>ClinicalUseDefinition:indication-reference</b>". 3379 */ 3380 public static final ca.uhn.fhir.model.api.Include INCLUDE_INDICATION_REFERENCE = new ca.uhn.fhir.model.api.Include("ClinicalUseDefinition:indication-reference").toLocked(); 3381 3382 /** 3383 * Search parameter: <b>indication</b> 3384 * <p> 3385 * Description: <b>The situation that is being documented as an indicaton for this item, as a code</b><br> 3386 * Type: <b>token</b><br> 3387 * Path: <b>ClinicalUseDefinition.indication.diseaseSymptomProcedure</b><br> 3388 * </p> 3389 */ 3390 @SearchParamDefinition(name="indication", path="ClinicalUseDefinition.indication.diseaseSymptomProcedure", description="The situation that is being documented as an indicaton for this item, as a code", type="token" ) 3391 public static final String SP_INDICATION = "indication"; 3392 /** 3393 * <b>Fluent Client</b> search parameter constant for <b>indication</b> 3394 * <p> 3395 * Description: <b>The situation that is being documented as an indicaton for this item, as a code</b><br> 3396 * Type: <b>token</b><br> 3397 * Path: <b>ClinicalUseDefinition.indication.diseaseSymptomProcedure</b><br> 3398 * </p> 3399 */ 3400 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INDICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INDICATION); 3401 3402 /** 3403 * Search parameter: <b>interaction</b> 3404 * <p> 3405 * Description: <b>The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction</b><br> 3406 * Type: <b>token</b><br> 3407 * Path: <b>ClinicalUseDefinition.interaction.type</b><br> 3408 * </p> 3409 */ 3410 @SearchParamDefinition(name="interaction", path="ClinicalUseDefinition.interaction.type", description="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction", type="token" ) 3411 public static final String SP_INTERACTION = "interaction"; 3412 /** 3413 * <b>Fluent Client</b> search parameter constant for <b>interaction</b> 3414 * <p> 3415 * Description: <b>The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction</b><br> 3416 * Type: <b>token</b><br> 3417 * Path: <b>ClinicalUseDefinition.interaction.type</b><br> 3418 * </p> 3419 */ 3420 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTERACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTERACTION); 3421 3422 /** 3423 * Search parameter: <b>product</b> 3424 * <p> 3425 * Description: <b>The medicinal product for which this is a clinical usage issue</b><br> 3426 * Type: <b>reference</b><br> 3427 * Path: <b>ClinicalUseDefinition.subject.where(resolve() is MedicinalProductDefinition)</b><br> 3428 * </p> 3429 */ 3430 @SearchParamDefinition(name="product", path="ClinicalUseDefinition.subject.where(resolve() is MedicinalProductDefinition)", description="The medicinal product for which this is a clinical usage issue", type="reference", target={ActivityDefinition.class, Device.class, DeviceDefinition.class, Medication.class, MedicinalProductDefinition.class, PlanDefinition.class, Substance.class } ) 3431 public static final String SP_PRODUCT = "product"; 3432 /** 3433 * <b>Fluent Client</b> search parameter constant for <b>product</b> 3434 * <p> 3435 * Description: <b>The medicinal product for which this is a clinical usage issue</b><br> 3436 * Type: <b>reference</b><br> 3437 * Path: <b>ClinicalUseDefinition.subject.where(resolve() is MedicinalProductDefinition)</b><br> 3438 * </p> 3439 */ 3440 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRODUCT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRODUCT); 3441 3442/** 3443 * Constant for fluent queries to be used to add include statements. Specifies 3444 * the path value of "<b>ClinicalUseDefinition:product</b>". 3445 */ 3446 public static final ca.uhn.fhir.model.api.Include INCLUDE_PRODUCT = new ca.uhn.fhir.model.api.Include("ClinicalUseDefinition:product").toLocked(); 3447 3448 /** 3449 * Search parameter: <b>subject</b> 3450 * <p> 3451 * Description: <b>The resource for which this is a clinical usage issue</b><br> 3452 * Type: <b>reference</b><br> 3453 * Path: <b>ClinicalUseDefinition.subject</b><br> 3454 * </p> 3455 */ 3456 @SearchParamDefinition(name="subject", path="ClinicalUseDefinition.subject", description="The resource for which this is a clinical usage issue", type="reference", target={ActivityDefinition.class, Device.class, DeviceDefinition.class, Medication.class, MedicinalProductDefinition.class, PlanDefinition.class, Substance.class } ) 3457 public static final String SP_SUBJECT = "subject"; 3458 /** 3459 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 3460 * <p> 3461 * Description: <b>The resource for which this is a clinical usage issue</b><br> 3462 * Type: <b>reference</b><br> 3463 * Path: <b>ClinicalUseDefinition.subject</b><br> 3464 * </p> 3465 */ 3466 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 3467 3468/** 3469 * Constant for fluent queries to be used to add include statements. Specifies 3470 * the path value of "<b>ClinicalUseDefinition:subject</b>". 3471 */ 3472 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ClinicalUseDefinition:subject").toLocked(); 3473 3474 /** 3475 * Search parameter: <b>type</b> 3476 * <p> 3477 * Description: <b>indication | contraindication | interaction | undesirable-effect | warning</b><br> 3478 * Type: <b>token</b><br> 3479 * Path: <b>ClinicalUseDefinition.type</b><br> 3480 * </p> 3481 */ 3482 @SearchParamDefinition(name="type", path="ClinicalUseDefinition.type", description="indication | contraindication | interaction | undesirable-effect | warning", type="token" ) 3483 public static final String SP_TYPE = "type"; 3484 /** 3485 * <b>Fluent Client</b> search parameter constant for <b>type</b> 3486 * <p> 3487 * Description: <b>indication | contraindication | interaction | undesirable-effect | warning</b><br> 3488 * Type: <b>token</b><br> 3489 * Path: <b>ClinicalUseDefinition.type</b><br> 3490 * </p> 3491 */ 3492 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 3493 3494 3495} 3496