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