001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4b.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * An ingredient of a manufactured item or pharmaceutical product. 052 */ 053@ResourceDef(name="Ingredient", profile="http://hl7.org/fhir/StructureDefinition/Ingredient") 054public class Ingredient extends DomainResource { 055 056 @Block() 057 public static class IngredientManufacturerComponent extends BackboneElement implements IBaseBackboneElement { 058 /** 059 * The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role. 060 */ 061 @Child(name = "role", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) 062 @Description(shortDefinition="The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role", formalDefinition="The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role." ) 063 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ingredient-manufacturer-role") 064 protected Coding role; 065 066 /** 067 * An organization that manufactures this ingredient. 068 */ 069 @Child(name = "manufacturer", type = {Organization.class}, order=2, min=1, max=1, modifier=false, summary=true) 070 @Description(shortDefinition="An organization that manufactures this ingredient", formalDefinition="An organization that manufactures this ingredient." ) 071 protected Reference manufacturer; 072 073 private static final long serialVersionUID = -1240157438L; 074 075 /** 076 * Constructor 077 */ 078 public IngredientManufacturerComponent() { 079 super(); 080 } 081 082 /** 083 * Constructor 084 */ 085 public IngredientManufacturerComponent(Reference manufacturer) { 086 super(); 087 this.setManufacturer(manufacturer); 088 } 089 090 /** 091 * @return {@link #role} (The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.) 092 */ 093 public Coding getRole() { 094 if (this.role == null) 095 if (Configuration.errorOnAutoCreate()) 096 throw new Error("Attempt to auto-create IngredientManufacturerComponent.role"); 097 else if (Configuration.doAutoCreate()) 098 this.role = new Coding(); // cc 099 return this.role; 100 } 101 102 public boolean hasRole() { 103 return this.role != null && !this.role.isEmpty(); 104 } 105 106 /** 107 * @param value {@link #role} (The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.) 108 */ 109 public IngredientManufacturerComponent setRole(Coding value) { 110 this.role = value; 111 return this; 112 } 113 114 /** 115 * @return {@link #manufacturer} (An organization that manufactures this ingredient.) 116 */ 117 public Reference getManufacturer() { 118 if (this.manufacturer == null) 119 if (Configuration.errorOnAutoCreate()) 120 throw new Error("Attempt to auto-create IngredientManufacturerComponent.manufacturer"); 121 else if (Configuration.doAutoCreate()) 122 this.manufacturer = new Reference(); // cc 123 return this.manufacturer; 124 } 125 126 public boolean hasManufacturer() { 127 return this.manufacturer != null && !this.manufacturer.isEmpty(); 128 } 129 130 /** 131 * @param value {@link #manufacturer} (An organization that manufactures this ingredient.) 132 */ 133 public IngredientManufacturerComponent setManufacturer(Reference value) { 134 this.manufacturer = value; 135 return this; 136 } 137 138 protected void listChildren(List<Property> children) { 139 super.listChildren(children); 140 children.add(new Property("role", "Coding", "The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.", 0, 1, role)); 141 children.add(new Property("manufacturer", "Reference(Organization)", "An organization that manufactures this ingredient.", 0, 1, manufacturer)); 142 } 143 144 @Override 145 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 146 switch (_hash) { 147 case 3506294: /*role*/ return new Property("role", "Coding", "The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.", 0, 1, role); 148 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "Reference(Organization)", "An organization that manufactures this ingredient.", 0, 1, manufacturer); 149 default: return super.getNamedProperty(_hash, _name, _checkValid); 150 } 151 152 } 153 154 @Override 155 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 156 switch (hash) { 157 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // Coding 158 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // Reference 159 default: return super.getProperty(hash, name, checkValid); 160 } 161 162 } 163 164 @Override 165 public Base setProperty(int hash, String name, Base value) throws FHIRException { 166 switch (hash) { 167 case 3506294: // role 168 this.role = TypeConvertor.castToCoding(value); // Coding 169 return value; 170 case -1969347631: // manufacturer 171 this.manufacturer = TypeConvertor.castToReference(value); // Reference 172 return value; 173 default: return super.setProperty(hash, name, value); 174 } 175 176 } 177 178 @Override 179 public Base setProperty(String name, Base value) throws FHIRException { 180 if (name.equals("role")) { 181 this.role = TypeConvertor.castToCoding(value); // Coding 182 } else if (name.equals("manufacturer")) { 183 this.manufacturer = TypeConvertor.castToReference(value); // Reference 184 } else 185 return super.setProperty(name, value); 186 return value; 187 } 188 189 @Override 190 public Base makeProperty(int hash, String name) throws FHIRException { 191 switch (hash) { 192 case 3506294: return getRole(); 193 case -1969347631: return getManufacturer(); 194 default: return super.makeProperty(hash, name); 195 } 196 197 } 198 199 @Override 200 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 201 switch (hash) { 202 case 3506294: /*role*/ return new String[] {"Coding"}; 203 case -1969347631: /*manufacturer*/ return new String[] {"Reference"}; 204 default: return super.getTypesForProperty(hash, name); 205 } 206 207 } 208 209 @Override 210 public Base addChild(String name) throws FHIRException { 211 if (name.equals("role")) { 212 this.role = new Coding(); 213 return this.role; 214 } 215 else if (name.equals("manufacturer")) { 216 this.manufacturer = new Reference(); 217 return this.manufacturer; 218 } 219 else 220 return super.addChild(name); 221 } 222 223 public IngredientManufacturerComponent copy() { 224 IngredientManufacturerComponent dst = new IngredientManufacturerComponent(); 225 copyValues(dst); 226 return dst; 227 } 228 229 public void copyValues(IngredientManufacturerComponent dst) { 230 super.copyValues(dst); 231 dst.role = role == null ? null : role.copy(); 232 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 233 } 234 235 @Override 236 public boolean equalsDeep(Base other_) { 237 if (!super.equalsDeep(other_)) 238 return false; 239 if (!(other_ instanceof IngredientManufacturerComponent)) 240 return false; 241 IngredientManufacturerComponent o = (IngredientManufacturerComponent) other_; 242 return compareDeep(role, o.role, true) && compareDeep(manufacturer, o.manufacturer, true); 243 } 244 245 @Override 246 public boolean equalsShallow(Base other_) { 247 if (!super.equalsShallow(other_)) 248 return false; 249 if (!(other_ instanceof IngredientManufacturerComponent)) 250 return false; 251 IngredientManufacturerComponent o = (IngredientManufacturerComponent) other_; 252 return true; 253 } 254 255 public boolean isEmpty() { 256 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, manufacturer); 257 } 258 259 public String fhirType() { 260 return "Ingredient.manufacturer"; 261 262 } 263 264 } 265 266 @Block() 267 public static class IngredientSubstanceComponent extends BackboneElement implements IBaseBackboneElement { 268 /** 269 * A code or full resource that represents the ingredient substance. 270 */ 271 @Child(name = "code", type = {CodeableReference.class}, order=1, min=1, max=1, modifier=false, summary=true) 272 @Description(shortDefinition="A code or full resource that represents the ingredient substance", formalDefinition="A code or full resource that represents the ingredient substance." ) 273 protected CodeableReference code; 274 275 /** 276 * The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. 277 */ 278 @Child(name = "strength", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 279 @Description(shortDefinition="The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item", formalDefinition="The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item." ) 280 protected List<IngredientSubstanceStrengthComponent> strength; 281 282 private static final long serialVersionUID = 538347209L; 283 284 /** 285 * Constructor 286 */ 287 public IngredientSubstanceComponent() { 288 super(); 289 } 290 291 /** 292 * Constructor 293 */ 294 public IngredientSubstanceComponent(CodeableReference code) { 295 super(); 296 this.setCode(code); 297 } 298 299 /** 300 * @return {@link #code} (A code or full resource that represents the ingredient substance.) 301 */ 302 public CodeableReference getCode() { 303 if (this.code == null) 304 if (Configuration.errorOnAutoCreate()) 305 throw new Error("Attempt to auto-create IngredientSubstanceComponent.code"); 306 else if (Configuration.doAutoCreate()) 307 this.code = new CodeableReference(); // cc 308 return this.code; 309 } 310 311 public boolean hasCode() { 312 return this.code != null && !this.code.isEmpty(); 313 } 314 315 /** 316 * @param value {@link #code} (A code or full resource that represents the ingredient substance.) 317 */ 318 public IngredientSubstanceComponent setCode(CodeableReference value) { 319 this.code = value; 320 return this; 321 } 322 323 /** 324 * @return {@link #strength} (The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.) 325 */ 326 public List<IngredientSubstanceStrengthComponent> getStrength() { 327 if (this.strength == null) 328 this.strength = new ArrayList<IngredientSubstanceStrengthComponent>(); 329 return this.strength; 330 } 331 332 /** 333 * @return Returns a reference to <code>this</code> for easy method chaining 334 */ 335 public IngredientSubstanceComponent setStrength(List<IngredientSubstanceStrengthComponent> theStrength) { 336 this.strength = theStrength; 337 return this; 338 } 339 340 public boolean hasStrength() { 341 if (this.strength == null) 342 return false; 343 for (IngredientSubstanceStrengthComponent item : this.strength) 344 if (!item.isEmpty()) 345 return true; 346 return false; 347 } 348 349 public IngredientSubstanceStrengthComponent addStrength() { //3 350 IngredientSubstanceStrengthComponent t = new IngredientSubstanceStrengthComponent(); 351 if (this.strength == null) 352 this.strength = new ArrayList<IngredientSubstanceStrengthComponent>(); 353 this.strength.add(t); 354 return t; 355 } 356 357 public IngredientSubstanceComponent addStrength(IngredientSubstanceStrengthComponent t) { //3 358 if (t == null) 359 return this; 360 if (this.strength == null) 361 this.strength = new ArrayList<IngredientSubstanceStrengthComponent>(); 362 this.strength.add(t); 363 return this; 364 } 365 366 /** 367 * @return The first repetition of repeating field {@link #strength}, creating it if it does not already exist {3} 368 */ 369 public IngredientSubstanceStrengthComponent getStrengthFirstRep() { 370 if (getStrength().isEmpty()) { 371 addStrength(); 372 } 373 return getStrength().get(0); 374 } 375 376 protected void listChildren(List<Property> children) { 377 super.listChildren(children); 378 children.add(new Property("code", "CodeableReference(SubstanceDefinition)", "A code or full resource that represents the ingredient substance.", 0, 1, code)); 379 children.add(new Property("strength", "", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, java.lang.Integer.MAX_VALUE, strength)); 380 } 381 382 @Override 383 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 384 switch (_hash) { 385 case 3059181: /*code*/ return new Property("code", "CodeableReference(SubstanceDefinition)", "A code or full resource that represents the ingredient substance.", 0, 1, code); 386 case 1791316033: /*strength*/ return new Property("strength", "", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, java.lang.Integer.MAX_VALUE, strength); 387 default: return super.getNamedProperty(_hash, _name, _checkValid); 388 } 389 390 } 391 392 @Override 393 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 394 switch (hash) { 395 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableReference 396 case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : this.strength.toArray(new Base[this.strength.size()]); // IngredientSubstanceStrengthComponent 397 default: return super.getProperty(hash, name, checkValid); 398 } 399 400 } 401 402 @Override 403 public Base setProperty(int hash, String name, Base value) throws FHIRException { 404 switch (hash) { 405 case 3059181: // code 406 this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference 407 return value; 408 case 1791316033: // strength 409 this.getStrength().add((IngredientSubstanceStrengthComponent) value); // IngredientSubstanceStrengthComponent 410 return value; 411 default: return super.setProperty(hash, name, value); 412 } 413 414 } 415 416 @Override 417 public Base setProperty(String name, Base value) throws FHIRException { 418 if (name.equals("code")) { 419 this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference 420 } else if (name.equals("strength")) { 421 this.getStrength().add((IngredientSubstanceStrengthComponent) value); 422 } else 423 return super.setProperty(name, value); 424 return value; 425 } 426 427 @Override 428 public Base makeProperty(int hash, String name) throws FHIRException { 429 switch (hash) { 430 case 3059181: return getCode(); 431 case 1791316033: return addStrength(); 432 default: return super.makeProperty(hash, name); 433 } 434 435 } 436 437 @Override 438 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 439 switch (hash) { 440 case 3059181: /*code*/ return new String[] {"CodeableReference"}; 441 case 1791316033: /*strength*/ return new String[] {}; 442 default: return super.getTypesForProperty(hash, name); 443 } 444 445 } 446 447 @Override 448 public Base addChild(String name) throws FHIRException { 449 if (name.equals("code")) { 450 this.code = new CodeableReference(); 451 return this.code; 452 } 453 else if (name.equals("strength")) { 454 return addStrength(); 455 } 456 else 457 return super.addChild(name); 458 } 459 460 public IngredientSubstanceComponent copy() { 461 IngredientSubstanceComponent dst = new IngredientSubstanceComponent(); 462 copyValues(dst); 463 return dst; 464 } 465 466 public void copyValues(IngredientSubstanceComponent dst) { 467 super.copyValues(dst); 468 dst.code = code == null ? null : code.copy(); 469 if (strength != null) { 470 dst.strength = new ArrayList<IngredientSubstanceStrengthComponent>(); 471 for (IngredientSubstanceStrengthComponent i : strength) 472 dst.strength.add(i.copy()); 473 }; 474 } 475 476 @Override 477 public boolean equalsDeep(Base other_) { 478 if (!super.equalsDeep(other_)) 479 return false; 480 if (!(other_ instanceof IngredientSubstanceComponent)) 481 return false; 482 IngredientSubstanceComponent o = (IngredientSubstanceComponent) other_; 483 return compareDeep(code, o.code, true) && compareDeep(strength, o.strength, true); 484 } 485 486 @Override 487 public boolean equalsShallow(Base other_) { 488 if (!super.equalsShallow(other_)) 489 return false; 490 if (!(other_ instanceof IngredientSubstanceComponent)) 491 return false; 492 IngredientSubstanceComponent o = (IngredientSubstanceComponent) other_; 493 return true; 494 } 495 496 public boolean isEmpty() { 497 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, strength); 498 } 499 500 public String fhirType() { 501 return "Ingredient.substance"; 502 503 } 504 505 } 506 507 @Block() 508 public static class IngredientSubstanceStrengthComponent extends BackboneElement implements IBaseBackboneElement { 509 /** 510 * The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. 511 */ 512 @Child(name = "presentation", type = {Ratio.class, RatioRange.class}, order=1, min=0, max=1, modifier=false, summary=true) 513 @Description(shortDefinition="The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item", formalDefinition="The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item." ) 514 protected DataType presentation; 515 516 /** 517 * A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio. 518 */ 519 @Child(name = "presentationText", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 520 @Description(shortDefinition="A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio", formalDefinition="A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio." ) 521 protected StringType presentationText; 522 523 /** 524 * The strength per unitary volume (or mass). 525 */ 526 @Child(name = "concentration", type = {Ratio.class, RatioRange.class}, order=3, min=0, max=1, modifier=false, summary=true) 527 @Description(shortDefinition="The strength per unitary volume (or mass)", formalDefinition="The strength per unitary volume (or mass)." ) 528 protected DataType concentration; 529 530 /** 531 * A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio. 532 */ 533 @Child(name = "concentrationText", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 534 @Description(shortDefinition="A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio", formalDefinition="A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio." ) 535 protected StringType concentrationText; 536 537 /** 538 * For when strength is measured at a particular point or distance. 539 */ 540 @Child(name = "measurementPoint", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 541 @Description(shortDefinition="For when strength is measured at a particular point or distance", formalDefinition="For when strength is measured at a particular point or distance." ) 542 protected StringType measurementPoint; 543 544 /** 545 * The country or countries for which the strength range applies. 546 */ 547 @Child(name = "country", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 548 @Description(shortDefinition="The country or countries for which the strength range applies", formalDefinition="The country or countries for which the strength range applies." ) 549 protected List<CodeableConcept> country; 550 551 /** 552 * Strength expressed in terms of a reference substance. 553 */ 554 @Child(name = "referenceStrength", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 555 @Description(shortDefinition="Strength expressed in terms of a reference substance", formalDefinition="Strength expressed in terms of a reference substance." ) 556 protected List<IngredientSubstanceStrengthReferenceStrengthComponent> referenceStrength; 557 558 private static final long serialVersionUID = 2004118171L; 559 560 /** 561 * Constructor 562 */ 563 public IngredientSubstanceStrengthComponent() { 564 super(); 565 } 566 567 /** 568 * @return {@link #presentation} (The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.) 569 */ 570 public DataType getPresentation() { 571 return this.presentation; 572 } 573 574 /** 575 * @return {@link #presentation} (The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.) 576 */ 577 public Ratio getPresentationRatio() throws FHIRException { 578 if (this.presentation == null) 579 this.presentation = new Ratio(); 580 if (!(this.presentation instanceof Ratio)) 581 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.presentation.getClass().getName()+" was encountered"); 582 return (Ratio) this.presentation; 583 } 584 585 public boolean hasPresentationRatio() { 586 return this != null && this.presentation instanceof Ratio; 587 } 588 589 /** 590 * @return {@link #presentation} (The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.) 591 */ 592 public RatioRange getPresentationRatioRange() throws FHIRException { 593 if (this.presentation == null) 594 this.presentation = new RatioRange(); 595 if (!(this.presentation instanceof RatioRange)) 596 throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.presentation.getClass().getName()+" was encountered"); 597 return (RatioRange) this.presentation; 598 } 599 600 public boolean hasPresentationRatioRange() { 601 return this != null && this.presentation instanceof RatioRange; 602 } 603 604 public boolean hasPresentation() { 605 return this.presentation != null && !this.presentation.isEmpty(); 606 } 607 608 /** 609 * @param value {@link #presentation} (The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.) 610 */ 611 public IngredientSubstanceStrengthComponent setPresentation(DataType value) { 612 if (value != null && !(value instanceof Ratio || value instanceof RatioRange)) 613 throw new Error("Not the right type for Ingredient.substance.strength.presentation[x]: "+value.fhirType()); 614 this.presentation = value; 615 return this; 616 } 617 618 /** 619 * @return {@link #presentationText} (A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.). This is the underlying object with id, value and extensions. The accessor "getPresentationText" gives direct access to the value 620 */ 621 public StringType getPresentationTextElement() { 622 if (this.presentationText == null) 623 if (Configuration.errorOnAutoCreate()) 624 throw new Error("Attempt to auto-create IngredientSubstanceStrengthComponent.presentationText"); 625 else if (Configuration.doAutoCreate()) 626 this.presentationText = new StringType(); // bb 627 return this.presentationText; 628 } 629 630 public boolean hasPresentationTextElement() { 631 return this.presentationText != null && !this.presentationText.isEmpty(); 632 } 633 634 public boolean hasPresentationText() { 635 return this.presentationText != null && !this.presentationText.isEmpty(); 636 } 637 638 /** 639 * @param value {@link #presentationText} (A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.). This is the underlying object with id, value and extensions. The accessor "getPresentationText" gives direct access to the value 640 */ 641 public IngredientSubstanceStrengthComponent setPresentationTextElement(StringType value) { 642 this.presentationText = value; 643 return this; 644 } 645 646 /** 647 * @return A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio. 648 */ 649 public String getPresentationText() { 650 return this.presentationText == null ? null : this.presentationText.getValue(); 651 } 652 653 /** 654 * @param value A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio. 655 */ 656 public IngredientSubstanceStrengthComponent setPresentationText(String value) { 657 if (Utilities.noString(value)) 658 this.presentationText = null; 659 else { 660 if (this.presentationText == null) 661 this.presentationText = new StringType(); 662 this.presentationText.setValue(value); 663 } 664 return this; 665 } 666 667 /** 668 * @return {@link #concentration} (The strength per unitary volume (or mass).) 669 */ 670 public DataType getConcentration() { 671 return this.concentration; 672 } 673 674 /** 675 * @return {@link #concentration} (The strength per unitary volume (or mass).) 676 */ 677 public Ratio getConcentrationRatio() throws FHIRException { 678 if (this.concentration == null) 679 this.concentration = new Ratio(); 680 if (!(this.concentration instanceof Ratio)) 681 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.concentration.getClass().getName()+" was encountered"); 682 return (Ratio) this.concentration; 683 } 684 685 public boolean hasConcentrationRatio() { 686 return this != null && this.concentration instanceof Ratio; 687 } 688 689 /** 690 * @return {@link #concentration} (The strength per unitary volume (or mass).) 691 */ 692 public RatioRange getConcentrationRatioRange() throws FHIRException { 693 if (this.concentration == null) 694 this.concentration = new RatioRange(); 695 if (!(this.concentration instanceof RatioRange)) 696 throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.concentration.getClass().getName()+" was encountered"); 697 return (RatioRange) this.concentration; 698 } 699 700 public boolean hasConcentrationRatioRange() { 701 return this != null && this.concentration instanceof RatioRange; 702 } 703 704 public boolean hasConcentration() { 705 return this.concentration != null && !this.concentration.isEmpty(); 706 } 707 708 /** 709 * @param value {@link #concentration} (The strength per unitary volume (or mass).) 710 */ 711 public IngredientSubstanceStrengthComponent setConcentration(DataType value) { 712 if (value != null && !(value instanceof Ratio || value instanceof RatioRange)) 713 throw new Error("Not the right type for Ingredient.substance.strength.concentration[x]: "+value.fhirType()); 714 this.concentration = value; 715 return this; 716 } 717 718 /** 719 * @return {@link #concentrationText} (A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.). This is the underlying object with id, value and extensions. The accessor "getConcentrationText" gives direct access to the value 720 */ 721 public StringType getConcentrationTextElement() { 722 if (this.concentrationText == null) 723 if (Configuration.errorOnAutoCreate()) 724 throw new Error("Attempt to auto-create IngredientSubstanceStrengthComponent.concentrationText"); 725 else if (Configuration.doAutoCreate()) 726 this.concentrationText = new StringType(); // bb 727 return this.concentrationText; 728 } 729 730 public boolean hasConcentrationTextElement() { 731 return this.concentrationText != null && !this.concentrationText.isEmpty(); 732 } 733 734 public boolean hasConcentrationText() { 735 return this.concentrationText != null && !this.concentrationText.isEmpty(); 736 } 737 738 /** 739 * @param value {@link #concentrationText} (A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.). This is the underlying object with id, value and extensions. The accessor "getConcentrationText" gives direct access to the value 740 */ 741 public IngredientSubstanceStrengthComponent setConcentrationTextElement(StringType value) { 742 this.concentrationText = value; 743 return this; 744 } 745 746 /** 747 * @return A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio. 748 */ 749 public String getConcentrationText() { 750 return this.concentrationText == null ? null : this.concentrationText.getValue(); 751 } 752 753 /** 754 * @param value A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio. 755 */ 756 public IngredientSubstanceStrengthComponent setConcentrationText(String value) { 757 if (Utilities.noString(value)) 758 this.concentrationText = null; 759 else { 760 if (this.concentrationText == null) 761 this.concentrationText = new StringType(); 762 this.concentrationText.setValue(value); 763 } 764 return this; 765 } 766 767 /** 768 * @return {@link #measurementPoint} (For when strength is measured at a particular point or distance.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPoint" gives direct access to the value 769 */ 770 public StringType getMeasurementPointElement() { 771 if (this.measurementPoint == null) 772 if (Configuration.errorOnAutoCreate()) 773 throw new Error("Attempt to auto-create IngredientSubstanceStrengthComponent.measurementPoint"); 774 else if (Configuration.doAutoCreate()) 775 this.measurementPoint = new StringType(); // bb 776 return this.measurementPoint; 777 } 778 779 public boolean hasMeasurementPointElement() { 780 return this.measurementPoint != null && !this.measurementPoint.isEmpty(); 781 } 782 783 public boolean hasMeasurementPoint() { 784 return this.measurementPoint != null && !this.measurementPoint.isEmpty(); 785 } 786 787 /** 788 * @param value {@link #measurementPoint} (For when strength is measured at a particular point or distance.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPoint" gives direct access to the value 789 */ 790 public IngredientSubstanceStrengthComponent setMeasurementPointElement(StringType value) { 791 this.measurementPoint = value; 792 return this; 793 } 794 795 /** 796 * @return For when strength is measured at a particular point or distance. 797 */ 798 public String getMeasurementPoint() { 799 return this.measurementPoint == null ? null : this.measurementPoint.getValue(); 800 } 801 802 /** 803 * @param value For when strength is measured at a particular point or distance. 804 */ 805 public IngredientSubstanceStrengthComponent setMeasurementPoint(String value) { 806 if (Utilities.noString(value)) 807 this.measurementPoint = null; 808 else { 809 if (this.measurementPoint == null) 810 this.measurementPoint = new StringType(); 811 this.measurementPoint.setValue(value); 812 } 813 return this; 814 } 815 816 /** 817 * @return {@link #country} (The country or countries for which the strength range applies.) 818 */ 819 public List<CodeableConcept> getCountry() { 820 if (this.country == null) 821 this.country = new ArrayList<CodeableConcept>(); 822 return this.country; 823 } 824 825 /** 826 * @return Returns a reference to <code>this</code> for easy method chaining 827 */ 828 public IngredientSubstanceStrengthComponent setCountry(List<CodeableConcept> theCountry) { 829 this.country = theCountry; 830 return this; 831 } 832 833 public boolean hasCountry() { 834 if (this.country == null) 835 return false; 836 for (CodeableConcept item : this.country) 837 if (!item.isEmpty()) 838 return true; 839 return false; 840 } 841 842 public CodeableConcept addCountry() { //3 843 CodeableConcept t = new CodeableConcept(); 844 if (this.country == null) 845 this.country = new ArrayList<CodeableConcept>(); 846 this.country.add(t); 847 return t; 848 } 849 850 public IngredientSubstanceStrengthComponent addCountry(CodeableConcept t) { //3 851 if (t == null) 852 return this; 853 if (this.country == null) 854 this.country = new ArrayList<CodeableConcept>(); 855 this.country.add(t); 856 return this; 857 } 858 859 /** 860 * @return The first repetition of repeating field {@link #country}, creating it if it does not already exist {3} 861 */ 862 public CodeableConcept getCountryFirstRep() { 863 if (getCountry().isEmpty()) { 864 addCountry(); 865 } 866 return getCountry().get(0); 867 } 868 869 /** 870 * @return {@link #referenceStrength} (Strength expressed in terms of a reference substance.) 871 */ 872 public List<IngredientSubstanceStrengthReferenceStrengthComponent> getReferenceStrength() { 873 if (this.referenceStrength == null) 874 this.referenceStrength = new ArrayList<IngredientSubstanceStrengthReferenceStrengthComponent>(); 875 return this.referenceStrength; 876 } 877 878 /** 879 * @return Returns a reference to <code>this</code> for easy method chaining 880 */ 881 public IngredientSubstanceStrengthComponent setReferenceStrength(List<IngredientSubstanceStrengthReferenceStrengthComponent> theReferenceStrength) { 882 this.referenceStrength = theReferenceStrength; 883 return this; 884 } 885 886 public boolean hasReferenceStrength() { 887 if (this.referenceStrength == null) 888 return false; 889 for (IngredientSubstanceStrengthReferenceStrengthComponent item : this.referenceStrength) 890 if (!item.isEmpty()) 891 return true; 892 return false; 893 } 894 895 public IngredientSubstanceStrengthReferenceStrengthComponent addReferenceStrength() { //3 896 IngredientSubstanceStrengthReferenceStrengthComponent t = new IngredientSubstanceStrengthReferenceStrengthComponent(); 897 if (this.referenceStrength == null) 898 this.referenceStrength = new ArrayList<IngredientSubstanceStrengthReferenceStrengthComponent>(); 899 this.referenceStrength.add(t); 900 return t; 901 } 902 903 public IngredientSubstanceStrengthComponent addReferenceStrength(IngredientSubstanceStrengthReferenceStrengthComponent t) { //3 904 if (t == null) 905 return this; 906 if (this.referenceStrength == null) 907 this.referenceStrength = new ArrayList<IngredientSubstanceStrengthReferenceStrengthComponent>(); 908 this.referenceStrength.add(t); 909 return this; 910 } 911 912 /** 913 * @return The first repetition of repeating field {@link #referenceStrength}, creating it if it does not already exist {3} 914 */ 915 public IngredientSubstanceStrengthReferenceStrengthComponent getReferenceStrengthFirstRep() { 916 if (getReferenceStrength().isEmpty()) { 917 addReferenceStrength(); 918 } 919 return getReferenceStrength().get(0); 920 } 921 922 protected void listChildren(List<Property> children) { 923 super.listChildren(children); 924 children.add(new Property("presentation[x]", "Ratio|RatioRange", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, 1, presentation)); 925 children.add(new Property("presentationText", "string", "A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.", 0, 1, presentationText)); 926 children.add(new Property("concentration[x]", "Ratio|RatioRange", "The strength per unitary volume (or mass).", 0, 1, concentration)); 927 children.add(new Property("concentrationText", "string", "A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.", 0, 1, concentrationText)); 928 children.add(new Property("measurementPoint", "string", "For when strength is measured at a particular point or distance.", 0, 1, measurementPoint)); 929 children.add(new Property("country", "CodeableConcept", "The country or countries for which the strength range applies.", 0, java.lang.Integer.MAX_VALUE, country)); 930 children.add(new Property("referenceStrength", "", "Strength expressed in terms of a reference substance.", 0, java.lang.Integer.MAX_VALUE, referenceStrength)); 931 } 932 933 @Override 934 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 935 switch (_hash) { 936 case 1714280230: /*presentation[x]*/ return new Property("presentation[x]", "Ratio|RatioRange", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, 1, presentation); 937 case 696975130: /*presentation*/ return new Property("presentation[x]", "Ratio|RatioRange", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, 1, presentation); 938 case -1853112047: /*presentationRatio*/ return new Property("presentation[x]", "Ratio", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, 1, presentation); 939 case 643336876: /*presentationRatioRange*/ return new Property("presentation[x]", "RatioRange", "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.", 0, 1, presentation); 940 case 1602853735: /*presentationText*/ return new Property("presentationText", "string", "A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.", 0, 1, presentationText); 941 case 1153502451: /*concentration[x]*/ return new Property("concentration[x]", "Ratio|RatioRange", "The strength per unitary volume (or mass).", 0, 1, concentration); 942 case -410557331: /*concentration*/ return new Property("concentration[x]", "Ratio|RatioRange", "The strength per unitary volume (or mass).", 0, 1, concentration); 943 case 405321630: /*concentrationRatio*/ return new Property("concentration[x]", "Ratio", "The strength per unitary volume (or mass).", 0, 1, concentration); 944 case 436249663: /*concentrationRatioRange*/ return new Property("concentration[x]", "RatioRange", "The strength per unitary volume (or mass).", 0, 1, concentration); 945 case 1398611770: /*concentrationText*/ return new Property("concentrationText", "string", "A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.", 0, 1, concentrationText); 946 case 235437876: /*measurementPoint*/ return new Property("measurementPoint", "string", "For when strength is measured at a particular point or distance.", 0, 1, measurementPoint); 947 case 957831062: /*country*/ return new Property("country", "CodeableConcept", "The country or countries for which the strength range applies.", 0, java.lang.Integer.MAX_VALUE, country); 948 case 1943566508: /*referenceStrength*/ return new Property("referenceStrength", "", "Strength expressed in terms of a reference substance.", 0, java.lang.Integer.MAX_VALUE, referenceStrength); 949 default: return super.getNamedProperty(_hash, _name, _checkValid); 950 } 951 952 } 953 954 @Override 955 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 956 switch (hash) { 957 case 696975130: /*presentation*/ return this.presentation == null ? new Base[0] : new Base[] {this.presentation}; // DataType 958 case 1602853735: /*presentationText*/ return this.presentationText == null ? new Base[0] : new Base[] {this.presentationText}; // StringType 959 case -410557331: /*concentration*/ return this.concentration == null ? new Base[0] : new Base[] {this.concentration}; // DataType 960 case 1398611770: /*concentrationText*/ return this.concentrationText == null ? new Base[0] : new Base[] {this.concentrationText}; // StringType 961 case 235437876: /*measurementPoint*/ return this.measurementPoint == null ? new Base[0] : new Base[] {this.measurementPoint}; // StringType 962 case 957831062: /*country*/ return this.country == null ? new Base[0] : this.country.toArray(new Base[this.country.size()]); // CodeableConcept 963 case 1943566508: /*referenceStrength*/ return this.referenceStrength == null ? new Base[0] : this.referenceStrength.toArray(new Base[this.referenceStrength.size()]); // IngredientSubstanceStrengthReferenceStrengthComponent 964 default: return super.getProperty(hash, name, checkValid); 965 } 966 967 } 968 969 @Override 970 public Base setProperty(int hash, String name, Base value) throws FHIRException { 971 switch (hash) { 972 case 696975130: // presentation 973 this.presentation = TypeConvertor.castToType(value); // DataType 974 return value; 975 case 1602853735: // presentationText 976 this.presentationText = TypeConvertor.castToString(value); // StringType 977 return value; 978 case -410557331: // concentration 979 this.concentration = TypeConvertor.castToType(value); // DataType 980 return value; 981 case 1398611770: // concentrationText 982 this.concentrationText = TypeConvertor.castToString(value); // StringType 983 return value; 984 case 235437876: // measurementPoint 985 this.measurementPoint = TypeConvertor.castToString(value); // StringType 986 return value; 987 case 957831062: // country 988 this.getCountry().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 989 return value; 990 case 1943566508: // referenceStrength 991 this.getReferenceStrength().add((IngredientSubstanceStrengthReferenceStrengthComponent) value); // IngredientSubstanceStrengthReferenceStrengthComponent 992 return value; 993 default: return super.setProperty(hash, name, value); 994 } 995 996 } 997 998 @Override 999 public Base setProperty(String name, Base value) throws FHIRException { 1000 if (name.equals("presentation[x]")) { 1001 this.presentation = TypeConvertor.castToType(value); // DataType 1002 } else if (name.equals("presentationText")) { 1003 this.presentationText = TypeConvertor.castToString(value); // StringType 1004 } else if (name.equals("concentration[x]")) { 1005 this.concentration = TypeConvertor.castToType(value); // DataType 1006 } else if (name.equals("concentrationText")) { 1007 this.concentrationText = TypeConvertor.castToString(value); // StringType 1008 } else if (name.equals("measurementPoint")) { 1009 this.measurementPoint = TypeConvertor.castToString(value); // StringType 1010 } else if (name.equals("country")) { 1011 this.getCountry().add(TypeConvertor.castToCodeableConcept(value)); 1012 } else if (name.equals("referenceStrength")) { 1013 this.getReferenceStrength().add((IngredientSubstanceStrengthReferenceStrengthComponent) value); 1014 } else 1015 return super.setProperty(name, value); 1016 return value; 1017 } 1018 1019 @Override 1020 public Base makeProperty(int hash, String name) throws FHIRException { 1021 switch (hash) { 1022 case 1714280230: return getPresentation(); 1023 case 696975130: return getPresentation(); 1024 case 1602853735: return getPresentationTextElement(); 1025 case 1153502451: return getConcentration(); 1026 case -410557331: return getConcentration(); 1027 case 1398611770: return getConcentrationTextElement(); 1028 case 235437876: return getMeasurementPointElement(); 1029 case 957831062: return addCountry(); 1030 case 1943566508: return addReferenceStrength(); 1031 default: return super.makeProperty(hash, name); 1032 } 1033 1034 } 1035 1036 @Override 1037 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1038 switch (hash) { 1039 case 696975130: /*presentation*/ return new String[] {"Ratio", "RatioRange"}; 1040 case 1602853735: /*presentationText*/ return new String[] {"string"}; 1041 case -410557331: /*concentration*/ return new String[] {"Ratio", "RatioRange"}; 1042 case 1398611770: /*concentrationText*/ return new String[] {"string"}; 1043 case 235437876: /*measurementPoint*/ return new String[] {"string"}; 1044 case 957831062: /*country*/ return new String[] {"CodeableConcept"}; 1045 case 1943566508: /*referenceStrength*/ return new String[] {}; 1046 default: return super.getTypesForProperty(hash, name); 1047 } 1048 1049 } 1050 1051 @Override 1052 public Base addChild(String name) throws FHIRException { 1053 if (name.equals("presentationRatio")) { 1054 this.presentation = new Ratio(); 1055 return this.presentation; 1056 } 1057 else if (name.equals("presentationRatioRange")) { 1058 this.presentation = new RatioRange(); 1059 return this.presentation; 1060 } 1061 else if (name.equals("presentationText")) { 1062 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.substance.strength.presentationText"); 1063 } 1064 else if (name.equals("concentrationRatio")) { 1065 this.concentration = new Ratio(); 1066 return this.concentration; 1067 } 1068 else if (name.equals("concentrationRatioRange")) { 1069 this.concentration = new RatioRange(); 1070 return this.concentration; 1071 } 1072 else if (name.equals("concentrationText")) { 1073 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.substance.strength.concentrationText"); 1074 } 1075 else if (name.equals("measurementPoint")) { 1076 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.substance.strength.measurementPoint"); 1077 } 1078 else if (name.equals("country")) { 1079 return addCountry(); 1080 } 1081 else if (name.equals("referenceStrength")) { 1082 return addReferenceStrength(); 1083 } 1084 else 1085 return super.addChild(name); 1086 } 1087 1088 public IngredientSubstanceStrengthComponent copy() { 1089 IngredientSubstanceStrengthComponent dst = new IngredientSubstanceStrengthComponent(); 1090 copyValues(dst); 1091 return dst; 1092 } 1093 1094 public void copyValues(IngredientSubstanceStrengthComponent dst) { 1095 super.copyValues(dst); 1096 dst.presentation = presentation == null ? null : presentation.copy(); 1097 dst.presentationText = presentationText == null ? null : presentationText.copy(); 1098 dst.concentration = concentration == null ? null : concentration.copy(); 1099 dst.concentrationText = concentrationText == null ? null : concentrationText.copy(); 1100 dst.measurementPoint = measurementPoint == null ? null : measurementPoint.copy(); 1101 if (country != null) { 1102 dst.country = new ArrayList<CodeableConcept>(); 1103 for (CodeableConcept i : country) 1104 dst.country.add(i.copy()); 1105 }; 1106 if (referenceStrength != null) { 1107 dst.referenceStrength = new ArrayList<IngredientSubstanceStrengthReferenceStrengthComponent>(); 1108 for (IngredientSubstanceStrengthReferenceStrengthComponent i : referenceStrength) 1109 dst.referenceStrength.add(i.copy()); 1110 }; 1111 } 1112 1113 @Override 1114 public boolean equalsDeep(Base other_) { 1115 if (!super.equalsDeep(other_)) 1116 return false; 1117 if (!(other_ instanceof IngredientSubstanceStrengthComponent)) 1118 return false; 1119 IngredientSubstanceStrengthComponent o = (IngredientSubstanceStrengthComponent) other_; 1120 return compareDeep(presentation, o.presentation, true) && compareDeep(presentationText, o.presentationText, true) 1121 && compareDeep(concentration, o.concentration, true) && compareDeep(concentrationText, o.concentrationText, true) 1122 && compareDeep(measurementPoint, o.measurementPoint, true) && compareDeep(country, o.country, true) 1123 && compareDeep(referenceStrength, o.referenceStrength, true); 1124 } 1125 1126 @Override 1127 public boolean equalsShallow(Base other_) { 1128 if (!super.equalsShallow(other_)) 1129 return false; 1130 if (!(other_ instanceof IngredientSubstanceStrengthComponent)) 1131 return false; 1132 IngredientSubstanceStrengthComponent o = (IngredientSubstanceStrengthComponent) other_; 1133 return compareValues(presentationText, o.presentationText, true) && compareValues(concentrationText, o.concentrationText, true) 1134 && compareValues(measurementPoint, o.measurementPoint, true); 1135 } 1136 1137 public boolean isEmpty() { 1138 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(presentation, presentationText 1139 , concentration, concentrationText, measurementPoint, country, referenceStrength); 1140 } 1141 1142 public String fhirType() { 1143 return "Ingredient.substance.strength"; 1144 1145 } 1146 1147 } 1148 1149 @Block() 1150 public static class IngredientSubstanceStrengthReferenceStrengthComponent extends BackboneElement implements IBaseBackboneElement { 1151 /** 1152 * Relevant reference substance. 1153 */ 1154 @Child(name = "substance", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 1155 @Description(shortDefinition="Relevant reference substance", formalDefinition="Relevant reference substance." ) 1156 protected CodeableReference substance; 1157 1158 /** 1159 * Strength expressed in terms of a reference substance. 1160 */ 1161 @Child(name = "strength", type = {Ratio.class, RatioRange.class}, order=2, min=1, max=1, modifier=false, summary=true) 1162 @Description(shortDefinition="Strength expressed in terms of a reference substance", formalDefinition="Strength expressed in terms of a reference substance." ) 1163 protected DataType strength; 1164 1165 /** 1166 * For when strength is measured at a particular point or distance. 1167 */ 1168 @Child(name = "measurementPoint", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1169 @Description(shortDefinition="For when strength is measured at a particular point or distance", formalDefinition="For when strength is measured at a particular point or distance." ) 1170 protected StringType measurementPoint; 1171 1172 /** 1173 * The country or countries for which the strength range applies. 1174 */ 1175 @Child(name = "country", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1176 @Description(shortDefinition="The country or countries for which the strength range applies", formalDefinition="The country or countries for which the strength range applies." ) 1177 protected List<CodeableConcept> country; 1178 1179 private static final long serialVersionUID = 1700529245L; 1180 1181 /** 1182 * Constructor 1183 */ 1184 public IngredientSubstanceStrengthReferenceStrengthComponent() { 1185 super(); 1186 } 1187 1188 /** 1189 * Constructor 1190 */ 1191 public IngredientSubstanceStrengthReferenceStrengthComponent(DataType strength) { 1192 super(); 1193 this.setStrength(strength); 1194 } 1195 1196 /** 1197 * @return {@link #substance} (Relevant reference substance.) 1198 */ 1199 public CodeableReference getSubstance() { 1200 if (this.substance == null) 1201 if (Configuration.errorOnAutoCreate()) 1202 throw new Error("Attempt to auto-create IngredientSubstanceStrengthReferenceStrengthComponent.substance"); 1203 else if (Configuration.doAutoCreate()) 1204 this.substance = new CodeableReference(); // cc 1205 return this.substance; 1206 } 1207 1208 public boolean hasSubstance() { 1209 return this.substance != null && !this.substance.isEmpty(); 1210 } 1211 1212 /** 1213 * @param value {@link #substance} (Relevant reference substance.) 1214 */ 1215 public IngredientSubstanceStrengthReferenceStrengthComponent setSubstance(CodeableReference value) { 1216 this.substance = value; 1217 return this; 1218 } 1219 1220 /** 1221 * @return {@link #strength} (Strength expressed in terms of a reference substance.) 1222 */ 1223 public DataType getStrength() { 1224 return this.strength; 1225 } 1226 1227 /** 1228 * @return {@link #strength} (Strength expressed in terms of a reference substance.) 1229 */ 1230 public Ratio getStrengthRatio() throws FHIRException { 1231 if (this.strength == null) 1232 this.strength = new Ratio(); 1233 if (!(this.strength instanceof Ratio)) 1234 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.strength.getClass().getName()+" was encountered"); 1235 return (Ratio) this.strength; 1236 } 1237 1238 public boolean hasStrengthRatio() { 1239 return this != null && this.strength instanceof Ratio; 1240 } 1241 1242 /** 1243 * @return {@link #strength} (Strength expressed in terms of a reference substance.) 1244 */ 1245 public RatioRange getStrengthRatioRange() throws FHIRException { 1246 if (this.strength == null) 1247 this.strength = new RatioRange(); 1248 if (!(this.strength instanceof RatioRange)) 1249 throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.strength.getClass().getName()+" was encountered"); 1250 return (RatioRange) this.strength; 1251 } 1252 1253 public boolean hasStrengthRatioRange() { 1254 return this != null && this.strength instanceof RatioRange; 1255 } 1256 1257 public boolean hasStrength() { 1258 return this.strength != null && !this.strength.isEmpty(); 1259 } 1260 1261 /** 1262 * @param value {@link #strength} (Strength expressed in terms of a reference substance.) 1263 */ 1264 public IngredientSubstanceStrengthReferenceStrengthComponent setStrength(DataType value) { 1265 if (value != null && !(value instanceof Ratio || value instanceof RatioRange)) 1266 throw new Error("Not the right type for Ingredient.substance.strength.referenceStrength.strength[x]: "+value.fhirType()); 1267 this.strength = value; 1268 return this; 1269 } 1270 1271 /** 1272 * @return {@link #measurementPoint} (For when strength is measured at a particular point or distance.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPoint" gives direct access to the value 1273 */ 1274 public StringType getMeasurementPointElement() { 1275 if (this.measurementPoint == null) 1276 if (Configuration.errorOnAutoCreate()) 1277 throw new Error("Attempt to auto-create IngredientSubstanceStrengthReferenceStrengthComponent.measurementPoint"); 1278 else if (Configuration.doAutoCreate()) 1279 this.measurementPoint = new StringType(); // bb 1280 return this.measurementPoint; 1281 } 1282 1283 public boolean hasMeasurementPointElement() { 1284 return this.measurementPoint != null && !this.measurementPoint.isEmpty(); 1285 } 1286 1287 public boolean hasMeasurementPoint() { 1288 return this.measurementPoint != null && !this.measurementPoint.isEmpty(); 1289 } 1290 1291 /** 1292 * @param value {@link #measurementPoint} (For when strength is measured at a particular point or distance.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPoint" gives direct access to the value 1293 */ 1294 public IngredientSubstanceStrengthReferenceStrengthComponent setMeasurementPointElement(StringType value) { 1295 this.measurementPoint = value; 1296 return this; 1297 } 1298 1299 /** 1300 * @return For when strength is measured at a particular point or distance. 1301 */ 1302 public String getMeasurementPoint() { 1303 return this.measurementPoint == null ? null : this.measurementPoint.getValue(); 1304 } 1305 1306 /** 1307 * @param value For when strength is measured at a particular point or distance. 1308 */ 1309 public IngredientSubstanceStrengthReferenceStrengthComponent setMeasurementPoint(String value) { 1310 if (Utilities.noString(value)) 1311 this.measurementPoint = null; 1312 else { 1313 if (this.measurementPoint == null) 1314 this.measurementPoint = new StringType(); 1315 this.measurementPoint.setValue(value); 1316 } 1317 return this; 1318 } 1319 1320 /** 1321 * @return {@link #country} (The country or countries for which the strength range applies.) 1322 */ 1323 public List<CodeableConcept> getCountry() { 1324 if (this.country == null) 1325 this.country = new ArrayList<CodeableConcept>(); 1326 return this.country; 1327 } 1328 1329 /** 1330 * @return Returns a reference to <code>this</code> for easy method chaining 1331 */ 1332 public IngredientSubstanceStrengthReferenceStrengthComponent setCountry(List<CodeableConcept> theCountry) { 1333 this.country = theCountry; 1334 return this; 1335 } 1336 1337 public boolean hasCountry() { 1338 if (this.country == null) 1339 return false; 1340 for (CodeableConcept item : this.country) 1341 if (!item.isEmpty()) 1342 return true; 1343 return false; 1344 } 1345 1346 public CodeableConcept addCountry() { //3 1347 CodeableConcept t = new CodeableConcept(); 1348 if (this.country == null) 1349 this.country = new ArrayList<CodeableConcept>(); 1350 this.country.add(t); 1351 return t; 1352 } 1353 1354 public IngredientSubstanceStrengthReferenceStrengthComponent addCountry(CodeableConcept t) { //3 1355 if (t == null) 1356 return this; 1357 if (this.country == null) 1358 this.country = new ArrayList<CodeableConcept>(); 1359 this.country.add(t); 1360 return this; 1361 } 1362 1363 /** 1364 * @return The first repetition of repeating field {@link #country}, creating it if it does not already exist {3} 1365 */ 1366 public CodeableConcept getCountryFirstRep() { 1367 if (getCountry().isEmpty()) { 1368 addCountry(); 1369 } 1370 return getCountry().get(0); 1371 } 1372 1373 protected void listChildren(List<Property> children) { 1374 super.listChildren(children); 1375 children.add(new Property("substance", "CodeableReference(SubstanceDefinition)", "Relevant reference substance.", 0, 1, substance)); 1376 children.add(new Property("strength[x]", "Ratio|RatioRange", "Strength expressed in terms of a reference substance.", 0, 1, strength)); 1377 children.add(new Property("measurementPoint", "string", "For when strength is measured at a particular point or distance.", 0, 1, measurementPoint)); 1378 children.add(new Property("country", "CodeableConcept", "The country or countries for which the strength range applies.", 0, java.lang.Integer.MAX_VALUE, country)); 1379 } 1380 1381 @Override 1382 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1383 switch (_hash) { 1384 case 530040176: /*substance*/ return new Property("substance", "CodeableReference(SubstanceDefinition)", "Relevant reference substance.", 0, 1, substance); 1385 case 127377567: /*strength[x]*/ return new Property("strength[x]", "Ratio|RatioRange", "Strength expressed in terms of a reference substance.", 0, 1, strength); 1386 case 1791316033: /*strength*/ return new Property("strength[x]", "Ratio|RatioRange", "Strength expressed in terms of a reference substance.", 0, 1, strength); 1387 case 2141786186: /*strengthRatio*/ return new Property("strength[x]", "Ratio", "Strength expressed in terms of a reference substance.", 0, 1, strength); 1388 case -1300703469: /*strengthRatioRange*/ return new Property("strength[x]", "RatioRange", "Strength expressed in terms of a reference substance.", 0, 1, strength); 1389 case 235437876: /*measurementPoint*/ return new Property("measurementPoint", "string", "For when strength is measured at a particular point or distance.", 0, 1, measurementPoint); 1390 case 957831062: /*country*/ return new Property("country", "CodeableConcept", "The country or countries for which the strength range applies.", 0, java.lang.Integer.MAX_VALUE, country); 1391 default: return super.getNamedProperty(_hash, _name, _checkValid); 1392 } 1393 1394 } 1395 1396 @Override 1397 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1398 switch (hash) { 1399 case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableReference 1400 case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // DataType 1401 case 235437876: /*measurementPoint*/ return this.measurementPoint == null ? new Base[0] : new Base[] {this.measurementPoint}; // StringType 1402 case 957831062: /*country*/ return this.country == null ? new Base[0] : this.country.toArray(new Base[this.country.size()]); // CodeableConcept 1403 default: return super.getProperty(hash, name, checkValid); 1404 } 1405 1406 } 1407 1408 @Override 1409 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1410 switch (hash) { 1411 case 530040176: // substance 1412 this.substance = TypeConvertor.castToCodeableReference(value); // CodeableReference 1413 return value; 1414 case 1791316033: // strength 1415 this.strength = TypeConvertor.castToType(value); // DataType 1416 return value; 1417 case 235437876: // measurementPoint 1418 this.measurementPoint = TypeConvertor.castToString(value); // StringType 1419 return value; 1420 case 957831062: // country 1421 this.getCountry().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1422 return value; 1423 default: return super.setProperty(hash, name, value); 1424 } 1425 1426 } 1427 1428 @Override 1429 public Base setProperty(String name, Base value) throws FHIRException { 1430 if (name.equals("substance")) { 1431 this.substance = TypeConvertor.castToCodeableReference(value); // CodeableReference 1432 } else if (name.equals("strength[x]")) { 1433 this.strength = TypeConvertor.castToType(value); // DataType 1434 } else if (name.equals("measurementPoint")) { 1435 this.measurementPoint = TypeConvertor.castToString(value); // StringType 1436 } else if (name.equals("country")) { 1437 this.getCountry().add(TypeConvertor.castToCodeableConcept(value)); 1438 } else 1439 return super.setProperty(name, value); 1440 return value; 1441 } 1442 1443 @Override 1444 public Base makeProperty(int hash, String name) throws FHIRException { 1445 switch (hash) { 1446 case 530040176: return getSubstance(); 1447 case 127377567: return getStrength(); 1448 case 1791316033: return getStrength(); 1449 case 235437876: return getMeasurementPointElement(); 1450 case 957831062: return addCountry(); 1451 default: return super.makeProperty(hash, name); 1452 } 1453 1454 } 1455 1456 @Override 1457 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1458 switch (hash) { 1459 case 530040176: /*substance*/ return new String[] {"CodeableReference"}; 1460 case 1791316033: /*strength*/ return new String[] {"Ratio", "RatioRange"}; 1461 case 235437876: /*measurementPoint*/ return new String[] {"string"}; 1462 case 957831062: /*country*/ return new String[] {"CodeableConcept"}; 1463 default: return super.getTypesForProperty(hash, name); 1464 } 1465 1466 } 1467 1468 @Override 1469 public Base addChild(String name) throws FHIRException { 1470 if (name.equals("substance")) { 1471 this.substance = new CodeableReference(); 1472 return this.substance; 1473 } 1474 else if (name.equals("strengthRatio")) { 1475 this.strength = new Ratio(); 1476 return this.strength; 1477 } 1478 else if (name.equals("strengthRatioRange")) { 1479 this.strength = new RatioRange(); 1480 return this.strength; 1481 } 1482 else if (name.equals("measurementPoint")) { 1483 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.substance.strength.referenceStrength.measurementPoint"); 1484 } 1485 else if (name.equals("country")) { 1486 return addCountry(); 1487 } 1488 else 1489 return super.addChild(name); 1490 } 1491 1492 public IngredientSubstanceStrengthReferenceStrengthComponent copy() { 1493 IngredientSubstanceStrengthReferenceStrengthComponent dst = new IngredientSubstanceStrengthReferenceStrengthComponent(); 1494 copyValues(dst); 1495 return dst; 1496 } 1497 1498 public void copyValues(IngredientSubstanceStrengthReferenceStrengthComponent dst) { 1499 super.copyValues(dst); 1500 dst.substance = substance == null ? null : substance.copy(); 1501 dst.strength = strength == null ? null : strength.copy(); 1502 dst.measurementPoint = measurementPoint == null ? null : measurementPoint.copy(); 1503 if (country != null) { 1504 dst.country = new ArrayList<CodeableConcept>(); 1505 for (CodeableConcept i : country) 1506 dst.country.add(i.copy()); 1507 }; 1508 } 1509 1510 @Override 1511 public boolean equalsDeep(Base other_) { 1512 if (!super.equalsDeep(other_)) 1513 return false; 1514 if (!(other_ instanceof IngredientSubstanceStrengthReferenceStrengthComponent)) 1515 return false; 1516 IngredientSubstanceStrengthReferenceStrengthComponent o = (IngredientSubstanceStrengthReferenceStrengthComponent) other_; 1517 return compareDeep(substance, o.substance, true) && compareDeep(strength, o.strength, true) && compareDeep(measurementPoint, o.measurementPoint, true) 1518 && compareDeep(country, o.country, true); 1519 } 1520 1521 @Override 1522 public boolean equalsShallow(Base other_) { 1523 if (!super.equalsShallow(other_)) 1524 return false; 1525 if (!(other_ instanceof IngredientSubstanceStrengthReferenceStrengthComponent)) 1526 return false; 1527 IngredientSubstanceStrengthReferenceStrengthComponent o = (IngredientSubstanceStrengthReferenceStrengthComponent) other_; 1528 return compareValues(measurementPoint, o.measurementPoint, true); 1529 } 1530 1531 public boolean isEmpty() { 1532 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, strength, measurementPoint 1533 , country); 1534 } 1535 1536 public String fhirType() { 1537 return "Ingredient.substance.strength.referenceStrength"; 1538 1539 } 1540 1541 } 1542 1543 /** 1544 * The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. 1545 */ 1546 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 1547 @Description(shortDefinition="An identifier or code by which the ingredient can be referenced", formalDefinition="The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) 1548 protected Identifier identifier; 1549 1550 /** 1551 * The status of this ingredient. Enables tracking the life-cycle of the content. 1552 */ 1553 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1554 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this ingredient. Enables tracking the life-cycle of the content." ) 1555 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 1556 protected Enumeration<PublicationStatus> status; 1557 1558 /** 1559 * The product which this ingredient is a constituent part of. 1560 */ 1561 @Child(name = "for", type = {MedicinalProductDefinition.class, AdministrableProductDefinition.class, ManufacturedItemDefinition.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1562 @Description(shortDefinition="The product which this ingredient is a constituent part of", formalDefinition="The product which this ingredient is a constituent part of." ) 1563 protected List<Reference> for_; 1564 1565 /** 1566 * A classification of the ingredient identifying its purpose within the product, e.g. active, inactive. 1567 */ 1568 @Child(name = "role", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) 1569 @Description(shortDefinition="A classification of the ingredient identifying its purpose within the product, e.g. active, inactive", formalDefinition="A classification of the ingredient identifying its purpose within the product, e.g. active, inactive." ) 1570 protected CodeableConcept role; 1571 1572 /** 1573 * A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent. 1574 */ 1575 @Child(name = "function", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1576 @Description(shortDefinition="A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent", formalDefinition="A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent." ) 1577 protected List<CodeableConcept> function; 1578 1579 /** 1580 * If the ingredient is a known or suspected allergen. 1581 */ 1582 @Child(name = "allergenicIndicator", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1583 @Description(shortDefinition="If the ingredient is a known or suspected allergen", formalDefinition="If the ingredient is a known or suspected allergen." ) 1584 protected BooleanType allergenicIndicator; 1585 1586 /** 1587 * An organization that manufactures this ingredient. 1588 */ 1589 @Child(name = "manufacturer", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1590 @Description(shortDefinition="An organization that manufactures this ingredient", formalDefinition="An organization that manufactures this ingredient." ) 1591 protected List<IngredientManufacturerComponent> manufacturer; 1592 1593 /** 1594 * The substance that comprises this ingredient. 1595 */ 1596 @Child(name = "substance", type = {}, order=7, min=1, max=1, modifier=false, summary=true) 1597 @Description(shortDefinition="The substance that comprises this ingredient", formalDefinition="The substance that comprises this ingredient." ) 1598 protected IngredientSubstanceComponent substance; 1599 1600 private static final long serialVersionUID = -1570802439L; 1601 1602 /** 1603 * Constructor 1604 */ 1605 public Ingredient() { 1606 super(); 1607 } 1608 1609 /** 1610 * Constructor 1611 */ 1612 public Ingredient(PublicationStatus status, CodeableConcept role, IngredientSubstanceComponent substance) { 1613 super(); 1614 this.setStatus(status); 1615 this.setRole(role); 1616 this.setSubstance(substance); 1617 } 1618 1619 /** 1620 * @return {@link #identifier} (The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.) 1621 */ 1622 public Identifier getIdentifier() { 1623 if (this.identifier == null) 1624 if (Configuration.errorOnAutoCreate()) 1625 throw new Error("Attempt to auto-create Ingredient.identifier"); 1626 else if (Configuration.doAutoCreate()) 1627 this.identifier = new Identifier(); // cc 1628 return this.identifier; 1629 } 1630 1631 public boolean hasIdentifier() { 1632 return this.identifier != null && !this.identifier.isEmpty(); 1633 } 1634 1635 /** 1636 * @param value {@link #identifier} (The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.) 1637 */ 1638 public Ingredient setIdentifier(Identifier value) { 1639 this.identifier = value; 1640 return this; 1641 } 1642 1643 /** 1644 * @return {@link #status} (The status of this ingredient. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1645 */ 1646 public Enumeration<PublicationStatus> getStatusElement() { 1647 if (this.status == null) 1648 if (Configuration.errorOnAutoCreate()) 1649 throw new Error("Attempt to auto-create Ingredient.status"); 1650 else if (Configuration.doAutoCreate()) 1651 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 1652 return this.status; 1653 } 1654 1655 public boolean hasStatusElement() { 1656 return this.status != null && !this.status.isEmpty(); 1657 } 1658 1659 public boolean hasStatus() { 1660 return this.status != null && !this.status.isEmpty(); 1661 } 1662 1663 /** 1664 * @param value {@link #status} (The status of this ingredient. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1665 */ 1666 public Ingredient setStatusElement(Enumeration<PublicationStatus> value) { 1667 this.status = value; 1668 return this; 1669 } 1670 1671 /** 1672 * @return The status of this ingredient. Enables tracking the life-cycle of the content. 1673 */ 1674 public PublicationStatus getStatus() { 1675 return this.status == null ? null : this.status.getValue(); 1676 } 1677 1678 /** 1679 * @param value The status of this ingredient. Enables tracking the life-cycle of the content. 1680 */ 1681 public Ingredient setStatus(PublicationStatus value) { 1682 if (this.status == null) 1683 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 1684 this.status.setValue(value); 1685 return this; 1686 } 1687 1688 /** 1689 * @return {@link #for_} (The product which this ingredient is a constituent part of.) 1690 */ 1691 public List<Reference> getFor() { 1692 if (this.for_ == null) 1693 this.for_ = new ArrayList<Reference>(); 1694 return this.for_; 1695 } 1696 1697 /** 1698 * @return Returns a reference to <code>this</code> for easy method chaining 1699 */ 1700 public Ingredient setFor(List<Reference> theFor) { 1701 this.for_ = theFor; 1702 return this; 1703 } 1704 1705 public boolean hasFor() { 1706 if (this.for_ == null) 1707 return false; 1708 for (Reference item : this.for_) 1709 if (!item.isEmpty()) 1710 return true; 1711 return false; 1712 } 1713 1714 public Reference addFor() { //3 1715 Reference t = new Reference(); 1716 if (this.for_ == null) 1717 this.for_ = new ArrayList<Reference>(); 1718 this.for_.add(t); 1719 return t; 1720 } 1721 1722 public Ingredient addFor(Reference t) { //3 1723 if (t == null) 1724 return this; 1725 if (this.for_ == null) 1726 this.for_ = new ArrayList<Reference>(); 1727 this.for_.add(t); 1728 return this; 1729 } 1730 1731 /** 1732 * @return The first repetition of repeating field {@link #for_}, creating it if it does not already exist {3} 1733 */ 1734 public Reference getForFirstRep() { 1735 if (getFor().isEmpty()) { 1736 addFor(); 1737 } 1738 return getFor().get(0); 1739 } 1740 1741 /** 1742 * @return {@link #role} (A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.) 1743 */ 1744 public CodeableConcept getRole() { 1745 if (this.role == null) 1746 if (Configuration.errorOnAutoCreate()) 1747 throw new Error("Attempt to auto-create Ingredient.role"); 1748 else if (Configuration.doAutoCreate()) 1749 this.role = new CodeableConcept(); // cc 1750 return this.role; 1751 } 1752 1753 public boolean hasRole() { 1754 return this.role != null && !this.role.isEmpty(); 1755 } 1756 1757 /** 1758 * @param value {@link #role} (A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.) 1759 */ 1760 public Ingredient setRole(CodeableConcept value) { 1761 this.role = value; 1762 return this; 1763 } 1764 1765 /** 1766 * @return {@link #function} (A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent.) 1767 */ 1768 public List<CodeableConcept> getFunction() { 1769 if (this.function == null) 1770 this.function = new ArrayList<CodeableConcept>(); 1771 return this.function; 1772 } 1773 1774 /** 1775 * @return Returns a reference to <code>this</code> for easy method chaining 1776 */ 1777 public Ingredient setFunction(List<CodeableConcept> theFunction) { 1778 this.function = theFunction; 1779 return this; 1780 } 1781 1782 public boolean hasFunction() { 1783 if (this.function == null) 1784 return false; 1785 for (CodeableConcept item : this.function) 1786 if (!item.isEmpty()) 1787 return true; 1788 return false; 1789 } 1790 1791 public CodeableConcept addFunction() { //3 1792 CodeableConcept t = new CodeableConcept(); 1793 if (this.function == null) 1794 this.function = new ArrayList<CodeableConcept>(); 1795 this.function.add(t); 1796 return t; 1797 } 1798 1799 public Ingredient addFunction(CodeableConcept t) { //3 1800 if (t == null) 1801 return this; 1802 if (this.function == null) 1803 this.function = new ArrayList<CodeableConcept>(); 1804 this.function.add(t); 1805 return this; 1806 } 1807 1808 /** 1809 * @return The first repetition of repeating field {@link #function}, creating it if it does not already exist {3} 1810 */ 1811 public CodeableConcept getFunctionFirstRep() { 1812 if (getFunction().isEmpty()) { 1813 addFunction(); 1814 } 1815 return getFunction().get(0); 1816 } 1817 1818 /** 1819 * @return {@link #allergenicIndicator} (If the ingredient is a known or suspected allergen.). This is the underlying object with id, value and extensions. The accessor "getAllergenicIndicator" gives direct access to the value 1820 */ 1821 public BooleanType getAllergenicIndicatorElement() { 1822 if (this.allergenicIndicator == null) 1823 if (Configuration.errorOnAutoCreate()) 1824 throw new Error("Attempt to auto-create Ingredient.allergenicIndicator"); 1825 else if (Configuration.doAutoCreate()) 1826 this.allergenicIndicator = new BooleanType(); // bb 1827 return this.allergenicIndicator; 1828 } 1829 1830 public boolean hasAllergenicIndicatorElement() { 1831 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 1832 } 1833 1834 public boolean hasAllergenicIndicator() { 1835 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 1836 } 1837 1838 /** 1839 * @param value {@link #allergenicIndicator} (If the ingredient is a known or suspected allergen.). This is the underlying object with id, value and extensions. The accessor "getAllergenicIndicator" gives direct access to the value 1840 */ 1841 public Ingredient setAllergenicIndicatorElement(BooleanType value) { 1842 this.allergenicIndicator = value; 1843 return this; 1844 } 1845 1846 /** 1847 * @return If the ingredient is a known or suspected allergen. 1848 */ 1849 public boolean getAllergenicIndicator() { 1850 return this.allergenicIndicator == null || this.allergenicIndicator.isEmpty() ? false : this.allergenicIndicator.getValue(); 1851 } 1852 1853 /** 1854 * @param value If the ingredient is a known or suspected allergen. 1855 */ 1856 public Ingredient setAllergenicIndicator(boolean value) { 1857 if (this.allergenicIndicator == null) 1858 this.allergenicIndicator = new BooleanType(); 1859 this.allergenicIndicator.setValue(value); 1860 return this; 1861 } 1862 1863 /** 1864 * @return {@link #manufacturer} (An organization that manufactures this ingredient.) 1865 */ 1866 public List<IngredientManufacturerComponent> getManufacturer() { 1867 if (this.manufacturer == null) 1868 this.manufacturer = new ArrayList<IngredientManufacturerComponent>(); 1869 return this.manufacturer; 1870 } 1871 1872 /** 1873 * @return Returns a reference to <code>this</code> for easy method chaining 1874 */ 1875 public Ingredient setManufacturer(List<IngredientManufacturerComponent> theManufacturer) { 1876 this.manufacturer = theManufacturer; 1877 return this; 1878 } 1879 1880 public boolean hasManufacturer() { 1881 if (this.manufacturer == null) 1882 return false; 1883 for (IngredientManufacturerComponent item : this.manufacturer) 1884 if (!item.isEmpty()) 1885 return true; 1886 return false; 1887 } 1888 1889 public IngredientManufacturerComponent addManufacturer() { //3 1890 IngredientManufacturerComponent t = new IngredientManufacturerComponent(); 1891 if (this.manufacturer == null) 1892 this.manufacturer = new ArrayList<IngredientManufacturerComponent>(); 1893 this.manufacturer.add(t); 1894 return t; 1895 } 1896 1897 public Ingredient addManufacturer(IngredientManufacturerComponent t) { //3 1898 if (t == null) 1899 return this; 1900 if (this.manufacturer == null) 1901 this.manufacturer = new ArrayList<IngredientManufacturerComponent>(); 1902 this.manufacturer.add(t); 1903 return this; 1904 } 1905 1906 /** 1907 * @return The first repetition of repeating field {@link #manufacturer}, creating it if it does not already exist {3} 1908 */ 1909 public IngredientManufacturerComponent getManufacturerFirstRep() { 1910 if (getManufacturer().isEmpty()) { 1911 addManufacturer(); 1912 } 1913 return getManufacturer().get(0); 1914 } 1915 1916 /** 1917 * @return {@link #substance} (The substance that comprises this ingredient.) 1918 */ 1919 public IngredientSubstanceComponent getSubstance() { 1920 if (this.substance == null) 1921 if (Configuration.errorOnAutoCreate()) 1922 throw new Error("Attempt to auto-create Ingredient.substance"); 1923 else if (Configuration.doAutoCreate()) 1924 this.substance = new IngredientSubstanceComponent(); // cc 1925 return this.substance; 1926 } 1927 1928 public boolean hasSubstance() { 1929 return this.substance != null && !this.substance.isEmpty(); 1930 } 1931 1932 /** 1933 * @param value {@link #substance} (The substance that comprises this ingredient.) 1934 */ 1935 public Ingredient setSubstance(IngredientSubstanceComponent value) { 1936 this.substance = value; 1937 return this; 1938 } 1939 1940 protected void listChildren(List<Property> children) { 1941 super.listChildren(children); 1942 children.add(new Property("identifier", "Identifier", "The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, 1, identifier)); 1943 children.add(new Property("status", "code", "The status of this ingredient. Enables tracking the life-cycle of the content.", 0, 1, status)); 1944 children.add(new Property("for", "Reference(MedicinalProductDefinition|AdministrableProductDefinition|ManufacturedItemDefinition)", "The product which this ingredient is a constituent part of.", 0, java.lang.Integer.MAX_VALUE, for_)); 1945 children.add(new Property("role", "CodeableConcept", "A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.", 0, 1, role)); 1946 children.add(new Property("function", "CodeableConcept", "A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent.", 0, java.lang.Integer.MAX_VALUE, function)); 1947 children.add(new Property("allergenicIndicator", "boolean", "If the ingredient is a known or suspected allergen.", 0, 1, allergenicIndicator)); 1948 children.add(new Property("manufacturer", "", "An organization that manufactures this ingredient.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); 1949 children.add(new Property("substance", "", "The substance that comprises this ingredient.", 0, 1, substance)); 1950 } 1951 1952 @Override 1953 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1954 switch (_hash) { 1955 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, 1, identifier); 1956 case -892481550: /*status*/ return new Property("status", "code", "The status of this ingredient. Enables tracking the life-cycle of the content.", 0, 1, status); 1957 case 101577: /*for*/ return new Property("for", "Reference(MedicinalProductDefinition|AdministrableProductDefinition|ManufacturedItemDefinition)", "The product which this ingredient is a constituent part of.", 0, java.lang.Integer.MAX_VALUE, for_); 1958 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.", 0, 1, role); 1959 case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent.", 0, java.lang.Integer.MAX_VALUE, function); 1960 case 75406931: /*allergenicIndicator*/ return new Property("allergenicIndicator", "boolean", "If the ingredient is a known or suspected allergen.", 0, 1, allergenicIndicator); 1961 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "", "An organization that manufactures this ingredient.", 0, java.lang.Integer.MAX_VALUE, manufacturer); 1962 case 530040176: /*substance*/ return new Property("substance", "", "The substance that comprises this ingredient.", 0, 1, substance); 1963 default: return super.getNamedProperty(_hash, _name, _checkValid); 1964 } 1965 1966 } 1967 1968 @Override 1969 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1970 switch (hash) { 1971 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1972 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 1973 case 101577: /*for*/ return this.for_ == null ? new Base[0] : this.for_.toArray(new Base[this.for_.size()]); // Reference 1974 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 1975 case 1380938712: /*function*/ return this.function == null ? new Base[0] : this.function.toArray(new Base[this.function.size()]); // CodeableConcept 1976 case 75406931: /*allergenicIndicator*/ return this.allergenicIndicator == null ? new Base[0] : new Base[] {this.allergenicIndicator}; // BooleanType 1977 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : this.manufacturer.toArray(new Base[this.manufacturer.size()]); // IngredientManufacturerComponent 1978 case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // IngredientSubstanceComponent 1979 default: return super.getProperty(hash, name, checkValid); 1980 } 1981 1982 } 1983 1984 @Override 1985 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1986 switch (hash) { 1987 case -1618432855: // identifier 1988 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 1989 return value; 1990 case -892481550: // status 1991 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1992 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1993 return value; 1994 case 101577: // for 1995 this.getFor().add(TypeConvertor.castToReference(value)); // Reference 1996 return value; 1997 case 3506294: // role 1998 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1999 return value; 2000 case 1380938712: // function 2001 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2002 return value; 2003 case 75406931: // allergenicIndicator 2004 this.allergenicIndicator = TypeConvertor.castToBoolean(value); // BooleanType 2005 return value; 2006 case -1969347631: // manufacturer 2007 this.getManufacturer().add((IngredientManufacturerComponent) value); // IngredientManufacturerComponent 2008 return value; 2009 case 530040176: // substance 2010 this.substance = (IngredientSubstanceComponent) value; // IngredientSubstanceComponent 2011 return value; 2012 default: return super.setProperty(hash, name, value); 2013 } 2014 2015 } 2016 2017 @Override 2018 public Base setProperty(String name, Base value) throws FHIRException { 2019 if (name.equals("identifier")) { 2020 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 2021 } else if (name.equals("status")) { 2022 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2023 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2024 } else if (name.equals("for")) { 2025 this.getFor().add(TypeConvertor.castToReference(value)); 2026 } else if (name.equals("role")) { 2027 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2028 } else if (name.equals("function")) { 2029 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); 2030 } else if (name.equals("allergenicIndicator")) { 2031 this.allergenicIndicator = TypeConvertor.castToBoolean(value); // BooleanType 2032 } else if (name.equals("manufacturer")) { 2033 this.getManufacturer().add((IngredientManufacturerComponent) value); 2034 } else if (name.equals("substance")) { 2035 this.substance = (IngredientSubstanceComponent) value; // IngredientSubstanceComponent 2036 } else 2037 return super.setProperty(name, value); 2038 return value; 2039 } 2040 2041 @Override 2042 public Base makeProperty(int hash, String name) throws FHIRException { 2043 switch (hash) { 2044 case -1618432855: return getIdentifier(); 2045 case -892481550: return getStatusElement(); 2046 case 101577: return addFor(); 2047 case 3506294: return getRole(); 2048 case 1380938712: return addFunction(); 2049 case 75406931: return getAllergenicIndicatorElement(); 2050 case -1969347631: return addManufacturer(); 2051 case 530040176: return getSubstance(); 2052 default: return super.makeProperty(hash, name); 2053 } 2054 2055 } 2056 2057 @Override 2058 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2059 switch (hash) { 2060 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2061 case -892481550: /*status*/ return new String[] {"code"}; 2062 case 101577: /*for*/ return new String[] {"Reference"}; 2063 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 2064 case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; 2065 case 75406931: /*allergenicIndicator*/ return new String[] {"boolean"}; 2066 case -1969347631: /*manufacturer*/ return new String[] {}; 2067 case 530040176: /*substance*/ return new String[] {}; 2068 default: return super.getTypesForProperty(hash, name); 2069 } 2070 2071 } 2072 2073 @Override 2074 public Base addChild(String name) throws FHIRException { 2075 if (name.equals("identifier")) { 2076 this.identifier = new Identifier(); 2077 return this.identifier; 2078 } 2079 else if (name.equals("status")) { 2080 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.status"); 2081 } 2082 else if (name.equals("for")) { 2083 return addFor(); 2084 } 2085 else if (name.equals("role")) { 2086 this.role = new CodeableConcept(); 2087 return this.role; 2088 } 2089 else if (name.equals("function")) { 2090 return addFunction(); 2091 } 2092 else if (name.equals("allergenicIndicator")) { 2093 throw new FHIRException("Cannot call addChild on a primitive type Ingredient.allergenicIndicator"); 2094 } 2095 else if (name.equals("manufacturer")) { 2096 return addManufacturer(); 2097 } 2098 else if (name.equals("substance")) { 2099 this.substance = new IngredientSubstanceComponent(); 2100 return this.substance; 2101 } 2102 else 2103 return super.addChild(name); 2104 } 2105 2106 public String fhirType() { 2107 return "Ingredient"; 2108 2109 } 2110 2111 public Ingredient copy() { 2112 Ingredient dst = new Ingredient(); 2113 copyValues(dst); 2114 return dst; 2115 } 2116 2117 public void copyValues(Ingredient dst) { 2118 super.copyValues(dst); 2119 dst.identifier = identifier == null ? null : identifier.copy(); 2120 dst.status = status == null ? null : status.copy(); 2121 if (for_ != null) { 2122 dst.for_ = new ArrayList<Reference>(); 2123 for (Reference i : for_) 2124 dst.for_.add(i.copy()); 2125 }; 2126 dst.role = role == null ? null : role.copy(); 2127 if (function != null) { 2128 dst.function = new ArrayList<CodeableConcept>(); 2129 for (CodeableConcept i : function) 2130 dst.function.add(i.copy()); 2131 }; 2132 dst.allergenicIndicator = allergenicIndicator == null ? null : allergenicIndicator.copy(); 2133 if (manufacturer != null) { 2134 dst.manufacturer = new ArrayList<IngredientManufacturerComponent>(); 2135 for (IngredientManufacturerComponent i : manufacturer) 2136 dst.manufacturer.add(i.copy()); 2137 }; 2138 dst.substance = substance == null ? null : substance.copy(); 2139 } 2140 2141 protected Ingredient typedCopy() { 2142 return copy(); 2143 } 2144 2145 @Override 2146 public boolean equalsDeep(Base other_) { 2147 if (!super.equalsDeep(other_)) 2148 return false; 2149 if (!(other_ instanceof Ingredient)) 2150 return false; 2151 Ingredient o = (Ingredient) other_; 2152 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(for_, o.for_, true) 2153 && compareDeep(role, o.role, true) && compareDeep(function, o.function, true) && compareDeep(allergenicIndicator, o.allergenicIndicator, true) 2154 && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(substance, o.substance, true) 2155 ; 2156 } 2157 2158 @Override 2159 public boolean equalsShallow(Base other_) { 2160 if (!super.equalsShallow(other_)) 2161 return false; 2162 if (!(other_ instanceof Ingredient)) 2163 return false; 2164 Ingredient o = (Ingredient) other_; 2165 return compareValues(status, o.status, true) && compareValues(allergenicIndicator, o.allergenicIndicator, true) 2166 ; 2167 } 2168 2169 public boolean isEmpty() { 2170 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, for_ 2171 , role, function, allergenicIndicator, manufacturer, substance); 2172 } 2173 2174 @Override 2175 public ResourceType getResourceType() { 2176 return ResourceType.Ingredient; 2177 } 2178 2179 /** 2180 * Search parameter: <b>for</b> 2181 * <p> 2182 * Description: <b>The product which this ingredient is a constituent part of</b><br> 2183 * Type: <b>reference</b><br> 2184 * Path: <b>Ingredient.for</b><br> 2185 * </p> 2186 */ 2187 @SearchParamDefinition(name="for", path="Ingredient.for", description="The product which this ingredient is a constituent part of", type="reference", target={AdministrableProductDefinition.class, ManufacturedItemDefinition.class, MedicinalProductDefinition.class } ) 2188 public static final String SP_FOR = "for"; 2189 /** 2190 * <b>Fluent Client</b> search parameter constant for <b>for</b> 2191 * <p> 2192 * Description: <b>The product which this ingredient is a constituent part of</b><br> 2193 * Type: <b>reference</b><br> 2194 * Path: <b>Ingredient.for</b><br> 2195 * </p> 2196 */ 2197 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOR); 2198 2199/** 2200 * Constant for fluent queries to be used to add include statements. Specifies 2201 * the path value of "<b>Ingredient:for</b>". 2202 */ 2203 public static final ca.uhn.fhir.model.api.Include INCLUDE_FOR = new ca.uhn.fhir.model.api.Include("Ingredient:for").toLocked(); 2204 2205 /** 2206 * Search parameter: <b>function</b> 2207 * <p> 2208 * Description: <b>A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent</b><br> 2209 * Type: <b>token</b><br> 2210 * Path: <b>Ingredient.function</b><br> 2211 * </p> 2212 */ 2213 @SearchParamDefinition(name="function", path="Ingredient.function", description="A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent", type="token" ) 2214 public static final String SP_FUNCTION = "function"; 2215 /** 2216 * <b>Fluent Client</b> search parameter constant for <b>function</b> 2217 * <p> 2218 * Description: <b>A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: Antioxidant, Alkalizing Agent</b><br> 2219 * Type: <b>token</b><br> 2220 * Path: <b>Ingredient.function</b><br> 2221 * </p> 2222 */ 2223 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FUNCTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FUNCTION); 2224 2225 /** 2226 * Search parameter: <b>identifier</b> 2227 * <p> 2228 * Description: <b>An identifier or code by which the ingredient can be referenced</b><br> 2229 * Type: <b>token</b><br> 2230 * Path: <b>Ingredient.identifier</b><br> 2231 * </p> 2232 */ 2233 @SearchParamDefinition(name="identifier", path="Ingredient.identifier", description="An identifier or code by which the ingredient can be referenced", type="token" ) 2234 public static final String SP_IDENTIFIER = "identifier"; 2235 /** 2236 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2237 * <p> 2238 * Description: <b>An identifier or code by which the ingredient can be referenced</b><br> 2239 * Type: <b>token</b><br> 2240 * Path: <b>Ingredient.identifier</b><br> 2241 * </p> 2242 */ 2243 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2244 2245 /** 2246 * Search parameter: <b>manufacturer</b> 2247 * <p> 2248 * Description: <b>The organization that manufactures this ingredient</b><br> 2249 * Type: <b>reference</b><br> 2250 * Path: <b>Ingredient.manufacturer</b><br> 2251 * </p> 2252 */ 2253 @SearchParamDefinition(name="manufacturer", path="Ingredient.manufacturer", description="The organization that manufactures this ingredient", type="reference" ) 2254 public static final String SP_MANUFACTURER = "manufacturer"; 2255 /** 2256 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 2257 * <p> 2258 * Description: <b>The organization that manufactures this ingredient</b><br> 2259 * Type: <b>reference</b><br> 2260 * Path: <b>Ingredient.manufacturer</b><br> 2261 * </p> 2262 */ 2263 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANUFACTURER); 2264 2265/** 2266 * Constant for fluent queries to be used to add include statements. Specifies 2267 * the path value of "<b>Ingredient:manufacturer</b>". 2268 */ 2269 public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER = new ca.uhn.fhir.model.api.Include("Ingredient:manufacturer").toLocked(); 2270 2271 /** 2272 * Search parameter: <b>role</b> 2273 * <p> 2274 * Description: <b>A classification of the ingredient identifying its purpose within the product, e.g. active, inactive</b><br> 2275 * Type: <b>token</b><br> 2276 * Path: <b>Ingredient.role</b><br> 2277 * </p> 2278 */ 2279 @SearchParamDefinition(name="role", path="Ingredient.role", description="A classification of the ingredient identifying its purpose within the product, e.g. active, inactive", type="token" ) 2280 public static final String SP_ROLE = "role"; 2281 /** 2282 * <b>Fluent Client</b> search parameter constant for <b>role</b> 2283 * <p> 2284 * Description: <b>A classification of the ingredient identifying its purpose within the product, e.g. active, inactive</b><br> 2285 * Type: <b>token</b><br> 2286 * Path: <b>Ingredient.role</b><br> 2287 * </p> 2288 */ 2289 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROLE); 2290 2291 /** 2292 * Search parameter: <b>substance-code</b> 2293 * <p> 2294 * Description: <b>Reference to a concept (by class)</b><br> 2295 * Type: <b>token</b><br> 2296 * Path: <b>Ingredient.substance.code.concept</b><br> 2297 * </p> 2298 */ 2299 @SearchParamDefinition(name="substance-code", path="Ingredient.substance.code.concept", description="Reference to a concept (by class)", type="token" ) 2300 public static final String SP_SUBSTANCE_CODE = "substance-code"; 2301 /** 2302 * <b>Fluent Client</b> search parameter constant for <b>substance-code</b> 2303 * <p> 2304 * Description: <b>Reference to a concept (by class)</b><br> 2305 * Type: <b>token</b><br> 2306 * Path: <b>Ingredient.substance.code.concept</b><br> 2307 * </p> 2308 */ 2309 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBSTANCE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBSTANCE_CODE); 2310 2311 /** 2312 * Search parameter: <b>substance-definition</b> 2313 * <p> 2314 * Description: <b>Reference to a resource (by instance)</b><br> 2315 * Type: <b>reference</b><br> 2316 * Path: <b>Ingredient.substance.code.reference</b><br> 2317 * </p> 2318 */ 2319 @SearchParamDefinition(name="substance-definition", path="Ingredient.substance.code.reference", description="Reference to a resource (by instance)", type="reference" ) 2320 public static final String SP_SUBSTANCE_DEFINITION = "substance-definition"; 2321 /** 2322 * <b>Fluent Client</b> search parameter constant for <b>substance-definition</b> 2323 * <p> 2324 * Description: <b>Reference to a resource (by instance)</b><br> 2325 * Type: <b>reference</b><br> 2326 * Path: <b>Ingredient.substance.code.reference</b><br> 2327 * </p> 2328 */ 2329 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBSTANCE_DEFINITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBSTANCE_DEFINITION); 2330 2331/** 2332 * Constant for fluent queries to be used to add include statements. Specifies 2333 * the path value of "<b>Ingredient:substance-definition</b>". 2334 */ 2335 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBSTANCE_DEFINITION = new ca.uhn.fhir.model.api.Include("Ingredient:substance-definition").toLocked(); 2336 2337 /** 2338 * Search parameter: <b>substance</b> 2339 * <p> 2340 * Description: <b>Reference to a resource (by instance)</b><br> 2341 * Type: <b>reference</b><br> 2342 * Path: <b>Ingredient.substance.code.reference</b><br> 2343 * </p> 2344 */ 2345 @SearchParamDefinition(name="substance", path="Ingredient.substance.code.reference", description="Reference to a resource (by instance)", type="reference" ) 2346 public static final String SP_SUBSTANCE = "substance"; 2347 /** 2348 * <b>Fluent Client</b> search parameter constant for <b>substance</b> 2349 * <p> 2350 * Description: <b>Reference to a resource (by instance)</b><br> 2351 * Type: <b>reference</b><br> 2352 * Path: <b>Ingredient.substance.code.reference</b><br> 2353 * </p> 2354 */ 2355 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBSTANCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBSTANCE); 2356 2357/** 2358 * Constant for fluent queries to be used to add include statements. Specifies 2359 * the path value of "<b>Ingredient:substance</b>". 2360 */ 2361 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBSTANCE = new ca.uhn.fhir.model.api.Include("Ingredient:substance").toLocked(); 2362 2363 2364} 2365