001package org.hl7.fhir.r4.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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 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 request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. 047 */ 048@ResourceDef(name="CommunicationRequest", profile="http://hl7.org/fhir/Profile/CommunicationRequest") 049public class CommunicationRequest extends DomainResource { 050 051 public enum CommunicationRequestStatus { 052 /** 053 * The request has been created but is not yet complete or ready for action 054 */ 055 DRAFT, 056 /** 057 * The request is in force and 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, but the system creating the request does not know. 078 */ 079 UNKNOWN, 080 /** 081 * added to help the parsers with the generic types 082 */ 083 NULL; 084 public static CommunicationRequestStatus 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 CommunicationRequestStatus 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/request-status"; 121 case ACTIVE: return "http://hl7.org/fhir/request-status"; 122 case SUSPENDED: return "http://hl7.org/fhir/request-status"; 123 case CANCELLED: return "http://hl7.org/fhir/request-status"; 124 case COMPLETED: return "http://hl7.org/fhir/request-status"; 125 case ENTEREDINERROR: return "http://hl7.org/fhir/request-status"; 126 case UNKNOWN: return "http://hl7.org/fhir/request-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 in force and 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, but the system creating the request does not know."; 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 CommunicationRequestStatusEnumFactory implements EnumFactory<CommunicationRequestStatus> { 157 public CommunicationRequestStatus 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 CommunicationRequestStatus.DRAFT; 163 if ("active".equals(codeString)) 164 return CommunicationRequestStatus.ACTIVE; 165 if ("suspended".equals(codeString)) 166 return CommunicationRequestStatus.SUSPENDED; 167 if ("cancelled".equals(codeString)) 168 return CommunicationRequestStatus.CANCELLED; 169 if ("completed".equals(codeString)) 170 return CommunicationRequestStatus.COMPLETED; 171 if ("entered-in-error".equals(codeString)) 172 return CommunicationRequestStatus.ENTEREDINERROR; 173 if ("unknown".equals(codeString)) 174 return CommunicationRequestStatus.UNKNOWN; 175 throw new IllegalArgumentException("Unknown CommunicationRequestStatus code '"+codeString+"'"); 176 } 177 public Enumeration<CommunicationRequestStatus> fromType(Base code) throws FHIRException { 178 if (code == null) 179 return null; 180 if (code.isEmpty()) 181 return new Enumeration<CommunicationRequestStatus>(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<CommunicationRequestStatus>(this, CommunicationRequestStatus.DRAFT); 187 if ("active".equals(codeString)) 188 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.ACTIVE); 189 if ("suspended".equals(codeString)) 190 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.SUSPENDED); 191 if ("cancelled".equals(codeString)) 192 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.CANCELLED); 193 if ("completed".equals(codeString)) 194 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.COMPLETED); 195 if ("entered-in-error".equals(codeString)) 196 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.ENTEREDINERROR); 197 if ("unknown".equals(codeString)) 198 return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.UNKNOWN); 199 throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'"); 200 } 201 public String toCode(CommunicationRequestStatus code) { 202 if (code == CommunicationRequestStatus.DRAFT) 203 return "draft"; 204 if (code == CommunicationRequestStatus.ACTIVE) 205 return "active"; 206 if (code == CommunicationRequestStatus.SUSPENDED) 207 return "suspended"; 208 if (code == CommunicationRequestStatus.CANCELLED) 209 return "cancelled"; 210 if (code == CommunicationRequestStatus.COMPLETED) 211 return "completed"; 212 if (code == CommunicationRequestStatus.ENTEREDINERROR) 213 return "entered-in-error"; 214 if (code == CommunicationRequestStatus.UNKNOWN) 215 return "unknown"; 216 return "?"; 217 } 218 public String toSystem(CommunicationRequestStatus code) { 219 return code.getSystem(); 220 } 221 } 222 223 public enum CommunicationPriority { 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 CommunicationPriority 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 CommunicationPriority 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 CommunicationPriorityEnumFactory implements EnumFactory<CommunicationPriority> { 299 public CommunicationPriority 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 CommunicationPriority.ROUTINE; 305 if ("urgent".equals(codeString)) 306 return CommunicationPriority.URGENT; 307 if ("asap".equals(codeString)) 308 return CommunicationPriority.ASAP; 309 if ("stat".equals(codeString)) 310 return CommunicationPriority.STAT; 311 throw new IllegalArgumentException("Unknown CommunicationPriority code '"+codeString+"'"); 312 } 313 public Enumeration<CommunicationPriority> fromType(Base code) throws FHIRException { 314 if (code == null) 315 return null; 316 if (code.isEmpty()) 317 return new Enumeration<CommunicationPriority>(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<CommunicationPriority>(this, CommunicationPriority.ROUTINE); 323 if ("urgent".equals(codeString)) 324 return new Enumeration<CommunicationPriority>(this, CommunicationPriority.URGENT); 325 if ("asap".equals(codeString)) 326 return new Enumeration<CommunicationPriority>(this, CommunicationPriority.ASAP); 327 if ("stat".equals(codeString)) 328 return new Enumeration<CommunicationPriority>(this, CommunicationPriority.STAT); 329 throw new FHIRException("Unknown CommunicationPriority code '"+codeString+"'"); 330 } 331 public String toCode(CommunicationPriority code) { 332 if (code == CommunicationPriority.ROUTINE) 333 return "routine"; 334 if (code == CommunicationPriority.URGENT) 335 return "urgent"; 336 if (code == CommunicationPriority.ASAP) 337 return "asap"; 338 if (code == CommunicationPriority.STAT) 339 return "stat"; 340 return "?"; 341 } 342 public String toSystem(CommunicationPriority code) { 343 return code.getSystem(); 344 } 345 } 346 347 @Block() 348 public static class CommunicationRequestPayloadComponent extends BackboneElement implements IBaseBackboneElement { 349 /** 350 * The communicated content (or for multi-part communications, one portion of the communication). 351 */ 352 @Child(name = "content", type = {StringType.class, Attachment.class, Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 353 @Description(shortDefinition="Message part content", formalDefinition="The communicated content (or for multi-part communications, one portion of the communication)." ) 354 protected Type content; 355 356 private static final long serialVersionUID = -1763459053L; 357 358 /** 359 * Constructor 360 */ 361 public CommunicationRequestPayloadComponent() { 362 super(); 363 } 364 365 /** 366 * Constructor 367 */ 368 public CommunicationRequestPayloadComponent(Type content) { 369 super(); 370 this.content = content; 371 } 372 373 /** 374 * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) 375 */ 376 public Type getContent() { 377 return this.content; 378 } 379 380 /** 381 * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) 382 */ 383 public StringType getContentStringType() throws FHIRException { 384 if (this.content == null) 385 return null; 386 if (!(this.content instanceof StringType)) 387 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.content.getClass().getName()+" was encountered"); 388 return (StringType) this.content; 389 } 390 391 public boolean hasContentStringType() { 392 return this != null && this.content instanceof StringType; 393 } 394 395 /** 396 * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) 397 */ 398 public Attachment getContentAttachment() throws FHIRException { 399 if (this.content == null) 400 return null; 401 if (!(this.content instanceof Attachment)) 402 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 403 return (Attachment) this.content; 404 } 405 406 public boolean hasContentAttachment() { 407 return this != null && this.content instanceof Attachment; 408 } 409 410 /** 411 * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) 412 */ 413 public Reference getContentReference() throws FHIRException { 414 if (this.content == null) 415 return null; 416 if (!(this.content instanceof Reference)) 417 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 418 return (Reference) this.content; 419 } 420 421 public boolean hasContentReference() { 422 return this != null && this.content instanceof Reference; 423 } 424 425 public boolean hasContent() { 426 return this.content != null && !this.content.isEmpty(); 427 } 428 429 /** 430 * @param value {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).) 431 */ 432 public CommunicationRequestPayloadComponent setContent(Type value) { 433 if (value != null && !(value instanceof StringType || value instanceof Attachment || value instanceof Reference)) 434 throw new Error("Not the right type for CommunicationRequest.payload.content[x]: "+value.fhirType()); 435 this.content = value; 436 return this; 437 } 438 439 protected void listChildren(List<Property> children) { 440 super.listChildren(children); 441 children.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content)); 442 } 443 444 @Override 445 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 446 switch (_hash) { 447 case 264548711: /*content[x]*/ return new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content); 448 case 951530617: /*content*/ return new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content); 449 case -326336022: /*contentString*/ return new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content); 450 case -702028164: /*contentAttachment*/ return new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content); 451 case 1193747154: /*contentReference*/ return new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, 1, content); 452 default: return super.getNamedProperty(_hash, _name, _checkValid); 453 } 454 455 } 456 457 @Override 458 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 459 switch (hash) { 460 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // 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 951530617: // content 470 this.content = castToType(value); // Type 471 return value; 472 default: return super.setProperty(hash, name, value); 473 } 474 475 } 476 477 @Override 478 public Base setProperty(String name, Base value) throws FHIRException { 479 if (name.equals("content[x]")) { 480 this.content = castToType(value); // Type 481 } else 482 return super.setProperty(name, value); 483 return value; 484 } 485 486 @Override 487 public Base makeProperty(int hash, String name) throws FHIRException { 488 switch (hash) { 489 case 264548711: return getContent(); 490 case 951530617: return getContent(); 491 default: return super.makeProperty(hash, name); 492 } 493 494 } 495 496 @Override 497 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 498 switch (hash) { 499 case 951530617: /*content*/ return new String[] {"string", "Attachment", "Reference"}; 500 default: return super.getTypesForProperty(hash, name); 501 } 502 503 } 504 505 @Override 506 public Base addChild(String name) throws FHIRException { 507 if (name.equals("contentString")) { 508 this.content = new StringType(); 509 return this.content; 510 } 511 else if (name.equals("contentAttachment")) { 512 this.content = new Attachment(); 513 return this.content; 514 } 515 else if (name.equals("contentReference")) { 516 this.content = new Reference(); 517 return this.content; 518 } 519 else 520 return super.addChild(name); 521 } 522 523 public CommunicationRequestPayloadComponent copy() { 524 CommunicationRequestPayloadComponent dst = new CommunicationRequestPayloadComponent(); 525 copyValues(dst); 526 dst.content = content == null ? null : content.copy(); 527 return dst; 528 } 529 530 @Override 531 public boolean equalsDeep(Base other_) { 532 if (!super.equalsDeep(other_)) 533 return false; 534 if (!(other_ instanceof CommunicationRequestPayloadComponent)) 535 return false; 536 CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other_; 537 return compareDeep(content, o.content, true); 538 } 539 540 @Override 541 public boolean equalsShallow(Base other_) { 542 if (!super.equalsShallow(other_)) 543 return false; 544 if (!(other_ instanceof CommunicationRequestPayloadComponent)) 545 return false; 546 CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other_; 547 return true; 548 } 549 550 public boolean isEmpty() { 551 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(content); 552 } 553 554 public String fhirType() { 555 return "CommunicationRequest.payload"; 556 557 } 558 559 } 560 561 /** 562 * Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server. 563 */ 564 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 565 @Description(shortDefinition="Unique identifier", formalDefinition="Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) 566 protected List<Identifier> identifier; 567 568 /** 569 * A plan or proposal that is fulfilled in whole or in part by this request. 570 */ 571 @Child(name = "basedOn", type = {Reference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 572 @Description(shortDefinition="Fulfills plan or proposal", formalDefinition="A plan or proposal that is fulfilled in whole or in part by this request." ) 573 protected List<Reference> basedOn; 574 /** 575 * The actual objects that are the target of the reference (A plan or proposal that is fulfilled in whole or in part by this request.) 576 */ 577 protected List<Resource> basedOnTarget; 578 579 580 /** 581 * Completed or terminated request(s) whose function is taken by this new request. 582 */ 583 @Child(name = "replaces", type = {CommunicationRequest.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 584 @Description(shortDefinition="Request(s) replaced by this request", formalDefinition="Completed or terminated request(s) whose function is taken by this new request." ) 585 protected List<Reference> replaces; 586 /** 587 * The actual objects that are the target of the reference (Completed or terminated request(s) whose function is taken by this new request.) 588 */ 589 protected List<CommunicationRequest> replacesTarget; 590 591 592 /** 593 * A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form. 594 */ 595 @Child(name = "groupIdentifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 596 @Description(shortDefinition="Composite request this is part of", formalDefinition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form." ) 597 protected Identifier groupIdentifier; 598 599 /** 600 * The status of the proposal or order. 601 */ 602 @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) 603 @Description(shortDefinition="draft | active | suspended | cancelled | completed | entered-in-error | unknown", formalDefinition="The status of the proposal or order." ) 604 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status") 605 protected Enumeration<CommunicationRequestStatus> status; 606 607 /** 608 * The type of message to be sent such as alert, notification, reminder, instruction, etc. 609 */ 610 @Child(name = "category", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 611 @Description(shortDefinition="Message category", formalDefinition="The type of message to be sent such as alert, notification, reminder, instruction, etc." ) 612 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/communication-category") 613 protected List<CodeableConcept> category; 614 615 /** 616 * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. 617 */ 618 @Child(name = "priority", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 619 @Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." ) 620 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 621 protected Enumeration<CommunicationPriority> priority; 622 623 /** 624 * A channel that was used for this communication (e.g. email, fax). 625 */ 626 @Child(name = "medium", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 627 @Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." ) 628 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ParticipationMode") 629 protected List<CodeableConcept> medium; 630 631 /** 632 * The patient or group that is the focus of this communication request. 633 */ 634 @Child(name = "subject", type = {Patient.class, Group.class}, order=8, min=0, max=1, modifier=false, summary=false) 635 @Description(shortDefinition="Focus of message", formalDefinition="The patient or group that is the focus of this communication request." ) 636 protected Reference subject; 637 638 /** 639 * The actual object that is the target of the reference (The patient or group that is the focus of this communication request.) 640 */ 641 protected Resource subjectTarget; 642 643 /** 644 * The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication. 645 */ 646 @Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Group.class, CareTeam.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 647 @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication." ) 648 protected List<Reference> recipient; 649 /** 650 * The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.) 651 */ 652 protected List<Resource> recipientTarget; 653 654 655 /** 656 * Other resources that pertain to this communication request and to which this communication request should be associated. 657 */ 658 @Child(name = "about", type = {Reference.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 659 @Description(shortDefinition="Resources that pertain to this communication request", formalDefinition="Other resources that pertain to this communication request and to which this communication request should be associated." ) 660 protected List<Reference> about; 661 /** 662 * The actual objects that are the target of the reference (Other resources that pertain to this communication request and to which this communication request should be associated.) 663 */ 664 protected List<Resource> aboutTarget; 665 666 667 /** 668 * The encounter or episode of care within which the communication request was created. 669 */ 670 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=11, min=0, max=1, modifier=false, summary=true) 671 @Description(shortDefinition="Encounter or episode leading to message", formalDefinition="The encounter or episode of care within which the communication request was created." ) 672 protected Reference context; 673 674 /** 675 * The actual object that is the target of the reference (The encounter or episode of care within which the communication request was created.) 676 */ 677 protected Resource contextTarget; 678 679 /** 680 * Text, attachment(s), or resource(s) to be communicated to the recipient. 681 */ 682 @Child(name = "payload", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 683 @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." ) 684 protected List<CommunicationRequestPayloadComponent> payload; 685 686 /** 687 * The time when this communication is to occur. 688 */ 689 @Child(name = "occurrence", type = {DateTimeType.class, Period.class}, order=13, min=0, max=1, modifier=false, summary=true) 690 @Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." ) 691 protected Type occurrence; 692 693 /** 694 * For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. 695 */ 696 @Child(name = "authoredOn", type = {DateTimeType.class}, order=14, min=0, max=1, modifier=false, summary=true) 697 @Description(shortDefinition="When request transitioned to being actionable", formalDefinition="For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation." ) 698 protected DateTimeType authoredOn; 699 700 /** 701 * The device, individual, or organization who initiated the request and has responsibility for its activation. 702 */ 703 @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class}, order=15, min=0, max=1, modifier=false, summary=true) 704 @Description(shortDefinition="Who/what is requesting service", formalDefinition="The device, individual, or organization who initiated the request and has responsibility for its activation." ) 705 protected Reference requester; 706 707 /** 708 * The actual object that is the target of the reference (The device, individual, or organization who initiated the request and has responsibility for its activation.) 709 */ 710 protected Resource requesterTarget; 711 712 /** 713 * The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication. 714 */ 715 @Child(name = "sender", type = {Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, HealthcareService.class}, order=16, min=0, max=1, modifier=false, summary=true) 716 @Description(shortDefinition="Message sender", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication." ) 717 protected Reference sender; 718 719 /** 720 * The actual object that is the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) 721 */ 722 protected Resource senderTarget; 723 724 /** 725 * Describes why the request is being made in coded or textual form. 726 */ 727 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 728 @Description(shortDefinition="Why is communication needed?", formalDefinition="Describes why the request is being made in coded or textual form." ) 729 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActReason") 730 protected List<CodeableConcept> reasonCode; 731 732 /** 733 * Indicates another resource whose existence justifies this request. 734 */ 735 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 736 @Description(shortDefinition="Why is communication needed?", formalDefinition="Indicates another resource whose existence justifies this request." ) 737 protected List<Reference> reasonReference; 738 /** 739 * The actual objects that are the target of the reference (Indicates another resource whose existence justifies this request.) 740 */ 741 protected List<Resource> reasonReferenceTarget; 742 743 744 /** 745 * Comments made about the request by the requester, sender, recipient, subject or other participants. 746 */ 747 @Child(name = "note", type = {Annotation.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 748 @Description(shortDefinition="Comments made about communication request", formalDefinition="Comments made about the request by the requester, sender, recipient, subject or other participants." ) 749 protected List<Annotation> note; 750 751 private static final long serialVersionUID = 741322852L; 752 753 /** 754 * Constructor 755 */ 756 public CommunicationRequest() { 757 super(); 758 } 759 760 /** 761 * Constructor 762 */ 763 public CommunicationRequest(Enumeration<CommunicationRequestStatus> status) { 764 super(); 765 this.status = status; 766 } 767 768 /** 769 * @return {@link #identifier} (Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.) 770 */ 771 public List<Identifier> getIdentifier() { 772 if (this.identifier == null) 773 this.identifier = new ArrayList<Identifier>(); 774 return this.identifier; 775 } 776 777 /** 778 * @return Returns a reference to <code>this</code> for easy method chaining 779 */ 780 public CommunicationRequest setIdentifier(List<Identifier> theIdentifier) { 781 this.identifier = theIdentifier; 782 return this; 783 } 784 785 public boolean hasIdentifier() { 786 if (this.identifier == null) 787 return false; 788 for (Identifier item : this.identifier) 789 if (!item.isEmpty()) 790 return true; 791 return false; 792 } 793 794 public Identifier addIdentifier() { //3 795 Identifier t = new Identifier(); 796 if (this.identifier == null) 797 this.identifier = new ArrayList<Identifier>(); 798 this.identifier.add(t); 799 return t; 800 } 801 802 public CommunicationRequest addIdentifier(Identifier t) { //3 803 if (t == null) 804 return this; 805 if (this.identifier == null) 806 this.identifier = new ArrayList<Identifier>(); 807 this.identifier.add(t); 808 return this; 809 } 810 811 /** 812 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 813 */ 814 public Identifier getIdentifierFirstRep() { 815 if (getIdentifier().isEmpty()) { 816 addIdentifier(); 817 } 818 return getIdentifier().get(0); 819 } 820 821 /** 822 * @return {@link #basedOn} (A plan or proposal that is fulfilled in whole or in part by this request.) 823 */ 824 public List<Reference> getBasedOn() { 825 if (this.basedOn == null) 826 this.basedOn = new ArrayList<Reference>(); 827 return this.basedOn; 828 } 829 830 /** 831 * @return Returns a reference to <code>this</code> for easy method chaining 832 */ 833 public CommunicationRequest setBasedOn(List<Reference> theBasedOn) { 834 this.basedOn = theBasedOn; 835 return this; 836 } 837 838 public boolean hasBasedOn() { 839 if (this.basedOn == null) 840 return false; 841 for (Reference item : this.basedOn) 842 if (!item.isEmpty()) 843 return true; 844 return false; 845 } 846 847 public Reference addBasedOn() { //3 848 Reference t = new Reference(); 849 if (this.basedOn == null) 850 this.basedOn = new ArrayList<Reference>(); 851 this.basedOn.add(t); 852 return t; 853 } 854 855 public CommunicationRequest addBasedOn(Reference t) { //3 856 if (t == null) 857 return this; 858 if (this.basedOn == null) 859 this.basedOn = new ArrayList<Reference>(); 860 this.basedOn.add(t); 861 return this; 862 } 863 864 /** 865 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 866 */ 867 public Reference getBasedOnFirstRep() { 868 if (getBasedOn().isEmpty()) { 869 addBasedOn(); 870 } 871 return getBasedOn().get(0); 872 } 873 874 /** 875 * @deprecated Use Reference#setResource(IBaseResource) instead 876 */ 877 @Deprecated 878 public List<Resource> getBasedOnTarget() { 879 if (this.basedOnTarget == null) 880 this.basedOnTarget = new ArrayList<Resource>(); 881 return this.basedOnTarget; 882 } 883 884 /** 885 * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.) 886 */ 887 public List<Reference> getReplaces() { 888 if (this.replaces == null) 889 this.replaces = new ArrayList<Reference>(); 890 return this.replaces; 891 } 892 893 /** 894 * @return Returns a reference to <code>this</code> for easy method chaining 895 */ 896 public CommunicationRequest setReplaces(List<Reference> theReplaces) { 897 this.replaces = theReplaces; 898 return this; 899 } 900 901 public boolean hasReplaces() { 902 if (this.replaces == null) 903 return false; 904 for (Reference item : this.replaces) 905 if (!item.isEmpty()) 906 return true; 907 return false; 908 } 909 910 public Reference addReplaces() { //3 911 Reference t = new Reference(); 912 if (this.replaces == null) 913 this.replaces = new ArrayList<Reference>(); 914 this.replaces.add(t); 915 return t; 916 } 917 918 public CommunicationRequest addReplaces(Reference t) { //3 919 if (t == null) 920 return this; 921 if (this.replaces == null) 922 this.replaces = new ArrayList<Reference>(); 923 this.replaces.add(t); 924 return this; 925 } 926 927 /** 928 * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist 929 */ 930 public Reference getReplacesFirstRep() { 931 if (getReplaces().isEmpty()) { 932 addReplaces(); 933 } 934 return getReplaces().get(0); 935 } 936 937 /** 938 * @deprecated Use Reference#setResource(IBaseResource) instead 939 */ 940 @Deprecated 941 public List<CommunicationRequest> getReplacesTarget() { 942 if (this.replacesTarget == null) 943 this.replacesTarget = new ArrayList<CommunicationRequest>(); 944 return this.replacesTarget; 945 } 946 947 /** 948 * @deprecated Use Reference#setResource(IBaseResource) instead 949 */ 950 @Deprecated 951 public CommunicationRequest addReplacesTarget() { 952 CommunicationRequest r = new CommunicationRequest(); 953 if (this.replacesTarget == null) 954 this.replacesTarget = new ArrayList<CommunicationRequest>(); 955 this.replacesTarget.add(r); 956 return r; 957 } 958 959 /** 960 * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) 961 */ 962 public Identifier getGroupIdentifier() { 963 if (this.groupIdentifier == null) 964 if (Configuration.errorOnAutoCreate()) 965 throw new Error("Attempt to auto-create CommunicationRequest.groupIdentifier"); 966 else if (Configuration.doAutoCreate()) 967 this.groupIdentifier = new Identifier(); // cc 968 return this.groupIdentifier; 969 } 970 971 public boolean hasGroupIdentifier() { 972 return this.groupIdentifier != null && !this.groupIdentifier.isEmpty(); 973 } 974 975 /** 976 * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.) 977 */ 978 public CommunicationRequest setGroupIdentifier(Identifier value) { 979 this.groupIdentifier = value; 980 return this; 981 } 982 983 /** 984 * @return {@link #status} (The status of the proposal or order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 985 */ 986 public Enumeration<CommunicationRequestStatus> getStatusElement() { 987 if (this.status == null) 988 if (Configuration.errorOnAutoCreate()) 989 throw new Error("Attempt to auto-create CommunicationRequest.status"); 990 else if (Configuration.doAutoCreate()) 991 this.status = new Enumeration<CommunicationRequestStatus>(new CommunicationRequestStatusEnumFactory()); // bb 992 return this.status; 993 } 994 995 public boolean hasStatusElement() { 996 return this.status != null && !this.status.isEmpty(); 997 } 998 999 public boolean hasStatus() { 1000 return this.status != null && !this.status.isEmpty(); 1001 } 1002 1003 /** 1004 * @param value {@link #status} (The status of the proposal or order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1005 */ 1006 public CommunicationRequest setStatusElement(Enumeration<CommunicationRequestStatus> value) { 1007 this.status = value; 1008 return this; 1009 } 1010 1011 /** 1012 * @return The status of the proposal or order. 1013 */ 1014 public CommunicationRequestStatus getStatus() { 1015 return this.status == null ? null : this.status.getValue(); 1016 } 1017 1018 /** 1019 * @param value The status of the proposal or order. 1020 */ 1021 public CommunicationRequest setStatus(CommunicationRequestStatus value) { 1022 if (this.status == null) 1023 this.status = new Enumeration<CommunicationRequestStatus>(new CommunicationRequestStatusEnumFactory()); 1024 this.status.setValue(value); 1025 return this; 1026 } 1027 1028 /** 1029 * @return {@link #category} (The type of message to be sent such as alert, notification, reminder, instruction, etc.) 1030 */ 1031 public List<CodeableConcept> getCategory() { 1032 if (this.category == null) 1033 this.category = new ArrayList<CodeableConcept>(); 1034 return this.category; 1035 } 1036 1037 /** 1038 * @return Returns a reference to <code>this</code> for easy method chaining 1039 */ 1040 public CommunicationRequest setCategory(List<CodeableConcept> theCategory) { 1041 this.category = theCategory; 1042 return this; 1043 } 1044 1045 public boolean hasCategory() { 1046 if (this.category == null) 1047 return false; 1048 for (CodeableConcept item : this.category) 1049 if (!item.isEmpty()) 1050 return true; 1051 return false; 1052 } 1053 1054 public CodeableConcept addCategory() { //3 1055 CodeableConcept t = new CodeableConcept(); 1056 if (this.category == null) 1057 this.category = new ArrayList<CodeableConcept>(); 1058 this.category.add(t); 1059 return t; 1060 } 1061 1062 public CommunicationRequest addCategory(CodeableConcept t) { //3 1063 if (t == null) 1064 return this; 1065 if (this.category == null) 1066 this.category = new ArrayList<CodeableConcept>(); 1067 this.category.add(t); 1068 return this; 1069 } 1070 1071 /** 1072 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist 1073 */ 1074 public CodeableConcept getCategoryFirstRep() { 1075 if (getCategory().isEmpty()) { 1076 addCategory(); 1077 } 1078 return getCategory().get(0); 1079 } 1080 1081 /** 1082 * @return {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1083 */ 1084 public Enumeration<CommunicationPriority> getPriorityElement() { 1085 if (this.priority == null) 1086 if (Configuration.errorOnAutoCreate()) 1087 throw new Error("Attempt to auto-create CommunicationRequest.priority"); 1088 else if (Configuration.doAutoCreate()) 1089 this.priority = new Enumeration<CommunicationPriority>(new CommunicationPriorityEnumFactory()); // bb 1090 return this.priority; 1091 } 1092 1093 public boolean hasPriorityElement() { 1094 return this.priority != null && !this.priority.isEmpty(); 1095 } 1096 1097 public boolean hasPriority() { 1098 return this.priority != null && !this.priority.isEmpty(); 1099 } 1100 1101 /** 1102 * @param value {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1103 */ 1104 public CommunicationRequest setPriorityElement(Enumeration<CommunicationPriority> value) { 1105 this.priority = value; 1106 return this; 1107 } 1108 1109 /** 1110 * @return Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. 1111 */ 1112 public CommunicationPriority getPriority() { 1113 return this.priority == null ? null : this.priority.getValue(); 1114 } 1115 1116 /** 1117 * @param value Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine. 1118 */ 1119 public CommunicationRequest setPriority(CommunicationPriority value) { 1120 if (value == null) 1121 this.priority = null; 1122 else { 1123 if (this.priority == null) 1124 this.priority = new Enumeration<CommunicationPriority>(new CommunicationPriorityEnumFactory()); 1125 this.priority.setValue(value); 1126 } 1127 return this; 1128 } 1129 1130 /** 1131 * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).) 1132 */ 1133 public List<CodeableConcept> getMedium() { 1134 if (this.medium == null) 1135 this.medium = new ArrayList<CodeableConcept>(); 1136 return this.medium; 1137 } 1138 1139 /** 1140 * @return Returns a reference to <code>this</code> for easy method chaining 1141 */ 1142 public CommunicationRequest setMedium(List<CodeableConcept> theMedium) { 1143 this.medium = theMedium; 1144 return this; 1145 } 1146 1147 public boolean hasMedium() { 1148 if (this.medium == null) 1149 return false; 1150 for (CodeableConcept item : this.medium) 1151 if (!item.isEmpty()) 1152 return true; 1153 return false; 1154 } 1155 1156 public CodeableConcept addMedium() { //3 1157 CodeableConcept t = new CodeableConcept(); 1158 if (this.medium == null) 1159 this.medium = new ArrayList<CodeableConcept>(); 1160 this.medium.add(t); 1161 return t; 1162 } 1163 1164 public CommunicationRequest addMedium(CodeableConcept t) { //3 1165 if (t == null) 1166 return this; 1167 if (this.medium == null) 1168 this.medium = new ArrayList<CodeableConcept>(); 1169 this.medium.add(t); 1170 return this; 1171 } 1172 1173 /** 1174 * @return The first repetition of repeating field {@link #medium}, creating it if it does not already exist 1175 */ 1176 public CodeableConcept getMediumFirstRep() { 1177 if (getMedium().isEmpty()) { 1178 addMedium(); 1179 } 1180 return getMedium().get(0); 1181 } 1182 1183 /** 1184 * @return {@link #subject} (The patient or group that is the focus of this communication request.) 1185 */ 1186 public Reference getSubject() { 1187 if (this.subject == null) 1188 if (Configuration.errorOnAutoCreate()) 1189 throw new Error("Attempt to auto-create CommunicationRequest.subject"); 1190 else if (Configuration.doAutoCreate()) 1191 this.subject = new Reference(); // cc 1192 return this.subject; 1193 } 1194 1195 public boolean hasSubject() { 1196 return this.subject != null && !this.subject.isEmpty(); 1197 } 1198 1199 /** 1200 * @param value {@link #subject} (The patient or group that is the focus of this communication request.) 1201 */ 1202 public CommunicationRequest setSubject(Reference value) { 1203 this.subject = value; 1204 return this; 1205 } 1206 1207 /** 1208 * @return {@link #subject} 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 patient or group that is the focus of this communication request.) 1209 */ 1210 public Resource getSubjectTarget() { 1211 return this.subjectTarget; 1212 } 1213 1214 /** 1215 * @param value {@link #subject} 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 patient or group that is the focus of this communication request.) 1216 */ 1217 public CommunicationRequest setSubjectTarget(Resource value) { 1218 this.subjectTarget = value; 1219 return this; 1220 } 1221 1222 /** 1223 * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.) 1224 */ 1225 public List<Reference> getRecipient() { 1226 if (this.recipient == null) 1227 this.recipient = new ArrayList<Reference>(); 1228 return this.recipient; 1229 } 1230 1231 /** 1232 * @return Returns a reference to <code>this</code> for easy method chaining 1233 */ 1234 public CommunicationRequest setRecipient(List<Reference> theRecipient) { 1235 this.recipient = theRecipient; 1236 return this; 1237 } 1238 1239 public boolean hasRecipient() { 1240 if (this.recipient == null) 1241 return false; 1242 for (Reference item : this.recipient) 1243 if (!item.isEmpty()) 1244 return true; 1245 return false; 1246 } 1247 1248 public Reference addRecipient() { //3 1249 Reference t = new Reference(); 1250 if (this.recipient == null) 1251 this.recipient = new ArrayList<Reference>(); 1252 this.recipient.add(t); 1253 return t; 1254 } 1255 1256 public CommunicationRequest addRecipient(Reference t) { //3 1257 if (t == null) 1258 return this; 1259 if (this.recipient == null) 1260 this.recipient = new ArrayList<Reference>(); 1261 this.recipient.add(t); 1262 return this; 1263 } 1264 1265 /** 1266 * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist 1267 */ 1268 public Reference getRecipientFirstRep() { 1269 if (getRecipient().isEmpty()) { 1270 addRecipient(); 1271 } 1272 return getRecipient().get(0); 1273 } 1274 1275 /** 1276 * @deprecated Use Reference#setResource(IBaseResource) instead 1277 */ 1278 @Deprecated 1279 public List<Resource> getRecipientTarget() { 1280 if (this.recipientTarget == null) 1281 this.recipientTarget = new ArrayList<Resource>(); 1282 return this.recipientTarget; 1283 } 1284 1285 /** 1286 * @return {@link #about} (Other resources that pertain to this communication request and to which this communication request should be associated.) 1287 */ 1288 public List<Reference> getAbout() { 1289 if (this.about == null) 1290 this.about = new ArrayList<Reference>(); 1291 return this.about; 1292 } 1293 1294 /** 1295 * @return Returns a reference to <code>this</code> for easy method chaining 1296 */ 1297 public CommunicationRequest setAbout(List<Reference> theAbout) { 1298 this.about = theAbout; 1299 return this; 1300 } 1301 1302 public boolean hasAbout() { 1303 if (this.about == null) 1304 return false; 1305 for (Reference item : this.about) 1306 if (!item.isEmpty()) 1307 return true; 1308 return false; 1309 } 1310 1311 public Reference addAbout() { //3 1312 Reference t = new Reference(); 1313 if (this.about == null) 1314 this.about = new ArrayList<Reference>(); 1315 this.about.add(t); 1316 return t; 1317 } 1318 1319 public CommunicationRequest addAbout(Reference t) { //3 1320 if (t == null) 1321 return this; 1322 if (this.about == null) 1323 this.about = new ArrayList<Reference>(); 1324 this.about.add(t); 1325 return this; 1326 } 1327 1328 /** 1329 * @return The first repetition of repeating field {@link #about}, creating it if it does not already exist 1330 */ 1331 public Reference getAboutFirstRep() { 1332 if (getAbout().isEmpty()) { 1333 addAbout(); 1334 } 1335 return getAbout().get(0); 1336 } 1337 1338 /** 1339 * @deprecated Use Reference#setResource(IBaseResource) instead 1340 */ 1341 @Deprecated 1342 public List<Resource> getAboutTarget() { 1343 if (this.aboutTarget == null) 1344 this.aboutTarget = new ArrayList<Resource>(); 1345 return this.aboutTarget; 1346 } 1347 1348 /** 1349 * @return {@link #context} (The encounter or episode of care within which the communication request was created.) 1350 */ 1351 public Reference getContext() { 1352 if (this.context == null) 1353 if (Configuration.errorOnAutoCreate()) 1354 throw new Error("Attempt to auto-create CommunicationRequest.context"); 1355 else if (Configuration.doAutoCreate()) 1356 this.context = new Reference(); // cc 1357 return this.context; 1358 } 1359 1360 public boolean hasContext() { 1361 return this.context != null && !this.context.isEmpty(); 1362 } 1363 1364 /** 1365 * @param value {@link #context} (The encounter or episode of care within which the communication request was created.) 1366 */ 1367 public CommunicationRequest setContext(Reference value) { 1368 this.context = value; 1369 return this; 1370 } 1371 1372 /** 1373 * @return {@link #context} 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 encounter or episode of care within which the communication request was created.) 1374 */ 1375 public Resource getContextTarget() { 1376 return this.contextTarget; 1377 } 1378 1379 /** 1380 * @param value {@link #context} 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 encounter or episode of care within which the communication request was created.) 1381 */ 1382 public CommunicationRequest setContextTarget(Resource value) { 1383 this.contextTarget = value; 1384 return this; 1385 } 1386 1387 /** 1388 * @return {@link #payload} (Text, attachment(s), or resource(s) to be communicated to the recipient.) 1389 */ 1390 public List<CommunicationRequestPayloadComponent> getPayload() { 1391 if (this.payload == null) 1392 this.payload = new ArrayList<CommunicationRequestPayloadComponent>(); 1393 return this.payload; 1394 } 1395 1396 /** 1397 * @return Returns a reference to <code>this</code> for easy method chaining 1398 */ 1399 public CommunicationRequest setPayload(List<CommunicationRequestPayloadComponent> thePayload) { 1400 this.payload = thePayload; 1401 return this; 1402 } 1403 1404 public boolean hasPayload() { 1405 if (this.payload == null) 1406 return false; 1407 for (CommunicationRequestPayloadComponent item : this.payload) 1408 if (!item.isEmpty()) 1409 return true; 1410 return false; 1411 } 1412 1413 public CommunicationRequestPayloadComponent addPayload() { //3 1414 CommunicationRequestPayloadComponent t = new CommunicationRequestPayloadComponent(); 1415 if (this.payload == null) 1416 this.payload = new ArrayList<CommunicationRequestPayloadComponent>(); 1417 this.payload.add(t); 1418 return t; 1419 } 1420 1421 public CommunicationRequest addPayload(CommunicationRequestPayloadComponent t) { //3 1422 if (t == null) 1423 return this; 1424 if (this.payload == null) 1425 this.payload = new ArrayList<CommunicationRequestPayloadComponent>(); 1426 this.payload.add(t); 1427 return this; 1428 } 1429 1430 /** 1431 * @return The first repetition of repeating field {@link #payload}, creating it if it does not already exist 1432 */ 1433 public CommunicationRequestPayloadComponent getPayloadFirstRep() { 1434 if (getPayload().isEmpty()) { 1435 addPayload(); 1436 } 1437 return getPayload().get(0); 1438 } 1439 1440 /** 1441 * @return {@link #occurrence} (The time when this communication is to occur.) 1442 */ 1443 public Type getOccurrence() { 1444 return this.occurrence; 1445 } 1446 1447 /** 1448 * @return {@link #occurrence} (The time when this communication is to occur.) 1449 */ 1450 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 1451 if (this.occurrence == null) 1452 return null; 1453 if (!(this.occurrence instanceof DateTimeType)) 1454 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 1455 return (DateTimeType) this.occurrence; 1456 } 1457 1458 public boolean hasOccurrenceDateTimeType() { 1459 return this != null && this.occurrence instanceof DateTimeType; 1460 } 1461 1462 /** 1463 * @return {@link #occurrence} (The time when this communication is to occur.) 1464 */ 1465 public Period getOccurrencePeriod() throws FHIRException { 1466 if (this.occurrence == null) 1467 return null; 1468 if (!(this.occurrence instanceof Period)) 1469 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 1470 return (Period) this.occurrence; 1471 } 1472 1473 public boolean hasOccurrencePeriod() { 1474 return this != null && this.occurrence instanceof Period; 1475 } 1476 1477 public boolean hasOccurrence() { 1478 return this.occurrence != null && !this.occurrence.isEmpty(); 1479 } 1480 1481 /** 1482 * @param value {@link #occurrence} (The time when this communication is to occur.) 1483 */ 1484 public CommunicationRequest setOccurrence(Type value) { 1485 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 1486 throw new Error("Not the right type for CommunicationRequest.occurrence[x]: "+value.fhirType()); 1487 this.occurrence = value; 1488 return this; 1489 } 1490 1491 /** 1492 * @return {@link #authoredOn} (For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 1493 */ 1494 public DateTimeType getAuthoredOnElement() { 1495 if (this.authoredOn == null) 1496 if (Configuration.errorOnAutoCreate()) 1497 throw new Error("Attempt to auto-create CommunicationRequest.authoredOn"); 1498 else if (Configuration.doAutoCreate()) 1499 this.authoredOn = new DateTimeType(); // bb 1500 return this.authoredOn; 1501 } 1502 1503 public boolean hasAuthoredOnElement() { 1504 return this.authoredOn != null && !this.authoredOn.isEmpty(); 1505 } 1506 1507 public boolean hasAuthoredOn() { 1508 return this.authoredOn != null && !this.authoredOn.isEmpty(); 1509 } 1510 1511 /** 1512 * @param value {@link #authoredOn} (For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value 1513 */ 1514 public CommunicationRequest setAuthoredOnElement(DateTimeType value) { 1515 this.authoredOn = value; 1516 return this; 1517 } 1518 1519 /** 1520 * @return For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. 1521 */ 1522 public Date getAuthoredOn() { 1523 return this.authoredOn == null ? null : this.authoredOn.getValue(); 1524 } 1525 1526 /** 1527 * @param value For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation. 1528 */ 1529 public CommunicationRequest setAuthoredOn(Date value) { 1530 if (value == null) 1531 this.authoredOn = null; 1532 else { 1533 if (this.authoredOn == null) 1534 this.authoredOn = new DateTimeType(); 1535 this.authoredOn.setValue(value); 1536 } 1537 return this; 1538 } 1539 1540 /** 1541 * @return {@link #requester} (The device, individual, or organization who initiated the request and has responsibility for its activation.) 1542 */ 1543 public Reference getRequester() { 1544 if (this.requester == null) 1545 if (Configuration.errorOnAutoCreate()) 1546 throw new Error("Attempt to auto-create CommunicationRequest.requester"); 1547 else if (Configuration.doAutoCreate()) 1548 this.requester = new Reference(); // cc 1549 return this.requester; 1550 } 1551 1552 public boolean hasRequester() { 1553 return this.requester != null && !this.requester.isEmpty(); 1554 } 1555 1556 /** 1557 * @param value {@link #requester} (The device, individual, or organization who initiated the request and has responsibility for its activation.) 1558 */ 1559 public CommunicationRequest setRequester(Reference value) { 1560 this.requester = value; 1561 return this; 1562 } 1563 1564 /** 1565 * @return {@link #requester} 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, individual, or organization who initiated the request and has responsibility for its activation.) 1566 */ 1567 public Resource getRequesterTarget() { 1568 return this.requesterTarget; 1569 } 1570 1571 /** 1572 * @param value {@link #requester} 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, individual, or organization who initiated the request and has responsibility for its activation.) 1573 */ 1574 public CommunicationRequest setRequesterTarget(Resource value) { 1575 this.requesterTarget = value; 1576 return this; 1577 } 1578 1579 /** 1580 * @return {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) 1581 */ 1582 public Reference getSender() { 1583 if (this.sender == null) 1584 if (Configuration.errorOnAutoCreate()) 1585 throw new Error("Attempt to auto-create CommunicationRequest.sender"); 1586 else if (Configuration.doAutoCreate()) 1587 this.sender = new Reference(); // cc 1588 return this.sender; 1589 } 1590 1591 public boolean hasSender() { 1592 return this.sender != null && !this.sender.isEmpty(); 1593 } 1594 1595 /** 1596 * @param value {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) 1597 */ 1598 public CommunicationRequest setSender(Reference value) { 1599 this.sender = value; 1600 return this; 1601 } 1602 1603 /** 1604 * @return {@link #sender} 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 entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) 1605 */ 1606 public Resource getSenderTarget() { 1607 return this.senderTarget; 1608 } 1609 1610 /** 1611 * @param value {@link #sender} 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 entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.) 1612 */ 1613 public CommunicationRequest setSenderTarget(Resource value) { 1614 this.senderTarget = value; 1615 return this; 1616 } 1617 1618 /** 1619 * @return {@link #reasonCode} (Describes why the request is being made in coded or textual form.) 1620 */ 1621 public List<CodeableConcept> getReasonCode() { 1622 if (this.reasonCode == null) 1623 this.reasonCode = new ArrayList<CodeableConcept>(); 1624 return this.reasonCode; 1625 } 1626 1627 /** 1628 * @return Returns a reference to <code>this</code> for easy method chaining 1629 */ 1630 public CommunicationRequest setReasonCode(List<CodeableConcept> theReasonCode) { 1631 this.reasonCode = theReasonCode; 1632 return this; 1633 } 1634 1635 public boolean hasReasonCode() { 1636 if (this.reasonCode == null) 1637 return false; 1638 for (CodeableConcept item : this.reasonCode) 1639 if (!item.isEmpty()) 1640 return true; 1641 return false; 1642 } 1643 1644 public CodeableConcept addReasonCode() { //3 1645 CodeableConcept t = new CodeableConcept(); 1646 if (this.reasonCode == null) 1647 this.reasonCode = new ArrayList<CodeableConcept>(); 1648 this.reasonCode.add(t); 1649 return t; 1650 } 1651 1652 public CommunicationRequest addReasonCode(CodeableConcept t) { //3 1653 if (t == null) 1654 return this; 1655 if (this.reasonCode == null) 1656 this.reasonCode = new ArrayList<CodeableConcept>(); 1657 this.reasonCode.add(t); 1658 return this; 1659 } 1660 1661 /** 1662 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 1663 */ 1664 public CodeableConcept getReasonCodeFirstRep() { 1665 if (getReasonCode().isEmpty()) { 1666 addReasonCode(); 1667 } 1668 return getReasonCode().get(0); 1669 } 1670 1671 /** 1672 * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request.) 1673 */ 1674 public List<Reference> getReasonReference() { 1675 if (this.reasonReference == null) 1676 this.reasonReference = new ArrayList<Reference>(); 1677 return this.reasonReference; 1678 } 1679 1680 /** 1681 * @return Returns a reference to <code>this</code> for easy method chaining 1682 */ 1683 public CommunicationRequest setReasonReference(List<Reference> theReasonReference) { 1684 this.reasonReference = theReasonReference; 1685 return this; 1686 } 1687 1688 public boolean hasReasonReference() { 1689 if (this.reasonReference == null) 1690 return false; 1691 for (Reference item : this.reasonReference) 1692 if (!item.isEmpty()) 1693 return true; 1694 return false; 1695 } 1696 1697 public Reference addReasonReference() { //3 1698 Reference t = new Reference(); 1699 if (this.reasonReference == null) 1700 this.reasonReference = new ArrayList<Reference>(); 1701 this.reasonReference.add(t); 1702 return t; 1703 } 1704 1705 public CommunicationRequest addReasonReference(Reference t) { //3 1706 if (t == null) 1707 return this; 1708 if (this.reasonReference == null) 1709 this.reasonReference = new ArrayList<Reference>(); 1710 this.reasonReference.add(t); 1711 return this; 1712 } 1713 1714 /** 1715 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 1716 */ 1717 public Reference getReasonReferenceFirstRep() { 1718 if (getReasonReference().isEmpty()) { 1719 addReasonReference(); 1720 } 1721 return getReasonReference().get(0); 1722 } 1723 1724 /** 1725 * @deprecated Use Reference#setResource(IBaseResource) instead 1726 */ 1727 @Deprecated 1728 public List<Resource> getReasonReferenceTarget() { 1729 if (this.reasonReferenceTarget == null) 1730 this.reasonReferenceTarget = new ArrayList<Resource>(); 1731 return this.reasonReferenceTarget; 1732 } 1733 1734 /** 1735 * @return {@link #note} (Comments made about the request by the requester, sender, recipient, subject or other participants.) 1736 */ 1737 public List<Annotation> getNote() { 1738 if (this.note == null) 1739 this.note = new ArrayList<Annotation>(); 1740 return this.note; 1741 } 1742 1743 /** 1744 * @return Returns a reference to <code>this</code> for easy method chaining 1745 */ 1746 public CommunicationRequest setNote(List<Annotation> theNote) { 1747 this.note = theNote; 1748 return this; 1749 } 1750 1751 public boolean hasNote() { 1752 if (this.note == null) 1753 return false; 1754 for (Annotation item : this.note) 1755 if (!item.isEmpty()) 1756 return true; 1757 return false; 1758 } 1759 1760 public Annotation addNote() { //3 1761 Annotation t = new Annotation(); 1762 if (this.note == null) 1763 this.note = new ArrayList<Annotation>(); 1764 this.note.add(t); 1765 return t; 1766 } 1767 1768 public CommunicationRequest addNote(Annotation t) { //3 1769 if (t == null) 1770 return this; 1771 if (this.note == null) 1772 this.note = new ArrayList<Annotation>(); 1773 this.note.add(t); 1774 return this; 1775 } 1776 1777 /** 1778 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 1779 */ 1780 public Annotation getNoteFirstRep() { 1781 if (getNote().isEmpty()) { 1782 addNote(); 1783 } 1784 return getNote().get(0); 1785 } 1786 1787 protected void listChildren(List<Property> children) { 1788 super.listChildren(children); 1789 children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1790 children.add(new Property("basedOn", "Reference(Any)", "A plan or proposal that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 1791 children.add(new Property("replaces", "Reference(CommunicationRequest)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces)); 1792 children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier)); 1793 children.add(new Property("status", "code", "The status of the proposal or order.", 0, 1, status)); 1794 children.add(new Property("category", "CodeableConcept", "The type of message to be sent such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category)); 1795 children.add(new Property("priority", "code", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, 1, priority)); 1796 children.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium)); 1797 children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group that is the focus of this communication request.", 0, 1, subject)); 1798 children.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson|Group|CareTeam)", "The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient)); 1799 children.add(new Property("about", "Reference(Any)", "Other resources that pertain to this communication request and to which this communication request should be associated.", 0, java.lang.Integer.MAX_VALUE, about)); 1800 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care within which the communication request was created.", 0, 1, context)); 1801 children.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload)); 1802 children.add(new Property("occurrence[x]", "dateTime|Period", "The time when this communication is to occur.", 0, 1, occurrence)); 1803 children.add(new Property("authoredOn", "dateTime", "For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.", 0, 1, authoredOn)); 1804 children.add(new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The device, individual, or organization who initiated the request and has responsibility for its activation.", 0, 1, requester)); 1805 children.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson|HealthcareService)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, 1, sender)); 1806 children.add(new Property("reasonCode", "CodeableConcept", "Describes why the request is being made in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1807 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 1808 children.add(new Property("note", "Annotation", "Comments made about the request by the requester, sender, recipient, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note)); 1809 } 1810 1811 @Override 1812 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1813 switch (_hash) { 1814 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); 1815 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(Any)", "A plan or proposal that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn); 1816 case -430332865: /*replaces*/ return new Property("replaces", "Reference(CommunicationRequest)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces); 1817 case -445338488: /*groupIdentifier*/ return new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier); 1818 case -892481550: /*status*/ return new Property("status", "code", "The status of the proposal or order.", 0, 1, status); 1819 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "The type of message to be sent such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category); 1820 case -1165461084: /*priority*/ return new Property("priority", "code", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, 1, priority); 1821 case -1078030475: /*medium*/ return new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium); 1822 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group that is the focus of this communication request.", 0, 1, subject); 1823 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson|Group|CareTeam)", "The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient); 1824 case 92611469: /*about*/ return new Property("about", "Reference(Any)", "Other resources that pertain to this communication request and to which this communication request should be associated.", 0, java.lang.Integer.MAX_VALUE, about); 1825 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care within which the communication request was created.", 0, 1, context); 1826 case -786701938: /*payload*/ return new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload); 1827 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period", "The time when this communication is to occur.", 0, 1, occurrence); 1828 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period", "The time when this communication is to occur.", 0, 1, occurrence); 1829 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime|Period", "The time when this communication is to occur.", 0, 1, occurrence); 1830 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "dateTime|Period", "The time when this communication is to occur.", 0, 1, occurrence); 1831 case -1500852503: /*authoredOn*/ return new Property("authoredOn", "dateTime", "For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.", 0, 1, authoredOn); 1832 case 693933948: /*requester*/ return new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The device, individual, or organization who initiated the request and has responsibility for its activation.", 0, 1, requester); 1833 case -905962955: /*sender*/ return new Property("sender", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson|HealthcareService)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, 1, sender); 1834 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Describes why the request is being made in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1835 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 1836 case 3387378: /*note*/ return new Property("note", "Annotation", "Comments made about the request by the requester, sender, recipient, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note); 1837 default: return super.getNamedProperty(_hash, _name, _checkValid); 1838 } 1839 1840 } 1841 1842 @Override 1843 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1844 switch (hash) { 1845 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1846 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 1847 case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference 1848 case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier 1849 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CommunicationRequestStatus> 1850 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 1851 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<CommunicationPriority> 1852 case -1078030475: /*medium*/ return this.medium == null ? new Base[0] : this.medium.toArray(new Base[this.medium.size()]); // CodeableConcept 1853 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1854 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference 1855 case 92611469: /*about*/ return this.about == null ? new Base[0] : this.about.toArray(new Base[this.about.size()]); // Reference 1856 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 1857 case -786701938: /*payload*/ return this.payload == null ? new Base[0] : this.payload.toArray(new Base[this.payload.size()]); // CommunicationRequestPayloadComponent 1858 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // Type 1859 case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType 1860 case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference 1861 case -905962955: /*sender*/ return this.sender == null ? new Base[0] : new Base[] {this.sender}; // Reference 1862 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1863 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1864 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1865 default: return super.getProperty(hash, name, checkValid); 1866 } 1867 1868 } 1869 1870 @Override 1871 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1872 switch (hash) { 1873 case -1618432855: // identifier 1874 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1875 return value; 1876 case -332612366: // basedOn 1877 this.getBasedOn().add(castToReference(value)); // Reference 1878 return value; 1879 case -430332865: // replaces 1880 this.getReplaces().add(castToReference(value)); // Reference 1881 return value; 1882 case -445338488: // groupIdentifier 1883 this.groupIdentifier = castToIdentifier(value); // Identifier 1884 return value; 1885 case -892481550: // status 1886 value = new CommunicationRequestStatusEnumFactory().fromType(castToCode(value)); 1887 this.status = (Enumeration) value; // Enumeration<CommunicationRequestStatus> 1888 return value; 1889 case 50511102: // category 1890 this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept 1891 return value; 1892 case -1165461084: // priority 1893 value = new CommunicationPriorityEnumFactory().fromType(castToCode(value)); 1894 this.priority = (Enumeration) value; // Enumeration<CommunicationPriority> 1895 return value; 1896 case -1078030475: // medium 1897 this.getMedium().add(castToCodeableConcept(value)); // CodeableConcept 1898 return value; 1899 case -1867885268: // subject 1900 this.subject = castToReference(value); // Reference 1901 return value; 1902 case 820081177: // recipient 1903 this.getRecipient().add(castToReference(value)); // Reference 1904 return value; 1905 case 92611469: // about 1906 this.getAbout().add(castToReference(value)); // Reference 1907 return value; 1908 case 951530927: // context 1909 this.context = castToReference(value); // Reference 1910 return value; 1911 case -786701938: // payload 1912 this.getPayload().add((CommunicationRequestPayloadComponent) value); // CommunicationRequestPayloadComponent 1913 return value; 1914 case 1687874001: // occurrence 1915 this.occurrence = castToType(value); // Type 1916 return value; 1917 case -1500852503: // authoredOn 1918 this.authoredOn = castToDateTime(value); // DateTimeType 1919 return value; 1920 case 693933948: // requester 1921 this.requester = castToReference(value); // Reference 1922 return value; 1923 case -905962955: // sender 1924 this.sender = castToReference(value); // Reference 1925 return value; 1926 case 722137681: // reasonCode 1927 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 1928 return value; 1929 case -1146218137: // reasonReference 1930 this.getReasonReference().add(castToReference(value)); // Reference 1931 return value; 1932 case 3387378: // note 1933 this.getNote().add(castToAnnotation(value)); // Annotation 1934 return value; 1935 default: return super.setProperty(hash, name, value); 1936 } 1937 1938 } 1939 1940 @Override 1941 public Base setProperty(String name, Base value) throws FHIRException { 1942 if (name.equals("identifier")) { 1943 this.getIdentifier().add(castToIdentifier(value)); 1944 } else if (name.equals("basedOn")) { 1945 this.getBasedOn().add(castToReference(value)); 1946 } else if (name.equals("replaces")) { 1947 this.getReplaces().add(castToReference(value)); 1948 } else if (name.equals("groupIdentifier")) { 1949 this.groupIdentifier = castToIdentifier(value); // Identifier 1950 } else if (name.equals("status")) { 1951 value = new CommunicationRequestStatusEnumFactory().fromType(castToCode(value)); 1952 this.status = (Enumeration) value; // Enumeration<CommunicationRequestStatus> 1953 } else if (name.equals("category")) { 1954 this.getCategory().add(castToCodeableConcept(value)); 1955 } else if (name.equals("priority")) { 1956 value = new CommunicationPriorityEnumFactory().fromType(castToCode(value)); 1957 this.priority = (Enumeration) value; // Enumeration<CommunicationPriority> 1958 } else if (name.equals("medium")) { 1959 this.getMedium().add(castToCodeableConcept(value)); 1960 } else if (name.equals("subject")) { 1961 this.subject = castToReference(value); // Reference 1962 } else if (name.equals("recipient")) { 1963 this.getRecipient().add(castToReference(value)); 1964 } else if (name.equals("about")) { 1965 this.getAbout().add(castToReference(value)); 1966 } else if (name.equals("context")) { 1967 this.context = castToReference(value); // Reference 1968 } else if (name.equals("payload")) { 1969 this.getPayload().add((CommunicationRequestPayloadComponent) value); 1970 } else if (name.equals("occurrence[x]")) { 1971 this.occurrence = castToType(value); // Type 1972 } else if (name.equals("authoredOn")) { 1973 this.authoredOn = castToDateTime(value); // DateTimeType 1974 } else if (name.equals("requester")) { 1975 this.requester = castToReference(value); // Reference 1976 } else if (name.equals("sender")) { 1977 this.sender = castToReference(value); // Reference 1978 } else if (name.equals("reasonCode")) { 1979 this.getReasonCode().add(castToCodeableConcept(value)); 1980 } else if (name.equals("reasonReference")) { 1981 this.getReasonReference().add(castToReference(value)); 1982 } else if (name.equals("note")) { 1983 this.getNote().add(castToAnnotation(value)); 1984 } else 1985 return super.setProperty(name, value); 1986 return value; 1987 } 1988 1989 @Override 1990 public Base makeProperty(int hash, String name) throws FHIRException { 1991 switch (hash) { 1992 case -1618432855: return addIdentifier(); 1993 case -332612366: return addBasedOn(); 1994 case -430332865: return addReplaces(); 1995 case -445338488: return getGroupIdentifier(); 1996 case -892481550: return getStatusElement(); 1997 case 50511102: return addCategory(); 1998 case -1165461084: return getPriorityElement(); 1999 case -1078030475: return addMedium(); 2000 case -1867885268: return getSubject(); 2001 case 820081177: return addRecipient(); 2002 case 92611469: return addAbout(); 2003 case 951530927: return getContext(); 2004 case -786701938: return addPayload(); 2005 case -2022646513: return getOccurrence(); 2006 case 1687874001: return getOccurrence(); 2007 case -1500852503: return getAuthoredOnElement(); 2008 case 693933948: return getRequester(); 2009 case -905962955: return getSender(); 2010 case 722137681: return addReasonCode(); 2011 case -1146218137: return addReasonReference(); 2012 case 3387378: return addNote(); 2013 default: return super.makeProperty(hash, name); 2014 } 2015 2016 } 2017 2018 @Override 2019 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2020 switch (hash) { 2021 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2022 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 2023 case -430332865: /*replaces*/ return new String[] {"Reference"}; 2024 case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"}; 2025 case -892481550: /*status*/ return new String[] {"code"}; 2026 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 2027 case -1165461084: /*priority*/ return new String[] {"code"}; 2028 case -1078030475: /*medium*/ return new String[] {"CodeableConcept"}; 2029 case -1867885268: /*subject*/ return new String[] {"Reference"}; 2030 case 820081177: /*recipient*/ return new String[] {"Reference"}; 2031 case 92611469: /*about*/ return new String[] {"Reference"}; 2032 case 951530927: /*context*/ return new String[] {"Reference"}; 2033 case -786701938: /*payload*/ return new String[] {}; 2034 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period"}; 2035 case -1500852503: /*authoredOn*/ return new String[] {"dateTime"}; 2036 case 693933948: /*requester*/ return new String[] {"Reference"}; 2037 case -905962955: /*sender*/ return new String[] {"Reference"}; 2038 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 2039 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 2040 case 3387378: /*note*/ return new String[] {"Annotation"}; 2041 default: return super.getTypesForProperty(hash, name); 2042 } 2043 2044 } 2045 2046 @Override 2047 public Base addChild(String name) throws FHIRException { 2048 if (name.equals("identifier")) { 2049 return addIdentifier(); 2050 } 2051 else if (name.equals("basedOn")) { 2052 return addBasedOn(); 2053 } 2054 else if (name.equals("replaces")) { 2055 return addReplaces(); 2056 } 2057 else if (name.equals("groupIdentifier")) { 2058 this.groupIdentifier = new Identifier(); 2059 return this.groupIdentifier; 2060 } 2061 else if (name.equals("status")) { 2062 throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.status"); 2063 } 2064 else if (name.equals("category")) { 2065 return addCategory(); 2066 } 2067 else if (name.equals("priority")) { 2068 throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.priority"); 2069 } 2070 else if (name.equals("medium")) { 2071 return addMedium(); 2072 } 2073 else if (name.equals("subject")) { 2074 this.subject = new Reference(); 2075 return this.subject; 2076 } 2077 else if (name.equals("recipient")) { 2078 return addRecipient(); 2079 } 2080 else if (name.equals("about")) { 2081 return addAbout(); 2082 } 2083 else if (name.equals("context")) { 2084 this.context = new Reference(); 2085 return this.context; 2086 } 2087 else if (name.equals("payload")) { 2088 return addPayload(); 2089 } 2090 else if (name.equals("occurrenceDateTime")) { 2091 this.occurrence = new DateTimeType(); 2092 return this.occurrence; 2093 } 2094 else if (name.equals("occurrencePeriod")) { 2095 this.occurrence = new Period(); 2096 return this.occurrence; 2097 } 2098 else if (name.equals("authoredOn")) { 2099 throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.authoredOn"); 2100 } 2101 else if (name.equals("requester")) { 2102 this.requester = new Reference(); 2103 return this.requester; 2104 } 2105 else if (name.equals("sender")) { 2106 this.sender = new Reference(); 2107 return this.sender; 2108 } 2109 else if (name.equals("reasonCode")) { 2110 return addReasonCode(); 2111 } 2112 else if (name.equals("reasonReference")) { 2113 return addReasonReference(); 2114 } 2115 else if (name.equals("note")) { 2116 return addNote(); 2117 } 2118 else 2119 return super.addChild(name); 2120 } 2121 2122 public String fhirType() { 2123 return "CommunicationRequest"; 2124 2125 } 2126 2127 public CommunicationRequest copy() { 2128 CommunicationRequest dst = new CommunicationRequest(); 2129 copyValues(dst); 2130 if (identifier != null) { 2131 dst.identifier = new ArrayList<Identifier>(); 2132 for (Identifier i : identifier) 2133 dst.identifier.add(i.copy()); 2134 }; 2135 if (basedOn != null) { 2136 dst.basedOn = new ArrayList<Reference>(); 2137 for (Reference i : basedOn) 2138 dst.basedOn.add(i.copy()); 2139 }; 2140 if (replaces != null) { 2141 dst.replaces = new ArrayList<Reference>(); 2142 for (Reference i : replaces) 2143 dst.replaces.add(i.copy()); 2144 }; 2145 dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); 2146 dst.status = status == null ? null : status.copy(); 2147 if (category != null) { 2148 dst.category = new ArrayList<CodeableConcept>(); 2149 for (CodeableConcept i : category) 2150 dst.category.add(i.copy()); 2151 }; 2152 dst.priority = priority == null ? null : priority.copy(); 2153 if (medium != null) { 2154 dst.medium = new ArrayList<CodeableConcept>(); 2155 for (CodeableConcept i : medium) 2156 dst.medium.add(i.copy()); 2157 }; 2158 dst.subject = subject == null ? null : subject.copy(); 2159 if (recipient != null) { 2160 dst.recipient = new ArrayList<Reference>(); 2161 for (Reference i : recipient) 2162 dst.recipient.add(i.copy()); 2163 }; 2164 if (about != null) { 2165 dst.about = new ArrayList<Reference>(); 2166 for (Reference i : about) 2167 dst.about.add(i.copy()); 2168 }; 2169 dst.context = context == null ? null : context.copy(); 2170 if (payload != null) { 2171 dst.payload = new ArrayList<CommunicationRequestPayloadComponent>(); 2172 for (CommunicationRequestPayloadComponent i : payload) 2173 dst.payload.add(i.copy()); 2174 }; 2175 dst.occurrence = occurrence == null ? null : occurrence.copy(); 2176 dst.authoredOn = authoredOn == null ? null : authoredOn.copy(); 2177 dst.requester = requester == null ? null : requester.copy(); 2178 dst.sender = sender == null ? null : sender.copy(); 2179 if (reasonCode != null) { 2180 dst.reasonCode = new ArrayList<CodeableConcept>(); 2181 for (CodeableConcept i : reasonCode) 2182 dst.reasonCode.add(i.copy()); 2183 }; 2184 if (reasonReference != null) { 2185 dst.reasonReference = new ArrayList<Reference>(); 2186 for (Reference i : reasonReference) 2187 dst.reasonReference.add(i.copy()); 2188 }; 2189 if (note != null) { 2190 dst.note = new ArrayList<Annotation>(); 2191 for (Annotation i : note) 2192 dst.note.add(i.copy()); 2193 }; 2194 return dst; 2195 } 2196 2197 protected CommunicationRequest typedCopy() { 2198 return copy(); 2199 } 2200 2201 @Override 2202 public boolean equalsDeep(Base other_) { 2203 if (!super.equalsDeep(other_)) 2204 return false; 2205 if (!(other_ instanceof CommunicationRequest)) 2206 return false; 2207 CommunicationRequest o = (CommunicationRequest) other_; 2208 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(replaces, o.replaces, true) 2209 && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(status, o.status, true) 2210 && compareDeep(category, o.category, true) && compareDeep(priority, o.priority, true) && compareDeep(medium, o.medium, true) 2211 && compareDeep(subject, o.subject, true) && compareDeep(recipient, o.recipient, true) && compareDeep(about, o.about, true) 2212 && compareDeep(context, o.context, true) && compareDeep(payload, o.payload, true) && compareDeep(occurrence, o.occurrence, true) 2213 && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(requester, o.requester, true) && compareDeep(sender, o.sender, true) 2214 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 2215 && compareDeep(note, o.note, true); 2216 } 2217 2218 @Override 2219 public boolean equalsShallow(Base other_) { 2220 if (!super.equalsShallow(other_)) 2221 return false; 2222 if (!(other_ instanceof CommunicationRequest)) 2223 return false; 2224 CommunicationRequest o = (CommunicationRequest) other_; 2225 return compareValues(status, o.status, true) && compareValues(priority, o.priority, true) && compareValues(authoredOn, o.authoredOn, true) 2226 ; 2227 } 2228 2229 public boolean isEmpty() { 2230 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, replaces 2231 , groupIdentifier, status, category, priority, medium, subject, recipient, about 2232 , context, payload, occurrence, authoredOn, requester, sender, reasonCode, reasonReference 2233 , note); 2234 } 2235 2236 @Override 2237 public ResourceType getResourceType() { 2238 return ResourceType.CommunicationRequest; 2239 } 2240 2241 /** 2242 * Search parameter: <b>requester</b> 2243 * <p> 2244 * Description: <b>Who/what is requesting service</b><br> 2245 * Type: <b>reference</b><br> 2246 * Path: <b>CommunicationRequest.requester</b><br> 2247 * </p> 2248 */ 2249 @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="Who/what is requesting service", type="reference", providesMembershipIn={ @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, PractitionerRole.class, RelatedPerson.class } ) 2250 public static final String SP_REQUESTER = "requester"; 2251 /** 2252 * <b>Fluent Client</b> search parameter constant for <b>requester</b> 2253 * <p> 2254 * Description: <b>Who/what is requesting service</b><br> 2255 * Type: <b>reference</b><br> 2256 * Path: <b>CommunicationRequest.requester</b><br> 2257 * </p> 2258 */ 2259 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER); 2260 2261/** 2262 * Constant for fluent queries to be used to add include statements. Specifies 2263 * the path value of "<b>CommunicationRequest:requester</b>". 2264 */ 2265 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:requester").toLocked(); 2266 2267 /** 2268 * Search parameter: <b>authored</b> 2269 * <p> 2270 * Description: <b>When request transitioned to being actionable</b><br> 2271 * Type: <b>date</b><br> 2272 * Path: <b>CommunicationRequest.authoredOn</b><br> 2273 * </p> 2274 */ 2275 @SearchParamDefinition(name="authored", path="CommunicationRequest.authoredOn", description="When request transitioned to being actionable", type="date" ) 2276 public static final String SP_AUTHORED = "authored"; 2277 /** 2278 * <b>Fluent Client</b> search parameter constant for <b>authored</b> 2279 * <p> 2280 * Description: <b>When request transitioned to being actionable</b><br> 2281 * Type: <b>date</b><br> 2282 * Path: <b>CommunicationRequest.authoredOn</b><br> 2283 * </p> 2284 */ 2285 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED); 2286 2287 /** 2288 * Search parameter: <b>identifier</b> 2289 * <p> 2290 * Description: <b>Unique identifier</b><br> 2291 * Type: <b>token</b><br> 2292 * Path: <b>CommunicationRequest.identifier</b><br> 2293 * </p> 2294 */ 2295 @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" ) 2296 public static final String SP_IDENTIFIER = "identifier"; 2297 /** 2298 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2299 * <p> 2300 * Description: <b>Unique identifier</b><br> 2301 * Type: <b>token</b><br> 2302 * Path: <b>CommunicationRequest.identifier</b><br> 2303 * </p> 2304 */ 2305 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2306 2307 /** 2308 * Search parameter: <b>subject</b> 2309 * <p> 2310 * Description: <b>Focus of message</b><br> 2311 * Type: <b>reference</b><br> 2312 * Path: <b>CommunicationRequest.subject</b><br> 2313 * </p> 2314 */ 2315 @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Group.class, Patient.class } ) 2316 public static final String SP_SUBJECT = "subject"; 2317 /** 2318 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2319 * <p> 2320 * Description: <b>Focus of message</b><br> 2321 * Type: <b>reference</b><br> 2322 * Path: <b>CommunicationRequest.subject</b><br> 2323 * </p> 2324 */ 2325 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2326 2327/** 2328 * Constant for fluent queries to be used to add include statements. Specifies 2329 * the path value of "<b>CommunicationRequest:subject</b>". 2330 */ 2331 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:subject").toLocked(); 2332 2333 /** 2334 * Search parameter: <b>replaces</b> 2335 * <p> 2336 * Description: <b>Request(s) replaced by this request</b><br> 2337 * Type: <b>reference</b><br> 2338 * Path: <b>CommunicationRequest.replaces</b><br> 2339 * </p> 2340 */ 2341 @SearchParamDefinition(name="replaces", path="CommunicationRequest.replaces", description="Request(s) replaced by this request", type="reference", target={CommunicationRequest.class } ) 2342 public static final String SP_REPLACES = "replaces"; 2343 /** 2344 * <b>Fluent Client</b> search parameter constant for <b>replaces</b> 2345 * <p> 2346 * Description: <b>Request(s) replaced by this request</b><br> 2347 * Type: <b>reference</b><br> 2348 * Path: <b>CommunicationRequest.replaces</b><br> 2349 * </p> 2350 */ 2351 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPLACES); 2352 2353/** 2354 * Constant for fluent queries to be used to add include statements. Specifies 2355 * the path value of "<b>CommunicationRequest:replaces</b>". 2356 */ 2357 public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACES = new ca.uhn.fhir.model.api.Include("CommunicationRequest:replaces").toLocked(); 2358 2359 /** 2360 * Search parameter: <b>medium</b> 2361 * <p> 2362 * Description: <b>A channel of communication</b><br> 2363 * Type: <b>token</b><br> 2364 * Path: <b>CommunicationRequest.medium</b><br> 2365 * </p> 2366 */ 2367 @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token" ) 2368 public static final String SP_MEDIUM = "medium"; 2369 /** 2370 * <b>Fluent Client</b> search parameter constant for <b>medium</b> 2371 * <p> 2372 * Description: <b>A channel of communication</b><br> 2373 * Type: <b>token</b><br> 2374 * Path: <b>CommunicationRequest.medium</b><br> 2375 * </p> 2376 */ 2377 public static final ca.uhn.fhir.rest.gclient.TokenClientParam MEDIUM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MEDIUM); 2378 2379 /** 2380 * Search parameter: <b>occurrence</b> 2381 * <p> 2382 * Description: <b>When scheduled</b><br> 2383 * Type: <b>date</b><br> 2384 * Path: <b>CommunicationRequest.occurrenceDateTime</b><br> 2385 * </p> 2386 */ 2387 @SearchParamDefinition(name="occurrence", path="CommunicationRequest.occurrence.as(dateTime)", description="When scheduled", type="date" ) 2388 public static final String SP_OCCURRENCE = "occurrence"; 2389 /** 2390 * <b>Fluent Client</b> search parameter constant for <b>occurrence</b> 2391 * <p> 2392 * Description: <b>When scheduled</b><br> 2393 * Type: <b>date</b><br> 2394 * Path: <b>CommunicationRequest.occurrenceDateTime</b><br> 2395 * </p> 2396 */ 2397 public static final ca.uhn.fhir.rest.gclient.DateClientParam OCCURRENCE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_OCCURRENCE); 2398 2399 /** 2400 * Search parameter: <b>encounter</b> 2401 * <p> 2402 * Description: <b>Encounter leading to message</b><br> 2403 * Type: <b>reference</b><br> 2404 * Path: <b>CommunicationRequest.context</b><br> 2405 * </p> 2406 */ 2407 @SearchParamDefinition(name="encounter", path="CommunicationRequest.context", description="Encounter leading to message", type="reference", target={Encounter.class } ) 2408 public static final String SP_ENCOUNTER = "encounter"; 2409 /** 2410 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2411 * <p> 2412 * Description: <b>Encounter leading to message</b><br> 2413 * Type: <b>reference</b><br> 2414 * Path: <b>CommunicationRequest.context</b><br> 2415 * </p> 2416 */ 2417 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2418 2419/** 2420 * Constant for fluent queries to be used to add include statements. Specifies 2421 * the path value of "<b>CommunicationRequest:encounter</b>". 2422 */ 2423 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:encounter").toLocked(); 2424 2425 /** 2426 * Search parameter: <b>priority</b> 2427 * <p> 2428 * Description: <b>Message urgency</b><br> 2429 * Type: <b>token</b><br> 2430 * Path: <b>CommunicationRequest.priority</b><br> 2431 * </p> 2432 */ 2433 @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" ) 2434 public static final String SP_PRIORITY = "priority"; 2435 /** 2436 * <b>Fluent Client</b> search parameter constant for <b>priority</b> 2437 * <p> 2438 * Description: <b>Message urgency</b><br> 2439 * Type: <b>token</b><br> 2440 * Path: <b>CommunicationRequest.priority</b><br> 2441 * </p> 2442 */ 2443 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); 2444 2445 /** 2446 * Search parameter: <b>group-identifier</b> 2447 * <p> 2448 * Description: <b>Composite request this is part of</b><br> 2449 * Type: <b>token</b><br> 2450 * Path: <b>CommunicationRequest.groupIdentifier</b><br> 2451 * </p> 2452 */ 2453 @SearchParamDefinition(name="group-identifier", path="CommunicationRequest.groupIdentifier", description="Composite request this is part of", type="token" ) 2454 public static final String SP_GROUP_IDENTIFIER = "group-identifier"; 2455 /** 2456 * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b> 2457 * <p> 2458 * Description: <b>Composite request this is part of</b><br> 2459 * Type: <b>token</b><br> 2460 * Path: <b>CommunicationRequest.groupIdentifier</b><br> 2461 * </p> 2462 */ 2463 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER); 2464 2465 /** 2466 * Search parameter: <b>based-on</b> 2467 * <p> 2468 * Description: <b>Fulfills plan or proposal</b><br> 2469 * Type: <b>reference</b><br> 2470 * Path: <b>CommunicationRequest.basedOn</b><br> 2471 * </p> 2472 */ 2473 @SearchParamDefinition(name="based-on", path="CommunicationRequest.basedOn", description="Fulfills plan or proposal", type="reference" ) 2474 public static final String SP_BASED_ON = "based-on"; 2475 /** 2476 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 2477 * <p> 2478 * Description: <b>Fulfills plan or proposal</b><br> 2479 * Type: <b>reference</b><br> 2480 * Path: <b>CommunicationRequest.basedOn</b><br> 2481 * </p> 2482 */ 2483 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 2484 2485/** 2486 * Constant for fluent queries to be used to add include statements. Specifies 2487 * the path value of "<b>CommunicationRequest:based-on</b>". 2488 */ 2489 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("CommunicationRequest:based-on").toLocked(); 2490 2491 /** 2492 * Search parameter: <b>sender</b> 2493 * <p> 2494 * Description: <b>Message sender</b><br> 2495 * Type: <b>reference</b><br> 2496 * Path: <b>CommunicationRequest.sender</b><br> 2497 * </p> 2498 */ 2499 @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", 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, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 2500 public static final String SP_SENDER = "sender"; 2501 /** 2502 * <b>Fluent Client</b> search parameter constant for <b>sender</b> 2503 * <p> 2504 * Description: <b>Message sender</b><br> 2505 * Type: <b>reference</b><br> 2506 * Path: <b>CommunicationRequest.sender</b><br> 2507 * </p> 2508 */ 2509 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SENDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SENDER); 2510 2511/** 2512 * Constant for fluent queries to be used to add include statements. Specifies 2513 * the path value of "<b>CommunicationRequest:sender</b>". 2514 */ 2515 public static final ca.uhn.fhir.model.api.Include INCLUDE_SENDER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:sender").toLocked(); 2516 2517 /** 2518 * Search parameter: <b>patient</b> 2519 * <p> 2520 * Description: <b>Focus of message</b><br> 2521 * Type: <b>reference</b><br> 2522 * Path: <b>CommunicationRequest.subject</b><br> 2523 * </p> 2524 */ 2525 @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference", target={Patient.class } ) 2526 public static final String SP_PATIENT = "patient"; 2527 /** 2528 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2529 * <p> 2530 * Description: <b>Focus of message</b><br> 2531 * Type: <b>reference</b><br> 2532 * Path: <b>CommunicationRequest.subject</b><br> 2533 * </p> 2534 */ 2535 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2536 2537/** 2538 * Constant for fluent queries to be used to add include statements. Specifies 2539 * the path value of "<b>CommunicationRequest:patient</b>". 2540 */ 2541 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:patient").toLocked(); 2542 2543 /** 2544 * Search parameter: <b>recipient</b> 2545 * <p> 2546 * Description: <b>Message recipient</b><br> 2547 * Type: <b>reference</b><br> 2548 * Path: <b>CommunicationRequest.recipient</b><br> 2549 * </p> 2550 */ 2551 @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", 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={CareTeam.class, Device.class, Group.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 2552 public static final String SP_RECIPIENT = "recipient"; 2553 /** 2554 * <b>Fluent Client</b> search parameter constant for <b>recipient</b> 2555 * <p> 2556 * Description: <b>Message recipient</b><br> 2557 * Type: <b>reference</b><br> 2558 * Path: <b>CommunicationRequest.recipient</b><br> 2559 * </p> 2560 */ 2561 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT); 2562 2563/** 2564 * Constant for fluent queries to be used to add include statements. Specifies 2565 * the path value of "<b>CommunicationRequest:recipient</b>". 2566 */ 2567 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:recipient").toLocked(); 2568 2569 /** 2570 * Search parameter: <b>context</b> 2571 * <p> 2572 * Description: <b>Encounter or episode leading to message</b><br> 2573 * Type: <b>reference</b><br> 2574 * Path: <b>CommunicationRequest.context</b><br> 2575 * </p> 2576 */ 2577 @SearchParamDefinition(name="context", path="CommunicationRequest.context", description="Encounter or episode leading to message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class, EpisodeOfCare.class } ) 2578 public static final String SP_CONTEXT = "context"; 2579 /** 2580 * <b>Fluent Client</b> search parameter constant for <b>context</b> 2581 * <p> 2582 * Description: <b>Encounter or episode leading to message</b><br> 2583 * Type: <b>reference</b><br> 2584 * Path: <b>CommunicationRequest.context</b><br> 2585 * </p> 2586 */ 2587 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 2588 2589/** 2590 * Constant for fluent queries to be used to add include statements. Specifies 2591 * the path value of "<b>CommunicationRequest:context</b>". 2592 */ 2593 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:context").toLocked(); 2594 2595 /** 2596 * Search parameter: <b>category</b> 2597 * <p> 2598 * Description: <b>Message category</b><br> 2599 * Type: <b>token</b><br> 2600 * Path: <b>CommunicationRequest.category</b><br> 2601 * </p> 2602 */ 2603 @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" ) 2604 public static final String SP_CATEGORY = "category"; 2605 /** 2606 * <b>Fluent Client</b> search parameter constant for <b>category</b> 2607 * <p> 2608 * Description: <b>Message category</b><br> 2609 * Type: <b>token</b><br> 2610 * Path: <b>CommunicationRequest.category</b><br> 2611 * </p> 2612 */ 2613 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 2614 2615 /** 2616 * Search parameter: <b>status</b> 2617 * <p> 2618 * Description: <b>draft | active | suspended | cancelled | completed | entered-in-error | unknown</b><br> 2619 * Type: <b>token</b><br> 2620 * Path: <b>CommunicationRequest.status</b><br> 2621 * </p> 2622 */ 2623 @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="draft | active | suspended | cancelled | completed | entered-in-error | unknown", type="token" ) 2624 public static final String SP_STATUS = "status"; 2625 /** 2626 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2627 * <p> 2628 * Description: <b>draft | active | suspended | cancelled | completed | entered-in-error | unknown</b><br> 2629 * Type: <b>token</b><br> 2630 * Path: <b>CommunicationRequest.status</b><br> 2631 * </p> 2632 */ 2633 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2634 2635 2636} 2637