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