001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import ca.uhn.fhir.model.api.annotation.ResourceDef; 041import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.ChildOrder; 044import ca.uhn.fhir.model.api.annotation.Description; 045import ca.uhn.fhir.model.api.annotation.Block; 046import org.hl7.fhir.instance.model.api.*; 047import org.hl7.fhir.exceptions.FHIRException; 048/** 049 * Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex. 050 */ 051@ResourceDef(name="SubstanceSourceMaterial", profile="http://hl7.org/fhir/StructureDefinition/SubstanceSourceMaterial") 052public class SubstanceSourceMaterial extends DomainResource { 053 054 @Block() 055 public static class SubstanceSourceMaterialFractionDescriptionComponent extends BackboneElement implements IBaseBackboneElement { 056 /** 057 * This element is capturing information about the fraction of a plant part, or human plasma for fractionation. 058 */ 059 @Child(name = "fraction", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 060 @Description(shortDefinition="This element is capturing information about the fraction of a plant part, or human plasma for fractionation", formalDefinition="This element is capturing information about the fraction of a plant part, or human plasma for fractionation." ) 061 protected StringType fraction; 062 063 /** 064 * The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1. 065 */ 066 @Child(name = "materialType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 067 @Description(shortDefinition="The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1", formalDefinition="The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1." ) 068 protected CodeableConcept materialType; 069 070 private static final long serialVersionUID = -1118226733L; 071 072 /** 073 * Constructor 074 */ 075 public SubstanceSourceMaterialFractionDescriptionComponent() { 076 super(); 077 } 078 079 /** 080 * @return {@link #fraction} (This element is capturing information about the fraction of a plant part, or human plasma for fractionation.). This is the underlying object with id, value and extensions. The accessor "getFraction" gives direct access to the value 081 */ 082 public StringType getFractionElement() { 083 if (this.fraction == null) 084 if (Configuration.errorOnAutoCreate()) 085 throw new Error("Attempt to auto-create SubstanceSourceMaterialFractionDescriptionComponent.fraction"); 086 else if (Configuration.doAutoCreate()) 087 this.fraction = new StringType(); // bb 088 return this.fraction; 089 } 090 091 public boolean hasFractionElement() { 092 return this.fraction != null && !this.fraction.isEmpty(); 093 } 094 095 public boolean hasFraction() { 096 return this.fraction != null && !this.fraction.isEmpty(); 097 } 098 099 /** 100 * @param value {@link #fraction} (This element is capturing information about the fraction of a plant part, or human plasma for fractionation.). This is the underlying object with id, value and extensions. The accessor "getFraction" gives direct access to the value 101 */ 102 public SubstanceSourceMaterialFractionDescriptionComponent setFractionElement(StringType value) { 103 this.fraction = value; 104 return this; 105 } 106 107 /** 108 * @return This element is capturing information about the fraction of a plant part, or human plasma for fractionation. 109 */ 110 public String getFraction() { 111 return this.fraction == null ? null : this.fraction.getValue(); 112 } 113 114 /** 115 * @param value This element is capturing information about the fraction of a plant part, or human plasma for fractionation. 116 */ 117 public SubstanceSourceMaterialFractionDescriptionComponent setFraction(String value) { 118 if (Utilities.noString(value)) 119 this.fraction = null; 120 else { 121 if (this.fraction == null) 122 this.fraction = new StringType(); 123 this.fraction.setValue(value); 124 } 125 return this; 126 } 127 128 /** 129 * @return {@link #materialType} (The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.) 130 */ 131 public CodeableConcept getMaterialType() { 132 if (this.materialType == null) 133 if (Configuration.errorOnAutoCreate()) 134 throw new Error("Attempt to auto-create SubstanceSourceMaterialFractionDescriptionComponent.materialType"); 135 else if (Configuration.doAutoCreate()) 136 this.materialType = new CodeableConcept(); // cc 137 return this.materialType; 138 } 139 140 public boolean hasMaterialType() { 141 return this.materialType != null && !this.materialType.isEmpty(); 142 } 143 144 /** 145 * @param value {@link #materialType} (The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.) 146 */ 147 public SubstanceSourceMaterialFractionDescriptionComponent setMaterialType(CodeableConcept value) { 148 this.materialType = value; 149 return this; 150 } 151 152 protected void listChildren(List<Property> children) { 153 super.listChildren(children); 154 children.add(new Property("fraction", "string", "This element is capturing information about the fraction of a plant part, or human plasma for fractionation.", 0, 1, fraction)); 155 children.add(new Property("materialType", "CodeableConcept", "The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.", 0, 1, materialType)); 156 } 157 158 @Override 159 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 160 switch (_hash) { 161 case -1653751294: /*fraction*/ return new Property("fraction", "string", "This element is capturing information about the fraction of a plant part, or human plasma for fractionation.", 0, 1, fraction); 162 case -2115601151: /*materialType*/ return new Property("materialType", "CodeableConcept", "The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.", 0, 1, materialType); 163 default: return super.getNamedProperty(_hash, _name, _checkValid); 164 } 165 166 } 167 168 @Override 169 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 170 switch (hash) { 171 case -1653751294: /*fraction*/ return this.fraction == null ? new Base[0] : new Base[] {this.fraction}; // StringType 172 case -2115601151: /*materialType*/ return this.materialType == null ? new Base[0] : new Base[] {this.materialType}; // CodeableConcept 173 default: return super.getProperty(hash, name, checkValid); 174 } 175 176 } 177 178 @Override 179 public Base setProperty(int hash, String name, Base value) throws FHIRException { 180 switch (hash) { 181 case -1653751294: // fraction 182 this.fraction = castToString(value); // StringType 183 return value; 184 case -2115601151: // materialType 185 this.materialType = castToCodeableConcept(value); // CodeableConcept 186 return value; 187 default: return super.setProperty(hash, name, value); 188 } 189 190 } 191 192 @Override 193 public Base setProperty(String name, Base value) throws FHIRException { 194 if (name.equals("fraction")) { 195 this.fraction = castToString(value); // StringType 196 } else if (name.equals("materialType")) { 197 this.materialType = castToCodeableConcept(value); // CodeableConcept 198 } else 199 return super.setProperty(name, value); 200 return value; 201 } 202 203 @Override 204 public Base makeProperty(int hash, String name) throws FHIRException { 205 switch (hash) { 206 case -1653751294: return getFractionElement(); 207 case -2115601151: return getMaterialType(); 208 default: return super.makeProperty(hash, name); 209 } 210 211 } 212 213 @Override 214 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 215 switch (hash) { 216 case -1653751294: /*fraction*/ return new String[] {"string"}; 217 case -2115601151: /*materialType*/ return new String[] {"CodeableConcept"}; 218 default: return super.getTypesForProperty(hash, name); 219 } 220 221 } 222 223 @Override 224 public Base addChild(String name) throws FHIRException { 225 if (name.equals("fraction")) { 226 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.fraction"); 227 } 228 else if (name.equals("materialType")) { 229 this.materialType = new CodeableConcept(); 230 return this.materialType; 231 } 232 else 233 return super.addChild(name); 234 } 235 236 public SubstanceSourceMaterialFractionDescriptionComponent copy() { 237 SubstanceSourceMaterialFractionDescriptionComponent dst = new SubstanceSourceMaterialFractionDescriptionComponent(); 238 copyValues(dst); 239 return dst; 240 } 241 242 public void copyValues(SubstanceSourceMaterialFractionDescriptionComponent dst) { 243 super.copyValues(dst); 244 dst.fraction = fraction == null ? null : fraction.copy(); 245 dst.materialType = materialType == null ? null : materialType.copy(); 246 } 247 248 @Override 249 public boolean equalsDeep(Base other_) { 250 if (!super.equalsDeep(other_)) 251 return false; 252 if (!(other_ instanceof SubstanceSourceMaterialFractionDescriptionComponent)) 253 return false; 254 SubstanceSourceMaterialFractionDescriptionComponent o = (SubstanceSourceMaterialFractionDescriptionComponent) other_; 255 return compareDeep(fraction, o.fraction, true) && compareDeep(materialType, o.materialType, true) 256 ; 257 } 258 259 @Override 260 public boolean equalsShallow(Base other_) { 261 if (!super.equalsShallow(other_)) 262 return false; 263 if (!(other_ instanceof SubstanceSourceMaterialFractionDescriptionComponent)) 264 return false; 265 SubstanceSourceMaterialFractionDescriptionComponent o = (SubstanceSourceMaterialFractionDescriptionComponent) other_; 266 return compareValues(fraction, o.fraction, true); 267 } 268 269 public boolean isEmpty() { 270 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(fraction, materialType); 271 } 272 273 public String fhirType() { 274 return "SubstanceSourceMaterial.fractionDescription"; 275 276 } 277 278 } 279 280 @Block() 281 public static class SubstanceSourceMaterialOrganismComponent extends BackboneElement implements IBaseBackboneElement { 282 /** 283 * The family of an organism shall be specified. 284 */ 285 @Child(name = "family", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 286 @Description(shortDefinition="The family of an organism shall be specified", formalDefinition="The family of an organism shall be specified." ) 287 protected CodeableConcept family; 288 289 /** 290 * The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies. 291 */ 292 @Child(name = "genus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 293 @Description(shortDefinition="The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies", formalDefinition="The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies." ) 294 protected CodeableConcept genus; 295 296 /** 297 * The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies. 298 */ 299 @Child(name = "species", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 300 @Description(shortDefinition="The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies", formalDefinition="The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies." ) 301 protected CodeableConcept species; 302 303 /** 304 * The Intraspecific type of an organism shall be specified. 305 */ 306 @Child(name = "intraspecificType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 307 @Description(shortDefinition="The Intraspecific type of an organism shall be specified", formalDefinition="The Intraspecific type of an organism shall be specified." ) 308 protected CodeableConcept intraspecificType; 309 310 /** 311 * The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention. 312 */ 313 @Child(name = "intraspecificDescription", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 314 @Description(shortDefinition="The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention", formalDefinition="The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention." ) 315 protected StringType intraspecificDescription; 316 317 /** 318 * 4.9.13.6.1 Author type (Conditional). 319 */ 320 @Child(name = "author", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 321 @Description(shortDefinition="4.9.13.6.1 Author type (Conditional)", formalDefinition="4.9.13.6.1 Author type (Conditional)." ) 322 protected List<SubstanceSourceMaterialOrganismAuthorComponent> author; 323 324 /** 325 * 4.9.13.8.1 Hybrid species maternal organism ID (Optional). 326 */ 327 @Child(name = "hybrid", type = {}, order=7, min=0, max=1, modifier=false, summary=true) 328 @Description(shortDefinition="4.9.13.8.1 Hybrid species maternal organism ID (Optional)", formalDefinition="4.9.13.8.1 Hybrid species maternal organism ID (Optional)." ) 329 protected SubstanceSourceMaterialOrganismHybridComponent hybrid; 330 331 /** 332 * 4.9.13.7.1 Kingdom (Conditional). 333 */ 334 @Child(name = "organismGeneral", type = {}, order=8, min=0, max=1, modifier=false, summary=true) 335 @Description(shortDefinition="4.9.13.7.1 Kingdom (Conditional)", formalDefinition="4.9.13.7.1 Kingdom (Conditional)." ) 336 protected SubstanceSourceMaterialOrganismOrganismGeneralComponent organismGeneral; 337 338 private static final long serialVersionUID = 941648312L; 339 340 /** 341 * Constructor 342 */ 343 public SubstanceSourceMaterialOrganismComponent() { 344 super(); 345 } 346 347 /** 348 * @return {@link #family} (The family of an organism shall be specified.) 349 */ 350 public CodeableConcept getFamily() { 351 if (this.family == null) 352 if (Configuration.errorOnAutoCreate()) 353 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.family"); 354 else if (Configuration.doAutoCreate()) 355 this.family = new CodeableConcept(); // cc 356 return this.family; 357 } 358 359 public boolean hasFamily() { 360 return this.family != null && !this.family.isEmpty(); 361 } 362 363 /** 364 * @param value {@link #family} (The family of an organism shall be specified.) 365 */ 366 public SubstanceSourceMaterialOrganismComponent setFamily(CodeableConcept value) { 367 this.family = value; 368 return this; 369 } 370 371 /** 372 * @return {@link #genus} (The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.) 373 */ 374 public CodeableConcept getGenus() { 375 if (this.genus == null) 376 if (Configuration.errorOnAutoCreate()) 377 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.genus"); 378 else if (Configuration.doAutoCreate()) 379 this.genus = new CodeableConcept(); // cc 380 return this.genus; 381 } 382 383 public boolean hasGenus() { 384 return this.genus != null && !this.genus.isEmpty(); 385 } 386 387 /** 388 * @param value {@link #genus} (The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.) 389 */ 390 public SubstanceSourceMaterialOrganismComponent setGenus(CodeableConcept value) { 391 this.genus = value; 392 return this; 393 } 394 395 /** 396 * @return {@link #species} (The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.) 397 */ 398 public CodeableConcept getSpecies() { 399 if (this.species == null) 400 if (Configuration.errorOnAutoCreate()) 401 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.species"); 402 else if (Configuration.doAutoCreate()) 403 this.species = new CodeableConcept(); // cc 404 return this.species; 405 } 406 407 public boolean hasSpecies() { 408 return this.species != null && !this.species.isEmpty(); 409 } 410 411 /** 412 * @param value {@link #species} (The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.) 413 */ 414 public SubstanceSourceMaterialOrganismComponent setSpecies(CodeableConcept value) { 415 this.species = value; 416 return this; 417 } 418 419 /** 420 * @return {@link #intraspecificType} (The Intraspecific type of an organism shall be specified.) 421 */ 422 public CodeableConcept getIntraspecificType() { 423 if (this.intraspecificType == null) 424 if (Configuration.errorOnAutoCreate()) 425 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.intraspecificType"); 426 else if (Configuration.doAutoCreate()) 427 this.intraspecificType = new CodeableConcept(); // cc 428 return this.intraspecificType; 429 } 430 431 public boolean hasIntraspecificType() { 432 return this.intraspecificType != null && !this.intraspecificType.isEmpty(); 433 } 434 435 /** 436 * @param value {@link #intraspecificType} (The Intraspecific type of an organism shall be specified.) 437 */ 438 public SubstanceSourceMaterialOrganismComponent setIntraspecificType(CodeableConcept value) { 439 this.intraspecificType = value; 440 return this; 441 } 442 443 /** 444 * @return {@link #intraspecificDescription} (The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.). This is the underlying object with id, value and extensions. The accessor "getIntraspecificDescription" gives direct access to the value 445 */ 446 public StringType getIntraspecificDescriptionElement() { 447 if (this.intraspecificDescription == null) 448 if (Configuration.errorOnAutoCreate()) 449 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.intraspecificDescription"); 450 else if (Configuration.doAutoCreate()) 451 this.intraspecificDescription = new StringType(); // bb 452 return this.intraspecificDescription; 453 } 454 455 public boolean hasIntraspecificDescriptionElement() { 456 return this.intraspecificDescription != null && !this.intraspecificDescription.isEmpty(); 457 } 458 459 public boolean hasIntraspecificDescription() { 460 return this.intraspecificDescription != null && !this.intraspecificDescription.isEmpty(); 461 } 462 463 /** 464 * @param value {@link #intraspecificDescription} (The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.). This is the underlying object with id, value and extensions. The accessor "getIntraspecificDescription" gives direct access to the value 465 */ 466 public SubstanceSourceMaterialOrganismComponent setIntraspecificDescriptionElement(StringType value) { 467 this.intraspecificDescription = value; 468 return this; 469 } 470 471 /** 472 * @return The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention. 473 */ 474 public String getIntraspecificDescription() { 475 return this.intraspecificDescription == null ? null : this.intraspecificDescription.getValue(); 476 } 477 478 /** 479 * @param value The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention. 480 */ 481 public SubstanceSourceMaterialOrganismComponent setIntraspecificDescription(String value) { 482 if (Utilities.noString(value)) 483 this.intraspecificDescription = null; 484 else { 485 if (this.intraspecificDescription == null) 486 this.intraspecificDescription = new StringType(); 487 this.intraspecificDescription.setValue(value); 488 } 489 return this; 490 } 491 492 /** 493 * @return {@link #author} (4.9.13.6.1 Author type (Conditional).) 494 */ 495 public List<SubstanceSourceMaterialOrganismAuthorComponent> getAuthor() { 496 if (this.author == null) 497 this.author = new ArrayList<SubstanceSourceMaterialOrganismAuthorComponent>(); 498 return this.author; 499 } 500 501 /** 502 * @return Returns a reference to <code>this</code> for easy method chaining 503 */ 504 public SubstanceSourceMaterialOrganismComponent setAuthor(List<SubstanceSourceMaterialOrganismAuthorComponent> theAuthor) { 505 this.author = theAuthor; 506 return this; 507 } 508 509 public boolean hasAuthor() { 510 if (this.author == null) 511 return false; 512 for (SubstanceSourceMaterialOrganismAuthorComponent item : this.author) 513 if (!item.isEmpty()) 514 return true; 515 return false; 516 } 517 518 public SubstanceSourceMaterialOrganismAuthorComponent addAuthor() { //3 519 SubstanceSourceMaterialOrganismAuthorComponent t = new SubstanceSourceMaterialOrganismAuthorComponent(); 520 if (this.author == null) 521 this.author = new ArrayList<SubstanceSourceMaterialOrganismAuthorComponent>(); 522 this.author.add(t); 523 return t; 524 } 525 526 public SubstanceSourceMaterialOrganismComponent addAuthor(SubstanceSourceMaterialOrganismAuthorComponent t) { //3 527 if (t == null) 528 return this; 529 if (this.author == null) 530 this.author = new ArrayList<SubstanceSourceMaterialOrganismAuthorComponent>(); 531 this.author.add(t); 532 return this; 533 } 534 535 /** 536 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist 537 */ 538 public SubstanceSourceMaterialOrganismAuthorComponent getAuthorFirstRep() { 539 if (getAuthor().isEmpty()) { 540 addAuthor(); 541 } 542 return getAuthor().get(0); 543 } 544 545 /** 546 * @return {@link #hybrid} (4.9.13.8.1 Hybrid species maternal organism ID (Optional).) 547 */ 548 public SubstanceSourceMaterialOrganismHybridComponent getHybrid() { 549 if (this.hybrid == null) 550 if (Configuration.errorOnAutoCreate()) 551 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.hybrid"); 552 else if (Configuration.doAutoCreate()) 553 this.hybrid = new SubstanceSourceMaterialOrganismHybridComponent(); // cc 554 return this.hybrid; 555 } 556 557 public boolean hasHybrid() { 558 return this.hybrid != null && !this.hybrid.isEmpty(); 559 } 560 561 /** 562 * @param value {@link #hybrid} (4.9.13.8.1 Hybrid species maternal organism ID (Optional).) 563 */ 564 public SubstanceSourceMaterialOrganismComponent setHybrid(SubstanceSourceMaterialOrganismHybridComponent value) { 565 this.hybrid = value; 566 return this; 567 } 568 569 /** 570 * @return {@link #organismGeneral} (4.9.13.7.1 Kingdom (Conditional).) 571 */ 572 public SubstanceSourceMaterialOrganismOrganismGeneralComponent getOrganismGeneral() { 573 if (this.organismGeneral == null) 574 if (Configuration.errorOnAutoCreate()) 575 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismComponent.organismGeneral"); 576 else if (Configuration.doAutoCreate()) 577 this.organismGeneral = new SubstanceSourceMaterialOrganismOrganismGeneralComponent(); // cc 578 return this.organismGeneral; 579 } 580 581 public boolean hasOrganismGeneral() { 582 return this.organismGeneral != null && !this.organismGeneral.isEmpty(); 583 } 584 585 /** 586 * @param value {@link #organismGeneral} (4.9.13.7.1 Kingdom (Conditional).) 587 */ 588 public SubstanceSourceMaterialOrganismComponent setOrganismGeneral(SubstanceSourceMaterialOrganismOrganismGeneralComponent value) { 589 this.organismGeneral = value; 590 return this; 591 } 592 593 protected void listChildren(List<Property> children) { 594 super.listChildren(children); 595 children.add(new Property("family", "CodeableConcept", "The family of an organism shall be specified.", 0, 1, family)); 596 children.add(new Property("genus", "CodeableConcept", "The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.", 0, 1, genus)); 597 children.add(new Property("species", "CodeableConcept", "The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.", 0, 1, species)); 598 children.add(new Property("intraspecificType", "CodeableConcept", "The Intraspecific type of an organism shall be specified.", 0, 1, intraspecificType)); 599 children.add(new Property("intraspecificDescription", "string", "The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.", 0, 1, intraspecificDescription)); 600 children.add(new Property("author", "", "4.9.13.6.1 Author type (Conditional).", 0, java.lang.Integer.MAX_VALUE, author)); 601 children.add(new Property("hybrid", "", "4.9.13.8.1 Hybrid species maternal organism ID (Optional).", 0, 1, hybrid)); 602 children.add(new Property("organismGeneral", "", "4.9.13.7.1 Kingdom (Conditional).", 0, 1, organismGeneral)); 603 } 604 605 @Override 606 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 607 switch (_hash) { 608 case -1281860764: /*family*/ return new Property("family", "CodeableConcept", "The family of an organism shall be specified.", 0, 1, family); 609 case 98241006: /*genus*/ return new Property("genus", "CodeableConcept", "The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.", 0, 1, genus); 610 case -2008465092: /*species*/ return new Property("species", "CodeableConcept", "The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.", 0, 1, species); 611 case 1717161194: /*intraspecificType*/ return new Property("intraspecificType", "CodeableConcept", "The Intraspecific type of an organism shall be specified.", 0, 1, intraspecificType); 612 case -1473085364: /*intraspecificDescription*/ return new Property("intraspecificDescription", "string", "The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.", 0, 1, intraspecificDescription); 613 case -1406328437: /*author*/ return new Property("author", "", "4.9.13.6.1 Author type (Conditional).", 0, java.lang.Integer.MAX_VALUE, author); 614 case -1202757124: /*hybrid*/ return new Property("hybrid", "", "4.9.13.8.1 Hybrid species maternal organism ID (Optional).", 0, 1, hybrid); 615 case -865996874: /*organismGeneral*/ return new Property("organismGeneral", "", "4.9.13.7.1 Kingdom (Conditional).", 0, 1, organismGeneral); 616 default: return super.getNamedProperty(_hash, _name, _checkValid); 617 } 618 619 } 620 621 @Override 622 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 623 switch (hash) { 624 case -1281860764: /*family*/ return this.family == null ? new Base[0] : new Base[] {this.family}; // CodeableConcept 625 case 98241006: /*genus*/ return this.genus == null ? new Base[0] : new Base[] {this.genus}; // CodeableConcept 626 case -2008465092: /*species*/ return this.species == null ? new Base[0] : new Base[] {this.species}; // CodeableConcept 627 case 1717161194: /*intraspecificType*/ return this.intraspecificType == null ? new Base[0] : new Base[] {this.intraspecificType}; // CodeableConcept 628 case -1473085364: /*intraspecificDescription*/ return this.intraspecificDescription == null ? new Base[0] : new Base[] {this.intraspecificDescription}; // StringType 629 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // SubstanceSourceMaterialOrganismAuthorComponent 630 case -1202757124: /*hybrid*/ return this.hybrid == null ? new Base[0] : new Base[] {this.hybrid}; // SubstanceSourceMaterialOrganismHybridComponent 631 case -865996874: /*organismGeneral*/ return this.organismGeneral == null ? new Base[0] : new Base[] {this.organismGeneral}; // SubstanceSourceMaterialOrganismOrganismGeneralComponent 632 default: return super.getProperty(hash, name, checkValid); 633 } 634 635 } 636 637 @Override 638 public Base setProperty(int hash, String name, Base value) throws FHIRException { 639 switch (hash) { 640 case -1281860764: // family 641 this.family = castToCodeableConcept(value); // CodeableConcept 642 return value; 643 case 98241006: // genus 644 this.genus = castToCodeableConcept(value); // CodeableConcept 645 return value; 646 case -2008465092: // species 647 this.species = castToCodeableConcept(value); // CodeableConcept 648 return value; 649 case 1717161194: // intraspecificType 650 this.intraspecificType = castToCodeableConcept(value); // CodeableConcept 651 return value; 652 case -1473085364: // intraspecificDescription 653 this.intraspecificDescription = castToString(value); // StringType 654 return value; 655 case -1406328437: // author 656 this.getAuthor().add((SubstanceSourceMaterialOrganismAuthorComponent) value); // SubstanceSourceMaterialOrganismAuthorComponent 657 return value; 658 case -1202757124: // hybrid 659 this.hybrid = (SubstanceSourceMaterialOrganismHybridComponent) value; // SubstanceSourceMaterialOrganismHybridComponent 660 return value; 661 case -865996874: // organismGeneral 662 this.organismGeneral = (SubstanceSourceMaterialOrganismOrganismGeneralComponent) value; // SubstanceSourceMaterialOrganismOrganismGeneralComponent 663 return value; 664 default: return super.setProperty(hash, name, value); 665 } 666 667 } 668 669 @Override 670 public Base setProperty(String name, Base value) throws FHIRException { 671 if (name.equals("family")) { 672 this.family = castToCodeableConcept(value); // CodeableConcept 673 } else if (name.equals("genus")) { 674 this.genus = castToCodeableConcept(value); // CodeableConcept 675 } else if (name.equals("species")) { 676 this.species = castToCodeableConcept(value); // CodeableConcept 677 } else if (name.equals("intraspecificType")) { 678 this.intraspecificType = castToCodeableConcept(value); // CodeableConcept 679 } else if (name.equals("intraspecificDescription")) { 680 this.intraspecificDescription = castToString(value); // StringType 681 } else if (name.equals("author")) { 682 this.getAuthor().add((SubstanceSourceMaterialOrganismAuthorComponent) value); 683 } else if (name.equals("hybrid")) { 684 this.hybrid = (SubstanceSourceMaterialOrganismHybridComponent) value; // SubstanceSourceMaterialOrganismHybridComponent 685 } else if (name.equals("organismGeneral")) { 686 this.organismGeneral = (SubstanceSourceMaterialOrganismOrganismGeneralComponent) value; // SubstanceSourceMaterialOrganismOrganismGeneralComponent 687 } else 688 return super.setProperty(name, value); 689 return value; 690 } 691 692 @Override 693 public Base makeProperty(int hash, String name) throws FHIRException { 694 switch (hash) { 695 case -1281860764: return getFamily(); 696 case 98241006: return getGenus(); 697 case -2008465092: return getSpecies(); 698 case 1717161194: return getIntraspecificType(); 699 case -1473085364: return getIntraspecificDescriptionElement(); 700 case -1406328437: return addAuthor(); 701 case -1202757124: return getHybrid(); 702 case -865996874: return getOrganismGeneral(); 703 default: return super.makeProperty(hash, name); 704 } 705 706 } 707 708 @Override 709 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 710 switch (hash) { 711 case -1281860764: /*family*/ return new String[] {"CodeableConcept"}; 712 case 98241006: /*genus*/ return new String[] {"CodeableConcept"}; 713 case -2008465092: /*species*/ return new String[] {"CodeableConcept"}; 714 case 1717161194: /*intraspecificType*/ return new String[] {"CodeableConcept"}; 715 case -1473085364: /*intraspecificDescription*/ return new String[] {"string"}; 716 case -1406328437: /*author*/ return new String[] {}; 717 case -1202757124: /*hybrid*/ return new String[] {}; 718 case -865996874: /*organismGeneral*/ return new String[] {}; 719 default: return super.getTypesForProperty(hash, name); 720 } 721 722 } 723 724 @Override 725 public Base addChild(String name) throws FHIRException { 726 if (name.equals("family")) { 727 this.family = new CodeableConcept(); 728 return this.family; 729 } 730 else if (name.equals("genus")) { 731 this.genus = new CodeableConcept(); 732 return this.genus; 733 } 734 else if (name.equals("species")) { 735 this.species = new CodeableConcept(); 736 return this.species; 737 } 738 else if (name.equals("intraspecificType")) { 739 this.intraspecificType = new CodeableConcept(); 740 return this.intraspecificType; 741 } 742 else if (name.equals("intraspecificDescription")) { 743 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.intraspecificDescription"); 744 } 745 else if (name.equals("author")) { 746 return addAuthor(); 747 } 748 else if (name.equals("hybrid")) { 749 this.hybrid = new SubstanceSourceMaterialOrganismHybridComponent(); 750 return this.hybrid; 751 } 752 else if (name.equals("organismGeneral")) { 753 this.organismGeneral = new SubstanceSourceMaterialOrganismOrganismGeneralComponent(); 754 return this.organismGeneral; 755 } 756 else 757 return super.addChild(name); 758 } 759 760 public SubstanceSourceMaterialOrganismComponent copy() { 761 SubstanceSourceMaterialOrganismComponent dst = new SubstanceSourceMaterialOrganismComponent(); 762 copyValues(dst); 763 return dst; 764 } 765 766 public void copyValues(SubstanceSourceMaterialOrganismComponent dst) { 767 super.copyValues(dst); 768 dst.family = family == null ? null : family.copy(); 769 dst.genus = genus == null ? null : genus.copy(); 770 dst.species = species == null ? null : species.copy(); 771 dst.intraspecificType = intraspecificType == null ? null : intraspecificType.copy(); 772 dst.intraspecificDescription = intraspecificDescription == null ? null : intraspecificDescription.copy(); 773 if (author != null) { 774 dst.author = new ArrayList<SubstanceSourceMaterialOrganismAuthorComponent>(); 775 for (SubstanceSourceMaterialOrganismAuthorComponent i : author) 776 dst.author.add(i.copy()); 777 }; 778 dst.hybrid = hybrid == null ? null : hybrid.copy(); 779 dst.organismGeneral = organismGeneral == null ? null : organismGeneral.copy(); 780 } 781 782 @Override 783 public boolean equalsDeep(Base other_) { 784 if (!super.equalsDeep(other_)) 785 return false; 786 if (!(other_ instanceof SubstanceSourceMaterialOrganismComponent)) 787 return false; 788 SubstanceSourceMaterialOrganismComponent o = (SubstanceSourceMaterialOrganismComponent) other_; 789 return compareDeep(family, o.family, true) && compareDeep(genus, o.genus, true) && compareDeep(species, o.species, true) 790 && compareDeep(intraspecificType, o.intraspecificType, true) && compareDeep(intraspecificDescription, o.intraspecificDescription, true) 791 && compareDeep(author, o.author, true) && compareDeep(hybrid, o.hybrid, true) && compareDeep(organismGeneral, o.organismGeneral, true) 792 ; 793 } 794 795 @Override 796 public boolean equalsShallow(Base other_) { 797 if (!super.equalsShallow(other_)) 798 return false; 799 if (!(other_ instanceof SubstanceSourceMaterialOrganismComponent)) 800 return false; 801 SubstanceSourceMaterialOrganismComponent o = (SubstanceSourceMaterialOrganismComponent) other_; 802 return compareValues(intraspecificDescription, o.intraspecificDescription, true); 803 } 804 805 public boolean isEmpty() { 806 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(family, genus, species, intraspecificType 807 , intraspecificDescription, author, hybrid, organismGeneral); 808 } 809 810 public String fhirType() { 811 return "SubstanceSourceMaterial.organism"; 812 813 } 814 815 } 816 817 @Block() 818 public static class SubstanceSourceMaterialOrganismAuthorComponent extends BackboneElement implements IBaseBackboneElement { 819 /** 820 * The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name. 821 */ 822 @Child(name = "authorType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 823 @Description(shortDefinition="The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name", formalDefinition="The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name." ) 824 protected CodeableConcept authorType; 825 826 /** 827 * The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank). 828 */ 829 @Child(name = "authorDescription", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 830 @Description(shortDefinition="The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank)", formalDefinition="The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank)." ) 831 protected StringType authorDescription; 832 833 private static final long serialVersionUID = 1429770120L; 834 835 /** 836 * Constructor 837 */ 838 public SubstanceSourceMaterialOrganismAuthorComponent() { 839 super(); 840 } 841 842 /** 843 * @return {@link #authorType} (The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.) 844 */ 845 public CodeableConcept getAuthorType() { 846 if (this.authorType == null) 847 if (Configuration.errorOnAutoCreate()) 848 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismAuthorComponent.authorType"); 849 else if (Configuration.doAutoCreate()) 850 this.authorType = new CodeableConcept(); // cc 851 return this.authorType; 852 } 853 854 public boolean hasAuthorType() { 855 return this.authorType != null && !this.authorType.isEmpty(); 856 } 857 858 /** 859 * @param value {@link #authorType} (The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.) 860 */ 861 public SubstanceSourceMaterialOrganismAuthorComponent setAuthorType(CodeableConcept value) { 862 this.authorType = value; 863 return this; 864 } 865 866 /** 867 * @return {@link #authorDescription} (The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).). This is the underlying object with id, value and extensions. The accessor "getAuthorDescription" gives direct access to the value 868 */ 869 public StringType getAuthorDescriptionElement() { 870 if (this.authorDescription == null) 871 if (Configuration.errorOnAutoCreate()) 872 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismAuthorComponent.authorDescription"); 873 else if (Configuration.doAutoCreate()) 874 this.authorDescription = new StringType(); // bb 875 return this.authorDescription; 876 } 877 878 public boolean hasAuthorDescriptionElement() { 879 return this.authorDescription != null && !this.authorDescription.isEmpty(); 880 } 881 882 public boolean hasAuthorDescription() { 883 return this.authorDescription != null && !this.authorDescription.isEmpty(); 884 } 885 886 /** 887 * @param value {@link #authorDescription} (The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).). This is the underlying object with id, value and extensions. The accessor "getAuthorDescription" gives direct access to the value 888 */ 889 public SubstanceSourceMaterialOrganismAuthorComponent setAuthorDescriptionElement(StringType value) { 890 this.authorDescription = value; 891 return this; 892 } 893 894 /** 895 * @return The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank). 896 */ 897 public String getAuthorDescription() { 898 return this.authorDescription == null ? null : this.authorDescription.getValue(); 899 } 900 901 /** 902 * @param value The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank). 903 */ 904 public SubstanceSourceMaterialOrganismAuthorComponent setAuthorDescription(String value) { 905 if (Utilities.noString(value)) 906 this.authorDescription = null; 907 else { 908 if (this.authorDescription == null) 909 this.authorDescription = new StringType(); 910 this.authorDescription.setValue(value); 911 } 912 return this; 913 } 914 915 protected void listChildren(List<Property> children) { 916 super.listChildren(children); 917 children.add(new Property("authorType", "CodeableConcept", "The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.", 0, 1, authorType)); 918 children.add(new Property("authorDescription", "string", "The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).", 0, 1, authorDescription)); 919 } 920 921 @Override 922 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 923 switch (_hash) { 924 case -1501337755: /*authorType*/ return new Property("authorType", "CodeableConcept", "The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.", 0, 1, authorType); 925 case -166185615: /*authorDescription*/ return new Property("authorDescription", "string", "The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).", 0, 1, authorDescription); 926 default: return super.getNamedProperty(_hash, _name, _checkValid); 927 } 928 929 } 930 931 @Override 932 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 933 switch (hash) { 934 case -1501337755: /*authorType*/ return this.authorType == null ? new Base[0] : new Base[] {this.authorType}; // CodeableConcept 935 case -166185615: /*authorDescription*/ return this.authorDescription == null ? new Base[0] : new Base[] {this.authorDescription}; // StringType 936 default: return super.getProperty(hash, name, checkValid); 937 } 938 939 } 940 941 @Override 942 public Base setProperty(int hash, String name, Base value) throws FHIRException { 943 switch (hash) { 944 case -1501337755: // authorType 945 this.authorType = castToCodeableConcept(value); // CodeableConcept 946 return value; 947 case -166185615: // authorDescription 948 this.authorDescription = castToString(value); // StringType 949 return value; 950 default: return super.setProperty(hash, name, value); 951 } 952 953 } 954 955 @Override 956 public Base setProperty(String name, Base value) throws FHIRException { 957 if (name.equals("authorType")) { 958 this.authorType = castToCodeableConcept(value); // CodeableConcept 959 } else if (name.equals("authorDescription")) { 960 this.authorDescription = castToString(value); // StringType 961 } else 962 return super.setProperty(name, value); 963 return value; 964 } 965 966 @Override 967 public Base makeProperty(int hash, String name) throws FHIRException { 968 switch (hash) { 969 case -1501337755: return getAuthorType(); 970 case -166185615: return getAuthorDescriptionElement(); 971 default: return super.makeProperty(hash, name); 972 } 973 974 } 975 976 @Override 977 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 978 switch (hash) { 979 case -1501337755: /*authorType*/ return new String[] {"CodeableConcept"}; 980 case -166185615: /*authorDescription*/ return new String[] {"string"}; 981 default: return super.getTypesForProperty(hash, name); 982 } 983 984 } 985 986 @Override 987 public Base addChild(String name) throws FHIRException { 988 if (name.equals("authorType")) { 989 this.authorType = new CodeableConcept(); 990 return this.authorType; 991 } 992 else if (name.equals("authorDescription")) { 993 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.authorDescription"); 994 } 995 else 996 return super.addChild(name); 997 } 998 999 public SubstanceSourceMaterialOrganismAuthorComponent copy() { 1000 SubstanceSourceMaterialOrganismAuthorComponent dst = new SubstanceSourceMaterialOrganismAuthorComponent(); 1001 copyValues(dst); 1002 return dst; 1003 } 1004 1005 public void copyValues(SubstanceSourceMaterialOrganismAuthorComponent dst) { 1006 super.copyValues(dst); 1007 dst.authorType = authorType == null ? null : authorType.copy(); 1008 dst.authorDescription = authorDescription == null ? null : authorDescription.copy(); 1009 } 1010 1011 @Override 1012 public boolean equalsDeep(Base other_) { 1013 if (!super.equalsDeep(other_)) 1014 return false; 1015 if (!(other_ instanceof SubstanceSourceMaterialOrganismAuthorComponent)) 1016 return false; 1017 SubstanceSourceMaterialOrganismAuthorComponent o = (SubstanceSourceMaterialOrganismAuthorComponent) other_; 1018 return compareDeep(authorType, o.authorType, true) && compareDeep(authorDescription, o.authorDescription, true) 1019 ; 1020 } 1021 1022 @Override 1023 public boolean equalsShallow(Base other_) { 1024 if (!super.equalsShallow(other_)) 1025 return false; 1026 if (!(other_ instanceof SubstanceSourceMaterialOrganismAuthorComponent)) 1027 return false; 1028 SubstanceSourceMaterialOrganismAuthorComponent o = (SubstanceSourceMaterialOrganismAuthorComponent) other_; 1029 return compareValues(authorDescription, o.authorDescription, true); 1030 } 1031 1032 public boolean isEmpty() { 1033 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(authorType, authorDescription 1034 ); 1035 } 1036 1037 public String fhirType() { 1038 return "SubstanceSourceMaterial.organism.author"; 1039 1040 } 1041 1042 } 1043 1044 @Block() 1045 public static class SubstanceSourceMaterialOrganismHybridComponent extends BackboneElement implements IBaseBackboneElement { 1046 /** 1047 * The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1048 */ 1049 @Child(name = "maternalOrganismId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 1050 @Description(shortDefinition="The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal", formalDefinition="The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal." ) 1051 protected StringType maternalOrganismId; 1052 1053 /** 1054 * The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1055 */ 1056 @Child(name = "maternalOrganismName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1057 @Description(shortDefinition="The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal", formalDefinition="The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal." ) 1058 protected StringType maternalOrganismName; 1059 1060 /** 1061 * The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. 1062 */ 1063 @Child(name = "paternalOrganismId", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1064 @Description(shortDefinition="The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary", formalDefinition="The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary." ) 1065 protected StringType paternalOrganismId; 1066 1067 /** 1068 * The name of the paternal species constituting the hybrid organism shall be specified. 1069 */ 1070 @Child(name = "paternalOrganismName", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 1071 @Description(shortDefinition="The name of the paternal species constituting the hybrid organism shall be specified", formalDefinition="The name of the paternal species constituting the hybrid organism shall be specified." ) 1072 protected StringType paternalOrganismName; 1073 1074 /** 1075 * The hybrid type of an organism shall be specified. 1076 */ 1077 @Child(name = "hybridType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 1078 @Description(shortDefinition="The hybrid type of an organism shall be specified", formalDefinition="The hybrid type of an organism shall be specified." ) 1079 protected CodeableConcept hybridType; 1080 1081 private static final long serialVersionUID = 1981189787L; 1082 1083 /** 1084 * Constructor 1085 */ 1086 public SubstanceSourceMaterialOrganismHybridComponent() { 1087 super(); 1088 } 1089 1090 /** 1091 * @return {@link #maternalOrganismId} (The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.). This is the underlying object with id, value and extensions. The accessor "getMaternalOrganismId" gives direct access to the value 1092 */ 1093 public StringType getMaternalOrganismIdElement() { 1094 if (this.maternalOrganismId == null) 1095 if (Configuration.errorOnAutoCreate()) 1096 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismHybridComponent.maternalOrganismId"); 1097 else if (Configuration.doAutoCreate()) 1098 this.maternalOrganismId = new StringType(); // bb 1099 return this.maternalOrganismId; 1100 } 1101 1102 public boolean hasMaternalOrganismIdElement() { 1103 return this.maternalOrganismId != null && !this.maternalOrganismId.isEmpty(); 1104 } 1105 1106 public boolean hasMaternalOrganismId() { 1107 return this.maternalOrganismId != null && !this.maternalOrganismId.isEmpty(); 1108 } 1109 1110 /** 1111 * @param value {@link #maternalOrganismId} (The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.). This is the underlying object with id, value and extensions. The accessor "getMaternalOrganismId" gives direct access to the value 1112 */ 1113 public SubstanceSourceMaterialOrganismHybridComponent setMaternalOrganismIdElement(StringType value) { 1114 this.maternalOrganismId = value; 1115 return this; 1116 } 1117 1118 /** 1119 * @return The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1120 */ 1121 public String getMaternalOrganismId() { 1122 return this.maternalOrganismId == null ? null : this.maternalOrganismId.getValue(); 1123 } 1124 1125 /** 1126 * @param value The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1127 */ 1128 public SubstanceSourceMaterialOrganismHybridComponent setMaternalOrganismId(String value) { 1129 if (Utilities.noString(value)) 1130 this.maternalOrganismId = null; 1131 else { 1132 if (this.maternalOrganismId == null) 1133 this.maternalOrganismId = new StringType(); 1134 this.maternalOrganismId.setValue(value); 1135 } 1136 return this; 1137 } 1138 1139 /** 1140 * @return {@link #maternalOrganismName} (The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.). This is the underlying object with id, value and extensions. The accessor "getMaternalOrganismName" gives direct access to the value 1141 */ 1142 public StringType getMaternalOrganismNameElement() { 1143 if (this.maternalOrganismName == null) 1144 if (Configuration.errorOnAutoCreate()) 1145 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismHybridComponent.maternalOrganismName"); 1146 else if (Configuration.doAutoCreate()) 1147 this.maternalOrganismName = new StringType(); // bb 1148 return this.maternalOrganismName; 1149 } 1150 1151 public boolean hasMaternalOrganismNameElement() { 1152 return this.maternalOrganismName != null && !this.maternalOrganismName.isEmpty(); 1153 } 1154 1155 public boolean hasMaternalOrganismName() { 1156 return this.maternalOrganismName != null && !this.maternalOrganismName.isEmpty(); 1157 } 1158 1159 /** 1160 * @param value {@link #maternalOrganismName} (The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.). This is the underlying object with id, value and extensions. The accessor "getMaternalOrganismName" gives direct access to the value 1161 */ 1162 public SubstanceSourceMaterialOrganismHybridComponent setMaternalOrganismNameElement(StringType value) { 1163 this.maternalOrganismName = value; 1164 return this; 1165 } 1166 1167 /** 1168 * @return The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1169 */ 1170 public String getMaternalOrganismName() { 1171 return this.maternalOrganismName == null ? null : this.maternalOrganismName.getValue(); 1172 } 1173 1174 /** 1175 * @param value The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal. 1176 */ 1177 public SubstanceSourceMaterialOrganismHybridComponent setMaternalOrganismName(String value) { 1178 if (Utilities.noString(value)) 1179 this.maternalOrganismName = null; 1180 else { 1181 if (this.maternalOrganismName == null) 1182 this.maternalOrganismName = new StringType(); 1183 this.maternalOrganismName.setValue(value); 1184 } 1185 return this; 1186 } 1187 1188 /** 1189 * @return {@link #paternalOrganismId} (The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.). This is the underlying object with id, value and extensions. The accessor "getPaternalOrganismId" gives direct access to the value 1190 */ 1191 public StringType getPaternalOrganismIdElement() { 1192 if (this.paternalOrganismId == null) 1193 if (Configuration.errorOnAutoCreate()) 1194 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismHybridComponent.paternalOrganismId"); 1195 else if (Configuration.doAutoCreate()) 1196 this.paternalOrganismId = new StringType(); // bb 1197 return this.paternalOrganismId; 1198 } 1199 1200 public boolean hasPaternalOrganismIdElement() { 1201 return this.paternalOrganismId != null && !this.paternalOrganismId.isEmpty(); 1202 } 1203 1204 public boolean hasPaternalOrganismId() { 1205 return this.paternalOrganismId != null && !this.paternalOrganismId.isEmpty(); 1206 } 1207 1208 /** 1209 * @param value {@link #paternalOrganismId} (The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.). This is the underlying object with id, value and extensions. The accessor "getPaternalOrganismId" gives direct access to the value 1210 */ 1211 public SubstanceSourceMaterialOrganismHybridComponent setPaternalOrganismIdElement(StringType value) { 1212 this.paternalOrganismId = value; 1213 return this; 1214 } 1215 1216 /** 1217 * @return The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. 1218 */ 1219 public String getPaternalOrganismId() { 1220 return this.paternalOrganismId == null ? null : this.paternalOrganismId.getValue(); 1221 } 1222 1223 /** 1224 * @param value The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. 1225 */ 1226 public SubstanceSourceMaterialOrganismHybridComponent setPaternalOrganismId(String value) { 1227 if (Utilities.noString(value)) 1228 this.paternalOrganismId = null; 1229 else { 1230 if (this.paternalOrganismId == null) 1231 this.paternalOrganismId = new StringType(); 1232 this.paternalOrganismId.setValue(value); 1233 } 1234 return this; 1235 } 1236 1237 /** 1238 * @return {@link #paternalOrganismName} (The name of the paternal species constituting the hybrid organism shall be specified.). This is the underlying object with id, value and extensions. The accessor "getPaternalOrganismName" gives direct access to the value 1239 */ 1240 public StringType getPaternalOrganismNameElement() { 1241 if (this.paternalOrganismName == null) 1242 if (Configuration.errorOnAutoCreate()) 1243 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismHybridComponent.paternalOrganismName"); 1244 else if (Configuration.doAutoCreate()) 1245 this.paternalOrganismName = new StringType(); // bb 1246 return this.paternalOrganismName; 1247 } 1248 1249 public boolean hasPaternalOrganismNameElement() { 1250 return this.paternalOrganismName != null && !this.paternalOrganismName.isEmpty(); 1251 } 1252 1253 public boolean hasPaternalOrganismName() { 1254 return this.paternalOrganismName != null && !this.paternalOrganismName.isEmpty(); 1255 } 1256 1257 /** 1258 * @param value {@link #paternalOrganismName} (The name of the paternal species constituting the hybrid organism shall be specified.). This is the underlying object with id, value and extensions. The accessor "getPaternalOrganismName" gives direct access to the value 1259 */ 1260 public SubstanceSourceMaterialOrganismHybridComponent setPaternalOrganismNameElement(StringType value) { 1261 this.paternalOrganismName = value; 1262 return this; 1263 } 1264 1265 /** 1266 * @return The name of the paternal species constituting the hybrid organism shall be specified. 1267 */ 1268 public String getPaternalOrganismName() { 1269 return this.paternalOrganismName == null ? null : this.paternalOrganismName.getValue(); 1270 } 1271 1272 /** 1273 * @param value The name of the paternal species constituting the hybrid organism shall be specified. 1274 */ 1275 public SubstanceSourceMaterialOrganismHybridComponent setPaternalOrganismName(String value) { 1276 if (Utilities.noString(value)) 1277 this.paternalOrganismName = null; 1278 else { 1279 if (this.paternalOrganismName == null) 1280 this.paternalOrganismName = new StringType(); 1281 this.paternalOrganismName.setValue(value); 1282 } 1283 return this; 1284 } 1285 1286 /** 1287 * @return {@link #hybridType} (The hybrid type of an organism shall be specified.) 1288 */ 1289 public CodeableConcept getHybridType() { 1290 if (this.hybridType == null) 1291 if (Configuration.errorOnAutoCreate()) 1292 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismHybridComponent.hybridType"); 1293 else if (Configuration.doAutoCreate()) 1294 this.hybridType = new CodeableConcept(); // cc 1295 return this.hybridType; 1296 } 1297 1298 public boolean hasHybridType() { 1299 return this.hybridType != null && !this.hybridType.isEmpty(); 1300 } 1301 1302 /** 1303 * @param value {@link #hybridType} (The hybrid type of an organism shall be specified.) 1304 */ 1305 public SubstanceSourceMaterialOrganismHybridComponent setHybridType(CodeableConcept value) { 1306 this.hybridType = value; 1307 return this; 1308 } 1309 1310 protected void listChildren(List<Property> children) { 1311 super.listChildren(children); 1312 children.add(new Property("maternalOrganismId", "string", "The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", 0, 1, maternalOrganismId)); 1313 children.add(new Property("maternalOrganismName", "string", "The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", 0, 1, maternalOrganismName)); 1314 children.add(new Property("paternalOrganismId", "string", "The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.", 0, 1, paternalOrganismId)); 1315 children.add(new Property("paternalOrganismName", "string", "The name of the paternal species constituting the hybrid organism shall be specified.", 0, 1, paternalOrganismName)); 1316 children.add(new Property("hybridType", "CodeableConcept", "The hybrid type of an organism shall be specified.", 0, 1, hybridType)); 1317 } 1318 1319 @Override 1320 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1321 switch (_hash) { 1322 case -1179977063: /*maternalOrganismId*/ return new Property("maternalOrganismId", "string", "The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", 0, 1, maternalOrganismId); 1323 case -86441847: /*maternalOrganismName*/ return new Property("maternalOrganismName", "string", "The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.", 0, 1, maternalOrganismName); 1324 case 123773174: /*paternalOrganismId*/ return new Property("paternalOrganismId", "string", "The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.", 0, 1, paternalOrganismId); 1325 case -1312914522: /*paternalOrganismName*/ return new Property("paternalOrganismName", "string", "The name of the paternal species constituting the hybrid organism shall be specified.", 0, 1, paternalOrganismName); 1326 case 1572734806: /*hybridType*/ return new Property("hybridType", "CodeableConcept", "The hybrid type of an organism shall be specified.", 0, 1, hybridType); 1327 default: return super.getNamedProperty(_hash, _name, _checkValid); 1328 } 1329 1330 } 1331 1332 @Override 1333 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1334 switch (hash) { 1335 case -1179977063: /*maternalOrganismId*/ return this.maternalOrganismId == null ? new Base[0] : new Base[] {this.maternalOrganismId}; // StringType 1336 case -86441847: /*maternalOrganismName*/ return this.maternalOrganismName == null ? new Base[0] : new Base[] {this.maternalOrganismName}; // StringType 1337 case 123773174: /*paternalOrganismId*/ return this.paternalOrganismId == null ? new Base[0] : new Base[] {this.paternalOrganismId}; // StringType 1338 case -1312914522: /*paternalOrganismName*/ return this.paternalOrganismName == null ? new Base[0] : new Base[] {this.paternalOrganismName}; // StringType 1339 case 1572734806: /*hybridType*/ return this.hybridType == null ? new Base[0] : new Base[] {this.hybridType}; // CodeableConcept 1340 default: return super.getProperty(hash, name, checkValid); 1341 } 1342 1343 } 1344 1345 @Override 1346 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1347 switch (hash) { 1348 case -1179977063: // maternalOrganismId 1349 this.maternalOrganismId = castToString(value); // StringType 1350 return value; 1351 case -86441847: // maternalOrganismName 1352 this.maternalOrganismName = castToString(value); // StringType 1353 return value; 1354 case 123773174: // paternalOrganismId 1355 this.paternalOrganismId = castToString(value); // StringType 1356 return value; 1357 case -1312914522: // paternalOrganismName 1358 this.paternalOrganismName = castToString(value); // StringType 1359 return value; 1360 case 1572734806: // hybridType 1361 this.hybridType = castToCodeableConcept(value); // CodeableConcept 1362 return value; 1363 default: return super.setProperty(hash, name, value); 1364 } 1365 1366 } 1367 1368 @Override 1369 public Base setProperty(String name, Base value) throws FHIRException { 1370 if (name.equals("maternalOrganismId")) { 1371 this.maternalOrganismId = castToString(value); // StringType 1372 } else if (name.equals("maternalOrganismName")) { 1373 this.maternalOrganismName = castToString(value); // StringType 1374 } else if (name.equals("paternalOrganismId")) { 1375 this.paternalOrganismId = castToString(value); // StringType 1376 } else if (name.equals("paternalOrganismName")) { 1377 this.paternalOrganismName = castToString(value); // StringType 1378 } else if (name.equals("hybridType")) { 1379 this.hybridType = castToCodeableConcept(value); // CodeableConcept 1380 } else 1381 return super.setProperty(name, value); 1382 return value; 1383 } 1384 1385 @Override 1386 public Base makeProperty(int hash, String name) throws FHIRException { 1387 switch (hash) { 1388 case -1179977063: return getMaternalOrganismIdElement(); 1389 case -86441847: return getMaternalOrganismNameElement(); 1390 case 123773174: return getPaternalOrganismIdElement(); 1391 case -1312914522: return getPaternalOrganismNameElement(); 1392 case 1572734806: return getHybridType(); 1393 default: return super.makeProperty(hash, name); 1394 } 1395 1396 } 1397 1398 @Override 1399 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1400 switch (hash) { 1401 case -1179977063: /*maternalOrganismId*/ return new String[] {"string"}; 1402 case -86441847: /*maternalOrganismName*/ return new String[] {"string"}; 1403 case 123773174: /*paternalOrganismId*/ return new String[] {"string"}; 1404 case -1312914522: /*paternalOrganismName*/ return new String[] {"string"}; 1405 case 1572734806: /*hybridType*/ return new String[] {"CodeableConcept"}; 1406 default: return super.getTypesForProperty(hash, name); 1407 } 1408 1409 } 1410 1411 @Override 1412 public Base addChild(String name) throws FHIRException { 1413 if (name.equals("maternalOrganismId")) { 1414 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.maternalOrganismId"); 1415 } 1416 else if (name.equals("maternalOrganismName")) { 1417 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.maternalOrganismName"); 1418 } 1419 else if (name.equals("paternalOrganismId")) { 1420 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.paternalOrganismId"); 1421 } 1422 else if (name.equals("paternalOrganismName")) { 1423 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.paternalOrganismName"); 1424 } 1425 else if (name.equals("hybridType")) { 1426 this.hybridType = new CodeableConcept(); 1427 return this.hybridType; 1428 } 1429 else 1430 return super.addChild(name); 1431 } 1432 1433 public SubstanceSourceMaterialOrganismHybridComponent copy() { 1434 SubstanceSourceMaterialOrganismHybridComponent dst = new SubstanceSourceMaterialOrganismHybridComponent(); 1435 copyValues(dst); 1436 return dst; 1437 } 1438 1439 public void copyValues(SubstanceSourceMaterialOrganismHybridComponent dst) { 1440 super.copyValues(dst); 1441 dst.maternalOrganismId = maternalOrganismId == null ? null : maternalOrganismId.copy(); 1442 dst.maternalOrganismName = maternalOrganismName == null ? null : maternalOrganismName.copy(); 1443 dst.paternalOrganismId = paternalOrganismId == null ? null : paternalOrganismId.copy(); 1444 dst.paternalOrganismName = paternalOrganismName == null ? null : paternalOrganismName.copy(); 1445 dst.hybridType = hybridType == null ? null : hybridType.copy(); 1446 } 1447 1448 @Override 1449 public boolean equalsDeep(Base other_) { 1450 if (!super.equalsDeep(other_)) 1451 return false; 1452 if (!(other_ instanceof SubstanceSourceMaterialOrganismHybridComponent)) 1453 return false; 1454 SubstanceSourceMaterialOrganismHybridComponent o = (SubstanceSourceMaterialOrganismHybridComponent) other_; 1455 return compareDeep(maternalOrganismId, o.maternalOrganismId, true) && compareDeep(maternalOrganismName, o.maternalOrganismName, true) 1456 && compareDeep(paternalOrganismId, o.paternalOrganismId, true) && compareDeep(paternalOrganismName, o.paternalOrganismName, true) 1457 && compareDeep(hybridType, o.hybridType, true); 1458 } 1459 1460 @Override 1461 public boolean equalsShallow(Base other_) { 1462 if (!super.equalsShallow(other_)) 1463 return false; 1464 if (!(other_ instanceof SubstanceSourceMaterialOrganismHybridComponent)) 1465 return false; 1466 SubstanceSourceMaterialOrganismHybridComponent o = (SubstanceSourceMaterialOrganismHybridComponent) other_; 1467 return compareValues(maternalOrganismId, o.maternalOrganismId, true) && compareValues(maternalOrganismName, o.maternalOrganismName, true) 1468 && compareValues(paternalOrganismId, o.paternalOrganismId, true) && compareValues(paternalOrganismName, o.paternalOrganismName, true) 1469 ; 1470 } 1471 1472 public boolean isEmpty() { 1473 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(maternalOrganismId, maternalOrganismName 1474 , paternalOrganismId, paternalOrganismName, hybridType); 1475 } 1476 1477 public String fhirType() { 1478 return "SubstanceSourceMaterial.organism.hybrid"; 1479 1480 } 1481 1482 } 1483 1484 @Block() 1485 public static class SubstanceSourceMaterialOrganismOrganismGeneralComponent extends BackboneElement implements IBaseBackboneElement { 1486 /** 1487 * The kingdom of an organism shall be specified. 1488 */ 1489 @Child(name = "kingdom", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1490 @Description(shortDefinition="The kingdom of an organism shall be specified", formalDefinition="The kingdom of an organism shall be specified." ) 1491 protected CodeableConcept kingdom; 1492 1493 /** 1494 * The phylum of an organism shall be specified. 1495 */ 1496 @Child(name = "phylum", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1497 @Description(shortDefinition="The phylum of an organism shall be specified", formalDefinition="The phylum of an organism shall be specified." ) 1498 protected CodeableConcept phylum; 1499 1500 /** 1501 * The class of an organism shall be specified. 1502 */ 1503 @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 1504 @Description(shortDefinition="The class of an organism shall be specified", formalDefinition="The class of an organism shall be specified." ) 1505 protected CodeableConcept class_; 1506 1507 /** 1508 * The order of an organism shall be specified,. 1509 */ 1510 @Child(name = "order", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 1511 @Description(shortDefinition="The order of an organism shall be specified,", formalDefinition="The order of an organism shall be specified,." ) 1512 protected CodeableConcept order; 1513 1514 private static final long serialVersionUID = 659838613L; 1515 1516 /** 1517 * Constructor 1518 */ 1519 public SubstanceSourceMaterialOrganismOrganismGeneralComponent() { 1520 super(); 1521 } 1522 1523 /** 1524 * @return {@link #kingdom} (The kingdom of an organism shall be specified.) 1525 */ 1526 public CodeableConcept getKingdom() { 1527 if (this.kingdom == null) 1528 if (Configuration.errorOnAutoCreate()) 1529 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismOrganismGeneralComponent.kingdom"); 1530 else if (Configuration.doAutoCreate()) 1531 this.kingdom = new CodeableConcept(); // cc 1532 return this.kingdom; 1533 } 1534 1535 public boolean hasKingdom() { 1536 return this.kingdom != null && !this.kingdom.isEmpty(); 1537 } 1538 1539 /** 1540 * @param value {@link #kingdom} (The kingdom of an organism shall be specified.) 1541 */ 1542 public SubstanceSourceMaterialOrganismOrganismGeneralComponent setKingdom(CodeableConcept value) { 1543 this.kingdom = value; 1544 return this; 1545 } 1546 1547 /** 1548 * @return {@link #phylum} (The phylum of an organism shall be specified.) 1549 */ 1550 public CodeableConcept getPhylum() { 1551 if (this.phylum == null) 1552 if (Configuration.errorOnAutoCreate()) 1553 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismOrganismGeneralComponent.phylum"); 1554 else if (Configuration.doAutoCreate()) 1555 this.phylum = new CodeableConcept(); // cc 1556 return this.phylum; 1557 } 1558 1559 public boolean hasPhylum() { 1560 return this.phylum != null && !this.phylum.isEmpty(); 1561 } 1562 1563 /** 1564 * @param value {@link #phylum} (The phylum of an organism shall be specified.) 1565 */ 1566 public SubstanceSourceMaterialOrganismOrganismGeneralComponent setPhylum(CodeableConcept value) { 1567 this.phylum = value; 1568 return this; 1569 } 1570 1571 /** 1572 * @return {@link #class_} (The class of an organism shall be specified.) 1573 */ 1574 public CodeableConcept getClass_() { 1575 if (this.class_ == null) 1576 if (Configuration.errorOnAutoCreate()) 1577 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismOrganismGeneralComponent.class_"); 1578 else if (Configuration.doAutoCreate()) 1579 this.class_ = new CodeableConcept(); // cc 1580 return this.class_; 1581 } 1582 1583 public boolean hasClass_() { 1584 return this.class_ != null && !this.class_.isEmpty(); 1585 } 1586 1587 /** 1588 * @param value {@link #class_} (The class of an organism shall be specified.) 1589 */ 1590 public SubstanceSourceMaterialOrganismOrganismGeneralComponent setClass_(CodeableConcept value) { 1591 this.class_ = value; 1592 return this; 1593 } 1594 1595 /** 1596 * @return {@link #order} (The order of an organism shall be specified,.) 1597 */ 1598 public CodeableConcept getOrder() { 1599 if (this.order == null) 1600 if (Configuration.errorOnAutoCreate()) 1601 throw new Error("Attempt to auto-create SubstanceSourceMaterialOrganismOrganismGeneralComponent.order"); 1602 else if (Configuration.doAutoCreate()) 1603 this.order = new CodeableConcept(); // cc 1604 return this.order; 1605 } 1606 1607 public boolean hasOrder() { 1608 return this.order != null && !this.order.isEmpty(); 1609 } 1610 1611 /** 1612 * @param value {@link #order} (The order of an organism shall be specified,.) 1613 */ 1614 public SubstanceSourceMaterialOrganismOrganismGeneralComponent setOrder(CodeableConcept value) { 1615 this.order = value; 1616 return this; 1617 } 1618 1619 protected void listChildren(List<Property> children) { 1620 super.listChildren(children); 1621 children.add(new Property("kingdom", "CodeableConcept", "The kingdom of an organism shall be specified.", 0, 1, kingdom)); 1622 children.add(new Property("phylum", "CodeableConcept", "The phylum of an organism shall be specified.", 0, 1, phylum)); 1623 children.add(new Property("class", "CodeableConcept", "The class of an organism shall be specified.", 0, 1, class_)); 1624 children.add(new Property("order", "CodeableConcept", "The order of an organism shall be specified,.", 0, 1, order)); 1625 } 1626 1627 @Override 1628 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1629 switch (_hash) { 1630 case -710537653: /*kingdom*/ return new Property("kingdom", "CodeableConcept", "The kingdom of an organism shall be specified.", 0, 1, kingdom); 1631 case -988743965: /*phylum*/ return new Property("phylum", "CodeableConcept", "The phylum of an organism shall be specified.", 0, 1, phylum); 1632 case 94742904: /*class*/ return new Property("class", "CodeableConcept", "The class of an organism shall be specified.", 0, 1, class_); 1633 case 106006350: /*order*/ return new Property("order", "CodeableConcept", "The order of an organism shall be specified,.", 0, 1, order); 1634 default: return super.getNamedProperty(_hash, _name, _checkValid); 1635 } 1636 1637 } 1638 1639 @Override 1640 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1641 switch (hash) { 1642 case -710537653: /*kingdom*/ return this.kingdom == null ? new Base[0] : new Base[] {this.kingdom}; // CodeableConcept 1643 case -988743965: /*phylum*/ return this.phylum == null ? new Base[0] : new Base[] {this.phylum}; // CodeableConcept 1644 case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // CodeableConcept 1645 case 106006350: /*order*/ return this.order == null ? new Base[0] : new Base[] {this.order}; // CodeableConcept 1646 default: return super.getProperty(hash, name, checkValid); 1647 } 1648 1649 } 1650 1651 @Override 1652 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1653 switch (hash) { 1654 case -710537653: // kingdom 1655 this.kingdom = castToCodeableConcept(value); // CodeableConcept 1656 return value; 1657 case -988743965: // phylum 1658 this.phylum = castToCodeableConcept(value); // CodeableConcept 1659 return value; 1660 case 94742904: // class 1661 this.class_ = castToCodeableConcept(value); // CodeableConcept 1662 return value; 1663 case 106006350: // order 1664 this.order = castToCodeableConcept(value); // CodeableConcept 1665 return value; 1666 default: return super.setProperty(hash, name, value); 1667 } 1668 1669 } 1670 1671 @Override 1672 public Base setProperty(String name, Base value) throws FHIRException { 1673 if (name.equals("kingdom")) { 1674 this.kingdom = castToCodeableConcept(value); // CodeableConcept 1675 } else if (name.equals("phylum")) { 1676 this.phylum = castToCodeableConcept(value); // CodeableConcept 1677 } else if (name.equals("class")) { 1678 this.class_ = castToCodeableConcept(value); // CodeableConcept 1679 } else if (name.equals("order")) { 1680 this.order = castToCodeableConcept(value); // CodeableConcept 1681 } else 1682 return super.setProperty(name, value); 1683 return value; 1684 } 1685 1686 @Override 1687 public Base makeProperty(int hash, String name) throws FHIRException { 1688 switch (hash) { 1689 case -710537653: return getKingdom(); 1690 case -988743965: return getPhylum(); 1691 case 94742904: return getClass_(); 1692 case 106006350: return getOrder(); 1693 default: return super.makeProperty(hash, name); 1694 } 1695 1696 } 1697 1698 @Override 1699 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1700 switch (hash) { 1701 case -710537653: /*kingdom*/ return new String[] {"CodeableConcept"}; 1702 case -988743965: /*phylum*/ return new String[] {"CodeableConcept"}; 1703 case 94742904: /*class*/ return new String[] {"CodeableConcept"}; 1704 case 106006350: /*order*/ return new String[] {"CodeableConcept"}; 1705 default: return super.getTypesForProperty(hash, name); 1706 } 1707 1708 } 1709 1710 @Override 1711 public Base addChild(String name) throws FHIRException { 1712 if (name.equals("kingdom")) { 1713 this.kingdom = new CodeableConcept(); 1714 return this.kingdom; 1715 } 1716 else if (name.equals("phylum")) { 1717 this.phylum = new CodeableConcept(); 1718 return this.phylum; 1719 } 1720 else if (name.equals("class")) { 1721 this.class_ = new CodeableConcept(); 1722 return this.class_; 1723 } 1724 else if (name.equals("order")) { 1725 this.order = new CodeableConcept(); 1726 return this.order; 1727 } 1728 else 1729 return super.addChild(name); 1730 } 1731 1732 public SubstanceSourceMaterialOrganismOrganismGeneralComponent copy() { 1733 SubstanceSourceMaterialOrganismOrganismGeneralComponent dst = new SubstanceSourceMaterialOrganismOrganismGeneralComponent(); 1734 copyValues(dst); 1735 return dst; 1736 } 1737 1738 public void copyValues(SubstanceSourceMaterialOrganismOrganismGeneralComponent dst) { 1739 super.copyValues(dst); 1740 dst.kingdom = kingdom == null ? null : kingdom.copy(); 1741 dst.phylum = phylum == null ? null : phylum.copy(); 1742 dst.class_ = class_ == null ? null : class_.copy(); 1743 dst.order = order == null ? null : order.copy(); 1744 } 1745 1746 @Override 1747 public boolean equalsDeep(Base other_) { 1748 if (!super.equalsDeep(other_)) 1749 return false; 1750 if (!(other_ instanceof SubstanceSourceMaterialOrganismOrganismGeneralComponent)) 1751 return false; 1752 SubstanceSourceMaterialOrganismOrganismGeneralComponent o = (SubstanceSourceMaterialOrganismOrganismGeneralComponent) other_; 1753 return compareDeep(kingdom, o.kingdom, true) && compareDeep(phylum, o.phylum, true) && compareDeep(class_, o.class_, true) 1754 && compareDeep(order, o.order, true); 1755 } 1756 1757 @Override 1758 public boolean equalsShallow(Base other_) { 1759 if (!super.equalsShallow(other_)) 1760 return false; 1761 if (!(other_ instanceof SubstanceSourceMaterialOrganismOrganismGeneralComponent)) 1762 return false; 1763 SubstanceSourceMaterialOrganismOrganismGeneralComponent o = (SubstanceSourceMaterialOrganismOrganismGeneralComponent) other_; 1764 return true; 1765 } 1766 1767 public boolean isEmpty() { 1768 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kingdom, phylum, class_ 1769 , order); 1770 } 1771 1772 public String fhirType() { 1773 return "SubstanceSourceMaterial.organism.organismGeneral"; 1774 1775 } 1776 1777 } 1778 1779 @Block() 1780 public static class SubstanceSourceMaterialPartDescriptionComponent extends BackboneElement implements IBaseBackboneElement { 1781 /** 1782 * Entity of anatomical origin of source material within an organism. 1783 */ 1784 @Child(name = "part", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1785 @Description(shortDefinition="Entity of anatomical origin of source material within an organism", formalDefinition="Entity of anatomical origin of source material within an organism." ) 1786 protected CodeableConcept part; 1787 1788 /** 1789 * The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply. 1790 */ 1791 @Child(name = "partLocation", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1792 @Description(shortDefinition="The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply", formalDefinition="The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply." ) 1793 protected CodeableConcept partLocation; 1794 1795 private static final long serialVersionUID = 308875915L; 1796 1797 /** 1798 * Constructor 1799 */ 1800 public SubstanceSourceMaterialPartDescriptionComponent() { 1801 super(); 1802 } 1803 1804 /** 1805 * @return {@link #part} (Entity of anatomical origin of source material within an organism.) 1806 */ 1807 public CodeableConcept getPart() { 1808 if (this.part == null) 1809 if (Configuration.errorOnAutoCreate()) 1810 throw new Error("Attempt to auto-create SubstanceSourceMaterialPartDescriptionComponent.part"); 1811 else if (Configuration.doAutoCreate()) 1812 this.part = new CodeableConcept(); // cc 1813 return this.part; 1814 } 1815 1816 public boolean hasPart() { 1817 return this.part != null && !this.part.isEmpty(); 1818 } 1819 1820 /** 1821 * @param value {@link #part} (Entity of anatomical origin of source material within an organism.) 1822 */ 1823 public SubstanceSourceMaterialPartDescriptionComponent setPart(CodeableConcept value) { 1824 this.part = value; 1825 return this; 1826 } 1827 1828 /** 1829 * @return {@link #partLocation} (The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.) 1830 */ 1831 public CodeableConcept getPartLocation() { 1832 if (this.partLocation == null) 1833 if (Configuration.errorOnAutoCreate()) 1834 throw new Error("Attempt to auto-create SubstanceSourceMaterialPartDescriptionComponent.partLocation"); 1835 else if (Configuration.doAutoCreate()) 1836 this.partLocation = new CodeableConcept(); // cc 1837 return this.partLocation; 1838 } 1839 1840 public boolean hasPartLocation() { 1841 return this.partLocation != null && !this.partLocation.isEmpty(); 1842 } 1843 1844 /** 1845 * @param value {@link #partLocation} (The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.) 1846 */ 1847 public SubstanceSourceMaterialPartDescriptionComponent setPartLocation(CodeableConcept value) { 1848 this.partLocation = value; 1849 return this; 1850 } 1851 1852 protected void listChildren(List<Property> children) { 1853 super.listChildren(children); 1854 children.add(new Property("part", "CodeableConcept", "Entity of anatomical origin of source material within an organism.", 0, 1, part)); 1855 children.add(new Property("partLocation", "CodeableConcept", "The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.", 0, 1, partLocation)); 1856 } 1857 1858 @Override 1859 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1860 switch (_hash) { 1861 case 3433459: /*part*/ return new Property("part", "CodeableConcept", "Entity of anatomical origin of source material within an organism.", 0, 1, part); 1862 case 893437128: /*partLocation*/ return new Property("partLocation", "CodeableConcept", "The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.", 0, 1, partLocation); 1863 default: return super.getNamedProperty(_hash, _name, _checkValid); 1864 } 1865 1866 } 1867 1868 @Override 1869 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1870 switch (hash) { 1871 case 3433459: /*part*/ return this.part == null ? new Base[0] : new Base[] {this.part}; // CodeableConcept 1872 case 893437128: /*partLocation*/ return this.partLocation == null ? new Base[0] : new Base[] {this.partLocation}; // CodeableConcept 1873 default: return super.getProperty(hash, name, checkValid); 1874 } 1875 1876 } 1877 1878 @Override 1879 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1880 switch (hash) { 1881 case 3433459: // part 1882 this.part = castToCodeableConcept(value); // CodeableConcept 1883 return value; 1884 case 893437128: // partLocation 1885 this.partLocation = castToCodeableConcept(value); // CodeableConcept 1886 return value; 1887 default: return super.setProperty(hash, name, value); 1888 } 1889 1890 } 1891 1892 @Override 1893 public Base setProperty(String name, Base value) throws FHIRException { 1894 if (name.equals("part")) { 1895 this.part = castToCodeableConcept(value); // CodeableConcept 1896 } else if (name.equals("partLocation")) { 1897 this.partLocation = castToCodeableConcept(value); // CodeableConcept 1898 } else 1899 return super.setProperty(name, value); 1900 return value; 1901 } 1902 1903 @Override 1904 public Base makeProperty(int hash, String name) throws FHIRException { 1905 switch (hash) { 1906 case 3433459: return getPart(); 1907 case 893437128: return getPartLocation(); 1908 default: return super.makeProperty(hash, name); 1909 } 1910 1911 } 1912 1913 @Override 1914 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1915 switch (hash) { 1916 case 3433459: /*part*/ return new String[] {"CodeableConcept"}; 1917 case 893437128: /*partLocation*/ return new String[] {"CodeableConcept"}; 1918 default: return super.getTypesForProperty(hash, name); 1919 } 1920 1921 } 1922 1923 @Override 1924 public Base addChild(String name) throws FHIRException { 1925 if (name.equals("part")) { 1926 this.part = new CodeableConcept(); 1927 return this.part; 1928 } 1929 else if (name.equals("partLocation")) { 1930 this.partLocation = new CodeableConcept(); 1931 return this.partLocation; 1932 } 1933 else 1934 return super.addChild(name); 1935 } 1936 1937 public SubstanceSourceMaterialPartDescriptionComponent copy() { 1938 SubstanceSourceMaterialPartDescriptionComponent dst = new SubstanceSourceMaterialPartDescriptionComponent(); 1939 copyValues(dst); 1940 return dst; 1941 } 1942 1943 public void copyValues(SubstanceSourceMaterialPartDescriptionComponent dst) { 1944 super.copyValues(dst); 1945 dst.part = part == null ? null : part.copy(); 1946 dst.partLocation = partLocation == null ? null : partLocation.copy(); 1947 } 1948 1949 @Override 1950 public boolean equalsDeep(Base other_) { 1951 if (!super.equalsDeep(other_)) 1952 return false; 1953 if (!(other_ instanceof SubstanceSourceMaterialPartDescriptionComponent)) 1954 return false; 1955 SubstanceSourceMaterialPartDescriptionComponent o = (SubstanceSourceMaterialPartDescriptionComponent) other_; 1956 return compareDeep(part, o.part, true) && compareDeep(partLocation, o.partLocation, true); 1957 } 1958 1959 @Override 1960 public boolean equalsShallow(Base other_) { 1961 if (!super.equalsShallow(other_)) 1962 return false; 1963 if (!(other_ instanceof SubstanceSourceMaterialPartDescriptionComponent)) 1964 return false; 1965 SubstanceSourceMaterialPartDescriptionComponent o = (SubstanceSourceMaterialPartDescriptionComponent) other_; 1966 return true; 1967 } 1968 1969 public boolean isEmpty() { 1970 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(part, partLocation); 1971 } 1972 1973 public String fhirType() { 1974 return "SubstanceSourceMaterial.partDescription"; 1975 1976 } 1977 1978 } 1979 1980 /** 1981 * General high level classification of the source material specific to the origin of the material. 1982 */ 1983 @Child(name = "sourceMaterialClass", type = {CodeableConcept.class}, order=0, min=0, max=1, modifier=false, summary=true) 1984 @Description(shortDefinition="General high level classification of the source material specific to the origin of the material", formalDefinition="General high level classification of the source material specific to the origin of the material." ) 1985 protected CodeableConcept sourceMaterialClass; 1986 1987 /** 1988 * The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent. 1989 */ 1990 @Child(name = "sourceMaterialType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1991 @Description(shortDefinition="The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent", formalDefinition="The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent." ) 1992 protected CodeableConcept sourceMaterialType; 1993 1994 /** 1995 * The state of the source material when extracted. 1996 */ 1997 @Child(name = "sourceMaterialState", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1998 @Description(shortDefinition="The state of the source material when extracted", formalDefinition="The state of the source material when extracted." ) 1999 protected CodeableConcept sourceMaterialState; 2000 2001 /** 2002 * The unique identifier associated with the source material parent organism shall be specified. 2003 */ 2004 @Child(name = "organismId", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 2005 @Description(shortDefinition="The unique identifier associated with the source material parent organism shall be specified", formalDefinition="The unique identifier associated with the source material parent organism shall be specified." ) 2006 protected Identifier organismId; 2007 2008 /** 2009 * The organism accepted Scientific name shall be provided based on the organism taxonomy. 2010 */ 2011 @Child(name = "organismName", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 2012 @Description(shortDefinition="The organism accepted Scientific name shall be provided based on the organism taxonomy", formalDefinition="The organism accepted Scientific name shall be provided based on the organism taxonomy." ) 2013 protected StringType organismName; 2014 2015 /** 2016 * The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant). 2017 */ 2018 @Child(name = "parentSubstanceId", type = {Identifier.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2019 @Description(shortDefinition="The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant)", formalDefinition="The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant)." ) 2020 protected List<Identifier> parentSubstanceId; 2021 2022 /** 2023 * The parent substance of the Herbal Drug, or Herbal preparation. 2024 */ 2025 @Child(name = "parentSubstanceName", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2026 @Description(shortDefinition="The parent substance of the Herbal Drug, or Herbal preparation", formalDefinition="The parent substance of the Herbal Drug, or Herbal preparation." ) 2027 protected List<StringType> parentSubstanceName; 2028 2029 /** 2030 * The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate. 2031 */ 2032 @Child(name = "countryOfOrigin", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2033 @Description(shortDefinition="The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate", formalDefinition="The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate." ) 2034 protected List<CodeableConcept> countryOfOrigin; 2035 2036 /** 2037 * The place/region where the plant is harvested or the places/regions where the animal source material has its habitat. 2038 */ 2039 @Child(name = "geographicalLocation", type = {StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2040 @Description(shortDefinition="The place/region where the plant is harvested or the places/regions where the animal source material has its habitat", formalDefinition="The place/region where the plant is harvested or the places/regions where the animal source material has its habitat." ) 2041 protected List<StringType> geographicalLocation; 2042 2043 /** 2044 * Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum). 2045 */ 2046 @Child(name = "developmentStage", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) 2047 @Description(shortDefinition="Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum)", formalDefinition="Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum)." ) 2048 protected CodeableConcept developmentStage; 2049 2050 /** 2051 * Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels. 2052 */ 2053 @Child(name = "fractionDescription", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2054 @Description(shortDefinition="Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels", formalDefinition="Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels." ) 2055 protected List<SubstanceSourceMaterialFractionDescriptionComponent> fractionDescription; 2056 2057 /** 2058 * This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf. 2059 */ 2060 @Child(name = "organism", type = {}, order=11, min=0, max=1, modifier=false, summary=true) 2061 @Description(shortDefinition="This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf", formalDefinition="This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf." ) 2062 protected SubstanceSourceMaterialOrganismComponent organism; 2063 2064 /** 2065 * To do. 2066 */ 2067 @Child(name = "partDescription", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2068 @Description(shortDefinition="To do", formalDefinition="To do." ) 2069 protected List<SubstanceSourceMaterialPartDescriptionComponent> partDescription; 2070 2071 private static final long serialVersionUID = 442657667L; 2072 2073 /** 2074 * Constructor 2075 */ 2076 public SubstanceSourceMaterial() { 2077 super(); 2078 } 2079 2080 /** 2081 * @return {@link #sourceMaterialClass} (General high level classification of the source material specific to the origin of the material.) 2082 */ 2083 public CodeableConcept getSourceMaterialClass() { 2084 if (this.sourceMaterialClass == null) 2085 if (Configuration.errorOnAutoCreate()) 2086 throw new Error("Attempt to auto-create SubstanceSourceMaterial.sourceMaterialClass"); 2087 else if (Configuration.doAutoCreate()) 2088 this.sourceMaterialClass = new CodeableConcept(); // cc 2089 return this.sourceMaterialClass; 2090 } 2091 2092 public boolean hasSourceMaterialClass() { 2093 return this.sourceMaterialClass != null && !this.sourceMaterialClass.isEmpty(); 2094 } 2095 2096 /** 2097 * @param value {@link #sourceMaterialClass} (General high level classification of the source material specific to the origin of the material.) 2098 */ 2099 public SubstanceSourceMaterial setSourceMaterialClass(CodeableConcept value) { 2100 this.sourceMaterialClass = value; 2101 return this; 2102 } 2103 2104 /** 2105 * @return {@link #sourceMaterialType} (The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.) 2106 */ 2107 public CodeableConcept getSourceMaterialType() { 2108 if (this.sourceMaterialType == null) 2109 if (Configuration.errorOnAutoCreate()) 2110 throw new Error("Attempt to auto-create SubstanceSourceMaterial.sourceMaterialType"); 2111 else if (Configuration.doAutoCreate()) 2112 this.sourceMaterialType = new CodeableConcept(); // cc 2113 return this.sourceMaterialType; 2114 } 2115 2116 public boolean hasSourceMaterialType() { 2117 return this.sourceMaterialType != null && !this.sourceMaterialType.isEmpty(); 2118 } 2119 2120 /** 2121 * @param value {@link #sourceMaterialType} (The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.) 2122 */ 2123 public SubstanceSourceMaterial setSourceMaterialType(CodeableConcept value) { 2124 this.sourceMaterialType = value; 2125 return this; 2126 } 2127 2128 /** 2129 * @return {@link #sourceMaterialState} (The state of the source material when extracted.) 2130 */ 2131 public CodeableConcept getSourceMaterialState() { 2132 if (this.sourceMaterialState == null) 2133 if (Configuration.errorOnAutoCreate()) 2134 throw new Error("Attempt to auto-create SubstanceSourceMaterial.sourceMaterialState"); 2135 else if (Configuration.doAutoCreate()) 2136 this.sourceMaterialState = new CodeableConcept(); // cc 2137 return this.sourceMaterialState; 2138 } 2139 2140 public boolean hasSourceMaterialState() { 2141 return this.sourceMaterialState != null && !this.sourceMaterialState.isEmpty(); 2142 } 2143 2144 /** 2145 * @param value {@link #sourceMaterialState} (The state of the source material when extracted.) 2146 */ 2147 public SubstanceSourceMaterial setSourceMaterialState(CodeableConcept value) { 2148 this.sourceMaterialState = value; 2149 return this; 2150 } 2151 2152 /** 2153 * @return {@link #organismId} (The unique identifier associated with the source material parent organism shall be specified.) 2154 */ 2155 public Identifier getOrganismId() { 2156 if (this.organismId == null) 2157 if (Configuration.errorOnAutoCreate()) 2158 throw new Error("Attempt to auto-create SubstanceSourceMaterial.organismId"); 2159 else if (Configuration.doAutoCreate()) 2160 this.organismId = new Identifier(); // cc 2161 return this.organismId; 2162 } 2163 2164 public boolean hasOrganismId() { 2165 return this.organismId != null && !this.organismId.isEmpty(); 2166 } 2167 2168 /** 2169 * @param value {@link #organismId} (The unique identifier associated with the source material parent organism shall be specified.) 2170 */ 2171 public SubstanceSourceMaterial setOrganismId(Identifier value) { 2172 this.organismId = value; 2173 return this; 2174 } 2175 2176 /** 2177 * @return {@link #organismName} (The organism accepted Scientific name shall be provided based on the organism taxonomy.). This is the underlying object with id, value and extensions. The accessor "getOrganismName" gives direct access to the value 2178 */ 2179 public StringType getOrganismNameElement() { 2180 if (this.organismName == null) 2181 if (Configuration.errorOnAutoCreate()) 2182 throw new Error("Attempt to auto-create SubstanceSourceMaterial.organismName"); 2183 else if (Configuration.doAutoCreate()) 2184 this.organismName = new StringType(); // bb 2185 return this.organismName; 2186 } 2187 2188 public boolean hasOrganismNameElement() { 2189 return this.organismName != null && !this.organismName.isEmpty(); 2190 } 2191 2192 public boolean hasOrganismName() { 2193 return this.organismName != null && !this.organismName.isEmpty(); 2194 } 2195 2196 /** 2197 * @param value {@link #organismName} (The organism accepted Scientific name shall be provided based on the organism taxonomy.). This is the underlying object with id, value and extensions. The accessor "getOrganismName" gives direct access to the value 2198 */ 2199 public SubstanceSourceMaterial setOrganismNameElement(StringType value) { 2200 this.organismName = value; 2201 return this; 2202 } 2203 2204 /** 2205 * @return The organism accepted Scientific name shall be provided based on the organism taxonomy. 2206 */ 2207 public String getOrganismName() { 2208 return this.organismName == null ? null : this.organismName.getValue(); 2209 } 2210 2211 /** 2212 * @param value The organism accepted Scientific name shall be provided based on the organism taxonomy. 2213 */ 2214 public SubstanceSourceMaterial setOrganismName(String value) { 2215 if (Utilities.noString(value)) 2216 this.organismName = null; 2217 else { 2218 if (this.organismName == null) 2219 this.organismName = new StringType(); 2220 this.organismName.setValue(value); 2221 } 2222 return this; 2223 } 2224 2225 /** 2226 * @return {@link #parentSubstanceId} (The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).) 2227 */ 2228 public List<Identifier> getParentSubstanceId() { 2229 if (this.parentSubstanceId == null) 2230 this.parentSubstanceId = new ArrayList<Identifier>(); 2231 return this.parentSubstanceId; 2232 } 2233 2234 /** 2235 * @return Returns a reference to <code>this</code> for easy method chaining 2236 */ 2237 public SubstanceSourceMaterial setParentSubstanceId(List<Identifier> theParentSubstanceId) { 2238 this.parentSubstanceId = theParentSubstanceId; 2239 return this; 2240 } 2241 2242 public boolean hasParentSubstanceId() { 2243 if (this.parentSubstanceId == null) 2244 return false; 2245 for (Identifier item : this.parentSubstanceId) 2246 if (!item.isEmpty()) 2247 return true; 2248 return false; 2249 } 2250 2251 public Identifier addParentSubstanceId() { //3 2252 Identifier t = new Identifier(); 2253 if (this.parentSubstanceId == null) 2254 this.parentSubstanceId = new ArrayList<Identifier>(); 2255 this.parentSubstanceId.add(t); 2256 return t; 2257 } 2258 2259 public SubstanceSourceMaterial addParentSubstanceId(Identifier t) { //3 2260 if (t == null) 2261 return this; 2262 if (this.parentSubstanceId == null) 2263 this.parentSubstanceId = new ArrayList<Identifier>(); 2264 this.parentSubstanceId.add(t); 2265 return this; 2266 } 2267 2268 /** 2269 * @return The first repetition of repeating field {@link #parentSubstanceId}, creating it if it does not already exist 2270 */ 2271 public Identifier getParentSubstanceIdFirstRep() { 2272 if (getParentSubstanceId().isEmpty()) { 2273 addParentSubstanceId(); 2274 } 2275 return getParentSubstanceId().get(0); 2276 } 2277 2278 /** 2279 * @return {@link #parentSubstanceName} (The parent substance of the Herbal Drug, or Herbal preparation.) 2280 */ 2281 public List<StringType> getParentSubstanceName() { 2282 if (this.parentSubstanceName == null) 2283 this.parentSubstanceName = new ArrayList<StringType>(); 2284 return this.parentSubstanceName; 2285 } 2286 2287 /** 2288 * @return Returns a reference to <code>this</code> for easy method chaining 2289 */ 2290 public SubstanceSourceMaterial setParentSubstanceName(List<StringType> theParentSubstanceName) { 2291 this.parentSubstanceName = theParentSubstanceName; 2292 return this; 2293 } 2294 2295 public boolean hasParentSubstanceName() { 2296 if (this.parentSubstanceName == null) 2297 return false; 2298 for (StringType item : this.parentSubstanceName) 2299 if (!item.isEmpty()) 2300 return true; 2301 return false; 2302 } 2303 2304 /** 2305 * @return {@link #parentSubstanceName} (The parent substance of the Herbal Drug, or Herbal preparation.) 2306 */ 2307 public StringType addParentSubstanceNameElement() {//2 2308 StringType t = new StringType(); 2309 if (this.parentSubstanceName == null) 2310 this.parentSubstanceName = new ArrayList<StringType>(); 2311 this.parentSubstanceName.add(t); 2312 return t; 2313 } 2314 2315 /** 2316 * @param value {@link #parentSubstanceName} (The parent substance of the Herbal Drug, or Herbal preparation.) 2317 */ 2318 public SubstanceSourceMaterial addParentSubstanceName(String value) { //1 2319 StringType t = new StringType(); 2320 t.setValue(value); 2321 if (this.parentSubstanceName == null) 2322 this.parentSubstanceName = new ArrayList<StringType>(); 2323 this.parentSubstanceName.add(t); 2324 return this; 2325 } 2326 2327 /** 2328 * @param value {@link #parentSubstanceName} (The parent substance of the Herbal Drug, or Herbal preparation.) 2329 */ 2330 public boolean hasParentSubstanceName(String value) { 2331 if (this.parentSubstanceName == null) 2332 return false; 2333 for (StringType v : this.parentSubstanceName) 2334 if (v.getValue().equals(value)) // string 2335 return true; 2336 return false; 2337 } 2338 2339 /** 2340 * @return {@link #countryOfOrigin} (The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.) 2341 */ 2342 public List<CodeableConcept> getCountryOfOrigin() { 2343 if (this.countryOfOrigin == null) 2344 this.countryOfOrigin = new ArrayList<CodeableConcept>(); 2345 return this.countryOfOrigin; 2346 } 2347 2348 /** 2349 * @return Returns a reference to <code>this</code> for easy method chaining 2350 */ 2351 public SubstanceSourceMaterial setCountryOfOrigin(List<CodeableConcept> theCountryOfOrigin) { 2352 this.countryOfOrigin = theCountryOfOrigin; 2353 return this; 2354 } 2355 2356 public boolean hasCountryOfOrigin() { 2357 if (this.countryOfOrigin == null) 2358 return false; 2359 for (CodeableConcept item : this.countryOfOrigin) 2360 if (!item.isEmpty()) 2361 return true; 2362 return false; 2363 } 2364 2365 public CodeableConcept addCountryOfOrigin() { //3 2366 CodeableConcept t = new CodeableConcept(); 2367 if (this.countryOfOrigin == null) 2368 this.countryOfOrigin = new ArrayList<CodeableConcept>(); 2369 this.countryOfOrigin.add(t); 2370 return t; 2371 } 2372 2373 public SubstanceSourceMaterial addCountryOfOrigin(CodeableConcept t) { //3 2374 if (t == null) 2375 return this; 2376 if (this.countryOfOrigin == null) 2377 this.countryOfOrigin = new ArrayList<CodeableConcept>(); 2378 this.countryOfOrigin.add(t); 2379 return this; 2380 } 2381 2382 /** 2383 * @return The first repetition of repeating field {@link #countryOfOrigin}, creating it if it does not already exist 2384 */ 2385 public CodeableConcept getCountryOfOriginFirstRep() { 2386 if (getCountryOfOrigin().isEmpty()) { 2387 addCountryOfOrigin(); 2388 } 2389 return getCountryOfOrigin().get(0); 2390 } 2391 2392 /** 2393 * @return {@link #geographicalLocation} (The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.) 2394 */ 2395 public List<StringType> getGeographicalLocation() { 2396 if (this.geographicalLocation == null) 2397 this.geographicalLocation = new ArrayList<StringType>(); 2398 return this.geographicalLocation; 2399 } 2400 2401 /** 2402 * @return Returns a reference to <code>this</code> for easy method chaining 2403 */ 2404 public SubstanceSourceMaterial setGeographicalLocation(List<StringType> theGeographicalLocation) { 2405 this.geographicalLocation = theGeographicalLocation; 2406 return this; 2407 } 2408 2409 public boolean hasGeographicalLocation() { 2410 if (this.geographicalLocation == null) 2411 return false; 2412 for (StringType item : this.geographicalLocation) 2413 if (!item.isEmpty()) 2414 return true; 2415 return false; 2416 } 2417 2418 /** 2419 * @return {@link #geographicalLocation} (The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.) 2420 */ 2421 public StringType addGeographicalLocationElement() {//2 2422 StringType t = new StringType(); 2423 if (this.geographicalLocation == null) 2424 this.geographicalLocation = new ArrayList<StringType>(); 2425 this.geographicalLocation.add(t); 2426 return t; 2427 } 2428 2429 /** 2430 * @param value {@link #geographicalLocation} (The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.) 2431 */ 2432 public SubstanceSourceMaterial addGeographicalLocation(String value) { //1 2433 StringType t = new StringType(); 2434 t.setValue(value); 2435 if (this.geographicalLocation == null) 2436 this.geographicalLocation = new ArrayList<StringType>(); 2437 this.geographicalLocation.add(t); 2438 return this; 2439 } 2440 2441 /** 2442 * @param value {@link #geographicalLocation} (The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.) 2443 */ 2444 public boolean hasGeographicalLocation(String value) { 2445 if (this.geographicalLocation == null) 2446 return false; 2447 for (StringType v : this.geographicalLocation) 2448 if (v.getValue().equals(value)) // string 2449 return true; 2450 return false; 2451 } 2452 2453 /** 2454 * @return {@link #developmentStage} (Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).) 2455 */ 2456 public CodeableConcept getDevelopmentStage() { 2457 if (this.developmentStage == null) 2458 if (Configuration.errorOnAutoCreate()) 2459 throw new Error("Attempt to auto-create SubstanceSourceMaterial.developmentStage"); 2460 else if (Configuration.doAutoCreate()) 2461 this.developmentStage = new CodeableConcept(); // cc 2462 return this.developmentStage; 2463 } 2464 2465 public boolean hasDevelopmentStage() { 2466 return this.developmentStage != null && !this.developmentStage.isEmpty(); 2467 } 2468 2469 /** 2470 * @param value {@link #developmentStage} (Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).) 2471 */ 2472 public SubstanceSourceMaterial setDevelopmentStage(CodeableConcept value) { 2473 this.developmentStage = value; 2474 return this; 2475 } 2476 2477 /** 2478 * @return {@link #fractionDescription} (Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.) 2479 */ 2480 public List<SubstanceSourceMaterialFractionDescriptionComponent> getFractionDescription() { 2481 if (this.fractionDescription == null) 2482 this.fractionDescription = new ArrayList<SubstanceSourceMaterialFractionDescriptionComponent>(); 2483 return this.fractionDescription; 2484 } 2485 2486 /** 2487 * @return Returns a reference to <code>this</code> for easy method chaining 2488 */ 2489 public SubstanceSourceMaterial setFractionDescription(List<SubstanceSourceMaterialFractionDescriptionComponent> theFractionDescription) { 2490 this.fractionDescription = theFractionDescription; 2491 return this; 2492 } 2493 2494 public boolean hasFractionDescription() { 2495 if (this.fractionDescription == null) 2496 return false; 2497 for (SubstanceSourceMaterialFractionDescriptionComponent item : this.fractionDescription) 2498 if (!item.isEmpty()) 2499 return true; 2500 return false; 2501 } 2502 2503 public SubstanceSourceMaterialFractionDescriptionComponent addFractionDescription() { //3 2504 SubstanceSourceMaterialFractionDescriptionComponent t = new SubstanceSourceMaterialFractionDescriptionComponent(); 2505 if (this.fractionDescription == null) 2506 this.fractionDescription = new ArrayList<SubstanceSourceMaterialFractionDescriptionComponent>(); 2507 this.fractionDescription.add(t); 2508 return t; 2509 } 2510 2511 public SubstanceSourceMaterial addFractionDescription(SubstanceSourceMaterialFractionDescriptionComponent t) { //3 2512 if (t == null) 2513 return this; 2514 if (this.fractionDescription == null) 2515 this.fractionDescription = new ArrayList<SubstanceSourceMaterialFractionDescriptionComponent>(); 2516 this.fractionDescription.add(t); 2517 return this; 2518 } 2519 2520 /** 2521 * @return The first repetition of repeating field {@link #fractionDescription}, creating it if it does not already exist 2522 */ 2523 public SubstanceSourceMaterialFractionDescriptionComponent getFractionDescriptionFirstRep() { 2524 if (getFractionDescription().isEmpty()) { 2525 addFractionDescription(); 2526 } 2527 return getFractionDescription().get(0); 2528 } 2529 2530 /** 2531 * @return {@link #organism} (This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.) 2532 */ 2533 public SubstanceSourceMaterialOrganismComponent getOrganism() { 2534 if (this.organism == null) 2535 if (Configuration.errorOnAutoCreate()) 2536 throw new Error("Attempt to auto-create SubstanceSourceMaterial.organism"); 2537 else if (Configuration.doAutoCreate()) 2538 this.organism = new SubstanceSourceMaterialOrganismComponent(); // cc 2539 return this.organism; 2540 } 2541 2542 public boolean hasOrganism() { 2543 return this.organism != null && !this.organism.isEmpty(); 2544 } 2545 2546 /** 2547 * @param value {@link #organism} (This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.) 2548 */ 2549 public SubstanceSourceMaterial setOrganism(SubstanceSourceMaterialOrganismComponent value) { 2550 this.organism = value; 2551 return this; 2552 } 2553 2554 /** 2555 * @return {@link #partDescription} (To do.) 2556 */ 2557 public List<SubstanceSourceMaterialPartDescriptionComponent> getPartDescription() { 2558 if (this.partDescription == null) 2559 this.partDescription = new ArrayList<SubstanceSourceMaterialPartDescriptionComponent>(); 2560 return this.partDescription; 2561 } 2562 2563 /** 2564 * @return Returns a reference to <code>this</code> for easy method chaining 2565 */ 2566 public SubstanceSourceMaterial setPartDescription(List<SubstanceSourceMaterialPartDescriptionComponent> thePartDescription) { 2567 this.partDescription = thePartDescription; 2568 return this; 2569 } 2570 2571 public boolean hasPartDescription() { 2572 if (this.partDescription == null) 2573 return false; 2574 for (SubstanceSourceMaterialPartDescriptionComponent item : this.partDescription) 2575 if (!item.isEmpty()) 2576 return true; 2577 return false; 2578 } 2579 2580 public SubstanceSourceMaterialPartDescriptionComponent addPartDescription() { //3 2581 SubstanceSourceMaterialPartDescriptionComponent t = new SubstanceSourceMaterialPartDescriptionComponent(); 2582 if (this.partDescription == null) 2583 this.partDescription = new ArrayList<SubstanceSourceMaterialPartDescriptionComponent>(); 2584 this.partDescription.add(t); 2585 return t; 2586 } 2587 2588 public SubstanceSourceMaterial addPartDescription(SubstanceSourceMaterialPartDescriptionComponent t) { //3 2589 if (t == null) 2590 return this; 2591 if (this.partDescription == null) 2592 this.partDescription = new ArrayList<SubstanceSourceMaterialPartDescriptionComponent>(); 2593 this.partDescription.add(t); 2594 return this; 2595 } 2596 2597 /** 2598 * @return The first repetition of repeating field {@link #partDescription}, creating it if it does not already exist 2599 */ 2600 public SubstanceSourceMaterialPartDescriptionComponent getPartDescriptionFirstRep() { 2601 if (getPartDescription().isEmpty()) { 2602 addPartDescription(); 2603 } 2604 return getPartDescription().get(0); 2605 } 2606 2607 protected void listChildren(List<Property> children) { 2608 super.listChildren(children); 2609 children.add(new Property("sourceMaterialClass", "CodeableConcept", "General high level classification of the source material specific to the origin of the material.", 0, 1, sourceMaterialClass)); 2610 children.add(new Property("sourceMaterialType", "CodeableConcept", "The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.", 0, 1, sourceMaterialType)); 2611 children.add(new Property("sourceMaterialState", "CodeableConcept", "The state of the source material when extracted.", 0, 1, sourceMaterialState)); 2612 children.add(new Property("organismId", "Identifier", "The unique identifier associated with the source material parent organism shall be specified.", 0, 1, organismId)); 2613 children.add(new Property("organismName", "string", "The organism accepted Scientific name shall be provided based on the organism taxonomy.", 0, 1, organismName)); 2614 children.add(new Property("parentSubstanceId", "Identifier", "The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).", 0, java.lang.Integer.MAX_VALUE, parentSubstanceId)); 2615 children.add(new Property("parentSubstanceName", "string", "The parent substance of the Herbal Drug, or Herbal preparation.", 0, java.lang.Integer.MAX_VALUE, parentSubstanceName)); 2616 children.add(new Property("countryOfOrigin", "CodeableConcept", "The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.", 0, java.lang.Integer.MAX_VALUE, countryOfOrigin)); 2617 children.add(new Property("geographicalLocation", "string", "The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.", 0, java.lang.Integer.MAX_VALUE, geographicalLocation)); 2618 children.add(new Property("developmentStage", "CodeableConcept", "Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).", 0, 1, developmentStage)); 2619 children.add(new Property("fractionDescription", "", "Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.", 0, java.lang.Integer.MAX_VALUE, fractionDescription)); 2620 children.add(new Property("organism", "", "This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.", 0, 1, organism)); 2621 children.add(new Property("partDescription", "", "To do.", 0, java.lang.Integer.MAX_VALUE, partDescription)); 2622 } 2623 2624 @Override 2625 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2626 switch (_hash) { 2627 case -1253081034: /*sourceMaterialClass*/ return new Property("sourceMaterialClass", "CodeableConcept", "General high level classification of the source material specific to the origin of the material.", 0, 1, sourceMaterialClass); 2628 case 1622665404: /*sourceMaterialType*/ return new Property("sourceMaterialType", "CodeableConcept", "The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.", 0, 1, sourceMaterialType); 2629 case -1238066353: /*sourceMaterialState*/ return new Property("sourceMaterialState", "CodeableConcept", "The state of the source material when extracted.", 0, 1, sourceMaterialState); 2630 case -1965449843: /*organismId*/ return new Property("organismId", "Identifier", "The unique identifier associated with the source material parent organism shall be specified.", 0, 1, organismId); 2631 case 988460669: /*organismName*/ return new Property("organismName", "string", "The organism accepted Scientific name shall be provided based on the organism taxonomy.", 0, 1, organismName); 2632 case -675437663: /*parentSubstanceId*/ return new Property("parentSubstanceId", "Identifier", "The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).", 0, java.lang.Integer.MAX_VALUE, parentSubstanceId); 2633 case -555382895: /*parentSubstanceName*/ return new Property("parentSubstanceName", "string", "The parent substance of the Herbal Drug, or Herbal preparation.", 0, java.lang.Integer.MAX_VALUE, parentSubstanceName); 2634 case 57176467: /*countryOfOrigin*/ return new Property("countryOfOrigin", "CodeableConcept", "The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.", 0, java.lang.Integer.MAX_VALUE, countryOfOrigin); 2635 case -1988836681: /*geographicalLocation*/ return new Property("geographicalLocation", "string", "The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.", 0, java.lang.Integer.MAX_VALUE, geographicalLocation); 2636 case 391529091: /*developmentStage*/ return new Property("developmentStage", "CodeableConcept", "Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).", 0, 1, developmentStage); 2637 case 1472689306: /*fractionDescription*/ return new Property("fractionDescription", "", "Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.", 0, java.lang.Integer.MAX_VALUE, fractionDescription); 2638 case 1316389074: /*organism*/ return new Property("organism", "", "This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.", 0, 1, organism); 2639 case -1803623927: /*partDescription*/ return new Property("partDescription", "", "To do.", 0, java.lang.Integer.MAX_VALUE, partDescription); 2640 default: return super.getNamedProperty(_hash, _name, _checkValid); 2641 } 2642 2643 } 2644 2645 @Override 2646 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2647 switch (hash) { 2648 case -1253081034: /*sourceMaterialClass*/ return this.sourceMaterialClass == null ? new Base[0] : new Base[] {this.sourceMaterialClass}; // CodeableConcept 2649 case 1622665404: /*sourceMaterialType*/ return this.sourceMaterialType == null ? new Base[0] : new Base[] {this.sourceMaterialType}; // CodeableConcept 2650 case -1238066353: /*sourceMaterialState*/ return this.sourceMaterialState == null ? new Base[0] : new Base[] {this.sourceMaterialState}; // CodeableConcept 2651 case -1965449843: /*organismId*/ return this.organismId == null ? new Base[0] : new Base[] {this.organismId}; // Identifier 2652 case 988460669: /*organismName*/ return this.organismName == null ? new Base[0] : new Base[] {this.organismName}; // StringType 2653 case -675437663: /*parentSubstanceId*/ return this.parentSubstanceId == null ? new Base[0] : this.parentSubstanceId.toArray(new Base[this.parentSubstanceId.size()]); // Identifier 2654 case -555382895: /*parentSubstanceName*/ return this.parentSubstanceName == null ? new Base[0] : this.parentSubstanceName.toArray(new Base[this.parentSubstanceName.size()]); // StringType 2655 case 57176467: /*countryOfOrigin*/ return this.countryOfOrigin == null ? new Base[0] : this.countryOfOrigin.toArray(new Base[this.countryOfOrigin.size()]); // CodeableConcept 2656 case -1988836681: /*geographicalLocation*/ return this.geographicalLocation == null ? new Base[0] : this.geographicalLocation.toArray(new Base[this.geographicalLocation.size()]); // StringType 2657 case 391529091: /*developmentStage*/ return this.developmentStage == null ? new Base[0] : new Base[] {this.developmentStage}; // CodeableConcept 2658 case 1472689306: /*fractionDescription*/ return this.fractionDescription == null ? new Base[0] : this.fractionDescription.toArray(new Base[this.fractionDescription.size()]); // SubstanceSourceMaterialFractionDescriptionComponent 2659 case 1316389074: /*organism*/ return this.organism == null ? new Base[0] : new Base[] {this.organism}; // SubstanceSourceMaterialOrganismComponent 2660 case -1803623927: /*partDescription*/ return this.partDescription == null ? new Base[0] : this.partDescription.toArray(new Base[this.partDescription.size()]); // SubstanceSourceMaterialPartDescriptionComponent 2661 default: return super.getProperty(hash, name, checkValid); 2662 } 2663 2664 } 2665 2666 @Override 2667 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2668 switch (hash) { 2669 case -1253081034: // sourceMaterialClass 2670 this.sourceMaterialClass = castToCodeableConcept(value); // CodeableConcept 2671 return value; 2672 case 1622665404: // sourceMaterialType 2673 this.sourceMaterialType = castToCodeableConcept(value); // CodeableConcept 2674 return value; 2675 case -1238066353: // sourceMaterialState 2676 this.sourceMaterialState = castToCodeableConcept(value); // CodeableConcept 2677 return value; 2678 case -1965449843: // organismId 2679 this.organismId = castToIdentifier(value); // Identifier 2680 return value; 2681 case 988460669: // organismName 2682 this.organismName = castToString(value); // StringType 2683 return value; 2684 case -675437663: // parentSubstanceId 2685 this.getParentSubstanceId().add(castToIdentifier(value)); // Identifier 2686 return value; 2687 case -555382895: // parentSubstanceName 2688 this.getParentSubstanceName().add(castToString(value)); // StringType 2689 return value; 2690 case 57176467: // countryOfOrigin 2691 this.getCountryOfOrigin().add(castToCodeableConcept(value)); // CodeableConcept 2692 return value; 2693 case -1988836681: // geographicalLocation 2694 this.getGeographicalLocation().add(castToString(value)); // StringType 2695 return value; 2696 case 391529091: // developmentStage 2697 this.developmentStage = castToCodeableConcept(value); // CodeableConcept 2698 return value; 2699 case 1472689306: // fractionDescription 2700 this.getFractionDescription().add((SubstanceSourceMaterialFractionDescriptionComponent) value); // SubstanceSourceMaterialFractionDescriptionComponent 2701 return value; 2702 case 1316389074: // organism 2703 this.organism = (SubstanceSourceMaterialOrganismComponent) value; // SubstanceSourceMaterialOrganismComponent 2704 return value; 2705 case -1803623927: // partDescription 2706 this.getPartDescription().add((SubstanceSourceMaterialPartDescriptionComponent) value); // SubstanceSourceMaterialPartDescriptionComponent 2707 return value; 2708 default: return super.setProperty(hash, name, value); 2709 } 2710 2711 } 2712 2713 @Override 2714 public Base setProperty(String name, Base value) throws FHIRException { 2715 if (name.equals("sourceMaterialClass")) { 2716 this.sourceMaterialClass = castToCodeableConcept(value); // CodeableConcept 2717 } else if (name.equals("sourceMaterialType")) { 2718 this.sourceMaterialType = castToCodeableConcept(value); // CodeableConcept 2719 } else if (name.equals("sourceMaterialState")) { 2720 this.sourceMaterialState = castToCodeableConcept(value); // CodeableConcept 2721 } else if (name.equals("organismId")) { 2722 this.organismId = castToIdentifier(value); // Identifier 2723 } else if (name.equals("organismName")) { 2724 this.organismName = castToString(value); // StringType 2725 } else if (name.equals("parentSubstanceId")) { 2726 this.getParentSubstanceId().add(castToIdentifier(value)); 2727 } else if (name.equals("parentSubstanceName")) { 2728 this.getParentSubstanceName().add(castToString(value)); 2729 } else if (name.equals("countryOfOrigin")) { 2730 this.getCountryOfOrigin().add(castToCodeableConcept(value)); 2731 } else if (name.equals("geographicalLocation")) { 2732 this.getGeographicalLocation().add(castToString(value)); 2733 } else if (name.equals("developmentStage")) { 2734 this.developmentStage = castToCodeableConcept(value); // CodeableConcept 2735 } else if (name.equals("fractionDescription")) { 2736 this.getFractionDescription().add((SubstanceSourceMaterialFractionDescriptionComponent) value); 2737 } else if (name.equals("organism")) { 2738 this.organism = (SubstanceSourceMaterialOrganismComponent) value; // SubstanceSourceMaterialOrganismComponent 2739 } else if (name.equals("partDescription")) { 2740 this.getPartDescription().add((SubstanceSourceMaterialPartDescriptionComponent) value); 2741 } else 2742 return super.setProperty(name, value); 2743 return value; 2744 } 2745 2746 @Override 2747 public Base makeProperty(int hash, String name) throws FHIRException { 2748 switch (hash) { 2749 case -1253081034: return getSourceMaterialClass(); 2750 case 1622665404: return getSourceMaterialType(); 2751 case -1238066353: return getSourceMaterialState(); 2752 case -1965449843: return getOrganismId(); 2753 case 988460669: return getOrganismNameElement(); 2754 case -675437663: return addParentSubstanceId(); 2755 case -555382895: return addParentSubstanceNameElement(); 2756 case 57176467: return addCountryOfOrigin(); 2757 case -1988836681: return addGeographicalLocationElement(); 2758 case 391529091: return getDevelopmentStage(); 2759 case 1472689306: return addFractionDescription(); 2760 case 1316389074: return getOrganism(); 2761 case -1803623927: return addPartDescription(); 2762 default: return super.makeProperty(hash, name); 2763 } 2764 2765 } 2766 2767 @Override 2768 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2769 switch (hash) { 2770 case -1253081034: /*sourceMaterialClass*/ return new String[] {"CodeableConcept"}; 2771 case 1622665404: /*sourceMaterialType*/ return new String[] {"CodeableConcept"}; 2772 case -1238066353: /*sourceMaterialState*/ return new String[] {"CodeableConcept"}; 2773 case -1965449843: /*organismId*/ return new String[] {"Identifier"}; 2774 case 988460669: /*organismName*/ return new String[] {"string"}; 2775 case -675437663: /*parentSubstanceId*/ return new String[] {"Identifier"}; 2776 case -555382895: /*parentSubstanceName*/ return new String[] {"string"}; 2777 case 57176467: /*countryOfOrigin*/ return new String[] {"CodeableConcept"}; 2778 case -1988836681: /*geographicalLocation*/ return new String[] {"string"}; 2779 case 391529091: /*developmentStage*/ return new String[] {"CodeableConcept"}; 2780 case 1472689306: /*fractionDescription*/ return new String[] {}; 2781 case 1316389074: /*organism*/ return new String[] {}; 2782 case -1803623927: /*partDescription*/ return new String[] {}; 2783 default: return super.getTypesForProperty(hash, name); 2784 } 2785 2786 } 2787 2788 @Override 2789 public Base addChild(String name) throws FHIRException { 2790 if (name.equals("sourceMaterialClass")) { 2791 this.sourceMaterialClass = new CodeableConcept(); 2792 return this.sourceMaterialClass; 2793 } 2794 else if (name.equals("sourceMaterialType")) { 2795 this.sourceMaterialType = new CodeableConcept(); 2796 return this.sourceMaterialType; 2797 } 2798 else if (name.equals("sourceMaterialState")) { 2799 this.sourceMaterialState = new CodeableConcept(); 2800 return this.sourceMaterialState; 2801 } 2802 else if (name.equals("organismId")) { 2803 this.organismId = new Identifier(); 2804 return this.organismId; 2805 } 2806 else if (name.equals("organismName")) { 2807 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.organismName"); 2808 } 2809 else if (name.equals("parentSubstanceId")) { 2810 return addParentSubstanceId(); 2811 } 2812 else if (name.equals("parentSubstanceName")) { 2813 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.parentSubstanceName"); 2814 } 2815 else if (name.equals("countryOfOrigin")) { 2816 return addCountryOfOrigin(); 2817 } 2818 else if (name.equals("geographicalLocation")) { 2819 throw new FHIRException("Cannot call addChild on a primitive type SubstanceSourceMaterial.geographicalLocation"); 2820 } 2821 else if (name.equals("developmentStage")) { 2822 this.developmentStage = new CodeableConcept(); 2823 return this.developmentStage; 2824 } 2825 else if (name.equals("fractionDescription")) { 2826 return addFractionDescription(); 2827 } 2828 else if (name.equals("organism")) { 2829 this.organism = new SubstanceSourceMaterialOrganismComponent(); 2830 return this.organism; 2831 } 2832 else if (name.equals("partDescription")) { 2833 return addPartDescription(); 2834 } 2835 else 2836 return super.addChild(name); 2837 } 2838 2839 public String fhirType() { 2840 return "SubstanceSourceMaterial"; 2841 2842 } 2843 2844 public SubstanceSourceMaterial copy() { 2845 SubstanceSourceMaterial dst = new SubstanceSourceMaterial(); 2846 copyValues(dst); 2847 return dst; 2848 } 2849 2850 public void copyValues(SubstanceSourceMaterial dst) { 2851 super.copyValues(dst); 2852 dst.sourceMaterialClass = sourceMaterialClass == null ? null : sourceMaterialClass.copy(); 2853 dst.sourceMaterialType = sourceMaterialType == null ? null : sourceMaterialType.copy(); 2854 dst.sourceMaterialState = sourceMaterialState == null ? null : sourceMaterialState.copy(); 2855 dst.organismId = organismId == null ? null : organismId.copy(); 2856 dst.organismName = organismName == null ? null : organismName.copy(); 2857 if (parentSubstanceId != null) { 2858 dst.parentSubstanceId = new ArrayList<Identifier>(); 2859 for (Identifier i : parentSubstanceId) 2860 dst.parentSubstanceId.add(i.copy()); 2861 }; 2862 if (parentSubstanceName != null) { 2863 dst.parentSubstanceName = new ArrayList<StringType>(); 2864 for (StringType i : parentSubstanceName) 2865 dst.parentSubstanceName.add(i.copy()); 2866 }; 2867 if (countryOfOrigin != null) { 2868 dst.countryOfOrigin = new ArrayList<CodeableConcept>(); 2869 for (CodeableConcept i : countryOfOrigin) 2870 dst.countryOfOrigin.add(i.copy()); 2871 }; 2872 if (geographicalLocation != null) { 2873 dst.geographicalLocation = new ArrayList<StringType>(); 2874 for (StringType i : geographicalLocation) 2875 dst.geographicalLocation.add(i.copy()); 2876 }; 2877 dst.developmentStage = developmentStage == null ? null : developmentStage.copy(); 2878 if (fractionDescription != null) { 2879 dst.fractionDescription = new ArrayList<SubstanceSourceMaterialFractionDescriptionComponent>(); 2880 for (SubstanceSourceMaterialFractionDescriptionComponent i : fractionDescription) 2881 dst.fractionDescription.add(i.copy()); 2882 }; 2883 dst.organism = organism == null ? null : organism.copy(); 2884 if (partDescription != null) { 2885 dst.partDescription = new ArrayList<SubstanceSourceMaterialPartDescriptionComponent>(); 2886 for (SubstanceSourceMaterialPartDescriptionComponent i : partDescription) 2887 dst.partDescription.add(i.copy()); 2888 }; 2889 } 2890 2891 protected SubstanceSourceMaterial typedCopy() { 2892 return copy(); 2893 } 2894 2895 @Override 2896 public boolean equalsDeep(Base other_) { 2897 if (!super.equalsDeep(other_)) 2898 return false; 2899 if (!(other_ instanceof SubstanceSourceMaterial)) 2900 return false; 2901 SubstanceSourceMaterial o = (SubstanceSourceMaterial) other_; 2902 return compareDeep(sourceMaterialClass, o.sourceMaterialClass, true) && compareDeep(sourceMaterialType, o.sourceMaterialType, true) 2903 && compareDeep(sourceMaterialState, o.sourceMaterialState, true) && compareDeep(organismId, o.organismId, true) 2904 && compareDeep(organismName, o.organismName, true) && compareDeep(parentSubstanceId, o.parentSubstanceId, true) 2905 && compareDeep(parentSubstanceName, o.parentSubstanceName, true) && compareDeep(countryOfOrigin, o.countryOfOrigin, true) 2906 && compareDeep(geographicalLocation, o.geographicalLocation, true) && compareDeep(developmentStage, o.developmentStage, true) 2907 && compareDeep(fractionDescription, o.fractionDescription, true) && compareDeep(organism, o.organism, true) 2908 && compareDeep(partDescription, o.partDescription, true); 2909 } 2910 2911 @Override 2912 public boolean equalsShallow(Base other_) { 2913 if (!super.equalsShallow(other_)) 2914 return false; 2915 if (!(other_ instanceof SubstanceSourceMaterial)) 2916 return false; 2917 SubstanceSourceMaterial o = (SubstanceSourceMaterial) other_; 2918 return compareValues(organismName, o.organismName, true) && compareValues(parentSubstanceName, o.parentSubstanceName, true) 2919 && compareValues(geographicalLocation, o.geographicalLocation, true); 2920 } 2921 2922 public boolean isEmpty() { 2923 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sourceMaterialClass, sourceMaterialType 2924 , sourceMaterialState, organismId, organismName, parentSubstanceId, parentSubstanceName 2925 , countryOfOrigin, geographicalLocation, developmentStage, fractionDescription, organism 2926 , partDescription); 2927 } 2928 2929 @Override 2930 public ResourceType getResourceType() { 2931 return ResourceType.SubstanceSourceMaterial; 2932 } 2933 2934 2935}