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 Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
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 a Practitioner.
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 RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] 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 a Practitioner.";
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 RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] 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(Base code) throws FHIRException {
211          if (code == null)
212            return null;
213          if (code.isEmpty())
214            return new Enumeration<TaskIntent>(this);
215          String codeString = ((PrimitiveType) code).asStringValue();
216          if (codeString == null || "".equals(codeString))
217            return null;
218        if ("unknown".equals(codeString))
219          return new Enumeration<TaskIntent>(this, TaskIntent.UNKNOWN);
220        if ("proposal".equals(codeString))
221          return new Enumeration<TaskIntent>(this, TaskIntent.PROPOSAL);
222        if ("plan".equals(codeString))
223          return new Enumeration<TaskIntent>(this, TaskIntent.PLAN);
224        if ("order".equals(codeString))
225          return new Enumeration<TaskIntent>(this, TaskIntent.ORDER);
226        if ("original-order".equals(codeString))
227          return new Enumeration<TaskIntent>(this, TaskIntent.ORIGINALORDER);
228        if ("reflex-order".equals(codeString))
229          return new Enumeration<TaskIntent>(this, TaskIntent.REFLEXORDER);
230        if ("filler-order".equals(codeString))
231          return new Enumeration<TaskIntent>(this, TaskIntent.FILLERORDER);
232        if ("instance-order".equals(codeString))
233          return new Enumeration<TaskIntent>(this, TaskIntent.INSTANCEORDER);
234        if ("option".equals(codeString))
235          return new Enumeration<TaskIntent>(this, TaskIntent.OPTION);
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(Base code) throws FHIRException {
455          if (code == null)
456            return null;
457          if (code.isEmpty())
458            return new Enumeration<TaskStatus>(this);
459          String codeString = ((PrimitiveType) code).asStringValue();
460          if (codeString == null || "".equals(codeString))
461            return null;
462        if ("draft".equals(codeString))
463          return new Enumeration<TaskStatus>(this, TaskStatus.DRAFT);
464        if ("requested".equals(codeString))
465          return new Enumeration<TaskStatus>(this, TaskStatus.REQUESTED);
466        if ("received".equals(codeString))
467          return new Enumeration<TaskStatus>(this, TaskStatus.RECEIVED);
468        if ("accepted".equals(codeString))
469          return new Enumeration<TaskStatus>(this, TaskStatus.ACCEPTED);
470        if ("rejected".equals(codeString))
471          return new Enumeration<TaskStatus>(this, TaskStatus.REJECTED);
472        if ("ready".equals(codeString))
473          return new Enumeration<TaskStatus>(this, TaskStatus.READY);
474        if ("cancelled".equals(codeString))
475          return new Enumeration<TaskStatus>(this, TaskStatus.CANCELLED);
476        if ("in-progress".equals(codeString))
477          return new Enumeration<TaskStatus>(this, TaskStatus.INPROGRESS);
478        if ("on-hold".equals(codeString))
479          return new Enumeration<TaskStatus>(this, TaskStatus.ONHOLD);
480        if ("failed".equals(codeString))
481          return new Enumeration<TaskStatus>(this, TaskStatus.FAILED);
482        if ("completed".equals(codeString))
483          return new Enumeration<TaskStatus>(this, TaskStatus.COMPLETED);
484        if ("entered-in-error".equals(codeString))
485          return new Enumeration<TaskStatus>(this, TaskStatus.ENTEREDINERROR);
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 TaskRestrictionComponent extends BackboneElement implements IBaseBackboneElement {
522        /**
523         * Indicates the number of times the requested action should occur.
524         */
525        @Child(name = "repetitions", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false)
526        @Description(shortDefinition="How many times to repeat", formalDefinition="Indicates the number of times the requested action should occur." )
527        protected PositiveIntType repetitions;
528
529        /**
530         * Over what time-period is fulfillment sought.
531         */
532        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
533        @Description(shortDefinition="When fulfillment sought", formalDefinition="Over what time-period is fulfillment sought." )
534        protected Period period;
535
536        /**
537         * For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.
538         */
539        @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)
540        @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." )
541        protected List<Reference> recipient;
542
543        private static final long serialVersionUID = 1673996066L;
544
545    /**
546     * Constructor
547     */
548      public TaskRestrictionComponent() {
549        super();
550      }
551
552        /**
553         * @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
554         */
555        public PositiveIntType getRepetitionsElement() { 
556          if (this.repetitions == null)
557            if (Configuration.errorOnAutoCreate())
558              throw new Error("Attempt to auto-create TaskRestrictionComponent.repetitions");
559            else if (Configuration.doAutoCreate())
560              this.repetitions = new PositiveIntType(); // bb
561          return this.repetitions;
562        }
563
564        public boolean hasRepetitionsElement() { 
565          return this.repetitions != null && !this.repetitions.isEmpty();
566        }
567
568        public boolean hasRepetitions() { 
569          return this.repetitions != null && !this.repetitions.isEmpty();
570        }
571
572        /**
573         * @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
574         */
575        public TaskRestrictionComponent setRepetitionsElement(PositiveIntType value) { 
576          this.repetitions = value;
577          return this;
578        }
579
580        /**
581         * @return Indicates the number of times the requested action should occur.
582         */
583        public int getRepetitions() { 
584          return this.repetitions == null || this.repetitions.isEmpty() ? 0 : this.repetitions.getValue();
585        }
586
587        /**
588         * @param value Indicates the number of times the requested action should occur.
589         */
590        public TaskRestrictionComponent setRepetitions(int value) { 
591            if (this.repetitions == null)
592              this.repetitions = new PositiveIntType();
593            this.repetitions.setValue(value);
594          return this;
595        }
596
597        /**
598         * @return {@link #period} (Over what time-period is fulfillment sought.)
599         */
600        public Period getPeriod() { 
601          if (this.period == null)
602            if (Configuration.errorOnAutoCreate())
603              throw new Error("Attempt to auto-create TaskRestrictionComponent.period");
604            else if (Configuration.doAutoCreate())
605              this.period = new Period(); // cc
606          return this.period;
607        }
608
609        public boolean hasPeriod() { 
610          return this.period != null && !this.period.isEmpty();
611        }
612
613        /**
614         * @param value {@link #period} (Over what time-period is fulfillment sought.)
615         */
616        public TaskRestrictionComponent setPeriod(Period value) { 
617          this.period = value;
618          return this;
619        }
620
621        /**
622         * @return {@link #recipient} (For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.)
623         */
624        public List<Reference> getRecipient() { 
625          if (this.recipient == null)
626            this.recipient = new ArrayList<Reference>();
627          return this.recipient;
628        }
629
630        /**
631         * @return Returns a reference to <code>this</code> for easy method chaining
632         */
633        public TaskRestrictionComponent setRecipient(List<Reference> theRecipient) { 
634          this.recipient = theRecipient;
635          return this;
636        }
637
638        public boolean hasRecipient() { 
639          if (this.recipient == null)
640            return false;
641          for (Reference item : this.recipient)
642            if (!item.isEmpty())
643              return true;
644          return false;
645        }
646
647        public Reference addRecipient() { //3
648          Reference t = new Reference();
649          if (this.recipient == null)
650            this.recipient = new ArrayList<Reference>();
651          this.recipient.add(t);
652          return t;
653        }
654
655        public TaskRestrictionComponent addRecipient(Reference t) { //3
656          if (t == null)
657            return this;
658          if (this.recipient == null)
659            this.recipient = new ArrayList<Reference>();
660          this.recipient.add(t);
661          return this;
662        }
663
664        /**
665         * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist {3}
666         */
667        public Reference getRecipientFirstRep() { 
668          if (getRecipient().isEmpty()) {
669            addRecipient();
670          }
671          return getRecipient().get(0);
672        }
673
674        protected void listChildren(List<Property> children) {
675          super.listChildren(children);
676          children.add(new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions));
677          children.add(new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period));
678          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));
679        }
680
681        @Override
682        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
683          switch (_hash) {
684          case 984367650: /*repetitions*/  return new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions);
685          case -991726143: /*period*/  return new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period);
686          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);
687          default: return super.getNamedProperty(_hash, _name, _checkValid);
688          }
689
690        }
691
692      @Override
693      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
694        switch (hash) {
695        case 984367650: /*repetitions*/ return this.repetitions == null ? new Base[0] : new Base[] {this.repetitions}; // PositiveIntType
696        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
697        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
698        default: return super.getProperty(hash, name, checkValid);
699        }
700
701      }
702
703      @Override
704      public Base setProperty(int hash, String name, Base value) throws FHIRException {
705        switch (hash) {
706        case 984367650: // repetitions
707          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
708          return value;
709        case -991726143: // period
710          this.period = TypeConvertor.castToPeriod(value); // Period
711          return value;
712        case 820081177: // recipient
713          this.getRecipient().add(TypeConvertor.castToReference(value)); // Reference
714          return value;
715        default: return super.setProperty(hash, name, value);
716        }
717
718      }
719
720      @Override
721      public Base setProperty(String name, Base value) throws FHIRException {
722        if (name.equals("repetitions")) {
723          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
724        } else if (name.equals("period")) {
725          this.period = TypeConvertor.castToPeriod(value); // Period
726        } else if (name.equals("recipient")) {
727          this.getRecipient().add(TypeConvertor.castToReference(value));
728        } else
729          return super.setProperty(name, value);
730        return value;
731      }
732
733      @Override
734      public Base makeProperty(int hash, String name) throws FHIRException {
735        switch (hash) {
736        case 984367650:  return getRepetitionsElement();
737        case -991726143:  return getPeriod();
738        case 820081177:  return addRecipient(); 
739        default: return super.makeProperty(hash, name);
740        }
741
742      }
743
744      @Override
745      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
746        switch (hash) {
747        case 984367650: /*repetitions*/ return new String[] {"positiveInt"};
748        case -991726143: /*period*/ return new String[] {"Period"};
749        case 820081177: /*recipient*/ return new String[] {"Reference"};
750        default: return super.getTypesForProperty(hash, name);
751        }
752
753      }
754
755      @Override
756      public Base addChild(String name) throws FHIRException {
757        if (name.equals("repetitions")) {
758          throw new FHIRException("Cannot call addChild on a primitive type Task.restriction.repetitions");
759        }
760        else if (name.equals("period")) {
761          this.period = new Period();
762          return this.period;
763        }
764        else if (name.equals("recipient")) {
765          return addRecipient();
766        }
767        else
768          return super.addChild(name);
769      }
770
771      public TaskRestrictionComponent copy() {
772        TaskRestrictionComponent dst = new TaskRestrictionComponent();
773        copyValues(dst);
774        return dst;
775      }
776
777      public void copyValues(TaskRestrictionComponent dst) {
778        super.copyValues(dst);
779        dst.repetitions = repetitions == null ? null : repetitions.copy();
780        dst.period = period == null ? null : period.copy();
781        if (recipient != null) {
782          dst.recipient = new ArrayList<Reference>();
783          for (Reference i : recipient)
784            dst.recipient.add(i.copy());
785        };
786      }
787
788      @Override
789      public boolean equalsDeep(Base other_) {
790        if (!super.equalsDeep(other_))
791          return false;
792        if (!(other_ instanceof TaskRestrictionComponent))
793          return false;
794        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
795        return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) && compareDeep(recipient, o.recipient, true)
796          ;
797      }
798
799      @Override
800      public boolean equalsShallow(Base other_) {
801        if (!super.equalsShallow(other_))
802          return false;
803        if (!(other_ instanceof TaskRestrictionComponent))
804          return false;
805        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
806        return compareValues(repetitions, o.repetitions, true);
807      }
808
809      public boolean isEmpty() {
810        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient
811          );
812      }
813
814  public String fhirType() {
815    return "Task.restriction";
816
817  }
818
819  }
820
821    @Block()
822    public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement {
823        /**
824         * A code or description indicating how the input is intended to be used as part of the task execution.
825         */
826        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
827        @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." )
828        protected CodeableConcept type;
829
830        /**
831         * The value of the input parameter as a basic type.
832         */
833        @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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
834        @Description(shortDefinition="Content to use in performing the task", formalDefinition="The value of the input parameter as a basic type." )
835        protected DataType value;
836
837        private static final long serialVersionUID = -1659186716L;
838
839    /**
840     * Constructor
841     */
842      public ParameterComponent() {
843        super();
844      }
845
846    /**
847     * Constructor
848     */
849      public ParameterComponent(CodeableConcept type, DataType value) {
850        super();
851        this.setType(type);
852        this.setValue(value);
853      }
854
855        /**
856         * @return {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
857         */
858        public CodeableConcept getType() { 
859          if (this.type == null)
860            if (Configuration.errorOnAutoCreate())
861              throw new Error("Attempt to auto-create ParameterComponent.type");
862            else if (Configuration.doAutoCreate())
863              this.type = new CodeableConcept(); // cc
864          return this.type;
865        }
866
867        public boolean hasType() { 
868          return this.type != null && !this.type.isEmpty();
869        }
870
871        /**
872         * @param value {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
873         */
874        public ParameterComponent setType(CodeableConcept value) { 
875          this.type = value;
876          return this;
877        }
878
879        /**
880         * @return {@link #value} (The value of the input parameter as a basic type.)
881         */
882        public DataType getValue() { 
883          return this.value;
884        }
885
886        /**
887         * @return {@link #value} (The value of the input parameter as a basic type.)
888         */
889        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
890          if (this.value == null)
891            this.value = new Base64BinaryType();
892          if (!(this.value instanceof Base64BinaryType))
893            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
894          return (Base64BinaryType) this.value;
895        }
896
897        public boolean hasValueBase64BinaryType() { 
898          return this != null && this.value instanceof Base64BinaryType;
899        }
900
901        /**
902         * @return {@link #value} (The value of the input parameter as a basic type.)
903         */
904        public BooleanType getValueBooleanType() throws FHIRException { 
905          if (this.value == null)
906            this.value = new BooleanType();
907          if (!(this.value instanceof BooleanType))
908            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
909          return (BooleanType) this.value;
910        }
911
912        public boolean hasValueBooleanType() { 
913          return this != null && this.value instanceof BooleanType;
914        }
915
916        /**
917         * @return {@link #value} (The value of the input parameter as a basic type.)
918         */
919        public CanonicalType getValueCanonicalType() throws FHIRException { 
920          if (this.value == null)
921            this.value = new CanonicalType();
922          if (!(this.value instanceof CanonicalType))
923            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
924          return (CanonicalType) this.value;
925        }
926
927        public boolean hasValueCanonicalType() { 
928          return this != null && this.value instanceof CanonicalType;
929        }
930
931        /**
932         * @return {@link #value} (The value of the input parameter as a basic type.)
933         */
934        public CodeType getValueCodeType() throws FHIRException { 
935          if (this.value == null)
936            this.value = new CodeType();
937          if (!(this.value instanceof CodeType))
938            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
939          return (CodeType) this.value;
940        }
941
942        public boolean hasValueCodeType() { 
943          return this != null && this.value instanceof CodeType;
944        }
945
946        /**
947         * @return {@link #value} (The value of the input parameter as a basic type.)
948         */
949        public DateType getValueDateType() throws FHIRException { 
950          if (this.value == null)
951            this.value = new DateType();
952          if (!(this.value instanceof DateType))
953            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
954          return (DateType) this.value;
955        }
956
957        public boolean hasValueDateType() { 
958          return this != null && this.value instanceof DateType;
959        }
960
961        /**
962         * @return {@link #value} (The value of the input parameter as a basic type.)
963         */
964        public DateTimeType getValueDateTimeType() throws FHIRException { 
965          if (this.value == null)
966            this.value = new DateTimeType();
967          if (!(this.value instanceof DateTimeType))
968            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
969          return (DateTimeType) this.value;
970        }
971
972        public boolean hasValueDateTimeType() { 
973          return this != null && this.value instanceof DateTimeType;
974        }
975
976        /**
977         * @return {@link #value} (The value of the input parameter as a basic type.)
978         */
979        public DecimalType getValueDecimalType() throws FHIRException { 
980          if (this.value == null)
981            this.value = new DecimalType();
982          if (!(this.value instanceof DecimalType))
983            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
984          return (DecimalType) this.value;
985        }
986
987        public boolean hasValueDecimalType() { 
988          return this != null && this.value instanceof DecimalType;
989        }
990
991        /**
992         * @return {@link #value} (The value of the input parameter as a basic type.)
993         */
994        public IdType getValueIdType() throws FHIRException { 
995          if (this.value == null)
996            this.value = new IdType();
997          if (!(this.value instanceof IdType))
998            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
999          return (IdType) this.value;
1000        }
1001
1002        public boolean hasValueIdType() { 
1003          return this != null && this.value instanceof IdType;
1004        }
1005
1006        /**
1007         * @return {@link #value} (The value of the input parameter as a basic type.)
1008         */
1009        public InstantType getValueInstantType() throws FHIRException { 
1010          if (this.value == null)
1011            this.value = new InstantType();
1012          if (!(this.value instanceof InstantType))
1013            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
1014          return (InstantType) this.value;
1015        }
1016
1017        public boolean hasValueInstantType() { 
1018          return this != null && this.value instanceof InstantType;
1019        }
1020
1021        /**
1022         * @return {@link #value} (The value of the input parameter as a basic type.)
1023         */
1024        public IntegerType getValueIntegerType() throws FHIRException { 
1025          if (this.value == null)
1026            this.value = new IntegerType();
1027          if (!(this.value instanceof IntegerType))
1028            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
1029          return (IntegerType) this.value;
1030        }
1031
1032        public boolean hasValueIntegerType() { 
1033          return this != null && this.value instanceof IntegerType;
1034        }
1035
1036        /**
1037         * @return {@link #value} (The value of the input parameter as a basic type.)
1038         */
1039        public Integer64Type getValueInteger64Type() throws FHIRException { 
1040          if (this.value == null)
1041            this.value = new Integer64Type();
1042          if (!(this.value instanceof Integer64Type))
1043            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
1044          return (Integer64Type) this.value;
1045        }
1046
1047        public boolean hasValueInteger64Type() { 
1048          return this != null && this.value instanceof Integer64Type;
1049        }
1050
1051        /**
1052         * @return {@link #value} (The value of the input parameter as a basic type.)
1053         */
1054        public MarkdownType getValueMarkdownType() throws FHIRException { 
1055          if (this.value == null)
1056            this.value = new MarkdownType();
1057          if (!(this.value instanceof MarkdownType))
1058            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
1059          return (MarkdownType) this.value;
1060        }
1061
1062        public boolean hasValueMarkdownType() { 
1063          return this != null && this.value instanceof MarkdownType;
1064        }
1065
1066        /**
1067         * @return {@link #value} (The value of the input parameter as a basic type.)
1068         */
1069        public OidType getValueOidType() throws FHIRException { 
1070          if (this.value == null)
1071            this.value = new OidType();
1072          if (!(this.value instanceof OidType))
1073            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
1074          return (OidType) this.value;
1075        }
1076
1077        public boolean hasValueOidType() { 
1078          return this != null && this.value instanceof OidType;
1079        }
1080
1081        /**
1082         * @return {@link #value} (The value of the input parameter as a basic type.)
1083         */
1084        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
1085          if (this.value == null)
1086            this.value = new PositiveIntType();
1087          if (!(this.value instanceof PositiveIntType))
1088            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1089          return (PositiveIntType) this.value;
1090        }
1091
1092        public boolean hasValuePositiveIntType() { 
1093          return this != null && this.value instanceof PositiveIntType;
1094        }
1095
1096        /**
1097         * @return {@link #value} (The value of the input parameter as a basic type.)
1098         */
1099        public StringType getValueStringType() throws FHIRException { 
1100          if (this.value == null)
1101            this.value = new StringType();
1102          if (!(this.value instanceof StringType))
1103            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
1104          return (StringType) this.value;
1105        }
1106
1107        public boolean hasValueStringType() { 
1108          return this != null && this.value instanceof StringType;
1109        }
1110
1111        /**
1112         * @return {@link #value} (The value of the input parameter as a basic type.)
1113         */
1114        public TimeType getValueTimeType() throws FHIRException { 
1115          if (this.value == null)
1116            this.value = new TimeType();
1117          if (!(this.value instanceof TimeType))
1118            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1119          return (TimeType) this.value;
1120        }
1121
1122        public boolean hasValueTimeType() { 
1123          return this != null && this.value instanceof TimeType;
1124        }
1125
1126        /**
1127         * @return {@link #value} (The value of the input parameter as a basic type.)
1128         */
1129        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
1130          if (this.value == null)
1131            this.value = new UnsignedIntType();
1132          if (!(this.value instanceof UnsignedIntType))
1133            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1134          return (UnsignedIntType) this.value;
1135        }
1136
1137        public boolean hasValueUnsignedIntType() { 
1138          return this != null && this.value instanceof UnsignedIntType;
1139        }
1140
1141        /**
1142         * @return {@link #value} (The value of the input parameter as a basic type.)
1143         */
1144        public UriType getValueUriType() throws FHIRException { 
1145          if (this.value == null)
1146            this.value = new UriType();
1147          if (!(this.value instanceof UriType))
1148            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
1149          return (UriType) this.value;
1150        }
1151
1152        public boolean hasValueUriType() { 
1153          return this != null && this.value instanceof UriType;
1154        }
1155
1156        /**
1157         * @return {@link #value} (The value of the input parameter as a basic type.)
1158         */
1159        public UrlType getValueUrlType() throws FHIRException { 
1160          if (this.value == null)
1161            this.value = new UrlType();
1162          if (!(this.value instanceof UrlType))
1163            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
1164          return (UrlType) this.value;
1165        }
1166
1167        public boolean hasValueUrlType() { 
1168          return this != null && this.value instanceof UrlType;
1169        }
1170
1171        /**
1172         * @return {@link #value} (The value of the input parameter as a basic type.)
1173         */
1174        public UuidType getValueUuidType() throws FHIRException { 
1175          if (this.value == null)
1176            this.value = new UuidType();
1177          if (!(this.value instanceof UuidType))
1178            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
1179          return (UuidType) this.value;
1180        }
1181
1182        public boolean hasValueUuidType() { 
1183          return this != null && this.value instanceof UuidType;
1184        }
1185
1186        /**
1187         * @return {@link #value} (The value of the input parameter as a basic type.)
1188         */
1189        public Address getValueAddress() throws FHIRException { 
1190          if (this.value == null)
1191            this.value = new Address();
1192          if (!(this.value instanceof Address))
1193            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
1194          return (Address) this.value;
1195        }
1196
1197        public boolean hasValueAddress() { 
1198          return this != null && this.value instanceof Address;
1199        }
1200
1201        /**
1202         * @return {@link #value} (The value of the input parameter as a basic type.)
1203         */
1204        public Age getValueAge() throws FHIRException { 
1205          if (this.value == null)
1206            this.value = new Age();
1207          if (!(this.value instanceof Age))
1208            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
1209          return (Age) this.value;
1210        }
1211
1212        public boolean hasValueAge() { 
1213          return this != null && this.value instanceof Age;
1214        }
1215
1216        /**
1217         * @return {@link #value} (The value of the input parameter as a basic type.)
1218         */
1219        public Annotation getValueAnnotation() throws FHIRException { 
1220          if (this.value == null)
1221            this.value = new Annotation();
1222          if (!(this.value instanceof Annotation))
1223            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
1224          return (Annotation) this.value;
1225        }
1226
1227        public boolean hasValueAnnotation() { 
1228          return this != null && this.value instanceof Annotation;
1229        }
1230
1231        /**
1232         * @return {@link #value} (The value of the input parameter as a basic type.)
1233         */
1234        public Attachment getValueAttachment() throws FHIRException { 
1235          if (this.value == null)
1236            this.value = new Attachment();
1237          if (!(this.value instanceof Attachment))
1238            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
1239          return (Attachment) this.value;
1240        }
1241
1242        public boolean hasValueAttachment() { 
1243          return this != null && this.value instanceof Attachment;
1244        }
1245
1246        /**
1247         * @return {@link #value} (The value of the input parameter as a basic type.)
1248         */
1249        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
1250          if (this.value == null)
1251            this.value = new CodeableConcept();
1252          if (!(this.value instanceof CodeableConcept))
1253            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
1254          return (CodeableConcept) this.value;
1255        }
1256
1257        public boolean hasValueCodeableConcept() { 
1258          return this != null && this.value instanceof CodeableConcept;
1259        }
1260
1261        /**
1262         * @return {@link #value} (The value of the input parameter as a basic type.)
1263         */
1264        public CodeableReference getValueCodeableReference() throws FHIRException { 
1265          if (this.value == null)
1266            this.value = new CodeableReference();
1267          if (!(this.value instanceof CodeableReference))
1268            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
1269          return (CodeableReference) this.value;
1270        }
1271
1272        public boolean hasValueCodeableReference() { 
1273          return this != null && this.value instanceof CodeableReference;
1274        }
1275
1276        /**
1277         * @return {@link #value} (The value of the input parameter as a basic type.)
1278         */
1279        public Coding getValueCoding() throws FHIRException { 
1280          if (this.value == null)
1281            this.value = new Coding();
1282          if (!(this.value instanceof Coding))
1283            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
1284          return (Coding) this.value;
1285        }
1286
1287        public boolean hasValueCoding() { 
1288          return this != null && this.value instanceof Coding;
1289        }
1290
1291        /**
1292         * @return {@link #value} (The value of the input parameter as a basic type.)
1293         */
1294        public ContactPoint getValueContactPoint() throws FHIRException { 
1295          if (this.value == null)
1296            this.value = new ContactPoint();
1297          if (!(this.value instanceof ContactPoint))
1298            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
1299          return (ContactPoint) this.value;
1300        }
1301
1302        public boolean hasValueContactPoint() { 
1303          return this != null && this.value instanceof ContactPoint;
1304        }
1305
1306        /**
1307         * @return {@link #value} (The value of the input parameter as a basic type.)
1308         */
1309        public Count getValueCount() throws FHIRException { 
1310          if (this.value == null)
1311            this.value = new Count();
1312          if (!(this.value instanceof Count))
1313            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
1314          return (Count) this.value;
1315        }
1316
1317        public boolean hasValueCount() { 
1318          return this != null && this.value instanceof Count;
1319        }
1320
1321        /**
1322         * @return {@link #value} (The value of the input parameter as a basic type.)
1323         */
1324        public Distance getValueDistance() throws FHIRException { 
1325          if (this.value == null)
1326            this.value = new Distance();
1327          if (!(this.value instanceof Distance))
1328            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
1329          return (Distance) this.value;
1330        }
1331
1332        public boolean hasValueDistance() { 
1333          return this != null && this.value instanceof Distance;
1334        }
1335
1336        /**
1337         * @return {@link #value} (The value of the input parameter as a basic type.)
1338         */
1339        public Duration getValueDuration() throws FHIRException { 
1340          if (this.value == null)
1341            this.value = new Duration();
1342          if (!(this.value instanceof Duration))
1343            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
1344          return (Duration) this.value;
1345        }
1346
1347        public boolean hasValueDuration() { 
1348          return this != null && this.value instanceof Duration;
1349        }
1350
1351        /**
1352         * @return {@link #value} (The value of the input parameter as a basic type.)
1353         */
1354        public HumanName getValueHumanName() throws FHIRException { 
1355          if (this.value == null)
1356            this.value = new HumanName();
1357          if (!(this.value instanceof HumanName))
1358            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
1359          return (HumanName) this.value;
1360        }
1361
1362        public boolean hasValueHumanName() { 
1363          return this != null && this.value instanceof HumanName;
1364        }
1365
1366        /**
1367         * @return {@link #value} (The value of the input parameter as a basic type.)
1368         */
1369        public Identifier getValueIdentifier() throws FHIRException { 
1370          if (this.value == null)
1371            this.value = new Identifier();
1372          if (!(this.value instanceof Identifier))
1373            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
1374          return (Identifier) this.value;
1375        }
1376
1377        public boolean hasValueIdentifier() { 
1378          return this != null && this.value instanceof Identifier;
1379        }
1380
1381        /**
1382         * @return {@link #value} (The value of the input parameter as a basic type.)
1383         */
1384        public Money getValueMoney() throws FHIRException { 
1385          if (this.value == null)
1386            this.value = new Money();
1387          if (!(this.value instanceof Money))
1388            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
1389          return (Money) this.value;
1390        }
1391
1392        public boolean hasValueMoney() { 
1393          return this != null && this.value instanceof Money;
1394        }
1395
1396        /**
1397         * @return {@link #value} (The value of the input parameter as a basic type.)
1398         */
1399        public Period getValuePeriod() throws FHIRException { 
1400          if (this.value == null)
1401            this.value = new Period();
1402          if (!(this.value instanceof Period))
1403            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
1404          return (Period) this.value;
1405        }
1406
1407        public boolean hasValuePeriod() { 
1408          return this != null && this.value instanceof Period;
1409        }
1410
1411        /**
1412         * @return {@link #value} (The value of the input parameter as a basic type.)
1413         */
1414        public Quantity getValueQuantity() throws FHIRException { 
1415          if (this.value == null)
1416            this.value = new Quantity();
1417          if (!(this.value instanceof Quantity))
1418            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
1419          return (Quantity) this.value;
1420        }
1421
1422        public boolean hasValueQuantity() { 
1423          return this != null && this.value instanceof Quantity;
1424        }
1425
1426        /**
1427         * @return {@link #value} (The value of the input parameter as a basic type.)
1428         */
1429        public Range getValueRange() throws FHIRException { 
1430          if (this.value == null)
1431            this.value = new Range();
1432          if (!(this.value instanceof Range))
1433            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
1434          return (Range) this.value;
1435        }
1436
1437        public boolean hasValueRange() { 
1438          return this != null && this.value instanceof Range;
1439        }
1440
1441        /**
1442         * @return {@link #value} (The value of the input parameter as a basic type.)
1443         */
1444        public Ratio getValueRatio() throws FHIRException { 
1445          if (this.value == null)
1446            this.value = new Ratio();
1447          if (!(this.value instanceof Ratio))
1448            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
1449          return (Ratio) this.value;
1450        }
1451
1452        public boolean hasValueRatio() { 
1453          return this != null && this.value instanceof Ratio;
1454        }
1455
1456        /**
1457         * @return {@link #value} (The value of the input parameter as a basic type.)
1458         */
1459        public RatioRange getValueRatioRange() throws FHIRException { 
1460          if (this.value == null)
1461            this.value = new RatioRange();
1462          if (!(this.value instanceof RatioRange))
1463            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
1464          return (RatioRange) this.value;
1465        }
1466
1467        public boolean hasValueRatioRange() { 
1468          return this != null && this.value instanceof RatioRange;
1469        }
1470
1471        /**
1472         * @return {@link #value} (The value of the input parameter as a basic type.)
1473         */
1474        public Reference getValueReference() throws FHIRException { 
1475          if (this.value == null)
1476            this.value = new Reference();
1477          if (!(this.value instanceof Reference))
1478            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
1479          return (Reference) this.value;
1480        }
1481
1482        public boolean hasValueReference() { 
1483          return this != null && this.value instanceof Reference;
1484        }
1485
1486        /**
1487         * @return {@link #value} (The value of the input parameter as a basic type.)
1488         */
1489        public SampledData getValueSampledData() throws FHIRException { 
1490          if (this.value == null)
1491            this.value = new SampledData();
1492          if (!(this.value instanceof SampledData))
1493            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
1494          return (SampledData) this.value;
1495        }
1496
1497        public boolean hasValueSampledData() { 
1498          return this != null && this.value instanceof SampledData;
1499        }
1500
1501        /**
1502         * @return {@link #value} (The value of the input parameter as a basic type.)
1503         */
1504        public Signature getValueSignature() throws FHIRException { 
1505          if (this.value == null)
1506            this.value = new Signature();
1507          if (!(this.value instanceof Signature))
1508            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
1509          return (Signature) this.value;
1510        }
1511
1512        public boolean hasValueSignature() { 
1513          return this != null && this.value instanceof Signature;
1514        }
1515
1516        /**
1517         * @return {@link #value} (The value of the input parameter as a basic type.)
1518         */
1519        public Timing getValueTiming() throws FHIRException { 
1520          if (this.value == null)
1521            this.value = new Timing();
1522          if (!(this.value instanceof Timing))
1523            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
1524          return (Timing) this.value;
1525        }
1526
1527        public boolean hasValueTiming() { 
1528          return this != null && this.value instanceof Timing;
1529        }
1530
1531        /**
1532         * @return {@link #value} (The value of the input parameter as a basic type.)
1533         */
1534        public ContactDetail getValueContactDetail() throws FHIRException { 
1535          if (this.value == null)
1536            this.value = new ContactDetail();
1537          if (!(this.value instanceof ContactDetail))
1538            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
1539          return (ContactDetail) this.value;
1540        }
1541
1542        public boolean hasValueContactDetail() { 
1543          return this != null && this.value instanceof ContactDetail;
1544        }
1545
1546        /**
1547         * @return {@link #value} (The value of the input parameter as a basic type.)
1548         */
1549        public Contributor getValueContributor() throws FHIRException { 
1550          if (this.value == null)
1551            this.value = new Contributor();
1552          if (!(this.value instanceof Contributor))
1553            throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.value.getClass().getName()+" was encountered");
1554          return (Contributor) this.value;
1555        }
1556
1557        public boolean hasValueContributor() { 
1558          return this != null && this.value instanceof Contributor;
1559        }
1560
1561        /**
1562         * @return {@link #value} (The value of the input parameter as a basic type.)
1563         */
1564        public DataRequirement getValueDataRequirement() throws FHIRException { 
1565          if (this.value == null)
1566            this.value = new DataRequirement();
1567          if (!(this.value instanceof DataRequirement))
1568            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
1569          return (DataRequirement) this.value;
1570        }
1571
1572        public boolean hasValueDataRequirement() { 
1573          return this != null && this.value instanceof DataRequirement;
1574        }
1575
1576        /**
1577         * @return {@link #value} (The value of the input parameter as a basic type.)
1578         */
1579        public Expression getValueExpression() throws FHIRException { 
1580          if (this.value == null)
1581            this.value = new Expression();
1582          if (!(this.value instanceof Expression))
1583            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
1584          return (Expression) this.value;
1585        }
1586
1587        public boolean hasValueExpression() { 
1588          return this != null && this.value instanceof Expression;
1589        }
1590
1591        /**
1592         * @return {@link #value} (The value of the input parameter as a basic type.)
1593         */
1594        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
1595          if (this.value == null)
1596            this.value = new ParameterDefinition();
1597          if (!(this.value instanceof ParameterDefinition))
1598            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1599          return (ParameterDefinition) this.value;
1600        }
1601
1602        public boolean hasValueParameterDefinition() { 
1603          return this != null && this.value instanceof ParameterDefinition;
1604        }
1605
1606        /**
1607         * @return {@link #value} (The value of the input parameter as a basic type.)
1608         */
1609        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
1610          if (this.value == null)
1611            this.value = new RelatedArtifact();
1612          if (!(this.value instanceof RelatedArtifact))
1613            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
1614          return (RelatedArtifact) this.value;
1615        }
1616
1617        public boolean hasValueRelatedArtifact() { 
1618          return this != null && this.value instanceof RelatedArtifact;
1619        }
1620
1621        /**
1622         * @return {@link #value} (The value of the input parameter as a basic type.)
1623         */
1624        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
1625          if (this.value == null)
1626            this.value = new TriggerDefinition();
1627          if (!(this.value instanceof TriggerDefinition))
1628            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1629          return (TriggerDefinition) this.value;
1630        }
1631
1632        public boolean hasValueTriggerDefinition() { 
1633          return this != null && this.value instanceof TriggerDefinition;
1634        }
1635
1636        /**
1637         * @return {@link #value} (The value of the input parameter as a basic type.)
1638         */
1639        public UsageContext getValueUsageContext() throws FHIRException { 
1640          if (this.value == null)
1641            this.value = new UsageContext();
1642          if (!(this.value instanceof UsageContext))
1643            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
1644          return (UsageContext) this.value;
1645        }
1646
1647        public boolean hasValueUsageContext() { 
1648          return this != null && this.value instanceof UsageContext;
1649        }
1650
1651        /**
1652         * @return {@link #value} (The value of the input parameter as a basic type.)
1653         */
1654        public Dosage getValueDosage() throws FHIRException { 
1655          if (this.value == null)
1656            this.value = new Dosage();
1657          if (!(this.value instanceof Dosage))
1658            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
1659          return (Dosage) this.value;
1660        }
1661
1662        public boolean hasValueDosage() { 
1663          return this != null && this.value instanceof Dosage;
1664        }
1665
1666        /**
1667         * @return {@link #value} (The value of the input parameter as a basic type.)
1668         */
1669        public Meta getValueMeta() throws FHIRException { 
1670          if (this.value == null)
1671            this.value = new Meta();
1672          if (!(this.value instanceof Meta))
1673            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
1674          return (Meta) this.value;
1675        }
1676
1677        public boolean hasValueMeta() { 
1678          return this != null && this.value instanceof Meta;
1679        }
1680
1681        public boolean hasValue() { 
1682          return this.value != null && !this.value.isEmpty();
1683        }
1684
1685        /**
1686         * @param value {@link #value} (The value of the input parameter as a basic type.)
1687         */
1688        public ParameterComponent setValue(DataType value) { 
1689          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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
1690            throw new Error("Not the right type for Task.input.value[x]: "+value.fhirType());
1691          this.value = value;
1692          return this;
1693        }
1694
1695        protected void listChildren(List<Property> children) {
1696          super.listChildren(children);
1697          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));
1698          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value));
1699        }
1700
1701        @Override
1702        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1703          switch (_hash) {
1704          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);
1705          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1706          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1707          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the input parameter as a basic type.", 0, 1, value);
1708          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the input parameter as a basic type.", 0, 1, value);
1709          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the input parameter as a basic type.", 0, 1, value);
1710          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the input parameter as a basic type.", 0, 1, value);
1711          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the input parameter as a basic type.", 0, 1, value);
1712          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the input parameter as a basic type.", 0, 1, value);
1713          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the input parameter as a basic type.", 0, 1, value);
1714          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the input parameter as a basic type.", 0, 1, value);
1715          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the input parameter as a basic type.", 0, 1, value);
1716          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the input parameter as a basic type.", 0, 1, value);
1717          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the input parameter as a basic type.", 0, 1, value);
1718          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the input parameter as a basic type.", 0, 1, value);
1719          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the input parameter as a basic type.", 0, 1, value);
1720          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the input parameter as a basic type.", 0, 1, value);
1721          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the input parameter as a basic type.", 0, 1, value);
1722          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the input parameter as a basic type.", 0, 1, value);
1723          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the input parameter as a basic type.", 0, 1, value);
1724          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the input parameter as a basic type.", 0, 1, value);
1725          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the input parameter as a basic type.", 0, 1, value);
1726          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the input parameter as a basic type.", 0, 1, value);
1727          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the input parameter as a basic type.", 0, 1, value);
1728          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the input parameter as a basic type.", 0, 1, value);
1729          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the input parameter as a basic type.", 0, 1, value);
1730          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the input parameter as a basic type.", 0, 1, value);
1731          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the input parameter as a basic type.", 0, 1, value);
1732          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the input parameter as a basic type.", 0, 1, value);
1733          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the input parameter as a basic type.", 0, 1, value);
1734          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the input parameter as a basic type.", 0, 1, value);
1735          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the input parameter as a basic type.", 0, 1, value);
1736          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the input parameter as a basic type.", 0, 1, value);
1737          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the input parameter as a basic type.", 0, 1, value);
1738          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the input parameter as a basic type.", 0, 1, value);
1739          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the input parameter as a basic type.", 0, 1, value);
1740          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the input parameter as a basic type.", 0, 1, value);
1741          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the input parameter as a basic type.", 0, 1, value);
1742          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the input parameter as a basic type.", 0, 1, value);
1743          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the input parameter as a basic type.", 0, 1, value);
1744          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the input parameter as a basic type.", 0, 1, value);
1745          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the input parameter as a basic type.", 0, 1, value);
1746          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the input parameter as a basic type.", 0, 1, value);
1747          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the input parameter as a basic type.", 0, 1, value);
1748          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the input parameter as a basic type.", 0, 1, value);
1749          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the input parameter as a basic type.", 0, 1, value);
1750          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the input parameter as a basic type.", 0, 1, value);
1751          case 1281021610: /*valueContributor*/  return new Property("value[x]", "Contributor", "The value of the input parameter as a basic type.", 0, 1, value);
1752          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the input parameter as a basic type.", 0, 1, value);
1753          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the input parameter as a basic type.", 0, 1, value);
1754          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1755          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the input parameter as a basic type.", 0, 1, value);
1756          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1757          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the input parameter as a basic type.", 0, 1, value);
1758          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the input parameter as a basic type.", 0, 1, value);
1759          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1760          default: return super.getNamedProperty(_hash, _name, _checkValid);
1761          }
1762
1763        }
1764
1765      @Override
1766      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1767        switch (hash) {
1768        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1769        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1770        default: return super.getProperty(hash, name, checkValid);
1771        }
1772
1773      }
1774
1775      @Override
1776      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1777        switch (hash) {
1778        case 3575610: // type
1779          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1780          return value;
1781        case 111972721: // value
1782          this.value = TypeConvertor.castToType(value); // DataType
1783          return value;
1784        default: return super.setProperty(hash, name, value);
1785        }
1786
1787      }
1788
1789      @Override
1790      public Base setProperty(String name, Base value) throws FHIRException {
1791        if (name.equals("type")) {
1792          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1793        } else if (name.equals("value[x]")) {
1794          this.value = TypeConvertor.castToType(value); // DataType
1795        } else
1796          return super.setProperty(name, value);
1797        return value;
1798      }
1799
1800      @Override
1801      public Base makeProperty(int hash, String name) throws FHIRException {
1802        switch (hash) {
1803        case 3575610:  return getType();
1804        case -1410166417:  return getValue();
1805        case 111972721:  return getValue();
1806        default: return super.makeProperty(hash, name);
1807        }
1808
1809      }
1810
1811      @Override
1812      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1813        switch (hash) {
1814        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1815        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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
1816        default: return super.getTypesForProperty(hash, name);
1817        }
1818
1819      }
1820
1821      @Override
1822      public Base addChild(String name) throws FHIRException {
1823        if (name.equals("type")) {
1824          this.type = new CodeableConcept();
1825          return this.type;
1826        }
1827        else if (name.equals("valueBase64Binary")) {
1828          this.value = new Base64BinaryType();
1829          return this.value;
1830        }
1831        else if (name.equals("valueBoolean")) {
1832          this.value = new BooleanType();
1833          return this.value;
1834        }
1835        else if (name.equals("valueCanonical")) {
1836          this.value = new CanonicalType();
1837          return this.value;
1838        }
1839        else if (name.equals("valueCode")) {
1840          this.value = new CodeType();
1841          return this.value;
1842        }
1843        else if (name.equals("valueDate")) {
1844          this.value = new DateType();
1845          return this.value;
1846        }
1847        else if (name.equals("valueDateTime")) {
1848          this.value = new DateTimeType();
1849          return this.value;
1850        }
1851        else if (name.equals("valueDecimal")) {
1852          this.value = new DecimalType();
1853          return this.value;
1854        }
1855        else if (name.equals("valueId")) {
1856          this.value = new IdType();
1857          return this.value;
1858        }
1859        else if (name.equals("valueInstant")) {
1860          this.value = new InstantType();
1861          return this.value;
1862        }
1863        else if (name.equals("valueInteger")) {
1864          this.value = new IntegerType();
1865          return this.value;
1866        }
1867        else if (name.equals("valueInteger64")) {
1868          this.value = new Integer64Type();
1869          return this.value;
1870        }
1871        else if (name.equals("valueMarkdown")) {
1872          this.value = new MarkdownType();
1873          return this.value;
1874        }
1875        else if (name.equals("valueOid")) {
1876          this.value = new OidType();
1877          return this.value;
1878        }
1879        else if (name.equals("valuePositiveInt")) {
1880          this.value = new PositiveIntType();
1881          return this.value;
1882        }
1883        else if (name.equals("valueString")) {
1884          this.value = new StringType();
1885          return this.value;
1886        }
1887        else if (name.equals("valueTime")) {
1888          this.value = new TimeType();
1889          return this.value;
1890        }
1891        else if (name.equals("valueUnsignedInt")) {
1892          this.value = new UnsignedIntType();
1893          return this.value;
1894        }
1895        else if (name.equals("valueUri")) {
1896          this.value = new UriType();
1897          return this.value;
1898        }
1899        else if (name.equals("valueUrl")) {
1900          this.value = new UrlType();
1901          return this.value;
1902        }
1903        else if (name.equals("valueUuid")) {
1904          this.value = new UuidType();
1905          return this.value;
1906        }
1907        else if (name.equals("valueAddress")) {
1908          this.value = new Address();
1909          return this.value;
1910        }
1911        else if (name.equals("valueAge")) {
1912          this.value = new Age();
1913          return this.value;
1914        }
1915        else if (name.equals("valueAnnotation")) {
1916          this.value = new Annotation();
1917          return this.value;
1918        }
1919        else if (name.equals("valueAttachment")) {
1920          this.value = new Attachment();
1921          return this.value;
1922        }
1923        else if (name.equals("valueCodeableConcept")) {
1924          this.value = new CodeableConcept();
1925          return this.value;
1926        }
1927        else if (name.equals("valueCodeableReference")) {
1928          this.value = new CodeableReference();
1929          return this.value;
1930        }
1931        else if (name.equals("valueCoding")) {
1932          this.value = new Coding();
1933          return this.value;
1934        }
1935        else if (name.equals("valueContactPoint")) {
1936          this.value = new ContactPoint();
1937          return this.value;
1938        }
1939        else if (name.equals("valueCount")) {
1940          this.value = new Count();
1941          return this.value;
1942        }
1943        else if (name.equals("valueDistance")) {
1944          this.value = new Distance();
1945          return this.value;
1946        }
1947        else if (name.equals("valueDuration")) {
1948          this.value = new Duration();
1949          return this.value;
1950        }
1951        else if (name.equals("valueHumanName")) {
1952          this.value = new HumanName();
1953          return this.value;
1954        }
1955        else if (name.equals("valueIdentifier")) {
1956          this.value = new Identifier();
1957          return this.value;
1958        }
1959        else if (name.equals("valueMoney")) {
1960          this.value = new Money();
1961          return this.value;
1962        }
1963        else if (name.equals("valuePeriod")) {
1964          this.value = new Period();
1965          return this.value;
1966        }
1967        else if (name.equals("valueQuantity")) {
1968          this.value = new Quantity();
1969          return this.value;
1970        }
1971        else if (name.equals("valueRange")) {
1972          this.value = new Range();
1973          return this.value;
1974        }
1975        else if (name.equals("valueRatio")) {
1976          this.value = new Ratio();
1977          return this.value;
1978        }
1979        else if (name.equals("valueRatioRange")) {
1980          this.value = new RatioRange();
1981          return this.value;
1982        }
1983        else if (name.equals("valueReference")) {
1984          this.value = new Reference();
1985          return this.value;
1986        }
1987        else if (name.equals("valueSampledData")) {
1988          this.value = new SampledData();
1989          return this.value;
1990        }
1991        else if (name.equals("valueSignature")) {
1992          this.value = new Signature();
1993          return this.value;
1994        }
1995        else if (name.equals("valueTiming")) {
1996          this.value = new Timing();
1997          return this.value;
1998        }
1999        else if (name.equals("valueContactDetail")) {
2000          this.value = new ContactDetail();
2001          return this.value;
2002        }
2003        else if (name.equals("valueContributor")) {
2004          this.value = new Contributor();
2005          return this.value;
2006        }
2007        else if (name.equals("valueDataRequirement")) {
2008          this.value = new DataRequirement();
2009          return this.value;
2010        }
2011        else if (name.equals("valueExpression")) {
2012          this.value = new Expression();
2013          return this.value;
2014        }
2015        else if (name.equals("valueParameterDefinition")) {
2016          this.value = new ParameterDefinition();
2017          return this.value;
2018        }
2019        else if (name.equals("valueRelatedArtifact")) {
2020          this.value = new RelatedArtifact();
2021          return this.value;
2022        }
2023        else if (name.equals("valueTriggerDefinition")) {
2024          this.value = new TriggerDefinition();
2025          return this.value;
2026        }
2027        else if (name.equals("valueUsageContext")) {
2028          this.value = new UsageContext();
2029          return this.value;
2030        }
2031        else if (name.equals("valueDosage")) {
2032          this.value = new Dosage();
2033          return this.value;
2034        }
2035        else if (name.equals("valueMeta")) {
2036          this.value = new Meta();
2037          return this.value;
2038        }
2039        else
2040          return super.addChild(name);
2041      }
2042
2043      public ParameterComponent copy() {
2044        ParameterComponent dst = new ParameterComponent();
2045        copyValues(dst);
2046        return dst;
2047      }
2048
2049      public void copyValues(ParameterComponent dst) {
2050        super.copyValues(dst);
2051        dst.type = type == null ? null : type.copy();
2052        dst.value = value == null ? null : value.copy();
2053      }
2054
2055      @Override
2056      public boolean equalsDeep(Base other_) {
2057        if (!super.equalsDeep(other_))
2058          return false;
2059        if (!(other_ instanceof ParameterComponent))
2060          return false;
2061        ParameterComponent o = (ParameterComponent) other_;
2062        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
2063      }
2064
2065      @Override
2066      public boolean equalsShallow(Base other_) {
2067        if (!super.equalsShallow(other_))
2068          return false;
2069        if (!(other_ instanceof ParameterComponent))
2070          return false;
2071        ParameterComponent o = (ParameterComponent) other_;
2072        return true;
2073      }
2074
2075      public boolean isEmpty() {
2076        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
2077      }
2078
2079  public String fhirType() {
2080    return "Task.input";
2081
2082  }
2083
2084  }
2085
2086    @Block()
2087    public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement {
2088        /**
2089         * The name of the Output parameter.
2090         */
2091        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
2092        @Description(shortDefinition="Label for output", formalDefinition="The name of the Output parameter." )
2093        protected CodeableConcept type;
2094
2095        /**
2096         * The value of the Output parameter as a basic type.
2097         */
2098        @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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
2099        @Description(shortDefinition="Result of output", formalDefinition="The value of the Output parameter as a basic type." )
2100        protected DataType value;
2101
2102        private static final long serialVersionUID = -1659186716L;
2103
2104    /**
2105     * Constructor
2106     */
2107      public TaskOutputComponent() {
2108        super();
2109      }
2110
2111    /**
2112     * Constructor
2113     */
2114      public TaskOutputComponent(CodeableConcept type, DataType value) {
2115        super();
2116        this.setType(type);
2117        this.setValue(value);
2118      }
2119
2120        /**
2121         * @return {@link #type} (The name of the Output parameter.)
2122         */
2123        public CodeableConcept getType() { 
2124          if (this.type == null)
2125            if (Configuration.errorOnAutoCreate())
2126              throw new Error("Attempt to auto-create TaskOutputComponent.type");
2127            else if (Configuration.doAutoCreate())
2128              this.type = new CodeableConcept(); // cc
2129          return this.type;
2130        }
2131
2132        public boolean hasType() { 
2133          return this.type != null && !this.type.isEmpty();
2134        }
2135
2136        /**
2137         * @param value {@link #type} (The name of the Output parameter.)
2138         */
2139        public TaskOutputComponent setType(CodeableConcept value) { 
2140          this.type = value;
2141          return this;
2142        }
2143
2144        /**
2145         * @return {@link #value} (The value of the Output parameter as a basic type.)
2146         */
2147        public DataType getValue() { 
2148          return this.value;
2149        }
2150
2151        /**
2152         * @return {@link #value} (The value of the Output parameter as a basic type.)
2153         */
2154        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
2155          if (this.value == null)
2156            this.value = new Base64BinaryType();
2157          if (!(this.value instanceof Base64BinaryType))
2158            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
2159          return (Base64BinaryType) this.value;
2160        }
2161
2162        public boolean hasValueBase64BinaryType() { 
2163          return this != null && this.value instanceof Base64BinaryType;
2164        }
2165
2166        /**
2167         * @return {@link #value} (The value of the Output parameter as a basic type.)
2168         */
2169        public BooleanType getValueBooleanType() throws FHIRException { 
2170          if (this.value == null)
2171            this.value = new BooleanType();
2172          if (!(this.value instanceof BooleanType))
2173            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2174          return (BooleanType) this.value;
2175        }
2176
2177        public boolean hasValueBooleanType() { 
2178          return this != null && this.value instanceof BooleanType;
2179        }
2180
2181        /**
2182         * @return {@link #value} (The value of the Output parameter as a basic type.)
2183         */
2184        public CanonicalType getValueCanonicalType() throws FHIRException { 
2185          if (this.value == null)
2186            this.value = new CanonicalType();
2187          if (!(this.value instanceof CanonicalType))
2188            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
2189          return (CanonicalType) this.value;
2190        }
2191
2192        public boolean hasValueCanonicalType() { 
2193          return this != null && this.value instanceof CanonicalType;
2194        }
2195
2196        /**
2197         * @return {@link #value} (The value of the Output parameter as a basic type.)
2198         */
2199        public CodeType getValueCodeType() throws FHIRException { 
2200          if (this.value == null)
2201            this.value = new CodeType();
2202          if (!(this.value instanceof CodeType))
2203            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
2204          return (CodeType) this.value;
2205        }
2206
2207        public boolean hasValueCodeType() { 
2208          return this != null && this.value instanceof CodeType;
2209        }
2210
2211        /**
2212         * @return {@link #value} (The value of the Output parameter as a basic type.)
2213         */
2214        public DateType getValueDateType() throws FHIRException { 
2215          if (this.value == null)
2216            this.value = new DateType();
2217          if (!(this.value instanceof DateType))
2218            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
2219          return (DateType) this.value;
2220        }
2221
2222        public boolean hasValueDateType() { 
2223          return this != null && this.value instanceof DateType;
2224        }
2225
2226        /**
2227         * @return {@link #value} (The value of the Output parameter as a basic type.)
2228         */
2229        public DateTimeType getValueDateTimeType() throws FHIRException { 
2230          if (this.value == null)
2231            this.value = new DateTimeType();
2232          if (!(this.value instanceof DateTimeType))
2233            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2234          return (DateTimeType) this.value;
2235        }
2236
2237        public boolean hasValueDateTimeType() { 
2238          return this != null && this.value instanceof DateTimeType;
2239        }
2240
2241        /**
2242         * @return {@link #value} (The value of the Output parameter as a basic type.)
2243         */
2244        public DecimalType getValueDecimalType() throws FHIRException { 
2245          if (this.value == null)
2246            this.value = new DecimalType();
2247          if (!(this.value instanceof DecimalType))
2248            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2249          return (DecimalType) this.value;
2250        }
2251
2252        public boolean hasValueDecimalType() { 
2253          return this != null && this.value instanceof DecimalType;
2254        }
2255
2256        /**
2257         * @return {@link #value} (The value of the Output parameter as a basic type.)
2258         */
2259        public IdType getValueIdType() throws FHIRException { 
2260          if (this.value == null)
2261            this.value = new IdType();
2262          if (!(this.value instanceof IdType))
2263            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
2264          return (IdType) this.value;
2265        }
2266
2267        public boolean hasValueIdType() { 
2268          return this != null && this.value instanceof IdType;
2269        }
2270
2271        /**
2272         * @return {@link #value} (The value of the Output parameter as a basic type.)
2273         */
2274        public InstantType getValueInstantType() throws FHIRException { 
2275          if (this.value == null)
2276            this.value = new InstantType();
2277          if (!(this.value instanceof InstantType))
2278            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
2279          return (InstantType) this.value;
2280        }
2281
2282        public boolean hasValueInstantType() { 
2283          return this != null && this.value instanceof InstantType;
2284        }
2285
2286        /**
2287         * @return {@link #value} (The value of the Output parameter as a basic type.)
2288         */
2289        public IntegerType getValueIntegerType() throws FHIRException { 
2290          if (this.value == null)
2291            this.value = new IntegerType();
2292          if (!(this.value instanceof IntegerType))
2293            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2294          return (IntegerType) this.value;
2295        }
2296
2297        public boolean hasValueIntegerType() { 
2298          return this != null && this.value instanceof IntegerType;
2299        }
2300
2301        /**
2302         * @return {@link #value} (The value of the Output parameter as a basic type.)
2303         */
2304        public Integer64Type getValueInteger64Type() throws FHIRException { 
2305          if (this.value == null)
2306            this.value = new Integer64Type();
2307          if (!(this.value instanceof Integer64Type))
2308            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
2309          return (Integer64Type) this.value;
2310        }
2311
2312        public boolean hasValueInteger64Type() { 
2313          return this != null && this.value instanceof Integer64Type;
2314        }
2315
2316        /**
2317         * @return {@link #value} (The value of the Output parameter as a basic type.)
2318         */
2319        public MarkdownType getValueMarkdownType() throws FHIRException { 
2320          if (this.value == null)
2321            this.value = new MarkdownType();
2322          if (!(this.value instanceof MarkdownType))
2323            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
2324          return (MarkdownType) this.value;
2325        }
2326
2327        public boolean hasValueMarkdownType() { 
2328          return this != null && this.value instanceof MarkdownType;
2329        }
2330
2331        /**
2332         * @return {@link #value} (The value of the Output parameter as a basic type.)
2333         */
2334        public OidType getValueOidType() throws FHIRException { 
2335          if (this.value == null)
2336            this.value = new OidType();
2337          if (!(this.value instanceof OidType))
2338            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
2339          return (OidType) this.value;
2340        }
2341
2342        public boolean hasValueOidType() { 
2343          return this != null && this.value instanceof OidType;
2344        }
2345
2346        /**
2347         * @return {@link #value} (The value of the Output parameter as a basic type.)
2348         */
2349        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
2350          if (this.value == null)
2351            this.value = new PositiveIntType();
2352          if (!(this.value instanceof PositiveIntType))
2353            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2354          return (PositiveIntType) this.value;
2355        }
2356
2357        public boolean hasValuePositiveIntType() { 
2358          return this != null && this.value instanceof PositiveIntType;
2359        }
2360
2361        /**
2362         * @return {@link #value} (The value of the Output parameter as a basic type.)
2363         */
2364        public StringType getValueStringType() throws FHIRException { 
2365          if (this.value == null)
2366            this.value = new StringType();
2367          if (!(this.value instanceof StringType))
2368            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2369          return (StringType) this.value;
2370        }
2371
2372        public boolean hasValueStringType() { 
2373          return this != null && this.value instanceof StringType;
2374        }
2375
2376        /**
2377         * @return {@link #value} (The value of the Output parameter as a basic type.)
2378         */
2379        public TimeType getValueTimeType() throws FHIRException { 
2380          if (this.value == null)
2381            this.value = new TimeType();
2382          if (!(this.value instanceof TimeType))
2383            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2384          return (TimeType) this.value;
2385        }
2386
2387        public boolean hasValueTimeType() { 
2388          return this != null && this.value instanceof TimeType;
2389        }
2390
2391        /**
2392         * @return {@link #value} (The value of the Output parameter as a basic type.)
2393         */
2394        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
2395          if (this.value == null)
2396            this.value = new UnsignedIntType();
2397          if (!(this.value instanceof UnsignedIntType))
2398            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2399          return (UnsignedIntType) this.value;
2400        }
2401
2402        public boolean hasValueUnsignedIntType() { 
2403          return this != null && this.value instanceof UnsignedIntType;
2404        }
2405
2406        /**
2407         * @return {@link #value} (The value of the Output parameter as a basic type.)
2408         */
2409        public UriType getValueUriType() throws FHIRException { 
2410          if (this.value == null)
2411            this.value = new UriType();
2412          if (!(this.value instanceof UriType))
2413            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2414          return (UriType) this.value;
2415        }
2416
2417        public boolean hasValueUriType() { 
2418          return this != null && this.value instanceof UriType;
2419        }
2420
2421        /**
2422         * @return {@link #value} (The value of the Output parameter as a basic type.)
2423         */
2424        public UrlType getValueUrlType() throws FHIRException { 
2425          if (this.value == null)
2426            this.value = new UrlType();
2427          if (!(this.value instanceof UrlType))
2428            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
2429          return (UrlType) this.value;
2430        }
2431
2432        public boolean hasValueUrlType() { 
2433          return this != null && this.value instanceof UrlType;
2434        }
2435
2436        /**
2437         * @return {@link #value} (The value of the Output parameter as a basic type.)
2438         */
2439        public UuidType getValueUuidType() throws FHIRException { 
2440          if (this.value == null)
2441            this.value = new UuidType();
2442          if (!(this.value instanceof UuidType))
2443            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
2444          return (UuidType) this.value;
2445        }
2446
2447        public boolean hasValueUuidType() { 
2448          return this != null && this.value instanceof UuidType;
2449        }
2450
2451        /**
2452         * @return {@link #value} (The value of the Output parameter as a basic type.)
2453         */
2454        public Address getValueAddress() throws FHIRException { 
2455          if (this.value == null)
2456            this.value = new Address();
2457          if (!(this.value instanceof Address))
2458            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
2459          return (Address) this.value;
2460        }
2461
2462        public boolean hasValueAddress() { 
2463          return this != null && this.value instanceof Address;
2464        }
2465
2466        /**
2467         * @return {@link #value} (The value of the Output parameter as a basic type.)
2468         */
2469        public Age getValueAge() throws FHIRException { 
2470          if (this.value == null)
2471            this.value = new Age();
2472          if (!(this.value instanceof Age))
2473            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
2474          return (Age) this.value;
2475        }
2476
2477        public boolean hasValueAge() { 
2478          return this != null && this.value instanceof Age;
2479        }
2480
2481        /**
2482         * @return {@link #value} (The value of the Output parameter as a basic type.)
2483         */
2484        public Annotation getValueAnnotation() throws FHIRException { 
2485          if (this.value == null)
2486            this.value = new Annotation();
2487          if (!(this.value instanceof Annotation))
2488            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
2489          return (Annotation) this.value;
2490        }
2491
2492        public boolean hasValueAnnotation() { 
2493          return this != null && this.value instanceof Annotation;
2494        }
2495
2496        /**
2497         * @return {@link #value} (The value of the Output parameter as a basic type.)
2498         */
2499        public Attachment getValueAttachment() throws FHIRException { 
2500          if (this.value == null)
2501            this.value = new Attachment();
2502          if (!(this.value instanceof Attachment))
2503            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
2504          return (Attachment) this.value;
2505        }
2506
2507        public boolean hasValueAttachment() { 
2508          return this != null && this.value instanceof Attachment;
2509        }
2510
2511        /**
2512         * @return {@link #value} (The value of the Output parameter as a basic type.)
2513         */
2514        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
2515          if (this.value == null)
2516            this.value = new CodeableConcept();
2517          if (!(this.value instanceof CodeableConcept))
2518            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
2519          return (CodeableConcept) this.value;
2520        }
2521
2522        public boolean hasValueCodeableConcept() { 
2523          return this != null && this.value instanceof CodeableConcept;
2524        }
2525
2526        /**
2527         * @return {@link #value} (The value of the Output parameter as a basic type.)
2528         */
2529        public CodeableReference getValueCodeableReference() throws FHIRException { 
2530          if (this.value == null)
2531            this.value = new CodeableReference();
2532          if (!(this.value instanceof CodeableReference))
2533            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
2534          return (CodeableReference) this.value;
2535        }
2536
2537        public boolean hasValueCodeableReference() { 
2538          return this != null && this.value instanceof CodeableReference;
2539        }
2540
2541        /**
2542         * @return {@link #value} (The value of the Output parameter as a basic type.)
2543         */
2544        public Coding getValueCoding() throws FHIRException { 
2545          if (this.value == null)
2546            this.value = new Coding();
2547          if (!(this.value instanceof Coding))
2548            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
2549          return (Coding) this.value;
2550        }
2551
2552        public boolean hasValueCoding() { 
2553          return this != null && this.value instanceof Coding;
2554        }
2555
2556        /**
2557         * @return {@link #value} (The value of the Output parameter as a basic type.)
2558         */
2559        public ContactPoint getValueContactPoint() throws FHIRException { 
2560          if (this.value == null)
2561            this.value = new ContactPoint();
2562          if (!(this.value instanceof ContactPoint))
2563            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
2564          return (ContactPoint) this.value;
2565        }
2566
2567        public boolean hasValueContactPoint() { 
2568          return this != null && this.value instanceof ContactPoint;
2569        }
2570
2571        /**
2572         * @return {@link #value} (The value of the Output parameter as a basic type.)
2573         */
2574        public Count getValueCount() throws FHIRException { 
2575          if (this.value == null)
2576            this.value = new Count();
2577          if (!(this.value instanceof Count))
2578            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
2579          return (Count) this.value;
2580        }
2581
2582        public boolean hasValueCount() { 
2583          return this != null && this.value instanceof Count;
2584        }
2585
2586        /**
2587         * @return {@link #value} (The value of the Output parameter as a basic type.)
2588         */
2589        public Distance getValueDistance() throws FHIRException { 
2590          if (this.value == null)
2591            this.value = new Distance();
2592          if (!(this.value instanceof Distance))
2593            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
2594          return (Distance) this.value;
2595        }
2596
2597        public boolean hasValueDistance() { 
2598          return this != null && this.value instanceof Distance;
2599        }
2600
2601        /**
2602         * @return {@link #value} (The value of the Output parameter as a basic type.)
2603         */
2604        public Duration getValueDuration() throws FHIRException { 
2605          if (this.value == null)
2606            this.value = new Duration();
2607          if (!(this.value instanceof Duration))
2608            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
2609          return (Duration) this.value;
2610        }
2611
2612        public boolean hasValueDuration() { 
2613          return this != null && this.value instanceof Duration;
2614        }
2615
2616        /**
2617         * @return {@link #value} (The value of the Output parameter as a basic type.)
2618         */
2619        public HumanName getValueHumanName() throws FHIRException { 
2620          if (this.value == null)
2621            this.value = new HumanName();
2622          if (!(this.value instanceof HumanName))
2623            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
2624          return (HumanName) this.value;
2625        }
2626
2627        public boolean hasValueHumanName() { 
2628          return this != null && this.value instanceof HumanName;
2629        }
2630
2631        /**
2632         * @return {@link #value} (The value of the Output parameter as a basic type.)
2633         */
2634        public Identifier getValueIdentifier() throws FHIRException { 
2635          if (this.value == null)
2636            this.value = new Identifier();
2637          if (!(this.value instanceof Identifier))
2638            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
2639          return (Identifier) this.value;
2640        }
2641
2642        public boolean hasValueIdentifier() { 
2643          return this != null && this.value instanceof Identifier;
2644        }
2645
2646        /**
2647         * @return {@link #value} (The value of the Output parameter as a basic type.)
2648         */
2649        public Money getValueMoney() throws FHIRException { 
2650          if (this.value == null)
2651            this.value = new Money();
2652          if (!(this.value instanceof Money))
2653            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
2654          return (Money) this.value;
2655        }
2656
2657        public boolean hasValueMoney() { 
2658          return this != null && this.value instanceof Money;
2659        }
2660
2661        /**
2662         * @return {@link #value} (The value of the Output parameter as a basic type.)
2663         */
2664        public Period getValuePeriod() throws FHIRException { 
2665          if (this.value == null)
2666            this.value = new Period();
2667          if (!(this.value instanceof Period))
2668            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
2669          return (Period) this.value;
2670        }
2671
2672        public boolean hasValuePeriod() { 
2673          return this != null && this.value instanceof Period;
2674        }
2675
2676        /**
2677         * @return {@link #value} (The value of the Output parameter as a basic type.)
2678         */
2679        public Quantity getValueQuantity() throws FHIRException { 
2680          if (this.value == null)
2681            this.value = new Quantity();
2682          if (!(this.value instanceof Quantity))
2683            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
2684          return (Quantity) this.value;
2685        }
2686
2687        public boolean hasValueQuantity() { 
2688          return this != null && this.value instanceof Quantity;
2689        }
2690
2691        /**
2692         * @return {@link #value} (The value of the Output parameter as a basic type.)
2693         */
2694        public Range getValueRange() throws FHIRException { 
2695          if (this.value == null)
2696            this.value = new Range();
2697          if (!(this.value instanceof Range))
2698            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
2699          return (Range) this.value;
2700        }
2701
2702        public boolean hasValueRange() { 
2703          return this != null && this.value instanceof Range;
2704        }
2705
2706        /**
2707         * @return {@link #value} (The value of the Output parameter as a basic type.)
2708         */
2709        public Ratio getValueRatio() throws FHIRException { 
2710          if (this.value == null)
2711            this.value = new Ratio();
2712          if (!(this.value instanceof Ratio))
2713            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
2714          return (Ratio) this.value;
2715        }
2716
2717        public boolean hasValueRatio() { 
2718          return this != null && this.value instanceof Ratio;
2719        }
2720
2721        /**
2722         * @return {@link #value} (The value of the Output parameter as a basic type.)
2723         */
2724        public RatioRange getValueRatioRange() throws FHIRException { 
2725          if (this.value == null)
2726            this.value = new RatioRange();
2727          if (!(this.value instanceof RatioRange))
2728            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
2729          return (RatioRange) this.value;
2730        }
2731
2732        public boolean hasValueRatioRange() { 
2733          return this != null && this.value instanceof RatioRange;
2734        }
2735
2736        /**
2737         * @return {@link #value} (The value of the Output parameter as a basic type.)
2738         */
2739        public Reference getValueReference() throws FHIRException { 
2740          if (this.value == null)
2741            this.value = new Reference();
2742          if (!(this.value instanceof Reference))
2743            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
2744          return (Reference) this.value;
2745        }
2746
2747        public boolean hasValueReference() { 
2748          return this != null && this.value instanceof Reference;
2749        }
2750
2751        /**
2752         * @return {@link #value} (The value of the Output parameter as a basic type.)
2753         */
2754        public SampledData getValueSampledData() throws FHIRException { 
2755          if (this.value == null)
2756            this.value = new SampledData();
2757          if (!(this.value instanceof SampledData))
2758            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
2759          return (SampledData) this.value;
2760        }
2761
2762        public boolean hasValueSampledData() { 
2763          return this != null && this.value instanceof SampledData;
2764        }
2765
2766        /**
2767         * @return {@link #value} (The value of the Output parameter as a basic type.)
2768         */
2769        public Signature getValueSignature() throws FHIRException { 
2770          if (this.value == null)
2771            this.value = new Signature();
2772          if (!(this.value instanceof Signature))
2773            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
2774          return (Signature) this.value;
2775        }
2776
2777        public boolean hasValueSignature() { 
2778          return this != null && this.value instanceof Signature;
2779        }
2780
2781        /**
2782         * @return {@link #value} (The value of the Output parameter as a basic type.)
2783         */
2784        public Timing getValueTiming() throws FHIRException { 
2785          if (this.value == null)
2786            this.value = new Timing();
2787          if (!(this.value instanceof Timing))
2788            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
2789          return (Timing) this.value;
2790        }
2791
2792        public boolean hasValueTiming() { 
2793          return this != null && this.value instanceof Timing;
2794        }
2795
2796        /**
2797         * @return {@link #value} (The value of the Output parameter as a basic type.)
2798         */
2799        public ContactDetail getValueContactDetail() throws FHIRException { 
2800          if (this.value == null)
2801            this.value = new ContactDetail();
2802          if (!(this.value instanceof ContactDetail))
2803            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
2804          return (ContactDetail) this.value;
2805        }
2806
2807        public boolean hasValueContactDetail() { 
2808          return this != null && this.value instanceof ContactDetail;
2809        }
2810
2811        /**
2812         * @return {@link #value} (The value of the Output parameter as a basic type.)
2813         */
2814        public Contributor getValueContributor() throws FHIRException { 
2815          if (this.value == null)
2816            this.value = new Contributor();
2817          if (!(this.value instanceof Contributor))
2818            throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.value.getClass().getName()+" was encountered");
2819          return (Contributor) this.value;
2820        }
2821
2822        public boolean hasValueContributor() { 
2823          return this != null && this.value instanceof Contributor;
2824        }
2825
2826        /**
2827         * @return {@link #value} (The value of the Output parameter as a basic type.)
2828         */
2829        public DataRequirement getValueDataRequirement() throws FHIRException { 
2830          if (this.value == null)
2831            this.value = new DataRequirement();
2832          if (!(this.value instanceof DataRequirement))
2833            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
2834          return (DataRequirement) this.value;
2835        }
2836
2837        public boolean hasValueDataRequirement() { 
2838          return this != null && this.value instanceof DataRequirement;
2839        }
2840
2841        /**
2842         * @return {@link #value} (The value of the Output parameter as a basic type.)
2843         */
2844        public Expression getValueExpression() throws FHIRException { 
2845          if (this.value == null)
2846            this.value = new Expression();
2847          if (!(this.value instanceof Expression))
2848            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
2849          return (Expression) this.value;
2850        }
2851
2852        public boolean hasValueExpression() { 
2853          return this != null && this.value instanceof Expression;
2854        }
2855
2856        /**
2857         * @return {@link #value} (The value of the Output parameter as a basic type.)
2858         */
2859        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
2860          if (this.value == null)
2861            this.value = new ParameterDefinition();
2862          if (!(this.value instanceof ParameterDefinition))
2863            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
2864          return (ParameterDefinition) this.value;
2865        }
2866
2867        public boolean hasValueParameterDefinition() { 
2868          return this != null && this.value instanceof ParameterDefinition;
2869        }
2870
2871        /**
2872         * @return {@link #value} (The value of the Output parameter as a basic type.)
2873         */
2874        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
2875          if (this.value == null)
2876            this.value = new RelatedArtifact();
2877          if (!(this.value instanceof RelatedArtifact))
2878            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
2879          return (RelatedArtifact) this.value;
2880        }
2881
2882        public boolean hasValueRelatedArtifact() { 
2883          return this != null && this.value instanceof RelatedArtifact;
2884        }
2885
2886        /**
2887         * @return {@link #value} (The value of the Output parameter as a basic type.)
2888         */
2889        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
2890          if (this.value == null)
2891            this.value = new TriggerDefinition();
2892          if (!(this.value instanceof TriggerDefinition))
2893            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
2894          return (TriggerDefinition) this.value;
2895        }
2896
2897        public boolean hasValueTriggerDefinition() { 
2898          return this != null && this.value instanceof TriggerDefinition;
2899        }
2900
2901        /**
2902         * @return {@link #value} (The value of the Output parameter as a basic type.)
2903         */
2904        public UsageContext getValueUsageContext() throws FHIRException { 
2905          if (this.value == null)
2906            this.value = new UsageContext();
2907          if (!(this.value instanceof UsageContext))
2908            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
2909          return (UsageContext) this.value;
2910        }
2911
2912        public boolean hasValueUsageContext() { 
2913          return this != null && this.value instanceof UsageContext;
2914        }
2915
2916        /**
2917         * @return {@link #value} (The value of the Output parameter as a basic type.)
2918         */
2919        public Dosage getValueDosage() throws FHIRException { 
2920          if (this.value == null)
2921            this.value = new Dosage();
2922          if (!(this.value instanceof Dosage))
2923            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
2924          return (Dosage) this.value;
2925        }
2926
2927        public boolean hasValueDosage() { 
2928          return this != null && this.value instanceof Dosage;
2929        }
2930
2931        /**
2932         * @return {@link #value} (The value of the Output parameter as a basic type.)
2933         */
2934        public Meta getValueMeta() throws FHIRException { 
2935          if (this.value == null)
2936            this.value = new Meta();
2937          if (!(this.value instanceof Meta))
2938            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
2939          return (Meta) this.value;
2940        }
2941
2942        public boolean hasValueMeta() { 
2943          return this != null && this.value instanceof Meta;
2944        }
2945
2946        public boolean hasValue() { 
2947          return this.value != null && !this.value.isEmpty();
2948        }
2949
2950        /**
2951         * @param value {@link #value} (The value of the Output parameter as a basic type.)
2952         */
2953        public TaskOutputComponent setValue(DataType value) { 
2954          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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
2955            throw new Error("Not the right type for Task.output.value[x]: "+value.fhirType());
2956          this.value = value;
2957          return this;
2958        }
2959
2960        protected void listChildren(List<Property> children) {
2961          super.listChildren(children);
2962          children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type));
2963          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value));
2964        }
2965
2966        @Override
2967        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2968          switch (_hash) {
2969          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type);
2970          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
2971          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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
2972          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the Output parameter as a basic type.", 0, 1, value);
2973          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the Output parameter as a basic type.", 0, 1, value);
2974          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the Output parameter as a basic type.", 0, 1, value);
2975          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the Output parameter as a basic type.", 0, 1, value);
2976          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the Output parameter as a basic type.", 0, 1, value);
2977          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the Output parameter as a basic type.", 0, 1, value);
2978          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the Output parameter as a basic type.", 0, 1, value);
2979          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the Output parameter as a basic type.", 0, 1, value);
2980          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the Output parameter as a basic type.", 0, 1, value);
2981          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the Output parameter as a basic type.", 0, 1, value);
2982          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the Output parameter as a basic type.", 0, 1, value);
2983          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the Output parameter as a basic type.", 0, 1, value);
2984          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the Output parameter as a basic type.", 0, 1, value);
2985          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the Output parameter as a basic type.", 0, 1, value);
2986          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the Output parameter as a basic type.", 0, 1, value);
2987          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the Output parameter as a basic type.", 0, 1, value);
2988          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the Output parameter as a basic type.", 0, 1, value);
2989          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the Output parameter as a basic type.", 0, 1, value);
2990          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the Output parameter as a basic type.", 0, 1, value);
2991          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the Output parameter as a basic type.", 0, 1, value);
2992          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the Output parameter as a basic type.", 0, 1, value);
2993          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the Output parameter as a basic type.", 0, 1, value);
2994          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the Output parameter as a basic type.", 0, 1, value);
2995          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the Output parameter as a basic type.", 0, 1, value);
2996          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the Output parameter as a basic type.", 0, 1, value);
2997          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the Output parameter as a basic type.", 0, 1, value);
2998          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the Output parameter as a basic type.", 0, 1, value);
2999          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the Output parameter as a basic type.", 0, 1, value);
3000          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the Output parameter as a basic type.", 0, 1, value);
3001          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the Output parameter as a basic type.", 0, 1, value);
3002          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the Output parameter as a basic type.", 0, 1, value);
3003          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the Output parameter as a basic type.", 0, 1, value);
3004          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the Output parameter as a basic type.", 0, 1, value);
3005          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the Output parameter as a basic type.", 0, 1, value);
3006          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the Output parameter as a basic type.", 0, 1, value);
3007          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the Output parameter as a basic type.", 0, 1, value);
3008          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the Output parameter as a basic type.", 0, 1, value);
3009          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the Output parameter as a basic type.", 0, 1, value);
3010          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the Output parameter as a basic type.", 0, 1, value);
3011          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the Output parameter as a basic type.", 0, 1, value);
3012          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the Output parameter as a basic type.", 0, 1, value);
3013          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the Output parameter as a basic type.", 0, 1, value);
3014          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the Output parameter as a basic type.", 0, 1, value);
3015          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the Output parameter as a basic type.", 0, 1, value);
3016          case 1281021610: /*valueContributor*/  return new Property("value[x]", "Contributor", "The value of the Output parameter as a basic type.", 0, 1, value);
3017          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the Output parameter as a basic type.", 0, 1, value);
3018          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the Output parameter as a basic type.", 0, 1, value);
3019          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
3020          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the Output parameter as a basic type.", 0, 1, value);
3021          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
3022          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the Output parameter as a basic type.", 0, 1, value);
3023          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the Output parameter as a basic type.", 0, 1, value);
3024          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
3025          default: return super.getNamedProperty(_hash, _name, _checkValid);
3026          }
3027
3028        }
3029
3030      @Override
3031      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3032        switch (hash) {
3033        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
3034        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
3035        default: return super.getProperty(hash, name, checkValid);
3036        }
3037
3038      }
3039
3040      @Override
3041      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3042        switch (hash) {
3043        case 3575610: // type
3044          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3045          return value;
3046        case 111972721: // value
3047          this.value = TypeConvertor.castToType(value); // DataType
3048          return value;
3049        default: return super.setProperty(hash, name, value);
3050        }
3051
3052      }
3053
3054      @Override
3055      public Base setProperty(String name, Base value) throws FHIRException {
3056        if (name.equals("type")) {
3057          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3058        } else if (name.equals("value[x]")) {
3059          this.value = TypeConvertor.castToType(value); // DataType
3060        } else
3061          return super.setProperty(name, value);
3062        return value;
3063      }
3064
3065      @Override
3066      public Base makeProperty(int hash, String name) throws FHIRException {
3067        switch (hash) {
3068        case 3575610:  return getType();
3069        case -1410166417:  return getValue();
3070        case 111972721:  return getValue();
3071        default: return super.makeProperty(hash, name);
3072        }
3073
3074      }
3075
3076      @Override
3077      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3078        switch (hash) {
3079        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
3080        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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
3081        default: return super.getTypesForProperty(hash, name);
3082        }
3083
3084      }
3085
3086      @Override
3087      public Base addChild(String name) throws FHIRException {
3088        if (name.equals("type")) {
3089          this.type = new CodeableConcept();
3090          return this.type;
3091        }
3092        else if (name.equals("valueBase64Binary")) {
3093          this.value = new Base64BinaryType();
3094          return this.value;
3095        }
3096        else if (name.equals("valueBoolean")) {
3097          this.value = new BooleanType();
3098          return this.value;
3099        }
3100        else if (name.equals("valueCanonical")) {
3101          this.value = new CanonicalType();
3102          return this.value;
3103        }
3104        else if (name.equals("valueCode")) {
3105          this.value = new CodeType();
3106          return this.value;
3107        }
3108        else if (name.equals("valueDate")) {
3109          this.value = new DateType();
3110          return this.value;
3111        }
3112        else if (name.equals("valueDateTime")) {
3113          this.value = new DateTimeType();
3114          return this.value;
3115        }
3116        else if (name.equals("valueDecimal")) {
3117          this.value = new DecimalType();
3118          return this.value;
3119        }
3120        else if (name.equals("valueId")) {
3121          this.value = new IdType();
3122          return this.value;
3123        }
3124        else if (name.equals("valueInstant")) {
3125          this.value = new InstantType();
3126          return this.value;
3127        }
3128        else if (name.equals("valueInteger")) {
3129          this.value = new IntegerType();
3130          return this.value;
3131        }
3132        else if (name.equals("valueInteger64")) {
3133          this.value = new Integer64Type();
3134          return this.value;
3135        }
3136        else if (name.equals("valueMarkdown")) {
3137          this.value = new MarkdownType();
3138          return this.value;
3139        }
3140        else if (name.equals("valueOid")) {
3141          this.value = new OidType();
3142          return this.value;
3143        }
3144        else if (name.equals("valuePositiveInt")) {
3145          this.value = new PositiveIntType();
3146          return this.value;
3147        }
3148        else if (name.equals("valueString")) {
3149          this.value = new StringType();
3150          return this.value;
3151        }
3152        else if (name.equals("valueTime")) {
3153          this.value = new TimeType();
3154          return this.value;
3155        }
3156        else if (name.equals("valueUnsignedInt")) {
3157          this.value = new UnsignedIntType();
3158          return this.value;
3159        }
3160        else if (name.equals("valueUri")) {
3161          this.value = new UriType();
3162          return this.value;
3163        }
3164        else if (name.equals("valueUrl")) {
3165          this.value = new UrlType();
3166          return this.value;
3167        }
3168        else if (name.equals("valueUuid")) {
3169          this.value = new UuidType();
3170          return this.value;
3171        }
3172        else if (name.equals("valueAddress")) {
3173          this.value = new Address();
3174          return this.value;
3175        }
3176        else if (name.equals("valueAge")) {
3177          this.value = new Age();
3178          return this.value;
3179        }
3180        else if (name.equals("valueAnnotation")) {
3181          this.value = new Annotation();
3182          return this.value;
3183        }
3184        else if (name.equals("valueAttachment")) {
3185          this.value = new Attachment();
3186          return this.value;
3187        }
3188        else if (name.equals("valueCodeableConcept")) {
3189          this.value = new CodeableConcept();
3190          return this.value;
3191        }
3192        else if (name.equals("valueCodeableReference")) {
3193          this.value = new CodeableReference();
3194          return this.value;
3195        }
3196        else if (name.equals("valueCoding")) {
3197          this.value = new Coding();
3198          return this.value;
3199        }
3200        else if (name.equals("valueContactPoint")) {
3201          this.value = new ContactPoint();
3202          return this.value;
3203        }
3204        else if (name.equals("valueCount")) {
3205          this.value = new Count();
3206          return this.value;
3207        }
3208        else if (name.equals("valueDistance")) {
3209          this.value = new Distance();
3210          return this.value;
3211        }
3212        else if (name.equals("valueDuration")) {
3213          this.value = new Duration();
3214          return this.value;
3215        }
3216        else if (name.equals("valueHumanName")) {
3217          this.value = new HumanName();
3218          return this.value;
3219        }
3220        else if (name.equals("valueIdentifier")) {
3221          this.value = new Identifier();
3222          return this.value;
3223        }
3224        else if (name.equals("valueMoney")) {
3225          this.value = new Money();
3226          return this.value;
3227        }
3228        else if (name.equals("valuePeriod")) {
3229          this.value = new Period();
3230          return this.value;
3231        }
3232        else if (name.equals("valueQuantity")) {
3233          this.value = new Quantity();
3234          return this.value;
3235        }
3236        else if (name.equals("valueRange")) {
3237          this.value = new Range();
3238          return this.value;
3239        }
3240        else if (name.equals("valueRatio")) {
3241          this.value = new Ratio();
3242          return this.value;
3243        }
3244        else if (name.equals("valueRatioRange")) {
3245          this.value = new RatioRange();
3246          return this.value;
3247        }
3248        else if (name.equals("valueReference")) {
3249          this.value = new Reference();
3250          return this.value;
3251        }
3252        else if (name.equals("valueSampledData")) {
3253          this.value = new SampledData();
3254          return this.value;
3255        }
3256        else if (name.equals("valueSignature")) {
3257          this.value = new Signature();
3258          return this.value;
3259        }
3260        else if (name.equals("valueTiming")) {
3261          this.value = new Timing();
3262          return this.value;
3263        }
3264        else if (name.equals("valueContactDetail")) {
3265          this.value = new ContactDetail();
3266          return this.value;
3267        }
3268        else if (name.equals("valueContributor")) {
3269          this.value = new Contributor();
3270          return this.value;
3271        }
3272        else if (name.equals("valueDataRequirement")) {
3273          this.value = new DataRequirement();
3274          return this.value;
3275        }
3276        else if (name.equals("valueExpression")) {
3277          this.value = new Expression();
3278          return this.value;
3279        }
3280        else if (name.equals("valueParameterDefinition")) {
3281          this.value = new ParameterDefinition();
3282          return this.value;
3283        }
3284        else if (name.equals("valueRelatedArtifact")) {
3285          this.value = new RelatedArtifact();
3286          return this.value;
3287        }
3288        else if (name.equals("valueTriggerDefinition")) {
3289          this.value = new TriggerDefinition();
3290          return this.value;
3291        }
3292        else if (name.equals("valueUsageContext")) {
3293          this.value = new UsageContext();
3294          return this.value;
3295        }
3296        else if (name.equals("valueDosage")) {
3297          this.value = new Dosage();
3298          return this.value;
3299        }
3300        else if (name.equals("valueMeta")) {
3301          this.value = new Meta();
3302          return this.value;
3303        }
3304        else
3305          return super.addChild(name);
3306      }
3307
3308      public TaskOutputComponent copy() {
3309        TaskOutputComponent dst = new TaskOutputComponent();
3310        copyValues(dst);
3311        return dst;
3312      }
3313
3314      public void copyValues(TaskOutputComponent dst) {
3315        super.copyValues(dst);
3316        dst.type = type == null ? null : type.copy();
3317        dst.value = value == null ? null : value.copy();
3318      }
3319
3320      @Override
3321      public boolean equalsDeep(Base other_) {
3322        if (!super.equalsDeep(other_))
3323          return false;
3324        if (!(other_ instanceof TaskOutputComponent))
3325          return false;
3326        TaskOutputComponent o = (TaskOutputComponent) other_;
3327        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
3328      }
3329
3330      @Override
3331      public boolean equalsShallow(Base other_) {
3332        if (!super.equalsShallow(other_))
3333          return false;
3334        if (!(other_ instanceof TaskOutputComponent))
3335          return false;
3336        TaskOutputComponent o = (TaskOutputComponent) other_;
3337        return true;
3338      }
3339
3340      public boolean isEmpty() {
3341        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
3342      }
3343
3344  public String fhirType() {
3345    return "Task.output";
3346
3347  }
3348
3349  }
3350
3351    /**
3352     * The business identifier for this task.
3353     */
3354    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3355    @Description(shortDefinition="Task Instance Identifier", formalDefinition="The business identifier for this task." )
3356    protected List<Identifier> identifier;
3357
3358    /**
3359     * 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.
3360     */
3361    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=1, modifier=false, summary=true)
3362    @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." )
3363    protected CanonicalType instantiatesCanonical;
3364
3365    /**
3366     * 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.
3367     */
3368    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3369    @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." )
3370    protected UriType instantiatesUri;
3371
3372    /**
3373     * BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a "request" resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.
3374     */
3375    @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3376    @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, ServiceRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient." )
3377    protected List<Reference> basedOn;
3378
3379    /**
3380     * An identifier that links together multiple tasks and other requests that were created in the same context.
3381     */
3382    @Child(name = "groupIdentifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true)
3383    @Description(shortDefinition="Requisition or grouper id", formalDefinition="An identifier that links together multiple tasks and other requests that were created in the same context." )
3384    protected Identifier groupIdentifier;
3385
3386    /**
3387     * Task that this particular task is part of.
3388     */
3389    @Child(name = "partOf", type = {Task.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3390    @Description(shortDefinition="Composite task", formalDefinition="Task that this particular task is part of." )
3391    protected List<Reference> partOf;
3392
3393    /**
3394     * The current status of the task.
3395     */
3396    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
3397    @Description(shortDefinition="draft | requested | received | accepted | +", formalDefinition="The current status of the task." )
3398    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-status")
3399    protected Enumeration<TaskStatus> status;
3400
3401    /**
3402     * An explanation as to why this task is held, failed, was refused, etc.
3403     */
3404    @Child(name = "statusReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
3405    @Description(shortDefinition="Reason for current status", formalDefinition="An explanation as to why this task is held, failed, was refused, etc." )
3406    protected CodeableConcept statusReason;
3407
3408    /**
3409     * Contains business-specific nuances of the business state.
3410     */
3411    @Child(name = "businessStatus", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
3412    @Description(shortDefinition="E.g. \"Specimen collected\", \"IV prepped\"", formalDefinition="Contains business-specific nuances of the business state." )
3413    protected CodeableConcept businessStatus;
3414
3415    /**
3416     * 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.
3417     */
3418    @Child(name = "intent", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true)
3419    @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." )
3420    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-intent")
3421    protected Enumeration<TaskIntent> intent;
3422
3423    /**
3424     * Indicates how quickly the Task should be addressed with respect to other requests.
3425     */
3426    @Child(name = "priority", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false)
3427    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Task should be addressed with respect to other requests." )
3428    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
3429    protected Enumeration<RequestPriority> priority;
3430
3431    /**
3432     * A name or code (or both) briefly describing what the task involves.
3433     */
3434    @Child(name = "code", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true)
3435    @Description(shortDefinition="Task Type", formalDefinition="A name or code (or both) briefly describing what the task involves." )
3436    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-code")
3437    protected CodeableConcept code;
3438
3439    /**
3440     * A free-text description of what is to be performed.
3441     */
3442    @Child(name = "description", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
3443    @Description(shortDefinition="Human-readable explanation of task", formalDefinition="A free-text description of what is to be performed." )
3444    protected StringType description;
3445
3446    /**
3447     * The request being actioned or the resource being manipulated by this task.
3448     */
3449    @Child(name = "focus", type = {Reference.class}, order=13, min=0, max=1, modifier=false, summary=true)
3450    @Description(shortDefinition="What task is acting on", formalDefinition="The request being actioned or the resource being manipulated by this task." )
3451    protected Reference focus;
3452
3453    /**
3454     * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
3455     */
3456    @Child(name = "for", type = {Reference.class}, order=14, min=0, max=1, modifier=false, summary=true)
3457    @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)." )
3458    protected Reference for_;
3459
3460    /**
3461     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.
3462     */
3463    @Child(name = "encounter", type = {Encounter.class}, order=15, min=0, max=1, modifier=false, summary=true)
3464    @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." )
3465    protected Reference encounter;
3466
3467    /**
3468     * 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).
3469     */
3470    @Child(name = "executionPeriod", type = {Period.class}, order=16, min=0, max=1, modifier=false, summary=true)
3471    @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)." )
3472    protected Period executionPeriod;
3473
3474    /**
3475     * The date and time this task was created.
3476     */
3477    @Child(name = "authoredOn", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
3478    @Description(shortDefinition="Task Creation Date", formalDefinition="The date and time this task was created." )
3479    protected DateTimeType authoredOn;
3480
3481    /**
3482     * The date and time of last modification to this task.
3483     */
3484    @Child(name = "lastModified", type = {DateTimeType.class}, order=18, min=0, max=1, modifier=false, summary=true)
3485    @Description(shortDefinition="Task Last Modified Date", formalDefinition="The date and time of last modification to this task." )
3486    protected DateTimeType lastModified;
3487
3488    /**
3489     * The creator of the task.
3490     */
3491    @Child(name = "requester", type = {Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=19, min=0, max=1, modifier=false, summary=true)
3492    @Description(shortDefinition="Who is asking for task to be done", formalDefinition="The creator of the task." )
3493    protected Reference requester;
3494
3495    /**
3496     * The kind of participant that should perform the task.
3497     */
3498    @Child(name = "performerType", type = {CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3499    @Description(shortDefinition="Requested performer", formalDefinition="The kind of participant that should perform the task." )
3500    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
3501    protected List<CodeableConcept> performerType;
3502
3503    /**
3504     * Individual organization or Device currently responsible for task execution.
3505     */
3506    @Child(name = "owner", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, HealthcareService.class, Patient.class, Device.class, RelatedPerson.class}, order=21, min=0, max=1, modifier=false, summary=true)
3507    @Description(shortDefinition="Responsible individual", formalDefinition="Individual organization or Device currently responsible for task execution." )
3508    protected Reference owner;
3509
3510    /**
3511     * Principal physical location where the this task is performed.
3512     */
3513    @Child(name = "location", type = {Location.class}, order=22, min=0, max=1, modifier=false, summary=true)
3514    @Description(shortDefinition="Where task occurs", formalDefinition="Principal physical location where the this task is performed." )
3515    protected Reference location;
3516
3517    /**
3518     * A description or code indicating why this task needs to be performed.
3519     */
3520    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=false)
3521    @Description(shortDefinition="Why task is needed", formalDefinition="A description or code indicating why this task needs to be performed." )
3522    protected CodeableConcept reasonCode;
3523
3524    /**
3525     * A resource reference indicating why this task needs to be performed.
3526     */
3527    @Child(name = "reasonReference", type = {Reference.class}, order=24, min=0, max=1, modifier=false, summary=false)
3528    @Description(shortDefinition="Why task is needed", formalDefinition="A resource reference indicating why this task needs to be performed." )
3529    protected Reference reasonReference;
3530
3531    /**
3532     * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.
3533     */
3534    @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3535    @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task." )
3536    protected List<Reference> insurance;
3537
3538    /**
3539     * Free-text information captured about the task as it progresses.
3540     */
3541    @Child(name = "note", type = {Annotation.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3542    @Description(shortDefinition="Comments made about the task", formalDefinition="Free-text information captured about the task as it progresses." )
3543    protected List<Annotation> note;
3544
3545    /**
3546     * 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.
3547     */
3548    @Child(name = "relevantHistory", type = {Provenance.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3549    @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." )
3550    protected List<Reference> relevantHistory;
3551
3552    /**
3553     * 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.
3554     */
3555    @Child(name = "restriction", type = {}, order=28, min=0, max=1, modifier=false, summary=false)
3556    @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." )
3557    protected TaskRestrictionComponent restriction;
3558
3559    /**
3560     * Additional information that may be needed in the execution of the task.
3561     */
3562    @Child(name = "input", type = {}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3563    @Description(shortDefinition="Information used to perform task", formalDefinition="Additional information that may be needed in the execution of the task." )
3564    protected List<ParameterComponent> input;
3565
3566    /**
3567     * Outputs produced by the Task.
3568     */
3569    @Child(name = "output", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3570    @Description(shortDefinition="Information produced as part of task", formalDefinition="Outputs produced by the Task." )
3571    protected List<TaskOutputComponent> output;
3572
3573    private static final long serialVersionUID = -1820039698L;
3574
3575  /**
3576   * Constructor
3577   */
3578    public Task() {
3579      super();
3580    }
3581
3582  /**
3583   * Constructor
3584   */
3585    public Task(TaskStatus status, TaskIntent intent) {
3586      super();
3587      this.setStatus(status);
3588      this.setIntent(intent);
3589    }
3590
3591    /**
3592     * @return {@link #identifier} (The business identifier for this task.)
3593     */
3594    public List<Identifier> getIdentifier() { 
3595      if (this.identifier == null)
3596        this.identifier = new ArrayList<Identifier>();
3597      return this.identifier;
3598    }
3599
3600    /**
3601     * @return Returns a reference to <code>this</code> for easy method chaining
3602     */
3603    public Task setIdentifier(List<Identifier> theIdentifier) { 
3604      this.identifier = theIdentifier;
3605      return this;
3606    }
3607
3608    public boolean hasIdentifier() { 
3609      if (this.identifier == null)
3610        return false;
3611      for (Identifier item : this.identifier)
3612        if (!item.isEmpty())
3613          return true;
3614      return false;
3615    }
3616
3617    public Identifier addIdentifier() { //3
3618      Identifier t = new Identifier();
3619      if (this.identifier == null)
3620        this.identifier = new ArrayList<Identifier>();
3621      this.identifier.add(t);
3622      return t;
3623    }
3624
3625    public Task addIdentifier(Identifier t) { //3
3626      if (t == null)
3627        return this;
3628      if (this.identifier == null)
3629        this.identifier = new ArrayList<Identifier>();
3630      this.identifier.add(t);
3631      return this;
3632    }
3633
3634    /**
3635     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
3636     */
3637    public Identifier getIdentifierFirstRep() { 
3638      if (getIdentifier().isEmpty()) {
3639        addIdentifier();
3640      }
3641      return getIdentifier().get(0);
3642    }
3643
3644    /**
3645     * @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
3646     */
3647    public CanonicalType getInstantiatesCanonicalElement() { 
3648      if (this.instantiatesCanonical == null)
3649        if (Configuration.errorOnAutoCreate())
3650          throw new Error("Attempt to auto-create Task.instantiatesCanonical");
3651        else if (Configuration.doAutoCreate())
3652          this.instantiatesCanonical = new CanonicalType(); // bb
3653      return this.instantiatesCanonical;
3654    }
3655
3656    public boolean hasInstantiatesCanonicalElement() { 
3657      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3658    }
3659
3660    public boolean hasInstantiatesCanonical() { 
3661      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3662    }
3663
3664    /**
3665     * @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
3666     */
3667    public Task setInstantiatesCanonicalElement(CanonicalType value) { 
3668      this.instantiatesCanonical = value;
3669      return this;
3670    }
3671
3672    /**
3673     * @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.
3674     */
3675    public String getInstantiatesCanonical() { 
3676      return this.instantiatesCanonical == null ? null : this.instantiatesCanonical.getValue();
3677    }
3678
3679    /**
3680     * @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.
3681     */
3682    public Task setInstantiatesCanonical(String value) { 
3683      if (Utilities.noString(value))
3684        this.instantiatesCanonical = null;
3685      else {
3686        if (this.instantiatesCanonical == null)
3687          this.instantiatesCanonical = new CanonicalType();
3688        this.instantiatesCanonical.setValue(value);
3689      }
3690      return this;
3691    }
3692
3693    /**
3694     * @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
3695     */
3696    public UriType getInstantiatesUriElement() { 
3697      if (this.instantiatesUri == null)
3698        if (Configuration.errorOnAutoCreate())
3699          throw new Error("Attempt to auto-create Task.instantiatesUri");
3700        else if (Configuration.doAutoCreate())
3701          this.instantiatesUri = new UriType(); // bb
3702      return this.instantiatesUri;
3703    }
3704
3705    public boolean hasInstantiatesUriElement() { 
3706      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3707    }
3708
3709    public boolean hasInstantiatesUri() { 
3710      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3711    }
3712
3713    /**
3714     * @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
3715     */
3716    public Task setInstantiatesUriElement(UriType value) { 
3717      this.instantiatesUri = value;
3718      return this;
3719    }
3720
3721    /**
3722     * @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.
3723     */
3724    public String getInstantiatesUri() { 
3725      return this.instantiatesUri == null ? null : this.instantiatesUri.getValue();
3726    }
3727
3728    /**
3729     * @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.
3730     */
3731    public Task setInstantiatesUri(String value) { 
3732      if (Utilities.noString(value))
3733        this.instantiatesUri = null;
3734      else {
3735        if (this.instantiatesUri == null)
3736          this.instantiatesUri = new UriType();
3737        this.instantiatesUri.setValue(value);
3738      }
3739      return this;
3740    }
3741
3742    /**
3743     * @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, ServiceRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.)
3744     */
3745    public List<Reference> getBasedOn() { 
3746      if (this.basedOn == null)
3747        this.basedOn = new ArrayList<Reference>();
3748      return this.basedOn;
3749    }
3750
3751    /**
3752     * @return Returns a reference to <code>this</code> for easy method chaining
3753     */
3754    public Task setBasedOn(List<Reference> theBasedOn) { 
3755      this.basedOn = theBasedOn;
3756      return this;
3757    }
3758
3759    public boolean hasBasedOn() { 
3760      if (this.basedOn == null)
3761        return false;
3762      for (Reference item : this.basedOn)
3763        if (!item.isEmpty())
3764          return true;
3765      return false;
3766    }
3767
3768    public Reference addBasedOn() { //3
3769      Reference t = new Reference();
3770      if (this.basedOn == null)
3771        this.basedOn = new ArrayList<Reference>();
3772      this.basedOn.add(t);
3773      return t;
3774    }
3775
3776    public Task addBasedOn(Reference t) { //3
3777      if (t == null)
3778        return this;
3779      if (this.basedOn == null)
3780        this.basedOn = new ArrayList<Reference>();
3781      this.basedOn.add(t);
3782      return this;
3783    }
3784
3785    /**
3786     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
3787     */
3788    public Reference getBasedOnFirstRep() { 
3789      if (getBasedOn().isEmpty()) {
3790        addBasedOn();
3791      }
3792      return getBasedOn().get(0);
3793    }
3794
3795    /**
3796     * @return {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.)
3797     */
3798    public Identifier getGroupIdentifier() { 
3799      if (this.groupIdentifier == null)
3800        if (Configuration.errorOnAutoCreate())
3801          throw new Error("Attempt to auto-create Task.groupIdentifier");
3802        else if (Configuration.doAutoCreate())
3803          this.groupIdentifier = new Identifier(); // cc
3804      return this.groupIdentifier;
3805    }
3806
3807    public boolean hasGroupIdentifier() { 
3808      return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
3809    }
3810
3811    /**
3812     * @param value {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.)
3813     */
3814    public Task setGroupIdentifier(Identifier value) { 
3815      this.groupIdentifier = value;
3816      return this;
3817    }
3818
3819    /**
3820     * @return {@link #partOf} (Task that this particular task is part of.)
3821     */
3822    public List<Reference> getPartOf() { 
3823      if (this.partOf == null)
3824        this.partOf = new ArrayList<Reference>();
3825      return this.partOf;
3826    }
3827
3828    /**
3829     * @return Returns a reference to <code>this</code> for easy method chaining
3830     */
3831    public Task setPartOf(List<Reference> thePartOf) { 
3832      this.partOf = thePartOf;
3833      return this;
3834    }
3835
3836    public boolean hasPartOf() { 
3837      if (this.partOf == null)
3838        return false;
3839      for (Reference item : this.partOf)
3840        if (!item.isEmpty())
3841          return true;
3842      return false;
3843    }
3844
3845    public Reference addPartOf() { //3
3846      Reference t = new Reference();
3847      if (this.partOf == null)
3848        this.partOf = new ArrayList<Reference>();
3849      this.partOf.add(t);
3850      return t;
3851    }
3852
3853    public Task addPartOf(Reference t) { //3
3854      if (t == null)
3855        return this;
3856      if (this.partOf == null)
3857        this.partOf = new ArrayList<Reference>();
3858      this.partOf.add(t);
3859      return this;
3860    }
3861
3862    /**
3863     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
3864     */
3865    public Reference getPartOfFirstRep() { 
3866      if (getPartOf().isEmpty()) {
3867        addPartOf();
3868      }
3869      return getPartOf().get(0);
3870    }
3871
3872    /**
3873     * @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
3874     */
3875    public Enumeration<TaskStatus> getStatusElement() { 
3876      if (this.status == null)
3877        if (Configuration.errorOnAutoCreate())
3878          throw new Error("Attempt to auto-create Task.status");
3879        else if (Configuration.doAutoCreate())
3880          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); // bb
3881      return this.status;
3882    }
3883
3884    public boolean hasStatusElement() { 
3885      return this.status != null && !this.status.isEmpty();
3886    }
3887
3888    public boolean hasStatus() { 
3889      return this.status != null && !this.status.isEmpty();
3890    }
3891
3892    /**
3893     * @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
3894     */
3895    public Task setStatusElement(Enumeration<TaskStatus> value) { 
3896      this.status = value;
3897      return this;
3898    }
3899
3900    /**
3901     * @return The current status of the task.
3902     */
3903    public TaskStatus getStatus() { 
3904      return this.status == null ? null : this.status.getValue();
3905    }
3906
3907    /**
3908     * @param value The current status of the task.
3909     */
3910    public Task setStatus(TaskStatus value) { 
3911        if (this.status == null)
3912          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory());
3913        this.status.setValue(value);
3914      return this;
3915    }
3916
3917    /**
3918     * @return {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
3919     */
3920    public CodeableConcept getStatusReason() { 
3921      if (this.statusReason == null)
3922        if (Configuration.errorOnAutoCreate())
3923          throw new Error("Attempt to auto-create Task.statusReason");
3924        else if (Configuration.doAutoCreate())
3925          this.statusReason = new CodeableConcept(); // cc
3926      return this.statusReason;
3927    }
3928
3929    public boolean hasStatusReason() { 
3930      return this.statusReason != null && !this.statusReason.isEmpty();
3931    }
3932
3933    /**
3934     * @param value {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
3935     */
3936    public Task setStatusReason(CodeableConcept value) { 
3937      this.statusReason = value;
3938      return this;
3939    }
3940
3941    /**
3942     * @return {@link #businessStatus} (Contains business-specific nuances of the business state.)
3943     */
3944    public CodeableConcept getBusinessStatus() { 
3945      if (this.businessStatus == null)
3946        if (Configuration.errorOnAutoCreate())
3947          throw new Error("Attempt to auto-create Task.businessStatus");
3948        else if (Configuration.doAutoCreate())
3949          this.businessStatus = new CodeableConcept(); // cc
3950      return this.businessStatus;
3951    }
3952
3953    public boolean hasBusinessStatus() { 
3954      return this.businessStatus != null && !this.businessStatus.isEmpty();
3955    }
3956
3957    /**
3958     * @param value {@link #businessStatus} (Contains business-specific nuances of the business state.)
3959     */
3960    public Task setBusinessStatus(CodeableConcept value) { 
3961      this.businessStatus = value;
3962      return this;
3963    }
3964
3965    /**
3966     * @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
3967     */
3968    public Enumeration<TaskIntent> getIntentElement() { 
3969      if (this.intent == null)
3970        if (Configuration.errorOnAutoCreate())
3971          throw new Error("Attempt to auto-create Task.intent");
3972        else if (Configuration.doAutoCreate())
3973          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); // bb
3974      return this.intent;
3975    }
3976
3977    public boolean hasIntentElement() { 
3978      return this.intent != null && !this.intent.isEmpty();
3979    }
3980
3981    public boolean hasIntent() { 
3982      return this.intent != null && !this.intent.isEmpty();
3983    }
3984
3985    /**
3986     * @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
3987     */
3988    public Task setIntentElement(Enumeration<TaskIntent> value) { 
3989      this.intent = value;
3990      return this;
3991    }
3992
3993    /**
3994     * @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.
3995     */
3996    public TaskIntent getIntent() { 
3997      return this.intent == null ? null : this.intent.getValue();
3998    }
3999
4000    /**
4001     * @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.
4002     */
4003    public Task setIntent(TaskIntent value) { 
4004        if (this.intent == null)
4005          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory());
4006        this.intent.setValue(value);
4007      return this;
4008    }
4009
4010    /**
4011     * @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
4012     */
4013    public Enumeration<RequestPriority> getPriorityElement() { 
4014      if (this.priority == null)
4015        if (Configuration.errorOnAutoCreate())
4016          throw new Error("Attempt to auto-create Task.priority");
4017        else if (Configuration.doAutoCreate())
4018          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
4019      return this.priority;
4020    }
4021
4022    public boolean hasPriorityElement() { 
4023      return this.priority != null && !this.priority.isEmpty();
4024    }
4025
4026    public boolean hasPriority() { 
4027      return this.priority != null && !this.priority.isEmpty();
4028    }
4029
4030    /**
4031     * @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
4032     */
4033    public Task setPriorityElement(Enumeration<RequestPriority> value) { 
4034      this.priority = value;
4035      return this;
4036    }
4037
4038    /**
4039     * @return Indicates how quickly the Task should be addressed with respect to other requests.
4040     */
4041    public RequestPriority getPriority() { 
4042      return this.priority == null ? null : this.priority.getValue();
4043    }
4044
4045    /**
4046     * @param value Indicates how quickly the Task should be addressed with respect to other requests.
4047     */
4048    public Task setPriority(RequestPriority value) { 
4049      if (value == null)
4050        this.priority = null;
4051      else {
4052        if (this.priority == null)
4053          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
4054        this.priority.setValue(value);
4055      }
4056      return this;
4057    }
4058
4059    /**
4060     * @return {@link #code} (A name or code (or both) briefly describing what the task involves.)
4061     */
4062    public CodeableConcept getCode() { 
4063      if (this.code == null)
4064        if (Configuration.errorOnAutoCreate())
4065          throw new Error("Attempt to auto-create Task.code");
4066        else if (Configuration.doAutoCreate())
4067          this.code = new CodeableConcept(); // cc
4068      return this.code;
4069    }
4070
4071    public boolean hasCode() { 
4072      return this.code != null && !this.code.isEmpty();
4073    }
4074
4075    /**
4076     * @param value {@link #code} (A name or code (or both) briefly describing what the task involves.)
4077     */
4078    public Task setCode(CodeableConcept value) { 
4079      this.code = value;
4080      return this;
4081    }
4082
4083    /**
4084     * @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
4085     */
4086    public StringType getDescriptionElement() { 
4087      if (this.description == null)
4088        if (Configuration.errorOnAutoCreate())
4089          throw new Error("Attempt to auto-create Task.description");
4090        else if (Configuration.doAutoCreate())
4091          this.description = new StringType(); // bb
4092      return this.description;
4093    }
4094
4095    public boolean hasDescriptionElement() { 
4096      return this.description != null && !this.description.isEmpty();
4097    }
4098
4099    public boolean hasDescription() { 
4100      return this.description != null && !this.description.isEmpty();
4101    }
4102
4103    /**
4104     * @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
4105     */
4106    public Task setDescriptionElement(StringType value) { 
4107      this.description = value;
4108      return this;
4109    }
4110
4111    /**
4112     * @return A free-text description of what is to be performed.
4113     */
4114    public String getDescription() { 
4115      return this.description == null ? null : this.description.getValue();
4116    }
4117
4118    /**
4119     * @param value A free-text description of what is to be performed.
4120     */
4121    public Task setDescription(String value) { 
4122      if (Utilities.noString(value))
4123        this.description = null;
4124      else {
4125        if (this.description == null)
4126          this.description = new StringType();
4127        this.description.setValue(value);
4128      }
4129      return this;
4130    }
4131
4132    /**
4133     * @return {@link #focus} (The request being actioned or the resource being manipulated by this task.)
4134     */
4135    public Reference getFocus() { 
4136      if (this.focus == null)
4137        if (Configuration.errorOnAutoCreate())
4138          throw new Error("Attempt to auto-create Task.focus");
4139        else if (Configuration.doAutoCreate())
4140          this.focus = new Reference(); // cc
4141      return this.focus;
4142    }
4143
4144    public boolean hasFocus() { 
4145      return this.focus != null && !this.focus.isEmpty();
4146    }
4147
4148    /**
4149     * @param value {@link #focus} (The request being actioned or the resource being manipulated by this task.)
4150     */
4151    public Task setFocus(Reference value) { 
4152      this.focus = value;
4153      return this;
4154    }
4155
4156    /**
4157     * @return {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
4158     */
4159    public Reference getFor() { 
4160      if (this.for_ == null)
4161        if (Configuration.errorOnAutoCreate())
4162          throw new Error("Attempt to auto-create Task.for_");
4163        else if (Configuration.doAutoCreate())
4164          this.for_ = new Reference(); // cc
4165      return this.for_;
4166    }
4167
4168    public boolean hasFor() { 
4169      return this.for_ != null && !this.for_.isEmpty();
4170    }
4171
4172    /**
4173     * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
4174     */
4175    public Task setFor(Reference value) { 
4176      this.for_ = value;
4177      return this;
4178    }
4179
4180    /**
4181     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
4182     */
4183    public Reference getEncounter() { 
4184      if (this.encounter == null)
4185        if (Configuration.errorOnAutoCreate())
4186          throw new Error("Attempt to auto-create Task.encounter");
4187        else if (Configuration.doAutoCreate())
4188          this.encounter = new Reference(); // cc
4189      return this.encounter;
4190    }
4191
4192    public boolean hasEncounter() { 
4193      return this.encounter != null && !this.encounter.isEmpty();
4194    }
4195
4196    /**
4197     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
4198     */
4199    public Task setEncounter(Reference value) { 
4200      this.encounter = value;
4201      return this;
4202    }
4203
4204    /**
4205     * @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).)
4206     */
4207    public Period getExecutionPeriod() { 
4208      if (this.executionPeriod == null)
4209        if (Configuration.errorOnAutoCreate())
4210          throw new Error("Attempt to auto-create Task.executionPeriod");
4211        else if (Configuration.doAutoCreate())
4212          this.executionPeriod = new Period(); // cc
4213      return this.executionPeriod;
4214    }
4215
4216    public boolean hasExecutionPeriod() { 
4217      return this.executionPeriod != null && !this.executionPeriod.isEmpty();
4218    }
4219
4220    /**
4221     * @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).)
4222     */
4223    public Task setExecutionPeriod(Period value) { 
4224      this.executionPeriod = value;
4225      return this;
4226    }
4227
4228    /**
4229     * @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
4230     */
4231    public DateTimeType getAuthoredOnElement() { 
4232      if (this.authoredOn == null)
4233        if (Configuration.errorOnAutoCreate())
4234          throw new Error("Attempt to auto-create Task.authoredOn");
4235        else if (Configuration.doAutoCreate())
4236          this.authoredOn = new DateTimeType(); // bb
4237      return this.authoredOn;
4238    }
4239
4240    public boolean hasAuthoredOnElement() { 
4241      return this.authoredOn != null && !this.authoredOn.isEmpty();
4242    }
4243
4244    public boolean hasAuthoredOn() { 
4245      return this.authoredOn != null && !this.authoredOn.isEmpty();
4246    }
4247
4248    /**
4249     * @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
4250     */
4251    public Task setAuthoredOnElement(DateTimeType value) { 
4252      this.authoredOn = value;
4253      return this;
4254    }
4255
4256    /**
4257     * @return The date and time this task was created.
4258     */
4259    public Date getAuthoredOn() { 
4260      return this.authoredOn == null ? null : this.authoredOn.getValue();
4261    }
4262
4263    /**
4264     * @param value The date and time this task was created.
4265     */
4266    public Task setAuthoredOn(Date value) { 
4267      if (value == null)
4268        this.authoredOn = null;
4269      else {
4270        if (this.authoredOn == null)
4271          this.authoredOn = new DateTimeType();
4272        this.authoredOn.setValue(value);
4273      }
4274      return this;
4275    }
4276
4277    /**
4278     * @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
4279     */
4280    public DateTimeType getLastModifiedElement() { 
4281      if (this.lastModified == null)
4282        if (Configuration.errorOnAutoCreate())
4283          throw new Error("Attempt to auto-create Task.lastModified");
4284        else if (Configuration.doAutoCreate())
4285          this.lastModified = new DateTimeType(); // bb
4286      return this.lastModified;
4287    }
4288
4289    public boolean hasLastModifiedElement() { 
4290      return this.lastModified != null && !this.lastModified.isEmpty();
4291    }
4292
4293    public boolean hasLastModified() { 
4294      return this.lastModified != null && !this.lastModified.isEmpty();
4295    }
4296
4297    /**
4298     * @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
4299     */
4300    public Task setLastModifiedElement(DateTimeType value) { 
4301      this.lastModified = value;
4302      return this;
4303    }
4304
4305    /**
4306     * @return The date and time of last modification to this task.
4307     */
4308    public Date getLastModified() { 
4309      return this.lastModified == null ? null : this.lastModified.getValue();
4310    }
4311
4312    /**
4313     * @param value The date and time of last modification to this task.
4314     */
4315    public Task setLastModified(Date value) { 
4316      if (value == null)
4317        this.lastModified = null;
4318      else {
4319        if (this.lastModified == null)
4320          this.lastModified = new DateTimeType();
4321        this.lastModified.setValue(value);
4322      }
4323      return this;
4324    }
4325
4326    /**
4327     * @return {@link #requester} (The creator of the task.)
4328     */
4329    public Reference getRequester() { 
4330      if (this.requester == null)
4331        if (Configuration.errorOnAutoCreate())
4332          throw new Error("Attempt to auto-create Task.requester");
4333        else if (Configuration.doAutoCreate())
4334          this.requester = new Reference(); // cc
4335      return this.requester;
4336    }
4337
4338    public boolean hasRequester() { 
4339      return this.requester != null && !this.requester.isEmpty();
4340    }
4341
4342    /**
4343     * @param value {@link #requester} (The creator of the task.)
4344     */
4345    public Task setRequester(Reference value) { 
4346      this.requester = value;
4347      return this;
4348    }
4349
4350    /**
4351     * @return {@link #performerType} (The kind of participant that should perform the task.)
4352     */
4353    public List<CodeableConcept> getPerformerType() { 
4354      if (this.performerType == null)
4355        this.performerType = new ArrayList<CodeableConcept>();
4356      return this.performerType;
4357    }
4358
4359    /**
4360     * @return Returns a reference to <code>this</code> for easy method chaining
4361     */
4362    public Task setPerformerType(List<CodeableConcept> thePerformerType) { 
4363      this.performerType = thePerformerType;
4364      return this;
4365    }
4366
4367    public boolean hasPerformerType() { 
4368      if (this.performerType == null)
4369        return false;
4370      for (CodeableConcept item : this.performerType)
4371        if (!item.isEmpty())
4372          return true;
4373      return false;
4374    }
4375
4376    public CodeableConcept addPerformerType() { //3
4377      CodeableConcept t = new CodeableConcept();
4378      if (this.performerType == null)
4379        this.performerType = new ArrayList<CodeableConcept>();
4380      this.performerType.add(t);
4381      return t;
4382    }
4383
4384    public Task addPerformerType(CodeableConcept t) { //3
4385      if (t == null)
4386        return this;
4387      if (this.performerType == null)
4388        this.performerType = new ArrayList<CodeableConcept>();
4389      this.performerType.add(t);
4390      return this;
4391    }
4392
4393    /**
4394     * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist {3}
4395     */
4396    public CodeableConcept getPerformerTypeFirstRep() { 
4397      if (getPerformerType().isEmpty()) {
4398        addPerformerType();
4399      }
4400      return getPerformerType().get(0);
4401    }
4402
4403    /**
4404     * @return {@link #owner} (Individual organization or Device currently responsible for task execution.)
4405     */
4406    public Reference getOwner() { 
4407      if (this.owner == null)
4408        if (Configuration.errorOnAutoCreate())
4409          throw new Error("Attempt to auto-create Task.owner");
4410        else if (Configuration.doAutoCreate())
4411          this.owner = new Reference(); // cc
4412      return this.owner;
4413    }
4414
4415    public boolean hasOwner() { 
4416      return this.owner != null && !this.owner.isEmpty();
4417    }
4418
4419    /**
4420     * @param value {@link #owner} (Individual organization or Device currently responsible for task execution.)
4421     */
4422    public Task setOwner(Reference value) { 
4423      this.owner = value;
4424      return this;
4425    }
4426
4427    /**
4428     * @return {@link #location} (Principal physical location where the this task is performed.)
4429     */
4430    public Reference getLocation() { 
4431      if (this.location == null)
4432        if (Configuration.errorOnAutoCreate())
4433          throw new Error("Attempt to auto-create Task.location");
4434        else if (Configuration.doAutoCreate())
4435          this.location = new Reference(); // cc
4436      return this.location;
4437    }
4438
4439    public boolean hasLocation() { 
4440      return this.location != null && !this.location.isEmpty();
4441    }
4442
4443    /**
4444     * @param value {@link #location} (Principal physical location where the this task is performed.)
4445     */
4446    public Task setLocation(Reference value) { 
4447      this.location = value;
4448      return this;
4449    }
4450
4451    /**
4452     * @return {@link #reasonCode} (A description or code indicating why this task needs to be performed.)
4453     */
4454    public CodeableConcept getReasonCode() { 
4455      if (this.reasonCode == null)
4456        if (Configuration.errorOnAutoCreate())
4457          throw new Error("Attempt to auto-create Task.reasonCode");
4458        else if (Configuration.doAutoCreate())
4459          this.reasonCode = new CodeableConcept(); // cc
4460      return this.reasonCode;
4461    }
4462
4463    public boolean hasReasonCode() { 
4464      return this.reasonCode != null && !this.reasonCode.isEmpty();
4465    }
4466
4467    /**
4468     * @param value {@link #reasonCode} (A description or code indicating why this task needs to be performed.)
4469     */
4470    public Task setReasonCode(CodeableConcept value) { 
4471      this.reasonCode = value;
4472      return this;
4473    }
4474
4475    /**
4476     * @return {@link #reasonReference} (A resource reference indicating why this task needs to be performed.)
4477     */
4478    public Reference getReasonReference() { 
4479      if (this.reasonReference == null)
4480        if (Configuration.errorOnAutoCreate())
4481          throw new Error("Attempt to auto-create Task.reasonReference");
4482        else if (Configuration.doAutoCreate())
4483          this.reasonReference = new Reference(); // cc
4484      return this.reasonReference;
4485    }
4486
4487    public boolean hasReasonReference() { 
4488      return this.reasonReference != null && !this.reasonReference.isEmpty();
4489    }
4490
4491    /**
4492     * @param value {@link #reasonReference} (A resource reference indicating why this task needs to be performed.)
4493     */
4494    public Task setReasonReference(Reference value) { 
4495      this.reasonReference = value;
4496      return this;
4497    }
4498
4499    /**
4500     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.)
4501     */
4502    public List<Reference> getInsurance() { 
4503      if (this.insurance == null)
4504        this.insurance = new ArrayList<Reference>();
4505      return this.insurance;
4506    }
4507
4508    /**
4509     * @return Returns a reference to <code>this</code> for easy method chaining
4510     */
4511    public Task setInsurance(List<Reference> theInsurance) { 
4512      this.insurance = theInsurance;
4513      return this;
4514    }
4515
4516    public boolean hasInsurance() { 
4517      if (this.insurance == null)
4518        return false;
4519      for (Reference item : this.insurance)
4520        if (!item.isEmpty())
4521          return true;
4522      return false;
4523    }
4524
4525    public Reference addInsurance() { //3
4526      Reference t = new Reference();
4527      if (this.insurance == null)
4528        this.insurance = new ArrayList<Reference>();
4529      this.insurance.add(t);
4530      return t;
4531    }
4532
4533    public Task addInsurance(Reference t) { //3
4534      if (t == null)
4535        return this;
4536      if (this.insurance == null)
4537        this.insurance = new ArrayList<Reference>();
4538      this.insurance.add(t);
4539      return this;
4540    }
4541
4542    /**
4543     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
4544     */
4545    public Reference getInsuranceFirstRep() { 
4546      if (getInsurance().isEmpty()) {
4547        addInsurance();
4548      }
4549      return getInsurance().get(0);
4550    }
4551
4552    /**
4553     * @return {@link #note} (Free-text information captured about the task as it progresses.)
4554     */
4555    public List<Annotation> getNote() { 
4556      if (this.note == null)
4557        this.note = new ArrayList<Annotation>();
4558      return this.note;
4559    }
4560
4561    /**
4562     * @return Returns a reference to <code>this</code> for easy method chaining
4563     */
4564    public Task setNote(List<Annotation> theNote) { 
4565      this.note = theNote;
4566      return this;
4567    }
4568
4569    public boolean hasNote() { 
4570      if (this.note == null)
4571        return false;
4572      for (Annotation item : this.note)
4573        if (!item.isEmpty())
4574          return true;
4575      return false;
4576    }
4577
4578    public Annotation addNote() { //3
4579      Annotation t = new Annotation();
4580      if (this.note == null)
4581        this.note = new ArrayList<Annotation>();
4582      this.note.add(t);
4583      return t;
4584    }
4585
4586    public Task addNote(Annotation t) { //3
4587      if (t == null)
4588        return this;
4589      if (this.note == null)
4590        this.note = new ArrayList<Annotation>();
4591      this.note.add(t);
4592      return this;
4593    }
4594
4595    /**
4596     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
4597     */
4598    public Annotation getNoteFirstRep() { 
4599      if (getNote().isEmpty()) {
4600        addNote();
4601      }
4602      return getNote().get(0);
4603    }
4604
4605    /**
4606     * @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.)
4607     */
4608    public List<Reference> getRelevantHistory() { 
4609      if (this.relevantHistory == null)
4610        this.relevantHistory = new ArrayList<Reference>();
4611      return this.relevantHistory;
4612    }
4613
4614    /**
4615     * @return Returns a reference to <code>this</code> for easy method chaining
4616     */
4617    public Task setRelevantHistory(List<Reference> theRelevantHistory) { 
4618      this.relevantHistory = theRelevantHistory;
4619      return this;
4620    }
4621
4622    public boolean hasRelevantHistory() { 
4623      if (this.relevantHistory == null)
4624        return false;
4625      for (Reference item : this.relevantHistory)
4626        if (!item.isEmpty())
4627          return true;
4628      return false;
4629    }
4630
4631    public Reference addRelevantHistory() { //3
4632      Reference t = new Reference();
4633      if (this.relevantHistory == null)
4634        this.relevantHistory = new ArrayList<Reference>();
4635      this.relevantHistory.add(t);
4636      return t;
4637    }
4638
4639    public Task addRelevantHistory(Reference t) { //3
4640      if (t == null)
4641        return this;
4642      if (this.relevantHistory == null)
4643        this.relevantHistory = new ArrayList<Reference>();
4644      this.relevantHistory.add(t);
4645      return this;
4646    }
4647
4648    /**
4649     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist {3}
4650     */
4651    public Reference getRelevantHistoryFirstRep() { 
4652      if (getRelevantHistory().isEmpty()) {
4653        addRelevantHistory();
4654      }
4655      return getRelevantHistory().get(0);
4656    }
4657
4658    /**
4659     * @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.)
4660     */
4661    public TaskRestrictionComponent getRestriction() { 
4662      if (this.restriction == null)
4663        if (Configuration.errorOnAutoCreate())
4664          throw new Error("Attempt to auto-create Task.restriction");
4665        else if (Configuration.doAutoCreate())
4666          this.restriction = new TaskRestrictionComponent(); // cc
4667      return this.restriction;
4668    }
4669
4670    public boolean hasRestriction() { 
4671      return this.restriction != null && !this.restriction.isEmpty();
4672    }
4673
4674    /**
4675     * @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.)
4676     */
4677    public Task setRestriction(TaskRestrictionComponent value) { 
4678      this.restriction = value;
4679      return this;
4680    }
4681
4682    /**
4683     * @return {@link #input} (Additional information that may be needed in the execution of the task.)
4684     */
4685    public List<ParameterComponent> getInput() { 
4686      if (this.input == null)
4687        this.input = new ArrayList<ParameterComponent>();
4688      return this.input;
4689    }
4690
4691    /**
4692     * @return Returns a reference to <code>this</code> for easy method chaining
4693     */
4694    public Task setInput(List<ParameterComponent> theInput) { 
4695      this.input = theInput;
4696      return this;
4697    }
4698
4699    public boolean hasInput() { 
4700      if (this.input == null)
4701        return false;
4702      for (ParameterComponent item : this.input)
4703        if (!item.isEmpty())
4704          return true;
4705      return false;
4706    }
4707
4708    public ParameterComponent addInput() { //3
4709      ParameterComponent t = new ParameterComponent();
4710      if (this.input == null)
4711        this.input = new ArrayList<ParameterComponent>();
4712      this.input.add(t);
4713      return t;
4714    }
4715
4716    public Task addInput(ParameterComponent t) { //3
4717      if (t == null)
4718        return this;
4719      if (this.input == null)
4720        this.input = new ArrayList<ParameterComponent>();
4721      this.input.add(t);
4722      return this;
4723    }
4724
4725    /**
4726     * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist {3}
4727     */
4728    public ParameterComponent getInputFirstRep() { 
4729      if (getInput().isEmpty()) {
4730        addInput();
4731      }
4732      return getInput().get(0);
4733    }
4734
4735    /**
4736     * @return {@link #output} (Outputs produced by the Task.)
4737     */
4738    public List<TaskOutputComponent> getOutput() { 
4739      if (this.output == null)
4740        this.output = new ArrayList<TaskOutputComponent>();
4741      return this.output;
4742    }
4743
4744    /**
4745     * @return Returns a reference to <code>this</code> for easy method chaining
4746     */
4747    public Task setOutput(List<TaskOutputComponent> theOutput) { 
4748      this.output = theOutput;
4749      return this;
4750    }
4751
4752    public boolean hasOutput() { 
4753      if (this.output == null)
4754        return false;
4755      for (TaskOutputComponent item : this.output)
4756        if (!item.isEmpty())
4757          return true;
4758      return false;
4759    }
4760
4761    public TaskOutputComponent addOutput() { //3
4762      TaskOutputComponent t = new TaskOutputComponent();
4763      if (this.output == null)
4764        this.output = new ArrayList<TaskOutputComponent>();
4765      this.output.add(t);
4766      return t;
4767    }
4768
4769    public Task addOutput(TaskOutputComponent t) { //3
4770      if (t == null)
4771        return this;
4772      if (this.output == null)
4773        this.output = new ArrayList<TaskOutputComponent>();
4774      this.output.add(t);
4775      return this;
4776    }
4777
4778    /**
4779     * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist {3}
4780     */
4781    public TaskOutputComponent getOutputFirstRep() { 
4782      if (getOutput().isEmpty()) {
4783        addOutput();
4784      }
4785      return getOutput().get(0);
4786    }
4787
4788      protected void listChildren(List<Property> children) {
4789        super.listChildren(children);
4790        children.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier));
4791        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));
4792        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));
4793        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, ServiceRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn));
4794        children.add(new Property("groupIdentifier", "Identifier", "An identifier that links together multiple tasks and other requests that were created in the same context.", 0, 1, groupIdentifier));
4795        children.add(new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf));
4796        children.add(new Property("status", "code", "The current status of the task.", 0, 1, status));
4797        children.add(new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason));
4798        children.add(new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus));
4799        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));
4800        children.add(new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority));
4801        children.add(new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code));
4802        children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description));
4803        children.add(new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus));
4804        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_));
4805        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));
4806        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));
4807        children.add(new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn));
4808        children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified));
4809        children.add(new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester));
4810        children.add(new Property("performerType", "CodeableConcept", "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType));
4811        children.add(new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner));
4812        children.add(new Property("location", "Reference(Location)", "Principal physical location where the this task is performed.", 0, 1, location));
4813        children.add(new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode));
4814        children.add(new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference));
4815        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));
4816        children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note));
4817        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));
4818        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));
4819        children.add(new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input));
4820        children.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output));
4821      }
4822
4823      @Override
4824      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4825        switch (_hash) {
4826        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier);
4827        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);
4828        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);
4829        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, ServiceRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", 0, java.lang.Integer.MAX_VALUE, basedOn);
4830        case -445338488: /*groupIdentifier*/  return new Property("groupIdentifier", "Identifier", "An identifier that links together multiple tasks and other requests that were created in the same context.", 0, 1, groupIdentifier);
4831        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf);
4832        case -892481550: /*status*/  return new Property("status", "code", "The current status of the task.", 0, 1, status);
4833        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason);
4834        case 2008591314: /*businessStatus*/  return new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus);
4835        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);
4836        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority);
4837        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code);
4838        case -1724546052: /*description*/  return new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description);
4839        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus);
4840        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_);
4841        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);
4842        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);
4843        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn);
4844        case 1959003007: /*lastModified*/  return new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified);
4845        case 693933948: /*requester*/  return new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester);
4846        case -901444568: /*performerType*/  return new Property("performerType", "CodeableConcept", "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType);
4847        case 106164915: /*owner*/  return new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "Individual organization or Device currently responsible for task execution.", 0, 1, owner);
4848        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "Principal physical location where the this task is performed.", 0, 1, location);
4849        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode);
4850        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference);
4851        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);
4852        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);
4853        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);
4854        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);
4855        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);
4856        case -1005512447: /*output*/  return new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output);
4857        default: return super.getNamedProperty(_hash, _name, _checkValid);
4858        }
4859
4860      }
4861
4862      @Override
4863      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4864        switch (hash) {
4865        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4866        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // CanonicalType
4867        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType
4868        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
4869        case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier
4870        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
4871        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<TaskStatus>
4872        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
4873        case 2008591314: /*businessStatus*/ return this.businessStatus == null ? new Base[0] : new Base[] {this.businessStatus}; // CodeableConcept
4874        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<TaskIntent>
4875        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
4876        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
4877        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
4878        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference
4879        case 101577: /*for*/ return this.for_ == null ? new Base[0] : new Base[] {this.for_}; // Reference
4880        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
4881        case 1218624249: /*executionPeriod*/ return this.executionPeriod == null ? new Base[0] : new Base[] {this.executionPeriod}; // Period
4882        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
4883        case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // DateTimeType
4884        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
4885        case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept
4886        case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
4887        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
4888        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : new Base[] {this.reasonCode}; // CodeableConcept
4889        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : new Base[] {this.reasonReference}; // Reference
4890        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // Reference
4891        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
4892        case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference
4893        case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TaskRestrictionComponent
4894        case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // ParameterComponent
4895        case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TaskOutputComponent
4896        default: return super.getProperty(hash, name, checkValid);
4897        }
4898
4899      }
4900
4901      @Override
4902      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4903        switch (hash) {
4904        case -1618432855: // identifier
4905          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
4906          return value;
4907        case 8911915: // instantiatesCanonical
4908          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
4909          return value;
4910        case -1926393373: // instantiatesUri
4911          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
4912          return value;
4913        case -332612366: // basedOn
4914          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
4915          return value;
4916        case -445338488: // groupIdentifier
4917          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
4918          return value;
4919        case -995410646: // partOf
4920          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
4921          return value;
4922        case -892481550: // status
4923          value = new TaskStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4924          this.status = (Enumeration) value; // Enumeration<TaskStatus>
4925          return value;
4926        case 2051346646: // statusReason
4927          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4928          return value;
4929        case 2008591314: // businessStatus
4930          this.businessStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4931          return value;
4932        case -1183762788: // intent
4933          value = new TaskIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
4934          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
4935          return value;
4936        case -1165461084: // priority
4937          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
4938          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
4939          return value;
4940        case 3059181: // code
4941          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4942          return value;
4943        case -1724546052: // description
4944          this.description = TypeConvertor.castToString(value); // StringType
4945          return value;
4946        case 97604824: // focus
4947          this.focus = TypeConvertor.castToReference(value); // Reference
4948          return value;
4949        case 101577: // for
4950          this.for_ = TypeConvertor.castToReference(value); // Reference
4951          return value;
4952        case 1524132147: // encounter
4953          this.encounter = TypeConvertor.castToReference(value); // Reference
4954          return value;
4955        case 1218624249: // executionPeriod
4956          this.executionPeriod = TypeConvertor.castToPeriod(value); // Period
4957          return value;
4958        case -1500852503: // authoredOn
4959          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
4960          return value;
4961        case 1959003007: // lastModified
4962          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
4963          return value;
4964        case 693933948: // requester
4965          this.requester = TypeConvertor.castToReference(value); // Reference
4966          return value;
4967        case -901444568: // performerType
4968          this.getPerformerType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
4969          return value;
4970        case 106164915: // owner
4971          this.owner = TypeConvertor.castToReference(value); // Reference
4972          return value;
4973        case 1901043637: // location
4974          this.location = TypeConvertor.castToReference(value); // Reference
4975          return value;
4976        case 722137681: // reasonCode
4977          this.reasonCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4978          return value;
4979        case -1146218137: // reasonReference
4980          this.reasonReference = TypeConvertor.castToReference(value); // Reference
4981          return value;
4982        case 73049818: // insurance
4983          this.getInsurance().add(TypeConvertor.castToReference(value)); // Reference
4984          return value;
4985        case 3387378: // note
4986          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
4987          return value;
4988        case 1538891575: // relevantHistory
4989          this.getRelevantHistory().add(TypeConvertor.castToReference(value)); // Reference
4990          return value;
4991        case -1561062452: // restriction
4992          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
4993          return value;
4994        case 100358090: // input
4995          this.getInput().add((ParameterComponent) value); // ParameterComponent
4996          return value;
4997        case -1005512447: // output
4998          this.getOutput().add((TaskOutputComponent) value); // TaskOutputComponent
4999          return value;
5000        default: return super.setProperty(hash, name, value);
5001        }
5002
5003      }
5004
5005      @Override
5006      public Base setProperty(String name, Base value) throws FHIRException {
5007        if (name.equals("identifier")) {
5008          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
5009        } else if (name.equals("instantiatesCanonical")) {
5010          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
5011        } else if (name.equals("instantiatesUri")) {
5012          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
5013        } else if (name.equals("basedOn")) {
5014          this.getBasedOn().add(TypeConvertor.castToReference(value));
5015        } else if (name.equals("groupIdentifier")) {
5016          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
5017        } else if (name.equals("partOf")) {
5018          this.getPartOf().add(TypeConvertor.castToReference(value));
5019        } else if (name.equals("status")) {
5020          value = new TaskStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5021          this.status = (Enumeration) value; // Enumeration<TaskStatus>
5022        } else if (name.equals("statusReason")) {
5023          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5024        } else if (name.equals("businessStatus")) {
5025          this.businessStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5026        } else if (name.equals("intent")) {
5027          value = new TaskIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
5028          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
5029        } else if (name.equals("priority")) {
5030          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
5031          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5032        } else if (name.equals("code")) {
5033          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5034        } else if (name.equals("description")) {
5035          this.description = TypeConvertor.castToString(value); // StringType
5036        } else if (name.equals("focus")) {
5037          this.focus = TypeConvertor.castToReference(value); // Reference
5038        } else if (name.equals("for")) {
5039          this.for_ = TypeConvertor.castToReference(value); // Reference
5040        } else if (name.equals("encounter")) {
5041          this.encounter = TypeConvertor.castToReference(value); // Reference
5042        } else if (name.equals("executionPeriod")) {
5043          this.executionPeriod = TypeConvertor.castToPeriod(value); // Period
5044        } else if (name.equals("authoredOn")) {
5045          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
5046        } else if (name.equals("lastModified")) {
5047          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
5048        } else if (name.equals("requester")) {
5049          this.requester = TypeConvertor.castToReference(value); // Reference
5050        } else if (name.equals("performerType")) {
5051          this.getPerformerType().add(TypeConvertor.castToCodeableConcept(value));
5052        } else if (name.equals("owner")) {
5053          this.owner = TypeConvertor.castToReference(value); // Reference
5054        } else if (name.equals("location")) {
5055          this.location = TypeConvertor.castToReference(value); // Reference
5056        } else if (name.equals("reasonCode")) {
5057          this.reasonCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5058        } else if (name.equals("reasonReference")) {
5059          this.reasonReference = TypeConvertor.castToReference(value); // Reference
5060        } else if (name.equals("insurance")) {
5061          this.getInsurance().add(TypeConvertor.castToReference(value));
5062        } else if (name.equals("note")) {
5063          this.getNote().add(TypeConvertor.castToAnnotation(value));
5064        } else if (name.equals("relevantHistory")) {
5065          this.getRelevantHistory().add(TypeConvertor.castToReference(value));
5066        } else if (name.equals("restriction")) {
5067          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
5068        } else if (name.equals("input")) {
5069          this.getInput().add((ParameterComponent) value);
5070        } else if (name.equals("output")) {
5071          this.getOutput().add((TaskOutputComponent) value);
5072        } else
5073          return super.setProperty(name, value);
5074        return value;
5075      }
5076
5077      @Override
5078      public Base makeProperty(int hash, String name) throws FHIRException {
5079        switch (hash) {
5080        case -1618432855:  return addIdentifier(); 
5081        case 8911915:  return getInstantiatesCanonicalElement();
5082        case -1926393373:  return getInstantiatesUriElement();
5083        case -332612366:  return addBasedOn(); 
5084        case -445338488:  return getGroupIdentifier();
5085        case -995410646:  return addPartOf(); 
5086        case -892481550:  return getStatusElement();
5087        case 2051346646:  return getStatusReason();
5088        case 2008591314:  return getBusinessStatus();
5089        case -1183762788:  return getIntentElement();
5090        case -1165461084:  return getPriorityElement();
5091        case 3059181:  return getCode();
5092        case -1724546052:  return getDescriptionElement();
5093        case 97604824:  return getFocus();
5094        case 101577:  return getFor();
5095        case 1524132147:  return getEncounter();
5096        case 1218624249:  return getExecutionPeriod();
5097        case -1500852503:  return getAuthoredOnElement();
5098        case 1959003007:  return getLastModifiedElement();
5099        case 693933948:  return getRequester();
5100        case -901444568:  return addPerformerType(); 
5101        case 106164915:  return getOwner();
5102        case 1901043637:  return getLocation();
5103        case 722137681:  return getReasonCode();
5104        case -1146218137:  return getReasonReference();
5105        case 73049818:  return addInsurance(); 
5106        case 3387378:  return addNote(); 
5107        case 1538891575:  return addRelevantHistory(); 
5108        case -1561062452:  return getRestriction();
5109        case 100358090:  return addInput(); 
5110        case -1005512447:  return addOutput(); 
5111        default: return super.makeProperty(hash, name);
5112        }
5113
5114      }
5115
5116      @Override
5117      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5118        switch (hash) {
5119        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5120        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
5121        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
5122        case -332612366: /*basedOn*/ return new String[] {"Reference"};
5123        case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"};
5124        case -995410646: /*partOf*/ return new String[] {"Reference"};
5125        case -892481550: /*status*/ return new String[] {"code"};
5126        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
5127        case 2008591314: /*businessStatus*/ return new String[] {"CodeableConcept"};
5128        case -1183762788: /*intent*/ return new String[] {"code"};
5129        case -1165461084: /*priority*/ return new String[] {"code"};
5130        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
5131        case -1724546052: /*description*/ return new String[] {"string"};
5132        case 97604824: /*focus*/ return new String[] {"Reference"};
5133        case 101577: /*for*/ return new String[] {"Reference"};
5134        case 1524132147: /*encounter*/ return new String[] {"Reference"};
5135        case 1218624249: /*executionPeriod*/ return new String[] {"Period"};
5136        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
5137        case 1959003007: /*lastModified*/ return new String[] {"dateTime"};
5138        case 693933948: /*requester*/ return new String[] {"Reference"};
5139        case -901444568: /*performerType*/ return new String[] {"CodeableConcept"};
5140        case 106164915: /*owner*/ return new String[] {"Reference"};
5141        case 1901043637: /*location*/ return new String[] {"Reference"};
5142        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
5143        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
5144        case 73049818: /*insurance*/ return new String[] {"Reference"};
5145        case 3387378: /*note*/ return new String[] {"Annotation"};
5146        case 1538891575: /*relevantHistory*/ return new String[] {"Reference"};
5147        case -1561062452: /*restriction*/ return new String[] {};
5148        case 100358090: /*input*/ return new String[] {};
5149        case -1005512447: /*output*/ return new String[] {};
5150        default: return super.getTypesForProperty(hash, name);
5151        }
5152
5153      }
5154
5155      @Override
5156      public Base addChild(String name) throws FHIRException {
5157        if (name.equals("identifier")) {
5158          return addIdentifier();
5159        }
5160        else if (name.equals("instantiatesCanonical")) {
5161          throw new FHIRException("Cannot call addChild on a primitive type Task.instantiatesCanonical");
5162        }
5163        else if (name.equals("instantiatesUri")) {
5164          throw new FHIRException("Cannot call addChild on a primitive type Task.instantiatesUri");
5165        }
5166        else if (name.equals("basedOn")) {
5167          return addBasedOn();
5168        }
5169        else if (name.equals("groupIdentifier")) {
5170          this.groupIdentifier = new Identifier();
5171          return this.groupIdentifier;
5172        }
5173        else if (name.equals("partOf")) {
5174          return addPartOf();
5175        }
5176        else if (name.equals("status")) {
5177          throw new FHIRException("Cannot call addChild on a primitive type Task.status");
5178        }
5179        else if (name.equals("statusReason")) {
5180          this.statusReason = new CodeableConcept();
5181          return this.statusReason;
5182        }
5183        else if (name.equals("businessStatus")) {
5184          this.businessStatus = new CodeableConcept();
5185          return this.businessStatus;
5186        }
5187        else if (name.equals("intent")) {
5188          throw new FHIRException("Cannot call addChild on a primitive type Task.intent");
5189        }
5190        else if (name.equals("priority")) {
5191          throw new FHIRException("Cannot call addChild on a primitive type Task.priority");
5192        }
5193        else if (name.equals("code")) {
5194          this.code = new CodeableConcept();
5195          return this.code;
5196        }
5197        else if (name.equals("description")) {
5198          throw new FHIRException("Cannot call addChild on a primitive type Task.description");
5199        }
5200        else if (name.equals("focus")) {
5201          this.focus = new Reference();
5202          return this.focus;
5203        }
5204        else if (name.equals("for")) {
5205          this.for_ = new Reference();
5206          return this.for_;
5207        }
5208        else if (name.equals("encounter")) {
5209          this.encounter = new Reference();
5210          return this.encounter;
5211        }
5212        else if (name.equals("executionPeriod")) {
5213          this.executionPeriod = new Period();
5214          return this.executionPeriod;
5215        }
5216        else if (name.equals("authoredOn")) {
5217          throw new FHIRException("Cannot call addChild on a primitive type Task.authoredOn");
5218        }
5219        else if (name.equals("lastModified")) {
5220          throw new FHIRException("Cannot call addChild on a primitive type Task.lastModified");
5221        }
5222        else if (name.equals("requester")) {
5223          this.requester = new Reference();
5224          return this.requester;
5225        }
5226        else if (name.equals("performerType")) {
5227          return addPerformerType();
5228        }
5229        else if (name.equals("owner")) {
5230          this.owner = new Reference();
5231          return this.owner;
5232        }
5233        else if (name.equals("location")) {
5234          this.location = new Reference();
5235          return this.location;
5236        }
5237        else if (name.equals("reasonCode")) {
5238          this.reasonCode = new CodeableConcept();
5239          return this.reasonCode;
5240        }
5241        else if (name.equals("reasonReference")) {
5242          this.reasonReference = new Reference();
5243          return this.reasonReference;
5244        }
5245        else if (name.equals("insurance")) {
5246          return addInsurance();
5247        }
5248        else if (name.equals("note")) {
5249          return addNote();
5250        }
5251        else if (name.equals("relevantHistory")) {
5252          return addRelevantHistory();
5253        }
5254        else if (name.equals("restriction")) {
5255          this.restriction = new TaskRestrictionComponent();
5256          return this.restriction;
5257        }
5258        else if (name.equals("input")) {
5259          return addInput();
5260        }
5261        else if (name.equals("output")) {
5262          return addOutput();
5263        }
5264        else
5265          return super.addChild(name);
5266      }
5267
5268  public String fhirType() {
5269    return "Task";
5270
5271  }
5272
5273      public Task copy() {
5274        Task dst = new Task();
5275        copyValues(dst);
5276        return dst;
5277      }
5278
5279      public void copyValues(Task dst) {
5280        super.copyValues(dst);
5281        if (identifier != null) {
5282          dst.identifier = new ArrayList<Identifier>();
5283          for (Identifier i : identifier)
5284            dst.identifier.add(i.copy());
5285        };
5286        dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy();
5287        dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy();
5288        if (basedOn != null) {
5289          dst.basedOn = new ArrayList<Reference>();
5290          for (Reference i : basedOn)
5291            dst.basedOn.add(i.copy());
5292        };
5293        dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy();
5294        if (partOf != null) {
5295          dst.partOf = new ArrayList<Reference>();
5296          for (Reference i : partOf)
5297            dst.partOf.add(i.copy());
5298        };
5299        dst.status = status == null ? null : status.copy();
5300        dst.statusReason = statusReason == null ? null : statusReason.copy();
5301        dst.businessStatus = businessStatus == null ? null : businessStatus.copy();
5302        dst.intent = intent == null ? null : intent.copy();
5303        dst.priority = priority == null ? null : priority.copy();
5304        dst.code = code == null ? null : code.copy();
5305        dst.description = description == null ? null : description.copy();
5306        dst.focus = focus == null ? null : focus.copy();
5307        dst.for_ = for_ == null ? null : for_.copy();
5308        dst.encounter = encounter == null ? null : encounter.copy();
5309        dst.executionPeriod = executionPeriod == null ? null : executionPeriod.copy();
5310        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
5311        dst.lastModified = lastModified == null ? null : lastModified.copy();
5312        dst.requester = requester == null ? null : requester.copy();
5313        if (performerType != null) {
5314          dst.performerType = new ArrayList<CodeableConcept>();
5315          for (CodeableConcept i : performerType)
5316            dst.performerType.add(i.copy());
5317        };
5318        dst.owner = owner == null ? null : owner.copy();
5319        dst.location = location == null ? null : location.copy();
5320        dst.reasonCode = reasonCode == null ? null : reasonCode.copy();
5321        dst.reasonReference = reasonReference == null ? null : reasonReference.copy();
5322        if (insurance != null) {
5323          dst.insurance = new ArrayList<Reference>();
5324          for (Reference i : insurance)
5325            dst.insurance.add(i.copy());
5326        };
5327        if (note != null) {
5328          dst.note = new ArrayList<Annotation>();
5329          for (Annotation i : note)
5330            dst.note.add(i.copy());
5331        };
5332        if (relevantHistory != null) {
5333          dst.relevantHistory = new ArrayList<Reference>();
5334          for (Reference i : relevantHistory)
5335            dst.relevantHistory.add(i.copy());
5336        };
5337        dst.restriction = restriction == null ? null : restriction.copy();
5338        if (input != null) {
5339          dst.input = new ArrayList<ParameterComponent>();
5340          for (ParameterComponent i : input)
5341            dst.input.add(i.copy());
5342        };
5343        if (output != null) {
5344          dst.output = new ArrayList<TaskOutputComponent>();
5345          for (TaskOutputComponent i : output)
5346            dst.output.add(i.copy());
5347        };
5348      }
5349
5350      protected Task typedCopy() {
5351        return copy();
5352      }
5353
5354      @Override
5355      public boolean equalsDeep(Base other_) {
5356        if (!super.equalsDeep(other_))
5357          return false;
5358        if (!(other_ instanceof Task))
5359          return false;
5360        Task o = (Task) other_;
5361        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
5362           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
5363           && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(partOf, o.partOf, true)
5364           && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(businessStatus, o.businessStatus, true)
5365           && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) && compareDeep(code, o.code, true)
5366           && compareDeep(description, o.description, true) && compareDeep(focus, o.focus, true) && compareDeep(for_, o.for_, true)
5367           && compareDeep(encounter, o.encounter, true) && compareDeep(executionPeriod, o.executionPeriod, true)
5368           && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(lastModified, o.lastModified, true)
5369           && compareDeep(requester, o.requester, true) && compareDeep(performerType, o.performerType, true)
5370           && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(reasonCode, o.reasonCode, true)
5371           && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(insurance, o.insurance, true)
5372           && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true) && compareDeep(restriction, o.restriction, true)
5373           && compareDeep(input, o.input, true) && compareDeep(output, o.output, true);
5374      }
5375
5376      @Override
5377      public boolean equalsShallow(Base other_) {
5378        if (!super.equalsShallow(other_))
5379          return false;
5380        if (!(other_ instanceof Task))
5381          return false;
5382        Task o = (Task) other_;
5383        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
5384           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true)
5385           && compareValues(description, o.description, true) && compareValues(authoredOn, o.authoredOn, true)
5386           && compareValues(lastModified, o.lastModified, true);
5387      }
5388
5389      public boolean isEmpty() {
5390        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
5391          , instantiatesUri, basedOn, groupIdentifier, partOf, status, statusReason, businessStatus
5392          , intent, priority, code, description, focus, for_, encounter, executionPeriod
5393          , authoredOn, lastModified, requester, performerType, owner, location, reasonCode
5394          , reasonReference, insurance, note, relevantHistory, restriction, input, output
5395          );
5396      }
5397
5398  @Override
5399  public ResourceType getResourceType() {
5400    return ResourceType.Task;
5401   }
5402
5403 /**
5404   * Search parameter: <b>authored-on</b>
5405   * <p>
5406   * Description: <b>Search by creation date</b><br>
5407   * Type: <b>date</b><br>
5408   * Path: <b>Task.authoredOn</b><br>
5409   * </p>
5410   */
5411  @SearchParamDefinition(name="authored-on", path="Task.authoredOn", description="Search by creation date", type="date" )
5412  public static final String SP_AUTHORED_ON = "authored-on";
5413 /**
5414   * <b>Fluent Client</b> search parameter constant for <b>authored-on</b>
5415   * <p>
5416   * Description: <b>Search by creation date</b><br>
5417   * Type: <b>date</b><br>
5418   * Path: <b>Task.authoredOn</b><br>
5419   * </p>
5420   */
5421  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED_ON = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED_ON);
5422
5423 /**
5424   * Search parameter: <b>based-on</b>
5425   * <p>
5426   * Description: <b>Search by requests this task is based on</b><br>
5427   * Type: <b>reference</b><br>
5428   * Path: <b>Task.basedOn</b><br>
5429   * </p>
5430   */
5431  @SearchParamDefinition(name="based-on", path="Task.basedOn", description="Search by requests this task is based on", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.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, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.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, 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, MedicationUsage.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, 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, RequestGroup.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, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5432  public static final String SP_BASED_ON = "based-on";
5433 /**
5434   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
5435   * <p>
5436   * Description: <b>Search by requests this task is based on</b><br>
5437   * Type: <b>reference</b><br>
5438   * Path: <b>Task.basedOn</b><br>
5439   * </p>
5440   */
5441  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
5442
5443/**
5444   * Constant for fluent queries to be used to add include statements. Specifies
5445   * the path value of "<b>Task:based-on</b>".
5446   */
5447  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Task:based-on").toLocked();
5448
5449 /**
5450   * Search parameter: <b>business-status</b>
5451   * <p>
5452   * Description: <b>Search by business status</b><br>
5453   * Type: <b>token</b><br>
5454   * Path: <b>Task.businessStatus</b><br>
5455   * </p>
5456   */
5457  @SearchParamDefinition(name="business-status", path="Task.businessStatus", description="Search by business status", type="token" )
5458  public static final String SP_BUSINESS_STATUS = "business-status";
5459 /**
5460   * <b>Fluent Client</b> search parameter constant for <b>business-status</b>
5461   * <p>
5462   * Description: <b>Search by business status</b><br>
5463   * Type: <b>token</b><br>
5464   * Path: <b>Task.businessStatus</b><br>
5465   * </p>
5466   */
5467  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BUSINESS_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BUSINESS_STATUS);
5468
5469 /**
5470   * Search parameter: <b>code</b>
5471   * <p>
5472   * Description: <b>Search by task code</b><br>
5473   * Type: <b>token</b><br>
5474   * Path: <b>Task.code</b><br>
5475   * </p>
5476   */
5477  @SearchParamDefinition(name="code", path="Task.code", description="Search by task code", type="token" )
5478  public static final String SP_CODE = "code";
5479 /**
5480   * <b>Fluent Client</b> search parameter constant for <b>code</b>
5481   * <p>
5482   * Description: <b>Search by task code</b><br>
5483   * Type: <b>token</b><br>
5484   * Path: <b>Task.code</b><br>
5485   * </p>
5486   */
5487  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
5488
5489 /**
5490   * Search parameter: <b>encounter</b>
5491   * <p>
5492   * Description: <b>Search by encounter</b><br>
5493   * Type: <b>reference</b><br>
5494   * Path: <b>Task.encounter</b><br>
5495   * </p>
5496   */
5497  @SearchParamDefinition(name="encounter", path="Task.encounter", description="Search by encounter", type="reference", target={Encounter.class } )
5498  public static final String SP_ENCOUNTER = "encounter";
5499 /**
5500   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
5501   * <p>
5502   * Description: <b>Search by encounter</b><br>
5503   * Type: <b>reference</b><br>
5504   * Path: <b>Task.encounter</b><br>
5505   * </p>
5506   */
5507  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
5508
5509/**
5510   * Constant for fluent queries to be used to add include statements. Specifies
5511   * the path value of "<b>Task:encounter</b>".
5512   */
5513  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Task:encounter").toLocked();
5514
5515 /**
5516   * Search parameter: <b>focus</b>
5517   * <p>
5518   * Description: <b>Search by task focus</b><br>
5519   * Type: <b>reference</b><br>
5520   * Path: <b>Task.focus</b><br>
5521   * </p>
5522   */
5523  @SearchParamDefinition(name="focus", path="Task.focus", description="Search by task focus", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.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, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.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, 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, MedicationUsage.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, 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, RequestGroup.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, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5524  public static final String SP_FOCUS = "focus";
5525 /**
5526   * <b>Fluent Client</b> search parameter constant for <b>focus</b>
5527   * <p>
5528   * Description: <b>Search by task focus</b><br>
5529   * Type: <b>reference</b><br>
5530   * Path: <b>Task.focus</b><br>
5531   * </p>
5532   */
5533  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS);
5534
5535/**
5536   * Constant for fluent queries to be used to add include statements. Specifies
5537   * the path value of "<b>Task:focus</b>".
5538   */
5539  public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Task:focus").toLocked();
5540
5541 /**
5542   * Search parameter: <b>group-identifier</b>
5543   * <p>
5544   * Description: <b>Search by group identifier</b><br>
5545   * Type: <b>token</b><br>
5546   * Path: <b>Task.groupIdentifier</b><br>
5547   * </p>
5548   */
5549  @SearchParamDefinition(name="group-identifier", path="Task.groupIdentifier", description="Search by group identifier", type="token" )
5550  public static final String SP_GROUP_IDENTIFIER = "group-identifier";
5551 /**
5552   * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b>
5553   * <p>
5554   * Description: <b>Search by group identifier</b><br>
5555   * Type: <b>token</b><br>
5556   * Path: <b>Task.groupIdentifier</b><br>
5557   * </p>
5558   */
5559  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER);
5560
5561 /**
5562   * Search parameter: <b>identifier</b>
5563   * <p>
5564   * Description: <b>Search for a task instance by its business identifier</b><br>
5565   * Type: <b>token</b><br>
5566   * Path: <b>Task.identifier</b><br>
5567   * </p>
5568   */
5569  @SearchParamDefinition(name="identifier", path="Task.identifier", description="Search for a task instance by its business identifier", type="token" )
5570  public static final String SP_IDENTIFIER = "identifier";
5571 /**
5572   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5573   * <p>
5574   * Description: <b>Search for a task instance by its business identifier</b><br>
5575   * Type: <b>token</b><br>
5576   * Path: <b>Task.identifier</b><br>
5577   * </p>
5578   */
5579  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5580
5581 /**
5582   * Search parameter: <b>intent</b>
5583   * <p>
5584   * Description: <b>Search by task intent</b><br>
5585   * Type: <b>token</b><br>
5586   * Path: <b>Task.intent</b><br>
5587   * </p>
5588   */
5589  @SearchParamDefinition(name="intent", path="Task.intent", description="Search by task intent", type="token" )
5590  public static final String SP_INTENT = "intent";
5591 /**
5592   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
5593   * <p>
5594   * Description: <b>Search by task intent</b><br>
5595   * Type: <b>token</b><br>
5596   * Path: <b>Task.intent</b><br>
5597   * </p>
5598   */
5599  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
5600
5601 /**
5602   * Search parameter: <b>modified</b>
5603   * <p>
5604   * Description: <b>Search by last modification date</b><br>
5605   * Type: <b>date</b><br>
5606   * Path: <b>Task.lastModified</b><br>
5607   * </p>
5608   */
5609  @SearchParamDefinition(name="modified", path="Task.lastModified", description="Search by last modification date", type="date" )
5610  public static final String SP_MODIFIED = "modified";
5611 /**
5612   * <b>Fluent Client</b> search parameter constant for <b>modified</b>
5613   * <p>
5614   * Description: <b>Search by last modification date</b><br>
5615   * Type: <b>date</b><br>
5616   * Path: <b>Task.lastModified</b><br>
5617   * </p>
5618   */
5619  public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_MODIFIED);
5620
5621 /**
5622   * Search parameter: <b>owner</b>
5623   * <p>
5624   * Description: <b>Search by task owner</b><br>
5625   * Type: <b>reference</b><br>
5626   * Path: <b>Task.owner</b><br>
5627   * </p>
5628   */
5629  @SearchParamDefinition(name="owner", path="Task.owner", description="Search by task owner", type="reference", target={CareTeam.class, Device.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
5630  public static final String SP_OWNER = "owner";
5631 /**
5632   * <b>Fluent Client</b> search parameter constant for <b>owner</b>
5633   * <p>
5634   * Description: <b>Search by task owner</b><br>
5635   * Type: <b>reference</b><br>
5636   * Path: <b>Task.owner</b><br>
5637   * </p>
5638   */
5639  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER);
5640
5641/**
5642   * Constant for fluent queries to be used to add include statements. Specifies
5643   * the path value of "<b>Task:owner</b>".
5644   */
5645  public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner").toLocked();
5646
5647 /**
5648   * Search parameter: <b>part-of</b>
5649   * <p>
5650   * Description: <b>Search by task this task is part of</b><br>
5651   * Type: <b>reference</b><br>
5652   * Path: <b>Task.partOf</b><br>
5653   * </p>
5654   */
5655  @SearchParamDefinition(name="part-of", path="Task.partOf", description="Search by task this task is part of", type="reference", target={Task.class } )
5656  public static final String SP_PART_OF = "part-of";
5657 /**
5658   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
5659   * <p>
5660   * Description: <b>Search by task this task is part of</b><br>
5661   * Type: <b>reference</b><br>
5662   * Path: <b>Task.partOf</b><br>
5663   * </p>
5664   */
5665  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
5666
5667/**
5668   * Constant for fluent queries to be used to add include statements. Specifies
5669   * the path value of "<b>Task:part-of</b>".
5670   */
5671  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Task:part-of").toLocked();
5672
5673 /**
5674   * Search parameter: <b>patient</b>
5675   * <p>
5676   * Description: <b>Search by patient</b><br>
5677   * Type: <b>reference</b><br>
5678   * Path: <b>Task.for.where(resolve() is Patient)</b><br>
5679   * </p>
5680   */
5681  @SearchParamDefinition(name="patient", path="Task.for.where(resolve() is Patient)", description="Search by patient", type="reference", target={Patient.class } )
5682  public static final String SP_PATIENT = "patient";
5683 /**
5684   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
5685   * <p>
5686   * Description: <b>Search by patient</b><br>
5687   * Type: <b>reference</b><br>
5688   * Path: <b>Task.for.where(resolve() is Patient)</b><br>
5689   * </p>
5690   */
5691  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
5692
5693/**
5694   * Constant for fluent queries to be used to add include statements. Specifies
5695   * the path value of "<b>Task:patient</b>".
5696   */
5697  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Task:patient").toLocked();
5698
5699 /**
5700   * Search parameter: <b>performer</b>
5701   * <p>
5702   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
5703   * Type: <b>token</b><br>
5704   * Path: <b>Task.performerType</b><br>
5705   * </p>
5706   */
5707  @SearchParamDefinition(name="performer", path="Task.performerType", description="Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type="token" )
5708  public static final String SP_PERFORMER = "performer";
5709 /**
5710   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
5711   * <p>
5712   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
5713   * Type: <b>token</b><br>
5714   * Path: <b>Task.performerType</b><br>
5715   * </p>
5716   */
5717  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER);
5718
5719 /**
5720   * Search parameter: <b>period</b>
5721   * <p>
5722   * Description: <b>Search by period Task is/was underway</b><br>
5723   * Type: <b>date</b><br>
5724   * Path: <b>Task.executionPeriod</b><br>
5725   * </p>
5726   */
5727  @SearchParamDefinition(name="period", path="Task.executionPeriod", description="Search by period Task is/was underway", type="date" )
5728  public static final String SP_PERIOD = "period";
5729 /**
5730   * <b>Fluent Client</b> search parameter constant for <b>period</b>
5731   * <p>
5732   * Description: <b>Search by period Task is/was underway</b><br>
5733   * Type: <b>date</b><br>
5734   * Path: <b>Task.executionPeriod</b><br>
5735   * </p>
5736   */
5737  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
5738
5739 /**
5740   * Search parameter: <b>priority</b>
5741   * <p>
5742   * Description: <b>Search by task priority</b><br>
5743   * Type: <b>token</b><br>
5744   * Path: <b>Task.priority</b><br>
5745   * </p>
5746   */
5747  @SearchParamDefinition(name="priority", path="Task.priority", description="Search by task priority", type="token" )
5748  public static final String SP_PRIORITY = "priority";
5749 /**
5750   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
5751   * <p>
5752   * Description: <b>Search by task priority</b><br>
5753   * Type: <b>token</b><br>
5754   * Path: <b>Task.priority</b><br>
5755   * </p>
5756   */
5757  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
5758
5759 /**
5760   * Search parameter: <b>requester</b>
5761   * <p>
5762   * Description: <b>Search by task requester</b><br>
5763   * Type: <b>reference</b><br>
5764   * Path: <b>Task.requester</b><br>
5765   * </p>
5766   */
5767  @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 } )
5768  public static final String SP_REQUESTER = "requester";
5769 /**
5770   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
5771   * <p>
5772   * Description: <b>Search by task requester</b><br>
5773   * Type: <b>reference</b><br>
5774   * Path: <b>Task.requester</b><br>
5775   * </p>
5776   */
5777  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
5778
5779/**
5780   * Constant for fluent queries to be used to add include statements. Specifies
5781   * the path value of "<b>Task:requester</b>".
5782   */
5783  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("Task:requester").toLocked();
5784
5785 /**
5786   * Search parameter: <b>status</b>
5787   * <p>
5788   * Description: <b>Search by task status</b><br>
5789   * Type: <b>token</b><br>
5790   * Path: <b>Task.status</b><br>
5791   * </p>
5792   */
5793  @SearchParamDefinition(name="status", path="Task.status", description="Search by task status", type="token" )
5794  public static final String SP_STATUS = "status";
5795 /**
5796   * <b>Fluent Client</b> search parameter constant for <b>status</b>
5797   * <p>
5798   * Description: <b>Search by task status</b><br>
5799   * Type: <b>token</b><br>
5800   * Path: <b>Task.status</b><br>
5801   * </p>
5802   */
5803  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
5804
5805 /**
5806   * Search parameter: <b>subject</b>
5807   * <p>
5808   * Description: <b>Search by subject</b><br>
5809   * Type: <b>reference</b><br>
5810   * Path: <b>Task.for</b><br>
5811   * </p>
5812   */
5813  @SearchParamDefinition(name="subject", path="Task.for", description="Search by subject", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.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, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.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, 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, MedicationUsage.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, 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, RequestGroup.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, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
5814  public static final String SP_SUBJECT = "subject";
5815 /**
5816   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
5817   * <p>
5818   * Description: <b>Search by subject</b><br>
5819   * Type: <b>reference</b><br>
5820   * Path: <b>Task.for</b><br>
5821   * </p>
5822   */
5823  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
5824
5825/**
5826   * Constant for fluent queries to be used to add include statements. Specifies
5827   * the path value of "<b>Task:subject</b>".
5828   */
5829  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject").toLocked();
5830
5831
5832}
5833