001package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.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 * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product. 052 */ 053@ResourceDef(name="ManufacturedItemDefinition", profile="http://hl7.org/fhir/StructureDefinition/ManufacturedItemDefinition") 054public class ManufacturedItemDefinition extends DomainResource { 055 056 @Block() 057 public static class ManufacturedItemDefinitionPropertyComponent extends BackboneElement implements IBaseBackboneElement { 058 /** 059 * A code expressing the type of characteristic. 060 */ 061 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 062 @Description(shortDefinition="A code expressing the type of characteristic", formalDefinition="A code expressing the type of characteristic." ) 063 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/product-characteristic-codes") 064 protected CodeableConcept type; 065 066 /** 067 * A value for the characteristic. 068 */ 069 @Child(name = "value", type = {CodeableConcept.class, Quantity.class, DateType.class, BooleanType.class, MarkdownType.class, Attachment.class, Binary.class}, order=2, min=0, max=1, modifier=false, summary=true) 070 @Description(shortDefinition="A value for the characteristic", formalDefinition="A value for the characteristic." ) 071 protected DataType value; 072 073 private static final long serialVersionUID = -1659186716L; 074 075 /** 076 * Constructor 077 */ 078 public ManufacturedItemDefinitionPropertyComponent() { 079 super(); 080 } 081 082 /** 083 * Constructor 084 */ 085 public ManufacturedItemDefinitionPropertyComponent(CodeableConcept type) { 086 super(); 087 this.setType(type); 088 } 089 090 /** 091 * @return {@link #type} (A code expressing the type of characteristic.) 092 */ 093 public CodeableConcept getType() { 094 if (this.type == null) 095 if (Configuration.errorOnAutoCreate()) 096 throw new Error("Attempt to auto-create ManufacturedItemDefinitionPropertyComponent.type"); 097 else if (Configuration.doAutoCreate()) 098 this.type = new CodeableConcept(); // cc 099 return this.type; 100 } 101 102 public boolean hasType() { 103 return this.type != null && !this.type.isEmpty(); 104 } 105 106 /** 107 * @param value {@link #type} (A code expressing the type of characteristic.) 108 */ 109 public ManufacturedItemDefinitionPropertyComponent setType(CodeableConcept value) { 110 this.type = value; 111 return this; 112 } 113 114 /** 115 * @return {@link #value} (A value for the characteristic.) 116 */ 117 public DataType getValue() { 118 return this.value; 119 } 120 121 /** 122 * @return {@link #value} (A value for the characteristic.) 123 */ 124 public CodeableConcept getValueCodeableConcept() throws FHIRException { 125 if (this.value == null) 126 this.value = new CodeableConcept(); 127 if (!(this.value instanceof CodeableConcept)) 128 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 129 return (CodeableConcept) this.value; 130 } 131 132 public boolean hasValueCodeableConcept() { 133 return this != null && this.value instanceof CodeableConcept; 134 } 135 136 /** 137 * @return {@link #value} (A value for the characteristic.) 138 */ 139 public Quantity getValueQuantity() throws FHIRException { 140 if (this.value == null) 141 this.value = new Quantity(); 142 if (!(this.value instanceof Quantity)) 143 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 144 return (Quantity) this.value; 145 } 146 147 public boolean hasValueQuantity() { 148 return this != null && this.value instanceof Quantity; 149 } 150 151 /** 152 * @return {@link #value} (A value for the characteristic.) 153 */ 154 public DateType getValueDateType() throws FHIRException { 155 if (this.value == null) 156 this.value = new DateType(); 157 if (!(this.value instanceof DateType)) 158 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 159 return (DateType) this.value; 160 } 161 162 public boolean hasValueDateType() { 163 return this != null && this.value instanceof DateType; 164 } 165 166 /** 167 * @return {@link #value} (A value for the characteristic.) 168 */ 169 public BooleanType getValueBooleanType() throws FHIRException { 170 if (this.value == null) 171 this.value = new BooleanType(); 172 if (!(this.value instanceof BooleanType)) 173 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 174 return (BooleanType) this.value; 175 } 176 177 public boolean hasValueBooleanType() { 178 return this != null && this.value instanceof BooleanType; 179 } 180 181 /** 182 * @return {@link #value} (A value for the characteristic.) 183 */ 184 public MarkdownType getValueMarkdownType() throws FHIRException { 185 if (this.value == null) 186 this.value = new MarkdownType(); 187 if (!(this.value instanceof MarkdownType)) 188 throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered"); 189 return (MarkdownType) this.value; 190 } 191 192 public boolean hasValueMarkdownType() { 193 return this != null && this.value instanceof MarkdownType; 194 } 195 196 /** 197 * @return {@link #value} (A value for the characteristic.) 198 */ 199 public Attachment getValueAttachment() throws FHIRException { 200 if (this.value == null) 201 this.value = new Attachment(); 202 if (!(this.value instanceof Attachment)) 203 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 204 return (Attachment) this.value; 205 } 206 207 public boolean hasValueAttachment() { 208 return this != null && this.value instanceof Attachment; 209 } 210 211 /** 212 * @return {@link #value} (A value for the characteristic.) 213 */ 214 public Reference getValueReference() throws FHIRException { 215 if (this.value == null) 216 this.value = new Reference(); 217 if (!(this.value instanceof Reference)) 218 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 219 return (Reference) this.value; 220 } 221 222 public boolean hasValueReference() { 223 return this != null && this.value instanceof Reference; 224 } 225 226 public boolean hasValue() { 227 return this.value != null && !this.value.isEmpty(); 228 } 229 230 /** 231 * @param value {@link #value} (A value for the characteristic.) 232 */ 233 public ManufacturedItemDefinitionPropertyComponent setValue(DataType value) { 234 if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity || value instanceof DateType || value instanceof BooleanType || value instanceof MarkdownType || value instanceof Attachment || value instanceof Reference)) 235 throw new FHIRException("Not the right type for ManufacturedItemDefinition.property.value[x]: "+value.fhirType()); 236 this.value = value; 237 return this; 238 } 239 240 protected void listChildren(List<Property> children) { 241 super.listChildren(children); 242 children.add(new Property("type", "CodeableConcept", "A code expressing the type of characteristic.", 0, 1, type)); 243 children.add(new Property("value[x]", "CodeableConcept|Quantity|date|boolean|markdown|Attachment|Reference(Binary)", "A value for the characteristic.", 0, 1, value)); 244 } 245 246 @Override 247 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 248 switch (_hash) { 249 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A code expressing the type of characteristic.", 0, 1, type); 250 case -1410166417: /*value[x]*/ return new Property("value[x]", "CodeableConcept|Quantity|date|boolean|markdown|Attachment|Reference(Binary)", "A value for the characteristic.", 0, 1, value); 251 case 111972721: /*value*/ return new Property("value[x]", "CodeableConcept|Quantity|date|boolean|markdown|Attachment|Reference(Binary)", "A value for the characteristic.", 0, 1, value); 252 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "A value for the characteristic.", 0, 1, value); 253 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "A value for the characteristic.", 0, 1, value); 254 case -766192449: /*valueDate*/ return new Property("value[x]", "date", "A value for the characteristic.", 0, 1, value); 255 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "A value for the characteristic.", 0, 1, value); 256 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "markdown", "A value for the characteristic.", 0, 1, value); 257 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "A value for the characteristic.", 0, 1, value); 258 case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference(Binary)", "A value for the characteristic.", 0, 1, value); 259 default: return super.getNamedProperty(_hash, _name, _checkValid); 260 } 261 262 } 263 264 @Override 265 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 266 switch (hash) { 267 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 268 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 269 default: return super.getProperty(hash, name, checkValid); 270 } 271 272 } 273 274 @Override 275 public Base setProperty(int hash, String name, Base value) throws FHIRException { 276 switch (hash) { 277 case 3575610: // type 278 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 279 return value; 280 case 111972721: // value 281 this.value = TypeConvertor.castToType(value); // DataType 282 return value; 283 default: return super.setProperty(hash, name, value); 284 } 285 286 } 287 288 @Override 289 public Base setProperty(String name, Base value) throws FHIRException { 290 if (name.equals("type")) { 291 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 292 } else if (name.equals("value[x]")) { 293 this.value = TypeConvertor.castToType(value); // DataType 294 } else 295 return super.setProperty(name, value); 296 return value; 297 } 298 299 @Override 300 public Base makeProperty(int hash, String name) throws FHIRException { 301 switch (hash) { 302 case 3575610: return getType(); 303 case -1410166417: return getValue(); 304 case 111972721: return getValue(); 305 default: return super.makeProperty(hash, name); 306 } 307 308 } 309 310 @Override 311 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 312 switch (hash) { 313 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 314 case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity", "date", "boolean", "markdown", "Attachment", "Reference"}; 315 default: return super.getTypesForProperty(hash, name); 316 } 317 318 } 319 320 @Override 321 public Base addChild(String name) throws FHIRException { 322 if (name.equals("type")) { 323 this.type = new CodeableConcept(); 324 return this.type; 325 } 326 else if (name.equals("valueCodeableConcept")) { 327 this.value = new CodeableConcept(); 328 return this.value; 329 } 330 else if (name.equals("valueQuantity")) { 331 this.value = new Quantity(); 332 return this.value; 333 } 334 else if (name.equals("valueDate")) { 335 this.value = new DateType(); 336 return this.value; 337 } 338 else if (name.equals("valueBoolean")) { 339 this.value = new BooleanType(); 340 return this.value; 341 } 342 else if (name.equals("valueMarkdown")) { 343 this.value = new MarkdownType(); 344 return this.value; 345 } 346 else if (name.equals("valueAttachment")) { 347 this.value = new Attachment(); 348 return this.value; 349 } 350 else if (name.equals("valueReference")) { 351 this.value = new Reference(); 352 return this.value; 353 } 354 else 355 return super.addChild(name); 356 } 357 358 public ManufacturedItemDefinitionPropertyComponent copy() { 359 ManufacturedItemDefinitionPropertyComponent dst = new ManufacturedItemDefinitionPropertyComponent(); 360 copyValues(dst); 361 return dst; 362 } 363 364 public void copyValues(ManufacturedItemDefinitionPropertyComponent dst) { 365 super.copyValues(dst); 366 dst.type = type == null ? null : type.copy(); 367 dst.value = value == null ? null : value.copy(); 368 } 369 370 @Override 371 public boolean equalsDeep(Base other_) { 372 if (!super.equalsDeep(other_)) 373 return false; 374 if (!(other_ instanceof ManufacturedItemDefinitionPropertyComponent)) 375 return false; 376 ManufacturedItemDefinitionPropertyComponent o = (ManufacturedItemDefinitionPropertyComponent) other_; 377 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 378 } 379 380 @Override 381 public boolean equalsShallow(Base other_) { 382 if (!super.equalsShallow(other_)) 383 return false; 384 if (!(other_ instanceof ManufacturedItemDefinitionPropertyComponent)) 385 return false; 386 ManufacturedItemDefinitionPropertyComponent o = (ManufacturedItemDefinitionPropertyComponent) other_; 387 return true; 388 } 389 390 public boolean isEmpty() { 391 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 392 } 393 394 public String fhirType() { 395 return "ManufacturedItemDefinition.property"; 396 397 } 398 399 } 400 401 @Block() 402 public static class ManufacturedItemDefinitionComponentComponent extends BackboneElement implements IBaseBackboneElement { 403 /** 404 * Defining type of the component e.g. shell, layer, ink. 405 */ 406 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 407 @Description(shortDefinition="Defining type of the component e.g. shell, layer, ink", formalDefinition="Defining type of the component e.g. shell, layer, ink." ) 408 protected CodeableConcept type; 409 410 /** 411 * The function of this component within the item e.g. delivers active ingredient, masks taste. 412 */ 413 @Child(name = "function", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 414 @Description(shortDefinition="The function of this component within the item e.g. delivers active ingredient, masks taste", formalDefinition="The function of this component within the item e.g. delivers active ingredient, masks taste." ) 415 protected List<CodeableConcept> function; 416 417 /** 418 * The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume). 419 */ 420 @Child(name = "amount", type = {Quantity.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 421 @Description(shortDefinition="The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume)", formalDefinition="The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume)." ) 422 protected List<Quantity> amount; 423 424 /** 425 * A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient). 426 */ 427 @Child(name = "constituent", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 428 @Description(shortDefinition="A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient)", formalDefinition="A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient)." ) 429 protected List<ManufacturedItemDefinitionComponentConstituentComponent> constituent; 430 431 /** 432 * General characteristics of this component. 433 */ 434 @Child(name = "property", type = {ManufacturedItemDefinitionPropertyComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 435 @Description(shortDefinition="General characteristics of this component", formalDefinition="General characteristics of this component." ) 436 protected List<ManufacturedItemDefinitionPropertyComponent> property; 437 438 /** 439 * A component that this component contains or is made from. 440 */ 441 @Child(name = "component", type = {ManufacturedItemDefinitionComponentComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 442 @Description(shortDefinition="A component that this component contains or is made from", formalDefinition="A component that this component contains or is made from." ) 443 protected List<ManufacturedItemDefinitionComponentComponent> component; 444 445 private static final long serialVersionUID = 537950590L; 446 447 /** 448 * Constructor 449 */ 450 public ManufacturedItemDefinitionComponentComponent() { 451 super(); 452 } 453 454 /** 455 * Constructor 456 */ 457 public ManufacturedItemDefinitionComponentComponent(CodeableConcept type) { 458 super(); 459 this.setType(type); 460 } 461 462 /** 463 * @return {@link #type} (Defining type of the component e.g. shell, layer, ink.) 464 */ 465 public CodeableConcept getType() { 466 if (this.type == null) 467 if (Configuration.errorOnAutoCreate()) 468 throw new Error("Attempt to auto-create ManufacturedItemDefinitionComponentComponent.type"); 469 else if (Configuration.doAutoCreate()) 470 this.type = new CodeableConcept(); // cc 471 return this.type; 472 } 473 474 public boolean hasType() { 475 return this.type != null && !this.type.isEmpty(); 476 } 477 478 /** 479 * @param value {@link #type} (Defining type of the component e.g. shell, layer, ink.) 480 */ 481 public ManufacturedItemDefinitionComponentComponent setType(CodeableConcept value) { 482 this.type = value; 483 return this; 484 } 485 486 /** 487 * @return {@link #function} (The function of this component within the item e.g. delivers active ingredient, masks taste.) 488 */ 489 public List<CodeableConcept> getFunction() { 490 if (this.function == null) 491 this.function = new ArrayList<CodeableConcept>(); 492 return this.function; 493 } 494 495 /** 496 * @return Returns a reference to <code>this</code> for easy method chaining 497 */ 498 public ManufacturedItemDefinitionComponentComponent setFunction(List<CodeableConcept> theFunction) { 499 this.function = theFunction; 500 return this; 501 } 502 503 public boolean hasFunction() { 504 if (this.function == null) 505 return false; 506 for (CodeableConcept item : this.function) 507 if (!item.isEmpty()) 508 return true; 509 return false; 510 } 511 512 public CodeableConcept addFunction() { //3 513 CodeableConcept t = new CodeableConcept(); 514 if (this.function == null) 515 this.function = new ArrayList<CodeableConcept>(); 516 this.function.add(t); 517 return t; 518 } 519 520 public ManufacturedItemDefinitionComponentComponent addFunction(CodeableConcept t) { //3 521 if (t == null) 522 return this; 523 if (this.function == null) 524 this.function = new ArrayList<CodeableConcept>(); 525 this.function.add(t); 526 return this; 527 } 528 529 /** 530 * @return The first repetition of repeating field {@link #function}, creating it if it does not already exist {3} 531 */ 532 public CodeableConcept getFunctionFirstRep() { 533 if (getFunction().isEmpty()) { 534 addFunction(); 535 } 536 return getFunction().get(0); 537 } 538 539 /** 540 * @return {@link #amount} (The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume).) 541 */ 542 public List<Quantity> getAmount() { 543 if (this.amount == null) 544 this.amount = new ArrayList<Quantity>(); 545 return this.amount; 546 } 547 548 /** 549 * @return Returns a reference to <code>this</code> for easy method chaining 550 */ 551 public ManufacturedItemDefinitionComponentComponent setAmount(List<Quantity> theAmount) { 552 this.amount = theAmount; 553 return this; 554 } 555 556 public boolean hasAmount() { 557 if (this.amount == null) 558 return false; 559 for (Quantity item : this.amount) 560 if (!item.isEmpty()) 561 return true; 562 return false; 563 } 564 565 public Quantity addAmount() { //3 566 Quantity t = new Quantity(); 567 if (this.amount == null) 568 this.amount = new ArrayList<Quantity>(); 569 this.amount.add(t); 570 return t; 571 } 572 573 public ManufacturedItemDefinitionComponentComponent addAmount(Quantity t) { //3 574 if (t == null) 575 return this; 576 if (this.amount == null) 577 this.amount = new ArrayList<Quantity>(); 578 this.amount.add(t); 579 return this; 580 } 581 582 /** 583 * @return The first repetition of repeating field {@link #amount}, creating it if it does not already exist {3} 584 */ 585 public Quantity getAmountFirstRep() { 586 if (getAmount().isEmpty()) { 587 addAmount(); 588 } 589 return getAmount().get(0); 590 } 591 592 /** 593 * @return {@link #constituent} (A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient).) 594 */ 595 public List<ManufacturedItemDefinitionComponentConstituentComponent> getConstituent() { 596 if (this.constituent == null) 597 this.constituent = new ArrayList<ManufacturedItemDefinitionComponentConstituentComponent>(); 598 return this.constituent; 599 } 600 601 /** 602 * @return Returns a reference to <code>this</code> for easy method chaining 603 */ 604 public ManufacturedItemDefinitionComponentComponent setConstituent(List<ManufacturedItemDefinitionComponentConstituentComponent> theConstituent) { 605 this.constituent = theConstituent; 606 return this; 607 } 608 609 public boolean hasConstituent() { 610 if (this.constituent == null) 611 return false; 612 for (ManufacturedItemDefinitionComponentConstituentComponent item : this.constituent) 613 if (!item.isEmpty()) 614 return true; 615 return false; 616 } 617 618 public ManufacturedItemDefinitionComponentConstituentComponent addConstituent() { //3 619 ManufacturedItemDefinitionComponentConstituentComponent t = new ManufacturedItemDefinitionComponentConstituentComponent(); 620 if (this.constituent == null) 621 this.constituent = new ArrayList<ManufacturedItemDefinitionComponentConstituentComponent>(); 622 this.constituent.add(t); 623 return t; 624 } 625 626 public ManufacturedItemDefinitionComponentComponent addConstituent(ManufacturedItemDefinitionComponentConstituentComponent t) { //3 627 if (t == null) 628 return this; 629 if (this.constituent == null) 630 this.constituent = new ArrayList<ManufacturedItemDefinitionComponentConstituentComponent>(); 631 this.constituent.add(t); 632 return this; 633 } 634 635 /** 636 * @return The first repetition of repeating field {@link #constituent}, creating it if it does not already exist {3} 637 */ 638 public ManufacturedItemDefinitionComponentConstituentComponent getConstituentFirstRep() { 639 if (getConstituent().isEmpty()) { 640 addConstituent(); 641 } 642 return getConstituent().get(0); 643 } 644 645 /** 646 * @return {@link #property} (General characteristics of this component.) 647 */ 648 public List<ManufacturedItemDefinitionPropertyComponent> getProperty() { 649 if (this.property == null) 650 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 651 return this.property; 652 } 653 654 /** 655 * @return Returns a reference to <code>this</code> for easy method chaining 656 */ 657 public ManufacturedItemDefinitionComponentComponent setProperty(List<ManufacturedItemDefinitionPropertyComponent> theProperty) { 658 this.property = theProperty; 659 return this; 660 } 661 662 public boolean hasProperty() { 663 if (this.property == null) 664 return false; 665 for (ManufacturedItemDefinitionPropertyComponent item : this.property) 666 if (!item.isEmpty()) 667 return true; 668 return false; 669 } 670 671 public ManufacturedItemDefinitionPropertyComponent addProperty() { //3 672 ManufacturedItemDefinitionPropertyComponent t = new ManufacturedItemDefinitionPropertyComponent(); 673 if (this.property == null) 674 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 675 this.property.add(t); 676 return t; 677 } 678 679 public ManufacturedItemDefinitionComponentComponent addProperty(ManufacturedItemDefinitionPropertyComponent t) { //3 680 if (t == null) 681 return this; 682 if (this.property == null) 683 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 684 this.property.add(t); 685 return this; 686 } 687 688 /** 689 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3} 690 */ 691 public ManufacturedItemDefinitionPropertyComponent getPropertyFirstRep() { 692 if (getProperty().isEmpty()) { 693 addProperty(); 694 } 695 return getProperty().get(0); 696 } 697 698 /** 699 * @return {@link #component} (A component that this component contains or is made from.) 700 */ 701 public List<ManufacturedItemDefinitionComponentComponent> getComponent() { 702 if (this.component == null) 703 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 704 return this.component; 705 } 706 707 /** 708 * @return Returns a reference to <code>this</code> for easy method chaining 709 */ 710 public ManufacturedItemDefinitionComponentComponent setComponent(List<ManufacturedItemDefinitionComponentComponent> theComponent) { 711 this.component = theComponent; 712 return this; 713 } 714 715 public boolean hasComponent() { 716 if (this.component == null) 717 return false; 718 for (ManufacturedItemDefinitionComponentComponent item : this.component) 719 if (!item.isEmpty()) 720 return true; 721 return false; 722 } 723 724 public ManufacturedItemDefinitionComponentComponent addComponent() { //3 725 ManufacturedItemDefinitionComponentComponent t = new ManufacturedItemDefinitionComponentComponent(); 726 if (this.component == null) 727 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 728 this.component.add(t); 729 return t; 730 } 731 732 public ManufacturedItemDefinitionComponentComponent addComponent(ManufacturedItemDefinitionComponentComponent t) { //3 733 if (t == null) 734 return this; 735 if (this.component == null) 736 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 737 this.component.add(t); 738 return this; 739 } 740 741 /** 742 * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3} 743 */ 744 public ManufacturedItemDefinitionComponentComponent getComponentFirstRep() { 745 if (getComponent().isEmpty()) { 746 addComponent(); 747 } 748 return getComponent().get(0); 749 } 750 751 protected void listChildren(List<Property> children) { 752 super.listChildren(children); 753 children.add(new Property("type", "CodeableConcept", "Defining type of the component e.g. shell, layer, ink.", 0, 1, type)); 754 children.add(new Property("function", "CodeableConcept", "The function of this component within the item e.g. delivers active ingredient, masks taste.", 0, java.lang.Integer.MAX_VALUE, function)); 755 children.add(new Property("amount", "Quantity", "The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume).", 0, java.lang.Integer.MAX_VALUE, amount)); 756 children.add(new Property("constituent", "", "A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient).", 0, java.lang.Integer.MAX_VALUE, constituent)); 757 children.add(new Property("property", "@ManufacturedItemDefinition.property", "General characteristics of this component.", 0, java.lang.Integer.MAX_VALUE, property)); 758 children.add(new Property("component", "@ManufacturedItemDefinition.component", "A component that this component contains or is made from.", 0, java.lang.Integer.MAX_VALUE, component)); 759 } 760 761 @Override 762 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 763 switch (_hash) { 764 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Defining type of the component e.g. shell, layer, ink.", 0, 1, type); 765 case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "The function of this component within the item e.g. delivers active ingredient, masks taste.", 0, java.lang.Integer.MAX_VALUE, function); 766 case -1413853096: /*amount*/ return new Property("amount", "Quantity", "The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume).", 0, java.lang.Integer.MAX_VALUE, amount); 767 case -1846470364: /*constituent*/ return new Property("constituent", "", "A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient).", 0, java.lang.Integer.MAX_VALUE, constituent); 768 case -993141291: /*property*/ return new Property("property", "@ManufacturedItemDefinition.property", "General characteristics of this component.", 0, java.lang.Integer.MAX_VALUE, property); 769 case -1399907075: /*component*/ return new Property("component", "@ManufacturedItemDefinition.component", "A component that this component contains or is made from.", 0, java.lang.Integer.MAX_VALUE, component); 770 default: return super.getNamedProperty(_hash, _name, _checkValid); 771 } 772 773 } 774 775 @Override 776 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 777 switch (hash) { 778 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 779 case 1380938712: /*function*/ return this.function == null ? new Base[0] : this.function.toArray(new Base[this.function.size()]); // CodeableConcept 780 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : this.amount.toArray(new Base[this.amount.size()]); // Quantity 781 case -1846470364: /*constituent*/ return this.constituent == null ? new Base[0] : this.constituent.toArray(new Base[this.constituent.size()]); // ManufacturedItemDefinitionComponentConstituentComponent 782 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // ManufacturedItemDefinitionPropertyComponent 783 case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ManufacturedItemDefinitionComponentComponent 784 default: return super.getProperty(hash, name, checkValid); 785 } 786 787 } 788 789 @Override 790 public Base setProperty(int hash, String name, Base value) throws FHIRException { 791 switch (hash) { 792 case 3575610: // type 793 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 794 return value; 795 case 1380938712: // function 796 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 797 return value; 798 case -1413853096: // amount 799 this.getAmount().add(TypeConvertor.castToQuantity(value)); // Quantity 800 return value; 801 case -1846470364: // constituent 802 this.getConstituent().add((ManufacturedItemDefinitionComponentConstituentComponent) value); // ManufacturedItemDefinitionComponentConstituentComponent 803 return value; 804 case -993141291: // property 805 this.getProperty().add((ManufacturedItemDefinitionPropertyComponent) value); // ManufacturedItemDefinitionPropertyComponent 806 return value; 807 case -1399907075: // component 808 this.getComponent().add((ManufacturedItemDefinitionComponentComponent) value); // ManufacturedItemDefinitionComponentComponent 809 return value; 810 default: return super.setProperty(hash, name, value); 811 } 812 813 } 814 815 @Override 816 public Base setProperty(String name, Base value) throws FHIRException { 817 if (name.equals("type")) { 818 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 819 } else if (name.equals("function")) { 820 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); 821 } else if (name.equals("amount")) { 822 this.getAmount().add(TypeConvertor.castToQuantity(value)); 823 } else if (name.equals("constituent")) { 824 this.getConstituent().add((ManufacturedItemDefinitionComponentConstituentComponent) value); 825 } else if (name.equals("property")) { 826 this.getProperty().add((ManufacturedItemDefinitionPropertyComponent) value); 827 } else if (name.equals("component")) { 828 this.getComponent().add((ManufacturedItemDefinitionComponentComponent) value); 829 } else 830 return super.setProperty(name, value); 831 return value; 832 } 833 834 @Override 835 public Base makeProperty(int hash, String name) throws FHIRException { 836 switch (hash) { 837 case 3575610: return getType(); 838 case 1380938712: return addFunction(); 839 case -1413853096: return addAmount(); 840 case -1846470364: return addConstituent(); 841 case -993141291: return addProperty(); 842 case -1399907075: return addComponent(); 843 default: return super.makeProperty(hash, name); 844 } 845 846 } 847 848 @Override 849 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 850 switch (hash) { 851 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 852 case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; 853 case -1413853096: /*amount*/ return new String[] {"Quantity"}; 854 case -1846470364: /*constituent*/ return new String[] {}; 855 case -993141291: /*property*/ return new String[] {"@ManufacturedItemDefinition.property"}; 856 case -1399907075: /*component*/ return new String[] {"@ManufacturedItemDefinition.component"}; 857 default: return super.getTypesForProperty(hash, name); 858 } 859 860 } 861 862 @Override 863 public Base addChild(String name) throws FHIRException { 864 if (name.equals("type")) { 865 this.type = new CodeableConcept(); 866 return this.type; 867 } 868 else if (name.equals("function")) { 869 return addFunction(); 870 } 871 else if (name.equals("amount")) { 872 return addAmount(); 873 } 874 else if (name.equals("constituent")) { 875 return addConstituent(); 876 } 877 else if (name.equals("property")) { 878 return addProperty(); 879 } 880 else if (name.equals("component")) { 881 return addComponent(); 882 } 883 else 884 return super.addChild(name); 885 } 886 887 public ManufacturedItemDefinitionComponentComponent copy() { 888 ManufacturedItemDefinitionComponentComponent dst = new ManufacturedItemDefinitionComponentComponent(); 889 copyValues(dst); 890 return dst; 891 } 892 893 public void copyValues(ManufacturedItemDefinitionComponentComponent dst) { 894 super.copyValues(dst); 895 dst.type = type == null ? null : type.copy(); 896 if (function != null) { 897 dst.function = new ArrayList<CodeableConcept>(); 898 for (CodeableConcept i : function) 899 dst.function.add(i.copy()); 900 }; 901 if (amount != null) { 902 dst.amount = new ArrayList<Quantity>(); 903 for (Quantity i : amount) 904 dst.amount.add(i.copy()); 905 }; 906 if (constituent != null) { 907 dst.constituent = new ArrayList<ManufacturedItemDefinitionComponentConstituentComponent>(); 908 for (ManufacturedItemDefinitionComponentConstituentComponent i : constituent) 909 dst.constituent.add(i.copy()); 910 }; 911 if (property != null) { 912 dst.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 913 for (ManufacturedItemDefinitionPropertyComponent i : property) 914 dst.property.add(i.copy()); 915 }; 916 if (component != null) { 917 dst.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 918 for (ManufacturedItemDefinitionComponentComponent i : component) 919 dst.component.add(i.copy()); 920 }; 921 } 922 923 @Override 924 public boolean equalsDeep(Base other_) { 925 if (!super.equalsDeep(other_)) 926 return false; 927 if (!(other_ instanceof ManufacturedItemDefinitionComponentComponent)) 928 return false; 929 ManufacturedItemDefinitionComponentComponent o = (ManufacturedItemDefinitionComponentComponent) other_; 930 return compareDeep(type, o.type, true) && compareDeep(function, o.function, true) && compareDeep(amount, o.amount, true) 931 && compareDeep(constituent, o.constituent, true) && compareDeep(property, o.property, true) && compareDeep(component, o.component, true) 932 ; 933 } 934 935 @Override 936 public boolean equalsShallow(Base other_) { 937 if (!super.equalsShallow(other_)) 938 return false; 939 if (!(other_ instanceof ManufacturedItemDefinitionComponentComponent)) 940 return false; 941 ManufacturedItemDefinitionComponentComponent o = (ManufacturedItemDefinitionComponentComponent) other_; 942 return true; 943 } 944 945 public boolean isEmpty() { 946 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, function, amount, constituent 947 , property, component); 948 } 949 950 public String fhirType() { 951 return "ManufacturedItemDefinition.component"; 952 953 } 954 955 } 956 957 @Block() 958 public static class ManufacturedItemDefinitionComponentConstituentComponent extends BackboneElement implements IBaseBackboneElement { 959 /** 960 * The measurable amount of the substance, expressable in different ways (e.g. by mass or volume). 961 */ 962 @Child(name = "amount", type = {Quantity.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 963 @Description(shortDefinition="The measurable amount of the substance, expressable in different ways (e.g. by mass or volume)", formalDefinition="The measurable amount of the substance, expressable in different ways (e.g. by mass or volume)." ) 964 protected List<Quantity> amount; 965 966 /** 967 * The physical location of the constituent/ingredient within the component. Example ? if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part ? intragranular, extra-granular, etc. 968 */ 969 @Child(name = "location", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 970 @Description(shortDefinition="The physical location of the constituent/ingredient within the component", formalDefinition="The physical location of the constituent/ingredient within the component. Example ? if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part ? intragranular, extra-granular, etc." ) 971 protected List<CodeableConcept> location; 972 973 /** 974 * The function of this constituent within the component e.g. binder. 975 */ 976 @Child(name = "function", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 977 @Description(shortDefinition="The function of this constituent within the component e.g. binder", formalDefinition="The function of this constituent within the component e.g. binder." ) 978 protected List<CodeableConcept> function; 979 980 /** 981 * The ingredient that is the constituent of the given component. 982 */ 983 @Child(name = "hasIngredient", type = {CodeableReference.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 984 @Description(shortDefinition="The ingredient that is the constituent of the given component", formalDefinition="The ingredient that is the constituent of the given component." ) 985 protected List<CodeableReference> hasIngredient; 986 987 private static final long serialVersionUID = -708786069L; 988 989 /** 990 * Constructor 991 */ 992 public ManufacturedItemDefinitionComponentConstituentComponent() { 993 super(); 994 } 995 996 /** 997 * @return {@link #amount} (The measurable amount of the substance, expressable in different ways (e.g. by mass or volume).) 998 */ 999 public List<Quantity> getAmount() { 1000 if (this.amount == null) 1001 this.amount = new ArrayList<Quantity>(); 1002 return this.amount; 1003 } 1004 1005 /** 1006 * @return Returns a reference to <code>this</code> for easy method chaining 1007 */ 1008 public ManufacturedItemDefinitionComponentConstituentComponent setAmount(List<Quantity> theAmount) { 1009 this.amount = theAmount; 1010 return this; 1011 } 1012 1013 public boolean hasAmount() { 1014 if (this.amount == null) 1015 return false; 1016 for (Quantity item : this.amount) 1017 if (!item.isEmpty()) 1018 return true; 1019 return false; 1020 } 1021 1022 public Quantity addAmount() { //3 1023 Quantity t = new Quantity(); 1024 if (this.amount == null) 1025 this.amount = new ArrayList<Quantity>(); 1026 this.amount.add(t); 1027 return t; 1028 } 1029 1030 public ManufacturedItemDefinitionComponentConstituentComponent addAmount(Quantity t) { //3 1031 if (t == null) 1032 return this; 1033 if (this.amount == null) 1034 this.amount = new ArrayList<Quantity>(); 1035 this.amount.add(t); 1036 return this; 1037 } 1038 1039 /** 1040 * @return The first repetition of repeating field {@link #amount}, creating it if it does not already exist {3} 1041 */ 1042 public Quantity getAmountFirstRep() { 1043 if (getAmount().isEmpty()) { 1044 addAmount(); 1045 } 1046 return getAmount().get(0); 1047 } 1048 1049 /** 1050 * @return {@link #location} (The physical location of the constituent/ingredient within the component. Example ? if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part ? intragranular, extra-granular, etc.) 1051 */ 1052 public List<CodeableConcept> getLocation() { 1053 if (this.location == null) 1054 this.location = new ArrayList<CodeableConcept>(); 1055 return this.location; 1056 } 1057 1058 /** 1059 * @return Returns a reference to <code>this</code> for easy method chaining 1060 */ 1061 public ManufacturedItemDefinitionComponentConstituentComponent setLocation(List<CodeableConcept> theLocation) { 1062 this.location = theLocation; 1063 return this; 1064 } 1065 1066 public boolean hasLocation() { 1067 if (this.location == null) 1068 return false; 1069 for (CodeableConcept item : this.location) 1070 if (!item.isEmpty()) 1071 return true; 1072 return false; 1073 } 1074 1075 public CodeableConcept addLocation() { //3 1076 CodeableConcept t = new CodeableConcept(); 1077 if (this.location == null) 1078 this.location = new ArrayList<CodeableConcept>(); 1079 this.location.add(t); 1080 return t; 1081 } 1082 1083 public ManufacturedItemDefinitionComponentConstituentComponent addLocation(CodeableConcept t) { //3 1084 if (t == null) 1085 return this; 1086 if (this.location == null) 1087 this.location = new ArrayList<CodeableConcept>(); 1088 this.location.add(t); 1089 return this; 1090 } 1091 1092 /** 1093 * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3} 1094 */ 1095 public CodeableConcept getLocationFirstRep() { 1096 if (getLocation().isEmpty()) { 1097 addLocation(); 1098 } 1099 return getLocation().get(0); 1100 } 1101 1102 /** 1103 * @return {@link #function} (The function of this constituent within the component e.g. binder.) 1104 */ 1105 public List<CodeableConcept> getFunction() { 1106 if (this.function == null) 1107 this.function = new ArrayList<CodeableConcept>(); 1108 return this.function; 1109 } 1110 1111 /** 1112 * @return Returns a reference to <code>this</code> for easy method chaining 1113 */ 1114 public ManufacturedItemDefinitionComponentConstituentComponent setFunction(List<CodeableConcept> theFunction) { 1115 this.function = theFunction; 1116 return this; 1117 } 1118 1119 public boolean hasFunction() { 1120 if (this.function == null) 1121 return false; 1122 for (CodeableConcept item : this.function) 1123 if (!item.isEmpty()) 1124 return true; 1125 return false; 1126 } 1127 1128 public CodeableConcept addFunction() { //3 1129 CodeableConcept t = new CodeableConcept(); 1130 if (this.function == null) 1131 this.function = new ArrayList<CodeableConcept>(); 1132 this.function.add(t); 1133 return t; 1134 } 1135 1136 public ManufacturedItemDefinitionComponentConstituentComponent addFunction(CodeableConcept t) { //3 1137 if (t == null) 1138 return this; 1139 if (this.function == null) 1140 this.function = new ArrayList<CodeableConcept>(); 1141 this.function.add(t); 1142 return this; 1143 } 1144 1145 /** 1146 * @return The first repetition of repeating field {@link #function}, creating it if it does not already exist {3} 1147 */ 1148 public CodeableConcept getFunctionFirstRep() { 1149 if (getFunction().isEmpty()) { 1150 addFunction(); 1151 } 1152 return getFunction().get(0); 1153 } 1154 1155 /** 1156 * @return {@link #hasIngredient} (The ingredient that is the constituent of the given component.) 1157 */ 1158 public List<CodeableReference> getHasIngredient() { 1159 if (this.hasIngredient == null) 1160 this.hasIngredient = new ArrayList<CodeableReference>(); 1161 return this.hasIngredient; 1162 } 1163 1164 /** 1165 * @return Returns a reference to <code>this</code> for easy method chaining 1166 */ 1167 public ManufacturedItemDefinitionComponentConstituentComponent setHasIngredient(List<CodeableReference> theHasIngredient) { 1168 this.hasIngredient = theHasIngredient; 1169 return this; 1170 } 1171 1172 public boolean hasHasIngredient() { 1173 if (this.hasIngredient == null) 1174 return false; 1175 for (CodeableReference item : this.hasIngredient) 1176 if (!item.isEmpty()) 1177 return true; 1178 return false; 1179 } 1180 1181 public CodeableReference addHasIngredient() { //3 1182 CodeableReference t = new CodeableReference(); 1183 if (this.hasIngredient == null) 1184 this.hasIngredient = new ArrayList<CodeableReference>(); 1185 this.hasIngredient.add(t); 1186 return t; 1187 } 1188 1189 public ManufacturedItemDefinitionComponentConstituentComponent addHasIngredient(CodeableReference t) { //3 1190 if (t == null) 1191 return this; 1192 if (this.hasIngredient == null) 1193 this.hasIngredient = new ArrayList<CodeableReference>(); 1194 this.hasIngredient.add(t); 1195 return this; 1196 } 1197 1198 /** 1199 * @return The first repetition of repeating field {@link #hasIngredient}, creating it if it does not already exist {3} 1200 */ 1201 public CodeableReference getHasIngredientFirstRep() { 1202 if (getHasIngredient().isEmpty()) { 1203 addHasIngredient(); 1204 } 1205 return getHasIngredient().get(0); 1206 } 1207 1208 protected void listChildren(List<Property> children) { 1209 super.listChildren(children); 1210 children.add(new Property("amount", "Quantity", "The measurable amount of the substance, expressable in different ways (e.g. by mass or volume).", 0, java.lang.Integer.MAX_VALUE, amount)); 1211 children.add(new Property("location", "CodeableConcept", "The physical location of the constituent/ingredient within the component. Example ? if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part ? intragranular, extra-granular, etc.", 0, java.lang.Integer.MAX_VALUE, location)); 1212 children.add(new Property("function", "CodeableConcept", "The function of this constituent within the component e.g. binder.", 0, java.lang.Integer.MAX_VALUE, function)); 1213 children.add(new Property("hasIngredient", "CodeableReference(Ingredient)", "The ingredient that is the constituent of the given component.", 0, java.lang.Integer.MAX_VALUE, hasIngredient)); 1214 } 1215 1216 @Override 1217 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1218 switch (_hash) { 1219 case -1413853096: /*amount*/ return new Property("amount", "Quantity", "The measurable amount of the substance, expressable in different ways (e.g. by mass or volume).", 0, java.lang.Integer.MAX_VALUE, amount); 1220 case 1901043637: /*location*/ return new Property("location", "CodeableConcept", "The physical location of the constituent/ingredient within the component. Example ? if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part ? intragranular, extra-granular, etc.", 0, java.lang.Integer.MAX_VALUE, location); 1221 case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "The function of this constituent within the component e.g. binder.", 0, java.lang.Integer.MAX_VALUE, function); 1222 case 483059723: /*hasIngredient*/ return new Property("hasIngredient", "CodeableReference(Ingredient)", "The ingredient that is the constituent of the given component.", 0, java.lang.Integer.MAX_VALUE, hasIngredient); 1223 default: return super.getNamedProperty(_hash, _name, _checkValid); 1224 } 1225 1226 } 1227 1228 @Override 1229 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1230 switch (hash) { 1231 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : this.amount.toArray(new Base[this.amount.size()]); // Quantity 1232 case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // CodeableConcept 1233 case 1380938712: /*function*/ return this.function == null ? new Base[0] : this.function.toArray(new Base[this.function.size()]); // CodeableConcept 1234 case 483059723: /*hasIngredient*/ return this.hasIngredient == null ? new Base[0] : this.hasIngredient.toArray(new Base[this.hasIngredient.size()]); // CodeableReference 1235 default: return super.getProperty(hash, name, checkValid); 1236 } 1237 1238 } 1239 1240 @Override 1241 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1242 switch (hash) { 1243 case -1413853096: // amount 1244 this.getAmount().add(TypeConvertor.castToQuantity(value)); // Quantity 1245 return value; 1246 case 1901043637: // location 1247 this.getLocation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1248 return value; 1249 case 1380938712: // function 1250 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1251 return value; 1252 case 483059723: // hasIngredient 1253 this.getHasIngredient().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 1254 return value; 1255 default: return super.setProperty(hash, name, value); 1256 } 1257 1258 } 1259 1260 @Override 1261 public Base setProperty(String name, Base value) throws FHIRException { 1262 if (name.equals("amount")) { 1263 this.getAmount().add(TypeConvertor.castToQuantity(value)); 1264 } else if (name.equals("location")) { 1265 this.getLocation().add(TypeConvertor.castToCodeableConcept(value)); 1266 } else if (name.equals("function")) { 1267 this.getFunction().add(TypeConvertor.castToCodeableConcept(value)); 1268 } else if (name.equals("hasIngredient")) { 1269 this.getHasIngredient().add(TypeConvertor.castToCodeableReference(value)); 1270 } else 1271 return super.setProperty(name, value); 1272 return value; 1273 } 1274 1275 @Override 1276 public Base makeProperty(int hash, String name) throws FHIRException { 1277 switch (hash) { 1278 case -1413853096: return addAmount(); 1279 case 1901043637: return addLocation(); 1280 case 1380938712: return addFunction(); 1281 case 483059723: return addHasIngredient(); 1282 default: return super.makeProperty(hash, name); 1283 } 1284 1285 } 1286 1287 @Override 1288 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1289 switch (hash) { 1290 case -1413853096: /*amount*/ return new String[] {"Quantity"}; 1291 case 1901043637: /*location*/ return new String[] {"CodeableConcept"}; 1292 case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; 1293 case 483059723: /*hasIngredient*/ return new String[] {"CodeableReference"}; 1294 default: return super.getTypesForProperty(hash, name); 1295 } 1296 1297 } 1298 1299 @Override 1300 public Base addChild(String name) throws FHIRException { 1301 if (name.equals("amount")) { 1302 return addAmount(); 1303 } 1304 else if (name.equals("location")) { 1305 return addLocation(); 1306 } 1307 else if (name.equals("function")) { 1308 return addFunction(); 1309 } 1310 else if (name.equals("hasIngredient")) { 1311 return addHasIngredient(); 1312 } 1313 else 1314 return super.addChild(name); 1315 } 1316 1317 public ManufacturedItemDefinitionComponentConstituentComponent copy() { 1318 ManufacturedItemDefinitionComponentConstituentComponent dst = new ManufacturedItemDefinitionComponentConstituentComponent(); 1319 copyValues(dst); 1320 return dst; 1321 } 1322 1323 public void copyValues(ManufacturedItemDefinitionComponentConstituentComponent dst) { 1324 super.copyValues(dst); 1325 if (amount != null) { 1326 dst.amount = new ArrayList<Quantity>(); 1327 for (Quantity i : amount) 1328 dst.amount.add(i.copy()); 1329 }; 1330 if (location != null) { 1331 dst.location = new ArrayList<CodeableConcept>(); 1332 for (CodeableConcept i : location) 1333 dst.location.add(i.copy()); 1334 }; 1335 if (function != null) { 1336 dst.function = new ArrayList<CodeableConcept>(); 1337 for (CodeableConcept i : function) 1338 dst.function.add(i.copy()); 1339 }; 1340 if (hasIngredient != null) { 1341 dst.hasIngredient = new ArrayList<CodeableReference>(); 1342 for (CodeableReference i : hasIngredient) 1343 dst.hasIngredient.add(i.copy()); 1344 }; 1345 } 1346 1347 @Override 1348 public boolean equalsDeep(Base other_) { 1349 if (!super.equalsDeep(other_)) 1350 return false; 1351 if (!(other_ instanceof ManufacturedItemDefinitionComponentConstituentComponent)) 1352 return false; 1353 ManufacturedItemDefinitionComponentConstituentComponent o = (ManufacturedItemDefinitionComponentConstituentComponent) other_; 1354 return compareDeep(amount, o.amount, true) && compareDeep(location, o.location, true) && compareDeep(function, o.function, true) 1355 && compareDeep(hasIngredient, o.hasIngredient, true); 1356 } 1357 1358 @Override 1359 public boolean equalsShallow(Base other_) { 1360 if (!super.equalsShallow(other_)) 1361 return false; 1362 if (!(other_ instanceof ManufacturedItemDefinitionComponentConstituentComponent)) 1363 return false; 1364 ManufacturedItemDefinitionComponentConstituentComponent o = (ManufacturedItemDefinitionComponentConstituentComponent) other_; 1365 return true; 1366 } 1367 1368 public boolean isEmpty() { 1369 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(amount, location, function 1370 , hasIngredient); 1371 } 1372 1373 public String fhirType() { 1374 return "ManufacturedItemDefinition.component.constituent"; 1375 1376 } 1377 1378 } 1379 1380 /** 1381 * Unique identifier. 1382 */ 1383 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1384 @Description(shortDefinition="Unique identifier", formalDefinition="Unique identifier." ) 1385 protected List<Identifier> identifier; 1386 1387 /** 1388 * The status of this item. Enables tracking the life-cycle of the content. 1389 */ 1390 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1391 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this item. Enables tracking the life-cycle of the content." ) 1392 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 1393 protected Enumeration<PublicationStatus> status; 1394 1395 /** 1396 * A descriptive name applied to this item. 1397 */ 1398 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1399 @Description(shortDefinition="A descriptive name applied to this item", formalDefinition="A descriptive name applied to this item." ) 1400 protected StringType name; 1401 1402 /** 1403 * Dose form as manufactured and before any transformation into the pharmaceutical product. 1404 */ 1405 @Child(name = "manufacturedDoseForm", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) 1406 @Description(shortDefinition="Dose form as manufactured (before any necessary transformation)", formalDefinition="Dose form as manufactured and before any transformation into the pharmaceutical product." ) 1407 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/manufactured-dose-form") 1408 protected CodeableConcept manufacturedDoseForm; 1409 1410 /** 1411 * The ?real-world? units in which the quantity of the manufactured item is described. 1412 */ 1413 @Child(name = "unitOfPresentation", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 1414 @Description(shortDefinition="The ?real-world? units in which the quantity of the item is described", formalDefinition="The ?real-world? units in which the quantity of the manufactured item is described." ) 1415 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/unit-of-presentation") 1416 protected CodeableConcept unitOfPresentation; 1417 1418 /** 1419 * Manufacturer of the item, one of several possible. 1420 */ 1421 @Child(name = "manufacturer", type = {Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1422 @Description(shortDefinition="Manufacturer of the item, one of several possible", formalDefinition="Manufacturer of the item, one of several possible." ) 1423 protected List<Reference> manufacturer; 1424 1425 /** 1426 * Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated. 1427 */ 1428 @Child(name = "marketingStatus", type = {MarketingStatus.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1429 @Description(shortDefinition="Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated", formalDefinition="Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated." ) 1430 protected List<MarketingStatus> marketingStatus; 1431 1432 /** 1433 * The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource. 1434 */ 1435 @Child(name = "ingredient", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1436 @Description(shortDefinition="The ingredients of this manufactured item. Only needed if these are not specified by incoming references from the Ingredient resource", formalDefinition="The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource." ) 1437 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/substance-codes") 1438 protected List<CodeableConcept> ingredient; 1439 1440 /** 1441 * General characteristics of this item. 1442 */ 1443 @Child(name = "property", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1444 @Description(shortDefinition="General characteristics of this item", formalDefinition="General characteristics of this item." ) 1445 protected List<ManufacturedItemDefinitionPropertyComponent> property; 1446 1447 /** 1448 * Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup. 1449 */ 1450 @Child(name = "component", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1451 @Description(shortDefinition="Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup", formalDefinition="Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup." ) 1452 protected List<ManufacturedItemDefinitionComponentComponent> component; 1453 1454 private static final long serialVersionUID = 516510494L; 1455 1456 /** 1457 * Constructor 1458 */ 1459 public ManufacturedItemDefinition() { 1460 super(); 1461 } 1462 1463 /** 1464 * Constructor 1465 */ 1466 public ManufacturedItemDefinition(PublicationStatus status, CodeableConcept manufacturedDoseForm) { 1467 super(); 1468 this.setStatus(status); 1469 this.setManufacturedDoseForm(manufacturedDoseForm); 1470 } 1471 1472 /** 1473 * @return {@link #identifier} (Unique identifier.) 1474 */ 1475 public List<Identifier> getIdentifier() { 1476 if (this.identifier == null) 1477 this.identifier = new ArrayList<Identifier>(); 1478 return this.identifier; 1479 } 1480 1481 /** 1482 * @return Returns a reference to <code>this</code> for easy method chaining 1483 */ 1484 public ManufacturedItemDefinition setIdentifier(List<Identifier> theIdentifier) { 1485 this.identifier = theIdentifier; 1486 return this; 1487 } 1488 1489 public boolean hasIdentifier() { 1490 if (this.identifier == null) 1491 return false; 1492 for (Identifier item : this.identifier) 1493 if (!item.isEmpty()) 1494 return true; 1495 return false; 1496 } 1497 1498 public Identifier addIdentifier() { //3 1499 Identifier t = new Identifier(); 1500 if (this.identifier == null) 1501 this.identifier = new ArrayList<Identifier>(); 1502 this.identifier.add(t); 1503 return t; 1504 } 1505 1506 public ManufacturedItemDefinition addIdentifier(Identifier t) { //3 1507 if (t == null) 1508 return this; 1509 if (this.identifier == null) 1510 this.identifier = new ArrayList<Identifier>(); 1511 this.identifier.add(t); 1512 return this; 1513 } 1514 1515 /** 1516 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1517 */ 1518 public Identifier getIdentifierFirstRep() { 1519 if (getIdentifier().isEmpty()) { 1520 addIdentifier(); 1521 } 1522 return getIdentifier().get(0); 1523 } 1524 1525 /** 1526 * @return {@link #status} (The status of this item. 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 1527 */ 1528 public Enumeration<PublicationStatus> getStatusElement() { 1529 if (this.status == null) 1530 if (Configuration.errorOnAutoCreate()) 1531 throw new Error("Attempt to auto-create ManufacturedItemDefinition.status"); 1532 else if (Configuration.doAutoCreate()) 1533 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 1534 return this.status; 1535 } 1536 1537 public boolean hasStatusElement() { 1538 return this.status != null && !this.status.isEmpty(); 1539 } 1540 1541 public boolean hasStatus() { 1542 return this.status != null && !this.status.isEmpty(); 1543 } 1544 1545 /** 1546 * @param value {@link #status} (The status of this item. 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 1547 */ 1548 public ManufacturedItemDefinition setStatusElement(Enumeration<PublicationStatus> value) { 1549 this.status = value; 1550 return this; 1551 } 1552 1553 /** 1554 * @return The status of this item. Enables tracking the life-cycle of the content. 1555 */ 1556 public PublicationStatus getStatus() { 1557 return this.status == null ? null : this.status.getValue(); 1558 } 1559 1560 /** 1561 * @param value The status of this item. Enables tracking the life-cycle of the content. 1562 */ 1563 public ManufacturedItemDefinition setStatus(PublicationStatus value) { 1564 if (this.status == null) 1565 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 1566 this.status.setValue(value); 1567 return this; 1568 } 1569 1570 /** 1571 * @return {@link #name} (A descriptive name applied to this item.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1572 */ 1573 public StringType getNameElement() { 1574 if (this.name == null) 1575 if (Configuration.errorOnAutoCreate()) 1576 throw new Error("Attempt to auto-create ManufacturedItemDefinition.name"); 1577 else if (Configuration.doAutoCreate()) 1578 this.name = new StringType(); // bb 1579 return this.name; 1580 } 1581 1582 public boolean hasNameElement() { 1583 return this.name != null && !this.name.isEmpty(); 1584 } 1585 1586 public boolean hasName() { 1587 return this.name != null && !this.name.isEmpty(); 1588 } 1589 1590 /** 1591 * @param value {@link #name} (A descriptive name applied to this item.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1592 */ 1593 public ManufacturedItemDefinition setNameElement(StringType value) { 1594 this.name = value; 1595 return this; 1596 } 1597 1598 /** 1599 * @return A descriptive name applied to this item. 1600 */ 1601 public String getName() { 1602 return this.name == null ? null : this.name.getValue(); 1603 } 1604 1605 /** 1606 * @param value A descriptive name applied to this item. 1607 */ 1608 public ManufacturedItemDefinition setName(String value) { 1609 if (Utilities.noString(value)) 1610 this.name = null; 1611 else { 1612 if (this.name == null) 1613 this.name = new StringType(); 1614 this.name.setValue(value); 1615 } 1616 return this; 1617 } 1618 1619 /** 1620 * @return {@link #manufacturedDoseForm} (Dose form as manufactured and before any transformation into the pharmaceutical product.) 1621 */ 1622 public CodeableConcept getManufacturedDoseForm() { 1623 if (this.manufacturedDoseForm == null) 1624 if (Configuration.errorOnAutoCreate()) 1625 throw new Error("Attempt to auto-create ManufacturedItemDefinition.manufacturedDoseForm"); 1626 else if (Configuration.doAutoCreate()) 1627 this.manufacturedDoseForm = new CodeableConcept(); // cc 1628 return this.manufacturedDoseForm; 1629 } 1630 1631 public boolean hasManufacturedDoseForm() { 1632 return this.manufacturedDoseForm != null && !this.manufacturedDoseForm.isEmpty(); 1633 } 1634 1635 /** 1636 * @param value {@link #manufacturedDoseForm} (Dose form as manufactured and before any transformation into the pharmaceutical product.) 1637 */ 1638 public ManufacturedItemDefinition setManufacturedDoseForm(CodeableConcept value) { 1639 this.manufacturedDoseForm = value; 1640 return this; 1641 } 1642 1643 /** 1644 * @return {@link #unitOfPresentation} (The ?real-world? units in which the quantity of the manufactured item is described.) 1645 */ 1646 public CodeableConcept getUnitOfPresentation() { 1647 if (this.unitOfPresentation == null) 1648 if (Configuration.errorOnAutoCreate()) 1649 throw new Error("Attempt to auto-create ManufacturedItemDefinition.unitOfPresentation"); 1650 else if (Configuration.doAutoCreate()) 1651 this.unitOfPresentation = new CodeableConcept(); // cc 1652 return this.unitOfPresentation; 1653 } 1654 1655 public boolean hasUnitOfPresentation() { 1656 return this.unitOfPresentation != null && !this.unitOfPresentation.isEmpty(); 1657 } 1658 1659 /** 1660 * @param value {@link #unitOfPresentation} (The ?real-world? units in which the quantity of the manufactured item is described.) 1661 */ 1662 public ManufacturedItemDefinition setUnitOfPresentation(CodeableConcept value) { 1663 this.unitOfPresentation = value; 1664 return this; 1665 } 1666 1667 /** 1668 * @return {@link #manufacturer} (Manufacturer of the item, one of several possible.) 1669 */ 1670 public List<Reference> getManufacturer() { 1671 if (this.manufacturer == null) 1672 this.manufacturer = new ArrayList<Reference>(); 1673 return this.manufacturer; 1674 } 1675 1676 /** 1677 * @return Returns a reference to <code>this</code> for easy method chaining 1678 */ 1679 public ManufacturedItemDefinition setManufacturer(List<Reference> theManufacturer) { 1680 this.manufacturer = theManufacturer; 1681 return this; 1682 } 1683 1684 public boolean hasManufacturer() { 1685 if (this.manufacturer == null) 1686 return false; 1687 for (Reference item : this.manufacturer) 1688 if (!item.isEmpty()) 1689 return true; 1690 return false; 1691 } 1692 1693 public Reference addManufacturer() { //3 1694 Reference t = new Reference(); 1695 if (this.manufacturer == null) 1696 this.manufacturer = new ArrayList<Reference>(); 1697 this.manufacturer.add(t); 1698 return t; 1699 } 1700 1701 public ManufacturedItemDefinition addManufacturer(Reference t) { //3 1702 if (t == null) 1703 return this; 1704 if (this.manufacturer == null) 1705 this.manufacturer = new ArrayList<Reference>(); 1706 this.manufacturer.add(t); 1707 return this; 1708 } 1709 1710 /** 1711 * @return The first repetition of repeating field {@link #manufacturer}, creating it if it does not already exist {3} 1712 */ 1713 public Reference getManufacturerFirstRep() { 1714 if (getManufacturer().isEmpty()) { 1715 addManufacturer(); 1716 } 1717 return getManufacturer().get(0); 1718 } 1719 1720 /** 1721 * @return {@link #marketingStatus} (Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.) 1722 */ 1723 public List<MarketingStatus> getMarketingStatus() { 1724 if (this.marketingStatus == null) 1725 this.marketingStatus = new ArrayList<MarketingStatus>(); 1726 return this.marketingStatus; 1727 } 1728 1729 /** 1730 * @return Returns a reference to <code>this</code> for easy method chaining 1731 */ 1732 public ManufacturedItemDefinition setMarketingStatus(List<MarketingStatus> theMarketingStatus) { 1733 this.marketingStatus = theMarketingStatus; 1734 return this; 1735 } 1736 1737 public boolean hasMarketingStatus() { 1738 if (this.marketingStatus == null) 1739 return false; 1740 for (MarketingStatus item : this.marketingStatus) 1741 if (!item.isEmpty()) 1742 return true; 1743 return false; 1744 } 1745 1746 public MarketingStatus addMarketingStatus() { //3 1747 MarketingStatus t = new MarketingStatus(); 1748 if (this.marketingStatus == null) 1749 this.marketingStatus = new ArrayList<MarketingStatus>(); 1750 this.marketingStatus.add(t); 1751 return t; 1752 } 1753 1754 public ManufacturedItemDefinition addMarketingStatus(MarketingStatus t) { //3 1755 if (t == null) 1756 return this; 1757 if (this.marketingStatus == null) 1758 this.marketingStatus = new ArrayList<MarketingStatus>(); 1759 this.marketingStatus.add(t); 1760 return this; 1761 } 1762 1763 /** 1764 * @return The first repetition of repeating field {@link #marketingStatus}, creating it if it does not already exist {3} 1765 */ 1766 public MarketingStatus getMarketingStatusFirstRep() { 1767 if (getMarketingStatus().isEmpty()) { 1768 addMarketingStatus(); 1769 } 1770 return getMarketingStatus().get(0); 1771 } 1772 1773 /** 1774 * @return {@link #ingredient} (The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource.) 1775 */ 1776 public List<CodeableConcept> getIngredient() { 1777 if (this.ingredient == null) 1778 this.ingredient = new ArrayList<CodeableConcept>(); 1779 return this.ingredient; 1780 } 1781 1782 /** 1783 * @return Returns a reference to <code>this</code> for easy method chaining 1784 */ 1785 public ManufacturedItemDefinition setIngredient(List<CodeableConcept> theIngredient) { 1786 this.ingredient = theIngredient; 1787 return this; 1788 } 1789 1790 public boolean hasIngredient() { 1791 if (this.ingredient == null) 1792 return false; 1793 for (CodeableConcept item : this.ingredient) 1794 if (!item.isEmpty()) 1795 return true; 1796 return false; 1797 } 1798 1799 public CodeableConcept addIngredient() { //3 1800 CodeableConcept t = new CodeableConcept(); 1801 if (this.ingredient == null) 1802 this.ingredient = new ArrayList<CodeableConcept>(); 1803 this.ingredient.add(t); 1804 return t; 1805 } 1806 1807 public ManufacturedItemDefinition addIngredient(CodeableConcept t) { //3 1808 if (t == null) 1809 return this; 1810 if (this.ingredient == null) 1811 this.ingredient = new ArrayList<CodeableConcept>(); 1812 this.ingredient.add(t); 1813 return this; 1814 } 1815 1816 /** 1817 * @return The first repetition of repeating field {@link #ingredient}, creating it if it does not already exist {3} 1818 */ 1819 public CodeableConcept getIngredientFirstRep() { 1820 if (getIngredient().isEmpty()) { 1821 addIngredient(); 1822 } 1823 return getIngredient().get(0); 1824 } 1825 1826 /** 1827 * @return {@link #property} (General characteristics of this item.) 1828 */ 1829 public List<ManufacturedItemDefinitionPropertyComponent> getProperty() { 1830 if (this.property == null) 1831 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 1832 return this.property; 1833 } 1834 1835 /** 1836 * @return Returns a reference to <code>this</code> for easy method chaining 1837 */ 1838 public ManufacturedItemDefinition setProperty(List<ManufacturedItemDefinitionPropertyComponent> theProperty) { 1839 this.property = theProperty; 1840 return this; 1841 } 1842 1843 public boolean hasProperty() { 1844 if (this.property == null) 1845 return false; 1846 for (ManufacturedItemDefinitionPropertyComponent item : this.property) 1847 if (!item.isEmpty()) 1848 return true; 1849 return false; 1850 } 1851 1852 public ManufacturedItemDefinitionPropertyComponent addProperty() { //3 1853 ManufacturedItemDefinitionPropertyComponent t = new ManufacturedItemDefinitionPropertyComponent(); 1854 if (this.property == null) 1855 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 1856 this.property.add(t); 1857 return t; 1858 } 1859 1860 public ManufacturedItemDefinition addProperty(ManufacturedItemDefinitionPropertyComponent t) { //3 1861 if (t == null) 1862 return this; 1863 if (this.property == null) 1864 this.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 1865 this.property.add(t); 1866 return this; 1867 } 1868 1869 /** 1870 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3} 1871 */ 1872 public ManufacturedItemDefinitionPropertyComponent getPropertyFirstRep() { 1873 if (getProperty().isEmpty()) { 1874 addProperty(); 1875 } 1876 return getProperty().get(0); 1877 } 1878 1879 /** 1880 * @return {@link #component} (Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup.) 1881 */ 1882 public List<ManufacturedItemDefinitionComponentComponent> getComponent() { 1883 if (this.component == null) 1884 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 1885 return this.component; 1886 } 1887 1888 /** 1889 * @return Returns a reference to <code>this</code> for easy method chaining 1890 */ 1891 public ManufacturedItemDefinition setComponent(List<ManufacturedItemDefinitionComponentComponent> theComponent) { 1892 this.component = theComponent; 1893 return this; 1894 } 1895 1896 public boolean hasComponent() { 1897 if (this.component == null) 1898 return false; 1899 for (ManufacturedItemDefinitionComponentComponent item : this.component) 1900 if (!item.isEmpty()) 1901 return true; 1902 return false; 1903 } 1904 1905 public ManufacturedItemDefinitionComponentComponent addComponent() { //3 1906 ManufacturedItemDefinitionComponentComponent t = new ManufacturedItemDefinitionComponentComponent(); 1907 if (this.component == null) 1908 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 1909 this.component.add(t); 1910 return t; 1911 } 1912 1913 public ManufacturedItemDefinition addComponent(ManufacturedItemDefinitionComponentComponent t) { //3 1914 if (t == null) 1915 return this; 1916 if (this.component == null) 1917 this.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 1918 this.component.add(t); 1919 return this; 1920 } 1921 1922 /** 1923 * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3} 1924 */ 1925 public ManufacturedItemDefinitionComponentComponent getComponentFirstRep() { 1926 if (getComponent().isEmpty()) { 1927 addComponent(); 1928 } 1929 return getComponent().get(0); 1930 } 1931 1932 protected void listChildren(List<Property> children) { 1933 super.listChildren(children); 1934 children.add(new Property("identifier", "Identifier", "Unique identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1935 children.add(new Property("status", "code", "The status of this item. Enables tracking the life-cycle of the content.", 0, 1, status)); 1936 children.add(new Property("name", "string", "A descriptive name applied to this item.", 0, 1, name)); 1937 children.add(new Property("manufacturedDoseForm", "CodeableConcept", "Dose form as manufactured and before any transformation into the pharmaceutical product.", 0, 1, manufacturedDoseForm)); 1938 children.add(new Property("unitOfPresentation", "CodeableConcept", "The ?real-world? units in which the quantity of the manufactured item is described.", 0, 1, unitOfPresentation)); 1939 children.add(new Property("manufacturer", "Reference(Organization)", "Manufacturer of the item, one of several possible.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); 1940 children.add(new Property("marketingStatus", "MarketingStatus", "Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.", 0, java.lang.Integer.MAX_VALUE, marketingStatus)); 1941 children.add(new Property("ingredient", "CodeableConcept", "The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource.", 0, java.lang.Integer.MAX_VALUE, ingredient)); 1942 children.add(new Property("property", "", "General characteristics of this item.", 0, java.lang.Integer.MAX_VALUE, property)); 1943 children.add(new Property("component", "", "Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup.", 0, java.lang.Integer.MAX_VALUE, component)); 1944 } 1945 1946 @Override 1947 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1948 switch (_hash) { 1949 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier.", 0, java.lang.Integer.MAX_VALUE, identifier); 1950 case -892481550: /*status*/ return new Property("status", "code", "The status of this item. Enables tracking the life-cycle of the content.", 0, 1, status); 1951 case 3373707: /*name*/ return new Property("name", "string", "A descriptive name applied to this item.", 0, 1, name); 1952 case -1451400348: /*manufacturedDoseForm*/ return new Property("manufacturedDoseForm", "CodeableConcept", "Dose form as manufactured and before any transformation into the pharmaceutical product.", 0, 1, manufacturedDoseForm); 1953 case -1427765963: /*unitOfPresentation*/ return new Property("unitOfPresentation", "CodeableConcept", "The ?real-world? units in which the quantity of the manufactured item is described.", 0, 1, unitOfPresentation); 1954 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "Reference(Organization)", "Manufacturer of the item, one of several possible.", 0, java.lang.Integer.MAX_VALUE, manufacturer); 1955 case 70767032: /*marketingStatus*/ return new Property("marketingStatus", "MarketingStatus", "Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.", 0, java.lang.Integer.MAX_VALUE, marketingStatus); 1956 case -206409263: /*ingredient*/ return new Property("ingredient", "CodeableConcept", "The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource.", 0, java.lang.Integer.MAX_VALUE, ingredient); 1957 case -993141291: /*property*/ return new Property("property", "", "General characteristics of this item.", 0, java.lang.Integer.MAX_VALUE, property); 1958 case -1399907075: /*component*/ return new Property("component", "", "Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup.", 0, java.lang.Integer.MAX_VALUE, component); 1959 default: return super.getNamedProperty(_hash, _name, _checkValid); 1960 } 1961 1962 } 1963 1964 @Override 1965 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1966 switch (hash) { 1967 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1968 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 1969 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1970 case -1451400348: /*manufacturedDoseForm*/ return this.manufacturedDoseForm == null ? new Base[0] : new Base[] {this.manufacturedDoseForm}; // CodeableConcept 1971 case -1427765963: /*unitOfPresentation*/ return this.unitOfPresentation == null ? new Base[0] : new Base[] {this.unitOfPresentation}; // CodeableConcept 1972 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : this.manufacturer.toArray(new Base[this.manufacturer.size()]); // Reference 1973 case 70767032: /*marketingStatus*/ return this.marketingStatus == null ? new Base[0] : this.marketingStatus.toArray(new Base[this.marketingStatus.size()]); // MarketingStatus 1974 case -206409263: /*ingredient*/ return this.ingredient == null ? new Base[0] : this.ingredient.toArray(new Base[this.ingredient.size()]); // CodeableConcept 1975 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // ManufacturedItemDefinitionPropertyComponent 1976 case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ManufacturedItemDefinitionComponentComponent 1977 default: return super.getProperty(hash, name, checkValid); 1978 } 1979 1980 } 1981 1982 @Override 1983 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1984 switch (hash) { 1985 case -1618432855: // identifier 1986 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1987 return value; 1988 case -892481550: // status 1989 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1990 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1991 return value; 1992 case 3373707: // name 1993 this.name = TypeConvertor.castToString(value); // StringType 1994 return value; 1995 case -1451400348: // manufacturedDoseForm 1996 this.manufacturedDoseForm = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1997 return value; 1998 case -1427765963: // unitOfPresentation 1999 this.unitOfPresentation = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2000 return value; 2001 case -1969347631: // manufacturer 2002 this.getManufacturer().add(TypeConvertor.castToReference(value)); // Reference 2003 return value; 2004 case 70767032: // marketingStatus 2005 this.getMarketingStatus().add(TypeConvertor.castToMarketingStatus(value)); // MarketingStatus 2006 return value; 2007 case -206409263: // ingredient 2008 this.getIngredient().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2009 return value; 2010 case -993141291: // property 2011 this.getProperty().add((ManufacturedItemDefinitionPropertyComponent) value); // ManufacturedItemDefinitionPropertyComponent 2012 return value; 2013 case -1399907075: // component 2014 this.getComponent().add((ManufacturedItemDefinitionComponentComponent) value); // ManufacturedItemDefinitionComponentComponent 2015 return value; 2016 default: return super.setProperty(hash, name, value); 2017 } 2018 2019 } 2020 2021 @Override 2022 public Base setProperty(String name, Base value) throws FHIRException { 2023 if (name.equals("identifier")) { 2024 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 2025 } else if (name.equals("status")) { 2026 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 2027 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2028 } else if (name.equals("name")) { 2029 this.name = TypeConvertor.castToString(value); // StringType 2030 } else if (name.equals("manufacturedDoseForm")) { 2031 this.manufacturedDoseForm = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2032 } else if (name.equals("unitOfPresentation")) { 2033 this.unitOfPresentation = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2034 } else if (name.equals("manufacturer")) { 2035 this.getManufacturer().add(TypeConvertor.castToReference(value)); 2036 } else if (name.equals("marketingStatus")) { 2037 this.getMarketingStatus().add(TypeConvertor.castToMarketingStatus(value)); 2038 } else if (name.equals("ingredient")) { 2039 this.getIngredient().add(TypeConvertor.castToCodeableConcept(value)); 2040 } else if (name.equals("property")) { 2041 this.getProperty().add((ManufacturedItemDefinitionPropertyComponent) value); 2042 } else if (name.equals("component")) { 2043 this.getComponent().add((ManufacturedItemDefinitionComponentComponent) value); 2044 } else 2045 return super.setProperty(name, value); 2046 return value; 2047 } 2048 2049 @Override 2050 public Base makeProperty(int hash, String name) throws FHIRException { 2051 switch (hash) { 2052 case -1618432855: return addIdentifier(); 2053 case -892481550: return getStatusElement(); 2054 case 3373707: return getNameElement(); 2055 case -1451400348: return getManufacturedDoseForm(); 2056 case -1427765963: return getUnitOfPresentation(); 2057 case -1969347631: return addManufacturer(); 2058 case 70767032: return addMarketingStatus(); 2059 case -206409263: return addIngredient(); 2060 case -993141291: return addProperty(); 2061 case -1399907075: return addComponent(); 2062 default: return super.makeProperty(hash, name); 2063 } 2064 2065 } 2066 2067 @Override 2068 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2069 switch (hash) { 2070 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2071 case -892481550: /*status*/ return new String[] {"code"}; 2072 case 3373707: /*name*/ return new String[] {"string"}; 2073 case -1451400348: /*manufacturedDoseForm*/ return new String[] {"CodeableConcept"}; 2074 case -1427765963: /*unitOfPresentation*/ return new String[] {"CodeableConcept"}; 2075 case -1969347631: /*manufacturer*/ return new String[] {"Reference"}; 2076 case 70767032: /*marketingStatus*/ return new String[] {"MarketingStatus"}; 2077 case -206409263: /*ingredient*/ return new String[] {"CodeableConcept"}; 2078 case -993141291: /*property*/ return new String[] {}; 2079 case -1399907075: /*component*/ return new String[] {}; 2080 default: return super.getTypesForProperty(hash, name); 2081 } 2082 2083 } 2084 2085 @Override 2086 public Base addChild(String name) throws FHIRException { 2087 if (name.equals("identifier")) { 2088 return addIdentifier(); 2089 } 2090 else if (name.equals("status")) { 2091 throw new FHIRException("Cannot call addChild on a singleton property ManufacturedItemDefinition.status"); 2092 } 2093 else if (name.equals("name")) { 2094 throw new FHIRException("Cannot call addChild on a singleton property ManufacturedItemDefinition.name"); 2095 } 2096 else if (name.equals("manufacturedDoseForm")) { 2097 this.manufacturedDoseForm = new CodeableConcept(); 2098 return this.manufacturedDoseForm; 2099 } 2100 else if (name.equals("unitOfPresentation")) { 2101 this.unitOfPresentation = new CodeableConcept(); 2102 return this.unitOfPresentation; 2103 } 2104 else if (name.equals("manufacturer")) { 2105 return addManufacturer(); 2106 } 2107 else if (name.equals("marketingStatus")) { 2108 return addMarketingStatus(); 2109 } 2110 else if (name.equals("ingredient")) { 2111 return addIngredient(); 2112 } 2113 else if (name.equals("property")) { 2114 return addProperty(); 2115 } 2116 else if (name.equals("component")) { 2117 return addComponent(); 2118 } 2119 else 2120 return super.addChild(name); 2121 } 2122 2123 public String fhirType() { 2124 return "ManufacturedItemDefinition"; 2125 2126 } 2127 2128 public ManufacturedItemDefinition copy() { 2129 ManufacturedItemDefinition dst = new ManufacturedItemDefinition(); 2130 copyValues(dst); 2131 return dst; 2132 } 2133 2134 public void copyValues(ManufacturedItemDefinition dst) { 2135 super.copyValues(dst); 2136 if (identifier != null) { 2137 dst.identifier = new ArrayList<Identifier>(); 2138 for (Identifier i : identifier) 2139 dst.identifier.add(i.copy()); 2140 }; 2141 dst.status = status == null ? null : status.copy(); 2142 dst.name = name == null ? null : name.copy(); 2143 dst.manufacturedDoseForm = manufacturedDoseForm == null ? null : manufacturedDoseForm.copy(); 2144 dst.unitOfPresentation = unitOfPresentation == null ? null : unitOfPresentation.copy(); 2145 if (manufacturer != null) { 2146 dst.manufacturer = new ArrayList<Reference>(); 2147 for (Reference i : manufacturer) 2148 dst.manufacturer.add(i.copy()); 2149 }; 2150 if (marketingStatus != null) { 2151 dst.marketingStatus = new ArrayList<MarketingStatus>(); 2152 for (MarketingStatus i : marketingStatus) 2153 dst.marketingStatus.add(i.copy()); 2154 }; 2155 if (ingredient != null) { 2156 dst.ingredient = new ArrayList<CodeableConcept>(); 2157 for (CodeableConcept i : ingredient) 2158 dst.ingredient.add(i.copy()); 2159 }; 2160 if (property != null) { 2161 dst.property = new ArrayList<ManufacturedItemDefinitionPropertyComponent>(); 2162 for (ManufacturedItemDefinitionPropertyComponent i : property) 2163 dst.property.add(i.copy()); 2164 }; 2165 if (component != null) { 2166 dst.component = new ArrayList<ManufacturedItemDefinitionComponentComponent>(); 2167 for (ManufacturedItemDefinitionComponentComponent i : component) 2168 dst.component.add(i.copy()); 2169 }; 2170 } 2171 2172 protected ManufacturedItemDefinition typedCopy() { 2173 return copy(); 2174 } 2175 2176 @Override 2177 public boolean equalsDeep(Base other_) { 2178 if (!super.equalsDeep(other_)) 2179 return false; 2180 if (!(other_ instanceof ManufacturedItemDefinition)) 2181 return false; 2182 ManufacturedItemDefinition o = (ManufacturedItemDefinition) other_; 2183 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(name, o.name, true) 2184 && compareDeep(manufacturedDoseForm, o.manufacturedDoseForm, true) && compareDeep(unitOfPresentation, o.unitOfPresentation, true) 2185 && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(marketingStatus, o.marketingStatus, true) 2186 && compareDeep(ingredient, o.ingredient, true) && compareDeep(property, o.property, true) && compareDeep(component, o.component, true) 2187 ; 2188 } 2189 2190 @Override 2191 public boolean equalsShallow(Base other_) { 2192 if (!super.equalsShallow(other_)) 2193 return false; 2194 if (!(other_ instanceof ManufacturedItemDefinition)) 2195 return false; 2196 ManufacturedItemDefinition o = (ManufacturedItemDefinition) other_; 2197 return compareValues(status, o.status, true) && compareValues(name, o.name, true); 2198 } 2199 2200 public boolean isEmpty() { 2201 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, name 2202 , manufacturedDoseForm, unitOfPresentation, manufacturer, marketingStatus, ingredient 2203 , property, component); 2204 } 2205 2206 @Override 2207 public ResourceType getResourceType() { 2208 return ResourceType.ManufacturedItemDefinition; 2209 } 2210 2211 /** 2212 * Search parameter: <b>dose-form</b> 2213 * <p> 2214 * Description: <b>Dose form as manufactured and before any transformation into the pharmaceutical product</b><br> 2215 * Type: <b>token</b><br> 2216 * Path: <b>ManufacturedItemDefinition.manufacturedDoseForm</b><br> 2217 * </p> 2218 */ 2219 @SearchParamDefinition(name="dose-form", path="ManufacturedItemDefinition.manufacturedDoseForm", description="Dose form as manufactured and before any transformation into the pharmaceutical product", type="token" ) 2220 public static final String SP_DOSE_FORM = "dose-form"; 2221 /** 2222 * <b>Fluent Client</b> search parameter constant for <b>dose-form</b> 2223 * <p> 2224 * Description: <b>Dose form as manufactured and before any transformation into the pharmaceutical product</b><br> 2225 * Type: <b>token</b><br> 2226 * Path: <b>ManufacturedItemDefinition.manufacturedDoseForm</b><br> 2227 * </p> 2228 */ 2229 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DOSE_FORM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DOSE_FORM); 2230 2231 /** 2232 * Search parameter: <b>identifier</b> 2233 * <p> 2234 * Description: <b>Unique identifier</b><br> 2235 * Type: <b>token</b><br> 2236 * Path: <b>ManufacturedItemDefinition.identifier</b><br> 2237 * </p> 2238 */ 2239 @SearchParamDefinition(name="identifier", path="ManufacturedItemDefinition.identifier", description="Unique identifier", type="token" ) 2240 public static final String SP_IDENTIFIER = "identifier"; 2241 /** 2242 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2243 * <p> 2244 * Description: <b>Unique identifier</b><br> 2245 * Type: <b>token</b><br> 2246 * Path: <b>ManufacturedItemDefinition.identifier</b><br> 2247 * </p> 2248 */ 2249 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2250 2251 /** 2252 * Search parameter: <b>ingredient</b> 2253 * <p> 2254 * Description: <b>An ingredient of this item</b><br> 2255 * Type: <b>token</b><br> 2256 * Path: <b>ManufacturedItemDefinition.ingredient</b><br> 2257 * </p> 2258 */ 2259 @SearchParamDefinition(name="ingredient", path="ManufacturedItemDefinition.ingredient", description="An ingredient of this item", type="token" ) 2260 public static final String SP_INGREDIENT = "ingredient"; 2261 /** 2262 * <b>Fluent Client</b> search parameter constant for <b>ingredient</b> 2263 * <p> 2264 * Description: <b>An ingredient of this item</b><br> 2265 * Type: <b>token</b><br> 2266 * Path: <b>ManufacturedItemDefinition.ingredient</b><br> 2267 * </p> 2268 */ 2269 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INGREDIENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INGREDIENT); 2270 2271 /** 2272 * Search parameter: <b>name</b> 2273 * <p> 2274 * Description: <b>A descriptive name applied to this item</b><br> 2275 * Type: <b>token</b><br> 2276 * Path: <b>ManufacturedItemDefinition.name</b><br> 2277 * </p> 2278 */ 2279 @SearchParamDefinition(name="name", path="ManufacturedItemDefinition.name", description="A descriptive name applied to this item", type="token" ) 2280 public static final String SP_NAME = "name"; 2281 /** 2282 * <b>Fluent Client</b> search parameter constant for <b>name</b> 2283 * <p> 2284 * Description: <b>A descriptive name applied to this item</b><br> 2285 * Type: <b>token</b><br> 2286 * Path: <b>ManufacturedItemDefinition.name</b><br> 2287 * </p> 2288 */ 2289 public static final ca.uhn.fhir.rest.gclient.TokenClientParam NAME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_NAME); 2290 2291 /** 2292 * Search parameter: <b>status</b> 2293 * <p> 2294 * Description: <b>The status of this item. Enables tracking the life-cycle of the content.</b><br> 2295 * Type: <b>token</b><br> 2296 * Path: <b>ManufacturedItemDefinition.status</b><br> 2297 * </p> 2298 */ 2299 @SearchParamDefinition(name="status", path="ManufacturedItemDefinition.status", description="The status of this item. Enables tracking the life-cycle of the content.", type="token" ) 2300 public static final String SP_STATUS = "status"; 2301 /** 2302 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2303 * <p> 2304 * Description: <b>The status of this item. Enables tracking the life-cycle of the content.</b><br> 2305 * Type: <b>token</b><br> 2306 * Path: <b>ManufacturedItemDefinition.status</b><br> 2307 * </p> 2308 */ 2309 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2310 2311 2312} 2313