001package org.hl7.fhir.dstu2016may.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037import org.hl7.fhir.exceptions.FHIRException;
038import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
039
040import ca.uhn.fhir.model.api.annotation.Block;
041import ca.uhn.fhir.model.api.annotation.Child;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.ResourceDef;
044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
045/**
046 * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
047 */
048@ResourceDef(name="CommunicationRequest", profile="http://hl7.org/fhir/Profile/CommunicationRequest")
049public class CommunicationRequest extends DomainResource {
050
051    public enum CommunicationRequestStatus {
052        /**
053         * The request has been proposed.
054         */
055        PROPOSED, 
056        /**
057         * The request has been planned.
058         */
059        PLANNED, 
060        /**
061         * The request has been placed.
062         */
063        REQUESTED, 
064        /**
065         * The receiving system has received the request but not yet decided whether it will be performed.
066         */
067        RECEIVED, 
068        /**
069         * The receiving system has accepted the order, but work has not yet commenced.
070         */
071        ACCEPTED, 
072        /**
073         * The work to fulfill the order is happening.
074         */
075        INPROGRESS, 
076        /**
077         * The work has been complete, the report(s) released, and no further work is planned.
078         */
079        COMPLETED, 
080        /**
081         * The request has been held by originating system/user request.
082         */
083        SUSPENDED, 
084        /**
085         * The receiving system has declined to fulfill the request
086         */
087        REJECTED, 
088        /**
089         * The communication was attempted, but due to some procedural error, it could not be completed.
090         */
091        FAILED, 
092        /**
093         * added to help the parsers
094         */
095        NULL;
096        public static CommunicationRequestStatus fromCode(String codeString) throws FHIRException {
097            if (codeString == null || "".equals(codeString))
098                return null;
099        if ("proposed".equals(codeString))
100          return PROPOSED;
101        if ("planned".equals(codeString))
102          return PLANNED;
103        if ("requested".equals(codeString))
104          return REQUESTED;
105        if ("received".equals(codeString))
106          return RECEIVED;
107        if ("accepted".equals(codeString))
108          return ACCEPTED;
109        if ("in-progress".equals(codeString))
110          return INPROGRESS;
111        if ("completed".equals(codeString))
112          return COMPLETED;
113        if ("suspended".equals(codeString))
114          return SUSPENDED;
115        if ("rejected".equals(codeString))
116          return REJECTED;
117        if ("failed".equals(codeString))
118          return FAILED;
119        throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'");
120        }
121        public String toCode() {
122          switch (this) {
123            case PROPOSED: return "proposed";
124            case PLANNED: return "planned";
125            case REQUESTED: return "requested";
126            case RECEIVED: return "received";
127            case ACCEPTED: return "accepted";
128            case INPROGRESS: return "in-progress";
129            case COMPLETED: return "completed";
130            case SUSPENDED: return "suspended";
131            case REJECTED: return "rejected";
132            case FAILED: return "failed";
133            default: return "?";
134          }
135        }
136        public String getSystem() {
137          switch (this) {
138            case PROPOSED: return "http://hl7.org/fhir/communication-request-status";
139            case PLANNED: return "http://hl7.org/fhir/communication-request-status";
140            case REQUESTED: return "http://hl7.org/fhir/communication-request-status";
141            case RECEIVED: return "http://hl7.org/fhir/communication-request-status";
142            case ACCEPTED: return "http://hl7.org/fhir/communication-request-status";
143            case INPROGRESS: return "http://hl7.org/fhir/communication-request-status";
144            case COMPLETED: return "http://hl7.org/fhir/communication-request-status";
145            case SUSPENDED: return "http://hl7.org/fhir/communication-request-status";
146            case REJECTED: return "http://hl7.org/fhir/communication-request-status";
147            case FAILED: return "http://hl7.org/fhir/communication-request-status";
148            default: return "?";
149          }
150        }
151        public String getDefinition() {
152          switch (this) {
153            case PROPOSED: return "The request has been proposed.";
154            case PLANNED: return "The request has been planned.";
155            case REQUESTED: return "The request has been placed.";
156            case RECEIVED: return "The receiving system has received the request but not yet decided whether it will be performed.";
157            case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced.";
158            case INPROGRESS: return "The work to fulfill the order is happening.";
159            case COMPLETED: return "The work has been complete, the report(s) released, and no further work is planned.";
160            case SUSPENDED: return "The request has been held by originating system/user request.";
161            case REJECTED: return "The receiving system has declined to fulfill the request";
162            case FAILED: return "The communication was attempted, but due to some procedural error, it could not be completed.";
163            default: return "?";
164          }
165        }
166        public String getDisplay() {
167          switch (this) {
168            case PROPOSED: return "Proposed";
169            case PLANNED: return "Planned";
170            case REQUESTED: return "Requested";
171            case RECEIVED: return "Received";
172            case ACCEPTED: return "Accepted";
173            case INPROGRESS: return "In Progress";
174            case COMPLETED: return "Completed";
175            case SUSPENDED: return "Suspended";
176            case REJECTED: return "Rejected";
177            case FAILED: return "Failed";
178            default: return "?";
179          }
180        }
181    }
182
183  public static class CommunicationRequestStatusEnumFactory implements EnumFactory<CommunicationRequestStatus> {
184    public CommunicationRequestStatus fromCode(String codeString) throws IllegalArgumentException {
185      if (codeString == null || "".equals(codeString))
186            if (codeString == null || "".equals(codeString))
187                return null;
188        if ("proposed".equals(codeString))
189          return CommunicationRequestStatus.PROPOSED;
190        if ("planned".equals(codeString))
191          return CommunicationRequestStatus.PLANNED;
192        if ("requested".equals(codeString))
193          return CommunicationRequestStatus.REQUESTED;
194        if ("received".equals(codeString))
195          return CommunicationRequestStatus.RECEIVED;
196        if ("accepted".equals(codeString))
197          return CommunicationRequestStatus.ACCEPTED;
198        if ("in-progress".equals(codeString))
199          return CommunicationRequestStatus.INPROGRESS;
200        if ("completed".equals(codeString))
201          return CommunicationRequestStatus.COMPLETED;
202        if ("suspended".equals(codeString))
203          return CommunicationRequestStatus.SUSPENDED;
204        if ("rejected".equals(codeString))
205          return CommunicationRequestStatus.REJECTED;
206        if ("failed".equals(codeString))
207          return CommunicationRequestStatus.FAILED;
208        throw new IllegalArgumentException("Unknown CommunicationRequestStatus code '"+codeString+"'");
209        }
210        public Enumeration<CommunicationRequestStatus> fromType(Base code) throws FHIRException {
211          if (code == null || code.isEmpty())
212            return null;
213          String codeString = ((PrimitiveType) code).asStringValue();
214          if (codeString == null || "".equals(codeString))
215            return null;
216        if ("proposed".equals(codeString))
217          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.PROPOSED);
218        if ("planned".equals(codeString))
219          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.PLANNED);
220        if ("requested".equals(codeString))
221          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.REQUESTED);
222        if ("received".equals(codeString))
223          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.RECEIVED);
224        if ("accepted".equals(codeString))
225          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.ACCEPTED);
226        if ("in-progress".equals(codeString))
227          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.INPROGRESS);
228        if ("completed".equals(codeString))
229          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.COMPLETED);
230        if ("suspended".equals(codeString))
231          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.SUSPENDED);
232        if ("rejected".equals(codeString))
233          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.REJECTED);
234        if ("failed".equals(codeString))
235          return new Enumeration<CommunicationRequestStatus>(this, CommunicationRequestStatus.FAILED);
236        throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'");
237        }
238    public String toCode(CommunicationRequestStatus code) {
239      if (code == CommunicationRequestStatus.PROPOSED)
240        return "proposed";
241      if (code == CommunicationRequestStatus.PLANNED)
242        return "planned";
243      if (code == CommunicationRequestStatus.REQUESTED)
244        return "requested";
245      if (code == CommunicationRequestStatus.RECEIVED)
246        return "received";
247      if (code == CommunicationRequestStatus.ACCEPTED)
248        return "accepted";
249      if (code == CommunicationRequestStatus.INPROGRESS)
250        return "in-progress";
251      if (code == CommunicationRequestStatus.COMPLETED)
252        return "completed";
253      if (code == CommunicationRequestStatus.SUSPENDED)
254        return "suspended";
255      if (code == CommunicationRequestStatus.REJECTED)
256        return "rejected";
257      if (code == CommunicationRequestStatus.FAILED)
258        return "failed";
259      return "?";
260      }
261    public String toSystem(CommunicationRequestStatus code) {
262      return code.getSystem();
263      }
264    }
265
266    @Block()
267    public static class CommunicationRequestPayloadComponent extends BackboneElement implements IBaseBackboneElement {
268        /**
269         * The communicated content (or for multi-part communications, one portion of the communication).
270         */
271        @Child(name = "content", type = {StringType.class, Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
272        @Description(shortDefinition="Message part content", formalDefinition="The communicated content (or for multi-part communications, one portion of the communication)." )
273        protected Type content;
274
275        private static final long serialVersionUID = -1763459053L;
276
277    /**
278     * Constructor
279     */
280      public CommunicationRequestPayloadComponent() {
281        super();
282      }
283
284    /**
285     * Constructor
286     */
287      public CommunicationRequestPayloadComponent(Type content) {
288        super();
289        this.content = content;
290      }
291
292        /**
293         * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
294         */
295        public Type getContent() { 
296          return this.content;
297        }
298
299        /**
300         * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
301         */
302        public StringType getContentStringType() throws FHIRException { 
303          if (!(this.content instanceof StringType))
304            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.content.getClass().getName()+" was encountered");
305          return (StringType) this.content;
306        }
307
308        public boolean hasContentStringType() { 
309          return this.content instanceof StringType;
310        }
311
312        /**
313         * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
314         */
315        public Attachment getContentAttachment() throws FHIRException { 
316          if (!(this.content instanceof Attachment))
317            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered");
318          return (Attachment) this.content;
319        }
320
321        public boolean hasContentAttachment() { 
322          return this.content instanceof Attachment;
323        }
324
325        /**
326         * @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
327         */
328        public Reference getContentReference() throws FHIRException { 
329          if (!(this.content instanceof Reference))
330            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered");
331          return (Reference) this.content;
332        }
333
334        public boolean hasContentReference() { 
335          return this.content instanceof Reference;
336        }
337
338        public boolean hasContent() { 
339          return this.content != null && !this.content.isEmpty();
340        }
341
342        /**
343         * @param value {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
344         */
345        public CommunicationRequestPayloadComponent setContent(Type value) { 
346          this.content = value;
347          return this;
348        }
349
350        protected void listChildren(List<Property> childrenList) {
351          super.listChildren(childrenList);
352          childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content));
353        }
354
355      @Override
356      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
357        switch (hash) {
358        case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type
359        default: return super.getProperty(hash, name, checkValid);
360        }
361
362      }
363
364      @Override
365      public void setProperty(int hash, String name, Base value) throws FHIRException {
366        switch (hash) {
367        case 951530617: // content
368          this.content = (Type) value; // Type
369          break;
370        default: super.setProperty(hash, name, value);
371        }
372
373      }
374
375      @Override
376      public void setProperty(String name, Base value) throws FHIRException {
377        if (name.equals("content[x]"))
378          this.content = (Type) value; // Type
379        else
380          super.setProperty(name, value);
381      }
382
383      @Override
384      public Base makeProperty(int hash, String name) throws FHIRException {
385        switch (hash) {
386        case 264548711:  return getContent(); // Type
387        default: return super.makeProperty(hash, name);
388        }
389
390      }
391
392      @Override
393      public Base addChild(String name) throws FHIRException {
394        if (name.equals("contentString")) {
395          this.content = new StringType();
396          return this.content;
397        }
398        else if (name.equals("contentAttachment")) {
399          this.content = new Attachment();
400          return this.content;
401        }
402        else if (name.equals("contentReference")) {
403          this.content = new Reference();
404          return this.content;
405        }
406        else
407          return super.addChild(name);
408      }
409
410      public CommunicationRequestPayloadComponent copy() {
411        CommunicationRequestPayloadComponent dst = new CommunicationRequestPayloadComponent();
412        copyValues(dst);
413        dst.content = content == null ? null : content.copy();
414        return dst;
415      }
416
417      @Override
418      public boolean equalsDeep(Base other) {
419        if (!super.equalsDeep(other))
420          return false;
421        if (!(other instanceof CommunicationRequestPayloadComponent))
422          return false;
423        CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other;
424        return compareDeep(content, o.content, true);
425      }
426
427      @Override
428      public boolean equalsShallow(Base other) {
429        if (!super.equalsShallow(other))
430          return false;
431        if (!(other instanceof CommunicationRequestPayloadComponent))
432          return false;
433        CommunicationRequestPayloadComponent o = (CommunicationRequestPayloadComponent) other;
434        return true;
435      }
436
437      public boolean isEmpty() {
438        return super.isEmpty() && (content == null || content.isEmpty());
439      }
440
441  public String fhirType() {
442    return "CommunicationRequest.payload";
443
444  }
445
446  }
447
448    /**
449     * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
450     */
451    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
452    @Description(shortDefinition="Unique identifier", formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system." )
453    protected List<Identifier> identifier;
454
455    /**
456     * The type of message to be sent such as alert, notification, reminder, instruction, etc.
457     */
458    @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
459    @Description(shortDefinition="Message category", formalDefinition="The type of message to be sent such as alert, notification, reminder, instruction, etc." )
460    protected CodeableConcept category;
461
462    /**
463     * The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.
464     */
465    @Child(name = "sender", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true)
466    @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." )
467    protected Reference sender;
468
469    /**
470     * The actual object that is the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.)
471     */
472    protected Resource senderTarget;
473
474    /**
475     * The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.
476     */
477    @Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
478    @Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication." )
479    protected List<Reference> recipient;
480    /**
481     * The actual objects that are the target of the reference (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.)
482     */
483    protected List<Resource> recipientTarget;
484
485
486    /**
487     * Text, attachment(s), or resource(s) to be communicated to the recipient.
488     */
489    @Child(name = "payload", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
490    @Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." )
491    protected List<CommunicationRequestPayloadComponent> payload;
492
493    /**
494     * A channel that was used for this communication (e.g. email, fax).
495     */
496    @Child(name = "medium", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
497    @Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." )
498    protected List<CodeableConcept> medium;
499
500    /**
501     * The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.
502     */
503    @Child(name = "requester", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true)
504    @Description(shortDefinition="An individual who requested a communication", formalDefinition="The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application." )
505    protected Reference requester;
506
507    /**
508     * The actual object that is the target of the reference (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.)
509     */
510    protected Resource requesterTarget;
511
512    /**
513     * The status of the proposal or order.
514     */
515    @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true)
516    @Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the proposal or order." )
517    protected Enumeration<CommunicationRequestStatus> status;
518
519    /**
520     * The encounter within which the communication request was created.
521     */
522    @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=true)
523    @Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication request was created." )
524    protected Reference encounter;
525
526    /**
527     * The actual object that is the target of the reference (The encounter within which the communication request was created.)
528     */
529    protected Encounter encounterTarget;
530
531    /**
532     * The time when this communication is to occur.
533     */
534    @Child(name = "scheduled", type = {DateTimeType.class, Period.class}, order=9, min=0, max=1, modifier=false, summary=true)
535    @Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." )
536    protected Type scheduled;
537
538    /**
539     * The reason or justification for the communication request.
540     */
541    @Child(name = "reason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
542    @Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication request." )
543    protected List<CodeableConcept> reason;
544
545    /**
546     * The time when the request was made.
547     */
548    @Child(name = "requestedOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
549    @Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." )
550    protected DateTimeType requestedOn;
551
552    /**
553     * The patient who is the focus of this communication request.
554     */
555    @Child(name = "subject", type = {Patient.class}, order=12, min=0, max=1, modifier=false, summary=true)
556    @Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication request." )
557    protected Reference subject;
558
559    /**
560     * The actual object that is the target of the reference (The patient who is the focus of this communication request.)
561     */
562    protected Patient subjectTarget;
563
564    /**
565     * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.
566     */
567    @Child(name = "priority", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=true)
568    @Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." )
569    protected CodeableConcept priority;
570
571    private static final long serialVersionUID = 146906020L;
572
573  /**
574   * Constructor
575   */
576    public CommunicationRequest() {
577      super();
578    }
579
580    /**
581     * @return {@link #identifier} (A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.)
582     */
583    public List<Identifier> getIdentifier() { 
584      if (this.identifier == null)
585        this.identifier = new ArrayList<Identifier>();
586      return this.identifier;
587    }
588
589    public boolean hasIdentifier() { 
590      if (this.identifier == null)
591        return false;
592      for (Identifier item : this.identifier)
593        if (!item.isEmpty())
594          return true;
595      return false;
596    }
597
598    /**
599     * @return {@link #identifier} (A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.)
600     */
601    // syntactic sugar
602    public Identifier addIdentifier() { //3
603      Identifier t = new Identifier();
604      if (this.identifier == null)
605        this.identifier = new ArrayList<Identifier>();
606      this.identifier.add(t);
607      return t;
608    }
609
610    // syntactic sugar
611    public CommunicationRequest addIdentifier(Identifier t) { //3
612      if (t == null)
613        return this;
614      if (this.identifier == null)
615        this.identifier = new ArrayList<Identifier>();
616      this.identifier.add(t);
617      return this;
618    }
619
620    /**
621     * @return {@link #category} (The type of message to be sent such as alert, notification, reminder, instruction, etc.)
622     */
623    public CodeableConcept getCategory() { 
624      if (this.category == null)
625        if (Configuration.errorOnAutoCreate())
626          throw new Error("Attempt to auto-create CommunicationRequest.category");
627        else if (Configuration.doAutoCreate())
628          this.category = new CodeableConcept(); // cc
629      return this.category;
630    }
631
632    public boolean hasCategory() { 
633      return this.category != null && !this.category.isEmpty();
634    }
635
636    /**
637     * @param value {@link #category} (The type of message to be sent such as alert, notification, reminder, instruction, etc.)
638     */
639    public CommunicationRequest setCategory(CodeableConcept value) { 
640      this.category = value;
641      return this;
642    }
643
644    /**
645     * @return {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.)
646     */
647    public Reference getSender() { 
648      if (this.sender == null)
649        if (Configuration.errorOnAutoCreate())
650          throw new Error("Attempt to auto-create CommunicationRequest.sender");
651        else if (Configuration.doAutoCreate())
652          this.sender = new Reference(); // cc
653      return this.sender;
654    }
655
656    public boolean hasSender() { 
657      return this.sender != null && !this.sender.isEmpty();
658    }
659
660    /**
661     * @param value {@link #sender} (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.)
662     */
663    public CommunicationRequest setSender(Reference value) { 
664      this.sender = value;
665      return this;
666    }
667
668    /**
669     * @return {@link #sender} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.)
670     */
671    public Resource getSenderTarget() { 
672      return this.senderTarget;
673    }
674
675    /**
676     * @param value {@link #sender} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.)
677     */
678    public CommunicationRequest setSenderTarget(Resource value) { 
679      this.senderTarget = value;
680      return this;
681    }
682
683    /**
684     * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.)
685     */
686    public List<Reference> getRecipient() { 
687      if (this.recipient == null)
688        this.recipient = new ArrayList<Reference>();
689      return this.recipient;
690    }
691
692    public boolean hasRecipient() { 
693      if (this.recipient == null)
694        return false;
695      for (Reference item : this.recipient)
696        if (!item.isEmpty())
697          return true;
698      return false;
699    }
700
701    /**
702     * @return {@link #recipient} (The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.)
703     */
704    // syntactic sugar
705    public Reference addRecipient() { //3
706      Reference t = new Reference();
707      if (this.recipient == null)
708        this.recipient = new ArrayList<Reference>();
709      this.recipient.add(t);
710      return t;
711    }
712
713    // syntactic sugar
714    public CommunicationRequest addRecipient(Reference t) { //3
715      if (t == null)
716        return this;
717      if (this.recipient == null)
718        this.recipient = new ArrayList<Reference>();
719      this.recipient.add(t);
720      return this;
721    }
722
723    /**
724     * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.)
725     */
726    public List<Resource> getRecipientTarget() { 
727      if (this.recipientTarget == null)
728        this.recipientTarget = new ArrayList<Resource>();
729      return this.recipientTarget;
730    }
731
732    /**
733     * @return {@link #payload} (Text, attachment(s), or resource(s) to be communicated to the recipient.)
734     */
735    public List<CommunicationRequestPayloadComponent> getPayload() { 
736      if (this.payload == null)
737        this.payload = new ArrayList<CommunicationRequestPayloadComponent>();
738      return this.payload;
739    }
740
741    public boolean hasPayload() { 
742      if (this.payload == null)
743        return false;
744      for (CommunicationRequestPayloadComponent item : this.payload)
745        if (!item.isEmpty())
746          return true;
747      return false;
748    }
749
750    /**
751     * @return {@link #payload} (Text, attachment(s), or resource(s) to be communicated to the recipient.)
752     */
753    // syntactic sugar
754    public CommunicationRequestPayloadComponent addPayload() { //3
755      CommunicationRequestPayloadComponent t = new CommunicationRequestPayloadComponent();
756      if (this.payload == null)
757        this.payload = new ArrayList<CommunicationRequestPayloadComponent>();
758      this.payload.add(t);
759      return t;
760    }
761
762    // syntactic sugar
763    public CommunicationRequest addPayload(CommunicationRequestPayloadComponent t) { //3
764      if (t == null)
765        return this;
766      if (this.payload == null)
767        this.payload = new ArrayList<CommunicationRequestPayloadComponent>();
768      this.payload.add(t);
769      return this;
770    }
771
772    /**
773     * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
774     */
775    public List<CodeableConcept> getMedium() { 
776      if (this.medium == null)
777        this.medium = new ArrayList<CodeableConcept>();
778      return this.medium;
779    }
780
781    public boolean hasMedium() { 
782      if (this.medium == null)
783        return false;
784      for (CodeableConcept item : this.medium)
785        if (!item.isEmpty())
786          return true;
787      return false;
788    }
789
790    /**
791     * @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
792     */
793    // syntactic sugar
794    public CodeableConcept addMedium() { //3
795      CodeableConcept t = new CodeableConcept();
796      if (this.medium == null)
797        this.medium = new ArrayList<CodeableConcept>();
798      this.medium.add(t);
799      return t;
800    }
801
802    // syntactic sugar
803    public CommunicationRequest addMedium(CodeableConcept t) { //3
804      if (t == null)
805        return this;
806      if (this.medium == null)
807        this.medium = new ArrayList<CodeableConcept>();
808      this.medium.add(t);
809      return this;
810    }
811
812    /**
813     * @return {@link #requester} (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.)
814     */
815    public Reference getRequester() { 
816      if (this.requester == null)
817        if (Configuration.errorOnAutoCreate())
818          throw new Error("Attempt to auto-create CommunicationRequest.requester");
819        else if (Configuration.doAutoCreate())
820          this.requester = new Reference(); // cc
821      return this.requester;
822    }
823
824    public boolean hasRequester() { 
825      return this.requester != null && !this.requester.isEmpty();
826    }
827
828    /**
829     * @param value {@link #requester} (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.)
830     */
831    public CommunicationRequest setRequester(Reference value) { 
832      this.requester = value;
833      return this;
834    }
835
836    /**
837     * @return {@link #requester} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.)
838     */
839    public Resource getRequesterTarget() { 
840      return this.requesterTarget;
841    }
842
843    /**
844     * @param value {@link #requester} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.)
845     */
846    public CommunicationRequest setRequesterTarget(Resource value) { 
847      this.requesterTarget = value;
848      return this;
849    }
850
851    /**
852     * @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
853     */
854    public Enumeration<CommunicationRequestStatus> getStatusElement() { 
855      if (this.status == null)
856        if (Configuration.errorOnAutoCreate())
857          throw new Error("Attempt to auto-create CommunicationRequest.status");
858        else if (Configuration.doAutoCreate())
859          this.status = new Enumeration<CommunicationRequestStatus>(new CommunicationRequestStatusEnumFactory()); // bb
860      return this.status;
861    }
862
863    public boolean hasStatusElement() { 
864      return this.status != null && !this.status.isEmpty();
865    }
866
867    public boolean hasStatus() { 
868      return this.status != null && !this.status.isEmpty();
869    }
870
871    /**
872     * @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
873     */
874    public CommunicationRequest setStatusElement(Enumeration<CommunicationRequestStatus> value) { 
875      this.status = value;
876      return this;
877    }
878
879    /**
880     * @return The status of the proposal or order.
881     */
882    public CommunicationRequestStatus getStatus() { 
883      return this.status == null ? null : this.status.getValue();
884    }
885
886    /**
887     * @param value The status of the proposal or order.
888     */
889    public CommunicationRequest setStatus(CommunicationRequestStatus value) { 
890      if (value == null)
891        this.status = null;
892      else {
893        if (this.status == null)
894          this.status = new Enumeration<CommunicationRequestStatus>(new CommunicationRequestStatusEnumFactory());
895        this.status.setValue(value);
896      }
897      return this;
898    }
899
900    /**
901     * @return {@link #encounter} (The encounter within which the communication request was created.)
902     */
903    public Reference getEncounter() { 
904      if (this.encounter == null)
905        if (Configuration.errorOnAutoCreate())
906          throw new Error("Attempt to auto-create CommunicationRequest.encounter");
907        else if (Configuration.doAutoCreate())
908          this.encounter = new Reference(); // cc
909      return this.encounter;
910    }
911
912    public boolean hasEncounter() { 
913      return this.encounter != null && !this.encounter.isEmpty();
914    }
915
916    /**
917     * @param value {@link #encounter} (The encounter within which the communication request was created.)
918     */
919    public CommunicationRequest setEncounter(Reference value) { 
920      this.encounter = value;
921      return this;
922    }
923
924    /**
925     * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter within which the communication request was created.)
926     */
927    public Encounter getEncounterTarget() { 
928      if (this.encounterTarget == null)
929        if (Configuration.errorOnAutoCreate())
930          throw new Error("Attempt to auto-create CommunicationRequest.encounter");
931        else if (Configuration.doAutoCreate())
932          this.encounterTarget = new Encounter(); // aa
933      return this.encounterTarget;
934    }
935
936    /**
937     * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter within which the communication request was created.)
938     */
939    public CommunicationRequest setEncounterTarget(Encounter value) { 
940      this.encounterTarget = value;
941      return this;
942    }
943
944    /**
945     * @return {@link #scheduled} (The time when this communication is to occur.)
946     */
947    public Type getScheduled() { 
948      return this.scheduled;
949    }
950
951    /**
952     * @return {@link #scheduled} (The time when this communication is to occur.)
953     */
954    public DateTimeType getScheduledDateTimeType() throws FHIRException { 
955      if (!(this.scheduled instanceof DateTimeType))
956        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.scheduled.getClass().getName()+" was encountered");
957      return (DateTimeType) this.scheduled;
958    }
959
960    public boolean hasScheduledDateTimeType() { 
961      return this.scheduled instanceof DateTimeType;
962    }
963
964    /**
965     * @return {@link #scheduled} (The time when this communication is to occur.)
966     */
967    public Period getScheduledPeriod() throws FHIRException { 
968      if (!(this.scheduled instanceof Period))
969        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered");
970      return (Period) this.scheduled;
971    }
972
973    public boolean hasScheduledPeriod() { 
974      return this.scheduled instanceof Period;
975    }
976
977    public boolean hasScheduled() { 
978      return this.scheduled != null && !this.scheduled.isEmpty();
979    }
980
981    /**
982     * @param value {@link #scheduled} (The time when this communication is to occur.)
983     */
984    public CommunicationRequest setScheduled(Type value) { 
985      this.scheduled = value;
986      return this;
987    }
988
989    /**
990     * @return {@link #reason} (The reason or justification for the communication request.)
991     */
992    public List<CodeableConcept> getReason() { 
993      if (this.reason == null)
994        this.reason = new ArrayList<CodeableConcept>();
995      return this.reason;
996    }
997
998    public boolean hasReason() { 
999      if (this.reason == null)
1000        return false;
1001      for (CodeableConcept item : this.reason)
1002        if (!item.isEmpty())
1003          return true;
1004      return false;
1005    }
1006
1007    /**
1008     * @return {@link #reason} (The reason or justification for the communication request.)
1009     */
1010    // syntactic sugar
1011    public CodeableConcept addReason() { //3
1012      CodeableConcept t = new CodeableConcept();
1013      if (this.reason == null)
1014        this.reason = new ArrayList<CodeableConcept>();
1015      this.reason.add(t);
1016      return t;
1017    }
1018
1019    // syntactic sugar
1020    public CommunicationRequest addReason(CodeableConcept t) { //3
1021      if (t == null)
1022        return this;
1023      if (this.reason == null)
1024        this.reason = new ArrayList<CodeableConcept>();
1025      this.reason.add(t);
1026      return this;
1027    }
1028
1029    /**
1030     * @return {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value
1031     */
1032    public DateTimeType getRequestedOnElement() { 
1033      if (this.requestedOn == null)
1034        if (Configuration.errorOnAutoCreate())
1035          throw new Error("Attempt to auto-create CommunicationRequest.requestedOn");
1036        else if (Configuration.doAutoCreate())
1037          this.requestedOn = new DateTimeType(); // bb
1038      return this.requestedOn;
1039    }
1040
1041    public boolean hasRequestedOnElement() { 
1042      return this.requestedOn != null && !this.requestedOn.isEmpty();
1043    }
1044
1045    public boolean hasRequestedOn() { 
1046      return this.requestedOn != null && !this.requestedOn.isEmpty();
1047    }
1048
1049    /**
1050     * @param value {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value
1051     */
1052    public CommunicationRequest setRequestedOnElement(DateTimeType value) { 
1053      this.requestedOn = value;
1054      return this;
1055    }
1056
1057    /**
1058     * @return The time when the request was made.
1059     */
1060    public Date getRequestedOn() { 
1061      return this.requestedOn == null ? null : this.requestedOn.getValue();
1062    }
1063
1064    /**
1065     * @param value The time when the request was made.
1066     */
1067    public CommunicationRequest setRequestedOn(Date value) { 
1068      if (value == null)
1069        this.requestedOn = null;
1070      else {
1071        if (this.requestedOn == null)
1072          this.requestedOn = new DateTimeType();
1073        this.requestedOn.setValue(value);
1074      }
1075      return this;
1076    }
1077
1078    /**
1079     * @return {@link #subject} (The patient who is the focus of this communication request.)
1080     */
1081    public Reference getSubject() { 
1082      if (this.subject == null)
1083        if (Configuration.errorOnAutoCreate())
1084          throw new Error("Attempt to auto-create CommunicationRequest.subject");
1085        else if (Configuration.doAutoCreate())
1086          this.subject = new Reference(); // cc
1087      return this.subject;
1088    }
1089
1090    public boolean hasSubject() { 
1091      return this.subject != null && !this.subject.isEmpty();
1092    }
1093
1094    /**
1095     * @param value {@link #subject} (The patient who is the focus of this communication request.)
1096     */
1097    public CommunicationRequest setSubject(Reference value) { 
1098      this.subject = value;
1099      return this;
1100    }
1101
1102    /**
1103     * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who is the focus of this communication request.)
1104     */
1105    public Patient getSubjectTarget() { 
1106      if (this.subjectTarget == null)
1107        if (Configuration.errorOnAutoCreate())
1108          throw new Error("Attempt to auto-create CommunicationRequest.subject");
1109        else if (Configuration.doAutoCreate())
1110          this.subjectTarget = new Patient(); // aa
1111      return this.subjectTarget;
1112    }
1113
1114    /**
1115     * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who is the focus of this communication request.)
1116     */
1117    public CommunicationRequest setSubjectTarget(Patient value) { 
1118      this.subjectTarget = value;
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.)
1124     */
1125    public CodeableConcept getPriority() { 
1126      if (this.priority == null)
1127        if (Configuration.errorOnAutoCreate())
1128          throw new Error("Attempt to auto-create CommunicationRequest.priority");
1129        else if (Configuration.doAutoCreate())
1130          this.priority = new CodeableConcept(); // cc
1131      return this.priority;
1132    }
1133
1134    public boolean hasPriority() { 
1135      return this.priority != null && !this.priority.isEmpty();
1136    }
1137
1138    /**
1139     * @param value {@link #priority} (Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.)
1140     */
1141    public CommunicationRequest setPriority(CodeableConcept value) { 
1142      this.priority = value;
1143      return this;
1144    }
1145
1146      protected void listChildren(List<Property> childrenList) {
1147        super.listChildren(childrenList);
1148        childrenList.add(new Property("identifier", "Identifier", "A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.", 0, java.lang.Integer.MAX_VALUE, identifier));
1149        childrenList.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));
1150        childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender));
1151        childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient));
1152        childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload));
1153        childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium));
1154        childrenList.add(new Property("requester", "Reference(Practitioner|Patient|RelatedPerson)", "The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.", 0, java.lang.Integer.MAX_VALUE, requester));
1155        childrenList.add(new Property("status", "code", "The status of the proposal or order.", 0, java.lang.Integer.MAX_VALUE, status));
1156        childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the communication request was created.", 0, java.lang.Integer.MAX_VALUE, encounter));
1157        childrenList.add(new Property("scheduled[x]", "dateTime|Period", "The time when this communication is to occur.", 0, java.lang.Integer.MAX_VALUE, scheduled));
1158        childrenList.add(new Property("reason", "CodeableConcept", "The reason or justification for the communication request.", 0, java.lang.Integer.MAX_VALUE, reason));
1159        childrenList.add(new Property("requestedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, requestedOn));
1160        childrenList.add(new Property("subject", "Reference(Patient)", "The patient who is the focus of this communication request.", 0, java.lang.Integer.MAX_VALUE, subject));
1161        childrenList.add(new Property("priority", "CodeableConcept", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority));
1162      }
1163
1164      @Override
1165      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1166        switch (hash) {
1167        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1168        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
1169        case -905962955: /*sender*/ return this.sender == null ? new Base[0] : new Base[] {this.sender}; // Reference
1170        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
1171        case -786701938: /*payload*/ return this.payload == null ? new Base[0] : this.payload.toArray(new Base[this.payload.size()]); // CommunicationRequestPayloadComponent
1172        case -1078030475: /*medium*/ return this.medium == null ? new Base[0] : this.medium.toArray(new Base[this.medium.size()]); // CodeableConcept
1173        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
1174        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CommunicationRequestStatus>
1175        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1176        case -160710483: /*scheduled*/ return this.scheduled == null ? new Base[0] : new Base[] {this.scheduled}; // Type
1177        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
1178        case 1150582253: /*requestedOn*/ return this.requestedOn == null ? new Base[0] : new Base[] {this.requestedOn}; // DateTimeType
1179        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1180        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
1181        default: return super.getProperty(hash, name, checkValid);
1182        }
1183
1184      }
1185
1186      @Override
1187      public void setProperty(int hash, String name, Base value) throws FHIRException {
1188        switch (hash) {
1189        case -1618432855: // identifier
1190          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1191          break;
1192        case 50511102: // category
1193          this.category = castToCodeableConcept(value); // CodeableConcept
1194          break;
1195        case -905962955: // sender
1196          this.sender = castToReference(value); // Reference
1197          break;
1198        case 820081177: // recipient
1199          this.getRecipient().add(castToReference(value)); // Reference
1200          break;
1201        case -786701938: // payload
1202          this.getPayload().add((CommunicationRequestPayloadComponent) value); // CommunicationRequestPayloadComponent
1203          break;
1204        case -1078030475: // medium
1205          this.getMedium().add(castToCodeableConcept(value)); // CodeableConcept
1206          break;
1207        case 693933948: // requester
1208          this.requester = castToReference(value); // Reference
1209          break;
1210        case -892481550: // status
1211          this.status = new CommunicationRequestStatusEnumFactory().fromType(value); // Enumeration<CommunicationRequestStatus>
1212          break;
1213        case 1524132147: // encounter
1214          this.encounter = castToReference(value); // Reference
1215          break;
1216        case -160710483: // scheduled
1217          this.scheduled = (Type) value; // Type
1218          break;
1219        case -934964668: // reason
1220          this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
1221          break;
1222        case 1150582253: // requestedOn
1223          this.requestedOn = castToDateTime(value); // DateTimeType
1224          break;
1225        case -1867885268: // subject
1226          this.subject = castToReference(value); // Reference
1227          break;
1228        case -1165461084: // priority
1229          this.priority = castToCodeableConcept(value); // CodeableConcept
1230          break;
1231        default: super.setProperty(hash, name, value);
1232        }
1233
1234      }
1235
1236      @Override
1237      public void setProperty(String name, Base value) throws FHIRException {
1238        if (name.equals("identifier"))
1239          this.getIdentifier().add(castToIdentifier(value));
1240        else if (name.equals("category"))
1241          this.category = castToCodeableConcept(value); // CodeableConcept
1242        else if (name.equals("sender"))
1243          this.sender = castToReference(value); // Reference
1244        else if (name.equals("recipient"))
1245          this.getRecipient().add(castToReference(value));
1246        else if (name.equals("payload"))
1247          this.getPayload().add((CommunicationRequestPayloadComponent) value);
1248        else if (name.equals("medium"))
1249          this.getMedium().add(castToCodeableConcept(value));
1250        else if (name.equals("requester"))
1251          this.requester = castToReference(value); // Reference
1252        else if (name.equals("status"))
1253          this.status = new CommunicationRequestStatusEnumFactory().fromType(value); // Enumeration<CommunicationRequestStatus>
1254        else if (name.equals("encounter"))
1255          this.encounter = castToReference(value); // Reference
1256        else if (name.equals("scheduled[x]"))
1257          this.scheduled = (Type) value; // Type
1258        else if (name.equals("reason"))
1259          this.getReason().add(castToCodeableConcept(value));
1260        else if (name.equals("requestedOn"))
1261          this.requestedOn = castToDateTime(value); // DateTimeType
1262        else if (name.equals("subject"))
1263          this.subject = castToReference(value); // Reference
1264        else if (name.equals("priority"))
1265          this.priority = castToCodeableConcept(value); // CodeableConcept
1266        else
1267          super.setProperty(name, value);
1268      }
1269
1270      @Override
1271      public Base makeProperty(int hash, String name) throws FHIRException {
1272        switch (hash) {
1273        case -1618432855:  return addIdentifier(); // Identifier
1274        case 50511102:  return getCategory(); // CodeableConcept
1275        case -905962955:  return getSender(); // Reference
1276        case 820081177:  return addRecipient(); // Reference
1277        case -786701938:  return addPayload(); // CommunicationRequestPayloadComponent
1278        case -1078030475:  return addMedium(); // CodeableConcept
1279        case 693933948:  return getRequester(); // Reference
1280        case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<CommunicationRequestStatus>
1281        case 1524132147:  return getEncounter(); // Reference
1282        case 1162627251:  return getScheduled(); // Type
1283        case -934964668:  return addReason(); // CodeableConcept
1284        case 1150582253: throw new FHIRException("Cannot make property requestedOn as it is not a complex type"); // DateTimeType
1285        case -1867885268:  return getSubject(); // Reference
1286        case -1165461084:  return getPriority(); // CodeableConcept
1287        default: return super.makeProperty(hash, name);
1288        }
1289
1290      }
1291
1292      @Override
1293      public Base addChild(String name) throws FHIRException {
1294        if (name.equals("identifier")) {
1295          return addIdentifier();
1296        }
1297        else if (name.equals("category")) {
1298          this.category = new CodeableConcept();
1299          return this.category;
1300        }
1301        else if (name.equals("sender")) {
1302          this.sender = new Reference();
1303          return this.sender;
1304        }
1305        else if (name.equals("recipient")) {
1306          return addRecipient();
1307        }
1308        else if (name.equals("payload")) {
1309          return addPayload();
1310        }
1311        else if (name.equals("medium")) {
1312          return addMedium();
1313        }
1314        else if (name.equals("requester")) {
1315          this.requester = new Reference();
1316          return this.requester;
1317        }
1318        else if (name.equals("status")) {
1319          throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.status");
1320        }
1321        else if (name.equals("encounter")) {
1322          this.encounter = new Reference();
1323          return this.encounter;
1324        }
1325        else if (name.equals("scheduledDateTime")) {
1326          this.scheduled = new DateTimeType();
1327          return this.scheduled;
1328        }
1329        else if (name.equals("scheduledPeriod")) {
1330          this.scheduled = new Period();
1331          return this.scheduled;
1332        }
1333        else if (name.equals("reason")) {
1334          return addReason();
1335        }
1336        else if (name.equals("requestedOn")) {
1337          throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.requestedOn");
1338        }
1339        else if (name.equals("subject")) {
1340          this.subject = new Reference();
1341          return this.subject;
1342        }
1343        else if (name.equals("priority")) {
1344          this.priority = new CodeableConcept();
1345          return this.priority;
1346        }
1347        else
1348          return super.addChild(name);
1349      }
1350
1351  public String fhirType() {
1352    return "CommunicationRequest";
1353
1354  }
1355
1356      public CommunicationRequest copy() {
1357        CommunicationRequest dst = new CommunicationRequest();
1358        copyValues(dst);
1359        if (identifier != null) {
1360          dst.identifier = new ArrayList<Identifier>();
1361          for (Identifier i : identifier)
1362            dst.identifier.add(i.copy());
1363        };
1364        dst.category = category == null ? null : category.copy();
1365        dst.sender = sender == null ? null : sender.copy();
1366        if (recipient != null) {
1367          dst.recipient = new ArrayList<Reference>();
1368          for (Reference i : recipient)
1369            dst.recipient.add(i.copy());
1370        };
1371        if (payload != null) {
1372          dst.payload = new ArrayList<CommunicationRequestPayloadComponent>();
1373          for (CommunicationRequestPayloadComponent i : payload)
1374            dst.payload.add(i.copy());
1375        };
1376        if (medium != null) {
1377          dst.medium = new ArrayList<CodeableConcept>();
1378          for (CodeableConcept i : medium)
1379            dst.medium.add(i.copy());
1380        };
1381        dst.requester = requester == null ? null : requester.copy();
1382        dst.status = status == null ? null : status.copy();
1383        dst.encounter = encounter == null ? null : encounter.copy();
1384        dst.scheduled = scheduled == null ? null : scheduled.copy();
1385        if (reason != null) {
1386          dst.reason = new ArrayList<CodeableConcept>();
1387          for (CodeableConcept i : reason)
1388            dst.reason.add(i.copy());
1389        };
1390        dst.requestedOn = requestedOn == null ? null : requestedOn.copy();
1391        dst.subject = subject == null ? null : subject.copy();
1392        dst.priority = priority == null ? null : priority.copy();
1393        return dst;
1394      }
1395
1396      protected CommunicationRequest typedCopy() {
1397        return copy();
1398      }
1399
1400      @Override
1401      public boolean equalsDeep(Base other) {
1402        if (!super.equalsDeep(other))
1403          return false;
1404        if (!(other instanceof CommunicationRequest))
1405          return false;
1406        CommunicationRequest o = (CommunicationRequest) other;
1407        return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(sender, o.sender, true)
1408           && compareDeep(recipient, o.recipient, true) && compareDeep(payload, o.payload, true) && compareDeep(medium, o.medium, true)
1409           && compareDeep(requester, o.requester, true) && compareDeep(status, o.status, true) && compareDeep(encounter, o.encounter, true)
1410           && compareDeep(scheduled, o.scheduled, true) && compareDeep(reason, o.reason, true) && compareDeep(requestedOn, o.requestedOn, true)
1411           && compareDeep(subject, o.subject, true) && compareDeep(priority, o.priority, true);
1412      }
1413
1414      @Override
1415      public boolean equalsShallow(Base other) {
1416        if (!super.equalsShallow(other))
1417          return false;
1418        if (!(other instanceof CommunicationRequest))
1419          return false;
1420        CommunicationRequest o = (CommunicationRequest) other;
1421        return compareValues(status, o.status, true) && compareValues(requestedOn, o.requestedOn, true);
1422      }
1423
1424      public boolean isEmpty() {
1425        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
1426           && (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty())
1427           && (medium == null || medium.isEmpty()) && (requester == null || requester.isEmpty()) && (status == null || status.isEmpty())
1428           && (encounter == null || encounter.isEmpty()) && (scheduled == null || scheduled.isEmpty())
1429           && (reason == null || reason.isEmpty()) && (requestedOn == null || requestedOn.isEmpty())
1430           && (subject == null || subject.isEmpty()) && (priority == null || priority.isEmpty());
1431      }
1432
1433  @Override
1434  public ResourceType getResourceType() {
1435    return ResourceType.CommunicationRequest;
1436   }
1437
1438 /**
1439   * Search parameter: <b>sender</b>
1440   * <p>
1441   * Description: <b>Message sender</b><br>
1442   * Type: <b>reference</b><br>
1443   * Path: <b>CommunicationRequest.sender</b><br>
1444   * </p>
1445   */
1446  @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" )
1447  public static final String SP_SENDER = "sender";
1448 /**
1449   * <b>Fluent Client</b> search parameter constant for <b>sender</b>
1450   * <p>
1451   * Description: <b>Message sender</b><br>
1452   * Type: <b>reference</b><br>
1453   * Path: <b>CommunicationRequest.sender</b><br>
1454   * </p>
1455   */
1456  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SENDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SENDER);
1457
1458/**
1459   * Constant for fluent queries to be used to add include statements. Specifies
1460   * the path value of "<b>CommunicationRequest:sender</b>".
1461   */
1462  public static final ca.uhn.fhir.model.api.Include INCLUDE_SENDER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:sender").toLocked();
1463
1464 /**
1465   * Search parameter: <b>requested</b>
1466   * <p>
1467   * Description: <b>When ordered or proposed</b><br>
1468   * Type: <b>date</b><br>
1469   * Path: <b>CommunicationRequest.requestedOn</b><br>
1470   * </p>
1471   */
1472  @SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="When ordered or proposed", type="date" )
1473  public static final String SP_REQUESTED = "requested";
1474 /**
1475   * <b>Fluent Client</b> search parameter constant for <b>requested</b>
1476   * <p>
1477   * Description: <b>When ordered or proposed</b><br>
1478   * Type: <b>date</b><br>
1479   * Path: <b>CommunicationRequest.requestedOn</b><br>
1480   * </p>
1481   */
1482  public static final ca.uhn.fhir.rest.gclient.DateClientParam REQUESTED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_REQUESTED);
1483
1484 /**
1485   * Search parameter: <b>time</b>
1486   * <p>
1487   * Description: <b>When scheduled</b><br>
1488   * Type: <b>date</b><br>
1489   * Path: <b>CommunicationRequest.scheduledDateTime</b><br>
1490   * </p>
1491   */
1492  @SearchParamDefinition(name="time", path="CommunicationRequest.scheduled.as(DateTime)", description="When scheduled", type="date" )
1493  public static final String SP_TIME = "time";
1494 /**
1495   * <b>Fluent Client</b> search parameter constant for <b>time</b>
1496   * <p>
1497   * Description: <b>When scheduled</b><br>
1498   * Type: <b>date</b><br>
1499   * Path: <b>CommunicationRequest.scheduledDateTime</b><br>
1500   * </p>
1501   */
1502  public static final ca.uhn.fhir.rest.gclient.DateClientParam TIME = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TIME);
1503
1504 /**
1505   * Search parameter: <b>requester</b>
1506   * <p>
1507   * Description: <b>An individual who requested a communication</b><br>
1508   * Type: <b>reference</b><br>
1509   * Path: <b>CommunicationRequest.requester</b><br>
1510   * </p>
1511   */
1512  @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference" )
1513  public static final String SP_REQUESTER = "requester";
1514 /**
1515   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
1516   * <p>
1517   * Description: <b>An individual who requested a communication</b><br>
1518   * Type: <b>reference</b><br>
1519   * Path: <b>CommunicationRequest.requester</b><br>
1520   * </p>
1521   */
1522  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
1523
1524/**
1525   * Constant for fluent queries to be used to add include statements. Specifies
1526   * the path value of "<b>CommunicationRequest:requester</b>".
1527   */
1528  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:requester").toLocked();
1529
1530 /**
1531   * Search parameter: <b>category</b>
1532   * <p>
1533   * Description: <b>Message category</b><br>
1534   * Type: <b>token</b><br>
1535   * Path: <b>CommunicationRequest.category</b><br>
1536   * </p>
1537   */
1538  @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" )
1539  public static final String SP_CATEGORY = "category";
1540 /**
1541   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1542   * <p>
1543   * Description: <b>Message category</b><br>
1544   * Type: <b>token</b><br>
1545   * Path: <b>CommunicationRequest.category</b><br>
1546   * </p>
1547   */
1548  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1549
1550 /**
1551   * Search parameter: <b>patient</b>
1552   * <p>
1553   * Description: <b>Focus of message</b><br>
1554   * Type: <b>reference</b><br>
1555   * Path: <b>CommunicationRequest.subject</b><br>
1556   * </p>
1557   */
1558  @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
1559  public static final String SP_PATIENT = "patient";
1560 /**
1561   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1562   * <p>
1563   * Description: <b>Focus of message</b><br>
1564   * Type: <b>reference</b><br>
1565   * Path: <b>CommunicationRequest.subject</b><br>
1566   * </p>
1567   */
1568  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1569
1570/**
1571   * Constant for fluent queries to be used to add include statements. Specifies
1572   * the path value of "<b>CommunicationRequest:patient</b>".
1573   */
1574  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:patient").toLocked();
1575
1576 /**
1577   * Search parameter: <b>status</b>
1578   * <p>
1579   * Description: <b>proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed</b><br>
1580   * Type: <b>token</b><br>
1581   * Path: <b>CommunicationRequest.status</b><br>
1582   * </p>
1583   */
1584  @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" )
1585  public static final String SP_STATUS = "status";
1586 /**
1587   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1588   * <p>
1589   * Description: <b>proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed</b><br>
1590   * Type: <b>token</b><br>
1591   * Path: <b>CommunicationRequest.status</b><br>
1592   * </p>
1593   */
1594  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1595
1596 /**
1597   * Search parameter: <b>priority</b>
1598   * <p>
1599   * Description: <b>Message urgency</b><br>
1600   * Type: <b>token</b><br>
1601   * Path: <b>CommunicationRequest.priority</b><br>
1602   * </p>
1603   */
1604  @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" )
1605  public static final String SP_PRIORITY = "priority";
1606 /**
1607   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
1608   * <p>
1609   * Description: <b>Message urgency</b><br>
1610   * Type: <b>token</b><br>
1611   * Path: <b>CommunicationRequest.priority</b><br>
1612   * </p>
1613   */
1614  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
1615
1616 /**
1617   * Search parameter: <b>subject</b>
1618   * <p>
1619   * Description: <b>Focus of message</b><br>
1620   * Type: <b>reference</b><br>
1621   * Path: <b>CommunicationRequest.subject</b><br>
1622   * </p>
1623   */
1624  @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
1625  public static final String SP_SUBJECT = "subject";
1626 /**
1627   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1628   * <p>
1629   * Description: <b>Focus of message</b><br>
1630   * Type: <b>reference</b><br>
1631   * Path: <b>CommunicationRequest.subject</b><br>
1632   * </p>
1633   */
1634  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1635
1636/**
1637   * Constant for fluent queries to be used to add include statements. Specifies
1638   * the path value of "<b>CommunicationRequest:subject</b>".
1639   */
1640  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:subject").toLocked();
1641
1642 /**
1643   * Search parameter: <b>encounter</b>
1644   * <p>
1645   * Description: <b>Encounter leading to message</b><br>
1646   * Type: <b>reference</b><br>
1647   * Path: <b>CommunicationRequest.encounter</b><br>
1648   * </p>
1649   */
1650  @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" )
1651  public static final String SP_ENCOUNTER = "encounter";
1652 /**
1653   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
1654   * <p>
1655   * Description: <b>Encounter leading to message</b><br>
1656   * Type: <b>reference</b><br>
1657   * Path: <b>CommunicationRequest.encounter</b><br>
1658   * </p>
1659   */
1660  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
1661
1662/**
1663   * Constant for fluent queries to be used to add include statements. Specifies
1664   * the path value of "<b>CommunicationRequest:encounter</b>".
1665   */
1666  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("CommunicationRequest:encounter").toLocked();
1667
1668 /**
1669   * Search parameter: <b>identifier</b>
1670   * <p>
1671   * Description: <b>Unique identifier</b><br>
1672   * Type: <b>token</b><br>
1673   * Path: <b>CommunicationRequest.identifier</b><br>
1674   * </p>
1675   */
1676  @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" )
1677  public static final String SP_IDENTIFIER = "identifier";
1678 /**
1679   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1680   * <p>
1681   * Description: <b>Unique identifier</b><br>
1682   * Type: <b>token</b><br>
1683   * Path: <b>CommunicationRequest.identifier</b><br>
1684   * </p>
1685   */
1686  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1687
1688 /**
1689   * Search parameter: <b>medium</b>
1690   * <p>
1691   * Description: <b>A channel of communication</b><br>
1692   * Type: <b>token</b><br>
1693   * Path: <b>CommunicationRequest.medium</b><br>
1694   * </p>
1695   */
1696  @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token" )
1697  public static final String SP_MEDIUM = "medium";
1698 /**
1699   * <b>Fluent Client</b> search parameter constant for <b>medium</b>
1700   * <p>
1701   * Description: <b>A channel of communication</b><br>
1702   * Type: <b>token</b><br>
1703   * Path: <b>CommunicationRequest.medium</b><br>
1704   * </p>
1705   */
1706  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MEDIUM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MEDIUM);
1707
1708 /**
1709   * Search parameter: <b>recipient</b>
1710   * <p>
1711   * Description: <b>Message recipient</b><br>
1712   * Type: <b>reference</b><br>
1713   * Path: <b>CommunicationRequest.recipient</b><br>
1714   * </p>
1715   */
1716  @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" )
1717  public static final String SP_RECIPIENT = "recipient";
1718 /**
1719   * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
1720   * <p>
1721   * Description: <b>Message recipient</b><br>
1722   * Type: <b>reference</b><br>
1723   * Path: <b>CommunicationRequest.recipient</b><br>
1724   * </p>
1725   */
1726  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT);
1727
1728/**
1729   * Constant for fluent queries to be used to add include statements. Specifies
1730   * the path value of "<b>CommunicationRequest:recipient</b>".
1731   */
1732  public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("CommunicationRequest:recipient").toLocked();
1733
1734
1735}
1736