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