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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.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 * Record of delivery of what is supplied. 052 */ 053@ResourceDef(name="SupplyDelivery", profile="http://hl7.org/fhir/StructureDefinition/SupplyDelivery") 054public class SupplyDelivery extends DomainResource { 055 056 public enum SupplyDeliveryStatus { 057 /** 058 * Supply has been requested, but not delivered. 059 */ 060 INPROGRESS, 061 /** 062 * Supply has been delivered (\"completed\"). 063 */ 064 COMPLETED, 065 /** 066 * Delivery was not completed. 067 */ 068 ABANDONED, 069 /** 070 * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".). 071 */ 072 ENTEREDINERROR, 073 /** 074 * added to help the parsers with the generic types 075 */ 076 NULL; 077 public static SupplyDeliveryStatus fromCode(String codeString) throws FHIRException { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("in-progress".equals(codeString)) 081 return INPROGRESS; 082 if ("completed".equals(codeString)) 083 return COMPLETED; 084 if ("abandoned".equals(codeString)) 085 return ABANDONED; 086 if ("entered-in-error".equals(codeString)) 087 return ENTEREDINERROR; 088 if (Configuration.isAcceptInvalidEnums()) 089 return null; 090 else 091 throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); 092 } 093 public String toCode() { 094 switch (this) { 095 case INPROGRESS: return "in-progress"; 096 case COMPLETED: return "completed"; 097 case ABANDONED: return "abandoned"; 098 case ENTEREDINERROR: return "entered-in-error"; 099 default: return "?"; 100 } 101 } 102 public String getSystem() { 103 switch (this) { 104 case INPROGRESS: return "http://hl7.org/fhir/supplydelivery-status"; 105 case COMPLETED: return "http://hl7.org/fhir/supplydelivery-status"; 106 case ABANDONED: return "http://hl7.org/fhir/supplydelivery-status"; 107 case ENTEREDINERROR: return "http://hl7.org/fhir/supplydelivery-status"; 108 default: return "?"; 109 } 110 } 111 public String getDefinition() { 112 switch (this) { 113 case INPROGRESS: return "Supply has been requested, but not delivered."; 114 case COMPLETED: return "Supply has been delivered (\"completed\")."; 115 case ABANDONED: return "Delivery was not completed."; 116 case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".)."; 117 default: return "?"; 118 } 119 } 120 public String getDisplay() { 121 switch (this) { 122 case INPROGRESS: return "In Progress"; 123 case COMPLETED: return "Delivered"; 124 case ABANDONED: return "Abandoned"; 125 case ENTEREDINERROR: return "Entered In Error"; 126 default: return "?"; 127 } 128 } 129 } 130 131 public static class SupplyDeliveryStatusEnumFactory implements EnumFactory<SupplyDeliveryStatus> { 132 public SupplyDeliveryStatus fromCode(String codeString) throws IllegalArgumentException { 133 if (codeString == null || "".equals(codeString)) 134 if (codeString == null || "".equals(codeString)) 135 return null; 136 if ("in-progress".equals(codeString)) 137 return SupplyDeliveryStatus.INPROGRESS; 138 if ("completed".equals(codeString)) 139 return SupplyDeliveryStatus.COMPLETED; 140 if ("abandoned".equals(codeString)) 141 return SupplyDeliveryStatus.ABANDONED; 142 if ("entered-in-error".equals(codeString)) 143 return SupplyDeliveryStatus.ENTEREDINERROR; 144 throw new IllegalArgumentException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); 145 } 146 public Enumeration<SupplyDeliveryStatus> fromType(Base code) throws FHIRException { 147 if (code == null) 148 return null; 149 if (code.isEmpty()) 150 return new Enumeration<SupplyDeliveryStatus>(this); 151 String codeString = ((PrimitiveType) code).asStringValue(); 152 if (codeString == null || "".equals(codeString)) 153 return null; 154 if ("in-progress".equals(codeString)) 155 return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.INPROGRESS); 156 if ("completed".equals(codeString)) 157 return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.COMPLETED); 158 if ("abandoned".equals(codeString)) 159 return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.ABANDONED); 160 if ("entered-in-error".equals(codeString)) 161 return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.ENTEREDINERROR); 162 throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); 163 } 164 public String toCode(SupplyDeliveryStatus code) { 165 if (code == SupplyDeliveryStatus.INPROGRESS) 166 return "in-progress"; 167 if (code == SupplyDeliveryStatus.COMPLETED) 168 return "completed"; 169 if (code == SupplyDeliveryStatus.ABANDONED) 170 return "abandoned"; 171 if (code == SupplyDeliveryStatus.ENTEREDINERROR) 172 return "entered-in-error"; 173 return "?"; 174 } 175 public String toSystem(SupplyDeliveryStatus code) { 176 return code.getSystem(); 177 } 178 } 179 180 @Block() 181 public static class SupplyDeliverySuppliedItemComponent extends BackboneElement implements IBaseBackboneElement { 182 /** 183 * The amount of supply that has been dispensed. Includes unit of measure. 184 */ 185 @Child(name = "quantity", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false) 186 @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of supply that has been dispensed. Includes unit of measure." ) 187 protected Quantity quantity; 188 189 /** 190 * Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list. 191 */ 192 @Child(name = "item", type = {CodeableConcept.class, Medication.class, Substance.class, Device.class}, order=2, min=0, max=1, modifier=false, summary=false) 193 @Description(shortDefinition="Medication, Substance, or Device supplied", formalDefinition="Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list." ) 194 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supply-item") 195 protected DataType item; 196 197 private static final long serialVersionUID = -615919419L; 198 199 /** 200 * Constructor 201 */ 202 public SupplyDeliverySuppliedItemComponent() { 203 super(); 204 } 205 206 /** 207 * @return {@link #quantity} (The amount of supply that has been dispensed. Includes unit of measure.) 208 */ 209 public Quantity getQuantity() { 210 if (this.quantity == null) 211 if (Configuration.errorOnAutoCreate()) 212 throw new Error("Attempt to auto-create SupplyDeliverySuppliedItemComponent.quantity"); 213 else if (Configuration.doAutoCreate()) 214 this.quantity = new Quantity(); // cc 215 return this.quantity; 216 } 217 218 public boolean hasQuantity() { 219 return this.quantity != null && !this.quantity.isEmpty(); 220 } 221 222 /** 223 * @param value {@link #quantity} (The amount of supply that has been dispensed. Includes unit of measure.) 224 */ 225 public SupplyDeliverySuppliedItemComponent setQuantity(Quantity value) { 226 this.quantity = value; 227 return this; 228 } 229 230 /** 231 * @return {@link #item} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.) 232 */ 233 public DataType getItem() { 234 return this.item; 235 } 236 237 /** 238 * @return {@link #item} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.) 239 */ 240 public CodeableConcept getItemCodeableConcept() throws FHIRException { 241 if (this.item == null) 242 this.item = new CodeableConcept(); 243 if (!(this.item instanceof CodeableConcept)) 244 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered"); 245 return (CodeableConcept) this.item; 246 } 247 248 public boolean hasItemCodeableConcept() { 249 return this != null && this.item instanceof CodeableConcept; 250 } 251 252 /** 253 * @return {@link #item} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.) 254 */ 255 public Reference getItemReference() throws FHIRException { 256 if (this.item == null) 257 this.item = new Reference(); 258 if (!(this.item instanceof Reference)) 259 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered"); 260 return (Reference) this.item; 261 } 262 263 public boolean hasItemReference() { 264 return this != null && this.item instanceof Reference; 265 } 266 267 public boolean hasItem() { 268 return this.item != null && !this.item.isEmpty(); 269 } 270 271 /** 272 * @param value {@link #item} (Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.) 273 */ 274 public SupplyDeliverySuppliedItemComponent setItem(DataType value) { 275 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 276 throw new Error("Not the right type for SupplyDelivery.suppliedItem.item[x]: "+value.fhirType()); 277 this.item = value; 278 return this; 279 } 280 281 protected void listChildren(List<Property> children) { 282 super.listChildren(children); 283 children.add(new Property("quantity", "Quantity", "The amount of supply that has been dispensed. Includes unit of measure.", 0, 1, quantity)); 284 children.add(new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item)); 285 } 286 287 @Override 288 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 289 switch (_hash) { 290 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The amount of supply that has been dispensed. Includes unit of measure.", 0, 1, quantity); 291 case 2116201613: /*item[x]*/ return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item); 292 case 3242771: /*item*/ return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item); 293 case 106644494: /*itemCodeableConcept*/ return new Property("item[x]", "CodeableConcept", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item); 294 case 1376364920: /*itemReference*/ return new Property("item[x]", "Reference(Medication|Substance|Device)", "Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item); 295 default: return super.getNamedProperty(_hash, _name, _checkValid); 296 } 297 298 } 299 300 @Override 301 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 302 switch (hash) { 303 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 304 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // DataType 305 default: return super.getProperty(hash, name, checkValid); 306 } 307 308 } 309 310 @Override 311 public Base setProperty(int hash, String name, Base value) throws FHIRException { 312 switch (hash) { 313 case -1285004149: // quantity 314 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 315 return value; 316 case 3242771: // item 317 this.item = TypeConvertor.castToType(value); // DataType 318 return value; 319 default: return super.setProperty(hash, name, value); 320 } 321 322 } 323 324 @Override 325 public Base setProperty(String name, Base value) throws FHIRException { 326 if (name.equals("quantity")) { 327 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 328 } else if (name.equals("item[x]")) { 329 this.item = TypeConvertor.castToType(value); // DataType 330 } else 331 return super.setProperty(name, value); 332 return value; 333 } 334 335 @Override 336 public Base makeProperty(int hash, String name) throws FHIRException { 337 switch (hash) { 338 case -1285004149: return getQuantity(); 339 case 2116201613: return getItem(); 340 case 3242771: return getItem(); 341 default: return super.makeProperty(hash, name); 342 } 343 344 } 345 346 @Override 347 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 348 switch (hash) { 349 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 350 case 3242771: /*item*/ return new String[] {"CodeableConcept", "Reference"}; 351 default: return super.getTypesForProperty(hash, name); 352 } 353 354 } 355 356 @Override 357 public Base addChild(String name) throws FHIRException { 358 if (name.equals("quantity")) { 359 this.quantity = new Quantity(); 360 return this.quantity; 361 } 362 else if (name.equals("itemCodeableConcept")) { 363 this.item = new CodeableConcept(); 364 return this.item; 365 } 366 else if (name.equals("itemReference")) { 367 this.item = new Reference(); 368 return this.item; 369 } 370 else 371 return super.addChild(name); 372 } 373 374 public SupplyDeliverySuppliedItemComponent copy() { 375 SupplyDeliverySuppliedItemComponent dst = new SupplyDeliverySuppliedItemComponent(); 376 copyValues(dst); 377 return dst; 378 } 379 380 public void copyValues(SupplyDeliverySuppliedItemComponent dst) { 381 super.copyValues(dst); 382 dst.quantity = quantity == null ? null : quantity.copy(); 383 dst.item = item == null ? null : item.copy(); 384 } 385 386 @Override 387 public boolean equalsDeep(Base other_) { 388 if (!super.equalsDeep(other_)) 389 return false; 390 if (!(other_ instanceof SupplyDeliverySuppliedItemComponent)) 391 return false; 392 SupplyDeliverySuppliedItemComponent o = (SupplyDeliverySuppliedItemComponent) other_; 393 return compareDeep(quantity, o.quantity, true) && compareDeep(item, o.item, true); 394 } 395 396 @Override 397 public boolean equalsShallow(Base other_) { 398 if (!super.equalsShallow(other_)) 399 return false; 400 if (!(other_ instanceof SupplyDeliverySuppliedItemComponent)) 401 return false; 402 SupplyDeliverySuppliedItemComponent o = (SupplyDeliverySuppliedItemComponent) other_; 403 return true; 404 } 405 406 public boolean isEmpty() { 407 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(quantity, item); 408 } 409 410 public String fhirType() { 411 return "SupplyDelivery.suppliedItem"; 412 413 } 414 415 } 416 417 /** 418 * Identifier for the supply delivery event that is used to identify it across multiple disparate systems. 419 */ 420 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 421 @Description(shortDefinition="External identifier", formalDefinition="Identifier for the supply delivery event that is used to identify it across multiple disparate systems." ) 422 protected List<Identifier> identifier; 423 424 /** 425 * A plan, proposal or order that is fulfilled in whole or in part by this event. 426 */ 427 @Child(name = "basedOn", type = {SupplyRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 428 @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this event." ) 429 protected List<Reference> basedOn; 430 431 /** 432 * A larger event of which this particular event is a component or step. 433 */ 434 @Child(name = "partOf", type = {SupplyDelivery.class, Contract.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 435 @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." ) 436 protected List<Reference> partOf; 437 438 /** 439 * A code specifying the state of the dispense event. 440 */ 441 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 442 @Description(shortDefinition="in-progress | completed | abandoned | entered-in-error", formalDefinition="A code specifying the state of the dispense event." ) 443 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplydelivery-status") 444 protected Enumeration<SupplyDeliveryStatus> status; 445 446 /** 447 * A link to a resource representing the person whom the delivered item is for. 448 */ 449 @Child(name = "patient", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=false) 450 @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the delivered item is for." ) 451 protected Reference patient; 452 453 /** 454 * Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. 455 */ 456 @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 457 @Description(shortDefinition="Category of dispense event", formalDefinition="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ) 458 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplydelivery-type") 459 protected CodeableConcept type; 460 461 /** 462 * The item that is being delivered or has been supplied. 463 */ 464 @Child(name = "suppliedItem", type = {}, order=6, min=0, max=1, modifier=false, summary=false) 465 @Description(shortDefinition="The item that is delivered or supplied", formalDefinition="The item that is being delivered or has been supplied." ) 466 protected SupplyDeliverySuppliedItemComponent suppliedItem; 467 468 /** 469 * The date or time(s) the activity occurred. 470 */ 471 @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=7, min=0, max=1, modifier=false, summary=true) 472 @Description(shortDefinition="When event occurred", formalDefinition="The date or time(s) the activity occurred." ) 473 protected DataType occurrence; 474 475 /** 476 * The individual responsible for dispensing the medication, supplier or device. 477 */ 478 @Child(name = "supplier", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=false) 479 @Description(shortDefinition="Dispenser", formalDefinition="The individual responsible for dispensing the medication, supplier or device." ) 480 protected Reference supplier; 481 482 /** 483 * Identification of the facility/location where the Supply was shipped to, as part of the dispense event. 484 */ 485 @Child(name = "destination", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=false) 486 @Description(shortDefinition="Where the Supply was sent", formalDefinition="Identification of the facility/location where the Supply was shipped to, as part of the dispense event." ) 487 protected Reference destination; 488 489 /** 490 * Identifies the person who picked up the Supply. 491 */ 492 @Child(name = "receiver", type = {Practitioner.class, PractitionerRole.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 493 @Description(shortDefinition="Who collected the Supply", formalDefinition="Identifies the person who picked up the Supply." ) 494 protected List<Reference> receiver; 495 496 private static final long serialVersionUID = -841753644L; 497 498 /** 499 * Constructor 500 */ 501 public SupplyDelivery() { 502 super(); 503 } 504 505 /** 506 * @return {@link #identifier} (Identifier for the supply delivery event that is used to identify it across multiple disparate systems.) 507 */ 508 public List<Identifier> getIdentifier() { 509 if (this.identifier == null) 510 this.identifier = new ArrayList<Identifier>(); 511 return this.identifier; 512 } 513 514 /** 515 * @return Returns a reference to <code>this</code> for easy method chaining 516 */ 517 public SupplyDelivery setIdentifier(List<Identifier> theIdentifier) { 518 this.identifier = theIdentifier; 519 return this; 520 } 521 522 public boolean hasIdentifier() { 523 if (this.identifier == null) 524 return false; 525 for (Identifier item : this.identifier) 526 if (!item.isEmpty()) 527 return true; 528 return false; 529 } 530 531 public Identifier addIdentifier() { //3 532 Identifier t = new Identifier(); 533 if (this.identifier == null) 534 this.identifier = new ArrayList<Identifier>(); 535 this.identifier.add(t); 536 return t; 537 } 538 539 public SupplyDelivery addIdentifier(Identifier t) { //3 540 if (t == null) 541 return this; 542 if (this.identifier == null) 543 this.identifier = new ArrayList<Identifier>(); 544 this.identifier.add(t); 545 return this; 546 } 547 548 /** 549 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 550 */ 551 public Identifier getIdentifierFirstRep() { 552 if (getIdentifier().isEmpty()) { 553 addIdentifier(); 554 } 555 return getIdentifier().get(0); 556 } 557 558 /** 559 * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this event.) 560 */ 561 public List<Reference> getBasedOn() { 562 if (this.basedOn == null) 563 this.basedOn = new ArrayList<Reference>(); 564 return this.basedOn; 565 } 566 567 /** 568 * @return Returns a reference to <code>this</code> for easy method chaining 569 */ 570 public SupplyDelivery setBasedOn(List<Reference> theBasedOn) { 571 this.basedOn = theBasedOn; 572 return this; 573 } 574 575 public boolean hasBasedOn() { 576 if (this.basedOn == null) 577 return false; 578 for (Reference item : this.basedOn) 579 if (!item.isEmpty()) 580 return true; 581 return false; 582 } 583 584 public Reference addBasedOn() { //3 585 Reference t = new Reference(); 586 if (this.basedOn == null) 587 this.basedOn = new ArrayList<Reference>(); 588 this.basedOn.add(t); 589 return t; 590 } 591 592 public SupplyDelivery addBasedOn(Reference t) { //3 593 if (t == null) 594 return this; 595 if (this.basedOn == null) 596 this.basedOn = new ArrayList<Reference>(); 597 this.basedOn.add(t); 598 return this; 599 } 600 601 /** 602 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} 603 */ 604 public Reference getBasedOnFirstRep() { 605 if (getBasedOn().isEmpty()) { 606 addBasedOn(); 607 } 608 return getBasedOn().get(0); 609 } 610 611 /** 612 * @return {@link #partOf} (A larger event of which this particular event is a component or step.) 613 */ 614 public List<Reference> getPartOf() { 615 if (this.partOf == null) 616 this.partOf = new ArrayList<Reference>(); 617 return this.partOf; 618 } 619 620 /** 621 * @return Returns a reference to <code>this</code> for easy method chaining 622 */ 623 public SupplyDelivery setPartOf(List<Reference> thePartOf) { 624 this.partOf = thePartOf; 625 return this; 626 } 627 628 public boolean hasPartOf() { 629 if (this.partOf == null) 630 return false; 631 for (Reference item : this.partOf) 632 if (!item.isEmpty()) 633 return true; 634 return false; 635 } 636 637 public Reference addPartOf() { //3 638 Reference t = new Reference(); 639 if (this.partOf == null) 640 this.partOf = new ArrayList<Reference>(); 641 this.partOf.add(t); 642 return t; 643 } 644 645 public SupplyDelivery addPartOf(Reference t) { //3 646 if (t == null) 647 return this; 648 if (this.partOf == null) 649 this.partOf = new ArrayList<Reference>(); 650 this.partOf.add(t); 651 return this; 652 } 653 654 /** 655 * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3} 656 */ 657 public Reference getPartOfFirstRep() { 658 if (getPartOf().isEmpty()) { 659 addPartOf(); 660 } 661 return getPartOf().get(0); 662 } 663 664 /** 665 * @return {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 666 */ 667 public Enumeration<SupplyDeliveryStatus> getStatusElement() { 668 if (this.status == null) 669 if (Configuration.errorOnAutoCreate()) 670 throw new Error("Attempt to auto-create SupplyDelivery.status"); 671 else if (Configuration.doAutoCreate()) 672 this.status = new Enumeration<SupplyDeliveryStatus>(new SupplyDeliveryStatusEnumFactory()); // bb 673 return this.status; 674 } 675 676 public boolean hasStatusElement() { 677 return this.status != null && !this.status.isEmpty(); 678 } 679 680 public boolean hasStatus() { 681 return this.status != null && !this.status.isEmpty(); 682 } 683 684 /** 685 * @param value {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 686 */ 687 public SupplyDelivery setStatusElement(Enumeration<SupplyDeliveryStatus> value) { 688 this.status = value; 689 return this; 690 } 691 692 /** 693 * @return A code specifying the state of the dispense event. 694 */ 695 public SupplyDeliveryStatus getStatus() { 696 return this.status == null ? null : this.status.getValue(); 697 } 698 699 /** 700 * @param value A code specifying the state of the dispense event. 701 */ 702 public SupplyDelivery setStatus(SupplyDeliveryStatus value) { 703 if (value == null) 704 this.status = null; 705 else { 706 if (this.status == null) 707 this.status = new Enumeration<SupplyDeliveryStatus>(new SupplyDeliveryStatusEnumFactory()); 708 this.status.setValue(value); 709 } 710 return this; 711 } 712 713 /** 714 * @return {@link #patient} (A link to a resource representing the person whom the delivered item is for.) 715 */ 716 public Reference getPatient() { 717 if (this.patient == null) 718 if (Configuration.errorOnAutoCreate()) 719 throw new Error("Attempt to auto-create SupplyDelivery.patient"); 720 else if (Configuration.doAutoCreate()) 721 this.patient = new Reference(); // cc 722 return this.patient; 723 } 724 725 public boolean hasPatient() { 726 return this.patient != null && !this.patient.isEmpty(); 727 } 728 729 /** 730 * @param value {@link #patient} (A link to a resource representing the person whom the delivered item is for.) 731 */ 732 public SupplyDelivery setPatient(Reference value) { 733 this.patient = value; 734 return this; 735 } 736 737 /** 738 * @return {@link #type} (Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) 739 */ 740 public CodeableConcept getType() { 741 if (this.type == null) 742 if (Configuration.errorOnAutoCreate()) 743 throw new Error("Attempt to auto-create SupplyDelivery.type"); 744 else if (Configuration.doAutoCreate()) 745 this.type = new CodeableConcept(); // cc 746 return this.type; 747 } 748 749 public boolean hasType() { 750 return this.type != null && !this.type.isEmpty(); 751 } 752 753 /** 754 * @param value {@link #type} (Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.) 755 */ 756 public SupplyDelivery setType(CodeableConcept value) { 757 this.type = value; 758 return this; 759 } 760 761 /** 762 * @return {@link #suppliedItem} (The item that is being delivered or has been supplied.) 763 */ 764 public SupplyDeliverySuppliedItemComponent getSuppliedItem() { 765 if (this.suppliedItem == null) 766 if (Configuration.errorOnAutoCreate()) 767 throw new Error("Attempt to auto-create SupplyDelivery.suppliedItem"); 768 else if (Configuration.doAutoCreate()) 769 this.suppliedItem = new SupplyDeliverySuppliedItemComponent(); // cc 770 return this.suppliedItem; 771 } 772 773 public boolean hasSuppliedItem() { 774 return this.suppliedItem != null && !this.suppliedItem.isEmpty(); 775 } 776 777 /** 778 * @param value {@link #suppliedItem} (The item that is being delivered or has been supplied.) 779 */ 780 public SupplyDelivery setSuppliedItem(SupplyDeliverySuppliedItemComponent value) { 781 this.suppliedItem = value; 782 return this; 783 } 784 785 /** 786 * @return {@link #occurrence} (The date or time(s) the activity occurred.) 787 */ 788 public DataType getOccurrence() { 789 return this.occurrence; 790 } 791 792 /** 793 * @return {@link #occurrence} (The date or time(s) the activity occurred.) 794 */ 795 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 796 if (this.occurrence == null) 797 this.occurrence = new DateTimeType(); 798 if (!(this.occurrence instanceof DateTimeType)) 799 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 800 return (DateTimeType) this.occurrence; 801 } 802 803 public boolean hasOccurrenceDateTimeType() { 804 return this != null && this.occurrence instanceof DateTimeType; 805 } 806 807 /** 808 * @return {@link #occurrence} (The date or time(s) the activity occurred.) 809 */ 810 public Period getOccurrencePeriod() throws FHIRException { 811 if (this.occurrence == null) 812 this.occurrence = new Period(); 813 if (!(this.occurrence instanceof Period)) 814 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 815 return (Period) this.occurrence; 816 } 817 818 public boolean hasOccurrencePeriod() { 819 return this != null && this.occurrence instanceof Period; 820 } 821 822 /** 823 * @return {@link #occurrence} (The date or time(s) the activity occurred.) 824 */ 825 public Timing getOccurrenceTiming() throws FHIRException { 826 if (this.occurrence == null) 827 this.occurrence = new Timing(); 828 if (!(this.occurrence instanceof Timing)) 829 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 830 return (Timing) this.occurrence; 831 } 832 833 public boolean hasOccurrenceTiming() { 834 return this != null && this.occurrence instanceof Timing; 835 } 836 837 public boolean hasOccurrence() { 838 return this.occurrence != null && !this.occurrence.isEmpty(); 839 } 840 841 /** 842 * @param value {@link #occurrence} (The date or time(s) the activity occurred.) 843 */ 844 public SupplyDelivery setOccurrence(DataType value) { 845 if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) 846 throw new Error("Not the right type for SupplyDelivery.occurrence[x]: "+value.fhirType()); 847 this.occurrence = value; 848 return this; 849 } 850 851 /** 852 * @return {@link #supplier} (The individual responsible for dispensing the medication, supplier or device.) 853 */ 854 public Reference getSupplier() { 855 if (this.supplier == null) 856 if (Configuration.errorOnAutoCreate()) 857 throw new Error("Attempt to auto-create SupplyDelivery.supplier"); 858 else if (Configuration.doAutoCreate()) 859 this.supplier = new Reference(); // cc 860 return this.supplier; 861 } 862 863 public boolean hasSupplier() { 864 return this.supplier != null && !this.supplier.isEmpty(); 865 } 866 867 /** 868 * @param value {@link #supplier} (The individual responsible for dispensing the medication, supplier or device.) 869 */ 870 public SupplyDelivery setSupplier(Reference value) { 871 this.supplier = value; 872 return this; 873 } 874 875 /** 876 * @return {@link #destination} (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) 877 */ 878 public Reference getDestination() { 879 if (this.destination == null) 880 if (Configuration.errorOnAutoCreate()) 881 throw new Error("Attempt to auto-create SupplyDelivery.destination"); 882 else if (Configuration.doAutoCreate()) 883 this.destination = new Reference(); // cc 884 return this.destination; 885 } 886 887 public boolean hasDestination() { 888 return this.destination != null && !this.destination.isEmpty(); 889 } 890 891 /** 892 * @param value {@link #destination} (Identification of the facility/location where the Supply was shipped to, as part of the dispense event.) 893 */ 894 public SupplyDelivery setDestination(Reference value) { 895 this.destination = value; 896 return this; 897 } 898 899 /** 900 * @return {@link #receiver} (Identifies the person who picked up the Supply.) 901 */ 902 public List<Reference> getReceiver() { 903 if (this.receiver == null) 904 this.receiver = new ArrayList<Reference>(); 905 return this.receiver; 906 } 907 908 /** 909 * @return Returns a reference to <code>this</code> for easy method chaining 910 */ 911 public SupplyDelivery setReceiver(List<Reference> theReceiver) { 912 this.receiver = theReceiver; 913 return this; 914 } 915 916 public boolean hasReceiver() { 917 if (this.receiver == null) 918 return false; 919 for (Reference item : this.receiver) 920 if (!item.isEmpty()) 921 return true; 922 return false; 923 } 924 925 public Reference addReceiver() { //3 926 Reference t = new Reference(); 927 if (this.receiver == null) 928 this.receiver = new ArrayList<Reference>(); 929 this.receiver.add(t); 930 return t; 931 } 932 933 public SupplyDelivery addReceiver(Reference t) { //3 934 if (t == null) 935 return this; 936 if (this.receiver == null) 937 this.receiver = new ArrayList<Reference>(); 938 this.receiver.add(t); 939 return this; 940 } 941 942 /** 943 * @return The first repetition of repeating field {@link #receiver}, creating it if it does not already exist {3} 944 */ 945 public Reference getReceiverFirstRep() { 946 if (getReceiver().isEmpty()) { 947 addReceiver(); 948 } 949 return getReceiver().get(0); 950 } 951 952 protected void listChildren(List<Property> children) { 953 super.listChildren(children); 954 children.add(new Property("identifier", "Identifier", "Identifier for the supply delivery event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier)); 955 children.add(new Property("basedOn", "Reference(SupplyRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 956 children.add(new Property("partOf", "Reference(SupplyDelivery|Contract)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf)); 957 children.add(new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status)); 958 children.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the delivered item is for.", 0, 1, patient)); 959 children.add(new Property("type", "CodeableConcept", "Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", 0, 1, type)); 960 children.add(new Property("suppliedItem", "", "The item that is being delivered or has been supplied.", 0, 1, suppliedItem)); 961 children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence)); 962 children.add(new Property("supplier", "Reference(Practitioner|PractitionerRole|Organization)", "The individual responsible for dispensing the medication, supplier or device.", 0, 1, supplier)); 963 children.add(new Property("destination", "Reference(Location)", "Identification of the facility/location where the Supply was shipped to, as part of the dispense event.", 0, 1, destination)); 964 children.add(new Property("receiver", "Reference(Practitioner|PractitionerRole)", "Identifies the person who picked up the Supply.", 0, java.lang.Integer.MAX_VALUE, receiver)); 965 } 966 967 @Override 968 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 969 switch (_hash) { 970 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier for the supply delivery event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier); 971 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(SupplyRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn); 972 case -995410646: /*partOf*/ return new Property("partOf", "Reference(SupplyDelivery|Contract)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf); 973 case -892481550: /*status*/ return new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status); 974 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the delivered item is for.", 0, 1, patient); 975 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.", 0, 1, type); 976 case 1993333233: /*suppliedItem*/ return new Property("suppliedItem", "", "The item that is being delivered or has been supplied.", 0, 1, suppliedItem); 977 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence); 978 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence); 979 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime", "The date or time(s) the activity occurred.", 0, 1, occurrence); 980 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "Period", "The date or time(s) the activity occurred.", 0, 1, occurrence); 981 case 1515218299: /*occurrenceTiming*/ return new Property("occurrence[x]", "Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence); 982 case -1663305268: /*supplier*/ return new Property("supplier", "Reference(Practitioner|PractitionerRole|Organization)", "The individual responsible for dispensing the medication, supplier or device.", 0, 1, supplier); 983 case -1429847026: /*destination*/ return new Property("destination", "Reference(Location)", "Identification of the facility/location where the Supply was shipped to, as part of the dispense event.", 0, 1, destination); 984 case -808719889: /*receiver*/ return new Property("receiver", "Reference(Practitioner|PractitionerRole)", "Identifies the person who picked up the Supply.", 0, java.lang.Integer.MAX_VALUE, receiver); 985 default: return super.getNamedProperty(_hash, _name, _checkValid); 986 } 987 988 } 989 990 @Override 991 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 992 switch (hash) { 993 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 994 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 995 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 996 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SupplyDeliveryStatus> 997 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 998 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 999 case 1993333233: /*suppliedItem*/ return this.suppliedItem == null ? new Base[0] : new Base[] {this.suppliedItem}; // SupplyDeliverySuppliedItemComponent 1000 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType 1001 case -1663305268: /*supplier*/ return this.supplier == null ? new Base[0] : new Base[] {this.supplier}; // Reference 1002 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference 1003 case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : this.receiver.toArray(new Base[this.receiver.size()]); // Reference 1004 default: return super.getProperty(hash, name, checkValid); 1005 } 1006 1007 } 1008 1009 @Override 1010 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1011 switch (hash) { 1012 case -1618432855: // identifier 1013 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1014 return value; 1015 case -332612366: // basedOn 1016 this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference 1017 return value; 1018 case -995410646: // partOf 1019 this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference 1020 return value; 1021 case -892481550: // status 1022 value = new SupplyDeliveryStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1023 this.status = (Enumeration) value; // Enumeration<SupplyDeliveryStatus> 1024 return value; 1025 case -791418107: // patient 1026 this.patient = TypeConvertor.castToReference(value); // Reference 1027 return value; 1028 case 3575610: // type 1029 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1030 return value; 1031 case 1993333233: // suppliedItem 1032 this.suppliedItem = (SupplyDeliverySuppliedItemComponent) value; // SupplyDeliverySuppliedItemComponent 1033 return value; 1034 case 1687874001: // occurrence 1035 this.occurrence = TypeConvertor.castToType(value); // DataType 1036 return value; 1037 case -1663305268: // supplier 1038 this.supplier = TypeConvertor.castToReference(value); // Reference 1039 return value; 1040 case -1429847026: // destination 1041 this.destination = TypeConvertor.castToReference(value); // Reference 1042 return value; 1043 case -808719889: // receiver 1044 this.getReceiver().add(TypeConvertor.castToReference(value)); // Reference 1045 return value; 1046 default: return super.setProperty(hash, name, value); 1047 } 1048 1049 } 1050 1051 @Override 1052 public Base setProperty(String name, Base value) throws FHIRException { 1053 if (name.equals("identifier")) { 1054 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1055 } else if (name.equals("basedOn")) { 1056 this.getBasedOn().add(TypeConvertor.castToReference(value)); 1057 } else if (name.equals("partOf")) { 1058 this.getPartOf().add(TypeConvertor.castToReference(value)); 1059 } else if (name.equals("status")) { 1060 value = new SupplyDeliveryStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1061 this.status = (Enumeration) value; // Enumeration<SupplyDeliveryStatus> 1062 } else if (name.equals("patient")) { 1063 this.patient = TypeConvertor.castToReference(value); // Reference 1064 } else if (name.equals("type")) { 1065 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1066 } else if (name.equals("suppliedItem")) { 1067 this.suppliedItem = (SupplyDeliverySuppliedItemComponent) value; // SupplyDeliverySuppliedItemComponent 1068 } else if (name.equals("occurrence[x]")) { 1069 this.occurrence = TypeConvertor.castToType(value); // DataType 1070 } else if (name.equals("supplier")) { 1071 this.supplier = TypeConvertor.castToReference(value); // Reference 1072 } else if (name.equals("destination")) { 1073 this.destination = TypeConvertor.castToReference(value); // Reference 1074 } else if (name.equals("receiver")) { 1075 this.getReceiver().add(TypeConvertor.castToReference(value)); 1076 } else 1077 return super.setProperty(name, value); 1078 return value; 1079 } 1080 1081 @Override 1082 public Base makeProperty(int hash, String name) throws FHIRException { 1083 switch (hash) { 1084 case -1618432855: return addIdentifier(); 1085 case -332612366: return addBasedOn(); 1086 case -995410646: return addPartOf(); 1087 case -892481550: return getStatusElement(); 1088 case -791418107: return getPatient(); 1089 case 3575610: return getType(); 1090 case 1993333233: return getSuppliedItem(); 1091 case -2022646513: return getOccurrence(); 1092 case 1687874001: return getOccurrence(); 1093 case -1663305268: return getSupplier(); 1094 case -1429847026: return getDestination(); 1095 case -808719889: return addReceiver(); 1096 default: return super.makeProperty(hash, name); 1097 } 1098 1099 } 1100 1101 @Override 1102 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1103 switch (hash) { 1104 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1105 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1106 case -995410646: /*partOf*/ return new String[] {"Reference"}; 1107 case -892481550: /*status*/ return new String[] {"code"}; 1108 case -791418107: /*patient*/ return new String[] {"Reference"}; 1109 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1110 case 1993333233: /*suppliedItem*/ return new String[] {}; 1111 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"}; 1112 case -1663305268: /*supplier*/ return new String[] {"Reference"}; 1113 case -1429847026: /*destination*/ return new String[] {"Reference"}; 1114 case -808719889: /*receiver*/ return new String[] {"Reference"}; 1115 default: return super.getTypesForProperty(hash, name); 1116 } 1117 1118 } 1119 1120 @Override 1121 public Base addChild(String name) throws FHIRException { 1122 if (name.equals("identifier")) { 1123 return addIdentifier(); 1124 } 1125 else if (name.equals("basedOn")) { 1126 return addBasedOn(); 1127 } 1128 else if (name.equals("partOf")) { 1129 return addPartOf(); 1130 } 1131 else if (name.equals("status")) { 1132 throw new FHIRException("Cannot call addChild on a primitive type SupplyDelivery.status"); 1133 } 1134 else if (name.equals("patient")) { 1135 this.patient = new Reference(); 1136 return this.patient; 1137 } 1138 else if (name.equals("type")) { 1139 this.type = new CodeableConcept(); 1140 return this.type; 1141 } 1142 else if (name.equals("suppliedItem")) { 1143 this.suppliedItem = new SupplyDeliverySuppliedItemComponent(); 1144 return this.suppliedItem; 1145 } 1146 else if (name.equals("occurrenceDateTime")) { 1147 this.occurrence = new DateTimeType(); 1148 return this.occurrence; 1149 } 1150 else if (name.equals("occurrencePeriod")) { 1151 this.occurrence = new Period(); 1152 return this.occurrence; 1153 } 1154 else if (name.equals("occurrenceTiming")) { 1155 this.occurrence = new Timing(); 1156 return this.occurrence; 1157 } 1158 else if (name.equals("supplier")) { 1159 this.supplier = new Reference(); 1160 return this.supplier; 1161 } 1162 else if (name.equals("destination")) { 1163 this.destination = new Reference(); 1164 return this.destination; 1165 } 1166 else if (name.equals("receiver")) { 1167 return addReceiver(); 1168 } 1169 else 1170 return super.addChild(name); 1171 } 1172 1173 public String fhirType() { 1174 return "SupplyDelivery"; 1175 1176 } 1177 1178 public SupplyDelivery copy() { 1179 SupplyDelivery dst = new SupplyDelivery(); 1180 copyValues(dst); 1181 return dst; 1182 } 1183 1184 public void copyValues(SupplyDelivery dst) { 1185 super.copyValues(dst); 1186 if (identifier != null) { 1187 dst.identifier = new ArrayList<Identifier>(); 1188 for (Identifier i : identifier) 1189 dst.identifier.add(i.copy()); 1190 }; 1191 if (basedOn != null) { 1192 dst.basedOn = new ArrayList<Reference>(); 1193 for (Reference i : basedOn) 1194 dst.basedOn.add(i.copy()); 1195 }; 1196 if (partOf != null) { 1197 dst.partOf = new ArrayList<Reference>(); 1198 for (Reference i : partOf) 1199 dst.partOf.add(i.copy()); 1200 }; 1201 dst.status = status == null ? null : status.copy(); 1202 dst.patient = patient == null ? null : patient.copy(); 1203 dst.type = type == null ? null : type.copy(); 1204 dst.suppliedItem = suppliedItem == null ? null : suppliedItem.copy(); 1205 dst.occurrence = occurrence == null ? null : occurrence.copy(); 1206 dst.supplier = supplier == null ? null : supplier.copy(); 1207 dst.destination = destination == null ? null : destination.copy(); 1208 if (receiver != null) { 1209 dst.receiver = new ArrayList<Reference>(); 1210 for (Reference i : receiver) 1211 dst.receiver.add(i.copy()); 1212 }; 1213 } 1214 1215 protected SupplyDelivery typedCopy() { 1216 return copy(); 1217 } 1218 1219 @Override 1220 public boolean equalsDeep(Base other_) { 1221 if (!super.equalsDeep(other_)) 1222 return false; 1223 if (!(other_ instanceof SupplyDelivery)) 1224 return false; 1225 SupplyDelivery o = (SupplyDelivery) other_; 1226 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) 1227 && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) && compareDeep(type, o.type, true) 1228 && compareDeep(suppliedItem, o.suppliedItem, true) && compareDeep(occurrence, o.occurrence, true) 1229 && compareDeep(supplier, o.supplier, true) && compareDeep(destination, o.destination, true) && compareDeep(receiver, o.receiver, true) 1230 ; 1231 } 1232 1233 @Override 1234 public boolean equalsShallow(Base other_) { 1235 if (!super.equalsShallow(other_)) 1236 return false; 1237 if (!(other_ instanceof SupplyDelivery)) 1238 return false; 1239 SupplyDelivery o = (SupplyDelivery) other_; 1240 return compareValues(status, o.status, true); 1241 } 1242 1243 public boolean isEmpty() { 1244 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf 1245 , status, patient, type, suppliedItem, occurrence, supplier, destination, receiver 1246 ); 1247 } 1248 1249 @Override 1250 public ResourceType getResourceType() { 1251 return ResourceType.SupplyDelivery; 1252 } 1253 1254 /** 1255 * Search parameter: <b>receiver</b> 1256 * <p> 1257 * Description: <b>Who collected the Supply</b><br> 1258 * Type: <b>reference</b><br> 1259 * Path: <b>SupplyDelivery.receiver</b><br> 1260 * </p> 1261 */ 1262 @SearchParamDefinition(name="receiver", path="SupplyDelivery.receiver", description="Who collected the Supply", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class, PractitionerRole.class } ) 1263 public static final String SP_RECEIVER = "receiver"; 1264 /** 1265 * <b>Fluent Client</b> search parameter constant for <b>receiver</b> 1266 * <p> 1267 * Description: <b>Who collected the Supply</b><br> 1268 * Type: <b>reference</b><br> 1269 * Path: <b>SupplyDelivery.receiver</b><br> 1270 * </p> 1271 */ 1272 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECEIVER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECEIVER); 1273 1274/** 1275 * Constant for fluent queries to be used to add include statements. Specifies 1276 * the path value of "<b>SupplyDelivery:receiver</b>". 1277 */ 1278 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECEIVER = new ca.uhn.fhir.model.api.Include("SupplyDelivery:receiver").toLocked(); 1279 1280 /** 1281 * Search parameter: <b>status</b> 1282 * <p> 1283 * Description: <b>in-progress | completed | abandoned | entered-in-error</b><br> 1284 * Type: <b>token</b><br> 1285 * Path: <b>SupplyDelivery.status</b><br> 1286 * </p> 1287 */ 1288 @SearchParamDefinition(name="status", path="SupplyDelivery.status", description="in-progress | completed | abandoned | entered-in-error", type="token" ) 1289 public static final String SP_STATUS = "status"; 1290 /** 1291 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1292 * <p> 1293 * Description: <b>in-progress | completed | abandoned | entered-in-error</b><br> 1294 * Type: <b>token</b><br> 1295 * Path: <b>SupplyDelivery.status</b><br> 1296 * </p> 1297 */ 1298 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1299 1300 /** 1301 * Search parameter: <b>supplier</b> 1302 * <p> 1303 * Description: <b>Dispenser</b><br> 1304 * Type: <b>reference</b><br> 1305 * Path: <b>SupplyDelivery.supplier</b><br> 1306 * </p> 1307 */ 1308 @SearchParamDefinition(name="supplier", path="SupplyDelivery.supplier", description="Dispenser", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } ) 1309 public static final String SP_SUPPLIER = "supplier"; 1310 /** 1311 * <b>Fluent Client</b> search parameter constant for <b>supplier</b> 1312 * <p> 1313 * Description: <b>Dispenser</b><br> 1314 * Type: <b>reference</b><br> 1315 * Path: <b>SupplyDelivery.supplier</b><br> 1316 * </p> 1317 */ 1318 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPLIER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPLIER); 1319 1320/** 1321 * Constant for fluent queries to be used to add include statements. Specifies 1322 * the path value of "<b>SupplyDelivery:supplier</b>". 1323 */ 1324 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPLIER = new ca.uhn.fhir.model.api.Include("SupplyDelivery:supplier").toLocked(); 1325 1326 /** 1327 * Search parameter: <b>identifier</b> 1328 * <p> 1329 * Description: <b>Multiple Resources: 1330 1331* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1332* [CarePlan](careplan.html): External Ids for this plan 1333* [CareTeam](careteam.html): External Ids for this team 1334* [Composition](composition.html): Version-independent identifier for the Composition 1335* [Condition](condition.html): A unique identifier of the condition record 1336* [Consent](consent.html): Identifier for this record (external references) 1337* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1338* [DeviceRequest](devicerequest.html): Business identifier for request/order 1339* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1340* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1341* [DocumentReference](documentreference.html): Identifier of the attachment binary 1342* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1343* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1344* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1345* [Goal](goal.html): External Ids for this goal 1346* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 1347* [Immunization](immunization.html): Business identifier 1348* [List](list.html): Business identifier 1349* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1350* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1351* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1352* [MedicationUsage](medicationusage.html): Return statements with this external identifier 1353* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1354* [Observation](observation.html): The unique id for a particular observation 1355* [Procedure](procedure.html): A unique identifier for a procedure 1356* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1357* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1358* [SupplyDelivery](supplydelivery.html): External identifier 1359* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1360* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1361</b><br> 1362 * Type: <b>token</b><br> 1363 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1364 * </p> 1365 */ 1366 @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 1367 public static final String SP_IDENTIFIER = "identifier"; 1368 /** 1369 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1370 * <p> 1371 * Description: <b>Multiple Resources: 1372 1373* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1374* [CarePlan](careplan.html): External Ids for this plan 1375* [CareTeam](careteam.html): External Ids for this team 1376* [Composition](composition.html): Version-independent identifier for the Composition 1377* [Condition](condition.html): A unique identifier of the condition record 1378* [Consent](consent.html): Identifier for this record (external references) 1379* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1380* [DeviceRequest](devicerequest.html): Business identifier for request/order 1381* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1382* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1383* [DocumentReference](documentreference.html): Identifier of the attachment binary 1384* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1385* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1386* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1387* [Goal](goal.html): External Ids for this goal 1388* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 1389* [Immunization](immunization.html): Business identifier 1390* [List](list.html): Business identifier 1391* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1392* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1393* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1394* [MedicationUsage](medicationusage.html): Return statements with this external identifier 1395* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1396* [Observation](observation.html): The unique id for a particular observation 1397* [Procedure](procedure.html): A unique identifier for a procedure 1398* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1399* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1400* [SupplyDelivery](supplydelivery.html): External identifier 1401* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1402* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1403</b><br> 1404 * Type: <b>token</b><br> 1405 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1406 * </p> 1407 */ 1408 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1409 1410 /** 1411 * Search parameter: <b>patient</b> 1412 * <p> 1413 * Description: <b>Multiple Resources: 1414 1415* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 1416* [CarePlan](careplan.html): Who the care plan is for 1417* [CareTeam](careteam.html): Who care team is for 1418* [ClinicalImpression](clinicalimpression.html): Patient assessed 1419* [Composition](composition.html): Who and/or what the composition is about 1420* [Condition](condition.html): Who has the condition? 1421* [Consent](consent.html): Who the consent applies to 1422* [DetectedIssue](detectedissue.html): Associated patient 1423* [DeviceRequest](devicerequest.html): Individual the service is ordered for 1424* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 1425* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 1426* [DocumentManifest](documentmanifest.html): The subject of the set of documents 1427* [DocumentReference](documentreference.html): Who/what is the subject of the document 1428* [Encounter](encounter.html): The patient present at the encounter 1429* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 1430* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 1431* [Flag](flag.html): The identity of a subject to list flags for 1432* [Goal](goal.html): Who this goal is intended for 1433* [ImagingStudy](imagingstudy.html): Who the study is about 1434* [Immunization](immunization.html): The patient for the vaccination record 1435* [List](list.html): If all resources have the same subject 1436* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 1437* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 1438* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 1439* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 1440* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 1441* [Observation](observation.html): The subject that the observation is about (if patient) 1442* [Procedure](procedure.html): Search by subject - a patient 1443* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 1444* [ServiceRequest](servicerequest.html): Search by subject - a patient 1445* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 1446* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 1447</b><br> 1448 * Type: <b>reference</b><br> 1449 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 1450 * </p> 1451 */ 1452 @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) 1453 public static final String SP_PATIENT = "patient"; 1454 /** 1455 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1456 * <p> 1457 * Description: <b>Multiple Resources: 1458 1459* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 1460* [CarePlan](careplan.html): Who the care plan is for 1461* [CareTeam](careteam.html): Who care team is for 1462* [ClinicalImpression](clinicalimpression.html): Patient assessed 1463* [Composition](composition.html): Who and/or what the composition is about 1464* [Condition](condition.html): Who has the condition? 1465* [Consent](consent.html): Who the consent applies to 1466* [DetectedIssue](detectedissue.html): Associated patient 1467* [DeviceRequest](devicerequest.html): Individual the service is ordered for 1468* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 1469* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 1470* [DocumentManifest](documentmanifest.html): The subject of the set of documents 1471* [DocumentReference](documentreference.html): Who/what is the subject of the document 1472* [Encounter](encounter.html): The patient present at the encounter 1473* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 1474* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 1475* [Flag](flag.html): The identity of a subject to list flags for 1476* [Goal](goal.html): Who this goal is intended for 1477* [ImagingStudy](imagingstudy.html): Who the study is about 1478* [Immunization](immunization.html): The patient for the vaccination record 1479* [List](list.html): If all resources have the same subject 1480* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 1481* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 1482* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 1483* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 1484* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 1485* [Observation](observation.html): The subject that the observation is about (if patient) 1486* [Procedure](procedure.html): Search by subject - a patient 1487* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 1488* [ServiceRequest](servicerequest.html): Search by subject - a patient 1489* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 1490* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 1491</b><br> 1492 * Type: <b>reference</b><br> 1493 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 1494 * </p> 1495 */ 1496 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1497 1498/** 1499 * Constant for fluent queries to be used to add include statements. Specifies 1500 * the path value of "<b>SupplyDelivery:patient</b>". 1501 */ 1502 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("SupplyDelivery:patient").toLocked(); 1503 1504 1505} 1506