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