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