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 * A medically related item or items, in a container or package. 052 */ 053@ResourceDef(name="PackagedProductDefinition", profile="http://hl7.org/fhir/StructureDefinition/PackagedProductDefinition") 054public class PackagedProductDefinition extends DomainResource { 055 056 @Block() 057 public static class PackagedProductDefinitionLegalStatusOfSupplyComponent extends BackboneElement implements IBaseBackboneElement { 058 /** 059 * The actual status of supply. Conveys in what situation this package type may be supplied for use. 060 */ 061 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 062 @Description(shortDefinition="The actual status of supply. In what situation this package type may be supplied for use", formalDefinition="The actual status of supply. Conveys in what situation this package type may be supplied for use." ) 063 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/legal-status-of-supply") 064 protected CodeableConcept code; 065 066 /** 067 * The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context. 068 */ 069 @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 070 @Description(shortDefinition="The place where the legal status of supply applies", formalDefinition="The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context." ) 071 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction") 072 protected CodeableConcept jurisdiction; 073 074 private static final long serialVersionUID = 1072410156L; 075 076 /** 077 * Constructor 078 */ 079 public PackagedProductDefinitionLegalStatusOfSupplyComponent() { 080 super(); 081 } 082 083 /** 084 * @return {@link #code} (The actual status of supply. Conveys in what situation this package type may be supplied for use.) 085 */ 086 public CodeableConcept getCode() { 087 if (this.code == null) 088 if (Configuration.errorOnAutoCreate()) 089 throw new Error("Attempt to auto-create PackagedProductDefinitionLegalStatusOfSupplyComponent.code"); 090 else if (Configuration.doAutoCreate()) 091 this.code = new CodeableConcept(); // cc 092 return this.code; 093 } 094 095 public boolean hasCode() { 096 return this.code != null && !this.code.isEmpty(); 097 } 098 099 /** 100 * @param value {@link #code} (The actual status of supply. Conveys in what situation this package type may be supplied for use.) 101 */ 102 public PackagedProductDefinitionLegalStatusOfSupplyComponent setCode(CodeableConcept value) { 103 this.code = value; 104 return this; 105 } 106 107 /** 108 * @return {@link #jurisdiction} (The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.) 109 */ 110 public CodeableConcept getJurisdiction() { 111 if (this.jurisdiction == null) 112 if (Configuration.errorOnAutoCreate()) 113 throw new Error("Attempt to auto-create PackagedProductDefinitionLegalStatusOfSupplyComponent.jurisdiction"); 114 else if (Configuration.doAutoCreate()) 115 this.jurisdiction = new CodeableConcept(); // cc 116 return this.jurisdiction; 117 } 118 119 public boolean hasJurisdiction() { 120 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 121 } 122 123 /** 124 * @param value {@link #jurisdiction} (The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.) 125 */ 126 public PackagedProductDefinitionLegalStatusOfSupplyComponent setJurisdiction(CodeableConcept value) { 127 this.jurisdiction = value; 128 return this; 129 } 130 131 protected void listChildren(List<Property> children) { 132 super.listChildren(children); 133 children.add(new Property("code", "CodeableConcept", "The actual status of supply. Conveys in what situation this package type may be supplied for use.", 0, 1, code)); 134 children.add(new Property("jurisdiction", "CodeableConcept", "The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.", 0, 1, jurisdiction)); 135 } 136 137 @Override 138 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 139 switch (_hash) { 140 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "The actual status of supply. Conveys in what situation this package type may be supplied for use.", 0, 1, code); 141 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.", 0, 1, jurisdiction); 142 default: return super.getNamedProperty(_hash, _name, _checkValid); 143 } 144 145 } 146 147 @Override 148 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 149 switch (hash) { 150 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 151 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : new Base[] {this.jurisdiction}; // CodeableConcept 152 default: return super.getProperty(hash, name, checkValid); 153 } 154 155 } 156 157 @Override 158 public Base setProperty(int hash, String name, Base value) throws FHIRException { 159 switch (hash) { 160 case 3059181: // code 161 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 162 return value; 163 case -507075711: // jurisdiction 164 this.jurisdiction = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 165 return value; 166 default: return super.setProperty(hash, name, value); 167 } 168 169 } 170 171 @Override 172 public Base setProperty(String name, Base value) throws FHIRException { 173 if (name.equals("code")) { 174 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 175 } else if (name.equals("jurisdiction")) { 176 this.jurisdiction = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 177 } else 178 return super.setProperty(name, value); 179 return value; 180 } 181 182 @Override 183 public Base makeProperty(int hash, String name) throws FHIRException { 184 switch (hash) { 185 case 3059181: return getCode(); 186 case -507075711: return getJurisdiction(); 187 default: return super.makeProperty(hash, name); 188 } 189 190 } 191 192 @Override 193 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 194 switch (hash) { 195 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 196 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 197 default: return super.getTypesForProperty(hash, name); 198 } 199 200 } 201 202 @Override 203 public Base addChild(String name) throws FHIRException { 204 if (name.equals("code")) { 205 this.code = new CodeableConcept(); 206 return this.code; 207 } 208 else if (name.equals("jurisdiction")) { 209 this.jurisdiction = new CodeableConcept(); 210 return this.jurisdiction; 211 } 212 else 213 return super.addChild(name); 214 } 215 216 public PackagedProductDefinitionLegalStatusOfSupplyComponent copy() { 217 PackagedProductDefinitionLegalStatusOfSupplyComponent dst = new PackagedProductDefinitionLegalStatusOfSupplyComponent(); 218 copyValues(dst); 219 return dst; 220 } 221 222 public void copyValues(PackagedProductDefinitionLegalStatusOfSupplyComponent dst) { 223 super.copyValues(dst); 224 dst.code = code == null ? null : code.copy(); 225 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 226 } 227 228 @Override 229 public boolean equalsDeep(Base other_) { 230 if (!super.equalsDeep(other_)) 231 return false; 232 if (!(other_ instanceof PackagedProductDefinitionLegalStatusOfSupplyComponent)) 233 return false; 234 PackagedProductDefinitionLegalStatusOfSupplyComponent o = (PackagedProductDefinitionLegalStatusOfSupplyComponent) other_; 235 return compareDeep(code, o.code, true) && compareDeep(jurisdiction, o.jurisdiction, true); 236 } 237 238 @Override 239 public boolean equalsShallow(Base other_) { 240 if (!super.equalsShallow(other_)) 241 return false; 242 if (!(other_ instanceof PackagedProductDefinitionLegalStatusOfSupplyComponent)) 243 return false; 244 PackagedProductDefinitionLegalStatusOfSupplyComponent o = (PackagedProductDefinitionLegalStatusOfSupplyComponent) other_; 245 return true; 246 } 247 248 public boolean isEmpty() { 249 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, jurisdiction); 250 } 251 252 public String fhirType() { 253 return "PackagedProductDefinition.legalStatusOfSupply"; 254 255 } 256 257 } 258 259 @Block() 260 public static class PackagedProductDefinitionPackagingComponent extends BackboneElement implements IBaseBackboneElement { 261 /** 262 * A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode). 263 */ 264 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 265 @Description(shortDefinition="An identifier that is specific to this particular part of the packaging. Including possibly a Data Carrier Identifier", formalDefinition="A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode)." ) 266 protected List<Identifier> identifier; 267 268 /** 269 * The physical type of the container of the items. 270 */ 271 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 272 @Description(shortDefinition="The physical type of the container of the items", formalDefinition="The physical type of the container of the items." ) 273 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/packaging-type") 274 protected CodeableConcept type; 275 276 /** 277 * Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not. 278 */ 279 @Child(name = "componentPart", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) 280 @Description(shortDefinition="Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial)", formalDefinition="Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not." ) 281 protected BooleanType componentPart; 282 283 /** 284 * The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2. 285 */ 286 @Child(name = "quantity", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=true) 287 @Description(shortDefinition="The quantity of this level of packaging in the package that contains it (with the outermost level being 1)", formalDefinition="The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2." ) 288 protected IntegerType quantity; 289 290 /** 291 * Material type of the package item. 292 */ 293 @Child(name = "material", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 294 @Description(shortDefinition="Material type of the package item", formalDefinition="Material type of the package item." ) 295 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/package-material") 296 protected List<CodeableConcept> material; 297 298 /** 299 * A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve). 300 */ 301 @Child(name = "alternateMaterial", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 302 @Description(shortDefinition="A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material", formalDefinition="A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve)." ) 303 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/package-material") 304 protected List<CodeableConcept> alternateMaterial; 305 306 /** 307 * Shelf Life and storage information. 308 */ 309 @Child(name = "shelfLifeStorage", type = {ProductShelfLife.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 310 @Description(shortDefinition="Shelf Life and storage information", formalDefinition="Shelf Life and storage information." ) 311 protected List<ProductShelfLife> shelfLifeStorage; 312 313 /** 314 * Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item. 315 */ 316 @Child(name = "manufacturer", type = {Organization.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 317 @Description(shortDefinition="Manufacturer of this packaging item (multiple means these are all potential manufacturers)", formalDefinition="Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item." ) 318 protected List<Reference> manufacturer; 319 320 /** 321 * General characteristics of this item. 322 */ 323 @Child(name = "property", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 324 @Description(shortDefinition="General characteristics of this item", formalDefinition="General characteristics of this item." ) 325 protected List<PackagedProductDefinitionPackagingPropertyComponent> property; 326 327 /** 328 * The item(s) within the packaging. 329 */ 330 @Child(name = "containedItem", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 331 @Description(shortDefinition="The item(s) within the packaging", formalDefinition="The item(s) within the packaging." ) 332 protected List<PackagedProductDefinitionPackagingContainedItemComponent> containedItem; 333 334 /** 335 * Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition). 336 */ 337 @Child(name = "packaging", type = {PackagedProductDefinitionPackagingComponent.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 338 @Description(shortDefinition="Allows containers (and parts of containers) within containers, still as a part of single packaged product", formalDefinition="Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition)." ) 339 protected List<PackagedProductDefinitionPackagingComponent> packaging; 340 341 private static final long serialVersionUID = 2121836225L; 342 343 /** 344 * Constructor 345 */ 346 public PackagedProductDefinitionPackagingComponent() { 347 super(); 348 } 349 350 /** 351 * @return {@link #identifier} (A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode).) 352 */ 353 public List<Identifier> getIdentifier() { 354 if (this.identifier == null) 355 this.identifier = new ArrayList<Identifier>(); 356 return this.identifier; 357 } 358 359 /** 360 * @return Returns a reference to <code>this</code> for easy method chaining 361 */ 362 public PackagedProductDefinitionPackagingComponent setIdentifier(List<Identifier> theIdentifier) { 363 this.identifier = theIdentifier; 364 return this; 365 } 366 367 public boolean hasIdentifier() { 368 if (this.identifier == null) 369 return false; 370 for (Identifier item : this.identifier) 371 if (!item.isEmpty()) 372 return true; 373 return false; 374 } 375 376 public Identifier addIdentifier() { //3 377 Identifier t = new Identifier(); 378 if (this.identifier == null) 379 this.identifier = new ArrayList<Identifier>(); 380 this.identifier.add(t); 381 return t; 382 } 383 384 public PackagedProductDefinitionPackagingComponent addIdentifier(Identifier t) { //3 385 if (t == null) 386 return this; 387 if (this.identifier == null) 388 this.identifier = new ArrayList<Identifier>(); 389 this.identifier.add(t); 390 return this; 391 } 392 393 /** 394 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 395 */ 396 public Identifier getIdentifierFirstRep() { 397 if (getIdentifier().isEmpty()) { 398 addIdentifier(); 399 } 400 return getIdentifier().get(0); 401 } 402 403 /** 404 * @return {@link #type} (The physical type of the container of the items.) 405 */ 406 public CodeableConcept getType() { 407 if (this.type == null) 408 if (Configuration.errorOnAutoCreate()) 409 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingComponent.type"); 410 else if (Configuration.doAutoCreate()) 411 this.type = new CodeableConcept(); // cc 412 return this.type; 413 } 414 415 public boolean hasType() { 416 return this.type != null && !this.type.isEmpty(); 417 } 418 419 /** 420 * @param value {@link #type} (The physical type of the container of the items.) 421 */ 422 public PackagedProductDefinitionPackagingComponent setType(CodeableConcept value) { 423 this.type = value; 424 return this; 425 } 426 427 /** 428 * @return {@link #componentPart} (Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.). This is the underlying object with id, value and extensions. The accessor "getComponentPart" gives direct access to the value 429 */ 430 public BooleanType getComponentPartElement() { 431 if (this.componentPart == null) 432 if (Configuration.errorOnAutoCreate()) 433 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingComponent.componentPart"); 434 else if (Configuration.doAutoCreate()) 435 this.componentPart = new BooleanType(); // bb 436 return this.componentPart; 437 } 438 439 public boolean hasComponentPartElement() { 440 return this.componentPart != null && !this.componentPart.isEmpty(); 441 } 442 443 public boolean hasComponentPart() { 444 return this.componentPart != null && !this.componentPart.isEmpty(); 445 } 446 447 /** 448 * @param value {@link #componentPart} (Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.). This is the underlying object with id, value and extensions. The accessor "getComponentPart" gives direct access to the value 449 */ 450 public PackagedProductDefinitionPackagingComponent setComponentPartElement(BooleanType value) { 451 this.componentPart = value; 452 return this; 453 } 454 455 /** 456 * @return Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not. 457 */ 458 public boolean getComponentPart() { 459 return this.componentPart == null || this.componentPart.isEmpty() ? false : this.componentPart.getValue(); 460 } 461 462 /** 463 * @param value Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not. 464 */ 465 public PackagedProductDefinitionPackagingComponent setComponentPart(boolean value) { 466 if (this.componentPart == null) 467 this.componentPart = new BooleanType(); 468 this.componentPart.setValue(value); 469 return this; 470 } 471 472 /** 473 * @return {@link #quantity} (The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value 474 */ 475 public IntegerType getQuantityElement() { 476 if (this.quantity == null) 477 if (Configuration.errorOnAutoCreate()) 478 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingComponent.quantity"); 479 else if (Configuration.doAutoCreate()) 480 this.quantity = new IntegerType(); // bb 481 return this.quantity; 482 } 483 484 public boolean hasQuantityElement() { 485 return this.quantity != null && !this.quantity.isEmpty(); 486 } 487 488 public boolean hasQuantity() { 489 return this.quantity != null && !this.quantity.isEmpty(); 490 } 491 492 /** 493 * @param value {@link #quantity} (The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value 494 */ 495 public PackagedProductDefinitionPackagingComponent setQuantityElement(IntegerType value) { 496 this.quantity = value; 497 return this; 498 } 499 500 /** 501 * @return The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2. 502 */ 503 public int getQuantity() { 504 return this.quantity == null || this.quantity.isEmpty() ? 0 : this.quantity.getValue(); 505 } 506 507 /** 508 * @param value The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2. 509 */ 510 public PackagedProductDefinitionPackagingComponent setQuantity(int value) { 511 if (this.quantity == null) 512 this.quantity = new IntegerType(); 513 this.quantity.setValue(value); 514 return this; 515 } 516 517 /** 518 * @return {@link #material} (Material type of the package item.) 519 */ 520 public List<CodeableConcept> getMaterial() { 521 if (this.material == null) 522 this.material = new ArrayList<CodeableConcept>(); 523 return this.material; 524 } 525 526 /** 527 * @return Returns a reference to <code>this</code> for easy method chaining 528 */ 529 public PackagedProductDefinitionPackagingComponent setMaterial(List<CodeableConcept> theMaterial) { 530 this.material = theMaterial; 531 return this; 532 } 533 534 public boolean hasMaterial() { 535 if (this.material == null) 536 return false; 537 for (CodeableConcept item : this.material) 538 if (!item.isEmpty()) 539 return true; 540 return false; 541 } 542 543 public CodeableConcept addMaterial() { //3 544 CodeableConcept t = new CodeableConcept(); 545 if (this.material == null) 546 this.material = new ArrayList<CodeableConcept>(); 547 this.material.add(t); 548 return t; 549 } 550 551 public PackagedProductDefinitionPackagingComponent addMaterial(CodeableConcept t) { //3 552 if (t == null) 553 return this; 554 if (this.material == null) 555 this.material = new ArrayList<CodeableConcept>(); 556 this.material.add(t); 557 return this; 558 } 559 560 /** 561 * @return The first repetition of repeating field {@link #material}, creating it if it does not already exist {3} 562 */ 563 public CodeableConcept getMaterialFirstRep() { 564 if (getMaterial().isEmpty()) { 565 addMaterial(); 566 } 567 return getMaterial().get(0); 568 } 569 570 /** 571 * @return {@link #alternateMaterial} (A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).) 572 */ 573 public List<CodeableConcept> getAlternateMaterial() { 574 if (this.alternateMaterial == null) 575 this.alternateMaterial = new ArrayList<CodeableConcept>(); 576 return this.alternateMaterial; 577 } 578 579 /** 580 * @return Returns a reference to <code>this</code> for easy method chaining 581 */ 582 public PackagedProductDefinitionPackagingComponent setAlternateMaterial(List<CodeableConcept> theAlternateMaterial) { 583 this.alternateMaterial = theAlternateMaterial; 584 return this; 585 } 586 587 public boolean hasAlternateMaterial() { 588 if (this.alternateMaterial == null) 589 return false; 590 for (CodeableConcept item : this.alternateMaterial) 591 if (!item.isEmpty()) 592 return true; 593 return false; 594 } 595 596 public CodeableConcept addAlternateMaterial() { //3 597 CodeableConcept t = new CodeableConcept(); 598 if (this.alternateMaterial == null) 599 this.alternateMaterial = new ArrayList<CodeableConcept>(); 600 this.alternateMaterial.add(t); 601 return t; 602 } 603 604 public PackagedProductDefinitionPackagingComponent addAlternateMaterial(CodeableConcept t) { //3 605 if (t == null) 606 return this; 607 if (this.alternateMaterial == null) 608 this.alternateMaterial = new ArrayList<CodeableConcept>(); 609 this.alternateMaterial.add(t); 610 return this; 611 } 612 613 /** 614 * @return The first repetition of repeating field {@link #alternateMaterial}, creating it if it does not already exist {3} 615 */ 616 public CodeableConcept getAlternateMaterialFirstRep() { 617 if (getAlternateMaterial().isEmpty()) { 618 addAlternateMaterial(); 619 } 620 return getAlternateMaterial().get(0); 621 } 622 623 /** 624 * @return {@link #shelfLifeStorage} (Shelf Life and storage information.) 625 */ 626 public List<ProductShelfLife> getShelfLifeStorage() { 627 if (this.shelfLifeStorage == null) 628 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 629 return this.shelfLifeStorage; 630 } 631 632 /** 633 * @return Returns a reference to <code>this</code> for easy method chaining 634 */ 635 public PackagedProductDefinitionPackagingComponent setShelfLifeStorage(List<ProductShelfLife> theShelfLifeStorage) { 636 this.shelfLifeStorage = theShelfLifeStorage; 637 return this; 638 } 639 640 public boolean hasShelfLifeStorage() { 641 if (this.shelfLifeStorage == null) 642 return false; 643 for (ProductShelfLife item : this.shelfLifeStorage) 644 if (!item.isEmpty()) 645 return true; 646 return false; 647 } 648 649 public ProductShelfLife addShelfLifeStorage() { //3 650 ProductShelfLife t = new ProductShelfLife(); 651 if (this.shelfLifeStorage == null) 652 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 653 this.shelfLifeStorage.add(t); 654 return t; 655 } 656 657 public PackagedProductDefinitionPackagingComponent addShelfLifeStorage(ProductShelfLife t) { //3 658 if (t == null) 659 return this; 660 if (this.shelfLifeStorage == null) 661 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 662 this.shelfLifeStorage.add(t); 663 return this; 664 } 665 666 /** 667 * @return The first repetition of repeating field {@link #shelfLifeStorage}, creating it if it does not already exist {3} 668 */ 669 public ProductShelfLife getShelfLifeStorageFirstRep() { 670 if (getShelfLifeStorage().isEmpty()) { 671 addShelfLifeStorage(); 672 } 673 return getShelfLifeStorage().get(0); 674 } 675 676 /** 677 * @return {@link #manufacturer} (Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item.) 678 */ 679 public List<Reference> getManufacturer() { 680 if (this.manufacturer == null) 681 this.manufacturer = new ArrayList<Reference>(); 682 return this.manufacturer; 683 } 684 685 /** 686 * @return Returns a reference to <code>this</code> for easy method chaining 687 */ 688 public PackagedProductDefinitionPackagingComponent setManufacturer(List<Reference> theManufacturer) { 689 this.manufacturer = theManufacturer; 690 return this; 691 } 692 693 public boolean hasManufacturer() { 694 if (this.manufacturer == null) 695 return false; 696 for (Reference item : this.manufacturer) 697 if (!item.isEmpty()) 698 return true; 699 return false; 700 } 701 702 public Reference addManufacturer() { //3 703 Reference t = new Reference(); 704 if (this.manufacturer == null) 705 this.manufacturer = new ArrayList<Reference>(); 706 this.manufacturer.add(t); 707 return t; 708 } 709 710 public PackagedProductDefinitionPackagingComponent addManufacturer(Reference t) { //3 711 if (t == null) 712 return this; 713 if (this.manufacturer == null) 714 this.manufacturer = new ArrayList<Reference>(); 715 this.manufacturer.add(t); 716 return this; 717 } 718 719 /** 720 * @return The first repetition of repeating field {@link #manufacturer}, creating it if it does not already exist {3} 721 */ 722 public Reference getManufacturerFirstRep() { 723 if (getManufacturer().isEmpty()) { 724 addManufacturer(); 725 } 726 return getManufacturer().get(0); 727 } 728 729 /** 730 * @return {@link #property} (General characteristics of this item.) 731 */ 732 public List<PackagedProductDefinitionPackagingPropertyComponent> getProperty() { 733 if (this.property == null) 734 this.property = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 735 return this.property; 736 } 737 738 /** 739 * @return Returns a reference to <code>this</code> for easy method chaining 740 */ 741 public PackagedProductDefinitionPackagingComponent setProperty(List<PackagedProductDefinitionPackagingPropertyComponent> theProperty) { 742 this.property = theProperty; 743 return this; 744 } 745 746 public boolean hasProperty() { 747 if (this.property == null) 748 return false; 749 for (PackagedProductDefinitionPackagingPropertyComponent item : this.property) 750 if (!item.isEmpty()) 751 return true; 752 return false; 753 } 754 755 public PackagedProductDefinitionPackagingPropertyComponent addProperty() { //3 756 PackagedProductDefinitionPackagingPropertyComponent t = new PackagedProductDefinitionPackagingPropertyComponent(); 757 if (this.property == null) 758 this.property = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 759 this.property.add(t); 760 return t; 761 } 762 763 public PackagedProductDefinitionPackagingComponent addProperty(PackagedProductDefinitionPackagingPropertyComponent t) { //3 764 if (t == null) 765 return this; 766 if (this.property == null) 767 this.property = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 768 this.property.add(t); 769 return this; 770 } 771 772 /** 773 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3} 774 */ 775 public PackagedProductDefinitionPackagingPropertyComponent getPropertyFirstRep() { 776 if (getProperty().isEmpty()) { 777 addProperty(); 778 } 779 return getProperty().get(0); 780 } 781 782 /** 783 * @return {@link #containedItem} (The item(s) within the packaging.) 784 */ 785 public List<PackagedProductDefinitionPackagingContainedItemComponent> getContainedItem() { 786 if (this.containedItem == null) 787 this.containedItem = new ArrayList<PackagedProductDefinitionPackagingContainedItemComponent>(); 788 return this.containedItem; 789 } 790 791 /** 792 * @return Returns a reference to <code>this</code> for easy method chaining 793 */ 794 public PackagedProductDefinitionPackagingComponent setContainedItem(List<PackagedProductDefinitionPackagingContainedItemComponent> theContainedItem) { 795 this.containedItem = theContainedItem; 796 return this; 797 } 798 799 public boolean hasContainedItem() { 800 if (this.containedItem == null) 801 return false; 802 for (PackagedProductDefinitionPackagingContainedItemComponent item : this.containedItem) 803 if (!item.isEmpty()) 804 return true; 805 return false; 806 } 807 808 public PackagedProductDefinitionPackagingContainedItemComponent addContainedItem() { //3 809 PackagedProductDefinitionPackagingContainedItemComponent t = new PackagedProductDefinitionPackagingContainedItemComponent(); 810 if (this.containedItem == null) 811 this.containedItem = new ArrayList<PackagedProductDefinitionPackagingContainedItemComponent>(); 812 this.containedItem.add(t); 813 return t; 814 } 815 816 public PackagedProductDefinitionPackagingComponent addContainedItem(PackagedProductDefinitionPackagingContainedItemComponent t) { //3 817 if (t == null) 818 return this; 819 if (this.containedItem == null) 820 this.containedItem = new ArrayList<PackagedProductDefinitionPackagingContainedItemComponent>(); 821 this.containedItem.add(t); 822 return this; 823 } 824 825 /** 826 * @return The first repetition of repeating field {@link #containedItem}, creating it if it does not already exist {3} 827 */ 828 public PackagedProductDefinitionPackagingContainedItemComponent getContainedItemFirstRep() { 829 if (getContainedItem().isEmpty()) { 830 addContainedItem(); 831 } 832 return getContainedItem().get(0); 833 } 834 835 /** 836 * @return {@link #packaging} (Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition).) 837 */ 838 public List<PackagedProductDefinitionPackagingComponent> getPackaging() { 839 if (this.packaging == null) 840 this.packaging = new ArrayList<PackagedProductDefinitionPackagingComponent>(); 841 return this.packaging; 842 } 843 844 /** 845 * @return Returns a reference to <code>this</code> for easy method chaining 846 */ 847 public PackagedProductDefinitionPackagingComponent setPackaging(List<PackagedProductDefinitionPackagingComponent> thePackaging) { 848 this.packaging = thePackaging; 849 return this; 850 } 851 852 public boolean hasPackaging() { 853 if (this.packaging == null) 854 return false; 855 for (PackagedProductDefinitionPackagingComponent item : this.packaging) 856 if (!item.isEmpty()) 857 return true; 858 return false; 859 } 860 861 public PackagedProductDefinitionPackagingComponent addPackaging() { //3 862 PackagedProductDefinitionPackagingComponent t = new PackagedProductDefinitionPackagingComponent(); 863 if (this.packaging == null) 864 this.packaging = new ArrayList<PackagedProductDefinitionPackagingComponent>(); 865 this.packaging.add(t); 866 return t; 867 } 868 869 public PackagedProductDefinitionPackagingComponent addPackaging(PackagedProductDefinitionPackagingComponent t) { //3 870 if (t == null) 871 return this; 872 if (this.packaging == null) 873 this.packaging = new ArrayList<PackagedProductDefinitionPackagingComponent>(); 874 this.packaging.add(t); 875 return this; 876 } 877 878 /** 879 * @return The first repetition of repeating field {@link #packaging}, creating it if it does not already exist {3} 880 */ 881 public PackagedProductDefinitionPackagingComponent getPackagingFirstRep() { 882 if (getPackaging().isEmpty()) { 883 addPackaging(); 884 } 885 return getPackaging().get(0); 886 } 887 888 protected void listChildren(List<Property> children) { 889 super.listChildren(children); 890 children.add(new Property("identifier", "Identifier", "A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode).", 0, java.lang.Integer.MAX_VALUE, identifier)); 891 children.add(new Property("type", "CodeableConcept", "The physical type of the container of the items.", 0, 1, type)); 892 children.add(new Property("componentPart", "boolean", "Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.", 0, 1, componentPart)); 893 children.add(new Property("quantity", "integer", "The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.", 0, 1, quantity)); 894 children.add(new Property("material", "CodeableConcept", "Material type of the package item.", 0, java.lang.Integer.MAX_VALUE, material)); 895 children.add(new Property("alternateMaterial", "CodeableConcept", "A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).", 0, java.lang.Integer.MAX_VALUE, alternateMaterial)); 896 children.add(new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage)); 897 children.add(new Property("manufacturer", "Reference(Organization)", "Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); 898 children.add(new Property("property", "", "General characteristics of this item.", 0, java.lang.Integer.MAX_VALUE, property)); 899 children.add(new Property("containedItem", "", "The item(s) within the packaging.", 0, java.lang.Integer.MAX_VALUE, containedItem)); 900 children.add(new Property("packaging", "@PackagedProductDefinition.packaging", "Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition).", 0, java.lang.Integer.MAX_VALUE, packaging)); 901 } 902 903 @Override 904 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 905 switch (_hash) { 906 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode).", 0, java.lang.Integer.MAX_VALUE, identifier); 907 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The physical type of the container of the items.", 0, 1, type); 908 case 1706307216: /*componentPart*/ return new Property("componentPart", "boolean", "Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.", 0, 1, componentPart); 909 case -1285004149: /*quantity*/ return new Property("quantity", "integer", "The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.", 0, 1, quantity); 910 case 299066663: /*material*/ return new Property("material", "CodeableConcept", "Material type of the package item.", 0, java.lang.Integer.MAX_VALUE, material); 911 case -1021448255: /*alternateMaterial*/ return new Property("alternateMaterial", "CodeableConcept", "A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).", 0, java.lang.Integer.MAX_VALUE, alternateMaterial); 912 case 172049237: /*shelfLifeStorage*/ return new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage); 913 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "Reference(Organization)", "Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item.", 0, java.lang.Integer.MAX_VALUE, manufacturer); 914 case -993141291: /*property*/ return new Property("property", "", "General characteristics of this item.", 0, java.lang.Integer.MAX_VALUE, property); 915 case 1953679910: /*containedItem*/ return new Property("containedItem", "", "The item(s) within the packaging.", 0, java.lang.Integer.MAX_VALUE, containedItem); 916 case 1802065795: /*packaging*/ return new Property("packaging", "@PackagedProductDefinition.packaging", "Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition).", 0, java.lang.Integer.MAX_VALUE, packaging); 917 default: return super.getNamedProperty(_hash, _name, _checkValid); 918 } 919 920 } 921 922 @Override 923 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 924 switch (hash) { 925 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 926 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 927 case 1706307216: /*componentPart*/ return this.componentPart == null ? new Base[0] : new Base[] {this.componentPart}; // BooleanType 928 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // IntegerType 929 case 299066663: /*material*/ return this.material == null ? new Base[0] : this.material.toArray(new Base[this.material.size()]); // CodeableConcept 930 case -1021448255: /*alternateMaterial*/ return this.alternateMaterial == null ? new Base[0] : this.alternateMaterial.toArray(new Base[this.alternateMaterial.size()]); // CodeableConcept 931 case 172049237: /*shelfLifeStorage*/ return this.shelfLifeStorage == null ? new Base[0] : this.shelfLifeStorage.toArray(new Base[this.shelfLifeStorage.size()]); // ProductShelfLife 932 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : this.manufacturer.toArray(new Base[this.manufacturer.size()]); // Reference 933 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // PackagedProductDefinitionPackagingPropertyComponent 934 case 1953679910: /*containedItem*/ return this.containedItem == null ? new Base[0] : this.containedItem.toArray(new Base[this.containedItem.size()]); // PackagedProductDefinitionPackagingContainedItemComponent 935 case 1802065795: /*packaging*/ return this.packaging == null ? new Base[0] : this.packaging.toArray(new Base[this.packaging.size()]); // PackagedProductDefinitionPackagingComponent 936 default: return super.getProperty(hash, name, checkValid); 937 } 938 939 } 940 941 @Override 942 public Base setProperty(int hash, String name, Base value) throws FHIRException { 943 switch (hash) { 944 case -1618432855: // identifier 945 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 946 return value; 947 case 3575610: // type 948 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 949 return value; 950 case 1706307216: // componentPart 951 this.componentPart = TypeConvertor.castToBoolean(value); // BooleanType 952 return value; 953 case -1285004149: // quantity 954 this.quantity = TypeConvertor.castToInteger(value); // IntegerType 955 return value; 956 case 299066663: // material 957 this.getMaterial().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 958 return value; 959 case -1021448255: // alternateMaterial 960 this.getAlternateMaterial().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 961 return value; 962 case 172049237: // shelfLifeStorage 963 this.getShelfLifeStorage().add(TypeConvertor.castToProductShelfLife(value)); // ProductShelfLife 964 return value; 965 case -1969347631: // manufacturer 966 this.getManufacturer().add(TypeConvertor.castToReference(value)); // Reference 967 return value; 968 case -993141291: // property 969 this.getProperty().add((PackagedProductDefinitionPackagingPropertyComponent) value); // PackagedProductDefinitionPackagingPropertyComponent 970 return value; 971 case 1953679910: // containedItem 972 this.getContainedItem().add((PackagedProductDefinitionPackagingContainedItemComponent) value); // PackagedProductDefinitionPackagingContainedItemComponent 973 return value; 974 case 1802065795: // packaging 975 this.getPackaging().add((PackagedProductDefinitionPackagingComponent) value); // PackagedProductDefinitionPackagingComponent 976 return value; 977 default: return super.setProperty(hash, name, value); 978 } 979 980 } 981 982 @Override 983 public Base setProperty(String name, Base value) throws FHIRException { 984 if (name.equals("identifier")) { 985 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 986 } else if (name.equals("type")) { 987 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 988 } else if (name.equals("componentPart")) { 989 this.componentPart = TypeConvertor.castToBoolean(value); // BooleanType 990 } else if (name.equals("quantity")) { 991 this.quantity = TypeConvertor.castToInteger(value); // IntegerType 992 } else if (name.equals("material")) { 993 this.getMaterial().add(TypeConvertor.castToCodeableConcept(value)); 994 } else if (name.equals("alternateMaterial")) { 995 this.getAlternateMaterial().add(TypeConvertor.castToCodeableConcept(value)); 996 } else if (name.equals("shelfLifeStorage")) { 997 this.getShelfLifeStorage().add(TypeConvertor.castToProductShelfLife(value)); 998 } else if (name.equals("manufacturer")) { 999 this.getManufacturer().add(TypeConvertor.castToReference(value)); 1000 } else if (name.equals("property")) { 1001 this.getProperty().add((PackagedProductDefinitionPackagingPropertyComponent) value); 1002 } else if (name.equals("containedItem")) { 1003 this.getContainedItem().add((PackagedProductDefinitionPackagingContainedItemComponent) value); 1004 } else if (name.equals("packaging")) { 1005 this.getPackaging().add((PackagedProductDefinitionPackagingComponent) value); 1006 } else 1007 return super.setProperty(name, value); 1008 return value; 1009 } 1010 1011 @Override 1012 public Base makeProperty(int hash, String name) throws FHIRException { 1013 switch (hash) { 1014 case -1618432855: return addIdentifier(); 1015 case 3575610: return getType(); 1016 case 1706307216: return getComponentPartElement(); 1017 case -1285004149: return getQuantityElement(); 1018 case 299066663: return addMaterial(); 1019 case -1021448255: return addAlternateMaterial(); 1020 case 172049237: return addShelfLifeStorage(); 1021 case -1969347631: return addManufacturer(); 1022 case -993141291: return addProperty(); 1023 case 1953679910: return addContainedItem(); 1024 case 1802065795: return addPackaging(); 1025 default: return super.makeProperty(hash, name); 1026 } 1027 1028 } 1029 1030 @Override 1031 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1032 switch (hash) { 1033 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1034 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1035 case 1706307216: /*componentPart*/ return new String[] {"boolean"}; 1036 case -1285004149: /*quantity*/ return new String[] {"integer"}; 1037 case 299066663: /*material*/ return new String[] {"CodeableConcept"}; 1038 case -1021448255: /*alternateMaterial*/ return new String[] {"CodeableConcept"}; 1039 case 172049237: /*shelfLifeStorage*/ return new String[] {"ProductShelfLife"}; 1040 case -1969347631: /*manufacturer*/ return new String[] {"Reference"}; 1041 case -993141291: /*property*/ return new String[] {}; 1042 case 1953679910: /*containedItem*/ return new String[] {}; 1043 case 1802065795: /*packaging*/ return new String[] {"@PackagedProductDefinition.packaging"}; 1044 default: return super.getTypesForProperty(hash, name); 1045 } 1046 1047 } 1048 1049 @Override 1050 public Base addChild(String name) throws FHIRException { 1051 if (name.equals("identifier")) { 1052 return addIdentifier(); 1053 } 1054 else if (name.equals("type")) { 1055 this.type = new CodeableConcept(); 1056 return this.type; 1057 } 1058 else if (name.equals("componentPart")) { 1059 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.packaging.componentPart"); 1060 } 1061 else if (name.equals("quantity")) { 1062 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.packaging.quantity"); 1063 } 1064 else if (name.equals("material")) { 1065 return addMaterial(); 1066 } 1067 else if (name.equals("alternateMaterial")) { 1068 return addAlternateMaterial(); 1069 } 1070 else if (name.equals("shelfLifeStorage")) { 1071 return addShelfLifeStorage(); 1072 } 1073 else if (name.equals("manufacturer")) { 1074 return addManufacturer(); 1075 } 1076 else if (name.equals("property")) { 1077 return addProperty(); 1078 } 1079 else if (name.equals("containedItem")) { 1080 return addContainedItem(); 1081 } 1082 else if (name.equals("packaging")) { 1083 return addPackaging(); 1084 } 1085 else 1086 return super.addChild(name); 1087 } 1088 1089 public PackagedProductDefinitionPackagingComponent copy() { 1090 PackagedProductDefinitionPackagingComponent dst = new PackagedProductDefinitionPackagingComponent(); 1091 copyValues(dst); 1092 return dst; 1093 } 1094 1095 public void copyValues(PackagedProductDefinitionPackagingComponent dst) { 1096 super.copyValues(dst); 1097 if (identifier != null) { 1098 dst.identifier = new ArrayList<Identifier>(); 1099 for (Identifier i : identifier) 1100 dst.identifier.add(i.copy()); 1101 }; 1102 dst.type = type == null ? null : type.copy(); 1103 dst.componentPart = componentPart == null ? null : componentPart.copy(); 1104 dst.quantity = quantity == null ? null : quantity.copy(); 1105 if (material != null) { 1106 dst.material = new ArrayList<CodeableConcept>(); 1107 for (CodeableConcept i : material) 1108 dst.material.add(i.copy()); 1109 }; 1110 if (alternateMaterial != null) { 1111 dst.alternateMaterial = new ArrayList<CodeableConcept>(); 1112 for (CodeableConcept i : alternateMaterial) 1113 dst.alternateMaterial.add(i.copy()); 1114 }; 1115 if (shelfLifeStorage != null) { 1116 dst.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 1117 for (ProductShelfLife i : shelfLifeStorage) 1118 dst.shelfLifeStorage.add(i.copy()); 1119 }; 1120 if (manufacturer != null) { 1121 dst.manufacturer = new ArrayList<Reference>(); 1122 for (Reference i : manufacturer) 1123 dst.manufacturer.add(i.copy()); 1124 }; 1125 if (property != null) { 1126 dst.property = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 1127 for (PackagedProductDefinitionPackagingPropertyComponent i : property) 1128 dst.property.add(i.copy()); 1129 }; 1130 if (containedItem != null) { 1131 dst.containedItem = new ArrayList<PackagedProductDefinitionPackagingContainedItemComponent>(); 1132 for (PackagedProductDefinitionPackagingContainedItemComponent i : containedItem) 1133 dst.containedItem.add(i.copy()); 1134 }; 1135 if (packaging != null) { 1136 dst.packaging = new ArrayList<PackagedProductDefinitionPackagingComponent>(); 1137 for (PackagedProductDefinitionPackagingComponent i : packaging) 1138 dst.packaging.add(i.copy()); 1139 }; 1140 } 1141 1142 @Override 1143 public boolean equalsDeep(Base other_) { 1144 if (!super.equalsDeep(other_)) 1145 return false; 1146 if (!(other_ instanceof PackagedProductDefinitionPackagingComponent)) 1147 return false; 1148 PackagedProductDefinitionPackagingComponent o = (PackagedProductDefinitionPackagingComponent) other_; 1149 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(componentPart, o.componentPart, true) 1150 && compareDeep(quantity, o.quantity, true) && compareDeep(material, o.material, true) && compareDeep(alternateMaterial, o.alternateMaterial, true) 1151 && compareDeep(shelfLifeStorage, o.shelfLifeStorage, true) && compareDeep(manufacturer, o.manufacturer, true) 1152 && compareDeep(property, o.property, true) && compareDeep(containedItem, o.containedItem, true) 1153 && compareDeep(packaging, o.packaging, true); 1154 } 1155 1156 @Override 1157 public boolean equalsShallow(Base other_) { 1158 if (!super.equalsShallow(other_)) 1159 return false; 1160 if (!(other_ instanceof PackagedProductDefinitionPackagingComponent)) 1161 return false; 1162 PackagedProductDefinitionPackagingComponent o = (PackagedProductDefinitionPackagingComponent) other_; 1163 return compareValues(componentPart, o.componentPart, true) && compareValues(quantity, o.quantity, true) 1164 ; 1165 } 1166 1167 public boolean isEmpty() { 1168 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, componentPart 1169 , quantity, material, alternateMaterial, shelfLifeStorage, manufacturer, property 1170 , containedItem, packaging); 1171 } 1172 1173 public String fhirType() { 1174 return "PackagedProductDefinition.packaging"; 1175 1176 } 1177 1178 } 1179 1180 @Block() 1181 public static class PackagedProductDefinitionPackagingPropertyComponent extends BackboneElement implements IBaseBackboneElement { 1182 /** 1183 * A code expressing the type of characteristic. 1184 */ 1185 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 1186 @Description(shortDefinition="A code expressing the type of characteristic", formalDefinition="A code expressing the type of characteristic." ) 1187 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/product-characteristic-codes") 1188 protected CodeableConcept type; 1189 1190 /** 1191 * A value for the characteristic. 1192 */ 1193 @Child(name = "value", type = {CodeableConcept.class, Quantity.class, DateType.class, BooleanType.class, Attachment.class}, order=2, min=0, max=1, modifier=false, summary=true) 1194 @Description(shortDefinition="A value for the characteristic", formalDefinition="A value for the characteristic." ) 1195 protected DataType value; 1196 1197 private static final long serialVersionUID = -1659186716L; 1198 1199 /** 1200 * Constructor 1201 */ 1202 public PackagedProductDefinitionPackagingPropertyComponent() { 1203 super(); 1204 } 1205 1206 /** 1207 * Constructor 1208 */ 1209 public PackagedProductDefinitionPackagingPropertyComponent(CodeableConcept type) { 1210 super(); 1211 this.setType(type); 1212 } 1213 1214 /** 1215 * @return {@link #type} (A code expressing the type of characteristic.) 1216 */ 1217 public CodeableConcept getType() { 1218 if (this.type == null) 1219 if (Configuration.errorOnAutoCreate()) 1220 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingPropertyComponent.type"); 1221 else if (Configuration.doAutoCreate()) 1222 this.type = new CodeableConcept(); // cc 1223 return this.type; 1224 } 1225 1226 public boolean hasType() { 1227 return this.type != null && !this.type.isEmpty(); 1228 } 1229 1230 /** 1231 * @param value {@link #type} (A code expressing the type of characteristic.) 1232 */ 1233 public PackagedProductDefinitionPackagingPropertyComponent setType(CodeableConcept value) { 1234 this.type = value; 1235 return this; 1236 } 1237 1238 /** 1239 * @return {@link #value} (A value for the characteristic.) 1240 */ 1241 public DataType getValue() { 1242 return this.value; 1243 } 1244 1245 /** 1246 * @return {@link #value} (A value for the characteristic.) 1247 */ 1248 public CodeableConcept getValueCodeableConcept() throws FHIRException { 1249 if (this.value == null) 1250 this.value = new CodeableConcept(); 1251 if (!(this.value instanceof CodeableConcept)) 1252 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 1253 return (CodeableConcept) this.value; 1254 } 1255 1256 public boolean hasValueCodeableConcept() { 1257 return this != null && this.value instanceof CodeableConcept; 1258 } 1259 1260 /** 1261 * @return {@link #value} (A value for the characteristic.) 1262 */ 1263 public Quantity getValueQuantity() throws FHIRException { 1264 if (this.value == null) 1265 this.value = new Quantity(); 1266 if (!(this.value instanceof Quantity)) 1267 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 1268 return (Quantity) this.value; 1269 } 1270 1271 public boolean hasValueQuantity() { 1272 return this != null && this.value instanceof Quantity; 1273 } 1274 1275 /** 1276 * @return {@link #value} (A value for the characteristic.) 1277 */ 1278 public DateType getValueDateType() throws FHIRException { 1279 if (this.value == null) 1280 this.value = new DateType(); 1281 if (!(this.value instanceof DateType)) 1282 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 1283 return (DateType) this.value; 1284 } 1285 1286 public boolean hasValueDateType() { 1287 return this != null && this.value instanceof DateType; 1288 } 1289 1290 /** 1291 * @return {@link #value} (A value for the characteristic.) 1292 */ 1293 public BooleanType getValueBooleanType() throws FHIRException { 1294 if (this.value == null) 1295 this.value = new BooleanType(); 1296 if (!(this.value instanceof BooleanType)) 1297 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 1298 return (BooleanType) this.value; 1299 } 1300 1301 public boolean hasValueBooleanType() { 1302 return this != null && this.value instanceof BooleanType; 1303 } 1304 1305 /** 1306 * @return {@link #value} (A value for the characteristic.) 1307 */ 1308 public Attachment getValueAttachment() throws FHIRException { 1309 if (this.value == null) 1310 this.value = new Attachment(); 1311 if (!(this.value instanceof Attachment)) 1312 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 1313 return (Attachment) this.value; 1314 } 1315 1316 public boolean hasValueAttachment() { 1317 return this != null && this.value instanceof Attachment; 1318 } 1319 1320 public boolean hasValue() { 1321 return this.value != null && !this.value.isEmpty(); 1322 } 1323 1324 /** 1325 * @param value {@link #value} (A value for the characteristic.) 1326 */ 1327 public PackagedProductDefinitionPackagingPropertyComponent setValue(DataType value) { 1328 if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity || value instanceof DateType || value instanceof BooleanType || value instanceof Attachment)) 1329 throw new FHIRException("Not the right type for PackagedProductDefinition.packaging.property.value[x]: "+value.fhirType()); 1330 this.value = value; 1331 return this; 1332 } 1333 1334 protected void listChildren(List<Property> children) { 1335 super.listChildren(children); 1336 children.add(new Property("type", "CodeableConcept", "A code expressing the type of characteristic.", 0, 1, type)); 1337 children.add(new Property("value[x]", "CodeableConcept|Quantity|date|boolean|Attachment", "A value for the characteristic.", 0, 1, value)); 1338 } 1339 1340 @Override 1341 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1342 switch (_hash) { 1343 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A code expressing the type of characteristic.", 0, 1, type); 1344 case -1410166417: /*value[x]*/ return new Property("value[x]", "CodeableConcept|Quantity|date|boolean|Attachment", "A value for the characteristic.", 0, 1, value); 1345 case 111972721: /*value*/ return new Property("value[x]", "CodeableConcept|Quantity|date|boolean|Attachment", "A value for the characteristic.", 0, 1, value); 1346 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "A value for the characteristic.", 0, 1, value); 1347 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "A value for the characteristic.", 0, 1, value); 1348 case -766192449: /*valueDate*/ return new Property("value[x]", "date", "A value for the characteristic.", 0, 1, value); 1349 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "A value for the characteristic.", 0, 1, value); 1350 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "A value for the characteristic.", 0, 1, value); 1351 default: return super.getNamedProperty(_hash, _name, _checkValid); 1352 } 1353 1354 } 1355 1356 @Override 1357 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1358 switch (hash) { 1359 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1360 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 1361 default: return super.getProperty(hash, name, checkValid); 1362 } 1363 1364 } 1365 1366 @Override 1367 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1368 switch (hash) { 1369 case 3575610: // type 1370 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1371 return value; 1372 case 111972721: // value 1373 this.value = TypeConvertor.castToType(value); // DataType 1374 return value; 1375 default: return super.setProperty(hash, name, value); 1376 } 1377 1378 } 1379 1380 @Override 1381 public Base setProperty(String name, Base value) throws FHIRException { 1382 if (name.equals("type")) { 1383 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1384 } else if (name.equals("value[x]")) { 1385 this.value = TypeConvertor.castToType(value); // DataType 1386 } else 1387 return super.setProperty(name, value); 1388 return value; 1389 } 1390 1391 @Override 1392 public Base makeProperty(int hash, String name) throws FHIRException { 1393 switch (hash) { 1394 case 3575610: return getType(); 1395 case -1410166417: return getValue(); 1396 case 111972721: return getValue(); 1397 default: return super.makeProperty(hash, name); 1398 } 1399 1400 } 1401 1402 @Override 1403 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1404 switch (hash) { 1405 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1406 case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity", "date", "boolean", "Attachment"}; 1407 default: return super.getTypesForProperty(hash, name); 1408 } 1409 1410 } 1411 1412 @Override 1413 public Base addChild(String name) throws FHIRException { 1414 if (name.equals("type")) { 1415 this.type = new CodeableConcept(); 1416 return this.type; 1417 } 1418 else if (name.equals("valueCodeableConcept")) { 1419 this.value = new CodeableConcept(); 1420 return this.value; 1421 } 1422 else if (name.equals("valueQuantity")) { 1423 this.value = new Quantity(); 1424 return this.value; 1425 } 1426 else if (name.equals("valueDate")) { 1427 this.value = new DateType(); 1428 return this.value; 1429 } 1430 else if (name.equals("valueBoolean")) { 1431 this.value = new BooleanType(); 1432 return this.value; 1433 } 1434 else if (name.equals("valueAttachment")) { 1435 this.value = new Attachment(); 1436 return this.value; 1437 } 1438 else 1439 return super.addChild(name); 1440 } 1441 1442 public PackagedProductDefinitionPackagingPropertyComponent copy() { 1443 PackagedProductDefinitionPackagingPropertyComponent dst = new PackagedProductDefinitionPackagingPropertyComponent(); 1444 copyValues(dst); 1445 return dst; 1446 } 1447 1448 public void copyValues(PackagedProductDefinitionPackagingPropertyComponent dst) { 1449 super.copyValues(dst); 1450 dst.type = type == null ? null : type.copy(); 1451 dst.value = value == null ? null : value.copy(); 1452 } 1453 1454 @Override 1455 public boolean equalsDeep(Base other_) { 1456 if (!super.equalsDeep(other_)) 1457 return false; 1458 if (!(other_ instanceof PackagedProductDefinitionPackagingPropertyComponent)) 1459 return false; 1460 PackagedProductDefinitionPackagingPropertyComponent o = (PackagedProductDefinitionPackagingPropertyComponent) other_; 1461 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 1462 } 1463 1464 @Override 1465 public boolean equalsShallow(Base other_) { 1466 if (!super.equalsShallow(other_)) 1467 return false; 1468 if (!(other_ instanceof PackagedProductDefinitionPackagingPropertyComponent)) 1469 return false; 1470 PackagedProductDefinitionPackagingPropertyComponent o = (PackagedProductDefinitionPackagingPropertyComponent) other_; 1471 return true; 1472 } 1473 1474 public boolean isEmpty() { 1475 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 1476 } 1477 1478 public String fhirType() { 1479 return "PackagedProductDefinition.packaging.property"; 1480 1481 } 1482 1483 } 1484 1485 @Block() 1486 public static class PackagedProductDefinitionPackagingContainedItemComponent extends BackboneElement implements IBaseBackboneElement { 1487 /** 1488 * The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging). 1489 */ 1490 @Child(name = "item", type = {CodeableReference.class}, order=1, min=1, max=1, modifier=false, summary=true) 1491 @Description(shortDefinition="The actual item(s) of medication, as manufactured, or a device, or other medically related item (food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package", formalDefinition="The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging)." ) 1492 protected CodeableReference item; 1493 1494 /** 1495 * The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition). 1496 */ 1497 @Child(name = "amount", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=true) 1498 @Description(shortDefinition="The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition)", formalDefinition="The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition)." ) 1499 protected Quantity amount; 1500 1501 private static final long serialVersionUID = 443863028L; 1502 1503 /** 1504 * Constructor 1505 */ 1506 public PackagedProductDefinitionPackagingContainedItemComponent() { 1507 super(); 1508 } 1509 1510 /** 1511 * Constructor 1512 */ 1513 public PackagedProductDefinitionPackagingContainedItemComponent(CodeableReference item) { 1514 super(); 1515 this.setItem(item); 1516 } 1517 1518 /** 1519 * @return {@link #item} (The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).) 1520 */ 1521 public CodeableReference getItem() { 1522 if (this.item == null) 1523 if (Configuration.errorOnAutoCreate()) 1524 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingContainedItemComponent.item"); 1525 else if (Configuration.doAutoCreate()) 1526 this.item = new CodeableReference(); // cc 1527 return this.item; 1528 } 1529 1530 public boolean hasItem() { 1531 return this.item != null && !this.item.isEmpty(); 1532 } 1533 1534 /** 1535 * @param value {@link #item} (The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).) 1536 */ 1537 public PackagedProductDefinitionPackagingContainedItemComponent setItem(CodeableReference value) { 1538 this.item = value; 1539 return this; 1540 } 1541 1542 /** 1543 * @return {@link #amount} (The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).) 1544 */ 1545 public Quantity getAmount() { 1546 if (this.amount == null) 1547 if (Configuration.errorOnAutoCreate()) 1548 throw new Error("Attempt to auto-create PackagedProductDefinitionPackagingContainedItemComponent.amount"); 1549 else if (Configuration.doAutoCreate()) 1550 this.amount = new Quantity(); // cc 1551 return this.amount; 1552 } 1553 1554 public boolean hasAmount() { 1555 return this.amount != null && !this.amount.isEmpty(); 1556 } 1557 1558 /** 1559 * @param value {@link #amount} (The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).) 1560 */ 1561 public PackagedProductDefinitionPackagingContainedItemComponent setAmount(Quantity value) { 1562 this.amount = value; 1563 return this; 1564 } 1565 1566 protected void listChildren(List<Property> children) { 1567 super.listChildren(children); 1568 children.add(new Property("item", "CodeableReference(ManufacturedItemDefinition|DeviceDefinition|PackagedProductDefinition|BiologicallyDerivedProduct|NutritionProduct)", "The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).", 0, 1, item)); 1569 children.add(new Property("amount", "Quantity", "The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).", 0, 1, amount)); 1570 } 1571 1572 @Override 1573 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1574 switch (_hash) { 1575 case 3242771: /*item*/ return new Property("item", "CodeableReference(ManufacturedItemDefinition|DeviceDefinition|PackagedProductDefinition|BiologicallyDerivedProduct|NutritionProduct)", "The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).", 0, 1, item); 1576 case -1413853096: /*amount*/ return new Property("amount", "Quantity", "The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).", 0, 1, amount); 1577 default: return super.getNamedProperty(_hash, _name, _checkValid); 1578 } 1579 1580 } 1581 1582 @Override 1583 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1584 switch (hash) { 1585 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableReference 1586 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Quantity 1587 default: return super.getProperty(hash, name, checkValid); 1588 } 1589 1590 } 1591 1592 @Override 1593 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1594 switch (hash) { 1595 case 3242771: // item 1596 this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference 1597 return value; 1598 case -1413853096: // amount 1599 this.amount = TypeConvertor.castToQuantity(value); // Quantity 1600 return value; 1601 default: return super.setProperty(hash, name, value); 1602 } 1603 1604 } 1605 1606 @Override 1607 public Base setProperty(String name, Base value) throws FHIRException { 1608 if (name.equals("item")) { 1609 this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference 1610 } else if (name.equals("amount")) { 1611 this.amount = TypeConvertor.castToQuantity(value); // Quantity 1612 } else 1613 return super.setProperty(name, value); 1614 return value; 1615 } 1616 1617 @Override 1618 public Base makeProperty(int hash, String name) throws FHIRException { 1619 switch (hash) { 1620 case 3242771: return getItem(); 1621 case -1413853096: return getAmount(); 1622 default: return super.makeProperty(hash, name); 1623 } 1624 1625 } 1626 1627 @Override 1628 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1629 switch (hash) { 1630 case 3242771: /*item*/ return new String[] {"CodeableReference"}; 1631 case -1413853096: /*amount*/ return new String[] {"Quantity"}; 1632 default: return super.getTypesForProperty(hash, name); 1633 } 1634 1635 } 1636 1637 @Override 1638 public Base addChild(String name) throws FHIRException { 1639 if (name.equals("item")) { 1640 this.item = new CodeableReference(); 1641 return this.item; 1642 } 1643 else if (name.equals("amount")) { 1644 this.amount = new Quantity(); 1645 return this.amount; 1646 } 1647 else 1648 return super.addChild(name); 1649 } 1650 1651 public PackagedProductDefinitionPackagingContainedItemComponent copy() { 1652 PackagedProductDefinitionPackagingContainedItemComponent dst = new PackagedProductDefinitionPackagingContainedItemComponent(); 1653 copyValues(dst); 1654 return dst; 1655 } 1656 1657 public void copyValues(PackagedProductDefinitionPackagingContainedItemComponent dst) { 1658 super.copyValues(dst); 1659 dst.item = item == null ? null : item.copy(); 1660 dst.amount = amount == null ? null : amount.copy(); 1661 } 1662 1663 @Override 1664 public boolean equalsDeep(Base other_) { 1665 if (!super.equalsDeep(other_)) 1666 return false; 1667 if (!(other_ instanceof PackagedProductDefinitionPackagingContainedItemComponent)) 1668 return false; 1669 PackagedProductDefinitionPackagingContainedItemComponent o = (PackagedProductDefinitionPackagingContainedItemComponent) other_; 1670 return compareDeep(item, o.item, true) && compareDeep(amount, o.amount, true); 1671 } 1672 1673 @Override 1674 public boolean equalsShallow(Base other_) { 1675 if (!super.equalsShallow(other_)) 1676 return false; 1677 if (!(other_ instanceof PackagedProductDefinitionPackagingContainedItemComponent)) 1678 return false; 1679 PackagedProductDefinitionPackagingContainedItemComponent o = (PackagedProductDefinitionPackagingContainedItemComponent) other_; 1680 return true; 1681 } 1682 1683 public boolean isEmpty() { 1684 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, amount); 1685 } 1686 1687 public String fhirType() { 1688 return "PackagedProductDefinition.packaging.containedItem"; 1689 1690 } 1691 1692 } 1693 1694 /** 1695 * A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations. 1696 */ 1697 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1698 @Description(shortDefinition="A unique identifier for this package as whole - not for the content of the package", formalDefinition="A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations." ) 1699 protected List<Identifier> identifier; 1700 1701 /** 1702 * A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc. 1703 */ 1704 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 1705 @Description(shortDefinition="A name for this package. Typically as listed in a drug formulary, catalogue, inventory etc", formalDefinition="A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc." ) 1706 protected StringType name; 1707 1708 /** 1709 * A high level category e.g. medicinal product, raw material, shipping/transport container, etc. 1710 */ 1711 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 1712 @Description(shortDefinition="A high level category e.g. medicinal product, raw material, shipping container etc", formalDefinition="A high level category e.g. medicinal product, raw material, shipping/transport container, etc." ) 1713 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/package-type") 1714 protected CodeableConcept type; 1715 1716 /** 1717 * The product this package model relates to, not the contents of the package (for which see package.containedItem). 1718 */ 1719 @Child(name = "packageFor", type = {MedicinalProductDefinition.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1720 @Description(shortDefinition="The product that this is a pack for", formalDefinition="The product this package model relates to, not the contents of the package (for which see package.containedItem)." ) 1721 protected List<Reference> packageFor; 1722 1723 /** 1724 * The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status. 1725 */ 1726 @Child(name = "status", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=true, summary=true) 1727 @Description(shortDefinition="The status within the lifecycle of this item. High level - not intended to duplicate details elsewhere e.g. legal status, or authorization/marketing status", formalDefinition="The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status." ) 1728 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 1729 protected CodeableConcept status; 1730 1731 /** 1732 * The date at which the given status became applicable. 1733 */ 1734 @Child(name = "statusDate", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1735 @Description(shortDefinition="The date at which the given status became applicable", formalDefinition="The date at which the given status became applicable." ) 1736 protected DateTimeType statusDate; 1737 1738 /** 1739 * A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource. 1740 */ 1741 @Child(name = "containedItemQuantity", type = {Quantity.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1742 @Description(shortDefinition="A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. See also packaging.containedItem.amount (especially the long definition)", formalDefinition="A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource." ) 1743 protected List<Quantity> containedItemQuantity; 1744 1745 /** 1746 * Textual description. Note that this is not the name of the package or product. 1747 */ 1748 @Child(name = "description", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1749 @Description(shortDefinition="Textual description. Note that this is not the name of the package or product", formalDefinition="Textual description. Note that this is not the name of the package or product." ) 1750 protected MarkdownType description; 1751 1752 /** 1753 * The legal status of supply of the packaged item as classified by the regulator. 1754 */ 1755 @Child(name = "legalStatusOfSupply", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1756 @Description(shortDefinition="The legal status of supply of the packaged item as classified by the regulator", formalDefinition="The legal status of supply of the packaged item as classified by the regulator." ) 1757 protected List<PackagedProductDefinitionLegalStatusOfSupplyComponent> legalStatusOfSupply; 1758 1759 /** 1760 * Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated. 1761 */ 1762 @Child(name = "marketingStatus", type = {MarketingStatus.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1763 @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." ) 1764 protected List<MarketingStatus> marketingStatus; 1765 1766 /** 1767 * Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant. 1768 */ 1769 @Child(name = "copackagedIndicator", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=true) 1770 @Description(shortDefinition="Identifies if the drug product is supplied with another item such as a diluent or adjuvant", formalDefinition="Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant." ) 1771 protected BooleanType copackagedIndicator; 1772 1773 /** 1774 * Manufacturer of this package type. When there are multiple it means these are all possible manufacturers. 1775 */ 1776 @Child(name = "manufacturer", type = {Organization.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1777 @Description(shortDefinition="Manufacturer of this package type (multiple means these are all possible manufacturers)", formalDefinition="Manufacturer of this package type. When there are multiple it means these are all possible manufacturers." ) 1778 protected List<Reference> manufacturer; 1779 1780 /** 1781 * Additional information or supporting documentation about the packaged product. 1782 */ 1783 @Child(name = "attachedDocument", type = {DocumentReference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1784 @Description(shortDefinition="Additional information or supporting documentation about the packaged product", formalDefinition="Additional information or supporting documentation about the packaged product." ) 1785 protected List<Reference> attachedDocument; 1786 1787 /** 1788 * A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item). 1789 */ 1790 @Child(name = "packaging", type = {}, order=13, min=0, max=1, modifier=false, summary=true) 1791 @Description(shortDefinition="A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap", formalDefinition="A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item)." ) 1792 protected PackagedProductDefinitionPackagingComponent packaging; 1793 1794 /** 1795 * Allows the key features to be recorded, such as "hospital pack", "nurse prescribable", "calendar pack". 1796 */ 1797 @Child(name = "characteristic", type = {PackagedProductDefinitionPackagingPropertyComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1798 @Description(shortDefinition="Allows the key features to be recorded, such as \"hospital pack\", \"nurse prescribable\"", formalDefinition="Allows the key features to be recorded, such as \"hospital pack\", \"nurse prescribable\", \"calendar pack\"." ) 1799 protected List<PackagedProductDefinitionPackagingPropertyComponent> characteristic; 1800 1801 private static final long serialVersionUID = -1670129447L; 1802 1803 /** 1804 * Constructor 1805 */ 1806 public PackagedProductDefinition() { 1807 super(); 1808 } 1809 1810 /** 1811 * @return {@link #identifier} (A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations.) 1812 */ 1813 public List<Identifier> getIdentifier() { 1814 if (this.identifier == null) 1815 this.identifier = new ArrayList<Identifier>(); 1816 return this.identifier; 1817 } 1818 1819 /** 1820 * @return Returns a reference to <code>this</code> for easy method chaining 1821 */ 1822 public PackagedProductDefinition setIdentifier(List<Identifier> theIdentifier) { 1823 this.identifier = theIdentifier; 1824 return this; 1825 } 1826 1827 public boolean hasIdentifier() { 1828 if (this.identifier == null) 1829 return false; 1830 for (Identifier item : this.identifier) 1831 if (!item.isEmpty()) 1832 return true; 1833 return false; 1834 } 1835 1836 public Identifier addIdentifier() { //3 1837 Identifier t = new Identifier(); 1838 if (this.identifier == null) 1839 this.identifier = new ArrayList<Identifier>(); 1840 this.identifier.add(t); 1841 return t; 1842 } 1843 1844 public PackagedProductDefinition addIdentifier(Identifier t) { //3 1845 if (t == null) 1846 return this; 1847 if (this.identifier == null) 1848 this.identifier = new ArrayList<Identifier>(); 1849 this.identifier.add(t); 1850 return this; 1851 } 1852 1853 /** 1854 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 1855 */ 1856 public Identifier getIdentifierFirstRep() { 1857 if (getIdentifier().isEmpty()) { 1858 addIdentifier(); 1859 } 1860 return getIdentifier().get(0); 1861 } 1862 1863 /** 1864 * @return {@link #name} (A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1865 */ 1866 public StringType getNameElement() { 1867 if (this.name == null) 1868 if (Configuration.errorOnAutoCreate()) 1869 throw new Error("Attempt to auto-create PackagedProductDefinition.name"); 1870 else if (Configuration.doAutoCreate()) 1871 this.name = new StringType(); // bb 1872 return this.name; 1873 } 1874 1875 public boolean hasNameElement() { 1876 return this.name != null && !this.name.isEmpty(); 1877 } 1878 1879 public boolean hasName() { 1880 return this.name != null && !this.name.isEmpty(); 1881 } 1882 1883 /** 1884 * @param value {@link #name} (A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1885 */ 1886 public PackagedProductDefinition setNameElement(StringType value) { 1887 this.name = value; 1888 return this; 1889 } 1890 1891 /** 1892 * @return A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc. 1893 */ 1894 public String getName() { 1895 return this.name == null ? null : this.name.getValue(); 1896 } 1897 1898 /** 1899 * @param value A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc. 1900 */ 1901 public PackagedProductDefinition setName(String value) { 1902 if (Utilities.noString(value)) 1903 this.name = null; 1904 else { 1905 if (this.name == null) 1906 this.name = new StringType(); 1907 this.name.setValue(value); 1908 } 1909 return this; 1910 } 1911 1912 /** 1913 * @return {@link #type} (A high level category e.g. medicinal product, raw material, shipping/transport container, etc.) 1914 */ 1915 public CodeableConcept getType() { 1916 if (this.type == null) 1917 if (Configuration.errorOnAutoCreate()) 1918 throw new Error("Attempt to auto-create PackagedProductDefinition.type"); 1919 else if (Configuration.doAutoCreate()) 1920 this.type = new CodeableConcept(); // cc 1921 return this.type; 1922 } 1923 1924 public boolean hasType() { 1925 return this.type != null && !this.type.isEmpty(); 1926 } 1927 1928 /** 1929 * @param value {@link #type} (A high level category e.g. medicinal product, raw material, shipping/transport container, etc.) 1930 */ 1931 public PackagedProductDefinition setType(CodeableConcept value) { 1932 this.type = value; 1933 return this; 1934 } 1935 1936 /** 1937 * @return {@link #packageFor} (The product this package model relates to, not the contents of the package (for which see package.containedItem).) 1938 */ 1939 public List<Reference> getPackageFor() { 1940 if (this.packageFor == null) 1941 this.packageFor = new ArrayList<Reference>(); 1942 return this.packageFor; 1943 } 1944 1945 /** 1946 * @return Returns a reference to <code>this</code> for easy method chaining 1947 */ 1948 public PackagedProductDefinition setPackageFor(List<Reference> thePackageFor) { 1949 this.packageFor = thePackageFor; 1950 return this; 1951 } 1952 1953 public boolean hasPackageFor() { 1954 if (this.packageFor == null) 1955 return false; 1956 for (Reference item : this.packageFor) 1957 if (!item.isEmpty()) 1958 return true; 1959 return false; 1960 } 1961 1962 public Reference addPackageFor() { //3 1963 Reference t = new Reference(); 1964 if (this.packageFor == null) 1965 this.packageFor = new ArrayList<Reference>(); 1966 this.packageFor.add(t); 1967 return t; 1968 } 1969 1970 public PackagedProductDefinition addPackageFor(Reference t) { //3 1971 if (t == null) 1972 return this; 1973 if (this.packageFor == null) 1974 this.packageFor = new ArrayList<Reference>(); 1975 this.packageFor.add(t); 1976 return this; 1977 } 1978 1979 /** 1980 * @return The first repetition of repeating field {@link #packageFor}, creating it if it does not already exist {3} 1981 */ 1982 public Reference getPackageForFirstRep() { 1983 if (getPackageFor().isEmpty()) { 1984 addPackageFor(); 1985 } 1986 return getPackageFor().get(0); 1987 } 1988 1989 /** 1990 * @return {@link #status} (The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.) 1991 */ 1992 public CodeableConcept getStatus() { 1993 if (this.status == null) 1994 if (Configuration.errorOnAutoCreate()) 1995 throw new Error("Attempt to auto-create PackagedProductDefinition.status"); 1996 else if (Configuration.doAutoCreate()) 1997 this.status = new CodeableConcept(); // cc 1998 return this.status; 1999 } 2000 2001 public boolean hasStatus() { 2002 return this.status != null && !this.status.isEmpty(); 2003 } 2004 2005 /** 2006 * @param value {@link #status} (The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.) 2007 */ 2008 public PackagedProductDefinition setStatus(CodeableConcept value) { 2009 this.status = value; 2010 return this; 2011 } 2012 2013 /** 2014 * @return {@link #statusDate} (The date at which the given status became applicable.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 2015 */ 2016 public DateTimeType getStatusDateElement() { 2017 if (this.statusDate == null) 2018 if (Configuration.errorOnAutoCreate()) 2019 throw new Error("Attempt to auto-create PackagedProductDefinition.statusDate"); 2020 else if (Configuration.doAutoCreate()) 2021 this.statusDate = new DateTimeType(); // bb 2022 return this.statusDate; 2023 } 2024 2025 public boolean hasStatusDateElement() { 2026 return this.statusDate != null && !this.statusDate.isEmpty(); 2027 } 2028 2029 public boolean hasStatusDate() { 2030 return this.statusDate != null && !this.statusDate.isEmpty(); 2031 } 2032 2033 /** 2034 * @param value {@link #statusDate} (The date at which the given status became applicable.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 2035 */ 2036 public PackagedProductDefinition setStatusDateElement(DateTimeType value) { 2037 this.statusDate = value; 2038 return this; 2039 } 2040 2041 /** 2042 * @return The date at which the given status became applicable. 2043 */ 2044 public Date getStatusDate() { 2045 return this.statusDate == null ? null : this.statusDate.getValue(); 2046 } 2047 2048 /** 2049 * @param value The date at which the given status became applicable. 2050 */ 2051 public PackagedProductDefinition setStatusDate(Date value) { 2052 if (value == null) 2053 this.statusDate = null; 2054 else { 2055 if (this.statusDate == null) 2056 this.statusDate = new DateTimeType(); 2057 this.statusDate.setValue(value); 2058 } 2059 return this; 2060 } 2061 2062 /** 2063 * @return {@link #containedItemQuantity} (A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource.) 2064 */ 2065 public List<Quantity> getContainedItemQuantity() { 2066 if (this.containedItemQuantity == null) 2067 this.containedItemQuantity = new ArrayList<Quantity>(); 2068 return this.containedItemQuantity; 2069 } 2070 2071 /** 2072 * @return Returns a reference to <code>this</code> for easy method chaining 2073 */ 2074 public PackagedProductDefinition setContainedItemQuantity(List<Quantity> theContainedItemQuantity) { 2075 this.containedItemQuantity = theContainedItemQuantity; 2076 return this; 2077 } 2078 2079 public boolean hasContainedItemQuantity() { 2080 if (this.containedItemQuantity == null) 2081 return false; 2082 for (Quantity item : this.containedItemQuantity) 2083 if (!item.isEmpty()) 2084 return true; 2085 return false; 2086 } 2087 2088 public Quantity addContainedItemQuantity() { //3 2089 Quantity t = new Quantity(); 2090 if (this.containedItemQuantity == null) 2091 this.containedItemQuantity = new ArrayList<Quantity>(); 2092 this.containedItemQuantity.add(t); 2093 return t; 2094 } 2095 2096 public PackagedProductDefinition addContainedItemQuantity(Quantity t) { //3 2097 if (t == null) 2098 return this; 2099 if (this.containedItemQuantity == null) 2100 this.containedItemQuantity = new ArrayList<Quantity>(); 2101 this.containedItemQuantity.add(t); 2102 return this; 2103 } 2104 2105 /** 2106 * @return The first repetition of repeating field {@link #containedItemQuantity}, creating it if it does not already exist {3} 2107 */ 2108 public Quantity getContainedItemQuantityFirstRep() { 2109 if (getContainedItemQuantity().isEmpty()) { 2110 addContainedItemQuantity(); 2111 } 2112 return getContainedItemQuantity().get(0); 2113 } 2114 2115 /** 2116 * @return {@link #description} (Textual description. Note that this is not the name of the package or product.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2117 */ 2118 public MarkdownType getDescriptionElement() { 2119 if (this.description == null) 2120 if (Configuration.errorOnAutoCreate()) 2121 throw new Error("Attempt to auto-create PackagedProductDefinition.description"); 2122 else if (Configuration.doAutoCreate()) 2123 this.description = new MarkdownType(); // bb 2124 return this.description; 2125 } 2126 2127 public boolean hasDescriptionElement() { 2128 return this.description != null && !this.description.isEmpty(); 2129 } 2130 2131 public boolean hasDescription() { 2132 return this.description != null && !this.description.isEmpty(); 2133 } 2134 2135 /** 2136 * @param value {@link #description} (Textual description. Note that this is not the name of the package or product.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2137 */ 2138 public PackagedProductDefinition setDescriptionElement(MarkdownType value) { 2139 this.description = value; 2140 return this; 2141 } 2142 2143 /** 2144 * @return Textual description. Note that this is not the name of the package or product. 2145 */ 2146 public String getDescription() { 2147 return this.description == null ? null : this.description.getValue(); 2148 } 2149 2150 /** 2151 * @param value Textual description. Note that this is not the name of the package or product. 2152 */ 2153 public PackagedProductDefinition setDescription(String value) { 2154 if (Utilities.noString(value)) 2155 this.description = null; 2156 else { 2157 if (this.description == null) 2158 this.description = new MarkdownType(); 2159 this.description.setValue(value); 2160 } 2161 return this; 2162 } 2163 2164 /** 2165 * @return {@link #legalStatusOfSupply} (The legal status of supply of the packaged item as classified by the regulator.) 2166 */ 2167 public List<PackagedProductDefinitionLegalStatusOfSupplyComponent> getLegalStatusOfSupply() { 2168 if (this.legalStatusOfSupply == null) 2169 this.legalStatusOfSupply = new ArrayList<PackagedProductDefinitionLegalStatusOfSupplyComponent>(); 2170 return this.legalStatusOfSupply; 2171 } 2172 2173 /** 2174 * @return Returns a reference to <code>this</code> for easy method chaining 2175 */ 2176 public PackagedProductDefinition setLegalStatusOfSupply(List<PackagedProductDefinitionLegalStatusOfSupplyComponent> theLegalStatusOfSupply) { 2177 this.legalStatusOfSupply = theLegalStatusOfSupply; 2178 return this; 2179 } 2180 2181 public boolean hasLegalStatusOfSupply() { 2182 if (this.legalStatusOfSupply == null) 2183 return false; 2184 for (PackagedProductDefinitionLegalStatusOfSupplyComponent item : this.legalStatusOfSupply) 2185 if (!item.isEmpty()) 2186 return true; 2187 return false; 2188 } 2189 2190 public PackagedProductDefinitionLegalStatusOfSupplyComponent addLegalStatusOfSupply() { //3 2191 PackagedProductDefinitionLegalStatusOfSupplyComponent t = new PackagedProductDefinitionLegalStatusOfSupplyComponent(); 2192 if (this.legalStatusOfSupply == null) 2193 this.legalStatusOfSupply = new ArrayList<PackagedProductDefinitionLegalStatusOfSupplyComponent>(); 2194 this.legalStatusOfSupply.add(t); 2195 return t; 2196 } 2197 2198 public PackagedProductDefinition addLegalStatusOfSupply(PackagedProductDefinitionLegalStatusOfSupplyComponent t) { //3 2199 if (t == null) 2200 return this; 2201 if (this.legalStatusOfSupply == null) 2202 this.legalStatusOfSupply = new ArrayList<PackagedProductDefinitionLegalStatusOfSupplyComponent>(); 2203 this.legalStatusOfSupply.add(t); 2204 return this; 2205 } 2206 2207 /** 2208 * @return The first repetition of repeating field {@link #legalStatusOfSupply}, creating it if it does not already exist {3} 2209 */ 2210 public PackagedProductDefinitionLegalStatusOfSupplyComponent getLegalStatusOfSupplyFirstRep() { 2211 if (getLegalStatusOfSupply().isEmpty()) { 2212 addLegalStatusOfSupply(); 2213 } 2214 return getLegalStatusOfSupply().get(0); 2215 } 2216 2217 /** 2218 * @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.) 2219 */ 2220 public List<MarketingStatus> getMarketingStatus() { 2221 if (this.marketingStatus == null) 2222 this.marketingStatus = new ArrayList<MarketingStatus>(); 2223 return this.marketingStatus; 2224 } 2225 2226 /** 2227 * @return Returns a reference to <code>this</code> for easy method chaining 2228 */ 2229 public PackagedProductDefinition setMarketingStatus(List<MarketingStatus> theMarketingStatus) { 2230 this.marketingStatus = theMarketingStatus; 2231 return this; 2232 } 2233 2234 public boolean hasMarketingStatus() { 2235 if (this.marketingStatus == null) 2236 return false; 2237 for (MarketingStatus item : this.marketingStatus) 2238 if (!item.isEmpty()) 2239 return true; 2240 return false; 2241 } 2242 2243 public MarketingStatus addMarketingStatus() { //3 2244 MarketingStatus t = new MarketingStatus(); 2245 if (this.marketingStatus == null) 2246 this.marketingStatus = new ArrayList<MarketingStatus>(); 2247 this.marketingStatus.add(t); 2248 return t; 2249 } 2250 2251 public PackagedProductDefinition addMarketingStatus(MarketingStatus t) { //3 2252 if (t == null) 2253 return this; 2254 if (this.marketingStatus == null) 2255 this.marketingStatus = new ArrayList<MarketingStatus>(); 2256 this.marketingStatus.add(t); 2257 return this; 2258 } 2259 2260 /** 2261 * @return The first repetition of repeating field {@link #marketingStatus}, creating it if it does not already exist {3} 2262 */ 2263 public MarketingStatus getMarketingStatusFirstRep() { 2264 if (getMarketingStatus().isEmpty()) { 2265 addMarketingStatus(); 2266 } 2267 return getMarketingStatus().get(0); 2268 } 2269 2270 /** 2271 * @return {@link #copackagedIndicator} (Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.). This is the underlying object with id, value and extensions. The accessor "getCopackagedIndicator" gives direct access to the value 2272 */ 2273 public BooleanType getCopackagedIndicatorElement() { 2274 if (this.copackagedIndicator == null) 2275 if (Configuration.errorOnAutoCreate()) 2276 throw new Error("Attempt to auto-create PackagedProductDefinition.copackagedIndicator"); 2277 else if (Configuration.doAutoCreate()) 2278 this.copackagedIndicator = new BooleanType(); // bb 2279 return this.copackagedIndicator; 2280 } 2281 2282 public boolean hasCopackagedIndicatorElement() { 2283 return this.copackagedIndicator != null && !this.copackagedIndicator.isEmpty(); 2284 } 2285 2286 public boolean hasCopackagedIndicator() { 2287 return this.copackagedIndicator != null && !this.copackagedIndicator.isEmpty(); 2288 } 2289 2290 /** 2291 * @param value {@link #copackagedIndicator} (Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.). This is the underlying object with id, value and extensions. The accessor "getCopackagedIndicator" gives direct access to the value 2292 */ 2293 public PackagedProductDefinition setCopackagedIndicatorElement(BooleanType value) { 2294 this.copackagedIndicator = value; 2295 return this; 2296 } 2297 2298 /** 2299 * @return Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant. 2300 */ 2301 public boolean getCopackagedIndicator() { 2302 return this.copackagedIndicator == null || this.copackagedIndicator.isEmpty() ? false : this.copackagedIndicator.getValue(); 2303 } 2304 2305 /** 2306 * @param value Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant. 2307 */ 2308 public PackagedProductDefinition setCopackagedIndicator(boolean value) { 2309 if (this.copackagedIndicator == null) 2310 this.copackagedIndicator = new BooleanType(); 2311 this.copackagedIndicator.setValue(value); 2312 return this; 2313 } 2314 2315 /** 2316 * @return {@link #manufacturer} (Manufacturer of this package type. When there are multiple it means these are all possible manufacturers.) 2317 */ 2318 public List<Reference> getManufacturer() { 2319 if (this.manufacturer == null) 2320 this.manufacturer = new ArrayList<Reference>(); 2321 return this.manufacturer; 2322 } 2323 2324 /** 2325 * @return Returns a reference to <code>this</code> for easy method chaining 2326 */ 2327 public PackagedProductDefinition setManufacturer(List<Reference> theManufacturer) { 2328 this.manufacturer = theManufacturer; 2329 return this; 2330 } 2331 2332 public boolean hasManufacturer() { 2333 if (this.manufacturer == null) 2334 return false; 2335 for (Reference item : this.manufacturer) 2336 if (!item.isEmpty()) 2337 return true; 2338 return false; 2339 } 2340 2341 public Reference addManufacturer() { //3 2342 Reference t = new Reference(); 2343 if (this.manufacturer == null) 2344 this.manufacturer = new ArrayList<Reference>(); 2345 this.manufacturer.add(t); 2346 return t; 2347 } 2348 2349 public PackagedProductDefinition addManufacturer(Reference t) { //3 2350 if (t == null) 2351 return this; 2352 if (this.manufacturer == null) 2353 this.manufacturer = new ArrayList<Reference>(); 2354 this.manufacturer.add(t); 2355 return this; 2356 } 2357 2358 /** 2359 * @return The first repetition of repeating field {@link #manufacturer}, creating it if it does not already exist {3} 2360 */ 2361 public Reference getManufacturerFirstRep() { 2362 if (getManufacturer().isEmpty()) { 2363 addManufacturer(); 2364 } 2365 return getManufacturer().get(0); 2366 } 2367 2368 /** 2369 * @return {@link #attachedDocument} (Additional information or supporting documentation about the packaged product.) 2370 */ 2371 public List<Reference> getAttachedDocument() { 2372 if (this.attachedDocument == null) 2373 this.attachedDocument = new ArrayList<Reference>(); 2374 return this.attachedDocument; 2375 } 2376 2377 /** 2378 * @return Returns a reference to <code>this</code> for easy method chaining 2379 */ 2380 public PackagedProductDefinition setAttachedDocument(List<Reference> theAttachedDocument) { 2381 this.attachedDocument = theAttachedDocument; 2382 return this; 2383 } 2384 2385 public boolean hasAttachedDocument() { 2386 if (this.attachedDocument == null) 2387 return false; 2388 for (Reference item : this.attachedDocument) 2389 if (!item.isEmpty()) 2390 return true; 2391 return false; 2392 } 2393 2394 public Reference addAttachedDocument() { //3 2395 Reference t = new Reference(); 2396 if (this.attachedDocument == null) 2397 this.attachedDocument = new ArrayList<Reference>(); 2398 this.attachedDocument.add(t); 2399 return t; 2400 } 2401 2402 public PackagedProductDefinition addAttachedDocument(Reference t) { //3 2403 if (t == null) 2404 return this; 2405 if (this.attachedDocument == null) 2406 this.attachedDocument = new ArrayList<Reference>(); 2407 this.attachedDocument.add(t); 2408 return this; 2409 } 2410 2411 /** 2412 * @return The first repetition of repeating field {@link #attachedDocument}, creating it if it does not already exist {3} 2413 */ 2414 public Reference getAttachedDocumentFirstRep() { 2415 if (getAttachedDocument().isEmpty()) { 2416 addAttachedDocument(); 2417 } 2418 return getAttachedDocument().get(0); 2419 } 2420 2421 /** 2422 * @return {@link #packaging} (A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).) 2423 */ 2424 public PackagedProductDefinitionPackagingComponent getPackaging() { 2425 if (this.packaging == null) 2426 if (Configuration.errorOnAutoCreate()) 2427 throw new Error("Attempt to auto-create PackagedProductDefinition.packaging"); 2428 else if (Configuration.doAutoCreate()) 2429 this.packaging = new PackagedProductDefinitionPackagingComponent(); // cc 2430 return this.packaging; 2431 } 2432 2433 public boolean hasPackaging() { 2434 return this.packaging != null && !this.packaging.isEmpty(); 2435 } 2436 2437 /** 2438 * @param value {@link #packaging} (A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).) 2439 */ 2440 public PackagedProductDefinition setPackaging(PackagedProductDefinitionPackagingComponent value) { 2441 this.packaging = value; 2442 return this; 2443 } 2444 2445 /** 2446 * @return {@link #characteristic} (Allows the key features to be recorded, such as "hospital pack", "nurse prescribable", "calendar pack".) 2447 */ 2448 public List<PackagedProductDefinitionPackagingPropertyComponent> getCharacteristic() { 2449 if (this.characteristic == null) 2450 this.characteristic = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 2451 return this.characteristic; 2452 } 2453 2454 /** 2455 * @return Returns a reference to <code>this</code> for easy method chaining 2456 */ 2457 public PackagedProductDefinition setCharacteristic(List<PackagedProductDefinitionPackagingPropertyComponent> theCharacteristic) { 2458 this.characteristic = theCharacteristic; 2459 return this; 2460 } 2461 2462 public boolean hasCharacteristic() { 2463 if (this.characteristic == null) 2464 return false; 2465 for (PackagedProductDefinitionPackagingPropertyComponent item : this.characteristic) 2466 if (!item.isEmpty()) 2467 return true; 2468 return false; 2469 } 2470 2471 public PackagedProductDefinitionPackagingPropertyComponent addCharacteristic() { //3 2472 PackagedProductDefinitionPackagingPropertyComponent t = new PackagedProductDefinitionPackagingPropertyComponent(); 2473 if (this.characteristic == null) 2474 this.characteristic = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 2475 this.characteristic.add(t); 2476 return t; 2477 } 2478 2479 public PackagedProductDefinition addCharacteristic(PackagedProductDefinitionPackagingPropertyComponent t) { //3 2480 if (t == null) 2481 return this; 2482 if (this.characteristic == null) 2483 this.characteristic = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 2484 this.characteristic.add(t); 2485 return this; 2486 } 2487 2488 /** 2489 * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3} 2490 */ 2491 public PackagedProductDefinitionPackagingPropertyComponent getCharacteristicFirstRep() { 2492 if (getCharacteristic().isEmpty()) { 2493 addCharacteristic(); 2494 } 2495 return getCharacteristic().get(0); 2496 } 2497 2498 protected void listChildren(List<Property> children) { 2499 super.listChildren(children); 2500 children.add(new Property("identifier", "Identifier", "A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2501 children.add(new Property("name", "string", "A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.", 0, 1, name)); 2502 children.add(new Property("type", "CodeableConcept", "A high level category e.g. medicinal product, raw material, shipping/transport container, etc.", 0, 1, type)); 2503 children.add(new Property("packageFor", "Reference(MedicinalProductDefinition)", "The product this package model relates to, not the contents of the package (for which see package.containedItem).", 0, java.lang.Integer.MAX_VALUE, packageFor)); 2504 children.add(new Property("status", "CodeableConcept", "The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.", 0, 1, status)); 2505 children.add(new Property("statusDate", "dateTime", "The date at which the given status became applicable.", 0, 1, statusDate)); 2506 children.add(new Property("containedItemQuantity", "Quantity", "A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource.", 0, java.lang.Integer.MAX_VALUE, containedItemQuantity)); 2507 children.add(new Property("description", "markdown", "Textual description. Note that this is not the name of the package or product.", 0, 1, description)); 2508 children.add(new Property("legalStatusOfSupply", "", "The legal status of supply of the packaged item as classified by the regulator.", 0, java.lang.Integer.MAX_VALUE, legalStatusOfSupply)); 2509 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)); 2510 children.add(new Property("copackagedIndicator", "boolean", "Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.", 0, 1, copackagedIndicator)); 2511 children.add(new Property("manufacturer", "Reference(Organization)", "Manufacturer of this package type. When there are multiple it means these are all possible manufacturers.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); 2512 children.add(new Property("attachedDocument", "Reference(DocumentReference)", "Additional information or supporting documentation about the packaged product.", 0, java.lang.Integer.MAX_VALUE, attachedDocument)); 2513 children.add(new Property("packaging", "", "A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).", 0, 1, packaging)); 2514 children.add(new Property("characteristic", "@PackagedProductDefinition.packaging.property", "Allows the key features to be recorded, such as \"hospital pack\", \"nurse prescribable\", \"calendar pack\".", 0, java.lang.Integer.MAX_VALUE, characteristic)); 2515 } 2516 2517 @Override 2518 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2519 switch (_hash) { 2520 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations.", 0, java.lang.Integer.MAX_VALUE, identifier); 2521 case 3373707: /*name*/ return new Property("name", "string", "A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.", 0, 1, name); 2522 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A high level category e.g. medicinal product, raw material, shipping/transport container, etc.", 0, 1, type); 2523 case 29307555: /*packageFor*/ return new Property("packageFor", "Reference(MedicinalProductDefinition)", "The product this package model relates to, not the contents of the package (for which see package.containedItem).", 0, java.lang.Integer.MAX_VALUE, packageFor); 2524 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.", 0, 1, status); 2525 case 247524032: /*statusDate*/ return new Property("statusDate", "dateTime", "The date at which the given status became applicable.", 0, 1, statusDate); 2526 case -1686893359: /*containedItemQuantity*/ return new Property("containedItemQuantity", "Quantity", "A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource.", 0, java.lang.Integer.MAX_VALUE, containedItemQuantity); 2527 case -1724546052: /*description*/ return new Property("description", "markdown", "Textual description. Note that this is not the name of the package or product.", 0, 1, description); 2528 case -844874031: /*legalStatusOfSupply*/ return new Property("legalStatusOfSupply", "", "The legal status of supply of the packaged item as classified by the regulator.", 0, java.lang.Integer.MAX_VALUE, legalStatusOfSupply); 2529 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); 2530 case -1638663195: /*copackagedIndicator*/ return new Property("copackagedIndicator", "boolean", "Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.", 0, 1, copackagedIndicator); 2531 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "Reference(Organization)", "Manufacturer of this package type. When there are multiple it means these are all possible manufacturers.", 0, java.lang.Integer.MAX_VALUE, manufacturer); 2532 case -513945889: /*attachedDocument*/ return new Property("attachedDocument", "Reference(DocumentReference)", "Additional information or supporting documentation about the packaged product.", 0, java.lang.Integer.MAX_VALUE, attachedDocument); 2533 case 1802065795: /*packaging*/ return new Property("packaging", "", "A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).", 0, 1, packaging); 2534 case 366313883: /*characteristic*/ return new Property("characteristic", "@PackagedProductDefinition.packaging.property", "Allows the key features to be recorded, such as \"hospital pack\", \"nurse prescribable\", \"calendar pack\".", 0, java.lang.Integer.MAX_VALUE, characteristic); 2535 default: return super.getNamedProperty(_hash, _name, _checkValid); 2536 } 2537 2538 } 2539 2540 @Override 2541 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2542 switch (hash) { 2543 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2544 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2545 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2546 case 29307555: /*packageFor*/ return this.packageFor == null ? new Base[0] : this.packageFor.toArray(new Base[this.packageFor.size()]); // Reference 2547 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 2548 case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateTimeType 2549 case -1686893359: /*containedItemQuantity*/ return this.containedItemQuantity == null ? new Base[0] : this.containedItemQuantity.toArray(new Base[this.containedItemQuantity.size()]); // Quantity 2550 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 2551 case -844874031: /*legalStatusOfSupply*/ return this.legalStatusOfSupply == null ? new Base[0] : this.legalStatusOfSupply.toArray(new Base[this.legalStatusOfSupply.size()]); // PackagedProductDefinitionLegalStatusOfSupplyComponent 2552 case 70767032: /*marketingStatus*/ return this.marketingStatus == null ? new Base[0] : this.marketingStatus.toArray(new Base[this.marketingStatus.size()]); // MarketingStatus 2553 case -1638663195: /*copackagedIndicator*/ return this.copackagedIndicator == null ? new Base[0] : new Base[] {this.copackagedIndicator}; // BooleanType 2554 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : this.manufacturer.toArray(new Base[this.manufacturer.size()]); // Reference 2555 case -513945889: /*attachedDocument*/ return this.attachedDocument == null ? new Base[0] : this.attachedDocument.toArray(new Base[this.attachedDocument.size()]); // Reference 2556 case 1802065795: /*packaging*/ return this.packaging == null ? new Base[0] : new Base[] {this.packaging}; // PackagedProductDefinitionPackagingComponent 2557 case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // PackagedProductDefinitionPackagingPropertyComponent 2558 default: return super.getProperty(hash, name, checkValid); 2559 } 2560 2561 } 2562 2563 @Override 2564 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2565 switch (hash) { 2566 case -1618432855: // identifier 2567 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 2568 return value; 2569 case 3373707: // name 2570 this.name = TypeConvertor.castToString(value); // StringType 2571 return value; 2572 case 3575610: // type 2573 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2574 return value; 2575 case 29307555: // packageFor 2576 this.getPackageFor().add(TypeConvertor.castToReference(value)); // Reference 2577 return value; 2578 case -892481550: // status 2579 this.status = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2580 return value; 2581 case 247524032: // statusDate 2582 this.statusDate = TypeConvertor.castToDateTime(value); // DateTimeType 2583 return value; 2584 case -1686893359: // containedItemQuantity 2585 this.getContainedItemQuantity().add(TypeConvertor.castToQuantity(value)); // Quantity 2586 return value; 2587 case -1724546052: // description 2588 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 2589 return value; 2590 case -844874031: // legalStatusOfSupply 2591 this.getLegalStatusOfSupply().add((PackagedProductDefinitionLegalStatusOfSupplyComponent) value); // PackagedProductDefinitionLegalStatusOfSupplyComponent 2592 return value; 2593 case 70767032: // marketingStatus 2594 this.getMarketingStatus().add(TypeConvertor.castToMarketingStatus(value)); // MarketingStatus 2595 return value; 2596 case -1638663195: // copackagedIndicator 2597 this.copackagedIndicator = TypeConvertor.castToBoolean(value); // BooleanType 2598 return value; 2599 case -1969347631: // manufacturer 2600 this.getManufacturer().add(TypeConvertor.castToReference(value)); // Reference 2601 return value; 2602 case -513945889: // attachedDocument 2603 this.getAttachedDocument().add(TypeConvertor.castToReference(value)); // Reference 2604 return value; 2605 case 1802065795: // packaging 2606 this.packaging = (PackagedProductDefinitionPackagingComponent) value; // PackagedProductDefinitionPackagingComponent 2607 return value; 2608 case 366313883: // characteristic 2609 this.getCharacteristic().add((PackagedProductDefinitionPackagingPropertyComponent) value); // PackagedProductDefinitionPackagingPropertyComponent 2610 return value; 2611 default: return super.setProperty(hash, name, value); 2612 } 2613 2614 } 2615 2616 @Override 2617 public Base setProperty(String name, Base value) throws FHIRException { 2618 if (name.equals("identifier")) { 2619 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 2620 } else if (name.equals("name")) { 2621 this.name = TypeConvertor.castToString(value); // StringType 2622 } else if (name.equals("type")) { 2623 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2624 } else if (name.equals("packageFor")) { 2625 this.getPackageFor().add(TypeConvertor.castToReference(value)); 2626 } else if (name.equals("status")) { 2627 this.status = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2628 } else if (name.equals("statusDate")) { 2629 this.statusDate = TypeConvertor.castToDateTime(value); // DateTimeType 2630 } else if (name.equals("containedItemQuantity")) { 2631 this.getContainedItemQuantity().add(TypeConvertor.castToQuantity(value)); 2632 } else if (name.equals("description")) { 2633 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 2634 } else if (name.equals("legalStatusOfSupply")) { 2635 this.getLegalStatusOfSupply().add((PackagedProductDefinitionLegalStatusOfSupplyComponent) value); 2636 } else if (name.equals("marketingStatus")) { 2637 this.getMarketingStatus().add(TypeConvertor.castToMarketingStatus(value)); 2638 } else if (name.equals("copackagedIndicator")) { 2639 this.copackagedIndicator = TypeConvertor.castToBoolean(value); // BooleanType 2640 } else if (name.equals("manufacturer")) { 2641 this.getManufacturer().add(TypeConvertor.castToReference(value)); 2642 } else if (name.equals("attachedDocument")) { 2643 this.getAttachedDocument().add(TypeConvertor.castToReference(value)); 2644 } else if (name.equals("packaging")) { 2645 this.packaging = (PackagedProductDefinitionPackagingComponent) value; // PackagedProductDefinitionPackagingComponent 2646 } else if (name.equals("characteristic")) { 2647 this.getCharacteristic().add((PackagedProductDefinitionPackagingPropertyComponent) value); 2648 } else 2649 return super.setProperty(name, value); 2650 return value; 2651 } 2652 2653 @Override 2654 public Base makeProperty(int hash, String name) throws FHIRException { 2655 switch (hash) { 2656 case -1618432855: return addIdentifier(); 2657 case 3373707: return getNameElement(); 2658 case 3575610: return getType(); 2659 case 29307555: return addPackageFor(); 2660 case -892481550: return getStatus(); 2661 case 247524032: return getStatusDateElement(); 2662 case -1686893359: return addContainedItemQuantity(); 2663 case -1724546052: return getDescriptionElement(); 2664 case -844874031: return addLegalStatusOfSupply(); 2665 case 70767032: return addMarketingStatus(); 2666 case -1638663195: return getCopackagedIndicatorElement(); 2667 case -1969347631: return addManufacturer(); 2668 case -513945889: return addAttachedDocument(); 2669 case 1802065795: return getPackaging(); 2670 case 366313883: return addCharacteristic(); 2671 default: return super.makeProperty(hash, name); 2672 } 2673 2674 } 2675 2676 @Override 2677 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2678 switch (hash) { 2679 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2680 case 3373707: /*name*/ return new String[] {"string"}; 2681 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2682 case 29307555: /*packageFor*/ return new String[] {"Reference"}; 2683 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 2684 case 247524032: /*statusDate*/ return new String[] {"dateTime"}; 2685 case -1686893359: /*containedItemQuantity*/ return new String[] {"Quantity"}; 2686 case -1724546052: /*description*/ return new String[] {"markdown"}; 2687 case -844874031: /*legalStatusOfSupply*/ return new String[] {}; 2688 case 70767032: /*marketingStatus*/ return new String[] {"MarketingStatus"}; 2689 case -1638663195: /*copackagedIndicator*/ return new String[] {"boolean"}; 2690 case -1969347631: /*manufacturer*/ return new String[] {"Reference"}; 2691 case -513945889: /*attachedDocument*/ return new String[] {"Reference"}; 2692 case 1802065795: /*packaging*/ return new String[] {}; 2693 case 366313883: /*characteristic*/ return new String[] {"@PackagedProductDefinition.packaging.property"}; 2694 default: return super.getTypesForProperty(hash, name); 2695 } 2696 2697 } 2698 2699 @Override 2700 public Base addChild(String name) throws FHIRException { 2701 if (name.equals("identifier")) { 2702 return addIdentifier(); 2703 } 2704 else if (name.equals("name")) { 2705 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.name"); 2706 } 2707 else if (name.equals("type")) { 2708 this.type = new CodeableConcept(); 2709 return this.type; 2710 } 2711 else if (name.equals("packageFor")) { 2712 return addPackageFor(); 2713 } 2714 else if (name.equals("status")) { 2715 this.status = new CodeableConcept(); 2716 return this.status; 2717 } 2718 else if (name.equals("statusDate")) { 2719 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.statusDate"); 2720 } 2721 else if (name.equals("containedItemQuantity")) { 2722 return addContainedItemQuantity(); 2723 } 2724 else if (name.equals("description")) { 2725 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.description"); 2726 } 2727 else if (name.equals("legalStatusOfSupply")) { 2728 return addLegalStatusOfSupply(); 2729 } 2730 else if (name.equals("marketingStatus")) { 2731 return addMarketingStatus(); 2732 } 2733 else if (name.equals("copackagedIndicator")) { 2734 throw new FHIRException("Cannot call addChild on a singleton property PackagedProductDefinition.copackagedIndicator"); 2735 } 2736 else if (name.equals("manufacturer")) { 2737 return addManufacturer(); 2738 } 2739 else if (name.equals("attachedDocument")) { 2740 return addAttachedDocument(); 2741 } 2742 else if (name.equals("packaging")) { 2743 this.packaging = new PackagedProductDefinitionPackagingComponent(); 2744 return this.packaging; 2745 } 2746 else if (name.equals("characteristic")) { 2747 return addCharacteristic(); 2748 } 2749 else 2750 return super.addChild(name); 2751 } 2752 2753 public String fhirType() { 2754 return "PackagedProductDefinition"; 2755 2756 } 2757 2758 public PackagedProductDefinition copy() { 2759 PackagedProductDefinition dst = new PackagedProductDefinition(); 2760 copyValues(dst); 2761 return dst; 2762 } 2763 2764 public void copyValues(PackagedProductDefinition dst) { 2765 super.copyValues(dst); 2766 if (identifier != null) { 2767 dst.identifier = new ArrayList<Identifier>(); 2768 for (Identifier i : identifier) 2769 dst.identifier.add(i.copy()); 2770 }; 2771 dst.name = name == null ? null : name.copy(); 2772 dst.type = type == null ? null : type.copy(); 2773 if (packageFor != null) { 2774 dst.packageFor = new ArrayList<Reference>(); 2775 for (Reference i : packageFor) 2776 dst.packageFor.add(i.copy()); 2777 }; 2778 dst.status = status == null ? null : status.copy(); 2779 dst.statusDate = statusDate == null ? null : statusDate.copy(); 2780 if (containedItemQuantity != null) { 2781 dst.containedItemQuantity = new ArrayList<Quantity>(); 2782 for (Quantity i : containedItemQuantity) 2783 dst.containedItemQuantity.add(i.copy()); 2784 }; 2785 dst.description = description == null ? null : description.copy(); 2786 if (legalStatusOfSupply != null) { 2787 dst.legalStatusOfSupply = new ArrayList<PackagedProductDefinitionLegalStatusOfSupplyComponent>(); 2788 for (PackagedProductDefinitionLegalStatusOfSupplyComponent i : legalStatusOfSupply) 2789 dst.legalStatusOfSupply.add(i.copy()); 2790 }; 2791 if (marketingStatus != null) { 2792 dst.marketingStatus = new ArrayList<MarketingStatus>(); 2793 for (MarketingStatus i : marketingStatus) 2794 dst.marketingStatus.add(i.copy()); 2795 }; 2796 dst.copackagedIndicator = copackagedIndicator == null ? null : copackagedIndicator.copy(); 2797 if (manufacturer != null) { 2798 dst.manufacturer = new ArrayList<Reference>(); 2799 for (Reference i : manufacturer) 2800 dst.manufacturer.add(i.copy()); 2801 }; 2802 if (attachedDocument != null) { 2803 dst.attachedDocument = new ArrayList<Reference>(); 2804 for (Reference i : attachedDocument) 2805 dst.attachedDocument.add(i.copy()); 2806 }; 2807 dst.packaging = packaging == null ? null : packaging.copy(); 2808 if (characteristic != null) { 2809 dst.characteristic = new ArrayList<PackagedProductDefinitionPackagingPropertyComponent>(); 2810 for (PackagedProductDefinitionPackagingPropertyComponent i : characteristic) 2811 dst.characteristic.add(i.copy()); 2812 }; 2813 } 2814 2815 protected PackagedProductDefinition typedCopy() { 2816 return copy(); 2817 } 2818 2819 @Override 2820 public boolean equalsDeep(Base other_) { 2821 if (!super.equalsDeep(other_)) 2822 return false; 2823 if (!(other_ instanceof PackagedProductDefinition)) 2824 return false; 2825 PackagedProductDefinition o = (PackagedProductDefinition) other_; 2826 return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(type, o.type, true) 2827 && compareDeep(packageFor, o.packageFor, true) && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true) 2828 && compareDeep(containedItemQuantity, o.containedItemQuantity, true) && compareDeep(description, o.description, true) 2829 && compareDeep(legalStatusOfSupply, o.legalStatusOfSupply, true) && compareDeep(marketingStatus, o.marketingStatus, true) 2830 && compareDeep(copackagedIndicator, o.copackagedIndicator, true) && compareDeep(manufacturer, o.manufacturer, true) 2831 && compareDeep(attachedDocument, o.attachedDocument, true) && compareDeep(packaging, o.packaging, true) 2832 && compareDeep(characteristic, o.characteristic, true); 2833 } 2834 2835 @Override 2836 public boolean equalsShallow(Base other_) { 2837 if (!super.equalsShallow(other_)) 2838 return false; 2839 if (!(other_ instanceof PackagedProductDefinition)) 2840 return false; 2841 PackagedProductDefinition o = (PackagedProductDefinition) other_; 2842 return compareValues(name, o.name, true) && compareValues(statusDate, o.statusDate, true) && compareValues(description, o.description, true) 2843 && compareValues(copackagedIndicator, o.copackagedIndicator, true); 2844 } 2845 2846 public boolean isEmpty() { 2847 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, name, type, packageFor 2848 , status, statusDate, containedItemQuantity, description, legalStatusOfSupply, marketingStatus 2849 , copackagedIndicator, manufacturer, attachedDocument, packaging, characteristic); 2850 } 2851 2852 @Override 2853 public ResourceType getResourceType() { 2854 return ResourceType.PackagedProductDefinition; 2855 } 2856 2857 /** 2858 * Search parameter: <b>biological</b> 2859 * <p> 2860 * Description: <b>A biologically derived product within this packaged product</b><br> 2861 * Type: <b>reference</b><br> 2862 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2863 * </p> 2864 */ 2865 @SearchParamDefinition(name="biological", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A biologically derived product within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 2866 public static final String SP_BIOLOGICAL = "biological"; 2867 /** 2868 * <b>Fluent Client</b> search parameter constant for <b>biological</b> 2869 * <p> 2870 * Description: <b>A biologically derived product within this packaged product</b><br> 2871 * Type: <b>reference</b><br> 2872 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2873 * </p> 2874 */ 2875 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BIOLOGICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BIOLOGICAL); 2876 2877/** 2878 * Constant for fluent queries to be used to add include statements. Specifies 2879 * the path value of "<b>PackagedProductDefinition:biological</b>". 2880 */ 2881 public static final ca.uhn.fhir.model.api.Include INCLUDE_BIOLOGICAL = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:biological").toLocked(); 2882 2883 /** 2884 * Search parameter: <b>contained-item</b> 2885 * <p> 2886 * Description: <b>Any of the contained items within this packaged product</b><br> 2887 * Type: <b>reference</b><br> 2888 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2889 * </p> 2890 */ 2891 @SearchParamDefinition(name="contained-item", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="Any of the contained items within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 2892 public static final String SP_CONTAINED_ITEM = "contained-item"; 2893 /** 2894 * <b>Fluent Client</b> search parameter constant for <b>contained-item</b> 2895 * <p> 2896 * Description: <b>Any of the contained items within this packaged product</b><br> 2897 * Type: <b>reference</b><br> 2898 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2899 * </p> 2900 */ 2901 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTAINED_ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTAINED_ITEM); 2902 2903/** 2904 * Constant for fluent queries to be used to add include statements. Specifies 2905 * the path value of "<b>PackagedProductDefinition:contained-item</b>". 2906 */ 2907 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTAINED_ITEM = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:contained-item").toLocked(); 2908 2909 /** 2910 * Search parameter: <b>device</b> 2911 * <p> 2912 * Description: <b>A device within this packaged product</b><br> 2913 * Type: <b>reference</b><br> 2914 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2915 * </p> 2916 */ 2917 @SearchParamDefinition(name="device", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A device within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 2918 public static final String SP_DEVICE = "device"; 2919 /** 2920 * <b>Fluent Client</b> search parameter constant for <b>device</b> 2921 * <p> 2922 * Description: <b>A device within this packaged product</b><br> 2923 * Type: <b>reference</b><br> 2924 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2925 * </p> 2926 */ 2927 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE); 2928 2929/** 2930 * Constant for fluent queries to be used to add include statements. Specifies 2931 * the path value of "<b>PackagedProductDefinition:device</b>". 2932 */ 2933 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:device").toLocked(); 2934 2935 /** 2936 * Search parameter: <b>identifier</b> 2937 * <p> 2938 * Description: <b>Unique identifier</b><br> 2939 * Type: <b>token</b><br> 2940 * Path: <b>PackagedProductDefinition.identifier</b><br> 2941 * </p> 2942 */ 2943 @SearchParamDefinition(name="identifier", path="PackagedProductDefinition.identifier", description="Unique identifier", type="token" ) 2944 public static final String SP_IDENTIFIER = "identifier"; 2945 /** 2946 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2947 * <p> 2948 * Description: <b>Unique identifier</b><br> 2949 * Type: <b>token</b><br> 2950 * Path: <b>PackagedProductDefinition.identifier</b><br> 2951 * </p> 2952 */ 2953 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2954 2955 /** 2956 * Search parameter: <b>manufactured-item</b> 2957 * <p> 2958 * Description: <b>A manufactured item of medication within this packaged product</b><br> 2959 * Type: <b>reference</b><br> 2960 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2961 * </p> 2962 */ 2963 @SearchParamDefinition(name="manufactured-item", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A manufactured item of medication within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 2964 public static final String SP_MANUFACTURED_ITEM = "manufactured-item"; 2965 /** 2966 * <b>Fluent Client</b> search parameter constant for <b>manufactured-item</b> 2967 * <p> 2968 * Description: <b>A manufactured item of medication within this packaged product</b><br> 2969 * Type: <b>reference</b><br> 2970 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2971 * </p> 2972 */ 2973 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURED_ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANUFACTURED_ITEM); 2974 2975/** 2976 * Constant for fluent queries to be used to add include statements. Specifies 2977 * the path value of "<b>PackagedProductDefinition:manufactured-item</b>". 2978 */ 2979 public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURED_ITEM = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:manufactured-item").toLocked(); 2980 2981 /** 2982 * Search parameter: <b>medication</b> 2983 * <p> 2984 * Description: <b>A manufactured item of medication within this packaged product</b><br> 2985 * Type: <b>reference</b><br> 2986 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2987 * </p> 2988 */ 2989 @SearchParamDefinition(name="medication", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A manufactured item of medication within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 2990 public static final String SP_MEDICATION = "medication"; 2991 /** 2992 * <b>Fluent Client</b> search parameter constant for <b>medication</b> 2993 * <p> 2994 * Description: <b>A manufactured item of medication within this packaged product</b><br> 2995 * Type: <b>reference</b><br> 2996 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 2997 * </p> 2998 */ 2999 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEDICATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEDICATION); 3000 3001/** 3002 * Constant for fluent queries to be used to add include statements. Specifies 3003 * the path value of "<b>PackagedProductDefinition:medication</b>". 3004 */ 3005 public static final ca.uhn.fhir.model.api.Include INCLUDE_MEDICATION = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:medication").toLocked(); 3006 3007 /** 3008 * Search parameter: <b>name</b> 3009 * <p> 3010 * Description: <b>A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.</b><br> 3011 * Type: <b>token</b><br> 3012 * Path: <b>PackagedProductDefinition.name</b><br> 3013 * </p> 3014 */ 3015 @SearchParamDefinition(name="name", path="PackagedProductDefinition.name", description="A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.", type="token" ) 3016 public static final String SP_NAME = "name"; 3017 /** 3018 * <b>Fluent Client</b> search parameter constant for <b>name</b> 3019 * <p> 3020 * Description: <b>A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.</b><br> 3021 * Type: <b>token</b><br> 3022 * Path: <b>PackagedProductDefinition.name</b><br> 3023 * </p> 3024 */ 3025 public static final ca.uhn.fhir.rest.gclient.TokenClientParam NAME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_NAME); 3026 3027 /** 3028 * Search parameter: <b>nutrition</b> 3029 * <p> 3030 * Description: <b>A nutrition product within this packaged product</b><br> 3031 * Type: <b>reference</b><br> 3032 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 3033 * </p> 3034 */ 3035 @SearchParamDefinition(name="nutrition", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A nutrition product within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 3036 public static final String SP_NUTRITION = "nutrition"; 3037 /** 3038 * <b>Fluent Client</b> search parameter constant for <b>nutrition</b> 3039 * <p> 3040 * Description: <b>A nutrition product within this packaged product</b><br> 3041 * Type: <b>reference</b><br> 3042 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 3043 * </p> 3044 */ 3045 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam NUTRITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_NUTRITION); 3046 3047/** 3048 * Constant for fluent queries to be used to add include statements. Specifies 3049 * the path value of "<b>PackagedProductDefinition:nutrition</b>". 3050 */ 3051 public static final ca.uhn.fhir.model.api.Include INCLUDE_NUTRITION = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:nutrition").toLocked(); 3052 3053 /** 3054 * Search parameter: <b>package-for</b> 3055 * <p> 3056 * Description: <b>The product that this is a pack for</b><br> 3057 * Type: <b>reference</b><br> 3058 * Path: <b>PackagedProductDefinition.packageFor</b><br> 3059 * </p> 3060 */ 3061 @SearchParamDefinition(name="package-for", path="PackagedProductDefinition.packageFor", description="The product that this is a pack for", type="reference", target={MedicinalProductDefinition.class } ) 3062 public static final String SP_PACKAGE_FOR = "package-for"; 3063 /** 3064 * <b>Fluent Client</b> search parameter constant for <b>package-for</b> 3065 * <p> 3066 * Description: <b>The product that this is a pack for</b><br> 3067 * Type: <b>reference</b><br> 3068 * Path: <b>PackagedProductDefinition.packageFor</b><br> 3069 * </p> 3070 */ 3071 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PACKAGE_FOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PACKAGE_FOR); 3072 3073/** 3074 * Constant for fluent queries to be used to add include statements. Specifies 3075 * the path value of "<b>PackagedProductDefinition:package-for</b>". 3076 */ 3077 public static final ca.uhn.fhir.model.api.Include INCLUDE_PACKAGE_FOR = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:package-for").toLocked(); 3078 3079 /** 3080 * Search parameter: <b>package</b> 3081 * <p> 3082 * Description: <b>A complete packaged product within this packaged product</b><br> 3083 * Type: <b>reference</b><br> 3084 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 3085 * </p> 3086 */ 3087 @SearchParamDefinition(name="package", path="PackagedProductDefinition.packaging.containedItem.item.reference", description="A complete packaged product within this packaged product", type="reference", target={BiologicallyDerivedProduct.class, DeviceDefinition.class, ManufacturedItemDefinition.class, NutritionProduct.class, PackagedProductDefinition.class } ) 3088 public static final String SP_PACKAGE = "package"; 3089 /** 3090 * <b>Fluent Client</b> search parameter constant for <b>package</b> 3091 * <p> 3092 * Description: <b>A complete packaged product within this packaged product</b><br> 3093 * Type: <b>reference</b><br> 3094 * Path: <b>PackagedProductDefinition.packaging.containedItem.item.reference</b><br> 3095 * </p> 3096 */ 3097 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PACKAGE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PACKAGE); 3098 3099/** 3100 * Constant for fluent queries to be used to add include statements. Specifies 3101 * the path value of "<b>PackagedProductDefinition:package</b>". 3102 */ 3103 public static final ca.uhn.fhir.model.api.Include INCLUDE_PACKAGE = new ca.uhn.fhir.model.api.Include("PackagedProductDefinition:package").toLocked(); 3104 3105 /** 3106 * Search parameter: <b>status</b> 3107 * <p> 3108 * Description: <b>The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status</b><br> 3109 * Type: <b>token</b><br> 3110 * Path: <b>PackagedProductDefinition.status</b><br> 3111 * </p> 3112 */ 3113 @SearchParamDefinition(name="status", path="PackagedProductDefinition.status", description="The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status", type="token" ) 3114 public static final String SP_STATUS = "status"; 3115 /** 3116 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3117 * <p> 3118 * Description: <b>The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status</b><br> 3119 * Type: <b>token</b><br> 3120 * Path: <b>PackagedProductDefinition.status</b><br> 3121 * </p> 3122 */ 3123 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3124 3125 3126} 3127