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