001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4b.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A record of a request for a medication, substance or device used in the healthcare setting. 052 */ 053@ResourceDef(name="SupplyRequest", profile="http://hl7.org/fhir/StructureDefinition/SupplyRequest") 054public class SupplyRequest extends DomainResource { 055 056 public enum SupplyRequestStatus { 057 /** 058 * The request has been created but is not yet complete or ready for action. 059 */ 060 DRAFT, 061 /** 062 * The request is ready to be acted upon. 063 */ 064 ACTIVE, 065 /** 066 * The authorization/request to act has been temporarily withdrawn but is expected to resume in the future. 067 */ 068 SUSPENDED, 069 /** 070 * The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur. 071 */ 072 CANCELLED, 073 /** 074 * Activity against the request has been sufficiently completed to the satisfaction of the requester. 075 */ 076 COMPLETED, 077 /** 078 * 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 \"cancelled\" rather than \"entered-in-error\".). 079 */ 080 ENTEREDINERROR, 081 /** 082 * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. 083 */ 084 UNKNOWN, 085 /** 086 * added to help the parsers with the generic types 087 */ 088 NULL; 089 public static SupplyRequestStatus fromCode(String codeString) throws FHIRException { 090 if (codeString == null || "".equals(codeString)) 091 return null; 092 if ("draft".equals(codeString)) 093 return DRAFT; 094 if ("active".equals(codeString)) 095 return ACTIVE; 096 if ("suspended".equals(codeString)) 097 return SUSPENDED; 098 if ("cancelled".equals(codeString)) 099 return CANCELLED; 100 if ("completed".equals(codeString)) 101 return COMPLETED; 102 if ("entered-in-error".equals(codeString)) 103 return ENTEREDINERROR; 104 if ("unknown".equals(codeString)) 105 return UNKNOWN; 106 if (Configuration.isAcceptInvalidEnums()) 107 return null; 108 else 109 throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case DRAFT: return "draft"; 114 case ACTIVE: return "active"; 115 case SUSPENDED: return "suspended"; 116 case CANCELLED: return "cancelled"; 117 case COMPLETED: return "completed"; 118 case ENTEREDINERROR: return "entered-in-error"; 119 case UNKNOWN: return "unknown"; 120 case NULL: return null; 121 default: return "?"; 122 } 123 } 124 public String getSystem() { 125 switch (this) { 126 case DRAFT: return "http://hl7.org/fhir/supplyrequest-status"; 127 case ACTIVE: return "http://hl7.org/fhir/supplyrequest-status"; 128 case SUSPENDED: return "http://hl7.org/fhir/supplyrequest-status"; 129 case CANCELLED: return "http://hl7.org/fhir/supplyrequest-status"; 130 case COMPLETED: return "http://hl7.org/fhir/supplyrequest-status"; 131 case ENTEREDINERROR: return "http://hl7.org/fhir/supplyrequest-status"; 132 case UNKNOWN: return "http://hl7.org/fhir/supplyrequest-status"; 133 case NULL: return null; 134 default: return "?"; 135 } 136 } 137 public String getDefinition() { 138 switch (this) { 139 case DRAFT: return "The request has been created but is not yet complete or ready for action."; 140 case ACTIVE: return "The request is ready to be acted upon."; 141 case SUSPENDED: return "The authorization/request to act has been temporarily withdrawn but is expected to resume in the future."; 142 case CANCELLED: return "The authorization/request to act has been terminated prior to the full completion of the intended actions. No further activity should occur."; 143 case COMPLETED: return "Activity against the request has been sufficiently completed to the satisfaction of the requester."; 144 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 \"cancelled\" rather than \"entered-in-error\".)."; 145 case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; 146 case NULL: return null; 147 default: return "?"; 148 } 149 } 150 public String getDisplay() { 151 switch (this) { 152 case DRAFT: return "Draft"; 153 case ACTIVE: return "Active"; 154 case SUSPENDED: return "Suspended"; 155 case CANCELLED: return "Cancelled"; 156 case COMPLETED: return "Completed"; 157 case ENTEREDINERROR: return "Entered in Error"; 158 case UNKNOWN: return "Unknown"; 159 case NULL: return null; 160 default: return "?"; 161 } 162 } 163 } 164 165 public static class SupplyRequestStatusEnumFactory implements EnumFactory<SupplyRequestStatus> { 166 public SupplyRequestStatus fromCode(String codeString) throws IllegalArgumentException { 167 if (codeString == null || "".equals(codeString)) 168 if (codeString == null || "".equals(codeString)) 169 return null; 170 if ("draft".equals(codeString)) 171 return SupplyRequestStatus.DRAFT; 172 if ("active".equals(codeString)) 173 return SupplyRequestStatus.ACTIVE; 174 if ("suspended".equals(codeString)) 175 return SupplyRequestStatus.SUSPENDED; 176 if ("cancelled".equals(codeString)) 177 return SupplyRequestStatus.CANCELLED; 178 if ("completed".equals(codeString)) 179 return SupplyRequestStatus.COMPLETED; 180 if ("entered-in-error".equals(codeString)) 181 return SupplyRequestStatus.ENTEREDINERROR; 182 if ("unknown".equals(codeString)) 183 return SupplyRequestStatus.UNKNOWN; 184 throw new IllegalArgumentException("Unknown SupplyRequestStatus code '"+codeString+"'"); 185 } 186 public Enumeration<SupplyRequestStatus> fromType(Base code) throws FHIRException { 187 if (code == null) 188 return null; 189 if (code.isEmpty()) 190 return new Enumeration<SupplyRequestStatus>(this); 191 String codeString = ((PrimitiveType) code).asStringValue(); 192 if (codeString == null || "".equals(codeString)) 193 return null; 194 if ("draft".equals(codeString)) 195 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.DRAFT); 196 if ("active".equals(codeString)) 197 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.ACTIVE); 198 if ("suspended".equals(codeString)) 199 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.SUSPENDED); 200 if ("cancelled".equals(codeString)) 201 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.CANCELLED); 202 if ("completed".equals(codeString)) 203 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.COMPLETED); 204 if ("entered-in-error".equals(codeString)) 205 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.ENTEREDINERROR); 206 if ("unknown".equals(codeString)) 207 return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.UNKNOWN); 208 throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'"); 209 } 210 public String toCode(SupplyRequestStatus code) { 211 if (code == SupplyRequestStatus.DRAFT) 212 return "draft"; 213 if (code == SupplyRequestStatus.ACTIVE) 214 return "active"; 215 if (code == SupplyRequestStatus.SUSPENDED) 216 return "suspended"; 217 if (code == SupplyRequestStatus.CANCELLED) 218 return "cancelled"; 219 if (code == SupplyRequestStatus.COMPLETED) 220 return "completed"; 221 if (code == SupplyRequestStatus.ENTEREDINERROR) 222 return "entered-in-error"; 223 if (code == SupplyRequestStatus.UNKNOWN) 224 return "unknown"; 225 return "?"; 226 } 227 public String toSystem(SupplyRequestStatus code) { 228 return code.getSystem(); 229 } 230 } 231 232 @Block() 233 public static class SupplyRequestParameterComponent extends BackboneElement implements IBaseBackboneElement { 234 /** 235 * A code or string that identifies the device detail being asserted. 236 */ 237 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 238 @Description(shortDefinition="Item detail", formalDefinition="A code or string that identifies the device detail being asserted." ) 239 protected CodeableConcept code; 240 241 /** 242 * The value of the device detail. 243 */ 244 @Child(name = "value", type = {CodeableConcept.class, Quantity.class, Range.class, BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 245 @Description(shortDefinition="Value of detail", formalDefinition="The value of the device detail." ) 246 protected DataType value; 247 248 private static final long serialVersionUID = -1950789033L; 249 250 /** 251 * Constructor 252 */ 253 public SupplyRequestParameterComponent() { 254 super(); 255 } 256 257 /** 258 * @return {@link #code} (A code or string that identifies the device detail being asserted.) 259 */ 260 public CodeableConcept getCode() { 261 if (this.code == null) 262 if (Configuration.errorOnAutoCreate()) 263 throw new Error("Attempt to auto-create SupplyRequestParameterComponent.code"); 264 else if (Configuration.doAutoCreate()) 265 this.code = new CodeableConcept(); // cc 266 return this.code; 267 } 268 269 public boolean hasCode() { 270 return this.code != null && !this.code.isEmpty(); 271 } 272 273 /** 274 * @param value {@link #code} (A code or string that identifies the device detail being asserted.) 275 */ 276 public SupplyRequestParameterComponent setCode(CodeableConcept value) { 277 this.code = value; 278 return this; 279 } 280 281 /** 282 * @return {@link #value} (The value of the device detail.) 283 */ 284 public DataType getValue() { 285 return this.value; 286 } 287 288 /** 289 * @return {@link #value} (The value of the device detail.) 290 */ 291 public CodeableConcept getValueCodeableConcept() throws FHIRException { 292 if (this.value == null) 293 this.value = new CodeableConcept(); 294 if (!(this.value instanceof CodeableConcept)) 295 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 296 return (CodeableConcept) this.value; 297 } 298 299 public boolean hasValueCodeableConcept() { 300 return this != null && this.value instanceof CodeableConcept; 301 } 302 303 /** 304 * @return {@link #value} (The value of the device detail.) 305 */ 306 public Quantity getValueQuantity() throws FHIRException { 307 if (this.value == null) 308 this.value = new Quantity(); 309 if (!(this.value instanceof Quantity)) 310 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 311 return (Quantity) this.value; 312 } 313 314 public boolean hasValueQuantity() { 315 return this != null && this.value instanceof Quantity; 316 } 317 318 /** 319 * @return {@link #value} (The value of the device detail.) 320 */ 321 public Range getValueRange() throws FHIRException { 322 if (this.value == null) 323 this.value = new Range(); 324 if (!(this.value instanceof Range)) 325 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 326 return (Range) this.value; 327 } 328 329 public boolean hasValueRange() { 330 return this != null && this.value instanceof Range; 331 } 332 333 /** 334 * @return {@link #value} (The value of the device detail.) 335 */ 336 public BooleanType getValueBooleanType() throws FHIRException { 337 if (this.value == null) 338 this.value = new BooleanType(); 339 if (!(this.value instanceof BooleanType)) 340 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 341 return (BooleanType) this.value; 342 } 343 344 public boolean hasValueBooleanType() { 345 return this != null && this.value instanceof BooleanType; 346 } 347 348 public boolean hasValue() { 349 return this.value != null && !this.value.isEmpty(); 350 } 351 352 /** 353 * @param value {@link #value} (The value of the device detail.) 354 */ 355 public SupplyRequestParameterComponent setValue(DataType value) { 356 if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity || value instanceof Range || value instanceof BooleanType)) 357 throw new Error("Not the right type for SupplyRequest.parameter.value[x]: "+value.fhirType()); 358 this.value = value; 359 return this; 360 } 361 362 protected void listChildren(List<Property> children) { 363 super.listChildren(children); 364 children.add(new Property("code", "CodeableConcept", "A code or string that identifies the device detail being asserted.", 0, 1, code)); 365 children.add(new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value)); 366 } 367 368 @Override 369 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 370 switch (_hash) { 371 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code or string that identifies the device detail being asserted.", 0, 1, code); 372 case -1410166417: /*value[x]*/ return new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value); 373 case 111972721: /*value*/ return new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value); 374 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "The value of the device detail.", 0, 1, value); 375 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "The value of the device detail.", 0, 1, value); 376 case 2030761548: /*valueRange*/ return new Property("value[x]", "Range", "The value of the device detail.", 0, 1, value); 377 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "The value of the device detail.", 0, 1, value); 378 default: return super.getNamedProperty(_hash, _name, _checkValid); 379 } 380 381 } 382 383 @Override 384 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 385 switch (hash) { 386 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 387 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 388 default: return super.getProperty(hash, name, checkValid); 389 } 390 391 } 392 393 @Override 394 public Base setProperty(int hash, String name, Base value) throws FHIRException { 395 switch (hash) { 396 case 3059181: // code 397 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 398 return value; 399 case 111972721: // value 400 this.value = TypeConvertor.castToType(value); // DataType 401 return value; 402 default: return super.setProperty(hash, name, value); 403 } 404 405 } 406 407 @Override 408 public Base setProperty(String name, Base value) throws FHIRException { 409 if (name.equals("code")) { 410 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 411 } else if (name.equals("value[x]")) { 412 this.value = TypeConvertor.castToType(value); // DataType 413 } else 414 return super.setProperty(name, value); 415 return value; 416 } 417 418 @Override 419 public Base makeProperty(int hash, String name) throws FHIRException { 420 switch (hash) { 421 case 3059181: return getCode(); 422 case -1410166417: return getValue(); 423 case 111972721: return getValue(); 424 default: return super.makeProperty(hash, name); 425 } 426 427 } 428 429 @Override 430 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 431 switch (hash) { 432 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 433 case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity", "Range", "boolean"}; 434 default: return super.getTypesForProperty(hash, name); 435 } 436 437 } 438 439 @Override 440 public Base addChild(String name) throws FHIRException { 441 if (name.equals("code")) { 442 this.code = new CodeableConcept(); 443 return this.code; 444 } 445 else if (name.equals("valueCodeableConcept")) { 446 this.value = new CodeableConcept(); 447 return this.value; 448 } 449 else if (name.equals("valueQuantity")) { 450 this.value = new Quantity(); 451 return this.value; 452 } 453 else if (name.equals("valueRange")) { 454 this.value = new Range(); 455 return this.value; 456 } 457 else if (name.equals("valueBoolean")) { 458 this.value = new BooleanType(); 459 return this.value; 460 } 461 else 462 return super.addChild(name); 463 } 464 465 public SupplyRequestParameterComponent copy() { 466 SupplyRequestParameterComponent dst = new SupplyRequestParameterComponent(); 467 copyValues(dst); 468 return dst; 469 } 470 471 public void copyValues(SupplyRequestParameterComponent dst) { 472 super.copyValues(dst); 473 dst.code = code == null ? null : code.copy(); 474 dst.value = value == null ? null : value.copy(); 475 } 476 477 @Override 478 public boolean equalsDeep(Base other_) { 479 if (!super.equalsDeep(other_)) 480 return false; 481 if (!(other_ instanceof SupplyRequestParameterComponent)) 482 return false; 483 SupplyRequestParameterComponent o = (SupplyRequestParameterComponent) other_; 484 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); 485 } 486 487 @Override 488 public boolean equalsShallow(Base other_) { 489 if (!super.equalsShallow(other_)) 490 return false; 491 if (!(other_ instanceof SupplyRequestParameterComponent)) 492 return false; 493 SupplyRequestParameterComponent o = (SupplyRequestParameterComponent) other_; 494 return true; 495 } 496 497 public boolean isEmpty() { 498 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value); 499 } 500 501 public String fhirType() { 502 return "SupplyRequest.parameter"; 503 504 } 505 506 } 507 508 /** 509 * Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server. 510 */ 511 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 512 @Description(shortDefinition="Business Identifier for SupplyRequest", formalDefinition="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server." ) 513 protected List<Identifier> identifier; 514 515 /** 516 * Status of the supply request. 517 */ 518 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 519 @Description(shortDefinition="draft | active | suspended +", formalDefinition="Status of the supply request." ) 520 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-status") 521 protected Enumeration<SupplyRequestStatus> status; 522 523 /** 524 * Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process. 525 */ 526 @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 527 @Description(shortDefinition="The kind of supply (central, non-stock, etc.)", formalDefinition="Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process." ) 528 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-kind") 529 protected CodeableConcept category; 530 531 /** 532 * Indicates how quickly this SupplyRequest should be addressed with respect to other requests. 533 */ 534 @Child(name = "priority", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 535 @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly this SupplyRequest should be addressed with respect to other requests." ) 536 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 537 protected Enumeration<RequestPriority> priority; 538 539 /** 540 * The item that is requested to be supplied. 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. 541 */ 542 @Child(name = "item", type = {CodeableConcept.class, Medication.class, Substance.class, Device.class}, order=4, min=1, max=1, modifier=false, summary=true) 543 @Description(shortDefinition="Medication, Substance, or Device requested to be supplied", formalDefinition="The item that is requested to be supplied. 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." ) 544 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supply-item") 545 protected DataType item; 546 547 /** 548 * The amount that is being ordered of the indicated item. 549 */ 550 @Child(name = "quantity", type = {Quantity.class}, order=5, min=1, max=1, modifier=false, summary=true) 551 @Description(shortDefinition="The requested amount of the item indicated", formalDefinition="The amount that is being ordered of the indicated item." ) 552 protected Quantity quantity; 553 554 /** 555 * Specific parameters for the ordered item. For example, the size of the indicated item. 556 */ 557 @Child(name = "parameter", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 558 @Description(shortDefinition="Ordered item details", formalDefinition="Specific parameters for the ordered item. For example, the size of the indicated item." ) 559 protected List<SupplyRequestParameterComponent> parameter; 560 561 /** 562 * When the request should be fulfilled. 563 */ 564 @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=7, min=0, max=1, modifier=false, summary=true) 565 @Description(shortDefinition="When the request should be fulfilled", formalDefinition="When the request should be fulfilled." ) 566 protected DataType occurrence; 567 568 /** 569 * When the request was made. 570 */ 571 @Child(name = "authoredOn", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 572 @Description(shortDefinition="When the request was made", formalDefinition="When the request was made." ) 573 protected DateTimeType authoredOn; 574 575 /** 576 * The device, practitioner, etc. who initiated the request. 577 */ 578 @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class}, order=9, min=0, max=1, modifier=false, summary=true) 579 @Description(shortDefinition="Individual making the request", formalDefinition="The device, practitioner, etc. who initiated the request." ) 580 protected Reference requester; 581 582 /** 583 * Who is intended to fulfill the request. 584 */ 585 @Child(name = "supplier", type = {Organization.class, HealthcareService.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 586 @Description(shortDefinition="Who is intended to fulfill the request", formalDefinition="Who is intended to fulfill the request." ) 587 protected List<Reference> supplier; 588 589 /** 590 * The reason why the supply item was requested. 591 */ 592 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 593 @Description(shortDefinition="The reason why the supply item was requested", formalDefinition="The reason why the supply item was requested." ) 594 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-reason") 595 protected List<CodeableConcept> reasonCode; 596 597 /** 598 * The reason why the supply item was requested. 599 */ 600 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 601 @Description(shortDefinition="The reason why the supply item was requested", formalDefinition="The reason why the supply item was requested." ) 602 protected List<Reference> reasonReference; 603 604 /** 605 * Where the supply is expected to come from. 606 */ 607 @Child(name = "deliverFrom", type = {Organization.class, Location.class}, order=13, min=0, max=1, modifier=false, summary=false) 608 @Description(shortDefinition="The origin of the supply", formalDefinition="Where the supply is expected to come from." ) 609 protected Reference deliverFrom; 610 611 /** 612 * Where the supply is destined to go. 613 */ 614 @Child(name = "deliverTo", type = {Organization.class, Location.class, Patient.class}, order=14, min=0, max=1, modifier=false, summary=false) 615 @Description(shortDefinition="The destination of the supply", formalDefinition="Where the supply is destined to go." ) 616 protected Reference deliverTo; 617 618 private static final long serialVersionUID = 2079508280L; 619 620 /** 621 * Constructor 622 */ 623 public SupplyRequest() { 624 super(); 625 } 626 627 /** 628 * Constructor 629 */ 630 public SupplyRequest(DataType item, Quantity quantity) { 631 super(); 632 this.setItem(item); 633 this.setQuantity(quantity); 634 } 635 636 /** 637 * @return {@link #identifier} (Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.) 638 */ 639 public List<Identifier> getIdentifier() { 640 if (this.identifier == null) 641 this.identifier = new ArrayList<Identifier>(); 642 return this.identifier; 643 } 644 645 /** 646 * @return Returns a reference to <code>this</code> for easy method chaining 647 */ 648 public SupplyRequest setIdentifier(List<Identifier> theIdentifier) { 649 this.identifier = theIdentifier; 650 return this; 651 } 652 653 public boolean hasIdentifier() { 654 if (this.identifier == null) 655 return false; 656 for (Identifier item : this.identifier) 657 if (!item.isEmpty()) 658 return true; 659 return false; 660 } 661 662 public Identifier addIdentifier() { //3 663 Identifier t = new Identifier(); 664 if (this.identifier == null) 665 this.identifier = new ArrayList<Identifier>(); 666 this.identifier.add(t); 667 return t; 668 } 669 670 public SupplyRequest addIdentifier(Identifier t) { //3 671 if (t == null) 672 return this; 673 if (this.identifier == null) 674 this.identifier = new ArrayList<Identifier>(); 675 this.identifier.add(t); 676 return this; 677 } 678 679 /** 680 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 681 */ 682 public Identifier getIdentifierFirstRep() { 683 if (getIdentifier().isEmpty()) { 684 addIdentifier(); 685 } 686 return getIdentifier().get(0); 687 } 688 689 /** 690 * @return {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 691 */ 692 public Enumeration<SupplyRequestStatus> getStatusElement() { 693 if (this.status == null) 694 if (Configuration.errorOnAutoCreate()) 695 throw new Error("Attempt to auto-create SupplyRequest.status"); 696 else if (Configuration.doAutoCreate()) 697 this.status = new Enumeration<SupplyRequestStatus>(new SupplyRequestStatusEnumFactory()); // bb 698 return this.status; 699 } 700 701 public boolean hasStatusElement() { 702 return this.status != null && !this.status.isEmpty(); 703 } 704 705 public boolean hasStatus() { 706 return this.status != null && !this.status.isEmpty(); 707 } 708 709 /** 710 * @param value {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 711 */ 712 public SupplyRequest setStatusElement(Enumeration<SupplyRequestStatus> value) { 713 this.status = value; 714 return this; 715 } 716 717 /** 718 * @return Status of the supply request. 719 */ 720 public SupplyRequestStatus getStatus() { 721 return this.status == null ? null : this.status.getValue(); 722 } 723 724 /** 725 * @param value Status of the supply request. 726 */ 727 public SupplyRequest setStatus(SupplyRequestStatus value) { 728 if (value == null) 729 this.status = null; 730 else { 731 if (this.status == null) 732 this.status = new Enumeration<SupplyRequestStatus>(new SupplyRequestStatusEnumFactory()); 733 this.status.setValue(value); 734 } 735 return this; 736 } 737 738 /** 739 * @return {@link #category} (Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.) 740 */ 741 public CodeableConcept getCategory() { 742 if (this.category == null) 743 if (Configuration.errorOnAutoCreate()) 744 throw new Error("Attempt to auto-create SupplyRequest.category"); 745 else if (Configuration.doAutoCreate()) 746 this.category = new CodeableConcept(); // cc 747 return this.category; 748 } 749 750 public boolean hasCategory() { 751 return this.category != null && !this.category.isEmpty(); 752 } 753 754 /** 755 * @param value {@link #category} (Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.) 756 */ 757 public SupplyRequest setCategory(CodeableConcept value) { 758 this.category = value; 759 return this; 760 } 761 762 /** 763 * @return {@link #priority} (Indicates how quickly this SupplyRequest should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 764 */ 765 public Enumeration<RequestPriority> getPriorityElement() { 766 if (this.priority == null) 767 if (Configuration.errorOnAutoCreate()) 768 throw new Error("Attempt to auto-create SupplyRequest.priority"); 769 else if (Configuration.doAutoCreate()) 770 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb 771 return this.priority; 772 } 773 774 public boolean hasPriorityElement() { 775 return this.priority != null && !this.priority.isEmpty(); 776 } 777 778 public boolean hasPriority() { 779 return this.priority != null && !this.priority.isEmpty(); 780 } 781 782 /** 783 * @param value {@link #priority} (Indicates how quickly this SupplyRequest should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 784 */ 785 public SupplyRequest setPriorityElement(Enumeration<RequestPriority> value) { 786 this.priority = value; 787 return this; 788 } 789 790 /** 791 * @return Indicates how quickly this SupplyRequest should be addressed with respect to other requests. 792 */ 793 public RequestPriority getPriority() { 794 return this.priority == null ? null : this.priority.getValue(); 795 } 796 797 /** 798 * @param value Indicates how quickly this SupplyRequest should be addressed with respect to other requests. 799 */ 800 public SupplyRequest setPriority(RequestPriority value) { 801 if (value == null) 802 this.priority = null; 803 else { 804 if (this.priority == null) 805 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); 806 this.priority.setValue(value); 807 } 808 return this; 809 } 810 811 /** 812 * @return {@link #item} (The item that is requested to be supplied. 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.) 813 */ 814 public DataType getItem() { 815 return this.item; 816 } 817 818 /** 819 * @return {@link #item} (The item that is requested to be supplied. 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.) 820 */ 821 public CodeableConcept getItemCodeableConcept() throws FHIRException { 822 if (this.item == null) 823 this.item = new CodeableConcept(); 824 if (!(this.item instanceof CodeableConcept)) 825 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered"); 826 return (CodeableConcept) this.item; 827 } 828 829 public boolean hasItemCodeableConcept() { 830 return this != null && this.item instanceof CodeableConcept; 831 } 832 833 /** 834 * @return {@link #item} (The item that is requested to be supplied. 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.) 835 */ 836 public Reference getItemReference() throws FHIRException { 837 if (this.item == null) 838 this.item = new Reference(); 839 if (!(this.item instanceof Reference)) 840 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered"); 841 return (Reference) this.item; 842 } 843 844 public boolean hasItemReference() { 845 return this != null && this.item instanceof Reference; 846 } 847 848 public boolean hasItem() { 849 return this.item != null && !this.item.isEmpty(); 850 } 851 852 /** 853 * @param value {@link #item} (The item that is requested to be supplied. 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.) 854 */ 855 public SupplyRequest setItem(DataType value) { 856 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 857 throw new Error("Not the right type for SupplyRequest.item[x]: "+value.fhirType()); 858 this.item = value; 859 return this; 860 } 861 862 /** 863 * @return {@link #quantity} (The amount that is being ordered of the indicated item.) 864 */ 865 public Quantity getQuantity() { 866 if (this.quantity == null) 867 if (Configuration.errorOnAutoCreate()) 868 throw new Error("Attempt to auto-create SupplyRequest.quantity"); 869 else if (Configuration.doAutoCreate()) 870 this.quantity = new Quantity(); // cc 871 return this.quantity; 872 } 873 874 public boolean hasQuantity() { 875 return this.quantity != null && !this.quantity.isEmpty(); 876 } 877 878 /** 879 * @param value {@link #quantity} (The amount that is being ordered of the indicated item.) 880 */ 881 public SupplyRequest setQuantity(Quantity value) { 882 this.quantity = value; 883 return this; 884 } 885 886 /** 887 * @return {@link #parameter} (Specific parameters for the ordered item. For example, the size of the indicated item.) 888 */ 889 public List<SupplyRequestParameterComponent> getParameter() { 890 if (this.parameter == null) 891 this.parameter = new ArrayList<SupplyRequestParameterComponent>(); 892 return this.parameter; 893 } 894 895 /** 896 * @return Returns a reference to <code>this</code> for easy method chaining 897 */ 898 public SupplyRequest setParameter(List<SupplyRequestParameterComponent> theParameter) { 899 this.parameter = theParameter; 900 return this; 901 } 902 903 public boolean hasParameter() { 904 if (this.parameter == null) 905 return false; 906 for (SupplyRequestParameterComponent item : this.parameter) 907 if (!item.isEmpty()) 908 return true; 909 return false; 910 } 911 912 public SupplyRequestParameterComponent addParameter() { //3 913 SupplyRequestParameterComponent t = new SupplyRequestParameterComponent(); 914 if (this.parameter == null) 915 this.parameter = new ArrayList<SupplyRequestParameterComponent>(); 916 this.parameter.add(t); 917 return t; 918 } 919 920 public SupplyRequest addParameter(SupplyRequestParameterComponent t) { //3 921 if (t == null) 922 return this; 923 if (this.parameter == null) 924 this.parameter = new ArrayList<SupplyRequestParameterComponent>(); 925 this.parameter.add(t); 926 return this; 927 } 928 929 /** 930 * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist {3} 931 */ 932 public SupplyRequestParameterComponent getParameterFirstRep() { 933 if (getParameter().isEmpty()) { 934 addParameter(); 935 } 936 return getParameter().get(0); 937 } 938 939 /** 940 * @return {@link #occurrence} (When the request should be fulfilled.) 941 */ 942 public DataType getOccurrence() { 943 return this.occurrence; 944 } 945 946 /** 947 * @return {@link #occurrence} (When the request should be fulfilled.) 948 */ 949 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 950 if (this.occurrence == null) 951 this.occurrence = new DateTimeType(); 952 if (!(this.occurrence instanceof DateTimeType)) 953 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 954 return (DateTimeType) this.occurrence; 955 } 956 957 public boolean hasOccurrenceDateTimeType() { 958 return this != null && this.occurrence instanceof DateTimeType; 959 } 960 961 /** 962 * @return {@link #occurrence} (When the request should be fulfilled.) 963 */ 964 public Period getOccurrencePeriod() throws FHIRException { 965 if (this.occurrence == null) 966 this.occurrence = new Period(); 967 if (!(this.occurrence instanceof Period)) 968 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 969 return (Period) this.occurrence; 970 } 971 972 public boolean hasOccurrencePeriod() { 973 return this != null && this.occurrence instanceof Period; 974 } 975 976 /** 977 * @return {@link #occurrence} (When the request should be fulfilled.) 978 */ 979 public Timing getOccurrenceTiming() throws FHIRException { 980 if (this.occurrence == null) 981 this.occurrence = new Timing(); 982 if (!(this.occurrence instanceof Timing)) 983 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 984 return (Timing) this.occurrence; 985 } 986 987 public boolean hasOccurrenceTiming() { 988 return this != null && this.occurrence instanceof Timing; 989 } 990 991 public boolean hasOccurrence() { 992 return this.occurrence != null && !this.occurrence.isEmpty(); 993 } 994 995 /** 996 * @param value {@link #occurrence} (When the request should be fulfilled.) 997 */ 998 public SupplyRequest setOccurrence(DataType value) { 999 if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) 1000 throw new Error("Not the right type for SupplyRequest.occurrence[x]: "+value.fhirType()); 1001 this.occurrence = value; 1002 return this; 1003 } 1004 1005 /** 1006 * @return {@link #authoredOn} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 1007 */ 1008 public DateTimeType getAuthoredOnElement() { 1009 if (this.authoredOn == null) 1010 if (Configuration.errorOnAutoCreate()) 1011 throw new Error("Attempt to auto-create SupplyRequest.authoredOn"); 1012 else if (Configuration.doAutoCreate()) 1013 this.authoredOn = new DateTimeType(); // bb 1014 return this.authoredOn; 1015 } 1016 1017 public boolean hasAuthoredOnElement() { 1018 return this.authoredOn != null && !this.authoredOn.isEmpty(); 1019 } 1020 1021 public boolean hasAuthoredOn() { 1022 return this.authoredOn != null && !this.authoredOn.isEmpty(); 1023 } 1024 1025 /** 1026 * @param value {@link #authoredOn} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 1027 */ 1028 public SupplyRequest setAuthoredOnElement(DateTimeType value) { 1029 this.authoredOn = value; 1030 return this; 1031 } 1032 1033 /** 1034 * @return When the request was made. 1035 */ 1036 public Date getAuthoredOn() { 1037 return this.authoredOn == null ? null : this.authoredOn.getValue(); 1038 } 1039 1040 /** 1041 * @param value When the request was made. 1042 */ 1043 public SupplyRequest setAuthoredOn(Date value) { 1044 if (value == null) 1045 this.authoredOn = null; 1046 else { 1047 if (this.authoredOn == null) 1048 this.authoredOn = new DateTimeType(); 1049 this.authoredOn.setValue(value); 1050 } 1051 return this; 1052 } 1053 1054 /** 1055 * @return {@link #requester} (The device, practitioner, etc. who initiated the request.) 1056 */ 1057 public Reference getRequester() { 1058 if (this.requester == null) 1059 if (Configuration.errorOnAutoCreate()) 1060 throw new Error("Attempt to auto-create SupplyRequest.requester"); 1061 else if (Configuration.doAutoCreate()) 1062 this.requester = new Reference(); // cc 1063 return this.requester; 1064 } 1065 1066 public boolean hasRequester() { 1067 return this.requester != null && !this.requester.isEmpty(); 1068 } 1069 1070 /** 1071 * @param value {@link #requester} (The device, practitioner, etc. who initiated the request.) 1072 */ 1073 public SupplyRequest setRequester(Reference value) { 1074 this.requester = value; 1075 return this; 1076 } 1077 1078 /** 1079 * @return {@link #supplier} (Who is intended to fulfill the request.) 1080 */ 1081 public List<Reference> getSupplier() { 1082 if (this.supplier == null) 1083 this.supplier = new ArrayList<Reference>(); 1084 return this.supplier; 1085 } 1086 1087 /** 1088 * @return Returns a reference to <code>this</code> for easy method chaining 1089 */ 1090 public SupplyRequest setSupplier(List<Reference> theSupplier) { 1091 this.supplier = theSupplier; 1092 return this; 1093 } 1094 1095 public boolean hasSupplier() { 1096 if (this.supplier == null) 1097 return false; 1098 for (Reference item : this.supplier) 1099 if (!item.isEmpty()) 1100 return true; 1101 return false; 1102 } 1103 1104 public Reference addSupplier() { //3 1105 Reference t = new Reference(); 1106 if (this.supplier == null) 1107 this.supplier = new ArrayList<Reference>(); 1108 this.supplier.add(t); 1109 return t; 1110 } 1111 1112 public SupplyRequest addSupplier(Reference t) { //3 1113 if (t == null) 1114 return this; 1115 if (this.supplier == null) 1116 this.supplier = new ArrayList<Reference>(); 1117 this.supplier.add(t); 1118 return this; 1119 } 1120 1121 /** 1122 * @return The first repetition of repeating field {@link #supplier}, creating it if it does not already exist {3} 1123 */ 1124 public Reference getSupplierFirstRep() { 1125 if (getSupplier().isEmpty()) { 1126 addSupplier(); 1127 } 1128 return getSupplier().get(0); 1129 } 1130 1131 /** 1132 * @return {@link #reasonCode} (The reason why the supply item was requested.) 1133 */ 1134 public List<CodeableConcept> getReasonCode() { 1135 if (this.reasonCode == null) 1136 this.reasonCode = new ArrayList<CodeableConcept>(); 1137 return this.reasonCode; 1138 } 1139 1140 /** 1141 * @return Returns a reference to <code>this</code> for easy method chaining 1142 */ 1143 public SupplyRequest setReasonCode(List<CodeableConcept> theReasonCode) { 1144 this.reasonCode = theReasonCode; 1145 return this; 1146 } 1147 1148 public boolean hasReasonCode() { 1149 if (this.reasonCode == null) 1150 return false; 1151 for (CodeableConcept item : this.reasonCode) 1152 if (!item.isEmpty()) 1153 return true; 1154 return false; 1155 } 1156 1157 public CodeableConcept addReasonCode() { //3 1158 CodeableConcept t = new CodeableConcept(); 1159 if (this.reasonCode == null) 1160 this.reasonCode = new ArrayList<CodeableConcept>(); 1161 this.reasonCode.add(t); 1162 return t; 1163 } 1164 1165 public SupplyRequest addReasonCode(CodeableConcept t) { //3 1166 if (t == null) 1167 return this; 1168 if (this.reasonCode == null) 1169 this.reasonCode = new ArrayList<CodeableConcept>(); 1170 this.reasonCode.add(t); 1171 return this; 1172 } 1173 1174 /** 1175 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist {3} 1176 */ 1177 public CodeableConcept getReasonCodeFirstRep() { 1178 if (getReasonCode().isEmpty()) { 1179 addReasonCode(); 1180 } 1181 return getReasonCode().get(0); 1182 } 1183 1184 /** 1185 * @return {@link #reasonReference} (The reason why the supply item was requested.) 1186 */ 1187 public List<Reference> getReasonReference() { 1188 if (this.reasonReference == null) 1189 this.reasonReference = new ArrayList<Reference>(); 1190 return this.reasonReference; 1191 } 1192 1193 /** 1194 * @return Returns a reference to <code>this</code> for easy method chaining 1195 */ 1196 public SupplyRequest setReasonReference(List<Reference> theReasonReference) { 1197 this.reasonReference = theReasonReference; 1198 return this; 1199 } 1200 1201 public boolean hasReasonReference() { 1202 if (this.reasonReference == null) 1203 return false; 1204 for (Reference item : this.reasonReference) 1205 if (!item.isEmpty()) 1206 return true; 1207 return false; 1208 } 1209 1210 public Reference addReasonReference() { //3 1211 Reference t = new Reference(); 1212 if (this.reasonReference == null) 1213 this.reasonReference = new ArrayList<Reference>(); 1214 this.reasonReference.add(t); 1215 return t; 1216 } 1217 1218 public SupplyRequest addReasonReference(Reference t) { //3 1219 if (t == null) 1220 return this; 1221 if (this.reasonReference == null) 1222 this.reasonReference = new ArrayList<Reference>(); 1223 this.reasonReference.add(t); 1224 return this; 1225 } 1226 1227 /** 1228 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist {3} 1229 */ 1230 public Reference getReasonReferenceFirstRep() { 1231 if (getReasonReference().isEmpty()) { 1232 addReasonReference(); 1233 } 1234 return getReasonReference().get(0); 1235 } 1236 1237 /** 1238 * @return {@link #deliverFrom} (Where the supply is expected to come from.) 1239 */ 1240 public Reference getDeliverFrom() { 1241 if (this.deliverFrom == null) 1242 if (Configuration.errorOnAutoCreate()) 1243 throw new Error("Attempt to auto-create SupplyRequest.deliverFrom"); 1244 else if (Configuration.doAutoCreate()) 1245 this.deliverFrom = new Reference(); // cc 1246 return this.deliverFrom; 1247 } 1248 1249 public boolean hasDeliverFrom() { 1250 return this.deliverFrom != null && !this.deliverFrom.isEmpty(); 1251 } 1252 1253 /** 1254 * @param value {@link #deliverFrom} (Where the supply is expected to come from.) 1255 */ 1256 public SupplyRequest setDeliverFrom(Reference value) { 1257 this.deliverFrom = value; 1258 return this; 1259 } 1260 1261 /** 1262 * @return {@link #deliverTo} (Where the supply is destined to go.) 1263 */ 1264 public Reference getDeliverTo() { 1265 if (this.deliverTo == null) 1266 if (Configuration.errorOnAutoCreate()) 1267 throw new Error("Attempt to auto-create SupplyRequest.deliverTo"); 1268 else if (Configuration.doAutoCreate()) 1269 this.deliverTo = new Reference(); // cc 1270 return this.deliverTo; 1271 } 1272 1273 public boolean hasDeliverTo() { 1274 return this.deliverTo != null && !this.deliverTo.isEmpty(); 1275 } 1276 1277 /** 1278 * @param value {@link #deliverTo} (Where the supply is destined to go.) 1279 */ 1280 public SupplyRequest setDeliverTo(Reference value) { 1281 this.deliverTo = value; 1282 return this; 1283 } 1284 1285 protected void listChildren(List<Property> children) { 1286 super.listChildren(children); 1287 children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1288 children.add(new Property("status", "code", "Status of the supply request.", 0, 1, status)); 1289 children.add(new Property("category", "CodeableConcept", "Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.", 0, 1, category)); 1290 children.add(new Property("priority", "code", "Indicates how quickly this SupplyRequest should be addressed with respect to other requests.", 0, 1, priority)); 1291 children.add(new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "The item that is requested to be supplied. 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)); 1292 children.add(new Property("quantity", "Quantity", "The amount that is being ordered of the indicated item.", 0, 1, quantity)); 1293 children.add(new Property("parameter", "", "Specific parameters for the ordered item. For example, the size of the indicated item.", 0, java.lang.Integer.MAX_VALUE, parameter)); 1294 children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence)); 1295 children.add(new Property("authoredOn", "dateTime", "When the request was made.", 0, 1, authoredOn)); 1296 children.add(new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The device, practitioner, etc. who initiated the request.", 0, 1, requester)); 1297 children.add(new Property("supplier", "Reference(Organization|HealthcareService)", "Who is intended to fulfill the request.", 0, java.lang.Integer.MAX_VALUE, supplier)); 1298 children.add(new Property("reasonCode", "CodeableConcept", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1299 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 1300 children.add(new Property("deliverFrom", "Reference(Organization|Location)", "Where the supply is expected to come from.", 0, 1, deliverFrom)); 1301 children.add(new Property("deliverTo", "Reference(Organization|Location|Patient)", "Where the supply is destined to go.", 0, 1, deliverTo)); 1302 } 1303 1304 @Override 1305 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1306 switch (_hash) { 1307 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); 1308 case -892481550: /*status*/ return new Property("status", "code", "Status of the supply request.", 0, 1, status); 1309 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.", 0, 1, category); 1310 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly this SupplyRequest should be addressed with respect to other requests.", 0, 1, priority); 1311 case 2116201613: /*item[x]*/ return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "The item that is requested to be supplied. 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); 1312 case 3242771: /*item*/ return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device)", "The item that is requested to be supplied. 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); 1313 case 106644494: /*itemCodeableConcept*/ return new Property("item[x]", "CodeableConcept", "The item that is requested to be supplied. 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); 1314 case 1376364920: /*itemReference*/ return new Property("item[x]", "Reference(Medication|Substance|Device)", "The item that is requested to be supplied. 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); 1315 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The amount that is being ordered of the indicated item.", 0, 1, quantity); 1316 case 1954460585: /*parameter*/ return new Property("parameter", "", "Specific parameters for the ordered item. For example, the size of the indicated item.", 0, java.lang.Integer.MAX_VALUE, parameter); 1317 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence); 1318 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence); 1319 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime", "When the request should be fulfilled.", 0, 1, occurrence); 1320 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "Period", "When the request should be fulfilled.", 0, 1, occurrence); 1321 case 1515218299: /*occurrenceTiming*/ return new Property("occurrence[x]", "Timing", "When the request should be fulfilled.", 0, 1, occurrence); 1322 case -1500852503: /*authoredOn*/ return new Property("authoredOn", "dateTime", "When the request was made.", 0, 1, authoredOn); 1323 case 693933948: /*requester*/ return new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The device, practitioner, etc. who initiated the request.", 0, 1, requester); 1324 case -1663305268: /*supplier*/ return new Property("supplier", "Reference(Organization|HealthcareService)", "Who is intended to fulfill the request.", 0, java.lang.Integer.MAX_VALUE, supplier); 1325 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1326 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 1327 case -949323153: /*deliverFrom*/ return new Property("deliverFrom", "Reference(Organization|Location)", "Where the supply is expected to come from.", 0, 1, deliverFrom); 1328 case -242327936: /*deliverTo*/ return new Property("deliverTo", "Reference(Organization|Location|Patient)", "Where the supply is destined to go.", 0, 1, deliverTo); 1329 default: return super.getNamedProperty(_hash, _name, _checkValid); 1330 } 1331 1332 } 1333 1334 @Override 1335 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1336 switch (hash) { 1337 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1338 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SupplyRequestStatus> 1339 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1340 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority> 1341 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // DataType 1342 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 1343 case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // SupplyRequestParameterComponent 1344 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType 1345 case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType 1346 case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference 1347 case -1663305268: /*supplier*/ return this.supplier == null ? new Base[0] : this.supplier.toArray(new Base[this.supplier.size()]); // Reference 1348 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1349 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1350 case -949323153: /*deliverFrom*/ return this.deliverFrom == null ? new Base[0] : new Base[] {this.deliverFrom}; // Reference 1351 case -242327936: /*deliverTo*/ return this.deliverTo == null ? new Base[0] : new Base[] {this.deliverTo}; // Reference 1352 default: return super.getProperty(hash, name, checkValid); 1353 } 1354 1355 } 1356 1357 @Override 1358 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1359 switch (hash) { 1360 case -1618432855: // identifier 1361 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1362 return value; 1363 case -892481550: // status 1364 value = new SupplyRequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1365 this.status = (Enumeration) value; // Enumeration<SupplyRequestStatus> 1366 return value; 1367 case 50511102: // category 1368 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1369 return value; 1370 case -1165461084: // priority 1371 value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value)); 1372 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 1373 return value; 1374 case 3242771: // item 1375 this.item = TypeConvertor.castToType(value); // DataType 1376 return value; 1377 case -1285004149: // quantity 1378 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1379 return value; 1380 case 1954460585: // parameter 1381 this.getParameter().add((SupplyRequestParameterComponent) value); // SupplyRequestParameterComponent 1382 return value; 1383 case 1687874001: // occurrence 1384 this.occurrence = TypeConvertor.castToType(value); // DataType 1385 return value; 1386 case -1500852503: // authoredOn 1387 this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType 1388 return value; 1389 case 693933948: // requester 1390 this.requester = TypeConvertor.castToReference(value); // Reference 1391 return value; 1392 case -1663305268: // supplier 1393 this.getSupplier().add(TypeConvertor.castToReference(value)); // Reference 1394 return value; 1395 case 722137681: // reasonCode 1396 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1397 return value; 1398 case -1146218137: // reasonReference 1399 this.getReasonReference().add(TypeConvertor.castToReference(value)); // Reference 1400 return value; 1401 case -949323153: // deliverFrom 1402 this.deliverFrom = TypeConvertor.castToReference(value); // Reference 1403 return value; 1404 case -242327936: // deliverTo 1405 this.deliverTo = TypeConvertor.castToReference(value); // Reference 1406 return value; 1407 default: return super.setProperty(hash, name, value); 1408 } 1409 1410 } 1411 1412 @Override 1413 public Base setProperty(String name, Base value) throws FHIRException { 1414 if (name.equals("identifier")) { 1415 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1416 } else if (name.equals("status")) { 1417 value = new SupplyRequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1418 this.status = (Enumeration) value; // Enumeration<SupplyRequestStatus> 1419 } else if (name.equals("category")) { 1420 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1421 } else if (name.equals("priority")) { 1422 value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value)); 1423 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 1424 } else if (name.equals("item[x]")) { 1425 this.item = TypeConvertor.castToType(value); // DataType 1426 } else if (name.equals("quantity")) { 1427 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1428 } else if (name.equals("parameter")) { 1429 this.getParameter().add((SupplyRequestParameterComponent) value); 1430 } else if (name.equals("occurrence[x]")) { 1431 this.occurrence = TypeConvertor.castToType(value); // DataType 1432 } else if (name.equals("authoredOn")) { 1433 this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType 1434 } else if (name.equals("requester")) { 1435 this.requester = TypeConvertor.castToReference(value); // Reference 1436 } else if (name.equals("supplier")) { 1437 this.getSupplier().add(TypeConvertor.castToReference(value)); 1438 } else if (name.equals("reasonCode")) { 1439 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); 1440 } else if (name.equals("reasonReference")) { 1441 this.getReasonReference().add(TypeConvertor.castToReference(value)); 1442 } else if (name.equals("deliverFrom")) { 1443 this.deliverFrom = TypeConvertor.castToReference(value); // Reference 1444 } else if (name.equals("deliverTo")) { 1445 this.deliverTo = TypeConvertor.castToReference(value); // Reference 1446 } else 1447 return super.setProperty(name, value); 1448 return value; 1449 } 1450 1451 @Override 1452 public Base makeProperty(int hash, String name) throws FHIRException { 1453 switch (hash) { 1454 case -1618432855: return addIdentifier(); 1455 case -892481550: return getStatusElement(); 1456 case 50511102: return getCategory(); 1457 case -1165461084: return getPriorityElement(); 1458 case 2116201613: return getItem(); 1459 case 3242771: return getItem(); 1460 case -1285004149: return getQuantity(); 1461 case 1954460585: return addParameter(); 1462 case -2022646513: return getOccurrence(); 1463 case 1687874001: return getOccurrence(); 1464 case -1500852503: return getAuthoredOnElement(); 1465 case 693933948: return getRequester(); 1466 case -1663305268: return addSupplier(); 1467 case 722137681: return addReasonCode(); 1468 case -1146218137: return addReasonReference(); 1469 case -949323153: return getDeliverFrom(); 1470 case -242327936: return getDeliverTo(); 1471 default: return super.makeProperty(hash, name); 1472 } 1473 1474 } 1475 1476 @Override 1477 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1478 switch (hash) { 1479 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1480 case -892481550: /*status*/ return new String[] {"code"}; 1481 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1482 case -1165461084: /*priority*/ return new String[] {"code"}; 1483 case 3242771: /*item*/ return new String[] {"CodeableConcept", "Reference"}; 1484 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 1485 case 1954460585: /*parameter*/ return new String[] {}; 1486 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"}; 1487 case -1500852503: /*authoredOn*/ return new String[] {"dateTime"}; 1488 case 693933948: /*requester*/ return new String[] {"Reference"}; 1489 case -1663305268: /*supplier*/ return new String[] {"Reference"}; 1490 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1491 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 1492 case -949323153: /*deliverFrom*/ return new String[] {"Reference"}; 1493 case -242327936: /*deliverTo*/ return new String[] {"Reference"}; 1494 default: return super.getTypesForProperty(hash, name); 1495 } 1496 1497 } 1498 1499 @Override 1500 public Base addChild(String name) throws FHIRException { 1501 if (name.equals("identifier")) { 1502 return addIdentifier(); 1503 } 1504 else if (name.equals("status")) { 1505 throw new FHIRException("Cannot call addChild on a primitive type SupplyRequest.status"); 1506 } 1507 else if (name.equals("category")) { 1508 this.category = new CodeableConcept(); 1509 return this.category; 1510 } 1511 else if (name.equals("priority")) { 1512 throw new FHIRException("Cannot call addChild on a primitive type SupplyRequest.priority"); 1513 } 1514 else if (name.equals("itemCodeableConcept")) { 1515 this.item = new CodeableConcept(); 1516 return this.item; 1517 } 1518 else if (name.equals("itemReference")) { 1519 this.item = new Reference(); 1520 return this.item; 1521 } 1522 else if (name.equals("quantity")) { 1523 this.quantity = new Quantity(); 1524 return this.quantity; 1525 } 1526 else if (name.equals("parameter")) { 1527 return addParameter(); 1528 } 1529 else if (name.equals("occurrenceDateTime")) { 1530 this.occurrence = new DateTimeType(); 1531 return this.occurrence; 1532 } 1533 else if (name.equals("occurrencePeriod")) { 1534 this.occurrence = new Period(); 1535 return this.occurrence; 1536 } 1537 else if (name.equals("occurrenceTiming")) { 1538 this.occurrence = new Timing(); 1539 return this.occurrence; 1540 } 1541 else if (name.equals("authoredOn")) { 1542 throw new FHIRException("Cannot call addChild on a primitive type SupplyRequest.authoredOn"); 1543 } 1544 else if (name.equals("requester")) { 1545 this.requester = new Reference(); 1546 return this.requester; 1547 } 1548 else if (name.equals("supplier")) { 1549 return addSupplier(); 1550 } 1551 else if (name.equals("reasonCode")) { 1552 return addReasonCode(); 1553 } 1554 else if (name.equals("reasonReference")) { 1555 return addReasonReference(); 1556 } 1557 else if (name.equals("deliverFrom")) { 1558 this.deliverFrom = new Reference(); 1559 return this.deliverFrom; 1560 } 1561 else if (name.equals("deliverTo")) { 1562 this.deliverTo = new Reference(); 1563 return this.deliverTo; 1564 } 1565 else 1566 return super.addChild(name); 1567 } 1568 1569 public String fhirType() { 1570 return "SupplyRequest"; 1571 1572 } 1573 1574 public SupplyRequest copy() { 1575 SupplyRequest dst = new SupplyRequest(); 1576 copyValues(dst); 1577 return dst; 1578 } 1579 1580 public void copyValues(SupplyRequest dst) { 1581 super.copyValues(dst); 1582 if (identifier != null) { 1583 dst.identifier = new ArrayList<Identifier>(); 1584 for (Identifier i : identifier) 1585 dst.identifier.add(i.copy()); 1586 }; 1587 dst.status = status == null ? null : status.copy(); 1588 dst.category = category == null ? null : category.copy(); 1589 dst.priority = priority == null ? null : priority.copy(); 1590 dst.item = item == null ? null : item.copy(); 1591 dst.quantity = quantity == null ? null : quantity.copy(); 1592 if (parameter != null) { 1593 dst.parameter = new ArrayList<SupplyRequestParameterComponent>(); 1594 for (SupplyRequestParameterComponent i : parameter) 1595 dst.parameter.add(i.copy()); 1596 }; 1597 dst.occurrence = occurrence == null ? null : occurrence.copy(); 1598 dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); 1599 dst.requester = requester == null ? null : requester.copy(); 1600 if (supplier != null) { 1601 dst.supplier = new ArrayList<Reference>(); 1602 for (Reference i : supplier) 1603 dst.supplier.add(i.copy()); 1604 }; 1605 if (reasonCode != null) { 1606 dst.reasonCode = new ArrayList<CodeableConcept>(); 1607 for (CodeableConcept i : reasonCode) 1608 dst.reasonCode.add(i.copy()); 1609 }; 1610 if (reasonReference != null) { 1611 dst.reasonReference = new ArrayList<Reference>(); 1612 for (Reference i : reasonReference) 1613 dst.reasonReference.add(i.copy()); 1614 }; 1615 dst.deliverFrom = deliverFrom == null ? null : deliverFrom.copy(); 1616 dst.deliverTo = deliverTo == null ? null : deliverTo.copy(); 1617 } 1618 1619 protected SupplyRequest typedCopy() { 1620 return copy(); 1621 } 1622 1623 @Override 1624 public boolean equalsDeep(Base other_) { 1625 if (!super.equalsDeep(other_)) 1626 return false; 1627 if (!(other_ instanceof SupplyRequest)) 1628 return false; 1629 SupplyRequest o = (SupplyRequest) other_; 1630 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) 1631 && compareDeep(priority, o.priority, true) && compareDeep(item, o.item, true) && compareDeep(quantity, o.quantity, true) 1632 && compareDeep(parameter, o.parameter, true) && compareDeep(occurrence, o.occurrence, true) && compareDeep(authoredOn, o.authoredOn, true) 1633 && compareDeep(requester, o.requester, true) && compareDeep(supplier, o.supplier, true) && compareDeep(reasonCode, o.reasonCode, true) 1634 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(deliverFrom, o.deliverFrom, true) 1635 && compareDeep(deliverTo, o.deliverTo, true); 1636 } 1637 1638 @Override 1639 public boolean equalsShallow(Base other_) { 1640 if (!super.equalsShallow(other_)) 1641 return false; 1642 if (!(other_ instanceof SupplyRequest)) 1643 return false; 1644 SupplyRequest o = (SupplyRequest) other_; 1645 return compareValues(status, o.status, true) && compareValues(priority, o.priority, true) && compareValues(authoredOn, o.authoredOn, true) 1646 ; 1647 } 1648 1649 public boolean isEmpty() { 1650 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, category 1651 , priority, item, quantity, parameter, occurrence, authoredOn, requester, supplier 1652 , reasonCode, reasonReference, deliverFrom, deliverTo); 1653 } 1654 1655 @Override 1656 public ResourceType getResourceType() { 1657 return ResourceType.SupplyRequest; 1658 } 1659 1660 /** 1661 * Search parameter: <b>category</b> 1662 * <p> 1663 * Description: <b>The kind of supply (central, non-stock, etc.)</b><br> 1664 * Type: <b>token</b><br> 1665 * Path: <b>SupplyRequest.category</b><br> 1666 * </p> 1667 */ 1668 @SearchParamDefinition(name="category", path="SupplyRequest.category", description="The kind of supply (central, non-stock, etc.)", type="token" ) 1669 public static final String SP_CATEGORY = "category"; 1670 /** 1671 * <b>Fluent Client</b> search parameter constant for <b>category</b> 1672 * <p> 1673 * Description: <b>The kind of supply (central, non-stock, etc.)</b><br> 1674 * Type: <b>token</b><br> 1675 * Path: <b>SupplyRequest.category</b><br> 1676 * </p> 1677 */ 1678 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 1679 1680 /** 1681 * Search parameter: <b>requester</b> 1682 * <p> 1683 * Description: <b>Individual making the request</b><br> 1684 * Type: <b>reference</b><br> 1685 * Path: <b>SupplyRequest.requester</b><br> 1686 * </p> 1687 */ 1688 @SearchParamDefinition(name="requester", path="SupplyRequest.requester", description="Individual making the request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 1689 public static final String SP_REQUESTER = "requester"; 1690 /** 1691 * <b>Fluent Client</b> search parameter constant for <b>requester</b> 1692 * <p> 1693 * Description: <b>Individual making the request</b><br> 1694 * Type: <b>reference</b><br> 1695 * Path: <b>SupplyRequest.requester</b><br> 1696 * </p> 1697 */ 1698 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER); 1699 1700/** 1701 * Constant for fluent queries to be used to add include statements. Specifies 1702 * the path value of "<b>SupplyRequest:requester</b>". 1703 */ 1704 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("SupplyRequest:requester").toLocked(); 1705 1706 /** 1707 * Search parameter: <b>status</b> 1708 * <p> 1709 * Description: <b>draft | active | suspended +</b><br> 1710 * Type: <b>token</b><br> 1711 * Path: <b>SupplyRequest.status</b><br> 1712 * </p> 1713 */ 1714 @SearchParamDefinition(name="status", path="SupplyRequest.status", description="draft | active | suspended +", type="token" ) 1715 public static final String SP_STATUS = "status"; 1716 /** 1717 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1718 * <p> 1719 * Description: <b>draft | active | suspended +</b><br> 1720 * Type: <b>token</b><br> 1721 * Path: <b>SupplyRequest.status</b><br> 1722 * </p> 1723 */ 1724 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1725 1726 /** 1727 * Search parameter: <b>subject</b> 1728 * <p> 1729 * Description: <b>The destination of the supply</b><br> 1730 * Type: <b>reference</b><br> 1731 * Path: <b>SupplyRequest.deliverTo</b><br> 1732 * </p> 1733 */ 1734 @SearchParamDefinition(name="subject", path="SupplyRequest.deliverTo", description="The destination of the supply", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Location.class, Organization.class, Patient.class } ) 1735 public static final String SP_SUBJECT = "subject"; 1736 /** 1737 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1738 * <p> 1739 * Description: <b>The destination of the supply</b><br> 1740 * Type: <b>reference</b><br> 1741 * Path: <b>SupplyRequest.deliverTo</b><br> 1742 * </p> 1743 */ 1744 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1745 1746/** 1747 * Constant for fluent queries to be used to add include statements. Specifies 1748 * the path value of "<b>SupplyRequest:subject</b>". 1749 */ 1750 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("SupplyRequest:subject").toLocked(); 1751 1752 /** 1753 * Search parameter: <b>supplier</b> 1754 * <p> 1755 * Description: <b>Who is intended to fulfill the request</b><br> 1756 * Type: <b>reference</b><br> 1757 * Path: <b>SupplyRequest.supplier</b><br> 1758 * </p> 1759 */ 1760 @SearchParamDefinition(name="supplier", path="SupplyRequest.supplier", description="Who is intended to fulfill the request", type="reference", target={HealthcareService.class, Organization.class } ) 1761 public static final String SP_SUPPLIER = "supplier"; 1762 /** 1763 * <b>Fluent Client</b> search parameter constant for <b>supplier</b> 1764 * <p> 1765 * Description: <b>Who is intended to fulfill the request</b><br> 1766 * Type: <b>reference</b><br> 1767 * Path: <b>SupplyRequest.supplier</b><br> 1768 * </p> 1769 */ 1770 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPLIER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPLIER); 1771 1772/** 1773 * Constant for fluent queries to be used to add include statements. Specifies 1774 * the path value of "<b>SupplyRequest:supplier</b>". 1775 */ 1776 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPLIER = new ca.uhn.fhir.model.api.Include("SupplyRequest:supplier").toLocked(); 1777 1778 /** 1779 * Search parameter: <b>date</b> 1780 * <p> 1781 * Description: <b>Multiple Resources: 1782 1783* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 1784* [CarePlan](careplan.html): Time period plan covers 1785* [CareTeam](careteam.html): Time period team covers 1786* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 1787* [Composition](composition.html): Composition editing time 1788* [Consent](consent.html): When this Consent was created or indexed 1789* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 1790* [Encounter](encounter.html): A date within the period the Encounter lasted 1791* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 1792* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 1793* [Flag](flag.html): Time period when flag is active 1794* [Immunization](immunization.html): Vaccination (non)-Administration Date 1795* [List](list.html): When the list was prepared 1796* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 1797* [Procedure](procedure.html): When the procedure was performed 1798* [RiskAssessment](riskassessment.html): When was assessment made? 1799* [SupplyRequest](supplyrequest.html): When the request was made 1800</b><br> 1801 * Type: <b>date</b><br> 1802 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 1803 * </p> 1804 */ 1805 @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): Time period team covers\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When this Consent was created or indexed\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure was performed\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) 1806 public static final String SP_DATE = "date"; 1807 /** 1808 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1809 * <p> 1810 * Description: <b>Multiple Resources: 1811 1812* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 1813* [CarePlan](careplan.html): Time period plan covers 1814* [CareTeam](careteam.html): Time period team covers 1815* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 1816* [Composition](composition.html): Composition editing time 1817* [Consent](consent.html): When this Consent was created or indexed 1818* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 1819* [Encounter](encounter.html): A date within the period the Encounter lasted 1820* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 1821* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 1822* [Flag](flag.html): Time period when flag is active 1823* [Immunization](immunization.html): Vaccination (non)-Administration Date 1824* [List](list.html): When the list was prepared 1825* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 1826* [Procedure](procedure.html): When the procedure was performed 1827* [RiskAssessment](riskassessment.html): When was assessment made? 1828* [SupplyRequest](supplyrequest.html): When the request was made 1829</b><br> 1830 * Type: <b>date</b><br> 1831 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 1832 * </p> 1833 */ 1834 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1835 1836 /** 1837 * Search parameter: <b>identifier</b> 1838 * <p> 1839 * Description: <b>Multiple Resources: 1840 1841* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1842* [CarePlan](careplan.html): External Ids for this plan 1843* [CareTeam](careteam.html): External Ids for this team 1844* [Composition](composition.html): Version-independent identifier for the Composition 1845* [Condition](condition.html): A unique identifier of the condition record 1846* [Consent](consent.html): Identifier for this record (external references) 1847* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1848* [DeviceRequest](devicerequest.html): Business identifier for request/order 1849* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1850* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1851* [DocumentReference](documentreference.html): Master Version Specific Identifier 1852* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1853* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1854* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1855* [Goal](goal.html): External Ids for this goal 1856* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 1857* [Immunization](immunization.html): Business identifier 1858* [List](list.html): Business identifier 1859* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1860* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1861* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1862* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 1863* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1864* [Observation](observation.html): The unique id for a particular observation 1865* [Procedure](procedure.html): A unique identifier for a procedure 1866* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1867* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1868* [SupplyDelivery](supplydelivery.html): External identifier 1869* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1870* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1871</b><br> 1872 * Type: <b>token</b><br> 1873 * 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 | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1874 * </p> 1875 */ 1876 @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 | MedicationStatement.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* [MedicationStatement](medicationstatement.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" ) 1877 public static final String SP_IDENTIFIER = "identifier"; 1878 /** 1879 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1880 * <p> 1881 * Description: <b>Multiple Resources: 1882 1883* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1884* [CarePlan](careplan.html): External Ids for this plan 1885* [CareTeam](careteam.html): External Ids for this team 1886* [Composition](composition.html): Version-independent identifier for the Composition 1887* [Condition](condition.html): A unique identifier of the condition record 1888* [Consent](consent.html): Identifier for this record (external references) 1889* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1890* [DeviceRequest](devicerequest.html): Business identifier for request/order 1891* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1892* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1893* [DocumentReference](documentreference.html): Master Version Specific Identifier 1894* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1895* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1896* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1897* [Goal](goal.html): External Ids for this goal 1898* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 1899* [Immunization](immunization.html): Business identifier 1900* [List](list.html): Business identifier 1901* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1902* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1903* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1904* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 1905* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1906* [Observation](observation.html): The unique id for a particular observation 1907* [Procedure](procedure.html): A unique identifier for a procedure 1908* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1909* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1910* [SupplyDelivery](supplydelivery.html): External identifier 1911* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1912* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1913</b><br> 1914 * Type: <b>token</b><br> 1915 * 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 | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1916 * </p> 1917 */ 1918 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1919 1920 1921} 1922