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