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