001package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.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 task to be performed.
052 */
053@ResourceDef(name="Task", profile="http://hl7.org/fhir/StructureDefinition/Task")
054public class Task extends DomainResource {
055
056    public enum TaskIntent {
057        /**
058         * The intent is not known.  When dealing with Task, it's not always known (or relevant) how the task was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously.
059         */
060        UNKNOWN, 
061        /**
062         * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.
063         */
064        PROPOSAL, 
065        /**
066         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
067         */
068        PLAN, 
069        /**
070         * The request represents a request/demand and authorization for action by the requestor.
071         */
072        ORDER, 
073        /**
074         * The request represents an original authorization for action.
075         */
076        ORIGINALORDER, 
077        /**
078         * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.
079         */
080        REFLEXORDER, 
081        /**
082         * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
083         */
084        FILLERORDER, 
085        /**
086         * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.
087         */
088        INSTANCEORDER, 
089        /**
090         * The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.
091         */
092        OPTION, 
093        /**
094         * added to help the parsers with the generic types
095         */
096        NULL;
097        public static TaskIntent fromCode(String codeString) throws FHIRException {
098            if (codeString == null || "".equals(codeString))
099                return null;
100        if ("unknown".equals(codeString))
101          return UNKNOWN;
102        if ("proposal".equals(codeString))
103          return PROPOSAL;
104        if ("plan".equals(codeString))
105          return PLAN;
106        if ("order".equals(codeString))
107          return ORDER;
108        if ("original-order".equals(codeString))
109          return ORIGINALORDER;
110        if ("reflex-order".equals(codeString))
111          return REFLEXORDER;
112        if ("filler-order".equals(codeString))
113          return FILLERORDER;
114        if ("instance-order".equals(codeString))
115          return INSTANCEORDER;
116        if ("option".equals(codeString))
117          return OPTION;
118        if (Configuration.isAcceptInvalidEnums())
119          return null;
120        else
121          throw new FHIRException("Unknown TaskIntent code '"+codeString+"'");
122        }
123        public String toCode() {
124          switch (this) {
125            case UNKNOWN: return "unknown";
126            case PROPOSAL: return "proposal";
127            case PLAN: return "plan";
128            case ORDER: return "order";
129            case ORIGINALORDER: return "original-order";
130            case REFLEXORDER: return "reflex-order";
131            case FILLERORDER: return "filler-order";
132            case INSTANCEORDER: return "instance-order";
133            case OPTION: return "option";
134            case NULL: return null;
135            default: return "?";
136          }
137        }
138        public String getSystem() {
139          switch (this) {
140            case UNKNOWN: return "http://hl7.org/fhir/task-intent";
141            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
142            case PLAN: return "http://hl7.org/fhir/request-intent";
143            case ORDER: return "http://hl7.org/fhir/request-intent";
144            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
145            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
146            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
147            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
148            case OPTION: return "http://hl7.org/fhir/request-intent";
149            case NULL: return null;
150            default: return "?";
151          }
152        }
153        public String getDefinition() {
154          switch (this) {
155            case UNKNOWN: return "The intent is not known.  When dealing with Task, it's not always known (or relevant) how the task was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously.";
156            case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
157            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
158            case ORDER: return "The request represents a request/demand and authorization for action by the requestor.";
159            case ORIGINALORDER: return "The request represents an original authorization for action.";
160            case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.";
161            case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
162            case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.";
163            case OPTION: return "The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.";
164            case NULL: return null;
165            default: return "?";
166          }
167        }
168        public String getDisplay() {
169          switch (this) {
170            case UNKNOWN: return "Unknown";
171            case PROPOSAL: return "Proposal";
172            case PLAN: return "Plan";
173            case ORDER: return "Order";
174            case ORIGINALORDER: return "Original Order";
175            case REFLEXORDER: return "Reflex Order";
176            case FILLERORDER: return "Filler Order";
177            case INSTANCEORDER: return "Instance Order";
178            case OPTION: return "Option";
179            case NULL: return null;
180            default: return "?";
181          }
182        }
183    }
184
185  public static class TaskIntentEnumFactory implements EnumFactory<TaskIntent> {
186    public TaskIntent fromCode(String codeString) throws IllegalArgumentException {
187      if (codeString == null || "".equals(codeString))
188            if (codeString == null || "".equals(codeString))
189                return null;
190        if ("unknown".equals(codeString))
191          return TaskIntent.UNKNOWN;
192        if ("proposal".equals(codeString))
193          return TaskIntent.PROPOSAL;
194        if ("plan".equals(codeString))
195          return TaskIntent.PLAN;
196        if ("order".equals(codeString))
197          return TaskIntent.ORDER;
198        if ("original-order".equals(codeString))
199          return TaskIntent.ORIGINALORDER;
200        if ("reflex-order".equals(codeString))
201          return TaskIntent.REFLEXORDER;
202        if ("filler-order".equals(codeString))
203          return TaskIntent.FILLERORDER;
204        if ("instance-order".equals(codeString))
205          return TaskIntent.INSTANCEORDER;
206        if ("option".equals(codeString))
207          return TaskIntent.OPTION;
208        throw new IllegalArgumentException("Unknown TaskIntent code '"+codeString+"'");
209        }
210        public Enumeration<TaskIntent> fromType(PrimitiveType<?> code) throws FHIRException {
211          if (code == null)
212            return null;
213          if (code.isEmpty())
214            return new Enumeration<TaskIntent>(this, TaskIntent.NULL, code);
215          String codeString = ((PrimitiveType) code).asStringValue();
216          if (codeString == null || "".equals(codeString))
217            return new Enumeration<TaskIntent>(this, TaskIntent.NULL, code);
218        if ("unknown".equals(codeString))
219          return new Enumeration<TaskIntent>(this, TaskIntent.UNKNOWN, code);
220        if ("proposal".equals(codeString))
221          return new Enumeration<TaskIntent>(this, TaskIntent.PROPOSAL, code);
222        if ("plan".equals(codeString))
223          return new Enumeration<TaskIntent>(this, TaskIntent.PLAN, code);
224        if ("order".equals(codeString))
225          return new Enumeration<TaskIntent>(this, TaskIntent.ORDER, code);
226        if ("original-order".equals(codeString))
227          return new Enumeration<TaskIntent>(this, TaskIntent.ORIGINALORDER, code);
228        if ("reflex-order".equals(codeString))
229          return new Enumeration<TaskIntent>(this, TaskIntent.REFLEXORDER, code);
230        if ("filler-order".equals(codeString))
231          return new Enumeration<TaskIntent>(this, TaskIntent.FILLERORDER, code);
232        if ("instance-order".equals(codeString))
233          return new Enumeration<TaskIntent>(this, TaskIntent.INSTANCEORDER, code);
234        if ("option".equals(codeString))
235          return new Enumeration<TaskIntent>(this, TaskIntent.OPTION, code);
236        throw new FHIRException("Unknown TaskIntent code '"+codeString+"'");
237        }
238    public String toCode(TaskIntent code) {
239      if (code == TaskIntent.UNKNOWN)
240        return "unknown";
241      if (code == TaskIntent.PROPOSAL)
242        return "proposal";
243      if (code == TaskIntent.PLAN)
244        return "plan";
245      if (code == TaskIntent.ORDER)
246        return "order";
247      if (code == TaskIntent.ORIGINALORDER)
248        return "original-order";
249      if (code == TaskIntent.REFLEXORDER)
250        return "reflex-order";
251      if (code == TaskIntent.FILLERORDER)
252        return "filler-order";
253      if (code == TaskIntent.INSTANCEORDER)
254        return "instance-order";
255      if (code == TaskIntent.OPTION)
256        return "option";
257      return "?";
258      }
259    public String toSystem(TaskIntent code) {
260      return code.getSystem();
261      }
262    }
263
264    public enum TaskStatus {
265        /**
266         * The task is not yet ready to be acted upon.
267         */
268        DRAFT, 
269        /**
270         * The task is ready to be acted upon and action is sought.
271         */
272        REQUESTED, 
273        /**
274         * A potential performer has claimed ownership of the task and is evaluating whether to perform it.
275         */
276        RECEIVED, 
277        /**
278         * The potential performer has agreed to execute the task but has not yet started work.
279         */
280        ACCEPTED, 
281        /**
282         * The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action.
283         */
284        REJECTED, 
285        /**
286         * The task is ready to be performed, but no action has yet been taken.  Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given.
287         */
288        READY, 
289        /**
290         * The task was not completed.
291         */
292        CANCELLED, 
293        /**
294         * The task has been started but is not yet complete.
295         */
296        INPROGRESS, 
297        /**
298         * The task has been started but work has been paused.
299         */
300        ONHOLD, 
301        /**
302         * The task was attempted but could not be completed due to some error.
303         */
304        FAILED, 
305        /**
306         * The task has been completed.
307         */
308        COMPLETED, 
309        /**
310         * The task should never have existed and is retained only because of the possibility it may have used.
311         */
312        ENTEREDINERROR, 
313        /**
314         * added to help the parsers with the generic types
315         */
316        NULL;
317        public static TaskStatus fromCode(String codeString) throws FHIRException {
318            if (codeString == null || "".equals(codeString))
319                return null;
320        if ("draft".equals(codeString))
321          return DRAFT;
322        if ("requested".equals(codeString))
323          return REQUESTED;
324        if ("received".equals(codeString))
325          return RECEIVED;
326        if ("accepted".equals(codeString))
327          return ACCEPTED;
328        if ("rejected".equals(codeString))
329          return REJECTED;
330        if ("ready".equals(codeString))
331          return READY;
332        if ("cancelled".equals(codeString))
333          return CANCELLED;
334        if ("in-progress".equals(codeString))
335          return INPROGRESS;
336        if ("on-hold".equals(codeString))
337          return ONHOLD;
338        if ("failed".equals(codeString))
339          return FAILED;
340        if ("completed".equals(codeString))
341          return COMPLETED;
342        if ("entered-in-error".equals(codeString))
343          return ENTEREDINERROR;
344        if (Configuration.isAcceptInvalidEnums())
345          return null;
346        else
347          throw new FHIRException("Unknown TaskStatus code '"+codeString+"'");
348        }
349        public String toCode() {
350          switch (this) {
351            case DRAFT: return "draft";
352            case REQUESTED: return "requested";
353            case RECEIVED: return "received";
354            case ACCEPTED: return "accepted";
355            case REJECTED: return "rejected";
356            case READY: return "ready";
357            case CANCELLED: return "cancelled";
358            case INPROGRESS: return "in-progress";
359            case ONHOLD: return "on-hold";
360            case FAILED: return "failed";
361            case COMPLETED: return "completed";
362            case ENTEREDINERROR: return "entered-in-error";
363            case NULL: return null;
364            default: return "?";
365          }
366        }
367        public String getSystem() {
368          switch (this) {
369            case DRAFT: return "http://hl7.org/fhir/task-status";
370            case REQUESTED: return "http://hl7.org/fhir/task-status";
371            case RECEIVED: return "http://hl7.org/fhir/task-status";
372            case ACCEPTED: return "http://hl7.org/fhir/task-status";
373            case REJECTED: return "http://hl7.org/fhir/task-status";
374            case READY: return "http://hl7.org/fhir/task-status";
375            case CANCELLED: return "http://hl7.org/fhir/task-status";
376            case INPROGRESS: return "http://hl7.org/fhir/task-status";
377            case ONHOLD: return "http://hl7.org/fhir/task-status";
378            case FAILED: return "http://hl7.org/fhir/task-status";
379            case COMPLETED: return "http://hl7.org/fhir/task-status";
380            case ENTEREDINERROR: return "http://hl7.org/fhir/task-status";
381            case NULL: return null;
382            default: return "?";
383          }
384        }
385        public String getDefinition() {
386          switch (this) {
387            case DRAFT: return "The task is not yet ready to be acted upon.";
388            case REQUESTED: return "The task is ready to be acted upon and action is sought.";
389            case RECEIVED: return "A potential performer has claimed ownership of the task and is evaluating whether to perform it.";
390            case ACCEPTED: return "The potential performer has agreed to execute the task but has not yet started work.";
391            case REJECTED: return "The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action.";
392            case READY: return "The task is ready to be performed, but no action has yet been taken.  Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given.";
393            case CANCELLED: return "The task was not completed.";
394            case INPROGRESS: return "The task has been started but is not yet complete.";
395            case ONHOLD: return "The task has been started but work has been paused.";
396            case FAILED: return "The task was attempted but could not be completed due to some error.";
397            case COMPLETED: return "The task has been completed.";
398            case ENTEREDINERROR: return "The task should never have existed and is retained only because of the possibility it may have used.";
399            case NULL: return null;
400            default: return "?";
401          }
402        }
403        public String getDisplay() {
404          switch (this) {
405            case DRAFT: return "Draft";
406            case REQUESTED: return "Requested";
407            case RECEIVED: return "Received";
408            case ACCEPTED: return "Accepted";
409            case REJECTED: return "Rejected";
410            case READY: return "Ready";
411            case CANCELLED: return "Cancelled";
412            case INPROGRESS: return "In Progress";
413            case ONHOLD: return "On Hold";
414            case FAILED: return "Failed";
415            case COMPLETED: return "Completed";
416            case ENTEREDINERROR: return "Entered in Error";
417            case NULL: return null;
418            default: return "?";
419          }
420        }
421    }
422
423  public static class TaskStatusEnumFactory implements EnumFactory<TaskStatus> {
424    public TaskStatus fromCode(String codeString) throws IllegalArgumentException {
425      if (codeString == null || "".equals(codeString))
426            if (codeString == null || "".equals(codeString))
427                return null;
428        if ("draft".equals(codeString))
429          return TaskStatus.DRAFT;
430        if ("requested".equals(codeString))
431          return TaskStatus.REQUESTED;
432        if ("received".equals(codeString))
433          return TaskStatus.RECEIVED;
434        if ("accepted".equals(codeString))
435          return TaskStatus.ACCEPTED;
436        if ("rejected".equals(codeString))
437          return TaskStatus.REJECTED;
438        if ("ready".equals(codeString))
439          return TaskStatus.READY;
440        if ("cancelled".equals(codeString))
441          return TaskStatus.CANCELLED;
442        if ("in-progress".equals(codeString))
443          return TaskStatus.INPROGRESS;
444        if ("on-hold".equals(codeString))
445          return TaskStatus.ONHOLD;
446        if ("failed".equals(codeString))
447          return TaskStatus.FAILED;
448        if ("completed".equals(codeString))
449          return TaskStatus.COMPLETED;
450        if ("entered-in-error".equals(codeString))
451          return TaskStatus.ENTEREDINERROR;
452        throw new IllegalArgumentException("Unknown TaskStatus code '"+codeString+"'");
453        }
454        public Enumeration<TaskStatus> fromType(PrimitiveType<?> code) throws FHIRException {
455          if (code == null)
456            return null;
457          if (code.isEmpty())
458            return new Enumeration<TaskStatus>(this, TaskStatus.NULL, code);
459          String codeString = ((PrimitiveType) code).asStringValue();
460          if (codeString == null || "".equals(codeString))
461            return new Enumeration<TaskStatus>(this, TaskStatus.NULL, code);
462        if ("draft".equals(codeString))
463          return new Enumeration<TaskStatus>(this, TaskStatus.DRAFT, code);
464        if ("requested".equals(codeString))
465          return new Enumeration<TaskStatus>(this, TaskStatus.REQUESTED, code);
466        if ("received".equals(codeString))
467          return new Enumeration<TaskStatus>(this, TaskStatus.RECEIVED, code);
468        if ("accepted".equals(codeString))
469          return new Enumeration<TaskStatus>(this, TaskStatus.ACCEPTED, code);
470        if ("rejected".equals(codeString))
471          return new Enumeration<TaskStatus>(this, TaskStatus.REJECTED, code);
472        if ("ready".equals(codeString))
473          return new Enumeration<TaskStatus>(this, TaskStatus.READY, code);
474        if ("cancelled".equals(codeString))
475          return new Enumeration<TaskStatus>(this, TaskStatus.CANCELLED, code);
476        if ("in-progress".equals(codeString))
477          return new Enumeration<TaskStatus>(this, TaskStatus.INPROGRESS, code);
478        if ("on-hold".equals(codeString))
479          return new Enumeration<TaskStatus>(this, TaskStatus.ONHOLD, code);
480        if ("failed".equals(codeString))
481          return new Enumeration<TaskStatus>(this, TaskStatus.FAILED, code);
482        if ("completed".equals(codeString))
483          return new Enumeration<TaskStatus>(this, TaskStatus.COMPLETED, code);
484        if ("entered-in-error".equals(codeString))
485          return new Enumeration<TaskStatus>(this, TaskStatus.ENTEREDINERROR, code);
486        throw new FHIRException("Unknown TaskStatus code '"+codeString+"'");
487        }
488    public String toCode(TaskStatus code) {
489      if (code == TaskStatus.DRAFT)
490        return "draft";
491      if (code == TaskStatus.REQUESTED)
492        return "requested";
493      if (code == TaskStatus.RECEIVED)
494        return "received";
495      if (code == TaskStatus.ACCEPTED)
496        return "accepted";
497      if (code == TaskStatus.REJECTED)
498        return "rejected";
499      if (code == TaskStatus.READY)
500        return "ready";
501      if (code == TaskStatus.CANCELLED)
502        return "cancelled";
503      if (code == TaskStatus.INPROGRESS)
504        return "in-progress";
505      if (code == TaskStatus.ONHOLD)
506        return "on-hold";
507      if (code == TaskStatus.FAILED)
508        return "failed";
509      if (code == TaskStatus.COMPLETED)
510        return "completed";
511      if (code == TaskStatus.ENTEREDINERROR)
512        return "entered-in-error";
513      return "?";
514      }
515    public String toSystem(TaskStatus code) {
516      return code.getSystem();
517      }
518    }
519
520    @Block()
521    public static class TaskPerformerComponent extends BackboneElement implements IBaseBackboneElement {
522        /**
523         * A code or description of the performer of the task.
524         */
525        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
526        @Description(shortDefinition="Type of performance", formalDefinition="A code or description of the performer of the task." )
527        protected CodeableConcept function;
528
529        /**
530         * The actor or entity who performed the task.
531         */
532        @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true)
533        @Description(shortDefinition="Who performed the task", formalDefinition="The actor or entity who performed the task." )
534        protected Reference actor;
535
536        private static final long serialVersionUID = -576943815L;
537
538    /**
539     * Constructor
540     */
541      public TaskPerformerComponent() {
542        super();
543      }
544
545    /**
546     * Constructor
547     */
548      public TaskPerformerComponent(Reference actor) {
549        super();
550        this.setActor(actor);
551      }
552
553        /**
554         * @return {@link #function} (A code or description of the performer of the task.)
555         */
556        public CodeableConcept getFunction() { 
557          if (this.function == null)
558            if (Configuration.errorOnAutoCreate())
559              throw new Error("Attempt to auto-create TaskPerformerComponent.function");
560            else if (Configuration.doAutoCreate())
561              this.function = new CodeableConcept(); // cc
562          return this.function;
563        }
564
565        public boolean hasFunction() { 
566          return this.function != null && !this.function.isEmpty();
567        }
568
569        /**
570         * @param value {@link #function} (A code or description of the performer of the task.)
571         */
572        public TaskPerformerComponent setFunction(CodeableConcept value) { 
573          this.function = value;
574          return this;
575        }
576
577        /**
578         * @return {@link #actor} (The actor or entity who performed the task.)
579         */
580        public Reference getActor() { 
581          if (this.actor == null)
582            if (Configuration.errorOnAutoCreate())
583              throw new Error("Attempt to auto-create TaskPerformerComponent.actor");
584            else if (Configuration.doAutoCreate())
585              this.actor = new Reference(); // cc
586          return this.actor;
587        }
588
589        public boolean hasActor() { 
590          return this.actor != null && !this.actor.isEmpty();
591        }
592
593        /**
594         * @param value {@link #actor} (The actor or entity who performed the task.)
595         */
596        public TaskPerformerComponent setActor(Reference value) { 
597          this.actor = value;
598          return this;
599        }
600
601        protected void listChildren(List<Property> children) {
602          super.listChildren(children);
603          children.add(new Property("function", "CodeableConcept", "A code or description of the performer of the task.", 0, 1, function));
604          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "The actor or entity who performed the task.", 0, 1, actor));
605        }
606
607        @Override
608        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
609          switch (_hash) {
610          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "A code or description of the performer of the task.", 0, 1, function);
611          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "The actor or entity who performed the task.", 0, 1, actor);
612          default: return super.getNamedProperty(_hash, _name, _checkValid);
613          }
614
615        }
616
617      @Override
618      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
619        switch (hash) {
620        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
621        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
622        default: return super.getProperty(hash, name, checkValid);
623        }
624
625      }
626
627      @Override
628      public Base setProperty(int hash, String name, Base value) throws FHIRException {
629        switch (hash) {
630        case 1380938712: // function
631          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
632          return value;
633        case 92645877: // actor
634          this.actor = TypeConvertor.castToReference(value); // Reference
635          return value;
636        default: return super.setProperty(hash, name, value);
637        }
638
639      }
640
641      @Override
642      public Base setProperty(String name, Base value) throws FHIRException {
643        if (name.equals("function")) {
644          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
645        } else if (name.equals("actor")) {
646          this.actor = TypeConvertor.castToReference(value); // Reference
647        } else
648          return super.setProperty(name, value);
649        return value;
650      }
651
652      @Override
653      public Base makeProperty(int hash, String name) throws FHIRException {
654        switch (hash) {
655        case 1380938712:  return getFunction();
656        case 92645877:  return getActor();
657        default: return super.makeProperty(hash, name);
658        }
659
660      }
661
662      @Override
663      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
664        switch (hash) {
665        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
666        case 92645877: /*actor*/ return new String[] {"Reference"};
667        default: return super.getTypesForProperty(hash, name);
668        }
669
670      }
671
672      @Override
673      public Base addChild(String name) throws FHIRException {
674        if (name.equals("function")) {
675          this.function = new CodeableConcept();
676          return this.function;
677        }
678        else if (name.equals("actor")) {
679          this.actor = new Reference();
680          return this.actor;
681        }
682        else
683          return super.addChild(name);
684      }
685
686      public TaskPerformerComponent copy() {
687        TaskPerformerComponent dst = new TaskPerformerComponent();
688        copyValues(dst);
689        return dst;
690      }
691
692      public void copyValues(TaskPerformerComponent dst) {
693        super.copyValues(dst);
694        dst.function = function == null ? null : function.copy();
695        dst.actor = actor == null ? null : actor.copy();
696      }
697
698      @Override
699      public boolean equalsDeep(Base other_) {
700        if (!super.equalsDeep(other_))
701          return false;
702        if (!(other_ instanceof TaskPerformerComponent))
703          return false;
704        TaskPerformerComponent o = (TaskPerformerComponent) other_;
705        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
706      }
707
708      @Override
709      public boolean equalsShallow(Base other_) {
710        if (!super.equalsShallow(other_))
711          return false;
712        if (!(other_ instanceof TaskPerformerComponent))
713          return false;
714        TaskPerformerComponent o = (TaskPerformerComponent) other_;
715        return true;
716      }
717
718      public boolean isEmpty() {
719        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
720      }
721
722  public String fhirType() {
723    return "Task.performer";
724
725  }
726
727  }
728
729    @Block()
730    public static class TaskRestrictionComponent extends BackboneElement implements IBaseBackboneElement {
731        /**
732         * Indicates the number of times the requested action should occur.
733         */
734        @Child(name = "repetitions", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false)
735        @Description(shortDefinition="How many times to repeat", formalDefinition="Indicates the number of times the requested action should occur." )
736        protected PositiveIntType repetitions;
737
738        /**
739         * The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].
740         */
741        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
742        @Description(shortDefinition="When fulfillment is sought", formalDefinition="The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x]." )
743        protected Period period;
744
745        /**
746         * For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.
747         */
748        @Child(name = "recipient", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Group.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
749        @Description(shortDefinition="For whom is fulfillment sought?", formalDefinition="For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for." )
750        protected List<Reference> recipient;
751
752        private static final long serialVersionUID = 1673996066L;
753
754    /**
755     * Constructor
756     */
757      public TaskRestrictionComponent() {
758        super();
759      }
760
761        /**
762         * @return {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value
763         */
764        public PositiveIntType getRepetitionsElement() { 
765          if (this.repetitions == null)
766            if (Configuration.errorOnAutoCreate())
767              throw new Error("Attempt to auto-create TaskRestrictionComponent.repetitions");
768            else if (Configuration.doAutoCreate())
769              this.repetitions = new PositiveIntType(); // bb
770          return this.repetitions;
771        }
772
773        public boolean hasRepetitionsElement() { 
774          return this.repetitions != null && !this.repetitions.isEmpty();
775        }
776
777        public boolean hasRepetitions() { 
778          return this.repetitions != null && !this.repetitions.isEmpty();
779        }
780
781        /**
782         * @param value {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value
783         */
784        public TaskRestrictionComponent setRepetitionsElement(PositiveIntType value) { 
785          this.repetitions = value;
786          return this;
787        }
788
789        /**
790         * @return Indicates the number of times the requested action should occur.
791         */
792        public int getRepetitions() { 
793          return this.repetitions == null || this.repetitions.isEmpty() ? 0 : this.repetitions.getValue();
794        }
795
796        /**
797         * @param value Indicates the number of times the requested action should occur.
798         */
799        public TaskRestrictionComponent setRepetitions(int value) { 
800            if (this.repetitions == null)
801              this.repetitions = new PositiveIntType();
802            this.repetitions.setValue(value);
803          return this;
804        }
805
806        /**
807         * @return {@link #period} (The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].)
808         */
809        public Period getPeriod() { 
810          if (this.period == null)
811            if (Configuration.errorOnAutoCreate())
812              throw new Error("Attempt to auto-create TaskRestrictionComponent.period");
813            else if (Configuration.doAutoCreate())
814              this.period = new Period(); // cc
815          return this.period;
816        }
817
818        public boolean hasPeriod() { 
819          return this.period != null && !this.period.isEmpty();
820        }
821
822        /**
823         * @param value {@link #period} (The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].)
824         */
825        public TaskRestrictionComponent setPeriod(Period value) { 
826          this.period = value;
827          return this;
828        }
829
830        /**
831         * @return {@link #recipient} (For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.)
832         */
833        public List<Reference> getRecipient() { 
834          if (this.recipient == null)
835            this.recipient = new ArrayList<Reference>();
836          return this.recipient;
837        }
838
839        /**
840         * @return Returns a reference to <code>this</code> for easy method chaining
841         */
842        public TaskRestrictionComponent setRecipient(List<Reference> theRecipient) { 
843          this.recipient = theRecipient;
844          return this;
845        }
846
847        public boolean hasRecipient() { 
848          if (this.recipient == null)
849            return false;
850          for (Reference item : this.recipient)
851            if (!item.isEmpty())
852              return true;
853          return false;
854        }
855
856        public Reference addRecipient() { //3
857          Reference t = new Reference();
858          if (this.recipient == null)
859            this.recipient = new ArrayList<Reference>();
860          this.recipient.add(t);
861          return t;
862        }
863
864        public TaskRestrictionComponent addRecipient(Reference t) { //3
865          if (t == null)
866            return this;
867          if (this.recipient == null)
868            this.recipient = new ArrayList<Reference>();
869          this.recipient.add(t);
870          return this;
871        }
872
873        /**
874         * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist {3}
875         */
876        public Reference getRecipientFirstRep() { 
877          if (getRecipient().isEmpty()) {
878            addRecipient();
879          }
880          return getRecipient().get(0);
881        }
882
883        protected void listChildren(List<Property> children) {
884          super.listChildren(children);
885          children.add(new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions));
886          children.add(new Property("period", "Period", "The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].", 0, 1, period));
887          children.add(new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Group|Organization)", "For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.", 0, java.lang.Integer.MAX_VALUE, recipient));
888        }
889
890        @Override
891        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
892          switch (_hash) {
893          case 984367650: /*repetitions*/  return new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions);
894          case -991726143: /*period*/  return new Property("period", "Period", "The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].", 0, 1, period);
895          case 820081177: /*recipient*/  return new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Group|Organization)", "For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.", 0, java.lang.Integer.MAX_VALUE, recipient);
896          default: return super.getNamedProperty(_hash, _name, _checkValid);
897          }
898
899        }
900
901      @Override
902      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
903        switch (hash) {
904        case 984367650: /*repetitions*/ return this.repetitions == null ? new Base[0] : new Base[] {this.repetitions}; // PositiveIntType
905        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
906        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
907        default: return super.getProperty(hash, name, checkValid);
908        }
909
910      }
911
912      @Override
913      public Base setProperty(int hash, String name, Base value) throws FHIRException {
914        switch (hash) {
915        case 984367650: // repetitions
916          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
917          return value;
918        case -991726143: // period
919          this.period = TypeConvertor.castToPeriod(value); // Period
920          return value;
921        case 820081177: // recipient
922          this.getRecipient().add(TypeConvertor.castToReference(value)); // Reference
923          return value;
924        default: return super.setProperty(hash, name, value);
925        }
926
927      }
928
929      @Override
930      public Base setProperty(String name, Base value) throws FHIRException {
931        if (name.equals("repetitions")) {
932          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
933        } else if (name.equals("period")) {
934          this.period = TypeConvertor.castToPeriod(value); // Period
935        } else if (name.equals("recipient")) {
936          this.getRecipient().add(TypeConvertor.castToReference(value));
937        } else
938          return super.setProperty(name, value);
939        return value;
940      }
941
942      @Override
943      public Base makeProperty(int hash, String name) throws FHIRException {
944        switch (hash) {
945        case 984367650:  return getRepetitionsElement();
946        case -991726143:  return getPeriod();
947        case 820081177:  return addRecipient(); 
948        default: return super.makeProperty(hash, name);
949        }
950
951      }
952
953      @Override
954      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
955        switch (hash) {
956        case 984367650: /*repetitions*/ return new String[] {"positiveInt"};
957        case -991726143: /*period*/ return new String[] {"Period"};
958        case 820081177: /*recipient*/ return new String[] {"Reference"};
959        default: return super.getTypesForProperty(hash, name);
960        }
961
962      }
963
964      @Override
965      public Base addChild(String name) throws FHIRException {
966        if (name.equals("repetitions")) {
967          throw new FHIRException("Cannot call addChild on a singleton property Task.restriction.repetitions");
968        }
969        else if (name.equals("period")) {
970          this.period = new Period();
971          return this.period;
972        }
973        else if (name.equals("recipient")) {
974          return addRecipient();
975        }
976        else
977          return super.addChild(name);
978      }
979
980      public TaskRestrictionComponent copy() {
981        TaskRestrictionComponent dst = new TaskRestrictionComponent();
982        copyValues(dst);
983        return dst;
984      }
985
986      public void copyValues(TaskRestrictionComponent dst) {
987        super.copyValues(dst);
988        dst.repetitions = repetitions == null ? null : repetitions.copy();
989        dst.period = period == null ? null : period.copy();
990        if (recipient != null) {
991          dst.recipient = new ArrayList<Reference>();
992          for (Reference i : recipient)
993            dst.recipient.add(i.copy());
994        };
995      }
996
997      @Override
998      public boolean equalsDeep(Base other_) {
999        if (!super.equalsDeep(other_))
1000          return false;
1001        if (!(other_ instanceof TaskRestrictionComponent))
1002          return false;
1003        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
1004        return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) && compareDeep(recipient, o.recipient, true)
1005          ;
1006      }
1007
1008      @Override
1009      public boolean equalsShallow(Base other_) {
1010        if (!super.equalsShallow(other_))
1011          return false;
1012        if (!(other_ instanceof TaskRestrictionComponent))
1013          return false;
1014        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
1015        return compareValues(repetitions, o.repetitions, true);
1016      }
1017
1018      public boolean isEmpty() {
1019        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient
1020          );
1021      }
1022
1023  public String fhirType() {
1024    return "Task.restriction";
1025
1026  }
1027
1028  }
1029
1030    @Block()
1031    public static class TaskInputComponent extends BackboneElement implements IBaseBackboneElement {
1032        /**
1033         * A code or description indicating how the input is intended to be used as part of the task execution.
1034         */
1035        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
1036        @Description(shortDefinition="Label for the input", formalDefinition="A code or description indicating how the input is intended to be used as part of the task execution." )
1037        protected CodeableConcept type;
1038
1039        /**
1040         * The value of the input parameter as a basic type.
1041         */
1042        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
1043        @Description(shortDefinition="Content to use in performing the task", formalDefinition="The value of the input parameter as a basic type." )
1044        protected DataType value;
1045
1046        private static final long serialVersionUID = -1659186716L;
1047
1048    /**
1049     * Constructor
1050     */
1051      public TaskInputComponent() {
1052        super();
1053      }
1054
1055    /**
1056     * Constructor
1057     */
1058      public TaskInputComponent(CodeableConcept type, DataType value) {
1059        super();
1060        this.setType(type);
1061        this.setValue(value);
1062      }
1063
1064        /**
1065         * @return {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
1066         */
1067        public CodeableConcept getType() { 
1068          if (this.type == null)
1069            if (Configuration.errorOnAutoCreate())
1070              throw new Error("Attempt to auto-create TaskInputComponent.type");
1071            else if (Configuration.doAutoCreate())
1072              this.type = new CodeableConcept(); // cc
1073          return this.type;
1074        }
1075
1076        public boolean hasType() { 
1077          return this.type != null && !this.type.isEmpty();
1078        }
1079
1080        /**
1081         * @param value {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
1082         */
1083        public TaskInputComponent setType(CodeableConcept value) { 
1084          this.type = value;
1085          return this;
1086        }
1087
1088        /**
1089         * @return {@link #value} (The value of the input parameter as a basic type.)
1090         */
1091        public DataType getValue() { 
1092          return this.value;
1093        }
1094
1095        /**
1096         * @return {@link #value} (The value of the input parameter as a basic type.)
1097         */
1098        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
1099          if (this.value == null)
1100            this.value = new Base64BinaryType();
1101          if (!(this.value instanceof Base64BinaryType))
1102            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
1103          return (Base64BinaryType) this.value;
1104        }
1105
1106        public boolean hasValueBase64BinaryType() { 
1107          return this != null && this.value instanceof Base64BinaryType;
1108        }
1109
1110        /**
1111         * @return {@link #value} (The value of the input parameter as a basic type.)
1112         */
1113        public BooleanType getValueBooleanType() throws FHIRException { 
1114          if (this.value == null)
1115            this.value = new BooleanType();
1116          if (!(this.value instanceof BooleanType))
1117            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
1118          return (BooleanType) this.value;
1119        }
1120
1121        public boolean hasValueBooleanType() { 
1122          return this != null && this.value instanceof BooleanType;
1123        }
1124
1125        /**
1126         * @return {@link #value} (The value of the input parameter as a basic type.)
1127         */
1128        public CanonicalType getValueCanonicalType() throws FHIRException { 
1129          if (this.value == null)
1130            this.value = new CanonicalType();
1131          if (!(this.value instanceof CanonicalType))
1132            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
1133          return (CanonicalType) this.value;
1134        }
1135
1136        public boolean hasValueCanonicalType() { 
1137          return this != null && this.value instanceof CanonicalType;
1138        }
1139
1140        /**
1141         * @return {@link #value} (The value of the input parameter as a basic type.)
1142         */
1143        public CodeType getValueCodeType() throws FHIRException { 
1144          if (this.value == null)
1145            this.value = new CodeType();
1146          if (!(this.value instanceof CodeType))
1147            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
1148          return (CodeType) this.value;
1149        }
1150
1151        public boolean hasValueCodeType() { 
1152          return this != null && this.value instanceof CodeType;
1153        }
1154
1155        /**
1156         * @return {@link #value} (The value of the input parameter as a basic type.)
1157         */
1158        public DateType getValueDateType() throws FHIRException { 
1159          if (this.value == null)
1160            this.value = new DateType();
1161          if (!(this.value instanceof DateType))
1162            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
1163          return (DateType) this.value;
1164        }
1165
1166        public boolean hasValueDateType() { 
1167          return this != null && this.value instanceof DateType;
1168        }
1169
1170        /**
1171         * @return {@link #value} (The value of the input parameter as a basic type.)
1172         */
1173        public DateTimeType getValueDateTimeType() throws FHIRException { 
1174          if (this.value == null)
1175            this.value = new DateTimeType();
1176          if (!(this.value instanceof DateTimeType))
1177            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1178          return (DateTimeType) this.value;
1179        }
1180
1181        public boolean hasValueDateTimeType() { 
1182          return this != null && this.value instanceof DateTimeType;
1183        }
1184
1185        /**
1186         * @return {@link #value} (The value of the input parameter as a basic type.)
1187         */
1188        public DecimalType getValueDecimalType() throws FHIRException { 
1189          if (this.value == null)
1190            this.value = new DecimalType();
1191          if (!(this.value instanceof DecimalType))
1192            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
1193          return (DecimalType) this.value;
1194        }
1195
1196        public boolean hasValueDecimalType() { 
1197          return this != null && this.value instanceof DecimalType;
1198        }
1199
1200        /**
1201         * @return {@link #value} (The value of the input parameter as a basic type.)
1202         */
1203        public IdType getValueIdType() throws FHIRException { 
1204          if (this.value == null)
1205            this.value = new IdType();
1206          if (!(this.value instanceof IdType))
1207            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
1208          return (IdType) this.value;
1209        }
1210
1211        public boolean hasValueIdType() { 
1212          return this != null && this.value instanceof IdType;
1213        }
1214
1215        /**
1216         * @return {@link #value} (The value of the input parameter as a basic type.)
1217         */
1218        public InstantType getValueInstantType() throws FHIRException { 
1219          if (this.value == null)
1220            this.value = new InstantType();
1221          if (!(this.value instanceof InstantType))
1222            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
1223          return (InstantType) this.value;
1224        }
1225
1226        public boolean hasValueInstantType() { 
1227          return this != null && this.value instanceof InstantType;
1228        }
1229
1230        /**
1231         * @return {@link #value} (The value of the input parameter as a basic type.)
1232         */
1233        public IntegerType getValueIntegerType() throws FHIRException { 
1234          if (this.value == null)
1235            this.value = new IntegerType();
1236          if (!(this.value instanceof IntegerType))
1237            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
1238          return (IntegerType) this.value;
1239        }
1240
1241        public boolean hasValueIntegerType() { 
1242          return this != null && this.value instanceof IntegerType;
1243        }
1244
1245        /**
1246         * @return {@link #value} (The value of the input parameter as a basic type.)
1247         */
1248        public Integer64Type getValueInteger64Type() throws FHIRException { 
1249          if (this.value == null)
1250            this.value = new Integer64Type();
1251          if (!(this.value instanceof Integer64Type))
1252            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
1253          return (Integer64Type) this.value;
1254        }
1255
1256        public boolean hasValueInteger64Type() { 
1257          return this != null && this.value instanceof Integer64Type;
1258        }
1259
1260        /**
1261         * @return {@link #value} (The value of the input parameter as a basic type.)
1262         */
1263        public MarkdownType getValueMarkdownType() throws FHIRException { 
1264          if (this.value == null)
1265            this.value = new MarkdownType();
1266          if (!(this.value instanceof MarkdownType))
1267            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
1268          return (MarkdownType) this.value;
1269        }
1270
1271        public boolean hasValueMarkdownType() { 
1272          return this != null && this.value instanceof MarkdownType;
1273        }
1274
1275        /**
1276         * @return {@link #value} (The value of the input parameter as a basic type.)
1277         */
1278        public OidType getValueOidType() throws FHIRException { 
1279          if (this.value == null)
1280            this.value = new OidType();
1281          if (!(this.value instanceof OidType))
1282            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
1283          return (OidType) this.value;
1284        }
1285
1286        public boolean hasValueOidType() { 
1287          return this != null && this.value instanceof OidType;
1288        }
1289
1290        /**
1291         * @return {@link #value} (The value of the input parameter as a basic type.)
1292         */
1293        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
1294          if (this.value == null)
1295            this.value = new PositiveIntType();
1296          if (!(this.value instanceof PositiveIntType))
1297            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1298          return (PositiveIntType) this.value;
1299        }
1300
1301        public boolean hasValuePositiveIntType() { 
1302          return this != null && this.value instanceof PositiveIntType;
1303        }
1304
1305        /**
1306         * @return {@link #value} (The value of the input parameter as a basic type.)
1307         */
1308        public StringType getValueStringType() throws FHIRException { 
1309          if (this.value == null)
1310            this.value = new StringType();
1311          if (!(this.value instanceof StringType))
1312            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
1313          return (StringType) this.value;
1314        }
1315
1316        public boolean hasValueStringType() { 
1317          return this != null && this.value instanceof StringType;
1318        }
1319
1320        /**
1321         * @return {@link #value} (The value of the input parameter as a basic type.)
1322         */
1323        public TimeType getValueTimeType() throws FHIRException { 
1324          if (this.value == null)
1325            this.value = new TimeType();
1326          if (!(this.value instanceof TimeType))
1327            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1328          return (TimeType) this.value;
1329        }
1330
1331        public boolean hasValueTimeType() { 
1332          return this != null && this.value instanceof TimeType;
1333        }
1334
1335        /**
1336         * @return {@link #value} (The value of the input parameter as a basic type.)
1337         */
1338        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
1339          if (this.value == null)
1340            this.value = new UnsignedIntType();
1341          if (!(this.value instanceof UnsignedIntType))
1342            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1343          return (UnsignedIntType) this.value;
1344        }
1345
1346        public boolean hasValueUnsignedIntType() { 
1347          return this != null && this.value instanceof UnsignedIntType;
1348        }
1349
1350        /**
1351         * @return {@link #value} (The value of the input parameter as a basic type.)
1352         */
1353        public UriType getValueUriType() throws FHIRException { 
1354          if (this.value == null)
1355            this.value = new UriType();
1356          if (!(this.value instanceof UriType))
1357            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
1358          return (UriType) this.value;
1359        }
1360
1361        public boolean hasValueUriType() { 
1362          return this != null && this.value instanceof UriType;
1363        }
1364
1365        /**
1366         * @return {@link #value} (The value of the input parameter as a basic type.)
1367         */
1368        public UrlType getValueUrlType() throws FHIRException { 
1369          if (this.value == null)
1370            this.value = new UrlType();
1371          if (!(this.value instanceof UrlType))
1372            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
1373          return (UrlType) this.value;
1374        }
1375
1376        public boolean hasValueUrlType() { 
1377          return this != null && this.value instanceof UrlType;
1378        }
1379
1380        /**
1381         * @return {@link #value} (The value of the input parameter as a basic type.)
1382         */
1383        public UuidType getValueUuidType() throws FHIRException { 
1384          if (this.value == null)
1385            this.value = new UuidType();
1386          if (!(this.value instanceof UuidType))
1387            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
1388          return (UuidType) this.value;
1389        }
1390
1391        public boolean hasValueUuidType() { 
1392          return this != null && this.value instanceof UuidType;
1393        }
1394
1395        /**
1396         * @return {@link #value} (The value of the input parameter as a basic type.)
1397         */
1398        public Address getValueAddress() throws FHIRException { 
1399          if (this.value == null)
1400            this.value = new Address();
1401          if (!(this.value instanceof Address))
1402            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
1403          return (Address) this.value;
1404        }
1405
1406        public boolean hasValueAddress() { 
1407          return this != null && this.value instanceof Address;
1408        }
1409
1410        /**
1411         * @return {@link #value} (The value of the input parameter as a basic type.)
1412         */
1413        public Age getValueAge() throws FHIRException { 
1414          if (this.value == null)
1415            this.value = new Age();
1416          if (!(this.value instanceof Age))
1417            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
1418          return (Age) this.value;
1419        }
1420
1421        public boolean hasValueAge() { 
1422          return this != null && this.value instanceof Age;
1423        }
1424
1425        /**
1426         * @return {@link #value} (The value of the input parameter as a basic type.)
1427         */
1428        public Annotation getValueAnnotation() throws FHIRException { 
1429          if (this.value == null)
1430            this.value = new Annotation();
1431          if (!(this.value instanceof Annotation))
1432            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
1433          return (Annotation) this.value;
1434        }
1435
1436        public boolean hasValueAnnotation() { 
1437          return this != null && this.value instanceof Annotation;
1438        }
1439
1440        /**
1441         * @return {@link #value} (The value of the input parameter as a basic type.)
1442         */
1443        public Attachment getValueAttachment() throws FHIRException { 
1444          if (this.value == null)
1445            this.value = new Attachment();
1446          if (!(this.value instanceof Attachment))
1447            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
1448          return (Attachment) this.value;
1449        }
1450
1451        public boolean hasValueAttachment() { 
1452          return this != null && this.value instanceof Attachment;
1453        }
1454
1455        /**
1456         * @return {@link #value} (The value of the input parameter as a basic type.)
1457         */
1458        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
1459          if (this.value == null)
1460            this.value = new CodeableConcept();
1461          if (!(this.value instanceof CodeableConcept))
1462            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
1463          return (CodeableConcept) this.value;
1464        }
1465
1466        public boolean hasValueCodeableConcept() { 
1467          return this != null && this.value instanceof CodeableConcept;
1468        }
1469
1470        /**
1471         * @return {@link #value} (The value of the input parameter as a basic type.)
1472         */
1473        public CodeableReference getValueCodeableReference() throws FHIRException { 
1474          if (this.value == null)
1475            this.value = new CodeableReference();
1476          if (!(this.value instanceof CodeableReference))
1477            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
1478          return (CodeableReference) this.value;
1479        }
1480
1481        public boolean hasValueCodeableReference() { 
1482          return this != null && this.value instanceof CodeableReference;
1483        }
1484
1485        /**
1486         * @return {@link #value} (The value of the input parameter as a basic type.)
1487         */
1488        public Coding getValueCoding() throws FHIRException { 
1489          if (this.value == null)
1490            this.value = new Coding();
1491          if (!(this.value instanceof Coding))
1492            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
1493          return (Coding) this.value;
1494        }
1495
1496        public boolean hasValueCoding() { 
1497          return this != null && this.value instanceof Coding;
1498        }
1499
1500        /**
1501         * @return {@link #value} (The value of the input parameter as a basic type.)
1502         */
1503        public ContactPoint getValueContactPoint() throws FHIRException { 
1504          if (this.value == null)
1505            this.value = new ContactPoint();
1506          if (!(this.value instanceof ContactPoint))
1507            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
1508          return (ContactPoint) this.value;
1509        }
1510
1511        public boolean hasValueContactPoint() { 
1512          return this != null && this.value instanceof ContactPoint;
1513        }
1514
1515        /**
1516         * @return {@link #value} (The value of the input parameter as a basic type.)
1517         */
1518        public Count getValueCount() throws FHIRException { 
1519          if (this.value == null)
1520            this.value = new Count();
1521          if (!(this.value instanceof Count))
1522            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
1523          return (Count) this.value;
1524        }
1525
1526        public boolean hasValueCount() { 
1527          return this != null && this.value instanceof Count;
1528        }
1529
1530        /**
1531         * @return {@link #value} (The value of the input parameter as a basic type.)
1532         */
1533        public Distance getValueDistance() throws FHIRException { 
1534          if (this.value == null)
1535            this.value = new Distance();
1536          if (!(this.value instanceof Distance))
1537            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
1538          return (Distance) this.value;
1539        }
1540
1541        public boolean hasValueDistance() { 
1542          return this != null && this.value instanceof Distance;
1543        }
1544
1545        /**
1546         * @return {@link #value} (The value of the input parameter as a basic type.)
1547         */
1548        public Duration getValueDuration() throws FHIRException { 
1549          if (this.value == null)
1550            this.value = new Duration();
1551          if (!(this.value instanceof Duration))
1552            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
1553          return (Duration) this.value;
1554        }
1555
1556        public boolean hasValueDuration() { 
1557          return this != null && this.value instanceof Duration;
1558        }
1559
1560        /**
1561         * @return {@link #value} (The value of the input parameter as a basic type.)
1562         */
1563        public HumanName getValueHumanName() throws FHIRException { 
1564          if (this.value == null)
1565            this.value = new HumanName();
1566          if (!(this.value instanceof HumanName))
1567            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
1568          return (HumanName) this.value;
1569        }
1570
1571        public boolean hasValueHumanName() { 
1572          return this != null && this.value instanceof HumanName;
1573        }
1574
1575        /**
1576         * @return {@link #value} (The value of the input parameter as a basic type.)
1577         */
1578        public Identifier getValueIdentifier() throws FHIRException { 
1579          if (this.value == null)
1580            this.value = new Identifier();
1581          if (!(this.value instanceof Identifier))
1582            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
1583          return (Identifier) this.value;
1584        }
1585
1586        public boolean hasValueIdentifier() { 
1587          return this != null && this.value instanceof Identifier;
1588        }
1589
1590        /**
1591         * @return {@link #value} (The value of the input parameter as a basic type.)
1592         */
1593        public Money getValueMoney() throws FHIRException { 
1594          if (this.value == null)
1595            this.value = new Money();
1596          if (!(this.value instanceof Money))
1597            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
1598          return (Money) this.value;
1599        }
1600
1601        public boolean hasValueMoney() { 
1602          return this != null && this.value instanceof Money;
1603        }
1604
1605        /**
1606         * @return {@link #value} (The value of the input parameter as a basic type.)
1607         */
1608        public Period getValuePeriod() throws FHIRException { 
1609          if (this.value == null)
1610            this.value = new Period();
1611          if (!(this.value instanceof Period))
1612            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
1613          return (Period) this.value;
1614        }
1615
1616        public boolean hasValuePeriod() { 
1617          return this != null && this.value instanceof Period;
1618        }
1619
1620        /**
1621         * @return {@link #value} (The value of the input parameter as a basic type.)
1622         */
1623        public Quantity getValueQuantity() throws FHIRException { 
1624          if (this.value == null)
1625            this.value = new Quantity();
1626          if (!(this.value instanceof Quantity))
1627            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
1628          return (Quantity) this.value;
1629        }
1630
1631        public boolean hasValueQuantity() { 
1632          return this != null && this.value instanceof Quantity;
1633        }
1634
1635        /**
1636         * @return {@link #value} (The value of the input parameter as a basic type.)
1637         */
1638        public Range getValueRange() throws FHIRException { 
1639          if (this.value == null)
1640            this.value = new Range();
1641          if (!(this.value instanceof Range))
1642            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
1643          return (Range) this.value;
1644        }
1645
1646        public boolean hasValueRange() { 
1647          return this != null && this.value instanceof Range;
1648        }
1649
1650        /**
1651         * @return {@link #value} (The value of the input parameter as a basic type.)
1652         */
1653        public Ratio getValueRatio() throws FHIRException { 
1654          if (this.value == null)
1655            this.value = new Ratio();
1656          if (!(this.value instanceof Ratio))
1657            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
1658          return (Ratio) this.value;
1659        }
1660
1661        public boolean hasValueRatio() { 
1662          return this != null && this.value instanceof Ratio;
1663        }
1664
1665        /**
1666         * @return {@link #value} (The value of the input parameter as a basic type.)
1667         */
1668        public RatioRange getValueRatioRange() throws FHIRException { 
1669          if (this.value == null)
1670            this.value = new RatioRange();
1671          if (!(this.value instanceof RatioRange))
1672            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
1673          return (RatioRange) this.value;
1674        }
1675
1676        public boolean hasValueRatioRange() { 
1677          return this != null && this.value instanceof RatioRange;
1678        }
1679
1680        /**
1681         * @return {@link #value} (The value of the input parameter as a basic type.)
1682         */
1683        public Reference getValueReference() throws FHIRException { 
1684          if (this.value == null)
1685            this.value = new Reference();
1686          if (!(this.value instanceof Reference))
1687            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
1688          return (Reference) this.value;
1689        }
1690
1691        public boolean hasValueReference() { 
1692          return this != null && this.value instanceof Reference;
1693        }
1694
1695        /**
1696         * @return {@link #value} (The value of the input parameter as a basic type.)
1697         */
1698        public SampledData getValueSampledData() throws FHIRException { 
1699          if (this.value == null)
1700            this.value = new SampledData();
1701          if (!(this.value instanceof SampledData))
1702            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
1703          return (SampledData) this.value;
1704        }
1705
1706        public boolean hasValueSampledData() { 
1707          return this != null && this.value instanceof SampledData;
1708        }
1709
1710        /**
1711         * @return {@link #value} (The value of the input parameter as a basic type.)
1712         */
1713        public Signature getValueSignature() throws FHIRException { 
1714          if (this.value == null)
1715            this.value = new Signature();
1716          if (!(this.value instanceof Signature))
1717            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
1718          return (Signature) this.value;
1719        }
1720
1721        public boolean hasValueSignature() { 
1722          return this != null && this.value instanceof Signature;
1723        }
1724
1725        /**
1726         * @return {@link #value} (The value of the input parameter as a basic type.)
1727         */
1728        public Timing getValueTiming() throws FHIRException { 
1729          if (this.value == null)
1730            this.value = new Timing();
1731          if (!(this.value instanceof Timing))
1732            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
1733          return (Timing) this.value;
1734        }
1735
1736        public boolean hasValueTiming() { 
1737          return this != null && this.value instanceof Timing;
1738        }
1739
1740        /**
1741         * @return {@link #value} (The value of the input parameter as a basic type.)
1742         */
1743        public ContactDetail getValueContactDetail() throws FHIRException { 
1744          if (this.value == null)
1745            this.value = new ContactDetail();
1746          if (!(this.value instanceof ContactDetail))
1747            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
1748          return (ContactDetail) this.value;
1749        }
1750
1751        public boolean hasValueContactDetail() { 
1752          return this != null && this.value instanceof ContactDetail;
1753        }
1754
1755        /**
1756         * @return {@link #value} (The value of the input parameter as a basic type.)
1757         */
1758        public DataRequirement getValueDataRequirement() throws FHIRException { 
1759          if (this.value == null)
1760            this.value = new DataRequirement();
1761          if (!(this.value instanceof DataRequirement))
1762            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
1763          return (DataRequirement) this.value;
1764        }
1765
1766        public boolean hasValueDataRequirement() { 
1767          return this != null && this.value instanceof DataRequirement;
1768        }
1769
1770        /**
1771         * @return {@link #value} (The value of the input parameter as a basic type.)
1772         */
1773        public Expression getValueExpression() throws FHIRException { 
1774          if (this.value == null)
1775            this.value = new Expression();
1776          if (!(this.value instanceof Expression))
1777            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
1778          return (Expression) this.value;
1779        }
1780
1781        public boolean hasValueExpression() { 
1782          return this != null && this.value instanceof Expression;
1783        }
1784
1785        /**
1786         * @return {@link #value} (The value of the input parameter as a basic type.)
1787         */
1788        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
1789          if (this.value == null)
1790            this.value = new ParameterDefinition();
1791          if (!(this.value instanceof ParameterDefinition))
1792            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1793          return (ParameterDefinition) this.value;
1794        }
1795
1796        public boolean hasValueParameterDefinition() { 
1797          return this != null && this.value instanceof ParameterDefinition;
1798        }
1799
1800        /**
1801         * @return {@link #value} (The value of the input parameter as a basic type.)
1802         */
1803        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
1804          if (this.value == null)
1805            this.value = new RelatedArtifact();
1806          if (!(this.value instanceof RelatedArtifact))
1807            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
1808          return (RelatedArtifact) this.value;
1809        }
1810
1811        public boolean hasValueRelatedArtifact() { 
1812          return this != null && this.value instanceof RelatedArtifact;
1813        }
1814
1815        /**
1816         * @return {@link #value} (The value of the input parameter as a basic type.)
1817         */
1818        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
1819          if (this.value == null)
1820            this.value = new TriggerDefinition();
1821          if (!(this.value instanceof TriggerDefinition))
1822            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1823          return (TriggerDefinition) this.value;
1824        }
1825
1826        public boolean hasValueTriggerDefinition() { 
1827          return this != null && this.value instanceof TriggerDefinition;
1828        }
1829
1830        /**
1831         * @return {@link #value} (The value of the input parameter as a basic type.)
1832         */
1833        public UsageContext getValueUsageContext() throws FHIRException { 
1834          if (this.value == null)
1835            this.value = new UsageContext();
1836          if (!(this.value instanceof UsageContext))
1837            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
1838          return (UsageContext) this.value;
1839        }
1840
1841        public boolean hasValueUsageContext() { 
1842          return this != null && this.value instanceof UsageContext;
1843        }
1844
1845        /**
1846         * @return {@link #value} (The value of the input parameter as a basic type.)
1847         */
1848        public Availability getValueAvailability() throws FHIRException { 
1849          if (this.value == null)
1850            this.value = new Availability();
1851          if (!(this.value instanceof Availability))
1852            throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered");
1853          return (Availability) this.value;
1854        }
1855
1856        public boolean hasValueAvailability() { 
1857          return this != null && this.value instanceof Availability;
1858        }
1859
1860        /**
1861         * @return {@link #value} (The value of the input parameter as a basic type.)
1862         */
1863        public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 
1864          if (this.value == null)
1865            this.value = new ExtendedContactDetail();
1866          if (!(this.value instanceof ExtendedContactDetail))
1867            throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
1868          return (ExtendedContactDetail) this.value;
1869        }
1870
1871        public boolean hasValueExtendedContactDetail() { 
1872          return this != null && this.value instanceof ExtendedContactDetail;
1873        }
1874
1875        /**
1876         * @return {@link #value} (The value of the input parameter as a basic type.)
1877         */
1878        public Dosage getValueDosage() throws FHIRException { 
1879          if (this.value == null)
1880            this.value = new Dosage();
1881          if (!(this.value instanceof Dosage))
1882            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
1883          return (Dosage) this.value;
1884        }
1885
1886        public boolean hasValueDosage() { 
1887          return this != null && this.value instanceof Dosage;
1888        }
1889
1890        /**
1891         * @return {@link #value} (The value of the input parameter as a basic type.)
1892         */
1893        public Meta getValueMeta() throws FHIRException { 
1894          if (this.value == null)
1895            this.value = new Meta();
1896          if (!(this.value instanceof Meta))
1897            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
1898          return (Meta) this.value;
1899        }
1900
1901        public boolean hasValueMeta() { 
1902          return this != null && this.value instanceof Meta;
1903        }
1904
1905        public boolean hasValue() { 
1906          return this.value != null && !this.value.isEmpty();
1907        }
1908
1909        /**
1910         * @param value {@link #value} (The value of the input parameter as a basic type.)
1911         */
1912        public TaskInputComponent setValue(DataType value) { 
1913          if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
1914            throw new FHIRException("Not the right type for Task.input.value[x]: "+value.fhirType());
1915          this.value = value;
1916          return this;
1917        }
1918
1919        protected void listChildren(List<Property> children) {
1920          super.listChildren(children);
1921          children.add(new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1, type));
1922          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value));
1923        }
1924
1925        @Override
1926        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1927          switch (_hash) {
1928          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the task execution.", 0, 1, type);
1929          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1930          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1931          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the input parameter as a basic type.", 0, 1, value);
1932          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the input parameter as a basic type.", 0, 1, value);
1933          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the input parameter as a basic type.", 0, 1, value);
1934          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the input parameter as a basic type.", 0, 1, value);
1935          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the input parameter as a basic type.", 0, 1, value);
1936          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the input parameter as a basic type.", 0, 1, value);
1937          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the input parameter as a basic type.", 0, 1, value);
1938          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the input parameter as a basic type.", 0, 1, value);
1939          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the input parameter as a basic type.", 0, 1, value);
1940          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the input parameter as a basic type.", 0, 1, value);
1941          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the input parameter as a basic type.", 0, 1, value);
1942          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the input parameter as a basic type.", 0, 1, value);
1943          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the input parameter as a basic type.", 0, 1, value);
1944          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the input parameter as a basic type.", 0, 1, value);
1945          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the input parameter as a basic type.", 0, 1, value);
1946          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the input parameter as a basic type.", 0, 1, value);
1947          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the input parameter as a basic type.", 0, 1, value);
1948          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the input parameter as a basic type.", 0, 1, value);
1949          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the input parameter as a basic type.", 0, 1, value);
1950          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the input parameter as a basic type.", 0, 1, value);
1951          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the input parameter as a basic type.", 0, 1, value);
1952          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the input parameter as a basic type.", 0, 1, value);
1953          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the input parameter as a basic type.", 0, 1, value);
1954          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the input parameter as a basic type.", 0, 1, value);
1955          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the input parameter as a basic type.", 0, 1, value);
1956          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the input parameter as a basic type.", 0, 1, value);
1957          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the input parameter as a basic type.", 0, 1, value);
1958          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the input parameter as a basic type.", 0, 1, value);
1959          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the input parameter as a basic type.", 0, 1, value);
1960          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the input parameter as a basic type.", 0, 1, value);
1961          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the input parameter as a basic type.", 0, 1, value);
1962          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the input parameter as a basic type.", 0, 1, value);
1963          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the input parameter as a basic type.", 0, 1, value);
1964          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the input parameter as a basic type.", 0, 1, value);
1965          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the input parameter as a basic type.", 0, 1, value);
1966          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the input parameter as a basic type.", 0, 1, value);
1967          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the input parameter as a basic type.", 0, 1, value);
1968          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the input parameter as a basic type.", 0, 1, value);
1969          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the input parameter as a basic type.", 0, 1, value);
1970          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the input parameter as a basic type.", 0, 1, value);
1971          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the input parameter as a basic type.", 0, 1, value);
1972          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the input parameter as a basic type.", 0, 1, value);
1973          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the input parameter as a basic type.", 0, 1, value);
1974          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the input parameter as a basic type.", 0, 1, value);
1975          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the input parameter as a basic type.", 0, 1, value);
1976          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the input parameter as a basic type.", 0, 1, value);
1977          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1978          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the input parameter as a basic type.", 0, 1, value);
1979          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1980          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the input parameter as a basic type.", 0, 1, value);
1981          case 1678530924: /*valueAvailability*/  return new Property("value[x]", "Availability", "The value of the input parameter as a basic type.", 0, 1, value);
1982          case -1567222041: /*valueExtendedContactDetail*/  return new Property("value[x]", "ExtendedContactDetail", "The value of the input parameter as a basic type.", 0, 1, value);
1983          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the input parameter as a basic type.", 0, 1, value);
1984          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1985          default: return super.getNamedProperty(_hash, _name, _checkValid);
1986          }
1987
1988        }
1989
1990      @Override
1991      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1992        switch (hash) {
1993        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1994        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1995        default: return super.getProperty(hash, name, checkValid);
1996        }
1997
1998      }
1999
2000      @Override
2001      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2002        switch (hash) {
2003        case 3575610: // type
2004          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2005          return value;
2006        case 111972721: // value
2007          this.value = TypeConvertor.castToType(value); // DataType
2008          return value;
2009        default: return super.setProperty(hash, name, value);
2010        }
2011
2012      }
2013
2014      @Override
2015      public Base setProperty(String name, Base value) throws FHIRException {
2016        if (name.equals("type")) {
2017          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2018        } else if (name.equals("value[x]")) {
2019          this.value = TypeConvertor.castToType(value); // DataType
2020        } else
2021          return super.setProperty(name, value);
2022        return value;
2023      }
2024
2025      @Override
2026      public Base makeProperty(int hash, String name) throws FHIRException {
2027        switch (hash) {
2028        case 3575610:  return getType();
2029        case -1410166417:  return getValue();
2030        case 111972721:  return getValue();
2031        default: return super.makeProperty(hash, name);
2032        }
2033
2034      }
2035
2036      @Override
2037      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2038        switch (hash) {
2039        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2040        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
2041        default: return super.getTypesForProperty(hash, name);
2042        }
2043
2044      }
2045
2046      @Override
2047      public Base addChild(String name) throws FHIRException {
2048        if (name.equals("type")) {
2049          this.type = new CodeableConcept();
2050          return this.type;
2051        }
2052        else if (name.equals("valueBase64Binary")) {
2053          this.value = new Base64BinaryType();
2054          return this.value;
2055        }
2056        else if (name.equals("valueBoolean")) {
2057          this.value = new BooleanType();
2058          return this.value;
2059        }
2060        else if (name.equals("valueCanonical")) {
2061          this.value = new CanonicalType();
2062          return this.value;
2063        }
2064        else if (name.equals("valueCode")) {
2065          this.value = new CodeType();
2066          return this.value;
2067        }
2068        else if (name.equals("valueDate")) {
2069          this.value = new DateType();
2070          return this.value;
2071        }
2072        else if (name.equals("valueDateTime")) {
2073          this.value = new DateTimeType();
2074          return this.value;
2075        }
2076        else if (name.equals("valueDecimal")) {
2077          this.value = new DecimalType();
2078          return this.value;
2079        }
2080        else if (name.equals("valueId")) {
2081          this.value = new IdType();
2082          return this.value;
2083        }
2084        else if (name.equals("valueInstant")) {
2085          this.value = new InstantType();
2086          return this.value;
2087        }
2088        else if (name.equals("valueInteger")) {
2089          this.value = new IntegerType();
2090          return this.value;
2091        }
2092        else if (name.equals("valueInteger64")) {
2093          this.value = new Integer64Type();
2094          return this.value;
2095        }
2096        else if (name.equals("valueMarkdown")) {
2097          this.value = new MarkdownType();
2098          return this.value;
2099        }
2100        else if (name.equals("valueOid")) {
2101          this.value = new OidType();
2102          return this.value;
2103        }
2104        else if (name.equals("valuePositiveInt")) {
2105          this.value = new PositiveIntType();
2106          return this.value;
2107        }
2108        else if (name.equals("valueString")) {
2109          this.value = new StringType();
2110          return this.value;
2111        }
2112        else if (name.equals("valueTime")) {
2113          this.value = new TimeType();
2114          return this.value;
2115        }
2116        else if (name.equals("valueUnsignedInt")) {
2117          this.value = new UnsignedIntType();
2118          return this.value;
2119        }
2120        else if (name.equals("valueUri")) {
2121          this.value = new UriType();
2122          return this.value;
2123        }
2124        else if (name.equals("valueUrl")) {
2125          this.value = new UrlType();
2126          return this.value;
2127        }
2128        else if (name.equals("valueUuid")) {
2129          this.value = new UuidType();
2130          return this.value;
2131        }
2132        else if (name.equals("valueAddress")) {
2133          this.value = new Address();
2134          return this.value;
2135        }
2136        else if (name.equals("valueAge")) {
2137          this.value = new Age();
2138          return this.value;
2139        }
2140        else if (name.equals("valueAnnotation")) {
2141          this.value = new Annotation();
2142          return this.value;
2143        }
2144        else if (name.equals("valueAttachment")) {
2145          this.value = new Attachment();
2146          return this.value;
2147        }
2148        else if (name.equals("valueCodeableConcept")) {
2149          this.value = new CodeableConcept();
2150          return this.value;
2151        }
2152        else if (name.equals("valueCodeableReference")) {
2153          this.value = new CodeableReference();
2154          return this.value;
2155        }
2156        else if (name.equals("valueCoding")) {
2157          this.value = new Coding();
2158          return this.value;
2159        }
2160        else if (name.equals("valueContactPoint")) {
2161          this.value = new ContactPoint();
2162          return this.value;
2163        }
2164        else if (name.equals("valueCount")) {
2165          this.value = new Count();
2166          return this.value;
2167        }
2168        else if (name.equals("valueDistance")) {
2169          this.value = new Distance();
2170          return this.value;
2171        }
2172        else if (name.equals("valueDuration")) {
2173          this.value = new Duration();
2174          return this.value;
2175        }
2176        else if (name.equals("valueHumanName")) {
2177          this.value = new HumanName();
2178          return this.value;
2179        }
2180        else if (name.equals("valueIdentifier")) {
2181          this.value = new Identifier();
2182          return this.value;
2183        }
2184        else if (name.equals("valueMoney")) {
2185          this.value = new Money();
2186          return this.value;
2187        }
2188        else if (name.equals("valuePeriod")) {
2189          this.value = new Period();
2190          return this.value;
2191        }
2192        else if (name.equals("valueQuantity")) {
2193          this.value = new Quantity();
2194          return this.value;
2195        }
2196        else if (name.equals("valueRange")) {
2197          this.value = new Range();
2198          return this.value;
2199        }
2200        else if (name.equals("valueRatio")) {
2201          this.value = new Ratio();
2202          return this.value;
2203        }
2204        else if (name.equals("valueRatioRange")) {
2205          this.value = new RatioRange();
2206          return this.value;
2207        }
2208        else if (name.equals("valueReference")) {
2209          this.value = new Reference();
2210          return this.value;
2211        }
2212        else if (name.equals("valueSampledData")) {
2213          this.value = new SampledData();
2214          return this.value;
2215        }
2216        else if (name.equals("valueSignature")) {
2217          this.value = new Signature();
2218          return this.value;
2219        }
2220        else if (name.equals("valueTiming")) {
2221          this.value = new Timing();
2222          return this.value;
2223        }
2224        else if (name.equals("valueContactDetail")) {
2225          this.value = new ContactDetail();
2226          return this.value;
2227        }
2228        else if (name.equals("valueDataRequirement")) {
2229          this.value = new DataRequirement();
2230          return this.value;
2231        }
2232        else if (name.equals("valueExpression")) {
2233          this.value = new Expression();
2234          return this.value;
2235        }
2236        else if (name.equals("valueParameterDefinition")) {
2237          this.value = new ParameterDefinition();
2238          return this.value;
2239        }
2240        else if (name.equals("valueRelatedArtifact")) {
2241          this.value = new RelatedArtifact();
2242          return this.value;
2243        }
2244        else if (name.equals("valueTriggerDefinition")) {
2245          this.value = new TriggerDefinition();
2246          return this.value;
2247        }
2248        else if (name.equals("valueUsageContext")) {
2249          this.value = new UsageContext();
2250          return this.value;
2251        }
2252        else if (name.equals("valueAvailability")) {
2253          this.value = new Availability();
2254          return this.value;
2255        }
2256        else if (name.equals("valueExtendedContactDetail")) {
2257          this.value = new ExtendedContactDetail();
2258          return this.value;
2259        }
2260        else if (name.equals("valueDosage")) {
2261          this.value = new Dosage();
2262          return this.value;
2263        }
2264        else if (name.equals("valueMeta")) {
2265          this.value = new Meta();
2266          return this.value;
2267        }
2268        else
2269          return super.addChild(name);
2270      }
2271
2272      public TaskInputComponent copy() {
2273        TaskInputComponent dst = new TaskInputComponent();
2274        copyValues(dst);
2275        return dst;
2276      }
2277
2278      public void copyValues(TaskInputComponent dst) {
2279        super.copyValues(dst);
2280        dst.type = type == null ? null : type.copy();
2281        dst.value = value == null ? null : value.copy();
2282      }
2283
2284      @Override
2285      public boolean equalsDeep(Base other_) {
2286        if (!super.equalsDeep(other_))
2287          return false;
2288        if (!(other_ instanceof TaskInputComponent))
2289          return false;
2290        TaskInputComponent o = (TaskInputComponent) other_;
2291        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
2292      }
2293
2294      @Override
2295      public boolean equalsShallow(Base other_) {
2296        if (!super.equalsShallow(other_))
2297          return false;
2298        if (!(other_ instanceof TaskInputComponent))
2299          return false;
2300        TaskInputComponent o = (TaskInputComponent) other_;
2301        return true;
2302      }
2303
2304      public boolean isEmpty() {
2305        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
2306      }
2307
2308  public String fhirType() {
2309    return "Task.input";
2310
2311  }
2312
2313  }
2314
2315    @Block()
2316    public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement {
2317        /**
2318         * The name of the Output parameter.
2319         */
2320        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
2321        @Description(shortDefinition="Label for output", formalDefinition="The name of the Output parameter." )
2322        protected CodeableConcept type;
2323
2324        /**
2325         * The value of the Output parameter as a basic type.
2326         */
2327        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
2328        @Description(shortDefinition="Result of output", formalDefinition="The value of the Output parameter as a basic type." )
2329        protected DataType value;
2330
2331        private static final long serialVersionUID = -1659186716L;
2332
2333    /**
2334     * Constructor
2335     */
2336      public TaskOutputComponent() {
2337        super();
2338      }
2339
2340    /**
2341     * Constructor
2342     */
2343      public TaskOutputComponent(CodeableConcept type, DataType value) {
2344        super();
2345        this.setType(type);
2346        this.setValue(value);
2347      }
2348
2349        /**
2350         * @return {@link #type} (The name of the Output parameter.)
2351         */
2352        public CodeableConcept getType() { 
2353          if (this.type == null)
2354            if (Configuration.errorOnAutoCreate())
2355              throw new Error("Attempt to auto-create TaskOutputComponent.type");
2356            else if (Configuration.doAutoCreate())
2357              this.type = new CodeableConcept(); // cc
2358          return this.type;
2359        }
2360
2361        public boolean hasType() { 
2362          return this.type != null && !this.type.isEmpty();
2363        }
2364
2365        /**
2366         * @param value {@link #type} (The name of the Output parameter.)
2367         */
2368        public TaskOutputComponent setType(CodeableConcept value) { 
2369          this.type = value;
2370          return this;
2371        }
2372
2373        /**
2374         * @return {@link #value} (The value of the Output parameter as a basic type.)
2375         */
2376        public DataType getValue() { 
2377          return this.value;
2378        }
2379
2380        /**
2381         * @return {@link #value} (The value of the Output parameter as a basic type.)
2382         */
2383        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
2384          if (this.value == null)
2385            this.value = new Base64BinaryType();
2386          if (!(this.value instanceof Base64BinaryType))
2387            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
2388          return (Base64BinaryType) this.value;
2389        }
2390
2391        public boolean hasValueBase64BinaryType() { 
2392          return this != null && this.value instanceof Base64BinaryType;
2393        }
2394
2395        /**
2396         * @return {@link #value} (The value of the Output parameter as a basic type.)
2397         */
2398        public BooleanType getValueBooleanType() throws FHIRException { 
2399          if (this.value == null)
2400            this.value = new BooleanType();
2401          if (!(this.value instanceof BooleanType))
2402            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2403          return (BooleanType) this.value;
2404        }
2405
2406        public boolean hasValueBooleanType() { 
2407          return this != null && this.value instanceof BooleanType;
2408        }
2409
2410        /**
2411         * @return {@link #value} (The value of the Output parameter as a basic type.)
2412         */
2413        public CanonicalType getValueCanonicalType() throws FHIRException { 
2414          if (this.value == null)
2415            this.value = new CanonicalType();
2416          if (!(this.value instanceof CanonicalType))
2417            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
2418          return (CanonicalType) this.value;
2419        }
2420
2421        public boolean hasValueCanonicalType() { 
2422          return this != null && this.value instanceof CanonicalType;
2423        }
2424
2425        /**
2426         * @return {@link #value} (The value of the Output parameter as a basic type.)
2427         */
2428        public CodeType getValueCodeType() throws FHIRException { 
2429          if (this.value == null)
2430            this.value = new CodeType();
2431          if (!(this.value instanceof CodeType))
2432            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
2433          return (CodeType) this.value;
2434        }
2435
2436        public boolean hasValueCodeType() { 
2437          return this != null && this.value instanceof CodeType;
2438        }
2439
2440        /**
2441         * @return {@link #value} (The value of the Output parameter as a basic type.)
2442         */
2443        public DateType getValueDateType() throws FHIRException { 
2444          if (this.value == null)
2445            this.value = new DateType();
2446          if (!(this.value instanceof DateType))
2447            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
2448          return (DateType) this.value;
2449        }
2450
2451        public boolean hasValueDateType() { 
2452          return this != null && this.value instanceof DateType;
2453        }
2454
2455        /**
2456         * @return {@link #value} (The value of the Output parameter as a basic type.)
2457         */
2458        public DateTimeType getValueDateTimeType() throws FHIRException { 
2459          if (this.value == null)
2460            this.value = new DateTimeType();
2461          if (!(this.value instanceof DateTimeType))
2462            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2463          return (DateTimeType) this.value;
2464        }
2465
2466        public boolean hasValueDateTimeType() { 
2467          return this != null && this.value instanceof DateTimeType;
2468        }
2469
2470        /**
2471         * @return {@link #value} (The value of the Output parameter as a basic type.)
2472         */
2473        public DecimalType getValueDecimalType() throws FHIRException { 
2474          if (this.value == null)
2475            this.value = new DecimalType();
2476          if (!(this.value instanceof DecimalType))
2477            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2478          return (DecimalType) this.value;
2479        }
2480
2481        public boolean hasValueDecimalType() { 
2482          return this != null && this.value instanceof DecimalType;
2483        }
2484
2485        /**
2486         * @return {@link #value} (The value of the Output parameter as a basic type.)
2487         */
2488        public IdType getValueIdType() throws FHIRException { 
2489          if (this.value == null)
2490            this.value = new IdType();
2491          if (!(this.value instanceof IdType))
2492            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
2493          return (IdType) this.value;
2494        }
2495
2496        public boolean hasValueIdType() { 
2497          return this != null && this.value instanceof IdType;
2498        }
2499
2500        /**
2501         * @return {@link #value} (The value of the Output parameter as a basic type.)
2502         */
2503        public InstantType getValueInstantType() throws FHIRException { 
2504          if (this.value == null)
2505            this.value = new InstantType();
2506          if (!(this.value instanceof InstantType))
2507            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
2508          return (InstantType) this.value;
2509        }
2510
2511        public boolean hasValueInstantType() { 
2512          return this != null && this.value instanceof InstantType;
2513        }
2514
2515        /**
2516         * @return {@link #value} (The value of the Output parameter as a basic type.)
2517         */
2518        public IntegerType getValueIntegerType() throws FHIRException { 
2519          if (this.value == null)
2520            this.value = new IntegerType();
2521          if (!(this.value instanceof IntegerType))
2522            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2523          return (IntegerType) this.value;
2524        }
2525
2526        public boolean hasValueIntegerType() { 
2527          return this != null && this.value instanceof IntegerType;
2528        }
2529
2530        /**
2531         * @return {@link #value} (The value of the Output parameter as a basic type.)
2532         */
2533        public Integer64Type getValueInteger64Type() throws FHIRException { 
2534          if (this.value == null)
2535            this.value = new Integer64Type();
2536          if (!(this.value instanceof Integer64Type))
2537            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
2538          return (Integer64Type) this.value;
2539        }
2540
2541        public boolean hasValueInteger64Type() { 
2542          return this != null && this.value instanceof Integer64Type;
2543        }
2544
2545        /**
2546         * @return {@link #value} (The value of the Output parameter as a basic type.)
2547         */
2548        public MarkdownType getValueMarkdownType() throws FHIRException { 
2549          if (this.value == null)
2550            this.value = new MarkdownType();
2551          if (!(this.value instanceof MarkdownType))
2552            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
2553          return (MarkdownType) this.value;
2554        }
2555
2556        public boolean hasValueMarkdownType() { 
2557          return this != null && this.value instanceof MarkdownType;
2558        }
2559
2560        /**
2561         * @return {@link #value} (The value of the Output parameter as a basic type.)
2562         */
2563        public OidType getValueOidType() throws FHIRException { 
2564          if (this.value == null)
2565            this.value = new OidType();
2566          if (!(this.value instanceof OidType))
2567            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
2568          return (OidType) this.value;
2569        }
2570
2571        public boolean hasValueOidType() { 
2572          return this != null && this.value instanceof OidType;
2573        }
2574
2575        /**
2576         * @return {@link #value} (The value of the Output parameter as a basic type.)
2577         */
2578        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
2579          if (this.value == null)
2580            this.value = new PositiveIntType();
2581          if (!(this.value instanceof PositiveIntType))
2582            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2583          return (PositiveIntType) this.value;
2584        }
2585
2586        public boolean hasValuePositiveIntType() { 
2587          return this != null && this.value instanceof PositiveIntType;
2588        }
2589
2590        /**
2591         * @return {@link #value} (The value of the Output parameter as a basic type.)
2592         */
2593        public StringType getValueStringType() throws FHIRException { 
2594          if (this.value == null)
2595            this.value = new StringType();
2596          if (!(this.value instanceof StringType))
2597            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2598          return (StringType) this.value;
2599        }
2600
2601        public boolean hasValueStringType() { 
2602          return this != null && this.value instanceof StringType;
2603        }
2604
2605        /**
2606         * @return {@link #value} (The value of the Output parameter as a basic type.)
2607         */
2608        public TimeType getValueTimeType() throws FHIRException { 
2609          if (this.value == null)
2610            this.value = new TimeType();
2611          if (!(this.value instanceof TimeType))
2612            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2613          return (TimeType) this.value;
2614        }
2615
2616        public boolean hasValueTimeType() { 
2617          return this != null && this.value instanceof TimeType;
2618        }
2619
2620        /**
2621         * @return {@link #value} (The value of the Output parameter as a basic type.)
2622         */
2623        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
2624          if (this.value == null)
2625            this.value = new UnsignedIntType();
2626          if (!(this.value instanceof UnsignedIntType))
2627            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2628          return (UnsignedIntType) this.value;
2629        }
2630
2631        public boolean hasValueUnsignedIntType() { 
2632          return this != null && this.value instanceof UnsignedIntType;
2633        }
2634
2635        /**
2636         * @return {@link #value} (The value of the Output parameter as a basic type.)
2637         */
2638        public UriType getValueUriType() throws FHIRException { 
2639          if (this.value == null)
2640            this.value = new UriType();
2641          if (!(this.value instanceof UriType))
2642            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2643          return (UriType) this.value;
2644        }
2645
2646        public boolean hasValueUriType() { 
2647          return this != null && this.value instanceof UriType;
2648        }
2649
2650        /**
2651         * @return {@link #value} (The value of the Output parameter as a basic type.)
2652         */
2653        public UrlType getValueUrlType() throws FHIRException { 
2654          if (this.value == null)
2655            this.value = new UrlType();
2656          if (!(this.value instanceof UrlType))
2657            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
2658          return (UrlType) this.value;
2659        }
2660
2661        public boolean hasValueUrlType() { 
2662          return this != null && this.value instanceof UrlType;
2663        }
2664
2665        /**
2666         * @return {@link #value} (The value of the Output parameter as a basic type.)
2667         */
2668        public UuidType getValueUuidType() throws FHIRException { 
2669          if (this.value == null)
2670            this.value = new UuidType();
2671          if (!(this.value instanceof UuidType))
2672            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
2673          return (UuidType) this.value;
2674        }
2675
2676        public boolean hasValueUuidType() { 
2677          return this != null && this.value instanceof UuidType;
2678        }
2679
2680        /**
2681         * @return {@link #value} (The value of the Output parameter as a basic type.)
2682         */
2683        public Address getValueAddress() throws FHIRException { 
2684          if (this.value == null)
2685            this.value = new Address();
2686          if (!(this.value instanceof Address))
2687            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
2688          return (Address) this.value;
2689        }
2690
2691        public boolean hasValueAddress() { 
2692          return this != null && this.value instanceof Address;
2693        }
2694
2695        /**
2696         * @return {@link #value} (The value of the Output parameter as a basic type.)
2697         */
2698        public Age getValueAge() throws FHIRException { 
2699          if (this.value == null)
2700            this.value = new Age();
2701          if (!(this.value instanceof Age))
2702            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
2703          return (Age) this.value;
2704        }
2705
2706        public boolean hasValueAge() { 
2707          return this != null && this.value instanceof Age;
2708        }
2709
2710        /**
2711         * @return {@link #value} (The value of the Output parameter as a basic type.)
2712         */
2713        public Annotation getValueAnnotation() throws FHIRException { 
2714          if (this.value == null)
2715            this.value = new Annotation();
2716          if (!(this.value instanceof Annotation))
2717            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
2718          return (Annotation) this.value;
2719        }
2720
2721        public boolean hasValueAnnotation() { 
2722          return this != null && this.value instanceof Annotation;
2723        }
2724
2725        /**
2726         * @return {@link #value} (The value of the Output parameter as a basic type.)
2727         */
2728        public Attachment getValueAttachment() throws FHIRException { 
2729          if (this.value == null)
2730            this.value = new Attachment();
2731          if (!(this.value instanceof Attachment))
2732            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
2733          return (Attachment) this.value;
2734        }
2735
2736        public boolean hasValueAttachment() { 
2737          return this != null && this.value instanceof Attachment;
2738        }
2739
2740        /**
2741         * @return {@link #value} (The value of the Output parameter as a basic type.)
2742         */
2743        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
2744          if (this.value == null)
2745            this.value = new CodeableConcept();
2746          if (!(this.value instanceof CodeableConcept))
2747            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
2748          return (CodeableConcept) this.value;
2749        }
2750
2751        public boolean hasValueCodeableConcept() { 
2752          return this != null && this.value instanceof CodeableConcept;
2753        }
2754
2755        /**
2756         * @return {@link #value} (The value of the Output parameter as a basic type.)
2757         */
2758        public CodeableReference getValueCodeableReference() throws FHIRException { 
2759          if (this.value == null)
2760            this.value = new CodeableReference();
2761          if (!(this.value instanceof CodeableReference))
2762            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
2763          return (CodeableReference) this.value;
2764        }
2765
2766        public boolean hasValueCodeableReference() { 
2767          return this != null && this.value instanceof CodeableReference;
2768        }
2769
2770        /**
2771         * @return {@link #value} (The value of the Output parameter as a basic type.)
2772         */
2773        public Coding getValueCoding() throws FHIRException { 
2774          if (this.value == null)
2775            this.value = new Coding();
2776          if (!(this.value instanceof Coding))
2777            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
2778          return (Coding) this.value;
2779        }
2780
2781        public boolean hasValueCoding() { 
2782          return this != null && this.value instanceof Coding;
2783        }
2784
2785        /**
2786         * @return {@link #value} (The value of the Output parameter as a basic type.)
2787         */
2788        public ContactPoint getValueContactPoint() throws FHIRException { 
2789          if (this.value == null)
2790            this.value = new ContactPoint();
2791          if (!(this.value instanceof ContactPoint))
2792            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
2793          return (ContactPoint) this.value;
2794        }
2795
2796        public boolean hasValueContactPoint() { 
2797          return this != null && this.value instanceof ContactPoint;
2798        }
2799
2800        /**
2801         * @return {@link #value} (The value of the Output parameter as a basic type.)
2802         */
2803        public Count getValueCount() throws FHIRException { 
2804          if (this.value == null)
2805            this.value = new Count();
2806          if (!(this.value instanceof Count))
2807            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
2808          return (Count) this.value;
2809        }
2810
2811        public boolean hasValueCount() { 
2812          return this != null && this.value instanceof Count;
2813        }
2814
2815        /**
2816         * @return {@link #value} (The value of the Output parameter as a basic type.)
2817         */
2818        public Distance getValueDistance() throws FHIRException { 
2819          if (this.value == null)
2820            this.value = new Distance();
2821          if (!(this.value instanceof Distance))
2822            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
2823          return (Distance) this.value;
2824        }
2825
2826        public boolean hasValueDistance() { 
2827          return this != null && this.value instanceof Distance;
2828        }
2829
2830        /**
2831         * @return {@link #value} (The value of the Output parameter as a basic type.)
2832         */
2833        public Duration getValueDuration() throws FHIRException { 
2834          if (this.value == null)
2835            this.value = new Duration();
2836          if (!(this.value instanceof Duration))
2837            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
2838          return (Duration) this.value;
2839        }
2840
2841        public boolean hasValueDuration() { 
2842          return this != null && this.value instanceof Duration;
2843        }
2844
2845        /**
2846         * @return {@link #value} (The value of the Output parameter as a basic type.)
2847         */
2848        public HumanName getValueHumanName() throws FHIRException { 
2849          if (this.value == null)
2850            this.value = new HumanName();
2851          if (!(this.value instanceof HumanName))
2852            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
2853          return (HumanName) this.value;
2854        }
2855
2856        public boolean hasValueHumanName() { 
2857          return this != null && this.value instanceof HumanName;
2858        }
2859
2860        /**
2861         * @return {@link #value} (The value of the Output parameter as a basic type.)
2862         */
2863        public Identifier getValueIdentifier() throws FHIRException { 
2864          if (this.value == null)
2865            this.value = new Identifier();
2866          if (!(this.value instanceof Identifier))
2867            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
2868          return (Identifier) this.value;
2869        }
2870
2871        public boolean hasValueIdentifier() { 
2872          return this != null && this.value instanceof Identifier;
2873        }
2874
2875        /**
2876         * @return {@link #value} (The value of the Output parameter as a basic type.)
2877         */
2878        public Money getValueMoney() throws FHIRException { 
2879          if (this.value == null)
2880            this.value = new Money();
2881          if (!(this.value instanceof Money))
2882            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
2883          return (Money) this.value;
2884        }
2885
2886        public boolean hasValueMoney() { 
2887          return this != null && this.value instanceof Money;
2888        }
2889
2890        /**
2891         * @return {@link #value} (The value of the Output parameter as a basic type.)
2892         */
2893        public Period getValuePeriod() throws FHIRException { 
2894          if (this.value == null)
2895            this.value = new Period();
2896          if (!(this.value instanceof Period))
2897            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
2898          return (Period) this.value;
2899        }
2900
2901        public boolean hasValuePeriod() { 
2902          return this != null && this.value instanceof Period;
2903        }
2904
2905        /**
2906         * @return {@link #value} (The value of the Output parameter as a basic type.)
2907         */
2908        public Quantity getValueQuantity() throws FHIRException { 
2909          if (this.value == null)
2910            this.value = new Quantity();
2911          if (!(this.value instanceof Quantity))
2912            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
2913          return (Quantity) this.value;
2914        }
2915
2916        public boolean hasValueQuantity() { 
2917          return this != null && this.value instanceof Quantity;
2918        }
2919
2920        /**
2921         * @return {@link #value} (The value of the Output parameter as a basic type.)
2922         */
2923        public Range getValueRange() throws FHIRException { 
2924          if (this.value == null)
2925            this.value = new Range();
2926          if (!(this.value instanceof Range))
2927            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
2928          return (Range) this.value;
2929        }
2930
2931        public boolean hasValueRange() { 
2932          return this != null && this.value instanceof Range;
2933        }
2934
2935        /**
2936         * @return {@link #value} (The value of the Output parameter as a basic type.)
2937         */
2938        public Ratio getValueRatio() throws FHIRException { 
2939          if (this.value == null)
2940            this.value = new Ratio();
2941          if (!(this.value instanceof Ratio))
2942            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
2943          return (Ratio) this.value;
2944        }
2945
2946        public boolean hasValueRatio() { 
2947          return this != null && this.value instanceof Ratio;
2948        }
2949
2950        /**
2951         * @return {@link #value} (The value of the Output parameter as a basic type.)
2952         */
2953        public RatioRange getValueRatioRange() throws FHIRException { 
2954          if (this.value == null)
2955            this.value = new RatioRange();
2956          if (!(this.value instanceof RatioRange))
2957            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
2958          return (RatioRange) this.value;
2959        }
2960
2961        public boolean hasValueRatioRange() { 
2962          return this != null && this.value instanceof RatioRange;
2963        }
2964
2965        /**
2966         * @return {@link #value} (The value of the Output parameter as a basic type.)
2967         */
2968        public Reference getValueReference() throws FHIRException { 
2969          if (this.value == null)
2970            this.value = new Reference();
2971          if (!(this.value instanceof Reference))
2972            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
2973          return (Reference) this.value;
2974        }
2975
2976        public boolean hasValueReference() { 
2977          return this != null && this.value instanceof Reference;
2978        }
2979
2980        /**
2981         * @return {@link #value} (The value of the Output parameter as a basic type.)
2982         */
2983        public SampledData getValueSampledData() throws FHIRException { 
2984          if (this.value == null)
2985            this.value = new SampledData();
2986          if (!(this.value instanceof SampledData))
2987            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
2988          return (SampledData) this.value;
2989        }
2990
2991        public boolean hasValueSampledData() { 
2992          return this != null && this.value instanceof SampledData;
2993        }
2994
2995        /**
2996         * @return {@link #value} (The value of the Output parameter as a basic type.)
2997         */
2998        public Signature getValueSignature() throws FHIRException { 
2999          if (this.value == null)
3000            this.value = new Signature();
3001          if (!(this.value instanceof Signature))
3002            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
3003          return (Signature) this.value;
3004        }
3005
3006        public boolean hasValueSignature() { 
3007          return this != null && this.value instanceof Signature;
3008        }
3009
3010        /**
3011         * @return {@link #value} (The value of the Output parameter as a basic type.)
3012         */
3013        public Timing getValueTiming() throws FHIRException { 
3014          if (this.value == null)
3015            this.value = new Timing();
3016          if (!(this.value instanceof Timing))
3017            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
3018          return (Timing) this.value;
3019        }
3020
3021        public boolean hasValueTiming() { 
3022          return this != null && this.value instanceof Timing;
3023        }
3024
3025        /**
3026         * @return {@link #value} (The value of the Output parameter as a basic type.)
3027         */
3028        public ContactDetail getValueContactDetail() throws FHIRException { 
3029          if (this.value == null)
3030            this.value = new ContactDetail();
3031          if (!(this.value instanceof ContactDetail))
3032            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
3033          return (ContactDetail) this.value;
3034        }
3035
3036        public boolean hasValueContactDetail() { 
3037          return this != null && this.value instanceof ContactDetail;
3038        }
3039
3040        /**
3041         * @return {@link #value} (The value of the Output parameter as a basic type.)
3042         */
3043        public DataRequirement getValueDataRequirement() throws FHIRException { 
3044          if (this.value == null)
3045            this.value = new DataRequirement();
3046          if (!(this.value instanceof DataRequirement))
3047            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
3048          return (DataRequirement) this.value;
3049        }
3050
3051        public boolean hasValueDataRequirement() { 
3052          return this != null && this.value instanceof DataRequirement;
3053        }
3054
3055        /**
3056         * @return {@link #value} (The value of the Output parameter as a basic type.)
3057         */
3058        public Expression getValueExpression() throws FHIRException { 
3059          if (this.value == null)
3060            this.value = new Expression();
3061          if (!(this.value instanceof Expression))
3062            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
3063          return (Expression) this.value;
3064        }
3065
3066        public boolean hasValueExpression() { 
3067          return this != null && this.value instanceof Expression;
3068        }
3069
3070        /**
3071         * @return {@link #value} (The value of the Output parameter as a basic type.)
3072         */
3073        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
3074          if (this.value == null)
3075            this.value = new ParameterDefinition();
3076          if (!(this.value instanceof ParameterDefinition))
3077            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3078          return (ParameterDefinition) this.value;
3079        }
3080
3081        public boolean hasValueParameterDefinition() { 
3082          return this != null && this.value instanceof ParameterDefinition;
3083        }
3084
3085        /**
3086         * @return {@link #value} (The value of the Output parameter as a basic type.)
3087         */
3088        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
3089          if (this.value == null)
3090            this.value = new RelatedArtifact();
3091          if (!(this.value instanceof RelatedArtifact))
3092            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
3093          return (RelatedArtifact) this.value;
3094        }
3095
3096        public boolean hasValueRelatedArtifact() { 
3097          return this != null && this.value instanceof RelatedArtifact;
3098        }
3099
3100        /**
3101         * @return {@link #value} (The value of the Output parameter as a basic type.)
3102         */
3103        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
3104          if (this.value == null)
3105            this.value = new TriggerDefinition();
3106          if (!(this.value instanceof TriggerDefinition))
3107            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3108          return (TriggerDefinition) this.value;
3109        }
3110
3111        public boolean hasValueTriggerDefinition() { 
3112          return this != null && this.value instanceof TriggerDefinition;
3113        }
3114
3115        /**
3116         * @return {@link #value} (The value of the Output parameter as a basic type.)
3117         */
3118        public UsageContext getValueUsageContext() throws FHIRException { 
3119          if (this.value == null)
3120            this.value = new UsageContext();
3121          if (!(this.value instanceof UsageContext))
3122            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
3123          return (UsageContext) this.value;
3124        }
3125
3126        public boolean hasValueUsageContext() { 
3127          return this != null && this.value instanceof UsageContext;
3128        }
3129
3130        /**
3131         * @return {@link #value} (The value of the Output parameter as a basic type.)
3132         */
3133        public Availability getValueAvailability() throws FHIRException { 
3134          if (this.value == null)
3135            this.value = new Availability();
3136          if (!(this.value instanceof Availability))
3137            throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered");
3138          return (Availability) this.value;
3139        }
3140
3141        public boolean hasValueAvailability() { 
3142          return this != null && this.value instanceof Availability;
3143        }
3144
3145        /**
3146         * @return {@link #value} (The value of the Output parameter as a basic type.)
3147         */
3148        public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 
3149          if (this.value == null)
3150            this.value = new ExtendedContactDetail();
3151          if (!(this.value instanceof ExtendedContactDetail))
3152            throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
3153          return (ExtendedContactDetail) this.value;
3154        }
3155
3156        public boolean hasValueExtendedContactDetail() { 
3157          return this != null && this.value instanceof ExtendedContactDetail;
3158        }
3159
3160        /**
3161         * @return {@link #value} (The value of the Output parameter as a basic type.)
3162         */
3163        public Dosage getValueDosage() throws FHIRException { 
3164          if (this.value == null)
3165            this.value = new Dosage();
3166          if (!(this.value instanceof Dosage))
3167            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
3168          return (Dosage) this.value;
3169        }
3170
3171        public boolean hasValueDosage() { 
3172          return this != null && this.value instanceof Dosage;
3173        }
3174
3175        /**
3176         * @return {@link #value} (The value of the Output parameter as a basic type.)
3177         */
3178        public Meta getValueMeta() throws FHIRException { 
3179          if (this.value == null)
3180            this.value = new Meta();
3181          if (!(this.value instanceof Meta))
3182            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
3183          return (Meta) this.value;
3184        }
3185
3186        public boolean hasValueMeta() { 
3187          return this != null && this.value instanceof Meta;
3188        }
3189
3190        public boolean hasValue() { 
3191          return this.value != null && !this.value.isEmpty();
3192        }
3193
3194        /**
3195         * @param value {@link #value} (The value of the Output parameter as a basic type.)
3196         */
3197        public TaskOutputComponent setValue(DataType value) { 
3198          if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
3199            throw new FHIRException("Not the right type for Task.output.value[x]: "+value.fhirType());
3200          this.value = value;
3201          return this;
3202        }
3203
3204        protected void listChildren(List<Property> children) {
3205          super.listChildren(children);
3206          children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type));
3207          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value));
3208        }
3209
3210        @Override
3211        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3212          switch (_hash) {
3213          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type);
3214          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
3215          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
3216          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the Output parameter as a basic type.", 0, 1, value);
3217          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the Output parameter as a basic type.", 0, 1, value);
3218          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the Output parameter as a basic type.", 0, 1, value);
3219          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the Output parameter as a basic type.", 0, 1, value);
3220          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the Output parameter as a basic type.", 0, 1, value);
3221          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the Output parameter as a basic type.", 0, 1, value);
3222          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the Output parameter as a basic type.", 0, 1, value);
3223          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the Output parameter as a basic type.", 0, 1, value);
3224          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the Output parameter as a basic type.", 0, 1, value);
3225          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the Output parameter as a basic type.", 0, 1, value);
3226          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the Output parameter as a basic type.", 0, 1, value);
3227          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the Output parameter as a basic type.", 0, 1, value);
3228          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the Output parameter as a basic type.", 0, 1, value);
3229          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the Output parameter as a basic type.", 0, 1, value);
3230          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the Output parameter as a basic type.", 0, 1, value);
3231          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the Output parameter as a basic type.", 0, 1, value);
3232          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the Output parameter as a basic type.", 0, 1, value);
3233          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the Output parameter as a basic type.", 0, 1, value);
3234          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the Output parameter as a basic type.", 0, 1, value);
3235          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the Output parameter as a basic type.", 0, 1, value);
3236          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the Output parameter as a basic type.", 0, 1, value);
3237          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the Output parameter as a basic type.", 0, 1, value);
3238          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the Output parameter as a basic type.", 0, 1, value);
3239          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the Output parameter as a basic type.", 0, 1, value);
3240          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the Output parameter as a basic type.", 0, 1, value);
3241          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the Output parameter as a basic type.", 0, 1, value);
3242          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the Output parameter as a basic type.", 0, 1, value);
3243          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the Output parameter as a basic type.", 0, 1, value);
3244          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the Output parameter as a basic type.", 0, 1, value);
3245          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the Output parameter as a basic type.", 0, 1, value);
3246          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the Output parameter as a basic type.", 0, 1, value);
3247          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the Output parameter as a basic type.", 0, 1, value);
3248          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the Output parameter as a basic type.", 0, 1, value);
3249          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the Output parameter as a basic type.", 0, 1, value);
3250          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the Output parameter as a basic type.", 0, 1, value);
3251          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the Output parameter as a basic type.", 0, 1, value);
3252          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the Output parameter as a basic type.", 0, 1, value);
3253          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the Output parameter as a basic type.", 0, 1, value);
3254          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the Output parameter as a basic type.", 0, 1, value);
3255          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the Output parameter as a basic type.", 0, 1, value);
3256          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the Output parameter as a basic type.", 0, 1, value);
3257          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the Output parameter as a basic type.", 0, 1, value);
3258          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the Output parameter as a basic type.", 0, 1, value);
3259          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the Output parameter as a basic type.", 0, 1, value);
3260          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the Output parameter as a basic type.", 0, 1, value);
3261          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the Output parameter as a basic type.", 0, 1, value);
3262          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
3263          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the Output parameter as a basic type.", 0, 1, value);
3264          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
3265          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the Output parameter as a basic type.", 0, 1, value);
3266          case 1678530924: /*valueAvailability*/  return new Property("value[x]", "Availability", "The value of the Output parameter as a basic type.", 0, 1, value);
3267          case -1567222041: /*valueExtendedContactDetail*/  return new Property("value[x]", "ExtendedContactDetail", "The value of the Output parameter as a basic type.", 0, 1, value);
3268          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the Output parameter as a basic type.", 0, 1, value);
3269          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
3270          default: return super.getNamedProperty(_hash, _name, _checkValid);
3271          }
3272
3273        }
3274
3275      @Override
3276      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3277        switch (hash) {
3278        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
3279        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
3280        default: return super.getProperty(hash, name, checkValid);
3281        }
3282
3283      }
3284
3285      @Override
3286      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3287        switch (hash) {
3288        case 3575610: // type
3289          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3290          return value;
3291        case 111972721: // value
3292          this.value = TypeConvertor.castToType(value); // DataType
3293          return value;
3294        default: return super.setProperty(hash, name, value);
3295        }
3296
3297      }
3298
3299      @Override
3300      public Base setProperty(String name, Base value) throws FHIRException {
3301        if (name.equals("type")) {
3302          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3303        } else if (name.equals("value[x]")) {
3304          this.value = TypeConvertor.castToType(value); // DataType
3305        } else
3306          return super.setProperty(name, value);
3307        return value;
3308      }
3309
3310      @Override
3311      public Base makeProperty(int hash, String name) throws FHIRException {
3312        switch (hash) {
3313        case 3575610:  return getType();
3314        case -1410166417:  return getValue();
3315        case 111972721:  return getValue();
3316        default: return super.makeProperty(hash, name);
3317        }
3318
3319      }
3320
3321      @Override
3322      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3323        switch (hash) {
3324        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
3325        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
3326        default: return super.getTypesForProperty(hash, name);
3327        }
3328
3329      }
3330
3331      @Override
3332      public Base addChild(String name) throws FHIRException {
3333        if (name.equals("type")) {
3334          this.type = new CodeableConcept();
3335          return this.type;
3336        }
3337        else if (name.equals("valueBase64Binary")) {
3338          this.value = new Base64BinaryType();
3339          return this.value;
3340        }
3341        else if (name.equals("valueBoolean")) {
3342          this.value = new BooleanType();
3343          return this.value;
3344        }
3345        else if (name.equals("valueCanonical")) {
3346          this.value = new CanonicalType();
3347          return this.value;
3348        }
3349        else if (name.equals("valueCode")) {
3350          this.value = new CodeType();
3351          return this.value;
3352        }
3353        else if (name.equals("valueDate")) {
3354          this.value = new DateType();
3355          return this.value;
3356        }
3357        else if (name.equals("valueDateTime")) {
3358          this.value = new DateTimeType();
3359          return this.value;
3360        }
3361        else if (name.equals("valueDecimal")) {
3362          this.value = new DecimalType();
3363          return this.value;
3364        }
3365        else if (name.equals("valueId")) {
3366          this.value = new IdType();
3367          return this.value;
3368        }
3369        else if (name.equals("valueInstant")) {
3370          this.value = new InstantType();
3371          return this.value;
3372        }
3373        else if (name.equals("valueInteger")) {
3374          this.value = new IntegerType();
3375          return this.value;
3376        }
3377        else if (name.equals("valueInteger64")) {
3378          this.value = new Integer64Type();
3379          return this.value;
3380        }
3381        else if (name.equals("valueMarkdown")) {
3382          this.value = new MarkdownType();
3383          return this.value;
3384        }
3385        else if (name.equals("valueOid")) {
3386          this.value = new OidType();
3387          return this.value;
3388        }
3389        else if (name.equals("valuePositiveInt")) {
3390          this.value = new PositiveIntType();
3391          return this.value;
3392        }
3393        else if (name.equals("valueString")) {
3394          this.value = new StringType();
3395          return this.value;
3396        }
3397        else if (name.equals("valueTime")) {
3398          this.value = new TimeType();
3399          return this.value;
3400        }
3401        else if (name.equals("valueUnsignedInt")) {
3402          this.value = new UnsignedIntType();
3403          return this.value;
3404        }
3405        else if (name.equals("valueUri")) {
3406          this.value = new UriType();
3407          return this.value;
3408        }
3409        else if (name.equals("valueUrl")) {
3410          this.value = new UrlType();
3411          return this.value;
3412        }
3413        else if (name.equals("valueUuid")) {
3414          this.value = new UuidType();
3415          return this.value;
3416        }
3417        else if (name.equals("valueAddress")) {
3418          this.value = new Address();
3419          return this.value;
3420        }
3421        else if (name.equals("valueAge")) {
3422          this.value = new Age();
3423          return this.value;
3424        }
3425        else if (name.equals("valueAnnotation")) {
3426          this.value = new Annotation();
3427          return this.value;
3428        }
3429        else if (name.equals("valueAttachment")) {
3430          this.value = new Attachment();
3431          return this.value;
3432        }
3433        else if (name.equals("valueCodeableConcept")) {
3434          this.value = new CodeableConcept();
3435          return this.value;
3436        }
3437        else if (name.equals("valueCodeableReference")) {
3438          this.value = new CodeableReference();
3439          return this.value;
3440        }
3441        else if (name.equals("valueCoding")) {
3442          this.value = new Coding();
3443          return this.value;
3444        }
3445        else if (name.equals("valueContactPoint")) {
3446          this.value = new ContactPoint();
3447          return this.value;
3448        }
3449        else if (name.equals("valueCount")) {
3450          this.value = new Count();
3451          return this.value;
3452        }
3453        else if (name.equals("valueDistance")) {
3454          this.value = new Distance();
3455          return this.value;
3456        }
3457        else if (name.equals("valueDuration")) {
3458          this.value = new Duration();
3459          return this.value;
3460        }
3461        else if (name.equals("valueHumanName")) {
3462          this.value = new HumanName();
3463          return this.value;
3464        }
3465        else if (name.equals("valueIdentifier")) {
3466          this.value = new Identifier();
3467          return this.value;
3468        }
3469        else if (name.equals("valueMoney")) {
3470          this.value = new Money();
3471          return this.value;
3472        }
3473        else if (name.equals("valuePeriod")) {
3474          this.value = new Period();
3475          return this.value;
3476        }
3477        else if (name.equals("valueQuantity")) {
3478          this.value = new Quantity();
3479          return this.value;
3480        }
3481        else if (name.equals("valueRange")) {
3482          this.value = new Range();
3483          return this.value;
3484        }
3485        else if (name.equals("valueRatio")) {
3486          this.value = new Ratio();
3487          return this.value;
3488        }
3489        else if (name.equals("valueRatioRange")) {
3490          this.value = new RatioRange();
3491          return this.value;
3492        }
3493        else if (name.equals("valueReference")) {
3494          this.value = new Reference();
3495          return this.value;
3496        }
3497        else if (name.equals("valueSampledData")) {
3498          this.value = new SampledData();
3499          return this.value;
3500        }
3501        else if (name.equals("valueSignature")) {
3502          this.value = new Signature();
3503          return this.value;
3504        }
3505        else if (name.equals("valueTiming")) {
3506          this.value = new Timing();
3507          return this.value;
3508        }
3509        else if (name.equals("valueContactDetail")) {
3510          this.value = new ContactDetail();
3511          return this.value;
3512        }
3513        else if (name.equals("valueDataRequirement")) {
3514          this.value = new DataRequirement();
3515          return this.value;
3516        }
3517        else if (name.equals("valueExpression")) {
3518          this.value = new Expression();
3519          return this.value;
3520        }
3521        else if (name.equals("valueParameterDefinition")) {
3522          this.value = new ParameterDefinition();
3523          return this.value;
3524        }
3525        else if (name.equals("valueRelatedArtifact")) {
3526          this.value = new RelatedArtifact();
3527          return this.value;
3528        }
3529        else if (name.equals("valueTriggerDefinition")) {
3530          this.value = new TriggerDefinition();
3531          return this.value;
3532        }
3533        else if (name.equals("valueUsageContext")) {
3534          this.value = new UsageContext();
3535          return this.value;
3536        }
3537        else if (name.equals("valueAvailability")) {
3538          this.value = new Availability();
3539          return this.value;
3540        }
3541        else if (name.equals("valueExtendedContactDetail")) {
3542          this.value = new ExtendedContactDetail();
3543          return this.value;
3544        }
3545        else if (name.equals("valueDosage")) {
3546          this.value = new Dosage();
3547          return this.value;
3548        }
3549        else if (name.equals("valueMeta")) {
3550          this.value = new Meta();
3551          return this.value;
3552        }
3553        else
3554          return super.addChild(name);
3555      }
3556
3557      public TaskOutputComponent copy() {
3558        TaskOutputComponent dst = new TaskOutputComponent();
3559        copyValues(dst);
3560        return dst;
3561      }
3562
3563      public void copyValues(TaskOutputComponent dst) {
3564        super.copyValues(dst);
3565        dst.type = type == null ? null : type.copy();
3566        dst.value = value == null ? null : value.copy();
3567      }
3568
3569      @Override
3570      public boolean equalsDeep(Base other_) {
3571        if (!super.equalsDeep(other_))
3572          return false;
3573        if (!(other_ instanceof TaskOutputComponent))
3574          return false;
3575        TaskOutputComponent o = (TaskOutputComponent) other_;
3576        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
3577      }
3578
3579      @Override
3580      public boolean equalsShallow(Base other_) {
3581        if (!super.equalsShallow(other_))
3582          return false;
3583        if (!(other_ instanceof TaskOutputComponent))
3584          return false;
3585        TaskOutputComponent o = (TaskOutputComponent) other_;
3586        return true;
3587      }
3588
3589      public boolean isEmpty() {
3590        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
3591      }
3592
3593  public String fhirType() {
3594    return "Task.output";
3595
3596  }
3597
3598  }
3599
3600    /**
3601     * The business identifier for this task.
3602     */
3603    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3604    @Description(shortDefinition="Task Instance Identifier", formalDefinition="The business identifier for this task." )
3605    protected List<Identifier> identifier;
3606
3607    /**
3608     * The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3609     */
3610    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=1, modifier=false, summary=true)
3611    @Description(shortDefinition="Formal definition of task", formalDefinition="The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task." )
3612    protected CanonicalType instantiatesCanonical;
3613
3614    /**
3615     * The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3616     */
3617    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3618    @Description(shortDefinition="Formal definition of task", formalDefinition="The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task." )
3619    protected UriType instantiatesUri;
3620
3621    /**
3622     * BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a "request" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.
3623     */
3624    @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3625    @Description(shortDefinition="Request fulfilled by this task", formalDefinition="BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a \"request\" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient." )
3626    protected List<Reference> basedOn;
3627
3628    /**
3629     * A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.
3630     */
3631    @Child(name = "groupIdentifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true)
3632    @Description(shortDefinition="Requisition or grouper id", formalDefinition="A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time." )
3633    protected Identifier groupIdentifier;
3634
3635    /**
3636     * Task that this particular task is part of.
3637     */
3638    @Child(name = "partOf", type = {Task.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3639    @Description(shortDefinition="Composite task", formalDefinition="Task that this particular task is part of." )
3640    protected List<Reference> partOf;
3641
3642    /**
3643     * The current status of the task.
3644     */
3645    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
3646    @Description(shortDefinition="draft | requested | received | accepted | +", formalDefinition="The current status of the task." )
3647    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-status")
3648    protected Enumeration<TaskStatus> status;
3649
3650    /**
3651     * An explanation as to why this task is held, failed, was refused, etc.
3652     */
3653    @Child(name = "statusReason", type = {CodeableReference.class}, order=7, min=0, max=1, modifier=false, summary=true)
3654    @Description(shortDefinition="Reason for current status", formalDefinition="An explanation as to why this task is held, failed, was refused, etc." )
3655    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-status-reason")
3656    protected CodeableReference statusReason;
3657
3658    /**
3659     * Contains business-specific nuances of the business state.
3660     */
3661    @Child(name = "businessStatus", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
3662    @Description(shortDefinition="E.g. \"Specimen collected\", \"IV prepped\"", formalDefinition="Contains business-specific nuances of the business state." )
3663    protected CodeableConcept businessStatus;
3664
3665    /**
3666     * Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.
3667     */
3668    @Child(name = "intent", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true)
3669    @Description(shortDefinition="unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition="Indicates the \"level\" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc." )
3670    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-intent")
3671    protected Enumeration<TaskIntent> intent;
3672
3673    /**
3674     * Indicates how quickly the Task should be addressed with respect to other requests.
3675     */
3676    @Child(name = "priority", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false)
3677    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Task should be addressed with respect to other requests." )
3678    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
3679    protected Enumeration<RequestPriority> priority;
3680
3681    /**
3682     * If true indicates that the Task is asking for the specified action to *not* occur.
3683     */
3684    @Child(name = "doNotPerform", type = {BooleanType.class}, order=11, min=0, max=1, modifier=true, summary=true)
3685    @Description(shortDefinition="True if Task is prohibiting action", formalDefinition="If true indicates that the Task is asking for the specified action to *not* occur." )
3686    protected BooleanType doNotPerform;
3687
3688    /**
3689     * A name or code (or both) briefly describing what the task involves.
3690     */
3691    @Child(name = "code", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=true)
3692    @Description(shortDefinition="Task Type", formalDefinition="A name or code (or both) briefly describing what the task involves." )
3693    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-code")
3694    protected CodeableConcept code;
3695
3696    /**
3697     * A free-text description of what is to be performed.
3698     */
3699    @Child(name = "description", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true)
3700    @Description(shortDefinition="Human-readable explanation of task", formalDefinition="A free-text description of what is to be performed." )
3701    protected StringType description;
3702
3703    /**
3704     * The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.
3705     */
3706    @Child(name = "focus", type = {Reference.class}, order=14, min=0, max=1, modifier=false, summary=true)
3707    @Description(shortDefinition="What task is acting on", formalDefinition="The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task." )
3708    protected Reference focus;
3709
3710    /**
3711     * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
3712     */
3713    @Child(name = "for", type = {Reference.class}, order=15, min=0, max=1, modifier=false, summary=true)
3714    @Description(shortDefinition="Beneficiary of the Task", formalDefinition="The entity who benefits from the performance of the service specified in the task (e.g., the patient)." )
3715    protected Reference for_;
3716
3717    /**
3718     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.
3719     */
3720    @Child(name = "encounter", type = {Encounter.class}, order=16, min=0, max=1, modifier=false, summary=true)
3721    @Description(shortDefinition="Healthcare event during which this task originated", formalDefinition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created." )
3722    protected Reference encounter;
3723
3724    /**
3725     * Indicates the start and/or end of the period of time when completion of the task is desired to take place.
3726     */
3727    @Child(name = "requestedPeriod", type = {Period.class}, order=17, min=0, max=1, modifier=false, summary=true)
3728    @Description(shortDefinition="When the task should be performed", formalDefinition="Indicates the start and/or end of the period of time when completion of the task is desired to take place." )
3729    protected Period requestedPeriod;
3730
3731    /**
3732     * Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).
3733     */
3734    @Child(name = "executionPeriod", type = {Period.class}, order=18, min=0, max=1, modifier=false, summary=true)
3735    @Description(shortDefinition="Start and end time of execution", formalDefinition="Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end)." )
3736    protected Period executionPeriod;
3737
3738    /**
3739     * The date and time this task was created.
3740     */
3741    @Child(name = "authoredOn", type = {DateTimeType.class}, order=19, min=0, max=1, modifier=false, summary=false)
3742    @Description(shortDefinition="Task Creation Date", formalDefinition="The date and time this task was created." )
3743    protected DateTimeType authoredOn;
3744
3745    /**
3746     * The date and time of last modification to this task.
3747     */
3748    @Child(name = "lastModified", type = {DateTimeType.class}, order=20, min=0, max=1, modifier=false, summary=true)
3749    @Description(shortDefinition="Task Last Modified Date", formalDefinition="The date and time of last modification to this task." )
3750    protected DateTimeType lastModified;
3751
3752    /**
3753     * The creator of the task.
3754     */
3755    @Child(name = "requester", type = {Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=21, min=0, max=1, modifier=false, summary=true)
3756    @Description(shortDefinition="Who is asking for task to be done", formalDefinition="The creator of the task." )
3757    protected Reference requester;
3758
3759    /**
3760     * The kind of participant or specific participant that should perform the task.
3761     */
3762    @Child(name = "requestedPerformer", type = {CodeableReference.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3763    @Description(shortDefinition="Who should perform Task", formalDefinition="The kind of participant or specific participant that should perform the task." )
3764    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
3765    protected List<CodeableReference> requestedPerformer;
3766
3767    /**
3768     * Party responsible for managing task execution.
3769     */
3770    @Child(name = "owner", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, RelatedPerson.class}, order=23, min=0, max=1, modifier=false, summary=true)
3771    @Description(shortDefinition="Responsible individual", formalDefinition="Party responsible for managing task execution." )
3772    protected Reference owner;
3773
3774    /**
3775     * The entity who performed the requested task.
3776     */
3777    @Child(name = "performer", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3778    @Description(shortDefinition="Who or what performed the task", formalDefinition="The entity who performed the requested task." )
3779    protected List<TaskPerformerComponent> performer;
3780
3781    /**
3782     * Principal physical location where this task is performed.
3783     */
3784    @Child(name = "location", type = {Location.class}, order=25, min=0, max=1, modifier=false, summary=true)
3785    @Description(shortDefinition="Where task occurs", formalDefinition="Principal physical location where this task is performed." )
3786    protected Reference location;
3787
3788    /**
3789     * A description, code, or reference indicating why this task needs to be performed.
3790     */
3791    @Child(name = "reason", type = {CodeableReference.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3792    @Description(shortDefinition="Why task is needed", formalDefinition="A description, code, or reference indicating why this task needs to be performed." )
3793    protected List<CodeableReference> reason;
3794
3795    /**
3796     * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.
3797     */
3798    @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3799    @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task." )
3800    protected List<Reference> insurance;
3801
3802    /**
3803     * Free-text information captured about the task as it progresses.
3804     */
3805    @Child(name = "note", type = {Annotation.class}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3806    @Description(shortDefinition="Comments made about the task", formalDefinition="Free-text information captured about the task as it progresses." )
3807    protected List<Annotation> note;
3808
3809    /**
3810     * Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.
3811     */
3812    @Child(name = "relevantHistory", type = {Provenance.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3813    @Description(shortDefinition="Key events in history of the Task", formalDefinition="Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task." )
3814    protected List<Reference> relevantHistory;
3815
3816    /**
3817     * If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.
3818     */
3819    @Child(name = "restriction", type = {}, order=30, min=0, max=1, modifier=false, summary=false)
3820    @Description(shortDefinition="Constraints on fulfillment tasks", formalDefinition="If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned." )
3821    protected TaskRestrictionComponent restriction;
3822
3823    /**
3824     * Additional information that may be needed in the execution of the task.
3825     */
3826    @Child(name = "input", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3827    @Description(shortDefinition="Information used to perform task", formalDefinition="Additional information that may be needed in the execution of the task." )
3828    protected List<TaskInputComponent> input;
3829
3830    /**
3831     * Outputs produced by the Task.
3832     */
3833    @Child(name = "output", type = {}, order=32, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3834    @Description(shortDefinition="Information produced as part of task", formalDefinition="Outputs produced by the Task." )
3835    protected List<TaskOutputComponent> output;
3836
3837    private static final long serialVersionUID = 1363715195L;
3838
3839  /**
3840   * Constructor
3841   */
3842    public Task() {
3843      super();
3844    }
3845
3846  /**
3847   * Constructor
3848   */
3849    public Task(TaskStatus status, TaskIntent intent) {
3850      super();
3851      this.setStatus(status);
3852      this.setIntent(intent);
3853    }
3854
3855    /**
3856     * @return {@link #identifier} (The business identifier for this task.)
3857     */
3858    public List<Identifier> getIdentifier() { 
3859      if (this.identifier == null)
3860        this.identifier = new ArrayList<Identifier>();
3861      return this.identifier;
3862    }
3863
3864    /**
3865     * @return Returns a reference to <code>this</code> for easy method chaining
3866     */
3867    public Task setIdentifier(List<Identifier> theIdentifier) { 
3868      this.identifier = theIdentifier;
3869      return this;
3870    }
3871
3872    public boolean hasIdentifier() { 
3873      if (this.identifier == null)
3874        return false;
3875      for (Identifier item : this.identifier)
3876        if (!item.isEmpty())
3877          return true;
3878      return false;
3879    }
3880
3881    public Identifier addIdentifier() { //3
3882      Identifier t = new Identifier();
3883      if (this.identifier == null)
3884        this.identifier = new ArrayList<Identifier>();
3885      this.identifier.add(t);
3886      return t;
3887    }
3888
3889    public Task addIdentifier(Identifier t) { //3
3890      if (t == null)
3891        return this;
3892      if (this.identifier == null)
3893        this.identifier = new ArrayList<Identifier>();
3894      this.identifier.add(t);
3895      return this;
3896    }
3897
3898    /**
3899     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
3900     */
3901    public Identifier getIdentifierFirstRep() { 
3902      if (getIdentifier().isEmpty()) {
3903        addIdentifier();
3904      }
3905      return getIdentifier().get(0);
3906    }
3907
3908    /**
3909     * @return {@link #instantiatesCanonical} (The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesCanonical" gives direct access to the value
3910     */
3911    public CanonicalType getInstantiatesCanonicalElement() { 
3912      if (this.instantiatesCanonical == null)
3913        if (Configuration.errorOnAutoCreate())
3914          throw new Error("Attempt to auto-create Task.instantiatesCanonical");
3915        else if (Configuration.doAutoCreate())
3916          this.instantiatesCanonical = new CanonicalType(); // bb
3917      return this.instantiatesCanonical;
3918    }
3919
3920    public boolean hasInstantiatesCanonicalElement() { 
3921      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3922    }
3923
3924    public boolean hasInstantiatesCanonical() { 
3925      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3926    }
3927
3928    /**
3929     * @param value {@link #instantiatesCanonical} (The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesCanonical" gives direct access to the value
3930     */
3931    public Task setInstantiatesCanonicalElement(CanonicalType value) { 
3932      this.instantiatesCanonical = value;
3933      return this;
3934    }
3935
3936    /**
3937     * @return The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3938     */
3939    public String getInstantiatesCanonical() { 
3940      return this.instantiatesCanonical == null ? null : this.instantiatesCanonical.getValue();
3941    }
3942
3943    /**
3944     * @param value The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3945     */
3946    public Task setInstantiatesCanonical(String value) { 
3947      if (Utilities.noString(value))
3948        this.instantiatesCanonical = null;
3949      else {
3950        if (this.instantiatesCanonical == null)
3951          this.instantiatesCanonical = new CanonicalType();
3952        this.instantiatesCanonical.setValue(value);
3953      }
3954      return this;
3955    }
3956
3957    /**
3958     * @return {@link #instantiatesUri} (The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value
3959     */
3960    public UriType getInstantiatesUriElement() { 
3961      if (this.instantiatesUri == null)
3962        if (Configuration.errorOnAutoCreate())
3963          throw new Error("Attempt to auto-create Task.instantiatesUri");
3964        else if (Configuration.doAutoCreate())
3965          this.instantiatesUri = new UriType(); // bb
3966      return this.instantiatesUri;
3967    }
3968
3969    public boolean hasInstantiatesUriElement() { 
3970      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3971    }
3972
3973    public boolean hasInstantiatesUri() { 
3974      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3975    }
3976
3977    /**
3978     * @param value {@link #instantiatesUri} (The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value
3979     */
3980    public Task setInstantiatesUriElement(UriType value) { 
3981      this.instantiatesUri = value;
3982      return this;
3983    }
3984
3985    /**
3986     * @return The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3987     */
3988    public String getInstantiatesUri() { 
3989      return this.instantiatesUri == null ? null : this.instantiatesUri.getValue();
3990    }
3991
3992    /**
3993     * @param value The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.
3994     */
3995    public Task setInstantiatesUri(String value) { 
3996      if (Utilities.noString(value))
3997        this.instantiatesUri = null;
3998      else {
3999        if (this.instantiatesUri == null)
4000          this.instantiatesUri = new UriType();
4001        this.instantiatesUri.setValue(value);
4002      }
4003      return this;
4004    }
4005
4006    /**
4007     * @return {@link #basedOn} (BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a "request" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.)
4008     */
4009    public List<Reference> getBasedOn() { 
4010      if (this.basedOn == null)
4011        this.basedOn = new ArrayList<Reference>();
4012      return this.basedOn;
4013    }
4014
4015    /**
4016     * @return Returns a reference to <code>this</code> for easy method chaining
4017     */
4018    public Task setBasedOn(List<Reference> theBasedOn) { 
4019      this.basedOn = theBasedOn;
4020      return this;
4021    }
4022
4023    public boolean hasBasedOn() { 
4024      if (this.basedOn == null)
4025        return false;
4026      for (Reference item : this.basedOn)
4027        if (!item.isEmpty())
4028          return true;
4029      return false;
4030    }
4031
4032    public Reference addBasedOn() { //3
4033      Reference t = new Reference();
4034      if (this.basedOn == null)
4035        this.basedOn = new ArrayList<Reference>();
4036      this.basedOn.add(t);
4037      return t;
4038    }
4039
4040    public Task addBasedOn(Reference t) { //3
4041      if (t == null)
4042        return this;
4043      if (this.basedOn == null)
4044        this.basedOn = new ArrayList<Reference>();
4045      this.basedOn.add(t);
4046      return this;
4047    }
4048
4049    /**
4050     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
4051     */
4052    public Reference getBasedOnFirstRep() { 
4053      if (getBasedOn().isEmpty()) {
4054        addBasedOn();
4055      }
4056      return getBasedOn().get(0);
4057    }
4058
4059    /**
4060     * @return {@link #groupIdentifier} (A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.)
4061     */
4062    public Identifier getGroupIdentifier() { 
4063      if (this.groupIdentifier == null)
4064        if (Configuration.errorOnAutoCreate())
4065          throw new Error("Attempt to auto-create Task.groupIdentifier");
4066        else if (Configuration.doAutoCreate())
4067          this.groupIdentifier = new Identifier(); // cc
4068      return this.groupIdentifier;
4069    }
4070
4071    public boolean hasGroupIdentifier() { 
4072      return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
4073    }
4074
4075    /**
4076     * @param value {@link #groupIdentifier} (A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.)
4077     */
4078    public Task setGroupIdentifier(Identifier value) { 
4079      this.groupIdentifier = value;
4080      return this;
4081    }
4082
4083    /**
4084     * @return {@link #partOf} (Task that this particular task is part of.)
4085     */
4086    public List<Reference> getPartOf() { 
4087      if (this.partOf == null)
4088        this.partOf = new ArrayList<Reference>();
4089      return this.partOf;
4090    }
4091
4092    /**
4093     * @return Returns a reference to <code>this</code> for easy method chaining
4094     */
4095    public Task setPartOf(List<Reference> thePartOf) { 
4096      this.partOf = thePartOf;
4097      return this;
4098    }
4099
4100    public boolean hasPartOf() { 
4101      if (this.partOf == null)
4102        return false;
4103      for (Reference item : this.partOf)
4104        if (!item.isEmpty())
4105          return true;
4106      return false;
4107    }
4108
4109    public Reference addPartOf() { //3
4110      Reference t = new Reference();
4111      if (this.partOf == null)
4112        this.partOf = new ArrayList<Reference>();
4113      this.partOf.add(t);
4114      return t;
4115    }
4116
4117    public Task addPartOf(Reference t) { //3
4118      if (t == null)
4119        return this;
4120      if (this.partOf == null)
4121        this.partOf = new ArrayList<Reference>();
4122      this.partOf.add(t);
4123      return this;
4124    }
4125
4126    /**
4127     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
4128     */
4129    public Reference getPartOfFirstRep() { 
4130      if (getPartOf().isEmpty()) {
4131        addPartOf();
4132      }
4133      return getPartOf().get(0);
4134    }
4135
4136    /**
4137     * @return {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4138     */
4139    public Enumeration<TaskStatus> getStatusElement() { 
4140      if (this.status == null)
4141        if (Configuration.errorOnAutoCreate())
4142          throw new Error("Attempt to auto-create Task.status");
4143        else if (Configuration.doAutoCreate())
4144          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); // bb
4145      return this.status;
4146    }
4147
4148    public boolean hasStatusElement() { 
4149      return this.status != null && !this.status.isEmpty();
4150    }
4151
4152    public boolean hasStatus() { 
4153      return this.status != null && !this.status.isEmpty();
4154    }
4155
4156    /**
4157     * @param value {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4158     */
4159    public Task setStatusElement(Enumeration<TaskStatus> value) { 
4160      this.status = value;
4161      return this;
4162    }
4163
4164    /**
4165     * @return The current status of the task.
4166     */
4167    public TaskStatus getStatus() { 
4168      return this.status == null ? null : this.status.getValue();
4169    }
4170
4171    /**
4172     * @param value The current status of the task.
4173     */
4174    public Task setStatus(TaskStatus value) { 
4175        if (this.status == null)
4176          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory());
4177        this.status.setValue(value);
4178      return this;
4179    }
4180
4181    /**
4182     * @return {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
4183     */
4184    public CodeableReference getStatusReason() { 
4185      if (this.statusReason == null)
4186        if (Configuration.errorOnAutoCreate())
4187          throw new Error("Attempt to auto-create Task.statusReason");
4188        else if (Configuration.doAutoCreate())
4189          this.statusReason = new CodeableReference(); // cc
4190      return this.statusReason;
4191    }
4192
4193    public boolean hasStatusReason() { 
4194      return this.statusReason != null && !this.statusReason.isEmpty();
4195    }
4196
4197    /**
4198     * @param value {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
4199     */
4200    public Task setStatusReason(CodeableReference value) { 
4201      this.statusReason = value;
4202      return this;
4203    }
4204
4205    /**
4206     * @return {@link #businessStatus} (Contains business-specific nuances of the business state.)
4207     */
4208    public CodeableConcept getBusinessStatus() { 
4209      if (this.businessStatus == null)
4210        if (Configuration.errorOnAutoCreate())
4211          throw new Error("Attempt to auto-create Task.businessStatus");
4212        else if (Configuration.doAutoCreate())
4213          this.businessStatus = new CodeableConcept(); // cc
4214      return this.businessStatus;
4215    }
4216
4217    public boolean hasBusinessStatus() { 
4218      return this.businessStatus != null && !this.businessStatus.isEmpty();
4219    }
4220
4221    /**
4222     * @param value {@link #businessStatus} (Contains business-specific nuances of the business state.)
4223     */
4224    public Task setBusinessStatus(CodeableConcept value) { 
4225      this.businessStatus = value;
4226      return this;
4227    }
4228
4229    /**
4230     * @return {@link #intent} (Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
4231     */
4232    public Enumeration<TaskIntent> getIntentElement() { 
4233      if (this.intent == null)
4234        if (Configuration.errorOnAutoCreate())
4235          throw new Error("Attempt to auto-create Task.intent");
4236        else if (Configuration.doAutoCreate())
4237          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); // bb
4238      return this.intent;
4239    }
4240
4241    public boolean hasIntentElement() { 
4242      return this.intent != null && !this.intent.isEmpty();
4243    }
4244
4245    public boolean hasIntent() { 
4246      return this.intent != null && !this.intent.isEmpty();
4247    }
4248
4249    /**
4250     * @param value {@link #intent} (Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
4251     */
4252    public Task setIntentElement(Enumeration<TaskIntent> value) { 
4253      this.intent = value;
4254      return this;
4255    }
4256
4257    /**
4258     * @return Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.
4259     */
4260    public TaskIntent getIntent() { 
4261      return this.intent == null ? null : this.intent.getValue();
4262    }
4263
4264    /**
4265     * @param value Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.
4266     */
4267    public Task setIntent(TaskIntent value) { 
4268        if (this.intent == null)
4269          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory());
4270        this.intent.setValue(value);
4271      return this;
4272    }
4273
4274    /**
4275     * @return {@link #priority} (Indicates how quickly the Task should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
4276     */
4277    public Enumeration<RequestPriority> getPriorityElement() { 
4278      if (this.priority == null)
4279        if (Configuration.errorOnAutoCreate())
4280          throw new Error("Attempt to auto-create Task.priority");
4281        else if (Configuration.doAutoCreate())
4282          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
4283      return this.priority;
4284    }
4285
4286    public boolean hasPriorityElement() { 
4287      return this.priority != null && !this.priority.isEmpty();
4288    }
4289
4290    public boolean hasPriority() { 
4291      return this.priority != null && !this.priority.isEmpty();
4292    }
4293
4294    /**
4295     * @param value {@link #priority} (Indicates how quickly the Task should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
4296     */
4297    public Task setPriorityElement(Enumeration<RequestPriority> value) { 
4298      this.priority = value;
4299      return this;
4300    }
4301
4302    /**
4303     * @return Indicates how quickly the Task should be addressed with respect to other requests.
4304     */
4305    public RequestPriority getPriority() { 
4306      return this.priority == null ? null : this.priority.getValue();
4307    }
4308
4309    /**
4310     * @param value Indicates how quickly the Task should be addressed with respect to other requests.
4311     */
4312    public Task setPriority(RequestPriority value) { 
4313      if (value == null)
4314        this.priority = null;
4315      else {
4316        if (this.priority == null)
4317          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
4318        this.priority.setValue(value);
4319      }
4320      return this;
4321    }
4322
4323    /**
4324     * @return {@link #doNotPerform} (If true indicates that the Task 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
4325     */
4326    public BooleanType getDoNotPerformElement() { 
4327      if (this.doNotPerform == null)
4328        if (Configuration.errorOnAutoCreate())
4329          throw new Error("Attempt to auto-create Task.doNotPerform");
4330        else if (Configuration.doAutoCreate())
4331          this.doNotPerform = new BooleanType(); // bb
4332      return this.doNotPerform;
4333    }
4334
4335    public boolean hasDoNotPerformElement() { 
4336      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
4337    }
4338
4339    public boolean hasDoNotPerform() { 
4340      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
4341    }
4342
4343    /**
4344     * @param value {@link #doNotPerform} (If true indicates that the Task 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
4345     */
4346    public Task setDoNotPerformElement(BooleanType value) { 
4347      this.doNotPerform = value;
4348      return this;
4349    }
4350
4351    /**
4352     * @return If true indicates that the Task is asking for the specified action to *not* occur.
4353     */
4354    public boolean getDoNotPerform() { 
4355      return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
4356    }
4357
4358    /**
4359     * @param value If true indicates that the Task is asking for the specified action to *not* occur.
4360     */
4361    public Task setDoNotPerform(boolean value) { 
4362        if (this.doNotPerform == null)
4363          this.doNotPerform = new BooleanType();
4364        this.doNotPerform.setValue(value);
4365      return this;
4366    }
4367
4368    /**
4369     * @return {@link #code} (A name or code (or both) briefly describing what the task involves.)
4370     */
4371    public CodeableConcept getCode() { 
4372      if (this.code == null)
4373        if (Configuration.errorOnAutoCreate())
4374          throw new Error("Attempt to auto-create Task.code");
4375        else if (Configuration.doAutoCreate())
4376          this.code = new CodeableConcept(); // cc
4377      return this.code;
4378    }
4379
4380    public boolean hasCode() { 
4381      return this.code != null && !this.code.isEmpty();
4382    }
4383
4384    /**
4385     * @param value {@link #code} (A name or code (or both) briefly describing what the task involves.)
4386     */
4387    public Task setCode(CodeableConcept value) { 
4388      this.code = value;
4389      return this;
4390    }
4391
4392    /**
4393     * @return {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4394     */
4395    public StringType getDescriptionElement() { 
4396      if (this.description == null)
4397        if (Configuration.errorOnAutoCreate())
4398          throw new Error("Attempt to auto-create Task.description");
4399        else if (Configuration.doAutoCreate())
4400          this.description = new StringType(); // bb
4401      return this.description;
4402    }
4403
4404    public boolean hasDescriptionElement() { 
4405      return this.description != null && !this.description.isEmpty();
4406    }
4407
4408    public boolean hasDescription() { 
4409      return this.description != null && !this.description.isEmpty();
4410    }
4411
4412    /**
4413     * @param value {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4414     */
4415    public Task setDescriptionElement(StringType value) { 
4416      this.description = value;
4417      return this;
4418    }
4419
4420    /**
4421     * @return A free-text description of what is to be performed.
4422     */
4423    public String getDescription() { 
4424      return this.description == null ? null : this.description.getValue();
4425    }
4426
4427    /**
4428     * @param value A free-text description of what is to be performed.
4429     */
4430    public Task setDescription(String value) { 
4431      if (Utilities.noString(value))
4432        this.description = null;
4433      else {
4434        if (this.description == null)
4435          this.description = new StringType();
4436        this.description.setValue(value);
4437      }
4438      return this;
4439    }
4440
4441    /**
4442     * @return {@link #focus} (The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.)
4443     */
4444    public Reference getFocus() { 
4445      if (this.focus == null)
4446        if (Configuration.errorOnAutoCreate())
4447          throw new Error("Attempt to auto-create Task.focus");
4448        else if (Configuration.doAutoCreate())
4449          this.focus = new Reference(); // cc
4450      return this.focus;
4451    }
4452
4453    public boolean hasFocus() { 
4454      return this.focus != null && !this.focus.isEmpty();
4455    }
4456
4457    /**
4458     * @param value {@link #focus} (The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.)
4459     */
4460    public Task setFocus(Reference value) { 
4461      this.focus = value;
4462      return this;
4463    }
4464
4465    /**
4466     * @return {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
4467     */
4468    public Reference getFor() { 
4469      if (this.for_ == null)
4470        if (Configuration.errorOnAutoCreate())
4471          throw new Error("Attempt to auto-create Task.for_");
4472        else if (Configuration.doAutoCreate())
4473          this.for_ = new Reference(); // cc
4474      return this.for_;
4475    }
4476
4477    public boolean hasFor() { 
4478      return this.for_ != null && !this.for_.isEmpty();
4479    }
4480
4481    /**
4482     * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
4483     */
4484    public Task setFor(Reference value) { 
4485      this.for_ = value;
4486      return this;
4487    }
4488
4489    /**
4490     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
4491     */
4492    public Reference getEncounter() { 
4493      if (this.encounter == null)
4494        if (Configuration.errorOnAutoCreate())
4495          throw new Error("Attempt to auto-create Task.encounter");
4496        else if (Configuration.doAutoCreate())
4497          this.encounter = new Reference(); // cc
4498      return this.encounter;
4499    }
4500
4501    public boolean hasEncounter() { 
4502      return this.encounter != null && !this.encounter.isEmpty();
4503    }
4504
4505    /**
4506     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
4507     */
4508    public Task setEncounter(Reference value) { 
4509      this.encounter = value;
4510      return this;
4511    }
4512
4513    /**
4514     * @return {@link #requestedPeriod} (Indicates the start and/or end of the period of time when completion of the task is desired to take place.)
4515     */
4516    public Period getRequestedPeriod() { 
4517      if (this.requestedPeriod == null)
4518        if (Configuration.errorOnAutoCreate())
4519          throw new Error("Attempt to auto-create Task.requestedPeriod");
4520        else if (Configuration.doAutoCreate())
4521          this.requestedPeriod = new Period(); // cc
4522      return this.requestedPeriod;
4523    }
4524
4525    public boolean hasRequestedPeriod() { 
4526      return this.requestedPeriod != null && !this.requestedPeriod.isEmpty();
4527    }
4528
4529    /**
4530     * @param value {@link #requestedPeriod} (Indicates the start and/or end of the period of time when completion of the task is desired to take place.)
4531     */
4532    public Task setRequestedPeriod(Period value) { 
4533      this.requestedPeriod = value;
4534      return this;
4535    }
4536
4537    /**
4538     * @return {@link #executionPeriod} (Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).)
4539     */
4540    public Period getExecutionPeriod() { 
4541      if (this.executionPeriod == null)
4542        if (Configuration.errorOnAutoCreate())
4543          throw new Error("Attempt to auto-create Task.executionPeriod");
4544        else if (Configuration.doAutoCreate())
4545          this.executionPeriod = new Period(); // cc
4546      return this.executionPeriod;
4547    }
4548
4549    public boolean hasExecutionPeriod() { 
4550      return this.executionPeriod != null && !this.executionPeriod.isEmpty();
4551    }
4552
4553    /**
4554     * @param value {@link #executionPeriod} (Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).)
4555     */
4556    public Task setExecutionPeriod(Period value) { 
4557      this.executionPeriod = value;
4558      return this;
4559    }
4560
4561    /**
4562     * @return {@link #authoredOn} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
4563     */
4564    public DateTimeType getAuthoredOnElement() { 
4565      if (this.authoredOn == null)
4566        if (Configuration.errorOnAutoCreate())
4567          throw new Error("Attempt to auto-create Task.authoredOn");
4568        else if (Configuration.doAutoCreate())
4569          this.authoredOn = new DateTimeType(); // bb
4570      return this.authoredOn;
4571    }
4572
4573    public boolean hasAuthoredOnElement() { 
4574      return this.authoredOn != null && !this.authoredOn.isEmpty();
4575    }
4576
4577    public boolean hasAuthoredOn() { 
4578      return this.authoredOn != null && !this.authoredOn.isEmpty();
4579    }
4580
4581    /**
4582     * @param value {@link #authoredOn} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
4583     */
4584    public Task setAuthoredOnElement(DateTimeType value) { 
4585      this.authoredOn = value;
4586      return this;
4587    }
4588
4589    /**
4590     * @return The date and time this task was created.
4591     */
4592    public Date getAuthoredOn() { 
4593      return this.authoredOn == null ? null : this.authoredOn.getValue();
4594    }
4595
4596    /**
4597     * @param value The date and time this task was created.
4598     */
4599    public Task setAuthoredOn(Date value) { 
4600      if (value == null)
4601        this.authoredOn = null;
4602      else {
4603        if (this.authoredOn == null)
4604          this.authoredOn = new DateTimeType();
4605        this.authoredOn.setValue(value);
4606      }
4607      return this;
4608    }
4609
4610    /**
4611     * @return {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
4612     */
4613    public DateTimeType getLastModifiedElement() { 
4614      if (this.lastModified == null)
4615        if (Configuration.errorOnAutoCreate())
4616          throw new Error("Attempt to auto-create Task.lastModified");
4617        else if (Configuration.doAutoCreate())
4618          this.lastModified = new DateTimeType(); // bb
4619      return this.lastModified;
4620    }
4621
4622    public boolean hasLastModifiedElement() { 
4623      return this.lastModified != null && !this.lastModified.isEmpty();
4624    }
4625
4626    public boolean hasLastModified() { 
4627      return this.lastModified != null && !this.lastModified.isEmpty();
4628    }
4629
4630    /**
4631     * @param value {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
4632     */
4633    public Task setLastModifiedElement(DateTimeType value) { 
4634      this.lastModified = value;
4635      return this;
4636    }
4637
4638    /**
4639     * @return The date and time of last modification to this task.
4640     */
4641    public Date getLastModified() { 
4642      return this.lastModified == null ? null : this.lastModified.getValue();
4643    }
4644
4645    /**
4646     * @param value The date and time of last modification to this task.
4647     */
4648    public Task setLastModified(Date value) { 
4649      if (value == null)
4650        this.lastModified = null;
4651      else {
4652        if (this.lastModified == null)
4653          this.lastModified = new DateTimeType();
4654        this.lastModified.setValue(value);
4655      }
4656      return this;
4657    }
4658
4659    /**
4660     * @return {@link #requester} (The creator of the task.)
4661     */
4662    public Reference getRequester() { 
4663      if (this.requester == null)
4664        if (Configuration.errorOnAutoCreate())
4665          throw new Error("Attempt to auto-create Task.requester");
4666        else if (Configuration.doAutoCreate())
4667          this.requester = new Reference(); // cc
4668      return this.requester;
4669    }
4670
4671    public boolean hasRequester() { 
4672      return this.requester != null && !this.requester.isEmpty();
4673    }
4674
4675    /**
4676     * @param value {@link #requester} (The creator of the task.)
4677     */
4678    public Task setRequester(Reference value) { 
4679      this.requester = value;
4680      return this;
4681    }
4682
4683    /**
4684     * @return {@link #requestedPerformer} (The kind of participant or specific participant that should perform the task.)
4685     */
4686    public List<CodeableReference> getRequestedPerformer() { 
4687      if (this.requestedPerformer == null)
4688        this.requestedPerformer = new ArrayList<CodeableReference>();
4689      return this.requestedPerformer;
4690    }
4691
4692    /**
4693     * @return Returns a reference to <code>this</code> for easy method chaining
4694     */
4695    public Task setRequestedPerformer(List<CodeableReference> theRequestedPerformer) { 
4696      this.requestedPerformer = theRequestedPerformer;
4697      return this;
4698    }
4699
4700    public boolean hasRequestedPerformer() { 
4701      if (this.requestedPerformer == null)
4702        return false;
4703      for (CodeableReference item : this.requestedPerformer)
4704        if (!item.isEmpty())
4705          return true;
4706      return false;
4707    }
4708
4709    public CodeableReference addRequestedPerformer() { //3
4710      CodeableReference t = new CodeableReference();
4711      if (this.requestedPerformer == null)
4712        this.requestedPerformer = new ArrayList<CodeableReference>();
4713      this.requestedPerformer.add(t);
4714      return t;
4715    }
4716
4717    public Task addRequestedPerformer(CodeableReference t) { //3
4718      if (t == null)
4719        return this;
4720      if (this.requestedPerformer == null)
4721        this.requestedPerformer = new ArrayList<CodeableReference>();
4722      this.requestedPerformer.add(t);
4723      return this;
4724    }
4725
4726    /**
4727     * @return The first repetition of repeating field {@link #requestedPerformer}, creating it if it does not already exist {3}
4728     */
4729    public CodeableReference getRequestedPerformerFirstRep() { 
4730      if (getRequestedPerformer().isEmpty()) {
4731        addRequestedPerformer();
4732      }
4733      return getRequestedPerformer().get(0);
4734    }
4735
4736    /**
4737     * @return {@link #owner} (Party responsible for managing task execution.)
4738     */
4739    public Reference getOwner() { 
4740      if (this.owner == null)
4741        if (Configuration.errorOnAutoCreate())
4742          throw new Error("Attempt to auto-create Task.owner");
4743        else if (Configuration.doAutoCreate())
4744          this.owner = new Reference(); // cc
4745      return this.owner;
4746    }
4747
4748    public boolean hasOwner() { 
4749      return this.owner != null && !this.owner.isEmpty();
4750    }
4751
4752    /**
4753     * @param value {@link #owner} (Party responsible for managing task execution.)
4754     */
4755    public Task setOwner(Reference value) { 
4756      this.owner = value;
4757      return this;
4758    }
4759
4760    /**
4761     * @return {@link #performer} (The entity who performed the requested task.)
4762     */
4763    public List<TaskPerformerComponent> getPerformer() { 
4764      if (this.performer == null)
4765        this.performer = new ArrayList<TaskPerformerComponent>();
4766      return this.performer;
4767    }
4768
4769    /**
4770     * @return Returns a reference to <code>this</code> for easy method chaining
4771     */
4772    public Task setPerformer(List<TaskPerformerComponent> thePerformer) { 
4773      this.performer = thePerformer;
4774      return this;
4775    }
4776
4777    public boolean hasPerformer() { 
4778      if (this.performer == null)
4779        return false;
4780      for (TaskPerformerComponent item : this.performer)
4781        if (!item.isEmpty())
4782          return true;
4783      return false;
4784    }
4785
4786    public TaskPerformerComponent addPerformer() { //3
4787      TaskPerformerComponent t = new TaskPerformerComponent();
4788      if (this.performer == null)
4789        this.performer = new ArrayList<TaskPerformerComponent>();
4790      this.performer.add(t);
4791      return t;
4792    }
4793
4794    public Task addPerformer(TaskPerformerComponent t) { //3
4795      if (t == null)
4796        return this;
4797      if (this.performer == null)
4798        this.performer = new ArrayList<TaskPerformerComponent>();
4799      this.performer.add(t);
4800      return this;
4801    }
4802
4803    /**
4804     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
4805     */
4806    public TaskPerformerComponent getPerformerFirstRep() { 
4807      if (getPerformer().isEmpty()) {
4808        addPerformer();
4809      }
4810      return getPerformer().get(0);
4811    }
4812
4813    /**
4814     * @return {@link #location} (Principal physical location where this task is performed.)
4815     */
4816    public Reference getLocation() { 
4817      if (this.location == null)
4818        if (Configuration.errorOnAutoCreate())
4819          throw new Error("Attempt to auto-create Task.location");
4820        else if (Configuration.doAutoCreate())
4821          this.location = new Reference(); // cc
4822      return this.location;
4823    }
4824
4825    public boolean hasLocation() { 
4826      return this.location != null && !this.location.isEmpty();
4827    }
4828
4829    /**
4830     * @param value {@link #location} (Principal physical location where this task is performed.)
4831     */
4832    public Task setLocation(Reference value) { 
4833      this.location = value;
4834      return this;
4835    }
4836
4837    /**
4838     * @return {@link #reason} (A description, code, or reference indicating why this task needs to be performed.)
4839     */
4840    public List<CodeableReference> getReason() { 
4841      if (this.reason == null)
4842        this.reason = new ArrayList<CodeableReference>();
4843      return this.reason;
4844    }
4845
4846    /**
4847     * @return Returns a reference to <code>this</code> for easy method chaining
4848     */
4849    public Task setReason(List<CodeableReference> theReason) { 
4850      this.reason = theReason;
4851      return this;
4852    }
4853
4854    public boolean hasReason() { 
4855      if (this.reason == null)
4856        return false;
4857      for (CodeableReference item : this.reason)
4858        if (!item.isEmpty())
4859          return true;
4860      return false;
4861    }
4862
4863    public CodeableReference addReason() { //3
4864      CodeableReference t = new CodeableReference();
4865      if (this.reason == null)
4866        this.reason = new ArrayList<CodeableReference>();
4867      this.reason.add(t);
4868      return t;
4869    }
4870
4871    public Task addReason(CodeableReference t) { //3
4872      if (t == null)
4873        return this;
4874      if (this.reason == null)
4875        this.reason = new ArrayList<CodeableReference>();
4876      this.reason.add(t);
4877      return this;
4878    }
4879
4880    /**
4881     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
4882     */
4883    public CodeableReference getReasonFirstRep() { 
4884      if (getReason().isEmpty()) {
4885        addReason();
4886      }
4887      return getReason().get(0);
4888    }
4889
4890    /**
4891     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.)
4892     */
4893    public List<Reference> getInsurance() { 
4894      if (this.insurance == null)
4895        this.insurance = new ArrayList<Reference>();
4896      return this.insurance;
4897    }
4898
4899    /**
4900     * @return Returns a reference to <code>this</code> for easy method chaining
4901     */
4902    public Task setInsurance(List<Reference> theInsurance) { 
4903      this.insurance = theInsurance;
4904      return this;
4905    }
4906
4907    public boolean hasInsurance() { 
4908      if (this.insurance == null)
4909        return false;
4910      for (Reference item : this.insurance)
4911        if (!item.isEmpty())
4912          return true;
4913      return false;
4914    }
4915
4916    public Reference addInsurance() { //3
4917      Reference t = new Reference();
4918      if (this.insurance == null)
4919        this.insurance = new ArrayList<Reference>();
4920      this.insurance.add(t);
4921      return t;
4922    }
4923
4924    public Task addInsurance(Reference t) { //3
4925      if (t == null)
4926        return this;
4927      if (this.insurance == null)
4928        this.insurance = new ArrayList<Reference>();
4929      this.insurance.add(t);
4930      return this;
4931    }
4932
4933    /**
4934     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
4935     */
4936    public Reference getInsuranceFirstRep() { 
4937      if (getInsurance().isEmpty()) {
4938        addInsurance();
4939      }
4940      return getInsurance().get(0);
4941    }
4942
4943    /**
4944     * @return {@link #note} (Free-text information captured about the task as it progresses.)
4945     */
4946    public List<Annotation> getNote() { 
4947      if (this.note == null)
4948        this.note = new ArrayList<Annotation>();
4949      return this.note;
4950    }
4951
4952    /**
4953     * @return Returns a reference to <code>this</code> for easy method chaining
4954     */
4955    public Task setNote(List<Annotation> theNote) { 
4956      this.note = theNote;
4957      return this;
4958    }
4959
4960    public boolean hasNote() { 
4961      if (this.note == null)
4962        return false;
4963      for (Annotation item : this.note)
4964        if (!item.isEmpty())
4965          return true;
4966      return false;
4967    }
4968
4969    public Annotation addNote() { //3
4970      Annotation t = new Annotation();
4971      if (this.note == null)
4972        this.note = new ArrayList<Annotation>();
4973      this.note.add(t);
4974      return t;
4975    }
4976
4977    public Task addNote(Annotation t) { //3
4978      if (t == null)
4979        return this;
4980      if (this.note == null)
4981        this.note = new ArrayList<Annotation>();
4982      this.note.add(t);
4983      return this;
4984    }
4985
4986    /**
4987     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
4988     */
4989    public Annotation getNoteFirstRep() { 
4990      if (getNote().isEmpty()) {
4991        addNote();
4992      }
4993      return getNote().get(0);
4994    }
4995
4996    /**
4997     * @return {@link #relevantHistory} (Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.)
4998     */
4999    public List<Reference> getRelevantHistory() { 
5000      if (this.relevantHistory == null)
5001        this.relevantHistory = new ArrayList<Reference>();
5002      return this.relevantHistory;
5003    }
5004
5005    /**
5006     * @return Returns a reference to <code>this</code> for easy method chaining
5007     */
5008    public Task setRelevantHistory(List<Reference> theRelevantHistory) { 
5009      this.relevantHistory = theRelevantHistory;
5010      return this;
5011    }
5012
5013    public boolean hasRelevantHistory() { 
5014      if (this.relevantHistory == null)
5015        return false;
5016      for (Reference item : this.relevantHistory)
5017        if (!item.isEmpty())
5018          return true;
5019      return false;
5020    }
5021
5022    public Reference addRelevantHistory() { //3
5023      Reference t = new Reference();
5024      if (this.relevantHistory == null)
5025        this.relevantHistory = new ArrayList<Reference>();
5026      this.relevantHistory.add(t);
5027      return t;
5028    }
5029
5030    public Task addRelevantHistory(Reference t) { //3
5031      if (t == null)
5032        return this;
5033      if (this.relevantHistory == null)
5034        this.relevantHistory = new ArrayList<Reference>();
5035      this.relevantHistory.add(t);
5036      return this;
5037    }
5038
5039    /**
5040     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist {3}
5041     */
5042    public Reference getRelevantHistoryFirstRep() { 
5043      if (getRelevantHistory().isEmpty()) {
5044        addRelevantHistory();
5045      }
5046      return getRelevantHistory().get(0);
5047    }
5048
5049    /**
5050     * @return {@link #restriction} (If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.)
5051     */
5052    public TaskRestrictionComponent getRestriction() { 
5053      if (this.restriction == null)
5054        if (Configuration.errorOnAutoCreate())
5055          throw new Error("Attempt to auto-create Task.restriction");
5056        else if (Configuration.doAutoCreate())
5057          this.restriction = new TaskRestrictionComponent(); // cc
5058      return this.restriction;
5059    }
5060
5061    public boolean hasRestriction() { 
5062      return this.restriction != null && !this.restriction.isEmpty();
5063    }
5064
5065    /**
5066     * @param value {@link #restriction} (If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.)
5067     */
5068    public Task setRestriction(TaskRestrictionComponent value) { 
5069      this.restriction = value;
5070      return this;
5071    }
5072
5073    /**
5074     * @return {@link #input} (Additional information that may be needed in the execution of the task.)
5075     */
5076    public List<TaskInputComponent> getInput() { 
5077      if (this.input == null)
5078        this.input = new ArrayList<TaskInputComponent>();
5079      return this.input;
5080    }
5081
5082    /**
5083     * @return Returns a reference to <code>this</code> for easy method chaining
5084     */
5085    public Task setInput(List<TaskInputComponent> theInput) { 
5086      this.input = theInput;
5087      return this;
5088    }
5089
5090    public boolean hasInput() { 
5091      if (this.input == null)
5092        return false;
5093      for (TaskInputComponent item : this.input)
5094        if (!item.isEmpty())
5095          return true;
5096      return false;
5097    }
5098
5099    public TaskInputComponent addInput() { //3
5100      TaskInputComponent t = new TaskInputComponent();
5101      if (this.input == null)
5102        this.input = new ArrayList<TaskInputComponent>();
5103      this.input.add(t);
5104      return t;
5105    }
5106
5107    public Task addInput(TaskInputComponent t) { //3
5108      if (t == null)
5109        return this;
5110      if (this.input == null)
5111        this.input = new ArrayList<TaskInputComponent>();
5112      this.input.add(t);
5113      return this;
5114    }
5115
5116    /**
5117     * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist {3}
5118     */
5119    public TaskInputComponent getInputFirstRep() { 
5120      if (getInput().isEmpty()) {
5121        addInput();
5122      }
5123      return getInput().get(0);
5124    }
5125
5126    /**
5127     * @return {@link #output} (Outputs produced by the Task.)
5128     */
5129    public List<TaskOutputComponent> getOutput() { 
5130      if (this.output == null)
5131        this.output = new ArrayList<TaskOutputComponent>();
5132      return this.output;
5133    }
5134
5135    /**
5136     * @return Returns a reference to <code>this</code> for easy method chaining
5137     */
5138    public Task setOutput(List<TaskOutputComponent> theOutput) { 
5139      this.output = theOutput;
5140      return this;
5141    }
5142
5143    public boolean hasOutput() { 
5144      if (this.output == null)
5145        return false;
5146      for (TaskOutputComponent item : this.output)
5147        if (!item.isEmpty())
5148          return true;
5149      return false;
5150    }
5151
5152    public TaskOutputComponent addOutput() { //3
5153      TaskOutputComponent t = new TaskOutputComponent();
5154      if (this.output == null)
5155        this.output = new ArrayList<TaskOutputComponent>();
5156      this.output.add(t);
5157      return t;
5158    }
5159
5160    public Task addOutput(TaskOutputComponent t) { //3
5161      if (t == null)
5162        return this;
5163      if (this.output == null)
5164        this.output = new ArrayList<TaskOutputComponent>();
5165      this.output.add(t);
5166      return this;
5167    }
5168
5169    /**
5170     * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist {3}
5171     */
5172    public TaskOutputComponent getOutputFirstRep() { 
5173      if (getOutput().isEmpty()) {
5174        addOutput();
5175      }
5176      return getOutput().get(0);
5177    }
5178
5179      protected void listChildren(List<Property> children) {
5180        super.listChildren(children);
5181        children.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier));
5182        children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition)", "The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", 0, 1, instantiatesCanonical));
5183        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", 0, 1, instantiatesUri));
5184        children.add(new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a \"request\" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn));
5185        children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.", 0, 1, groupIdentifier));
5186        children.add(new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf));
5187        children.add(new Property("status", "code", "The current status of the task.", 0, 1, status));
5188        children.add(new Property("statusReason", "CodeableReference", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason));
5189        children.add(new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus));
5190        children.add(new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", 0, 1, intent));
5191        children.add(new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority));
5192        children.add(new Property("doNotPerform", "boolean", "If true indicates that the Task is asking for the specified action to *not* occur.", 0, 1, doNotPerform));
5193        children.add(new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code));
5194        children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description));
5195        children.add(new Property("focus", "Reference(Any)", "The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.", 0, 1, focus));
5196        children.add(new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 1, for_));
5197        children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.", 0, 1, encounter));
5198        children.add(new Property("requestedPeriod", "Period", "Indicates the start and/or end of the period of time when completion of the task is desired to take place.", 0, 1, requestedPeriod));
5199        children.add(new Property("executionPeriod", "Period", "Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).", 0, 1, executionPeriod));
5200        children.add(new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn));
5201        children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified));
5202        children.add(new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester));
5203        children.add(new Property("requestedPerformer", "CodeableReference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "The kind of participant or specific participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, requestedPerformer));
5204        children.add(new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Party responsible for managing task execution.", 0, 1, owner));
5205        children.add(new Property("performer", "", "The entity who performed the requested task.", 0, java.lang.Integer.MAX_VALUE, performer));
5206        children.add(new Property("location", "Reference(Location)", "Principal physical location where this task is performed.", 0, 1, location));
5207        children.add(new Property("reason", "CodeableReference", "A description, code, or reference indicating why this task needs to be performed.", 0, java.lang.Integer.MAX_VALUE, reason));
5208        children.add(new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.", 0, java.lang.Integer.MAX_VALUE, insurance));
5209        children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note));
5210        children.add(new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.", 0, java.lang.Integer.MAX_VALUE, relevantHistory));
5211        children.add(new Property("restriction", "", "If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction));
5212        children.add(new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input));
5213        children.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output));
5214      }
5215
5216      @Override
5217      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5218        switch (_hash) {
5219        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier);
5220        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(ActivityDefinition)", "The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", 0, 1, instantiatesCanonical);
5221        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.", 0, 1, instantiatesUri);
5222        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a \"request\" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn);
5223        case -445338488: /*groupIdentifier*/  return new Property("groupIdentifier", "Identifier", "A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.", 0, 1, groupIdentifier);
5224        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf);
5225        case -892481550: /*status*/  return new Property("status", "code", "The current status of the task.", 0, 1, status);
5226        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableReference", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason);
5227        case 2008591314: /*businessStatus*/  return new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus);
5228        case -1183762788: /*intent*/  return new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", 0, 1, intent);
5229        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority);
5230        case -1788508167: /*doNotPerform*/  return new Property("doNotPerform", "boolean", "If true indicates that the Task is asking for the specified action to *not* occur.", 0, 1, doNotPerform);
5231        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code);
5232        case -1724546052: /*description*/  return new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description);
5233        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.", 0, 1, focus);
5234        case 101577: /*for*/  return new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, 1, for_);
5235        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.", 0, 1, encounter);
5236        case -897241393: /*requestedPeriod*/  return new Property("requestedPeriod", "Period", "Indicates the start and/or end of the period of time when completion of the task is desired to take place.", 0, 1, requestedPeriod);
5237        case 1218624249: /*executionPeriod*/  return new Property("executionPeriod", "Period", "Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).", 0, 1, executionPeriod);
5238        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn);
5239        case 1959003007: /*lastModified*/  return new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified);
5240        case 693933948: /*requester*/  return new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester);
5241        case 2072749056: /*requestedPerformer*/  return new Property("requestedPerformer", "CodeableReference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "The kind of participant or specific participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, requestedPerformer);
5242        case 106164915: /*owner*/  return new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Party responsible for managing task execution.", 0, 1, owner);
5243        case 481140686: /*performer*/  return new Property("performer", "", "The entity who performed the requested task.", 0, java.lang.Integer.MAX_VALUE, performer);
5244        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "Principal physical location where this task is performed.", 0, 1, location);
5245        case -934964668: /*reason*/  return new Property("reason", "CodeableReference", "A description, code, or reference indicating why this task needs to be performed.", 0, java.lang.Integer.MAX_VALUE, reason);
5246        case 73049818: /*insurance*/  return new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.", 0, java.lang.Integer.MAX_VALUE, insurance);
5247        case 3387378: /*note*/  return new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note);
5248        case 1538891575: /*relevantHistory*/  return new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.", 0, java.lang.Integer.MAX_VALUE, relevantHistory);
5249        case -1561062452: /*restriction*/  return new Property("restriction", "", "If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction);
5250        case 100358090: /*input*/  return new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input);
5251        case -1005512447: /*output*/  return new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output);
5252        default: return super.getNamedProperty(_hash, _name, _checkValid);
5253        }
5254
5255      }
5256
5257      @Override
5258      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5259        switch (hash) {
5260        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
5261        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // CanonicalType
5262        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType
5263        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
5264        case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier
5265        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
5266        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<TaskStatus>
5267        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableReference
5268        case 2008591314: /*businessStatus*/ return this.businessStatus == null ? new Base[0] : new Base[] {this.businessStatus}; // CodeableConcept
5269        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<TaskIntent>
5270        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
5271        case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType
5272        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
5273        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
5274        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference
5275        case 101577: /*for*/ return this.for_ == null ? new Base[0] : new Base[] {this.for_}; // Reference
5276        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
5277        case -897241393: /*requestedPeriod*/ return this.requestedPeriod == null ? new Base[0] : new Base[] {this.requestedPeriod}; // Period
5278        case 1218624249: /*executionPeriod*/ return this.executionPeriod == null ? new Base[0] : new Base[] {this.executionPeriod}; // Period
5279        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
5280        case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // DateTimeType
5281        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
5282        case 2072749056: /*requestedPerformer*/ return this.requestedPerformer == null ? new Base[0] : this.requestedPerformer.toArray(new Base[this.requestedPerformer.size()]); // CodeableReference
5283        case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
5284        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // TaskPerformerComponent
5285        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
5286        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
5287        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // Reference
5288        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
5289        case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference
5290        case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TaskRestrictionComponent
5291        case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // TaskInputComponent
5292        case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TaskOutputComponent
5293        default: return super.getProperty(hash, name, checkValid);
5294        }
5295
5296      }
5297
5298      @Override
5299      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5300        switch (hash) {
5301        case -1618432855: // identifier
5302          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
5303          return value;
5304        case 8911915: // instantiatesCanonical
5305          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
5306          return value;
5307        case -1926393373: // instantiatesUri
5308          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
5309          return value;
5310        case -332612366: // basedOn
5311          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
5312          return value;
5313        case -445338488: // groupIdentifier
5314          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
5315          return value;
5316        case -995410646: // partOf
5317          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
5318          return value;
5319        case -892481550: // status
5320          value = new TaskStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5321          this.status = (Enumeration) value; // Enumeration<TaskStatus>
5322          return value;
5323        case 2051346646: // statusReason
5324          this.statusReason = TypeConvertor.castToCodeableReference(value); // CodeableReference
5325          return value;
5326        case 2008591314: // businessStatus
5327          this.businessStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5328          return value;
5329        case -1183762788: // intent
5330          value = new TaskIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
5331          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
5332          return value;
5333        case -1165461084: // priority
5334          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
5335          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5336          return value;
5337        case -1788508167: // doNotPerform
5338          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
5339          return value;
5340        case 3059181: // code
5341          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5342          return value;
5343        case -1724546052: // description
5344          this.description = TypeConvertor.castToString(value); // StringType
5345          return value;
5346        case 97604824: // focus
5347          this.focus = TypeConvertor.castToReference(value); // Reference
5348          return value;
5349        case 101577: // for
5350          this.for_ = TypeConvertor.castToReference(value); // Reference
5351          return value;
5352        case 1524132147: // encounter
5353          this.encounter = TypeConvertor.castToReference(value); // Reference
5354          return value;
5355        case -897241393: // requestedPeriod
5356          this.requestedPeriod = TypeConvertor.castToPeriod(value); // Period
5357          return value;
5358        case 1218624249: // executionPeriod
5359          this.executionPeriod = TypeConvertor.castToPeriod(value); // Period
5360          return value;
5361        case -1500852503: // authoredOn
5362          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
5363          return value;
5364        case 1959003007: // lastModified
5365          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
5366          return value;
5367        case 693933948: // requester
5368          this.requester = TypeConvertor.castToReference(value); // Reference
5369          return value;
5370        case 2072749056: // requestedPerformer
5371          this.getRequestedPerformer().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
5372          return value;
5373        case 106164915: // owner
5374          this.owner = TypeConvertor.castToReference(value); // Reference
5375          return value;
5376        case 481140686: // performer
5377          this.getPerformer().add((TaskPerformerComponent) value); // TaskPerformerComponent
5378          return value;
5379        case 1901043637: // location
5380          this.location = TypeConvertor.castToReference(value); // Reference
5381          return value;
5382        case -934964668: // reason
5383          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
5384          return value;
5385        case 73049818: // insurance
5386          this.getInsurance().add(TypeConvertor.castToReference(value)); // Reference
5387          return value;
5388        case 3387378: // note
5389          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
5390          return value;
5391        case 1538891575: // relevantHistory
5392          this.getRelevantHistory().add(TypeConvertor.castToReference(value)); // Reference
5393          return value;
5394        case -1561062452: // restriction
5395          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
5396          return value;
5397        case 100358090: // input
5398          this.getInput().add((TaskInputComponent) value); // TaskInputComponent
5399          return value;
5400        case -1005512447: // output
5401          this.getOutput().add((TaskOutputComponent) value); // TaskOutputComponent
5402          return value;
5403        default: return super.setProperty(hash, name, value);
5404        }
5405
5406      }
5407
5408      @Override
5409      public Base setProperty(String name, Base value) throws FHIRException {
5410        if (name.equals("identifier")) {
5411          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
5412        } else if (name.equals("instantiatesCanonical")) {
5413          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
5414        } else if (name.equals("instantiatesUri")) {
5415          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
5416        } else if (name.equals("basedOn")) {
5417          this.getBasedOn().add(TypeConvertor.castToReference(value));
5418        } else if (name.equals("groupIdentifier")) {
5419          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
5420        } else if (name.equals("partOf")) {
5421          this.getPartOf().add(TypeConvertor.castToReference(value));
5422        } else if (name.equals("status")) {
5423          value = new TaskStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5424          this.status = (Enumeration) value; // Enumeration<TaskStatus>
5425        } else if (name.equals("statusReason")) {
5426          this.statusReason = TypeConvertor.castToCodeableReference(value); // CodeableReference
5427        } else if (name.equals("businessStatus")) {
5428          this.businessStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5429        } else if (name.equals("intent")) {
5430          value = new TaskIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
5431          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
5432        } else if (name.equals("priority")) {
5433          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
5434          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5435        } else if (name.equals("doNotPerform")) {
5436          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
5437        } else if (name.equals("code")) {
5438          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5439        } else if (name.equals("description")) {
5440          this.description = TypeConvertor.castToString(value); // StringType
5441        } else if (name.equals("focus")) {
5442          this.focus = TypeConvertor.castToReference(value); // Reference
5443        } else if (name.equals("for")) {
5444          this.for_ = TypeConvertor.castToReference(value); // Reference
5445        } else if (name.equals("encounter")) {
5446          this.encounter = TypeConvertor.castToReference(value); // Reference
5447        } else if (name.equals("requestedPeriod")) {
5448          this.requestedPeriod = TypeConvertor.castToPeriod(value); // Period
5449        } else if (name.equals("executionPeriod")) {
5450          this.executionPeriod = TypeConvertor.castToPeriod(value); // Period
5451        } else if (name.equals("authoredOn")) {
5452          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
5453        } else if (name.equals("lastModified")) {
5454          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
5455        } else if (name.equals("requester")) {
5456          this.requester = TypeConvertor.castToReference(value); // Reference
5457        } else if (name.equals("requestedPerformer")) {
5458          this.getRequestedPerformer().add(TypeConvertor.castToCodeableReference(value));
5459        } else if (name.equals("owner")) {
5460          this.owner = TypeConvertor.castToReference(value); // Reference
5461        } else if (name.equals("performer")) {
5462          this.getPerformer().add((TaskPerformerComponent) value);
5463        } else if (name.equals("location")) {
5464          this.location = TypeConvertor.castToReference(value); // Reference
5465        } else if (name.equals("reason")) {
5466          this.getReason().add(TypeConvertor.castToCodeableReference(value));
5467        } else if (name.equals("insurance")) {
5468          this.getInsurance().add(TypeConvertor.castToReference(value));
5469        } else if (name.equals("note")) {
5470          this.getNote().add(TypeConvertor.castToAnnotation(value));
5471        } else if (name.equals("relevantHistory")) {
5472          this.getRelevantHistory().add(TypeConvertor.castToReference(value));
5473        } else if (name.equals("restriction")) {
5474          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
5475        } else if (name.equals("input")) {
5476          this.getInput().add((TaskInputComponent) value);
5477        } else if (name.equals("output")) {
5478          this.getOutput().add((TaskOutputComponent) value);
5479        } else
5480          return super.setProperty(name, value);
5481        return value;
5482      }
5483
5484      @Override
5485      public Base makeProperty(int hash, String name) throws FHIRException {
5486        switch (hash) {
5487        case -1618432855:  return addIdentifier(); 
5488        case 8911915:  return getInstantiatesCanonicalElement();
5489        case -1926393373:  return getInstantiatesUriElement();
5490        case -332612366:  return addBasedOn(); 
5491        case -445338488:  return getGroupIdentifier();
5492        case -995410646:  return addPartOf(); 
5493        case -892481550:  return getStatusElement();
5494        case 2051346646:  return getStatusReason();
5495        case 2008591314:  return getBusinessStatus();
5496        case -1183762788:  return getIntentElement();
5497        case -1165461084:  return getPriorityElement();
5498        case -1788508167:  return getDoNotPerformElement();
5499        case 3059181:  return getCode();
5500        case -1724546052:  return getDescriptionElement();
5501        case 97604824:  return getFocus();
5502        case 101577:  return getFor();
5503        case 1524132147:  return getEncounter();
5504        case -897241393:  return getRequestedPeriod();
5505        case 1218624249:  return getExecutionPeriod();
5506        case -1500852503:  return getAuthoredOnElement();
5507        case 1959003007:  return getLastModifiedElement();
5508        case 693933948:  return getRequester();
5509        case 2072749056:  return addRequestedPerformer(); 
5510        case 106164915:  return getOwner();
5511        case 481140686:  return addPerformer(); 
5512        case 1901043637:  return getLocation();
5513        case -934964668:  return addReason(); 
5514        case 73049818:  return addInsurance(); 
5515        case 3387378:  return addNote(); 
5516        case 1538891575:  return addRelevantHistory(); 
5517        case -1561062452:  return getRestriction();
5518        case 100358090:  return addInput(); 
5519        case -1005512447:  return addOutput(); 
5520        default: return super.makeProperty(hash, name);
5521        }
5522
5523      }
5524
5525      @Override
5526      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5527        switch (hash) {
5528        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5529        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
5530        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
5531        case -332612366: /*basedOn*/ return new String[] {"Reference"};
5532        case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"};
5533        case -995410646: /*partOf*/ return new String[] {"Reference"};
5534        case -892481550: /*status*/ return new String[] {"code"};
5535        case 2051346646: /*statusReason*/ return new String[] {"CodeableReference"};
5536        case 2008591314: /*businessStatus*/ return new String[] {"CodeableConcept"};
5537        case -1183762788: /*intent*/ return new String[] {"code"};
5538        case -1165461084: /*priority*/ return new String[] {"code"};
5539        case -1788508167: /*doNotPerform*/ return new String[] {"boolean"};
5540        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
5541        case -1724546052: /*description*/ return new String[] {"string"};
5542        case 97604824: /*focus*/ return new String[] {"Reference"};
5543        case 101577: /*for*/ return new String[] {"Reference"};
5544        case 1524132147: /*encounter*/ return new String[] {"Reference"};
5545        case -897241393: /*requestedPeriod*/ return new String[] {"Period"};
5546        case 1218624249: /*executionPeriod*/ return new String[] {"Period"};
5547        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
5548        case 1959003007: /*lastModified*/ return new String[] {"dateTime"};
5549        case 693933948: /*requester*/ return new String[] {"Reference"};
5550        case 2072749056: /*requestedPerformer*/ return new String[] {"CodeableReference"};
5551        case 106164915: /*owner*/ return new String[] {"Reference"};
5552        case 481140686: /*performer*/ return new String[] {};
5553        case 1901043637: /*location*/ return new String[] {"Reference"};
5554        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
5555        case 73049818: /*insurance*/ return new String[] {"Reference"};
5556        case 3387378: /*note*/ return new String[] {"Annotation"};
5557        case 1538891575: /*relevantHistory*/ return new String[] {"Reference"};
5558        case -1561062452: /*restriction*/ return new String[] {};
5559        case 100358090: /*input*/ return new String[] {};
5560        case -1005512447: /*output*/ return new String[] {};
5561        default: return super.getTypesForProperty(hash, name);
5562        }
5563
5564      }
5565
5566      @Override
5567      public Base addChild(String name) throws FHIRException {
5568        if (name.equals("identifier")) {
5569          return addIdentifier();
5570        }
5571        else if (name.equals("instantiatesCanonical")) {
5572          throw new FHIRException("Cannot call addChild on a singleton property Task.instantiatesCanonical");
5573        }
5574        else if (name.equals("instantiatesUri")) {
5575          throw new FHIRException("Cannot call addChild on a singleton property Task.instantiatesUri");
5576        }
5577        else if (name.equals("basedOn")) {
5578          return addBasedOn();
5579        }
5580        else if (name.equals("groupIdentifier")) {
5581          this.groupIdentifier = new Identifier();
5582          return this.groupIdentifier;
5583        }
5584        else if (name.equals("partOf")) {
5585          return addPartOf();
5586        }
5587        else if (name.equals("status")) {
5588          throw new FHIRException("Cannot call addChild on a singleton property Task.status");
5589        }
5590        else if (name.equals("statusReason")) {
5591          this.statusReason = new CodeableReference();
5592          return this.statusReason;
5593        }
5594        else if (name.equals("businessStatus")) {
5595          this.businessStatus = new CodeableConcept();
5596          return this.businessStatus;
5597        }
5598        else if (name.equals("intent")) {
5599          throw new FHIRException("Cannot call addChild on a singleton property Task.intent");
5600        }
5601        else if (name.equals("priority")) {
5602          throw new FHIRException("Cannot call addChild on a singleton property Task.priority");
5603        }
5604        else if (name.equals("doNotPerform")) {
5605          throw new FHIRException("Cannot call addChild on a singleton property Task.doNotPerform");
5606        }
5607        else if (name.equals("code")) {
5608          this.code = new CodeableConcept();
5609          return this.code;
5610        }
5611        else if (name.equals("description")) {
5612          throw new FHIRException("Cannot call addChild on a singleton property Task.description");
5613        }
5614        else if (name.equals("focus")) {
5615          this.focus = new Reference();
5616          return this.focus;
5617        }
5618        else if (name.equals("for")) {
5619          this.for_ = new Reference();
5620          return this.for_;
5621        }
5622        else if (name.equals("encounter")) {
5623          this.encounter = new Reference();
5624          return this.encounter;
5625        }
5626        else if (name.equals("requestedPeriod")) {
5627          this.requestedPeriod = new Period();
5628          return this.requestedPeriod;
5629        }
5630        else if (name.equals("executionPeriod")) {
5631          this.executionPeriod = new Period();
5632          return this.executionPeriod;
5633        }
5634        else if (name.equals("authoredOn")) {
5635          throw new FHIRException("Cannot call addChild on a singleton property Task.authoredOn");
5636        }
5637        else if (name.equals("lastModified")) {
5638          throw new FHIRException("Cannot call addChild on a singleton property Task.lastModified");
5639        }
5640        else if (name.equals("requester")) {
5641          this.requester = new Reference();
5642          return this.requester;
5643        }
5644        else if (name.equals("requestedPerformer")) {
5645          return addRequestedPerformer();
5646        }
5647        else if (name.equals("owner")) {
5648          this.owner = new Reference();
5649          return this.owner;
5650        }
5651        else if (name.equals("performer")) {
5652          return addPerformer();
5653        }
5654        else if (name.equals("location")) {
5655          this.location = new Reference();
5656          return this.location;
5657        }
5658        else if (name.equals("reason")) {
5659          return addReason();
5660        }
5661        else if (name.equals("insurance")) {
5662          return addInsurance();
5663        }
5664        else if (name.equals("note")) {
5665          return addNote();
5666        }
5667        else if (name.equals("relevantHistory")) {
5668          return addRelevantHistory();
5669        }
5670        else if (name.equals("restriction")) {
5671          this.restriction = new TaskRestrictionComponent();
5672          return this.restriction;
5673        }
5674        else if (name.equals("input")) {
5675          return addInput();
5676        }
5677        else if (name.equals("output")) {
5678          return addOutput();
5679        }
5680        else
5681          return super.addChild(name);
5682      }
5683
5684  public String fhirType() {
5685    return "Task";
5686
5687  }
5688
5689      public Task copy() {
5690        Task dst = new Task();
5691        copyValues(dst);
5692        return dst;
5693      }
5694
5695      public void copyValues(Task dst) {
5696        super.copyValues(dst);
5697        if (identifier != null) {
5698          dst.identifier = new ArrayList<Identifier>();
5699          for (Identifier i : identifier)
5700            dst.identifier.add(i.copy());
5701        };
5702        dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy();
5703        dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy();
5704        if (basedOn != null) {
5705          dst.basedOn = new ArrayList<Reference>();
5706          for (Reference i : basedOn)
5707            dst.basedOn.add(i.copy());
5708        };
5709        dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy();
5710        if (partOf != null) {
5711          dst.partOf = new ArrayList<Reference>();
5712          for (Reference i : partOf)
5713            dst.partOf.add(i.copy());
5714        };
5715        dst.status = status == null ? null : status.copy();
5716        dst.statusReason = statusReason == null ? null : statusReason.copy();
5717        dst.businessStatus = businessStatus == null ? null : businessStatus.copy();
5718        dst.intent = intent == null ? null : intent.copy();
5719        dst.priority = priority == null ? null : priority.copy();
5720        dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy();
5721        dst.code = code == null ? null : code.copy();
5722        dst.description = description == null ? null : description.copy();
5723        dst.focus = focus == null ? null : focus.copy();
5724        dst.for_ = for_ == null ? null : for_.copy();
5725        dst.encounter = encounter == null ? null : encounter.copy();
5726        dst.requestedPeriod = requestedPeriod == null ? null : requestedPeriod.copy();
5727        dst.executionPeriod = executionPeriod == null ? null : executionPeriod.copy();
5728        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
5729        dst.lastModified = lastModified == null ? null : lastModified.copy();
5730        dst.requester = requester == null ? null : requester.copy();
5731        if (requestedPerformer != null) {
5732          dst.requestedPerformer = new ArrayList<CodeableReference>();
5733          for (CodeableReference i : requestedPerformer)
5734            dst.requestedPerformer.add(i.copy());
5735        };
5736        dst.owner = owner == null ? null : owner.copy();
5737        if (performer != null) {
5738          dst.performer = new ArrayList<TaskPerformerComponent>();
5739          for (TaskPerformerComponent i : performer)
5740            dst.performer.add(i.copy());
5741        };
5742        dst.location = location == null ? null : location.copy();
5743        if (reason != null) {
5744          dst.reason = new ArrayList<CodeableReference>();
5745          for (CodeableReference i : reason)
5746            dst.reason.add(i.copy());
5747        };
5748        if (insurance != null) {
5749          dst.insurance = new ArrayList<Reference>();
5750          for (Reference i : insurance)
5751            dst.insurance.add(i.copy());
5752        };
5753        if (note != null) {
5754          dst.note = new ArrayList<Annotation>();
5755          for (Annotation i : note)
5756            dst.note.add(i.copy());
5757        };
5758        if (relevantHistory != null) {
5759          dst.relevantHistory = new ArrayList<Reference>();
5760          for (Reference i : relevantHistory)
5761            dst.relevantHistory.add(i.copy());
5762        };
5763        dst.restriction = restriction == null ? null : restriction.copy();
5764        if (input != null) {
5765          dst.input = new ArrayList<TaskInputComponent>();
5766          for (TaskInputComponent i : input)
5767            dst.input.add(i.copy());
5768        };
5769        if (output != null) {
5770          dst.output = new ArrayList<TaskOutputComponent>();
5771          for (TaskOutputComponent i : output)
5772            dst.output.add(i.copy());
5773        };
5774      }
5775
5776      protected Task typedCopy() {
5777        return copy();
5778      }
5779
5780      @Override
5781      public boolean equalsDeep(Base other_) {
5782        if (!super.equalsDeep(other_))
5783          return false;
5784        if (!(other_ instanceof Task))
5785          return false;
5786        Task o = (Task) other_;
5787        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
5788           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
5789           && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(partOf, o.partOf, true)
5790           && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(businessStatus, o.businessStatus, true)
5791           && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) && compareDeep(doNotPerform, o.doNotPerform, true)
5792           && compareDeep(code, o.code, true) && compareDeep(description, o.description, true) && compareDeep(focus, o.focus, true)
5793           && compareDeep(for_, o.for_, true) && compareDeep(encounter, o.encounter, true) && compareDeep(requestedPeriod, o.requestedPeriod, true)
5794           && compareDeep(executionPeriod, o.executionPeriod, true) && compareDeep(authoredOn, o.authoredOn, true)
5795           && compareDeep(lastModified, o.lastModified, true) && compareDeep(requester, o.requester, true)
5796           && compareDeep(requestedPerformer, o.requestedPerformer, true) && compareDeep(owner, o.owner, true)
5797           && compareDeep(performer, o.performer, true) && compareDeep(location, o.location, true) && compareDeep(reason, o.reason, true)
5798           && compareDeep(insurance, o.insurance, true) && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true)
5799           && compareDeep(restriction, o.restriction, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true)
5800          ;
5801      }
5802
5803      @Override
5804      public boolean equalsShallow(Base other_) {
5805        if (!super.equalsShallow(other_))
5806          return false;
5807        if (!(other_ instanceof Task))
5808          return false;
5809        Task o = (Task) other_;
5810        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
5811           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true)
5812           && compareValues(doNotPerform, o.doNotPerform, true) && compareValues(description, o.description, true)
5813           && compareValues(authoredOn, o.authoredOn, true) && compareValues(lastModified, o.lastModified, true)
5814          ;
5815      }
5816
5817      public boolean isEmpty() {
5818        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
5819          , instantiatesUri, basedOn, groupIdentifier, partOf, status, statusReason, businessStatus
5820          , intent, priority, doNotPerform, code, description, focus, for_, encounter
5821          , requestedPeriod, executionPeriod, authoredOn, lastModified, requester, requestedPerformer
5822          , owner, performer, location, reason, insurance, note, relevantHistory, restriction
5823          , input, output);
5824      }
5825
5826  @Override
5827  public ResourceType getResourceType() {
5828    return ResourceType.Task;
5829   }
5830
5831 /**
5832   * Search parameter: <b>actor</b>
5833   * <p>
5834   * Description: <b>Search by specific performer.</b><br>
5835   * Type: <b>reference</b><br>
5836   * Path: <b>Task.performer.actor</b><br>
5837   * </p>
5838   */
5839  @SearchParamDefinition(name="actor", path="Task.performer.actor", description="Search by specific performer.", type="reference", target={CareTeam.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
5840  public static final String SP_ACTOR = "actor";
5841 /**
5842   * <b>Fluent Client</b> search parameter constant for <b>actor</b>
5843   * <p>
5844   * Description: <b>Search by specific performer.</b><br>
5845   * Type: <b>reference</b><br>
5846   * Path: <b>Task.performer.actor</b><br>
5847   * </p>
5848   */
5849  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR);
5850
5851/**
5852   * Constant for fluent queries to be used to add include statements. Specifies
5853   * the path value of "<b>Task:actor</b>".
5854   */
5855  public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("Task:actor").toLocked();
5856
5857 /**
5858   * Search parameter: <b>authored-on</b>
5859   * <p>
5860   * Description: <b>Search by creation date</b><br>
5861   * Type: <b>date</b><br>
5862   * Path: <b>Task.authoredOn</b><br>
5863   * </p>
5864   */
5865  @SearchParamDefinition(name="authored-on", path="Task.authoredOn", description="Search by creation date", type="date" )
5866  public static final String SP_AUTHORED_ON = "authored-on";
5867 /**
5868   * <b>Fluent Client</b> search parameter constant for <b>authored-on</b>
5869   * <p>
5870   * Description: <b>Search by creation date</b><br>
5871   * Type: <b>date</b><br>
5872   * Path: <b>Task.authoredOn</b><br>
5873   * </p>
5874   */
5875  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED_ON = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED_ON);
5876
5877 /**
5878   * Search parameter: <b>based-on</b>
5879   * <p>
5880   * Description: <b>Search by requests this task is based on</b><br>
5881   * Type: <b>reference</b><br>
5882   * Path: <b>Task.basedOn</b><br>
5883   * </p>
5884   */
5885  @SearchParamDefinition(name="based-on", path="Task.basedOn", description="Search by requests this task is based on", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.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, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.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, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.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, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5886  public static final String SP_BASED_ON = "based-on";
5887 /**
5888   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
5889   * <p>
5890   * Description: <b>Search by requests this task is based on</b><br>
5891   * Type: <b>reference</b><br>
5892   * Path: <b>Task.basedOn</b><br>
5893   * </p>
5894   */
5895  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
5896
5897/**
5898   * Constant for fluent queries to be used to add include statements. Specifies
5899   * the path value of "<b>Task:based-on</b>".
5900   */
5901  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Task:based-on").toLocked();
5902
5903 /**
5904   * Search parameter: <b>business-status</b>
5905   * <p>
5906   * Description: <b>Search by business status</b><br>
5907   * Type: <b>token</b><br>
5908   * Path: <b>Task.businessStatus</b><br>
5909   * </p>
5910   */
5911  @SearchParamDefinition(name="business-status", path="Task.businessStatus", description="Search by business status", type="token" )
5912  public static final String SP_BUSINESS_STATUS = "business-status";
5913 /**
5914   * <b>Fluent Client</b> search parameter constant for <b>business-status</b>
5915   * <p>
5916   * Description: <b>Search by business status</b><br>
5917   * Type: <b>token</b><br>
5918   * Path: <b>Task.businessStatus</b><br>
5919   * </p>
5920   */
5921  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BUSINESS_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BUSINESS_STATUS);
5922
5923 /**
5924   * Search parameter: <b>focus</b>
5925   * <p>
5926   * Description: <b>Search by task focus</b><br>
5927   * Type: <b>reference</b><br>
5928   * Path: <b>Task.focus</b><br>
5929   * </p>
5930   */
5931  @SearchParamDefinition(name="focus", path="Task.focus", description="Search by task focus", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.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, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.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, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.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, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5932  public static final String SP_FOCUS = "focus";
5933 /**
5934   * <b>Fluent Client</b> search parameter constant for <b>focus</b>
5935   * <p>
5936   * Description: <b>Search by task focus</b><br>
5937   * Type: <b>reference</b><br>
5938   * Path: <b>Task.focus</b><br>
5939   * </p>
5940   */
5941  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS);
5942
5943/**
5944   * Constant for fluent queries to be used to add include statements. Specifies
5945   * the path value of "<b>Task:focus</b>".
5946   */
5947  public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Task:focus").toLocked();
5948
5949 /**
5950   * Search parameter: <b>group-identifier</b>
5951   * <p>
5952   * Description: <b>Search by group identifier</b><br>
5953   * Type: <b>token</b><br>
5954   * Path: <b>Task.groupIdentifier</b><br>
5955   * </p>
5956   */
5957  @SearchParamDefinition(name="group-identifier", path="Task.groupIdentifier", description="Search by group identifier", type="token" )
5958  public static final String SP_GROUP_IDENTIFIER = "group-identifier";
5959 /**
5960   * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b>
5961   * <p>
5962   * Description: <b>Search by group identifier</b><br>
5963   * Type: <b>token</b><br>
5964   * Path: <b>Task.groupIdentifier</b><br>
5965   * </p>
5966   */
5967  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER);
5968
5969 /**
5970   * Search parameter: <b>intent</b>
5971   * <p>
5972   * Description: <b>Search by task intent</b><br>
5973   * Type: <b>token</b><br>
5974   * Path: <b>Task.intent</b><br>
5975   * </p>
5976   */
5977  @SearchParamDefinition(name="intent", path="Task.intent", description="Search by task intent", type="token" )
5978  public static final String SP_INTENT = "intent";
5979 /**
5980   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
5981   * <p>
5982   * Description: <b>Search by task intent</b><br>
5983   * Type: <b>token</b><br>
5984   * Path: <b>Task.intent</b><br>
5985   * </p>
5986   */
5987  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
5988
5989 /**
5990   * Search parameter: <b>modified</b>
5991   * <p>
5992   * Description: <b>Search by last modification date</b><br>
5993   * Type: <b>date</b><br>
5994   * Path: <b>Task.lastModified</b><br>
5995   * </p>
5996   */
5997  @SearchParamDefinition(name="modified", path="Task.lastModified", description="Search by last modification date", type="date" )
5998  public static final String SP_MODIFIED = "modified";
5999 /**
6000   * <b>Fluent Client</b> search parameter constant for <b>modified</b>
6001   * <p>
6002   * Description: <b>Search by last modification date</b><br>
6003   * Type: <b>date</b><br>
6004   * Path: <b>Task.lastModified</b><br>
6005   * </p>
6006   */
6007  public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_MODIFIED);
6008
6009 /**
6010   * Search parameter: <b>output</b>
6011   * <p>
6012   * Description: <b>Search by task output</b><br>
6013   * Type: <b>reference</b><br>
6014   * Path: <b>Task.output.value.ofType(Reference)</b><br>
6015   * </p>
6016   */
6017  @SearchParamDefinition(name="output", path="Task.output.value.ofType(Reference)", description="Search by task output", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.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, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.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, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.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, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
6018  public static final String SP_OUTPUT = "output";
6019 /**
6020   * <b>Fluent Client</b> search parameter constant for <b>output</b>
6021   * <p>
6022   * Description: <b>Search by task output</b><br>
6023   * Type: <b>reference</b><br>
6024   * Path: <b>Task.output.value.ofType(Reference)</b><br>
6025   * </p>
6026   */
6027  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OUTPUT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OUTPUT);
6028
6029/**
6030   * Constant for fluent queries to be used to add include statements. Specifies
6031   * the path value of "<b>Task:output</b>".
6032   */
6033  public static final ca.uhn.fhir.model.api.Include INCLUDE_OUTPUT = new ca.uhn.fhir.model.api.Include("Task:output").toLocked();
6034
6035 /**
6036   * Search parameter: <b>owner</b>
6037   * <p>
6038   * Description: <b>Search by task owner</b><br>
6039   * Type: <b>reference</b><br>
6040   * Path: <b>Task.owner</b><br>
6041   * </p>
6042   */
6043  @SearchParamDefinition(name="owner", path="Task.owner", description="Search by task owner", type="reference", target={CareTeam.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
6044  public static final String SP_OWNER = "owner";
6045 /**
6046   * <b>Fluent Client</b> search parameter constant for <b>owner</b>
6047   * <p>
6048   * Description: <b>Search by task owner</b><br>
6049   * Type: <b>reference</b><br>
6050   * Path: <b>Task.owner</b><br>
6051   * </p>
6052   */
6053  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER);
6054
6055/**
6056   * Constant for fluent queries to be used to add include statements. Specifies
6057   * the path value of "<b>Task:owner</b>".
6058   */
6059  public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner").toLocked();
6060
6061 /**
6062   * Search parameter: <b>part-of</b>
6063   * <p>
6064   * Description: <b>Search by task this task is part of</b><br>
6065   * Type: <b>reference</b><br>
6066   * Path: <b>Task.partOf</b><br>
6067   * </p>
6068   */
6069  @SearchParamDefinition(name="part-of", path="Task.partOf", description="Search by task this task is part of", type="reference", target={Task.class } )
6070  public static final String SP_PART_OF = "part-of";
6071 /**
6072   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
6073   * <p>
6074   * Description: <b>Search by task this task is part of</b><br>
6075   * Type: <b>reference</b><br>
6076   * Path: <b>Task.partOf</b><br>
6077   * </p>
6078   */
6079  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
6080
6081/**
6082   * Constant for fluent queries to be used to add include statements. Specifies
6083   * the path value of "<b>Task:part-of</b>".
6084   */
6085  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Task:part-of").toLocked();
6086
6087 /**
6088   * Search parameter: <b>performer</b>
6089   * <p>
6090   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
6091   * Type: <b>token</b><br>
6092   * Path: <b>Task.requestedPerformer.concept</b><br>
6093   * </p>
6094   */
6095  @SearchParamDefinition(name="performer", path="Task.requestedPerformer.concept", description="Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type="token" )
6096  public static final String SP_PERFORMER = "performer";
6097 /**
6098   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
6099   * <p>
6100   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
6101   * Type: <b>token</b><br>
6102   * Path: <b>Task.requestedPerformer.concept</b><br>
6103   * </p>
6104   */
6105  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER);
6106
6107 /**
6108   * Search parameter: <b>period</b>
6109   * <p>
6110   * Description: <b>Search by period Task is/was underway</b><br>
6111   * Type: <b>date</b><br>
6112   * Path: <b>Task.executionPeriod</b><br>
6113   * </p>
6114   */
6115  @SearchParamDefinition(name="period", path="Task.executionPeriod", description="Search by period Task is/was underway", type="date" )
6116  public static final String SP_PERIOD = "period";
6117 /**
6118   * <b>Fluent Client</b> search parameter constant for <b>period</b>
6119   * <p>
6120   * Description: <b>Search by period Task is/was underway</b><br>
6121   * Type: <b>date</b><br>
6122   * Path: <b>Task.executionPeriod</b><br>
6123   * </p>
6124   */
6125  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
6126
6127 /**
6128   * Search parameter: <b>priority</b>
6129   * <p>
6130   * Description: <b>Search by task priority</b><br>
6131   * Type: <b>token</b><br>
6132   * Path: <b>Task.priority</b><br>
6133   * </p>
6134   */
6135  @SearchParamDefinition(name="priority", path="Task.priority", description="Search by task priority", type="token" )
6136  public static final String SP_PRIORITY = "priority";
6137 /**
6138   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
6139   * <p>
6140   * Description: <b>Search by task priority</b><br>
6141   * Type: <b>token</b><br>
6142   * Path: <b>Task.priority</b><br>
6143   * </p>
6144   */
6145  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
6146
6147 /**
6148   * Search parameter: <b>requestedperformer-reference</b>
6149   * <p>
6150   * Description: <b>Search by specific requested performer.</b><br>
6151   * Type: <b>reference</b><br>
6152   * Path: <b>Task.requestedPerformer.reference</b><br>
6153   * </p>
6154   */
6155  @SearchParamDefinition(name="requestedperformer-reference", path="Task.requestedPerformer.reference", description="Search by specific requested performer.", type="reference", target={CareTeam.class, Device.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
6156  public static final String SP_REQUESTEDPERFORMER_REFERENCE = "requestedperformer-reference";
6157 /**
6158   * <b>Fluent Client</b> search parameter constant for <b>requestedperformer-reference</b>
6159   * <p>
6160   * Description: <b>Search by specific requested performer.</b><br>
6161   * Type: <b>reference</b><br>
6162   * Path: <b>Task.requestedPerformer.reference</b><br>
6163   * </p>
6164   */
6165  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTEDPERFORMER_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTEDPERFORMER_REFERENCE);
6166
6167/**
6168   * Constant for fluent queries to be used to add include statements. Specifies
6169   * the path value of "<b>Task:requestedperformer-reference</b>".
6170   */
6171  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTEDPERFORMER_REFERENCE = new ca.uhn.fhir.model.api.Include("Task:requestedperformer-reference").toLocked();
6172
6173 /**
6174   * Search parameter: <b>requester</b>
6175   * <p>
6176   * Description: <b>Search by task requester</b><br>
6177   * Type: <b>reference</b><br>
6178   * Path: <b>Task.requester</b><br>
6179   * </p>
6180   */
6181  @SearchParamDefinition(name="requester", path="Task.requester", description="Search by task requester", type="reference", target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
6182  public static final String SP_REQUESTER = "requester";
6183 /**
6184   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
6185   * <p>
6186   * Description: <b>Search by task requester</b><br>
6187   * Type: <b>reference</b><br>
6188   * Path: <b>Task.requester</b><br>
6189   * </p>
6190   */
6191  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
6192
6193/**
6194   * Constant for fluent queries to be used to add include statements. Specifies
6195   * the path value of "<b>Task:requester</b>".
6196   */
6197  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("Task:requester").toLocked();
6198
6199 /**
6200   * Search parameter: <b>status</b>
6201   * <p>
6202   * Description: <b>Search by task status</b><br>
6203   * Type: <b>token</b><br>
6204   * Path: <b>Task.status</b><br>
6205   * </p>
6206   */
6207  @SearchParamDefinition(name="status", path="Task.status", description="Search by task status", type="token" )
6208  public static final String SP_STATUS = "status";
6209 /**
6210   * <b>Fluent Client</b> search parameter constant for <b>status</b>
6211   * <p>
6212   * Description: <b>Search by task status</b><br>
6213   * Type: <b>token</b><br>
6214   * Path: <b>Task.status</b><br>
6215   * </p>
6216   */
6217  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
6218
6219 /**
6220   * Search parameter: <b>subject</b>
6221   * <p>
6222   * Description: <b>Search by subject</b><br>
6223   * Type: <b>reference</b><br>
6224   * Path: <b>Task.for</b><br>
6225   * </p>
6226   */
6227  @SearchParamDefinition(name="subject", path="Task.for", description="Search by subject", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.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, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.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, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.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, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
6228  public static final String SP_SUBJECT = "subject";
6229 /**
6230   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
6231   * <p>
6232   * Description: <b>Search by subject</b><br>
6233   * Type: <b>reference</b><br>
6234   * Path: <b>Task.for</b><br>
6235   * </p>
6236   */
6237  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
6238
6239/**
6240   * Constant for fluent queries to be used to add include statements. Specifies
6241   * the path value of "<b>Task:subject</b>".
6242   */
6243  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject").toLocked();
6244
6245 /**
6246   * Search parameter: <b>code</b>
6247   * <p>
6248   * Description: <b>Multiple Resources: 
6249
6250* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
6251* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
6252* [AuditEvent](auditevent.html): More specific code for the event
6253* [Basic](basic.html): Kind of Resource
6254* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
6255* [Condition](condition.html): Code for the condition
6256* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
6257* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
6258* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
6259* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
6260* [ImagingSelection](imagingselection.html): The imaging selection status
6261* [List](list.html): What the purpose of this list is
6262* [Medication](medication.html): Returns medications for a specific code
6263* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
6264* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
6265* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
6266* [MedicationStatement](medicationstatement.html): Return statements of this medication code
6267* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
6268* [Observation](observation.html): The code of the observation type
6269* [Procedure](procedure.html): A code to identify a  procedure
6270* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
6271* [Task](task.html): Search by task code
6272</b><br>
6273   * Type: <b>token</b><br>
6274   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
6275   * </p>
6276   */
6277  @SearchParamDefinition(name="code", path="AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [AuditEvent](auditevent.html): More specific code for the event\r\n* [Basic](basic.html): Kind of Resource\r\n* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code\r\n* [Condition](condition.html): Code for the condition\r\n* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [ImagingSelection](imagingselection.html): The imaging selection status\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [RequestOrchestration](requestorchestration.html): The code of the request orchestration\r\n* [Task](task.html): Search by task code\r\n", type="token" )
6278  public static final String SP_CODE = "code";
6279 /**
6280   * <b>Fluent Client</b> search parameter constant for <b>code</b>
6281   * <p>
6282   * Description: <b>Multiple Resources: 
6283
6284* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
6285* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
6286* [AuditEvent](auditevent.html): More specific code for the event
6287* [Basic](basic.html): Kind of Resource
6288* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
6289* [Condition](condition.html): Code for the condition
6290* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
6291* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
6292* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
6293* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
6294* [ImagingSelection](imagingselection.html): The imaging selection status
6295* [List](list.html): What the purpose of this list is
6296* [Medication](medication.html): Returns medications for a specific code
6297* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
6298* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
6299* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
6300* [MedicationStatement](medicationstatement.html): Return statements of this medication code
6301* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
6302* [Observation](observation.html): The code of the observation type
6303* [Procedure](procedure.html): A code to identify a  procedure
6304* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
6305* [Task](task.html): Search by task code
6306</b><br>
6307   * Type: <b>token</b><br>
6308   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
6309   * </p>
6310   */
6311  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
6312
6313 /**
6314   * Search parameter: <b>encounter</b>
6315   * <p>
6316   * Description: <b>Multiple Resources: 
6317
6318* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
6319* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
6320* [ChargeItem](chargeitem.html): Encounter associated with event
6321* [Claim](claim.html): Encounters associated with a billed line item
6322* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
6323* [Communication](communication.html): The Encounter during which this Communication was created
6324* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
6325* [Composition](composition.html): Context of the Composition
6326* [Condition](condition.html): The Encounter during which this Condition was created
6327* [DeviceRequest](devicerequest.html): Encounter during which request was created
6328* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
6329* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
6330* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
6331* [Flag](flag.html): Alert relevant during encounter
6332* [ImagingStudy](imagingstudy.html): The context of the study
6333* [List](list.html): Context in which list created
6334* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
6335* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
6336* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
6337* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
6338* [Observation](observation.html): Encounter related to the observation
6339* [Procedure](procedure.html): The Encounter during which this Procedure was created
6340* [Provenance](provenance.html): Encounter related to the Provenance
6341* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
6342* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
6343* [RiskAssessment](riskassessment.html): Where was assessment performed?
6344* [ServiceRequest](servicerequest.html): An encounter in which this request is made
6345* [Task](task.html): Search by encounter
6346* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
6347</b><br>
6348   * Type: <b>reference</b><br>
6349   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
6350   * </p>
6351   */
6352  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", target={Encounter.class } )
6353  public static final String SP_ENCOUNTER = "encounter";
6354 /**
6355   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
6356   * <p>
6357   * Description: <b>Multiple Resources: 
6358
6359* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
6360* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
6361* [ChargeItem](chargeitem.html): Encounter associated with event
6362* [Claim](claim.html): Encounters associated with a billed line item
6363* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
6364* [Communication](communication.html): The Encounter during which this Communication was created
6365* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
6366* [Composition](composition.html): Context of the Composition
6367* [Condition](condition.html): The Encounter during which this Condition was created
6368* [DeviceRequest](devicerequest.html): Encounter during which request was created
6369* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
6370* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
6371* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
6372* [Flag](flag.html): Alert relevant during encounter
6373* [ImagingStudy](imagingstudy.html): The context of the study
6374* [List](list.html): Context in which list created
6375* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
6376* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
6377* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
6378* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
6379* [Observation](observation.html): Encounter related to the observation
6380* [Procedure](procedure.html): The Encounter during which this Procedure was created
6381* [Provenance](provenance.html): Encounter related to the Provenance
6382* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
6383* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
6384* [RiskAssessment](riskassessment.html): Where was assessment performed?
6385* [ServiceRequest](servicerequest.html): An encounter in which this request is made
6386* [Task](task.html): Search by encounter
6387* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
6388</b><br>
6389   * Type: <b>reference</b><br>
6390   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
6391   * </p>
6392   */
6393  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
6394
6395/**
6396   * Constant for fluent queries to be used to add include statements. Specifies
6397   * the path value of "<b>Task:encounter</b>".
6398   */
6399  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Task:encounter").toLocked();
6400
6401 /**
6402   * Search parameter: <b>identifier</b>
6403   * <p>
6404   * Description: <b>Multiple Resources: 
6405
6406* [Account](account.html): Account number
6407* [AdverseEvent](adverseevent.html): Business identifier for the event
6408* [AllergyIntolerance](allergyintolerance.html): External ids for this item
6409* [Appointment](appointment.html): An Identifier of the Appointment
6410* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
6411* [Basic](basic.html): Business identifier
6412* [BodyStructure](bodystructure.html): Bodystructure identifier
6413* [CarePlan](careplan.html): External Ids for this plan
6414* [CareTeam](careteam.html): External Ids for this team
6415* [ChargeItem](chargeitem.html): Business Identifier for item
6416* [Claim](claim.html): The primary identifier of the financial resource
6417* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
6418* [ClinicalImpression](clinicalimpression.html): Business identifier
6419* [Communication](communication.html): Unique identifier
6420* [CommunicationRequest](communicationrequest.html): Unique identifier
6421* [Composition](composition.html): Version-independent identifier for the Composition
6422* [Condition](condition.html): A unique identifier of the condition record
6423* [Consent](consent.html): Identifier for this record (external references)
6424* [Contract](contract.html): The identity of the contract
6425* [Coverage](coverage.html): The primary identifier of the insured and the coverage
6426* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
6427* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
6428* [DetectedIssue](detectedissue.html): Unique id for the detected issue
6429* [DeviceRequest](devicerequest.html): Business identifier for request/order
6430* [DeviceUsage](deviceusage.html): Search by identifier
6431* [DiagnosticReport](diagnosticreport.html): An identifier for the report
6432* [DocumentReference](documentreference.html): Identifier of the attachment binary
6433* [Encounter](encounter.html): Identifier(s) by which this encounter is known
6434* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
6435* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
6436* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
6437* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
6438* [Flag](flag.html): Business identifier
6439* [Goal](goal.html): External Ids for this goal
6440* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
6441* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
6442* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
6443* [Immunization](immunization.html): Business identifier
6444* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
6445* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
6446* [Invoice](invoice.html): Business Identifier for item
6447* [List](list.html): Business identifier
6448* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
6449* [Medication](medication.html): Returns medications with this external identifier
6450* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
6451* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
6452* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
6453* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
6454* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
6455* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
6456* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
6457* [Observation](observation.html): The unique id for a particular observation
6458* [Person](person.html): A person Identifier
6459* [Procedure](procedure.html): A unique identifier for a procedure
6460* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
6461* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
6462* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
6463* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
6464* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
6465* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
6466* [Specimen](specimen.html): The unique identifier associated with the specimen
6467* [SupplyDelivery](supplydelivery.html): External identifier
6468* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
6469* [Task](task.html): Search for a task instance by its business identifier
6470* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
6471</b><br>
6472   * Type: <b>token</b><br>
6473   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
6474   * </p>
6475   */
6476  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
6477  public static final String SP_IDENTIFIER = "identifier";
6478 /**
6479   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
6480   * <p>
6481   * Description: <b>Multiple Resources: 
6482
6483* [Account](account.html): Account number
6484* [AdverseEvent](adverseevent.html): Business identifier for the event
6485* [AllergyIntolerance](allergyintolerance.html): External ids for this item
6486* [Appointment](appointment.html): An Identifier of the Appointment
6487* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
6488* [Basic](basic.html): Business identifier
6489* [BodyStructure](bodystructure.html): Bodystructure identifier
6490* [CarePlan](careplan.html): External Ids for this plan
6491* [CareTeam](careteam.html): External Ids for this team
6492* [ChargeItem](chargeitem.html): Business Identifier for item
6493* [Claim](claim.html): The primary identifier of the financial resource
6494* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
6495* [ClinicalImpression](clinicalimpression.html): Business identifier
6496* [Communication](communication.html): Unique identifier
6497* [CommunicationRequest](communicationrequest.html): Unique identifier
6498* [Composition](composition.html): Version-independent identifier for the Composition
6499* [Condition](condition.html): A unique identifier of the condition record
6500* [Consent](consent.html): Identifier for this record (external references)
6501* [Contract](contract.html): The identity of the contract
6502* [Coverage](coverage.html): The primary identifier of the insured and the coverage
6503* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
6504* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
6505* [DetectedIssue](detectedissue.html): Unique id for the detected issue
6506* [DeviceRequest](devicerequest.html): Business identifier for request/order
6507* [DeviceUsage](deviceusage.html): Search by identifier
6508* [DiagnosticReport](diagnosticreport.html): An identifier for the report
6509* [DocumentReference](documentreference.html): Identifier of the attachment binary
6510* [Encounter](encounter.html): Identifier(s) by which this encounter is known
6511* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
6512* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
6513* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
6514* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
6515* [Flag](flag.html): Business identifier
6516* [Goal](goal.html): External Ids for this goal
6517* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
6518* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
6519* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
6520* [Immunization](immunization.html): Business identifier
6521* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
6522* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
6523* [Invoice](invoice.html): Business Identifier for item
6524* [List](list.html): Business identifier
6525* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
6526* [Medication](medication.html): Returns medications with this external identifier
6527* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
6528* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
6529* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
6530* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
6531* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
6532* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
6533* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
6534* [Observation](observation.html): The unique id for a particular observation
6535* [Person](person.html): A person Identifier
6536* [Procedure](procedure.html): A unique identifier for a procedure
6537* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
6538* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
6539* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
6540* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
6541* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
6542* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
6543* [Specimen](specimen.html): The unique identifier associated with the specimen
6544* [SupplyDelivery](supplydelivery.html): External identifier
6545* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
6546* [Task](task.html): Search for a task instance by its business identifier
6547* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
6548</b><br>
6549   * Type: <b>token</b><br>
6550   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
6551   * </p>
6552   */
6553  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
6554
6555 /**
6556   * Search parameter: <b>patient</b>
6557   * <p>
6558   * Description: <b>Multiple Resources: 
6559
6560* [Account](account.html): The entity that caused the expenses
6561* [AdverseEvent](adverseevent.html): Subject impacted by event
6562* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
6563* [Appointment](appointment.html): One of the individuals of the appointment is this patient
6564* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
6565* [AuditEvent](auditevent.html): Where the activity involved patient data
6566* [Basic](basic.html): Identifies the focus of this resource
6567* [BodyStructure](bodystructure.html): Who this is about
6568* [CarePlan](careplan.html): Who the care plan is for
6569* [CareTeam](careteam.html): Who care team is for
6570* [ChargeItem](chargeitem.html): Individual service was done for/to
6571* [Claim](claim.html): Patient receiving the products or services
6572* [ClaimResponse](claimresponse.html): The subject of care
6573* [ClinicalImpression](clinicalimpression.html): Patient assessed
6574* [Communication](communication.html): Focus of message
6575* [CommunicationRequest](communicationrequest.html): Focus of message
6576* [Composition](composition.html): Who and/or what the composition is about
6577* [Condition](condition.html): Who has the condition?
6578* [Consent](consent.html): Who the consent applies to
6579* [Contract](contract.html): The identity of the subject of the contract (if a patient)
6580* [Coverage](coverage.html): Retrieve coverages for a patient
6581* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
6582* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
6583* [DetectedIssue](detectedissue.html): Associated patient
6584* [DeviceRequest](devicerequest.html): Individual the service is ordered for
6585* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
6586* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
6587* [DocumentReference](documentreference.html): Who/what is the subject of the document
6588* [Encounter](encounter.html): The patient present at the encounter
6589* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
6590* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
6591* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
6592* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
6593* [Flag](flag.html): The identity of a subject to list flags for
6594* [Goal](goal.html): Who this goal is intended for
6595* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
6596* [ImagingSelection](imagingselection.html): Who the study is about
6597* [ImagingStudy](imagingstudy.html): Who the study is about
6598* [Immunization](immunization.html): The patient for the vaccination record
6599* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
6600* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
6601* [Invoice](invoice.html): Recipient(s) of goods and services
6602* [List](list.html): If all resources have the same subject
6603* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
6604* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
6605* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
6606* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
6607* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
6608* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
6609* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
6610* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
6611* [Observation](observation.html): The subject that the observation is about (if patient)
6612* [Person](person.html): The Person links to this Patient
6613* [Procedure](procedure.html): Search by subject - a patient
6614* [Provenance](provenance.html): Where the activity involved patient data
6615* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
6616* [RelatedPerson](relatedperson.html): The patient this related person is related to
6617* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
6618* [ResearchSubject](researchsubject.html): Who or what is part of study
6619* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
6620* [ServiceRequest](servicerequest.html): Search by subject - a patient
6621* [Specimen](specimen.html): The patient the specimen comes from
6622* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
6623* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
6624* [Task](task.html): Search by patient
6625* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
6626</b><br>
6627   * Type: <b>reference</b><br>
6628   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
6629   * </p>
6630   */
6631  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
6632  public static final String SP_PATIENT = "patient";
6633 /**
6634   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
6635   * <p>
6636   * Description: <b>Multiple Resources: 
6637
6638* [Account](account.html): The entity that caused the expenses
6639* [AdverseEvent](adverseevent.html): Subject impacted by event
6640* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
6641* [Appointment](appointment.html): One of the individuals of the appointment is this patient
6642* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
6643* [AuditEvent](auditevent.html): Where the activity involved patient data
6644* [Basic](basic.html): Identifies the focus of this resource
6645* [BodyStructure](bodystructure.html): Who this is about
6646* [CarePlan](careplan.html): Who the care plan is for
6647* [CareTeam](careteam.html): Who care team is for
6648* [ChargeItem](chargeitem.html): Individual service was done for/to
6649* [Claim](claim.html): Patient receiving the products or services
6650* [ClaimResponse](claimresponse.html): The subject of care
6651* [ClinicalImpression](clinicalimpression.html): Patient assessed
6652* [Communication](communication.html): Focus of message
6653* [CommunicationRequest](communicationrequest.html): Focus of message
6654* [Composition](composition.html): Who and/or what the composition is about
6655* [Condition](condition.html): Who has the condition?
6656* [Consent](consent.html): Who the consent applies to
6657* [Contract](contract.html): The identity of the subject of the contract (if a patient)
6658* [Coverage](coverage.html): Retrieve coverages for a patient
6659* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
6660* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
6661* [DetectedIssue](detectedissue.html): Associated patient
6662* [DeviceRequest](devicerequest.html): Individual the service is ordered for
6663* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
6664* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
6665* [DocumentReference](documentreference.html): Who/what is the subject of the document
6666* [Encounter](encounter.html): The patient present at the encounter
6667* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
6668* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
6669* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
6670* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
6671* [Flag](flag.html): The identity of a subject to list flags for
6672* [Goal](goal.html): Who this goal is intended for
6673* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
6674* [ImagingSelection](imagingselection.html): Who the study is about
6675* [ImagingStudy](imagingstudy.html): Who the study is about
6676* [Immunization](immunization.html): The patient for the vaccination record
6677* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
6678* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
6679* [Invoice](invoice.html): Recipient(s) of goods and services
6680* [List](list.html): If all resources have the same subject
6681* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
6682* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
6683* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
6684* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
6685* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
6686* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
6687* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
6688* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
6689* [Observation](observation.html): The subject that the observation is about (if patient)
6690* [Person](person.html): The Person links to this Patient
6691* [Procedure](procedure.html): Search by subject - a patient
6692* [Provenance](provenance.html): Where the activity involved patient data
6693* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
6694* [RelatedPerson](relatedperson.html): The patient this related person is related to
6695* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
6696* [ResearchSubject](researchsubject.html): Who or what is part of study
6697* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
6698* [ServiceRequest](servicerequest.html): Search by subject - a patient
6699* [Specimen](specimen.html): The patient the specimen comes from
6700* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
6701* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
6702* [Task](task.html): Search by patient
6703* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
6704</b><br>
6705   * Type: <b>reference</b><br>
6706   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
6707   * </p>
6708   */
6709  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
6710
6711/**
6712   * Constant for fluent queries to be used to add include statements. Specifies
6713   * the path value of "<b>Task:patient</b>".
6714   */
6715  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Task:patient").toLocked();
6716
6717
6718}
6719