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