001package org.hl7.fhir.r4.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056
057import org.hl7.fhir.exceptions.FHIRException;
058import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
059import org.hl7.fhir.utilities.Utilities;
060
061import ca.uhn.fhir.model.api.annotation.Block;
062import ca.uhn.fhir.model.api.annotation.Child;
063import ca.uhn.fhir.model.api.annotation.Description;
064import ca.uhn.fhir.model.api.annotation.ResourceDef;
065import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
066/**
067 * A task to be performed.
068 */
069@ResourceDef(name="Task", profile="http://hl7.org/fhir/StructureDefinition/Task")
070public class Task extends DomainResource {
071
072    public enum TaskStatus {
073        /**
074         * The task is not yet ready to be acted upon.
075         */
076        DRAFT, 
077        /**
078         * The task is ready to be acted upon and action is sought.
079         */
080        REQUESTED, 
081        /**
082         * A potential performer has claimed ownership of the task and is evaluating whether to perform it.
083         */
084        RECEIVED, 
085        /**
086         * The potential performer has agreed to execute the task but has not yet started work.
087         */
088        ACCEPTED, 
089        /**
090         * The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action.
091         */
092        REJECTED, 
093        /**
094         * 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.
095         */
096        READY, 
097        /**
098         * The task was not completed.
099         */
100        CANCELLED, 
101        /**
102         * The task has been started but is not yet complete.
103         */
104        INPROGRESS, 
105        /**
106         * The task has been started but work has been paused.
107         */
108        ONHOLD, 
109        /**
110         * The task was attempted but could not be completed due to some error.
111         */
112        FAILED, 
113        /**
114         * The task has been completed.
115         */
116        COMPLETED, 
117        /**
118         * The task should never have existed and is retained only because of the possibility it may have used.
119         */
120        ENTEREDINERROR, 
121        /**
122         * added to help the parsers with the generic types
123         */
124        NULL;
125        public static TaskStatus fromCode(String codeString) throws FHIRException {
126            if (codeString == null || "".equals(codeString))
127                return null;
128        if ("draft".equals(codeString))
129          return DRAFT;
130        if ("requested".equals(codeString))
131          return REQUESTED;
132        if ("received".equals(codeString))
133          return RECEIVED;
134        if ("accepted".equals(codeString))
135          return ACCEPTED;
136        if ("rejected".equals(codeString))
137          return REJECTED;
138        if ("ready".equals(codeString))
139          return READY;
140        if ("cancelled".equals(codeString))
141          return CANCELLED;
142        if ("in-progress".equals(codeString))
143          return INPROGRESS;
144        if ("on-hold".equals(codeString))
145          return ONHOLD;
146        if ("failed".equals(codeString))
147          return FAILED;
148        if ("completed".equals(codeString))
149          return COMPLETED;
150        if ("entered-in-error".equals(codeString))
151          return ENTEREDINERROR;
152        if (Configuration.isAcceptInvalidEnums())
153          return null;
154        else
155          throw new FHIRException("Unknown TaskStatus code '"+codeString+"'");
156        }
157        public String toCode() {
158          switch (this) {
159            case DRAFT: return "draft";
160            case REQUESTED: return "requested";
161            case RECEIVED: return "received";
162            case ACCEPTED: return "accepted";
163            case REJECTED: return "rejected";
164            case READY: return "ready";
165            case CANCELLED: return "cancelled";
166            case INPROGRESS: return "in-progress";
167            case ONHOLD: return "on-hold";
168            case FAILED: return "failed";
169            case COMPLETED: return "completed";
170            case ENTEREDINERROR: return "entered-in-error";
171            default: return "?";
172          }
173        }
174        public String getSystem() {
175          switch (this) {
176            case DRAFT: return "http://hl7.org/fhir/task-status";
177            case REQUESTED: return "http://hl7.org/fhir/task-status";
178            case RECEIVED: return "http://hl7.org/fhir/task-status";
179            case ACCEPTED: return "http://hl7.org/fhir/task-status";
180            case REJECTED: return "http://hl7.org/fhir/task-status";
181            case READY: return "http://hl7.org/fhir/task-status";
182            case CANCELLED: return "http://hl7.org/fhir/task-status";
183            case INPROGRESS: return "http://hl7.org/fhir/task-status";
184            case ONHOLD: return "http://hl7.org/fhir/task-status";
185            case FAILED: return "http://hl7.org/fhir/task-status";
186            case COMPLETED: return "http://hl7.org/fhir/task-status";
187            case ENTEREDINERROR: return "http://hl7.org/fhir/task-status";
188            default: return "?";
189          }
190        }
191        public String getDefinition() {
192          switch (this) {
193            case DRAFT: return "The task is not yet ready to be acted upon.";
194            case REQUESTED: return "The task is ready to be acted upon and action is sought.";
195            case RECEIVED: return "A potential performer has claimed ownership of the task and is evaluating whether to perform it.";
196            case ACCEPTED: return "The potential performer has agreed to execute the task but has not yet started work.";
197            case REJECTED: return "The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action.";
198            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.";
199            case CANCELLED: return "The task was not completed.";
200            case INPROGRESS: return "The task has been started but is not yet complete.";
201            case ONHOLD: return "The task has been started but work has been paused.";
202            case FAILED: return "The task was attempted but could not be completed due to some error.";
203            case COMPLETED: return "The task has been completed.";
204            case ENTEREDINERROR: return "The task should never have existed and is retained only because of the possibility it may have used.";
205            default: return "?";
206          }
207        }
208        public String getDisplay() {
209          switch (this) {
210            case DRAFT: return "Draft";
211            case REQUESTED: return "Requested";
212            case RECEIVED: return "Received";
213            case ACCEPTED: return "Accepted";
214            case REJECTED: return "Rejected";
215            case READY: return "Ready";
216            case CANCELLED: return "Cancelled";
217            case INPROGRESS: return "In Progress";
218            case ONHOLD: return "On Hold";
219            case FAILED: return "Failed";
220            case COMPLETED: return "Completed";
221            case ENTEREDINERROR: return "Entered in Error";
222            default: return "?";
223          }
224        }
225    }
226
227  public static class TaskStatusEnumFactory implements EnumFactory<TaskStatus> {
228    public TaskStatus fromCode(String codeString) throws IllegalArgumentException {
229      if (codeString == null || "".equals(codeString))
230            if (codeString == null || "".equals(codeString))
231                return null;
232        if ("draft".equals(codeString))
233          return TaskStatus.DRAFT;
234        if ("requested".equals(codeString))
235          return TaskStatus.REQUESTED;
236        if ("received".equals(codeString))
237          return TaskStatus.RECEIVED;
238        if ("accepted".equals(codeString))
239          return TaskStatus.ACCEPTED;
240        if ("rejected".equals(codeString))
241          return TaskStatus.REJECTED;
242        if ("ready".equals(codeString))
243          return TaskStatus.READY;
244        if ("cancelled".equals(codeString))
245          return TaskStatus.CANCELLED;
246        if ("in-progress".equals(codeString))
247          return TaskStatus.INPROGRESS;
248        if ("on-hold".equals(codeString))
249          return TaskStatus.ONHOLD;
250        if ("failed".equals(codeString))
251          return TaskStatus.FAILED;
252        if ("completed".equals(codeString))
253          return TaskStatus.COMPLETED;
254        if ("entered-in-error".equals(codeString))
255          return TaskStatus.ENTEREDINERROR;
256        throw new IllegalArgumentException("Unknown TaskStatus code '"+codeString+"'");
257        }
258        public Enumeration<TaskStatus> fromType(Base code) throws FHIRException {
259          if (code == null)
260            return null;
261          if (code.isEmpty())
262            return new Enumeration<TaskStatus>(this);
263          String codeString = ((PrimitiveType) code).asStringValue();
264          if (codeString == null || "".equals(codeString))
265            return null;
266        if ("draft".equals(codeString))
267          return new Enumeration<TaskStatus>(this, TaskStatus.DRAFT);
268        if ("requested".equals(codeString))
269          return new Enumeration<TaskStatus>(this, TaskStatus.REQUESTED);
270        if ("received".equals(codeString))
271          return new Enumeration<TaskStatus>(this, TaskStatus.RECEIVED);
272        if ("accepted".equals(codeString))
273          return new Enumeration<TaskStatus>(this, TaskStatus.ACCEPTED);
274        if ("rejected".equals(codeString))
275          return new Enumeration<TaskStatus>(this, TaskStatus.REJECTED);
276        if ("ready".equals(codeString))
277          return new Enumeration<TaskStatus>(this, TaskStatus.READY);
278        if ("cancelled".equals(codeString))
279          return new Enumeration<TaskStatus>(this, TaskStatus.CANCELLED);
280        if ("in-progress".equals(codeString))
281          return new Enumeration<TaskStatus>(this, TaskStatus.INPROGRESS);
282        if ("on-hold".equals(codeString))
283          return new Enumeration<TaskStatus>(this, TaskStatus.ONHOLD);
284        if ("failed".equals(codeString))
285          return new Enumeration<TaskStatus>(this, TaskStatus.FAILED);
286        if ("completed".equals(codeString))
287          return new Enumeration<TaskStatus>(this, TaskStatus.COMPLETED);
288        if ("entered-in-error".equals(codeString))
289          return new Enumeration<TaskStatus>(this, TaskStatus.ENTEREDINERROR);
290        throw new FHIRException("Unknown TaskStatus code '"+codeString+"'");
291        }
292    public String toCode(TaskStatus code) {
293      if (code == TaskStatus.DRAFT)
294        return "draft";
295      if (code == TaskStatus.REQUESTED)
296        return "requested";
297      if (code == TaskStatus.RECEIVED)
298        return "received";
299      if (code == TaskStatus.ACCEPTED)
300        return "accepted";
301      if (code == TaskStatus.REJECTED)
302        return "rejected";
303      if (code == TaskStatus.READY)
304        return "ready";
305      if (code == TaskStatus.CANCELLED)
306        return "cancelled";
307      if (code == TaskStatus.INPROGRESS)
308        return "in-progress";
309      if (code == TaskStatus.ONHOLD)
310        return "on-hold";
311      if (code == TaskStatus.FAILED)
312        return "failed";
313      if (code == TaskStatus.COMPLETED)
314        return "completed";
315      if (code == TaskStatus.ENTEREDINERROR)
316        return "entered-in-error";
317      return "?";
318      }
319    public String toSystem(TaskStatus code) {
320      return code.getSystem();
321      }
322    }
323
324    public enum TaskIntent {
325        /**
326         * 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.
327         */
328        UNKNOWN, 
329        /**
330         * null
331         */
332        PROPOSAL, 
333        /**
334         * null
335         */
336        PLAN, 
337        /**
338         * null
339         */
340        ORDER, 
341        /**
342         * null
343         */
344        ORIGINALORDER, 
345        /**
346         * null
347         */
348        REFLEXORDER, 
349        /**
350         * null
351         */
352        FILLERORDER, 
353        /**
354         * null
355         */
356        INSTANCEORDER, 
357        /**
358         * null
359         */
360        OPTION, 
361        /**
362         * added to help the parsers with the generic types
363         */
364        NULL;
365        public static TaskIntent fromCode(String codeString) throws FHIRException {
366            if (codeString == null || "".equals(codeString))
367                return null;
368        if ("unknown".equals(codeString))
369          return UNKNOWN;
370        if ("proposal".equals(codeString))
371          return PROPOSAL;
372        if ("plan".equals(codeString))
373          return PLAN;
374        if ("order".equals(codeString))
375          return ORDER;
376        if ("original-order".equals(codeString))
377          return ORIGINALORDER;
378        if ("reflex-order".equals(codeString))
379          return REFLEXORDER;
380        if ("filler-order".equals(codeString))
381          return FILLERORDER;
382        if ("instance-order".equals(codeString))
383          return INSTANCEORDER;
384        if ("option".equals(codeString))
385          return OPTION;
386        if (Configuration.isAcceptInvalidEnums())
387          return null;
388        else
389          throw new FHIRException("Unknown TaskIntent code '"+codeString+"'");
390        }
391        public String toCode() {
392          switch (this) {
393            case UNKNOWN: return "unknown";
394            case PROPOSAL: return "proposal";
395            case PLAN: return "plan";
396            case ORDER: return "order";
397            case ORIGINALORDER: return "original-order";
398            case REFLEXORDER: return "reflex-order";
399            case FILLERORDER: return "filler-order";
400            case INSTANCEORDER: return "instance-order";
401            case OPTION: return "option";
402            default: return "?";
403          }
404        }
405        public String getSystem() {
406          switch (this) {
407            case UNKNOWN: return "http://hl7.org/fhir/task-intent";
408            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
409            case PLAN: return "http://hl7.org/fhir/request-intent";
410            case ORDER: return "http://hl7.org/fhir/request-intent";
411            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
412            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
413            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
414            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
415            case OPTION: return "http://hl7.org/fhir/request-intent";
416            default: return "?";
417          }
418        }
419        public String getDefinition() {
420          switch (this) {
421            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.";
422            case PROPOSAL: return "";
423            case PLAN: return "";
424            case ORDER: return "";
425            case ORIGINALORDER: return "";
426            case REFLEXORDER: return "";
427            case FILLERORDER: return "";
428            case INSTANCEORDER: return "";
429            case OPTION: return "";
430            default: return "?";
431          }
432        }
433        public String getDisplay() {
434          switch (this) {
435            case UNKNOWN: return "Unknown";
436            case PROPOSAL: return "proposal";
437            case PLAN: return "plan";
438            case ORDER: return "order";
439            case ORIGINALORDER: return "original-order";
440            case REFLEXORDER: return "reflex-order";
441            case FILLERORDER: return "filler-order";
442            case INSTANCEORDER: return "instance-order";
443            case OPTION: return "option";
444            default: return "?";
445          }
446        }
447    }
448
449  public static class TaskIntentEnumFactory implements EnumFactory<TaskIntent> {
450    public TaskIntent fromCode(String codeString) throws IllegalArgumentException {
451      if (codeString == null || "".equals(codeString))
452            if (codeString == null || "".equals(codeString))
453                return null;
454        if ("unknown".equals(codeString))
455          return TaskIntent.UNKNOWN;
456        if ("proposal".equals(codeString))
457          return TaskIntent.PROPOSAL;
458        if ("plan".equals(codeString))
459          return TaskIntent.PLAN;
460        if ("order".equals(codeString))
461          return TaskIntent.ORDER;
462        if ("original-order".equals(codeString))
463          return TaskIntent.ORIGINALORDER;
464        if ("reflex-order".equals(codeString))
465          return TaskIntent.REFLEXORDER;
466        if ("filler-order".equals(codeString))
467          return TaskIntent.FILLERORDER;
468        if ("instance-order".equals(codeString))
469          return TaskIntent.INSTANCEORDER;
470        if ("option".equals(codeString))
471          return TaskIntent.OPTION;
472        throw new IllegalArgumentException("Unknown TaskIntent code '"+codeString+"'");
473        }
474        public Enumeration<TaskIntent> fromType(Base code) throws FHIRException {
475          if (code == null)
476            return null;
477          if (code.isEmpty())
478            return new Enumeration<TaskIntent>(this);
479          String codeString = ((PrimitiveType) code).asStringValue();
480          if (codeString == null || "".equals(codeString))
481            return null;
482        if ("unknown".equals(codeString))
483          return new Enumeration<TaskIntent>(this, TaskIntent.UNKNOWN);
484        if ("proposal".equals(codeString))
485          return new Enumeration<TaskIntent>(this, TaskIntent.PROPOSAL);
486        if ("plan".equals(codeString))
487          return new Enumeration<TaskIntent>(this, TaskIntent.PLAN);
488        if ("order".equals(codeString))
489          return new Enumeration<TaskIntent>(this, TaskIntent.ORDER);
490        if ("original-order".equals(codeString))
491          return new Enumeration<TaskIntent>(this, TaskIntent.ORIGINALORDER);
492        if ("reflex-order".equals(codeString))
493          return new Enumeration<TaskIntent>(this, TaskIntent.REFLEXORDER);
494        if ("filler-order".equals(codeString))
495          return new Enumeration<TaskIntent>(this, TaskIntent.FILLERORDER);
496        if ("instance-order".equals(codeString))
497          return new Enumeration<TaskIntent>(this, TaskIntent.INSTANCEORDER);
498        if ("option".equals(codeString))
499          return new Enumeration<TaskIntent>(this, TaskIntent.OPTION);
500        throw new FHIRException("Unknown TaskIntent code '"+codeString+"'");
501        }
502    public String toCode(TaskIntent code) {
503      if (code == TaskIntent.UNKNOWN)
504        return "unknown";
505      if (code == TaskIntent.PROPOSAL)
506        return "proposal";
507      if (code == TaskIntent.PLAN)
508        return "plan";
509      if (code == TaskIntent.ORDER)
510        return "order";
511      if (code == TaskIntent.ORIGINALORDER)
512        return "original-order";
513      if (code == TaskIntent.REFLEXORDER)
514        return "reflex-order";
515      if (code == TaskIntent.FILLERORDER)
516        return "filler-order";
517      if (code == TaskIntent.INSTANCEORDER)
518        return "instance-order";
519      if (code == TaskIntent.OPTION)
520        return "option";
521      return "?";
522      }
523    public String toSystem(TaskIntent code) {
524      return code.getSystem();
525      }
526    }
527
528    public enum TaskPriority {
529        /**
530         * The request has normal priority.
531         */
532        ROUTINE, 
533        /**
534         * The request should be actioned promptly - higher priority than routine.
535         */
536        URGENT, 
537        /**
538         * The request should be actioned as soon as possible - higher priority than urgent.
539         */
540        ASAP, 
541        /**
542         * The request should be actioned immediately - highest possible priority.  E.g. an emergency.
543         */
544        STAT, 
545        /**
546         * added to help the parsers with the generic types
547         */
548        NULL;
549        public static TaskPriority fromCode(String codeString) throws FHIRException {
550            if (codeString == null || "".equals(codeString))
551                return null;
552        if ("routine".equals(codeString))
553          return ROUTINE;
554        if ("urgent".equals(codeString))
555          return URGENT;
556        if ("asap".equals(codeString))
557          return ASAP;
558        if ("stat".equals(codeString))
559          return STAT;
560        if (Configuration.isAcceptInvalidEnums())
561          return null;
562        else
563          throw new FHIRException("Unknown TaskPriority code '"+codeString+"'");
564        }
565        public String toCode() {
566          switch (this) {
567            case ROUTINE: return "routine";
568            case URGENT: return "urgent";
569            case ASAP: return "asap";
570            case STAT: return "stat";
571            default: return "?";
572          }
573        }
574        public String getSystem() {
575          switch (this) {
576            case ROUTINE: return "http://hl7.org/fhir/request-priority";
577            case URGENT: return "http://hl7.org/fhir/request-priority";
578            case ASAP: return "http://hl7.org/fhir/request-priority";
579            case STAT: return "http://hl7.org/fhir/request-priority";
580            default: return "?";
581          }
582        }
583        public String getDefinition() {
584          switch (this) {
585            case ROUTINE: return "The request has normal priority.";
586            case URGENT: return "The request should be actioned promptly - higher priority than routine.";
587            case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent.";
588            case STAT: return "The request should be actioned immediately - highest possible priority.  E.g. an emergency.";
589            default: return "?";
590          }
591        }
592        public String getDisplay() {
593          switch (this) {
594            case ROUTINE: return "Routine";
595            case URGENT: return "Urgent";
596            case ASAP: return "ASAP";
597            case STAT: return "STAT";
598            default: return "?";
599          }
600        }
601    }
602
603  public static class TaskPriorityEnumFactory implements EnumFactory<TaskPriority> {
604    public TaskPriority fromCode(String codeString) throws IllegalArgumentException {
605      if (codeString == null || "".equals(codeString))
606            if (codeString == null || "".equals(codeString))
607                return null;
608        if ("routine".equals(codeString))
609          return TaskPriority.ROUTINE;
610        if ("urgent".equals(codeString))
611          return TaskPriority.URGENT;
612        if ("asap".equals(codeString))
613          return TaskPriority.ASAP;
614        if ("stat".equals(codeString))
615          return TaskPriority.STAT;
616        throw new IllegalArgumentException("Unknown TaskPriority code '"+codeString+"'");
617        }
618        public Enumeration<TaskPriority> fromType(Base code) throws FHIRException {
619          if (code == null)
620            return null;
621          if (code.isEmpty())
622            return new Enumeration<TaskPriority>(this);
623          String codeString = ((PrimitiveType) code).asStringValue();
624          if (codeString == null || "".equals(codeString))
625            return null;
626        if ("routine".equals(codeString))
627          return new Enumeration<TaskPriority>(this, TaskPriority.ROUTINE);
628        if ("urgent".equals(codeString))
629          return new Enumeration<TaskPriority>(this, TaskPriority.URGENT);
630        if ("asap".equals(codeString))
631          return new Enumeration<TaskPriority>(this, TaskPriority.ASAP);
632        if ("stat".equals(codeString))
633          return new Enumeration<TaskPriority>(this, TaskPriority.STAT);
634        throw new FHIRException("Unknown TaskPriority code '"+codeString+"'");
635        }
636    public String toCode(TaskPriority code) {
637      if (code == TaskPriority.ROUTINE)
638        return "routine";
639      if (code == TaskPriority.URGENT)
640        return "urgent";
641      if (code == TaskPriority.ASAP)
642        return "asap";
643      if (code == TaskPriority.STAT)
644        return "stat";
645      return "?";
646      }
647    public String toSystem(TaskPriority code) {
648      return code.getSystem();
649      }
650    }
651
652    @Block()
653    public static class TaskRestrictionComponent extends BackboneElement implements IBaseBackboneElement {
654        /**
655         * Indicates the number of times the requested action should occur.
656         */
657        @Child(name = "repetitions", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false)
658        @Description(shortDefinition="How many times to repeat", formalDefinition="Indicates the number of times the requested action should occur." )
659        protected PositiveIntType repetitions;
660
661        /**
662         * Over what time-period is fulfillment sought.
663         */
664        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
665        @Description(shortDefinition="When fulfillment sought", formalDefinition="Over what time-period is fulfillment sought." )
666        protected Period period;
667
668        /**
669         * For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?
670         */
671        @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)
672        @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?" )
673        protected List<Reference> recipient;
674        /**
675         * The actual objects that are the target of the reference (For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?)
676         */
677        protected List<Resource> recipientTarget;
678
679
680        private static final long serialVersionUID = 1503908360L;
681
682    /**
683     * Constructor
684     */
685      public TaskRestrictionComponent() {
686        super();
687      }
688
689        /**
690         * @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
691         */
692        public PositiveIntType getRepetitionsElement() { 
693          if (this.repetitions == null)
694            if (Configuration.errorOnAutoCreate())
695              throw new Error("Attempt to auto-create TaskRestrictionComponent.repetitions");
696            else if (Configuration.doAutoCreate())
697              this.repetitions = new PositiveIntType(); // bb
698          return this.repetitions;
699        }
700
701        public boolean hasRepetitionsElement() { 
702          return this.repetitions != null && !this.repetitions.isEmpty();
703        }
704
705        public boolean hasRepetitions() { 
706          return this.repetitions != null && !this.repetitions.isEmpty();
707        }
708
709        /**
710         * @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
711         */
712        public TaskRestrictionComponent setRepetitionsElement(PositiveIntType value) { 
713          this.repetitions = value;
714          return this;
715        }
716
717        /**
718         * @return Indicates the number of times the requested action should occur.
719         */
720        public int getRepetitions() { 
721          return this.repetitions == null || this.repetitions.isEmpty() ? 0 : this.repetitions.getValue();
722        }
723
724        /**
725         * @param value Indicates the number of times the requested action should occur.
726         */
727        public TaskRestrictionComponent setRepetitions(int value) { 
728            if (this.repetitions == null)
729              this.repetitions = new PositiveIntType();
730            this.repetitions.setValue(value);
731          return this;
732        }
733
734        /**
735         * @return {@link #period} (Over what time-period is fulfillment sought.)
736         */
737        public Period getPeriod() { 
738          if (this.period == null)
739            if (Configuration.errorOnAutoCreate())
740              throw new Error("Attempt to auto-create TaskRestrictionComponent.period");
741            else if (Configuration.doAutoCreate())
742              this.period = new Period(); // cc
743          return this.period;
744        }
745
746        public boolean hasPeriod() { 
747          return this.period != null && !this.period.isEmpty();
748        }
749
750        /**
751         * @param value {@link #period} (Over what time-period is fulfillment sought.)
752         */
753        public TaskRestrictionComponent setPeriod(Period value) { 
754          this.period = value;
755          return this;
756        }
757
758        /**
759         * @return {@link #recipient} (For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?)
760         */
761        public List<Reference> getRecipient() { 
762          if (this.recipient == null)
763            this.recipient = new ArrayList<Reference>();
764          return this.recipient;
765        }
766
767        /**
768         * @return Returns a reference to <code>this</code> for easy method chaining
769         */
770        public TaskRestrictionComponent setRecipient(List<Reference> theRecipient) { 
771          this.recipient = theRecipient;
772          return this;
773        }
774
775        public boolean hasRecipient() { 
776          if (this.recipient == null)
777            return false;
778          for (Reference item : this.recipient)
779            if (!item.isEmpty())
780              return true;
781          return false;
782        }
783
784        public Reference addRecipient() { //3
785          Reference t = new Reference();
786          if (this.recipient == null)
787            this.recipient = new ArrayList<Reference>();
788          this.recipient.add(t);
789          return t;
790        }
791
792        public TaskRestrictionComponent addRecipient(Reference t) { //3
793          if (t == null)
794            return this;
795          if (this.recipient == null)
796            this.recipient = new ArrayList<Reference>();
797          this.recipient.add(t);
798          return this;
799        }
800
801        /**
802         * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist
803         */
804        public Reference getRecipientFirstRep() { 
805          if (getRecipient().isEmpty()) {
806            addRecipient();
807          }
808          return getRecipient().get(0);
809        }
810
811        /**
812         * @deprecated Use Reference#setResource(IBaseResource) instead
813         */
814        @Deprecated
815        public List<Resource> getRecipientTarget() { 
816          if (this.recipientTarget == null)
817            this.recipientTarget = new ArrayList<Resource>();
818          return this.recipientTarget;
819        }
820
821        protected void listChildren(List<Property> children) {
822          super.listChildren(children);
823          children.add(new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions));
824          children.add(new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period));
825          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));
826        }
827
828        @Override
829        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
830          switch (_hash) {
831          case 984367650: /*repetitions*/  return new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions);
832          case -991726143: /*period*/  return new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period);
833          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);
834          default: return super.getNamedProperty(_hash, _name, _checkValid);
835          }
836
837        }
838
839      @Override
840      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
841        switch (hash) {
842        case 984367650: /*repetitions*/ return this.repetitions == null ? new Base[0] : new Base[] {this.repetitions}; // PositiveIntType
843        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
844        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
845        default: return super.getProperty(hash, name, checkValid);
846        }
847
848      }
849
850      @Override
851      public Base setProperty(int hash, String name, Base value) throws FHIRException {
852        switch (hash) {
853        case 984367650: // repetitions
854          this.repetitions = castToPositiveInt(value); // PositiveIntType
855          return value;
856        case -991726143: // period
857          this.period = castToPeriod(value); // Period
858          return value;
859        case 820081177: // recipient
860          this.getRecipient().add(castToReference(value)); // Reference
861          return value;
862        default: return super.setProperty(hash, name, value);
863        }
864
865      }
866
867      @Override
868      public Base setProperty(String name, Base value) throws FHIRException {
869        if (name.equals("repetitions")) {
870          this.repetitions = castToPositiveInt(value); // PositiveIntType
871        } else if (name.equals("period")) {
872          this.period = castToPeriod(value); // Period
873        } else if (name.equals("recipient")) {
874          this.getRecipient().add(castToReference(value));
875        } else
876          return super.setProperty(name, value);
877        return value;
878      }
879
880      @Override
881      public Base makeProperty(int hash, String name) throws FHIRException {
882        switch (hash) {
883        case 984367650:  return getRepetitionsElement();
884        case -991726143:  return getPeriod(); 
885        case 820081177:  return addRecipient(); 
886        default: return super.makeProperty(hash, name);
887        }
888
889      }
890
891      @Override
892      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
893        switch (hash) {
894        case 984367650: /*repetitions*/ return new String[] {"positiveInt"};
895        case -991726143: /*period*/ return new String[] {"Period"};
896        case 820081177: /*recipient*/ return new String[] {"Reference"};
897        default: return super.getTypesForProperty(hash, name);
898        }
899
900      }
901
902      @Override
903      public Base addChild(String name) throws FHIRException {
904        if (name.equals("repetitions")) {
905          throw new FHIRException("Cannot call addChild on a primitive type Task.repetitions");
906        }
907        else if (name.equals("period")) {
908          this.period = new Period();
909          return this.period;
910        }
911        else if (name.equals("recipient")) {
912          return addRecipient();
913        }
914        else
915          return super.addChild(name);
916      }
917
918      public TaskRestrictionComponent copy() {
919        TaskRestrictionComponent dst = new TaskRestrictionComponent();
920        copyValues(dst);
921        dst.repetitions = repetitions == null ? null : repetitions.copy();
922        dst.period = period == null ? null : period.copy();
923        if (recipient != null) {
924          dst.recipient = new ArrayList<Reference>();
925          for (Reference i : recipient)
926            dst.recipient.add(i.copy());
927        };
928        return dst;
929      }
930
931      @Override
932      public boolean equalsDeep(Base other_) {
933        if (!super.equalsDeep(other_))
934          return false;
935        if (!(other_ instanceof TaskRestrictionComponent))
936          return false;
937        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
938        return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) && compareDeep(recipient, o.recipient, true)
939          ;
940      }
941
942      @Override
943      public boolean equalsShallow(Base other_) {
944        if (!super.equalsShallow(other_))
945          return false;
946        if (!(other_ instanceof TaskRestrictionComponent))
947          return false;
948        TaskRestrictionComponent o = (TaskRestrictionComponent) other_;
949        return compareValues(repetitions, o.repetitions, true);
950      }
951
952      public boolean isEmpty() {
953        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient
954          );
955      }
956
957  public String fhirType() {
958    return "Task.restriction";
959
960  }
961
962  }
963
964    @Block()
965    public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement {
966        /**
967         * A code or description indicating how the input is intended to be used as part of the task execution.
968         */
969        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
970        @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." )
971        protected CodeableConcept type;
972
973        /**
974         * The value of the input parameter as a basic type.
975         */
976        @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false)
977        @Description(shortDefinition="Content to use in performing the task", formalDefinition="The value of the input parameter as a basic type." )
978        protected org.hl7.fhir.r4.model.Type value;
979
980        private static final long serialVersionUID = -850267045L;
981
982    /**
983     * Constructor
984     */
985      public ParameterComponent() {
986        super();
987      }
988
989    /**
990     * Constructor
991     */
992      public ParameterComponent(CodeableConcept type, org.hl7.fhir.r4.model.Type value) {
993        super();
994        this.type = type;
995        this.value = value;
996      }
997
998        /**
999         * @return {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
1000         */
1001        public CodeableConcept getType() { 
1002          if (this.type == null)
1003            if (Configuration.errorOnAutoCreate())
1004              throw new Error("Attempt to auto-create ParameterComponent.type");
1005            else if (Configuration.doAutoCreate())
1006              this.type = new CodeableConcept(); // cc
1007          return this.type;
1008        }
1009
1010        public boolean hasType() { 
1011          return this.type != null && !this.type.isEmpty();
1012        }
1013
1014        /**
1015         * @param value {@link #type} (A code or description indicating how the input is intended to be used as part of the task execution.)
1016         */
1017        public ParameterComponent setType(CodeableConcept value) { 
1018          this.type = value;
1019          return this;
1020        }
1021
1022        /**
1023         * @return {@link #value} (The value of the input parameter as a basic type.)
1024         */
1025        public org.hl7.fhir.r4.model.Type getValue() { 
1026          return this.value;
1027        }
1028
1029        public boolean hasValue() { 
1030          return this.value != null && !this.value.isEmpty();
1031        }
1032
1033        /**
1034         * @param value {@link #value} (The value of the input parameter as a basic type.)
1035         */
1036        public ParameterComponent setValue(org.hl7.fhir.r4.model.Type value) { 
1037          this.value = value;
1038          return this;
1039        }
1040
1041        protected void listChildren(List<Property> children) {
1042          super.listChildren(children);
1043          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));
1044          children.add(new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value));
1045        }
1046
1047        @Override
1048        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1049          switch (_hash) {
1050          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);
1051          case -1410166417: /*value[x]*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1052          case 111972721: /*value*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1053          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1054          case 733421943: /*valueBoolean*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1055          case -786218365: /*valueCanonical*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1056          case -766209282: /*valueCode*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1057          case -766192449: /*valueDate*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1058          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1059          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1060          case 231604844: /*valueId*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1061          case -1668687056: /*valueInstant*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1062          case -1668204915: /*valueInteger*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1063          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1064          case -1410178407: /*valueOid*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1065          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1066          case -1424603934: /*valueString*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1067          case -765708322: /*valueTime*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1068          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1069          case -1410172357: /*valueUri*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1070          case -1410172354: /*valueUrl*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1071          case -765667124: /*valueUuid*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1072          case -478981821: /*valueAddress*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1073          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1074          case -475566732: /*valueAttachment*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1075          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1076          case -1887705029: /*valueCoding*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1077          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1078          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1079          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1080          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1081          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1082          case 2030761548: /*valueRange*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1083          case 2030767386: /*valueRatio*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1084          case 1755241690: /*valueReference*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1085          case -962229101: /*valueSampledData*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1086          case -540985785: /*valueSignature*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1087          case -1406282469: /*valueTiming*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1088          case -1858636920: /*valueDosage*/  return new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, 1, value);
1089          default: return super.getNamedProperty(_hash, _name, _checkValid);
1090          }
1091
1092        }
1093
1094      @Override
1095      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1096        switch (hash) {
1097        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1098        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.r4.model.Type
1099        default: return super.getProperty(hash, name, checkValid);
1100        }
1101
1102      }
1103
1104      @Override
1105      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1106        switch (hash) {
1107        case 3575610: // type
1108          this.type = castToCodeableConcept(value); // CodeableConcept
1109          return value;
1110        case 111972721: // value
1111          this.value = castToType(value); // org.hl7.fhir.r4.model.Type
1112          return value;
1113        default: return super.setProperty(hash, name, value);
1114        }
1115
1116      }
1117
1118      @Override
1119      public Base setProperty(String name, Base value) throws FHIRException {
1120        if (name.equals("type")) {
1121          this.type = castToCodeableConcept(value); // CodeableConcept
1122        } else if (name.equals("value[x]")) {
1123          this.value = castToType(value); // org.hl7.fhir.r4.model.Type
1124        } else
1125          return super.setProperty(name, value);
1126        return value;
1127      }
1128
1129      @Override
1130      public Base makeProperty(int hash, String name) throws FHIRException {
1131        switch (hash) {
1132        case 3575610:  return getType(); 
1133        case -1410166417:  return getValue(); 
1134        case 111972721:  return getValue(); 
1135        default: return super.makeProperty(hash, name);
1136        }
1137
1138      }
1139
1140      @Override
1141      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1142        switch (hash) {
1143        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1144        case 111972721: /*value*/ return new String[] {"*"};
1145        default: return super.getTypesForProperty(hash, name);
1146        }
1147
1148      }
1149
1150      @Override
1151      public Base addChild(String name) throws FHIRException {
1152        if (name.equals("type")) {
1153          this.type = new CodeableConcept();
1154          return this.type;
1155        }
1156        else if (name.equals("valueBase64Binary")) {
1157          this.value = new Base64BinaryType();
1158          return this.value;
1159        }
1160        else if (name.equals("valueBoolean")) {
1161          this.value = new BooleanType();
1162          return this.value;
1163        }
1164        else if (name.equals("valueCanonical")) {
1165          this.value = new CanonicalType();
1166          return this.value;
1167        }
1168        else if (name.equals("valueCode")) {
1169          this.value = new CodeType();
1170          return this.value;
1171        }
1172        else if (name.equals("valueDate")) {
1173          this.value = new DateType();
1174          return this.value;
1175        }
1176        else if (name.equals("valueDateTime")) {
1177          this.value = new DateTimeType();
1178          return this.value;
1179        }
1180        else if (name.equals("valueDecimal")) {
1181          this.value = new DecimalType();
1182          return this.value;
1183        }
1184        else if (name.equals("valueId")) {
1185          this.value = new IdType();
1186          return this.value;
1187        }
1188        else if (name.equals("valueInstant")) {
1189          this.value = new InstantType();
1190          return this.value;
1191        }
1192        else if (name.equals("valueInteger")) {
1193          this.value = new IntegerType();
1194          return this.value;
1195        }
1196        else if (name.equals("valueMarkdown")) {
1197          this.value = new MarkdownType();
1198          return this.value;
1199        }
1200        else if (name.equals("valueOid")) {
1201          this.value = new OidType();
1202          return this.value;
1203        }
1204        else if (name.equals("valuePositiveInt")) {
1205          this.value = new PositiveIntType();
1206          return this.value;
1207        }
1208        else if (name.equals("valueString")) {
1209          this.value = new StringType();
1210          return this.value;
1211        }
1212        else if (name.equals("valueTime")) {
1213          this.value = new TimeType();
1214          return this.value;
1215        }
1216        else if (name.equals("valueUnsignedInt")) {
1217          this.value = new UnsignedIntType();
1218          return this.value;
1219        }
1220        else if (name.equals("valueUri")) {
1221          this.value = new UriType();
1222          return this.value;
1223        }
1224        else if (name.equals("valueUrl")) {
1225          this.value = new UrlType();
1226          return this.value;
1227        }
1228        else if (name.equals("valueUuid")) {
1229          this.value = new UuidType();
1230          return this.value;
1231        }
1232        else if (name.equals("valueAddress")) {
1233          this.value = new Address();
1234          return this.value;
1235        }
1236        else if (name.equals("valueAge")) {
1237          this.value = new Age();
1238          return this.value;
1239        }
1240        else if (name.equals("valueAnnotation")) {
1241          this.value = new Annotation();
1242          return this.value;
1243        }
1244        else if (name.equals("valueAttachment")) {
1245          this.value = new Attachment();
1246          return this.value;
1247        }
1248        else if (name.equals("valueCodeableConcept")) {
1249          this.value = new CodeableConcept();
1250          return this.value;
1251        }
1252        else if (name.equals("valueCoding")) {
1253          this.value = new Coding();
1254          return this.value;
1255        }
1256        else if (name.equals("valueContactPoint")) {
1257          this.value = new ContactPoint();
1258          return this.value;
1259        }
1260        else if (name.equals("valueCount")) {
1261          this.value = new Count();
1262          return this.value;
1263        }
1264        else if (name.equals("valueDistance")) {
1265          this.value = new Distance();
1266          return this.value;
1267        }
1268        else if (name.equals("valueDuration")) {
1269          this.value = new Duration();
1270          return this.value;
1271        }
1272        else if (name.equals("valueHumanName")) {
1273          this.value = new HumanName();
1274          return this.value;
1275        }
1276        else if (name.equals("valueIdentifier")) {
1277          this.value = new Identifier();
1278          return this.value;
1279        }
1280        else if (name.equals("valueMoney")) {
1281          this.value = new Money();
1282          return this.value;
1283        }
1284        else if (name.equals("valuePeriod")) {
1285          this.value = new Period();
1286          return this.value;
1287        }
1288        else if (name.equals("valueQuantity")) {
1289          this.value = new Quantity();
1290          return this.value;
1291        }
1292        else if (name.equals("valueRange")) {
1293          this.value = new Range();
1294          return this.value;
1295        }
1296        else if (name.equals("valueRatio")) {
1297          this.value = new Ratio();
1298          return this.value;
1299        }
1300        else if (name.equals("valueReference")) {
1301          this.value = new Reference();
1302          return this.value;
1303        }
1304        else if (name.equals("valueSampledData")) {
1305          this.value = new SampledData();
1306          return this.value;
1307        }
1308        else if (name.equals("valueSignature")) {
1309          this.value = new Signature();
1310          return this.value;
1311        }
1312        else if (name.equals("valueTiming")) {
1313          this.value = new Timing();
1314          return this.value;
1315        }
1316        else if (name.equals("valueContactDetail")) {
1317          this.value = new ContactDetail();
1318          return this.value;
1319        }
1320        else if (name.equals("valueContributor")) {
1321          this.value = new Contributor();
1322          return this.value;
1323        }
1324        else if (name.equals("valueDataRequirement")) {
1325          this.value = new DataRequirement();
1326          return this.value;
1327        }
1328        else if (name.equals("valueExpression")) {
1329          this.value = new Expression();
1330          return this.value;
1331        }
1332        else if (name.equals("valueParameterDefinition")) {
1333          this.value = new ParameterDefinition();
1334          return this.value;
1335        }
1336        else if (name.equals("valueRelatedArtifact")) {
1337          this.value = new RelatedArtifact();
1338          return this.value;
1339        }
1340        else if (name.equals("valueTriggerDefinition")) {
1341          this.value = new TriggerDefinition();
1342          return this.value;
1343        }
1344        else if (name.equals("valueUsageContext")) {
1345          this.value = new UsageContext();
1346          return this.value;
1347        }
1348        else if (name.equals("valueDosage")) {
1349          this.value = new Dosage();
1350          return this.value;
1351        }
1352        else
1353          return super.addChild(name);
1354      }
1355
1356      public ParameterComponent copy() {
1357        ParameterComponent dst = new ParameterComponent();
1358        copyValues(dst);
1359        dst.type = type == null ? null : type.copy();
1360        dst.value = value == null ? null : value.copy();
1361        return dst;
1362      }
1363
1364      @Override
1365      public boolean equalsDeep(Base other_) {
1366        if (!super.equalsDeep(other_))
1367          return false;
1368        if (!(other_ instanceof ParameterComponent))
1369          return false;
1370        ParameterComponent o = (ParameterComponent) other_;
1371        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
1372      }
1373
1374      @Override
1375      public boolean equalsShallow(Base other_) {
1376        if (!super.equalsShallow(other_))
1377          return false;
1378        if (!(other_ instanceof ParameterComponent))
1379          return false;
1380        ParameterComponent o = (ParameterComponent) other_;
1381        return true;
1382      }
1383
1384      public boolean isEmpty() {
1385        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
1386      }
1387
1388  public String fhirType() {
1389    return "Task.input";
1390
1391  }
1392
1393  }
1394
1395    @Block()
1396    public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement {
1397        /**
1398         * The name of the Output parameter.
1399         */
1400        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
1401        @Description(shortDefinition="Label for output", formalDefinition="The name of the Output parameter." )
1402        protected CodeableConcept type;
1403
1404        /**
1405         * The value of the Output parameter as a basic type.
1406         */
1407        @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false)
1408        @Description(shortDefinition="Result of output", formalDefinition="The value of the Output parameter as a basic type." )
1409        protected org.hl7.fhir.r4.model.Type value;
1410
1411        private static final long serialVersionUID = -850267045L;
1412
1413    /**
1414     * Constructor
1415     */
1416      public TaskOutputComponent() {
1417        super();
1418      }
1419
1420    /**
1421     * Constructor
1422     */
1423      public TaskOutputComponent(CodeableConcept type, org.hl7.fhir.r4.model.Type value) {
1424        super();
1425        this.type = type;
1426        this.value = value;
1427      }
1428
1429        /**
1430         * @return {@link #type} (The name of the Output parameter.)
1431         */
1432        public CodeableConcept getType() { 
1433          if (this.type == null)
1434            if (Configuration.errorOnAutoCreate())
1435              throw new Error("Attempt to auto-create TaskOutputComponent.type");
1436            else if (Configuration.doAutoCreate())
1437              this.type = new CodeableConcept(); // cc
1438          return this.type;
1439        }
1440
1441        public boolean hasType() { 
1442          return this.type != null && !this.type.isEmpty();
1443        }
1444
1445        /**
1446         * @param value {@link #type} (The name of the Output parameter.)
1447         */
1448        public TaskOutputComponent setType(CodeableConcept value) { 
1449          this.type = value;
1450          return this;
1451        }
1452
1453        /**
1454         * @return {@link #value} (The value of the Output parameter as a basic type.)
1455         */
1456        public org.hl7.fhir.r4.model.Type getValue() { 
1457          return this.value;
1458        }
1459
1460        public boolean hasValue() { 
1461          return this.value != null && !this.value.isEmpty();
1462        }
1463
1464        /**
1465         * @param value {@link #value} (The value of the Output parameter as a basic type.)
1466         */
1467        public TaskOutputComponent setValue(org.hl7.fhir.r4.model.Type value) { 
1468          this.value = value;
1469          return this;
1470        }
1471
1472        protected void listChildren(List<Property> children) {
1473          super.listChildren(children);
1474          children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type));
1475          children.add(new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value));
1476        }
1477
1478        @Override
1479        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1480          switch (_hash) {
1481          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type);
1482          case -1410166417: /*value[x]*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1483          case 111972721: /*value*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1484          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1485          case 733421943: /*valueBoolean*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1486          case -786218365: /*valueCanonical*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1487          case -766209282: /*valueCode*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1488          case -766192449: /*valueDate*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1489          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1490          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1491          case 231604844: /*valueId*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1492          case -1668687056: /*valueInstant*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1493          case -1668204915: /*valueInteger*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1494          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1495          case -1410178407: /*valueOid*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1496          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1497          case -1424603934: /*valueString*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1498          case -765708322: /*valueTime*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1499          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1500          case -1410172357: /*valueUri*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1501          case -1410172354: /*valueUrl*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1502          case -765667124: /*valueUuid*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1503          case -478981821: /*valueAddress*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1504          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1505          case -475566732: /*valueAttachment*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1506          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1507          case -1887705029: /*valueCoding*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1508          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1509          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1510          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1511          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1512          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1513          case 2030761548: /*valueRange*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1514          case 2030767386: /*valueRatio*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1515          case 1755241690: /*valueReference*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1516          case -962229101: /*valueSampledData*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1517          case -540985785: /*valueSignature*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1518          case -1406282469: /*valueTiming*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1519          case -1858636920: /*valueDosage*/  return new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, 1, value);
1520          default: return super.getNamedProperty(_hash, _name, _checkValid);
1521          }
1522
1523        }
1524
1525      @Override
1526      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1527        switch (hash) {
1528        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1529        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.r4.model.Type
1530        default: return super.getProperty(hash, name, checkValid);
1531        }
1532
1533      }
1534
1535      @Override
1536      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1537        switch (hash) {
1538        case 3575610: // type
1539          this.type = castToCodeableConcept(value); // CodeableConcept
1540          return value;
1541        case 111972721: // value
1542          this.value = castToType(value); // org.hl7.fhir.r4.model.Type
1543          return value;
1544        default: return super.setProperty(hash, name, value);
1545        }
1546
1547      }
1548
1549      @Override
1550      public Base setProperty(String name, Base value) throws FHIRException {
1551        if (name.equals("type")) {
1552          this.type = castToCodeableConcept(value); // CodeableConcept
1553        } else if (name.equals("value[x]")) {
1554          this.value = castToType(value); // org.hl7.fhir.r4.model.Type
1555        } else
1556          return super.setProperty(name, value);
1557        return value;
1558      }
1559
1560      @Override
1561      public Base makeProperty(int hash, String name) throws FHIRException {
1562        switch (hash) {
1563        case 3575610:  return getType(); 
1564        case -1410166417:  return getValue(); 
1565        case 111972721:  return getValue(); 
1566        default: return super.makeProperty(hash, name);
1567        }
1568
1569      }
1570
1571      @Override
1572      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1573        switch (hash) {
1574        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1575        case 111972721: /*value*/ return new String[] {"*"};
1576        default: return super.getTypesForProperty(hash, name);
1577        }
1578
1579      }
1580
1581      @Override
1582      public Base addChild(String name) throws FHIRException {
1583        if (name.equals("type")) {
1584          this.type = new CodeableConcept();
1585          return this.type;
1586        }
1587        else if (name.equals("valueBase64Binary")) {
1588          this.value = new Base64BinaryType();
1589          return this.value;
1590        }
1591        else if (name.equals("valueBoolean")) {
1592          this.value = new BooleanType();
1593          return this.value;
1594        }
1595        else if (name.equals("valueCanonical")) {
1596          this.value = new CanonicalType();
1597          return this.value;
1598        }
1599        else if (name.equals("valueCode")) {
1600          this.value = new CodeType();
1601          return this.value;
1602        }
1603        else if (name.equals("valueDate")) {
1604          this.value = new DateType();
1605          return this.value;
1606        }
1607        else if (name.equals("valueDateTime")) {
1608          this.value = new DateTimeType();
1609          return this.value;
1610        }
1611        else if (name.equals("valueDecimal")) {
1612          this.value = new DecimalType();
1613          return this.value;
1614        }
1615        else if (name.equals("valueId")) {
1616          this.value = new IdType();
1617          return this.value;
1618        }
1619        else if (name.equals("valueInstant")) {
1620          this.value = new InstantType();
1621          return this.value;
1622        }
1623        else if (name.equals("valueInteger")) {
1624          this.value = new IntegerType();
1625          return this.value;
1626        }
1627        else if (name.equals("valueMarkdown")) {
1628          this.value = new MarkdownType();
1629          return this.value;
1630        }
1631        else if (name.equals("valueOid")) {
1632          this.value = new OidType();
1633          return this.value;
1634        }
1635        else if (name.equals("valuePositiveInt")) {
1636          this.value = new PositiveIntType();
1637          return this.value;
1638        }
1639        else if (name.equals("valueString")) {
1640          this.value = new StringType();
1641          return this.value;
1642        }
1643        else if (name.equals("valueTime")) {
1644          this.value = new TimeType();
1645          return this.value;
1646        }
1647        else if (name.equals("valueUnsignedInt")) {
1648          this.value = new UnsignedIntType();
1649          return this.value;
1650        }
1651        else if (name.equals("valueUri")) {
1652          this.value = new UriType();
1653          return this.value;
1654        }
1655        else if (name.equals("valueUrl")) {
1656          this.value = new UrlType();
1657          return this.value;
1658        }
1659        else if (name.equals("valueUuid")) {
1660          this.value = new UuidType();
1661          return this.value;
1662        }
1663        else if (name.equals("valueAddress")) {
1664          this.value = new Address();
1665          return this.value;
1666        }
1667        else if (name.equals("valueAge")) {
1668          this.value = new Age();
1669          return this.value;
1670        }
1671        else if (name.equals("valueAnnotation")) {
1672          this.value = new Annotation();
1673          return this.value;
1674        }
1675        else if (name.equals("valueAttachment")) {
1676          this.value = new Attachment();
1677          return this.value;
1678        }
1679        else if (name.equals("valueCodeableConcept")) {
1680          this.value = new CodeableConcept();
1681          return this.value;
1682        }
1683        else if (name.equals("valueCoding")) {
1684          this.value = new Coding();
1685          return this.value;
1686        }
1687        else if (name.equals("valueContactPoint")) {
1688          this.value = new ContactPoint();
1689          return this.value;
1690        }
1691        else if (name.equals("valueCount")) {
1692          this.value = new Count();
1693          return this.value;
1694        }
1695        else if (name.equals("valueDistance")) {
1696          this.value = new Distance();
1697          return this.value;
1698        }
1699        else if (name.equals("valueDuration")) {
1700          this.value = new Duration();
1701          return this.value;
1702        }
1703        else if (name.equals("valueHumanName")) {
1704          this.value = new HumanName();
1705          return this.value;
1706        }
1707        else if (name.equals("valueIdentifier")) {
1708          this.value = new Identifier();
1709          return this.value;
1710        }
1711        else if (name.equals("valueMoney")) {
1712          this.value = new Money();
1713          return this.value;
1714        }
1715        else if (name.equals("valuePeriod")) {
1716          this.value = new Period();
1717          return this.value;
1718        }
1719        else if (name.equals("valueQuantity")) {
1720          this.value = new Quantity();
1721          return this.value;
1722        }
1723        else if (name.equals("valueRange")) {
1724          this.value = new Range();
1725          return this.value;
1726        }
1727        else if (name.equals("valueRatio")) {
1728          this.value = new Ratio();
1729          return this.value;
1730        }
1731        else if (name.equals("valueReference")) {
1732          this.value = new Reference();
1733          return this.value;
1734        }
1735        else if (name.equals("valueSampledData")) {
1736          this.value = new SampledData();
1737          return this.value;
1738        }
1739        else if (name.equals("valueSignature")) {
1740          this.value = new Signature();
1741          return this.value;
1742        }
1743        else if (name.equals("valueTiming")) {
1744          this.value = new Timing();
1745          return this.value;
1746        }
1747        else if (name.equals("valueContactDetail")) {
1748          this.value = new ContactDetail();
1749          return this.value;
1750        }
1751        else if (name.equals("valueContributor")) {
1752          this.value = new Contributor();
1753          return this.value;
1754        }
1755        else if (name.equals("valueDataRequirement")) {
1756          this.value = new DataRequirement();
1757          return this.value;
1758        }
1759        else if (name.equals("valueExpression")) {
1760          this.value = new Expression();
1761          return this.value;
1762        }
1763        else if (name.equals("valueParameterDefinition")) {
1764          this.value = new ParameterDefinition();
1765          return this.value;
1766        }
1767        else if (name.equals("valueRelatedArtifact")) {
1768          this.value = new RelatedArtifact();
1769          return this.value;
1770        }
1771        else if (name.equals("valueTriggerDefinition")) {
1772          this.value = new TriggerDefinition();
1773          return this.value;
1774        }
1775        else if (name.equals("valueUsageContext")) {
1776          this.value = new UsageContext();
1777          return this.value;
1778        }
1779        else if (name.equals("valueDosage")) {
1780          this.value = new Dosage();
1781          return this.value;
1782        }
1783        else
1784          return super.addChild(name);
1785      }
1786
1787      public TaskOutputComponent copy() {
1788        TaskOutputComponent dst = new TaskOutputComponent();
1789        copyValues(dst);
1790        dst.type = type == null ? null : type.copy();
1791        dst.value = value == null ? null : value.copy();
1792        return dst;
1793      }
1794
1795      @Override
1796      public boolean equalsDeep(Base other_) {
1797        if (!super.equalsDeep(other_))
1798          return false;
1799        if (!(other_ instanceof TaskOutputComponent))
1800          return false;
1801        TaskOutputComponent o = (TaskOutputComponent) other_;
1802        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
1803      }
1804
1805      @Override
1806      public boolean equalsShallow(Base other_) {
1807        if (!super.equalsShallow(other_))
1808          return false;
1809        if (!(other_ instanceof TaskOutputComponent))
1810          return false;
1811        TaskOutputComponent o = (TaskOutputComponent) other_;
1812        return true;
1813      }
1814
1815      public boolean isEmpty() {
1816        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
1817      }
1818
1819  public String fhirType() {
1820    return "Task.output";
1821
1822  }
1823
1824  }
1825
1826    /**
1827     * The business identifier for this task.
1828     */
1829    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1830    @Description(shortDefinition="Task Instance Identifier", formalDefinition="The business identifier for this task." )
1831    protected List<Identifier> identifier;
1832
1833    /**
1834     * 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.
1835     */
1836    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1837    @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." )
1838    protected CanonicalType instantiatesCanonical;
1839
1840    /**
1841     * 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.
1842     */
1843    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1844    @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." )
1845    protected UriType instantiatesUri;
1846
1847    /**
1848     * 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.
1849     */
1850    @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1851    @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." )
1852    protected List<Reference> basedOn;
1853    /**
1854     * The actual objects that are the target of the reference (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.)
1855     */
1856    protected List<Resource> basedOnTarget;
1857
1858
1859    /**
1860     * An identifier that links together multiple tasks and other requests that were created in the same context.
1861     */
1862    @Child(name = "groupIdentifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true)
1863    @Description(shortDefinition="Requisition or grouper id", formalDefinition="An identifier that links together multiple tasks and other requests that were created in the same context." )
1864    protected Identifier groupIdentifier;
1865
1866    /**
1867     * Task that this particular task is part of.
1868     */
1869    @Child(name = "partOf", type = {Task.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1870    @Description(shortDefinition="Composite task", formalDefinition="Task that this particular task is part of." )
1871    protected List<Reference> partOf;
1872    /**
1873     * The actual objects that are the target of the reference (Task that this particular task is part of.)
1874     */
1875    protected List<Task> partOfTarget;
1876
1877
1878    /**
1879     * The current status of the task.
1880     */
1881    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
1882    @Description(shortDefinition="draft | requested | received | accepted | +", formalDefinition="The current status of the task." )
1883    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-status")
1884    protected Enumeration<TaskStatus> status;
1885
1886    /**
1887     * An explanation as to why this task is held, failed, was refused, etc.
1888     */
1889    @Child(name = "statusReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
1890    @Description(shortDefinition="Reason for current status", formalDefinition="An explanation as to why this task is held, failed, was refused, etc." )
1891    protected CodeableConcept statusReason;
1892
1893    /**
1894     * Contains business-specific nuances of the business state.
1895     */
1896    @Child(name = "businessStatus", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
1897    @Description(shortDefinition="E.g. \"Specimen collected\", \"IV prepped\"", formalDefinition="Contains business-specific nuances of the business state." )
1898    protected CodeableConcept businessStatus;
1899
1900    /**
1901     * 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.
1902     */
1903    @Child(name = "intent", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true)
1904    @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." )
1905    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/task-intent")
1906    protected Enumeration<TaskIntent> intent;
1907
1908    /**
1909     * Indicates how quickly the Task should be addressed with respect to other requests.
1910     */
1911    @Child(name = "priority", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false)
1912    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Task should be addressed with respect to other requests." )
1913    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
1914    protected Enumeration<TaskPriority> priority;
1915
1916    /**
1917     * A name or code (or both) briefly describing what the task involves.
1918     */
1919    @Child(name = "code", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true)
1920    @Description(shortDefinition="Task Type", formalDefinition="A name or code (or both) briefly describing what the task involves." )
1921    protected CodeableConcept code;
1922
1923    /**
1924     * A free-text description of what is to be performed.
1925     */
1926    @Child(name = "description", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1927    @Description(shortDefinition="Human-readable explanation of task", formalDefinition="A free-text description of what is to be performed." )
1928    protected StringType description;
1929
1930    /**
1931     * The request being actioned or the resource being manipulated by this task.
1932     */
1933    @Child(name = "focus", type = {Reference.class}, order=13, min=0, max=1, modifier=false, summary=true)
1934    @Description(shortDefinition="What task is acting on", formalDefinition="The request being actioned or the resource being manipulated by this task." )
1935    protected Reference focus;
1936
1937    /**
1938     * The actual object that is the target of the reference (The request being actioned or the resource being manipulated by this task.)
1939     */
1940    protected Resource focusTarget;
1941
1942    /**
1943     * The entity who benefits from the performance of the service specified in the task (e.g., the patient).
1944     */
1945    @Child(name = "for", type = {Reference.class}, order=14, min=0, max=1, modifier=false, summary=true)
1946    @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)." )
1947    protected Reference for_;
1948
1949    /**
1950     * The actual object that is the target of the reference (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
1951     */
1952    protected Resource for_Target;
1953
1954    /**
1955     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.
1956     */
1957    @Child(name = "encounter", type = {Encounter.class}, order=15, min=0, max=1, modifier=false, summary=true)
1958    @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." )
1959    protected Reference encounter;
1960
1961    /**
1962     * The actual object that is the target of the reference (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
1963     */
1964    protected Encounter encounterTarget;
1965
1966    /**
1967     * 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).
1968     */
1969    @Child(name = "executionPeriod", type = {Period.class}, order=16, min=0, max=1, modifier=false, summary=true)
1970    @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)." )
1971    protected Period executionPeriod;
1972
1973    /**
1974     * The date and time this task was created.
1975     */
1976    @Child(name = "authoredOn", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
1977    @Description(shortDefinition="Task Creation Date", formalDefinition="The date and time this task was created." )
1978    protected DateTimeType authoredOn;
1979
1980    /**
1981     * The date and time of last modification to this task.
1982     */
1983    @Child(name = "lastModified", type = {DateTimeType.class}, order=18, min=0, max=1, modifier=false, summary=true)
1984    @Description(shortDefinition="Task Last Modified Date", formalDefinition="The date and time of last modification to this task." )
1985    protected DateTimeType lastModified;
1986
1987    /**
1988     * The creator of the task.
1989     */
1990    @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)
1991    @Description(shortDefinition="Who is asking for task to be done", formalDefinition="The creator of the task." )
1992    protected Reference requester;
1993
1994    /**
1995     * The actual object that is the target of the reference (The creator of the task.)
1996     */
1997    protected Resource requesterTarget;
1998
1999    /**
2000     * The kind of participant that should perform the task.
2001     */
2002    @Child(name = "performerType", type = {CodeableConcept.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2003    @Description(shortDefinition="Requested performer", formalDefinition="The kind of participant that should perform the task." )
2004    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
2005    protected List<CodeableConcept> performerType;
2006
2007    /**
2008     * Individual organization or Device currently responsible for task execution.
2009     */
2010    @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)
2011    @Description(shortDefinition="Responsible individual", formalDefinition="Individual organization or Device currently responsible for task execution." )
2012    protected Reference owner;
2013
2014    /**
2015     * The actual object that is the target of the reference (Individual organization or Device currently responsible for task execution.)
2016     */
2017    protected Resource ownerTarget;
2018
2019    /**
2020     * The principal physical location where the this task is performed.
2021     */
2022    @Child(name = "location", type = {Location.class}, order=22, min=0, max=1, modifier=false, summary=true)
2023    @Description(shortDefinition="Where task occurs", formalDefinition="The principal physical location where the this task is performed." )
2024    protected Reference location;
2025
2026    /**
2027     * The actual object that is the target of the reference (The principal physical location where the this task is performed.)
2028     */
2029    protected Location locationTarget;
2030
2031    /**
2032     * A description or code indicating why this task needs to be performed.
2033     */
2034    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=false)
2035    @Description(shortDefinition="Why task is needed", formalDefinition="A description or code indicating why this task needs to be performed." )
2036    protected CodeableConcept reasonCode;
2037
2038    /**
2039     * A resource reference indicating why this task needs to be performed.
2040     */
2041    @Child(name = "reasonReference", type = {Reference.class}, order=24, min=0, max=1, modifier=false, summary=false)
2042    @Description(shortDefinition="Why task is needed", formalDefinition="A resource reference indicating why this task needs to be performed." )
2043    protected Reference reasonReference;
2044
2045    /**
2046     * The actual object that is the target of the reference (A resource reference indicating why this task needs to be performed.)
2047     */
2048    protected Resource reasonReferenceTarget;
2049
2050    /**
2051     * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.
2052     */
2053    @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2054    @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task." )
2055    protected List<Reference> insurance;
2056    /**
2057     * The actual objects that are the target of the reference (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.)
2058     */
2059    protected List<Resource> insuranceTarget;
2060
2061
2062    /**
2063     * Free-text information captured about the task as it progresses.
2064     */
2065    @Child(name = "note", type = {Annotation.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2066    @Description(shortDefinition="Comments made about the task", formalDefinition="Free-text information captured about the task as it progresses." )
2067    protected List<Annotation> note;
2068
2069    /**
2070     * 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.
2071     */
2072    @Child(name = "relevantHistory", type = {Provenance.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2073    @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." )
2074    protected List<Reference> relevantHistory;
2075    /**
2076     * The actual objects that are the target of the reference (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.)
2077     */
2078    protected List<Provenance> relevantHistoryTarget;
2079
2080
2081    /**
2082     * 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.
2083     */
2084    @Child(name = "restriction", type = {}, order=28, min=0, max=1, modifier=false, summary=false)
2085    @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." )
2086    protected TaskRestrictionComponent restriction;
2087
2088    /**
2089     * Additional information that may be needed in the execution of the task.
2090     */
2091    @Child(name = "input", type = {}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2092    @Description(shortDefinition="Information used to perform task", formalDefinition="Additional information that may be needed in the execution of the task." )
2093    protected List<ParameterComponent> input;
2094
2095    /**
2096     * Outputs produced by the Task.
2097     */
2098    @Child(name = "output", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2099    @Description(shortDefinition="Information produced as part of task", formalDefinition="Outputs produced by the Task." )
2100    protected List<TaskOutputComponent> output;
2101
2102    private static final long serialVersionUID = -765029272L;
2103
2104  /**
2105   * Constructor
2106   */
2107    public Task() {
2108      super();
2109    }
2110
2111  /**
2112   * Constructor
2113   */
2114    public Task(Enumeration<TaskStatus> status, Enumeration<TaskIntent> intent) {
2115      super();
2116      this.status = status;
2117      this.intent = intent;
2118    }
2119
2120    /**
2121     * @return {@link #identifier} (The business identifier for this task.)
2122     */
2123    public List<Identifier> getIdentifier() { 
2124      if (this.identifier == null)
2125        this.identifier = new ArrayList<Identifier>();
2126      return this.identifier;
2127    }
2128
2129    /**
2130     * @return Returns a reference to <code>this</code> for easy method chaining
2131     */
2132    public Task setIdentifier(List<Identifier> theIdentifier) { 
2133      this.identifier = theIdentifier;
2134      return this;
2135    }
2136
2137    public boolean hasIdentifier() { 
2138      if (this.identifier == null)
2139        return false;
2140      for (Identifier item : this.identifier)
2141        if (!item.isEmpty())
2142          return true;
2143      return false;
2144    }
2145
2146    public Identifier addIdentifier() { //3
2147      Identifier t = new Identifier();
2148      if (this.identifier == null)
2149        this.identifier = new ArrayList<Identifier>();
2150      this.identifier.add(t);
2151      return t;
2152    }
2153
2154    public Task addIdentifier(Identifier t) { //3
2155      if (t == null)
2156        return this;
2157      if (this.identifier == null)
2158        this.identifier = new ArrayList<Identifier>();
2159      this.identifier.add(t);
2160      return this;
2161    }
2162
2163    /**
2164     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
2165     */
2166    public Identifier getIdentifierFirstRep() { 
2167      if (getIdentifier().isEmpty()) {
2168        addIdentifier();
2169      }
2170      return getIdentifier().get(0);
2171    }
2172
2173    /**
2174     * @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
2175     */
2176    public CanonicalType getInstantiatesCanonicalElement() { 
2177      if (this.instantiatesCanonical == null)
2178        if (Configuration.errorOnAutoCreate())
2179          throw new Error("Attempt to auto-create Task.instantiatesCanonical");
2180        else if (Configuration.doAutoCreate())
2181          this.instantiatesCanonical = new CanonicalType(); // bb
2182      return this.instantiatesCanonical;
2183    }
2184
2185    public boolean hasInstantiatesCanonicalElement() { 
2186      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
2187    }
2188
2189    public boolean hasInstantiatesCanonical() { 
2190      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
2191    }
2192
2193    /**
2194     * @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
2195     */
2196    public Task setInstantiatesCanonicalElement(CanonicalType value) { 
2197      this.instantiatesCanonical = value;
2198      return this;
2199    }
2200
2201    /**
2202     * @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.
2203     */
2204    public String getInstantiatesCanonical() { 
2205      return this.instantiatesCanonical == null ? null : this.instantiatesCanonical.getValue();
2206    }
2207
2208    /**
2209     * @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.
2210     */
2211    public Task setInstantiatesCanonical(String value) { 
2212      if (Utilities.noString(value))
2213        this.instantiatesCanonical = null;
2214      else {
2215        if (this.instantiatesCanonical == null)
2216          this.instantiatesCanonical = new CanonicalType();
2217        this.instantiatesCanonical.setValue(value);
2218      }
2219      return this;
2220    }
2221
2222    /**
2223     * @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
2224     */
2225    public UriType getInstantiatesUriElement() { 
2226      if (this.instantiatesUri == null)
2227        if (Configuration.errorOnAutoCreate())
2228          throw new Error("Attempt to auto-create Task.instantiatesUri");
2229        else if (Configuration.doAutoCreate())
2230          this.instantiatesUri = new UriType(); // bb
2231      return this.instantiatesUri;
2232    }
2233
2234    public boolean hasInstantiatesUriElement() { 
2235      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
2236    }
2237
2238    public boolean hasInstantiatesUri() { 
2239      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
2240    }
2241
2242    /**
2243     * @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
2244     */
2245    public Task setInstantiatesUriElement(UriType value) { 
2246      this.instantiatesUri = value;
2247      return this;
2248    }
2249
2250    /**
2251     * @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.
2252     */
2253    public String getInstantiatesUri() { 
2254      return this.instantiatesUri == null ? null : this.instantiatesUri.getValue();
2255    }
2256
2257    /**
2258     * @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.
2259     */
2260    public Task setInstantiatesUri(String value) { 
2261      if (Utilities.noString(value))
2262        this.instantiatesUri = null;
2263      else {
2264        if (this.instantiatesUri == null)
2265          this.instantiatesUri = new UriType();
2266        this.instantiatesUri.setValue(value);
2267      }
2268      return this;
2269    }
2270
2271    /**
2272     * @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.)
2273     */
2274    public List<Reference> getBasedOn() { 
2275      if (this.basedOn == null)
2276        this.basedOn = new ArrayList<Reference>();
2277      return this.basedOn;
2278    }
2279
2280    /**
2281     * @return Returns a reference to <code>this</code> for easy method chaining
2282     */
2283    public Task setBasedOn(List<Reference> theBasedOn) { 
2284      this.basedOn = theBasedOn;
2285      return this;
2286    }
2287
2288    public boolean hasBasedOn() { 
2289      if (this.basedOn == null)
2290        return false;
2291      for (Reference item : this.basedOn)
2292        if (!item.isEmpty())
2293          return true;
2294      return false;
2295    }
2296
2297    public Reference addBasedOn() { //3
2298      Reference t = new Reference();
2299      if (this.basedOn == null)
2300        this.basedOn = new ArrayList<Reference>();
2301      this.basedOn.add(t);
2302      return t;
2303    }
2304
2305    public Task addBasedOn(Reference t) { //3
2306      if (t == null)
2307        return this;
2308      if (this.basedOn == null)
2309        this.basedOn = new ArrayList<Reference>();
2310      this.basedOn.add(t);
2311      return this;
2312    }
2313
2314    /**
2315     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist
2316     */
2317    public Reference getBasedOnFirstRep() { 
2318      if (getBasedOn().isEmpty()) {
2319        addBasedOn();
2320      }
2321      return getBasedOn().get(0);
2322    }
2323
2324    /**
2325     * @deprecated Use Reference#setResource(IBaseResource) instead
2326     */
2327    @Deprecated
2328    public List<Resource> getBasedOnTarget() { 
2329      if (this.basedOnTarget == null)
2330        this.basedOnTarget = new ArrayList<Resource>();
2331      return this.basedOnTarget;
2332    }
2333
2334    /**
2335     * @return {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.)
2336     */
2337    public Identifier getGroupIdentifier() { 
2338      if (this.groupIdentifier == null)
2339        if (Configuration.errorOnAutoCreate())
2340          throw new Error("Attempt to auto-create Task.groupIdentifier");
2341        else if (Configuration.doAutoCreate())
2342          this.groupIdentifier = new Identifier(); // cc
2343      return this.groupIdentifier;
2344    }
2345
2346    public boolean hasGroupIdentifier() { 
2347      return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
2348    }
2349
2350    /**
2351     * @param value {@link #groupIdentifier} (An identifier that links together multiple tasks and other requests that were created in the same context.)
2352     */
2353    public Task setGroupIdentifier(Identifier value) { 
2354      this.groupIdentifier = value;
2355      return this;
2356    }
2357
2358    /**
2359     * @return {@link #partOf} (Task that this particular task is part of.)
2360     */
2361    public List<Reference> getPartOf() { 
2362      if (this.partOf == null)
2363        this.partOf = new ArrayList<Reference>();
2364      return this.partOf;
2365    }
2366
2367    /**
2368     * @return Returns a reference to <code>this</code> for easy method chaining
2369     */
2370    public Task setPartOf(List<Reference> thePartOf) { 
2371      this.partOf = thePartOf;
2372      return this;
2373    }
2374
2375    public boolean hasPartOf() { 
2376      if (this.partOf == null)
2377        return false;
2378      for (Reference item : this.partOf)
2379        if (!item.isEmpty())
2380          return true;
2381      return false;
2382    }
2383
2384    public Reference addPartOf() { //3
2385      Reference t = new Reference();
2386      if (this.partOf == null)
2387        this.partOf = new ArrayList<Reference>();
2388      this.partOf.add(t);
2389      return t;
2390    }
2391
2392    public Task addPartOf(Reference t) { //3
2393      if (t == null)
2394        return this;
2395      if (this.partOf == null)
2396        this.partOf = new ArrayList<Reference>();
2397      this.partOf.add(t);
2398      return this;
2399    }
2400
2401    /**
2402     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist
2403     */
2404    public Reference getPartOfFirstRep() { 
2405      if (getPartOf().isEmpty()) {
2406        addPartOf();
2407      }
2408      return getPartOf().get(0);
2409    }
2410
2411    /**
2412     * @deprecated Use Reference#setResource(IBaseResource) instead
2413     */
2414    @Deprecated
2415    public List<Task> getPartOfTarget() { 
2416      if (this.partOfTarget == null)
2417        this.partOfTarget = new ArrayList<Task>();
2418      return this.partOfTarget;
2419    }
2420
2421    /**
2422     * @deprecated Use Reference#setResource(IBaseResource) instead
2423     */
2424    @Deprecated
2425    public Task addPartOfTarget() { 
2426      Task r = new Task();
2427      if (this.partOfTarget == null)
2428        this.partOfTarget = new ArrayList<Task>();
2429      this.partOfTarget.add(r);
2430      return r;
2431    }
2432
2433    /**
2434     * @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
2435     */
2436    public Enumeration<TaskStatus> getStatusElement() { 
2437      if (this.status == null)
2438        if (Configuration.errorOnAutoCreate())
2439          throw new Error("Attempt to auto-create Task.status");
2440        else if (Configuration.doAutoCreate())
2441          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory()); // bb
2442      return this.status;
2443    }
2444
2445    public boolean hasStatusElement() { 
2446      return this.status != null && !this.status.isEmpty();
2447    }
2448
2449    public boolean hasStatus() { 
2450      return this.status != null && !this.status.isEmpty();
2451    }
2452
2453    /**
2454     * @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
2455     */
2456    public Task setStatusElement(Enumeration<TaskStatus> value) { 
2457      this.status = value;
2458      return this;
2459    }
2460
2461    /**
2462     * @return The current status of the task.
2463     */
2464    public TaskStatus getStatus() { 
2465      return this.status == null ? null : this.status.getValue();
2466    }
2467
2468    /**
2469     * @param value The current status of the task.
2470     */
2471    public Task setStatus(TaskStatus value) { 
2472        if (this.status == null)
2473          this.status = new Enumeration<TaskStatus>(new TaskStatusEnumFactory());
2474        this.status.setValue(value);
2475      return this;
2476    }
2477
2478    /**
2479     * @return {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
2480     */
2481    public CodeableConcept getStatusReason() { 
2482      if (this.statusReason == null)
2483        if (Configuration.errorOnAutoCreate())
2484          throw new Error("Attempt to auto-create Task.statusReason");
2485        else if (Configuration.doAutoCreate())
2486          this.statusReason = new CodeableConcept(); // cc
2487      return this.statusReason;
2488    }
2489
2490    public boolean hasStatusReason() { 
2491      return this.statusReason != null && !this.statusReason.isEmpty();
2492    }
2493
2494    /**
2495     * @param value {@link #statusReason} (An explanation as to why this task is held, failed, was refused, etc.)
2496     */
2497    public Task setStatusReason(CodeableConcept value) { 
2498      this.statusReason = value;
2499      return this;
2500    }
2501
2502    /**
2503     * @return {@link #businessStatus} (Contains business-specific nuances of the business state.)
2504     */
2505    public CodeableConcept getBusinessStatus() { 
2506      if (this.businessStatus == null)
2507        if (Configuration.errorOnAutoCreate())
2508          throw new Error("Attempt to auto-create Task.businessStatus");
2509        else if (Configuration.doAutoCreate())
2510          this.businessStatus = new CodeableConcept(); // cc
2511      return this.businessStatus;
2512    }
2513
2514    public boolean hasBusinessStatus() { 
2515      return this.businessStatus != null && !this.businessStatus.isEmpty();
2516    }
2517
2518    /**
2519     * @param value {@link #businessStatus} (Contains business-specific nuances of the business state.)
2520     */
2521    public Task setBusinessStatus(CodeableConcept value) { 
2522      this.businessStatus = value;
2523      return this;
2524    }
2525
2526    /**
2527     * @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
2528     */
2529    public Enumeration<TaskIntent> getIntentElement() { 
2530      if (this.intent == null)
2531        if (Configuration.errorOnAutoCreate())
2532          throw new Error("Attempt to auto-create Task.intent");
2533        else if (Configuration.doAutoCreate())
2534          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory()); // bb
2535      return this.intent;
2536    }
2537
2538    public boolean hasIntentElement() { 
2539      return this.intent != null && !this.intent.isEmpty();
2540    }
2541
2542    public boolean hasIntent() { 
2543      return this.intent != null && !this.intent.isEmpty();
2544    }
2545
2546    /**
2547     * @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
2548     */
2549    public Task setIntentElement(Enumeration<TaskIntent> value) { 
2550      this.intent = value;
2551      return this;
2552    }
2553
2554    /**
2555     * @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.
2556     */
2557    public TaskIntent getIntent() { 
2558      return this.intent == null ? null : this.intent.getValue();
2559    }
2560
2561    /**
2562     * @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.
2563     */
2564    public Task setIntent(TaskIntent value) { 
2565        if (this.intent == null)
2566          this.intent = new Enumeration<TaskIntent>(new TaskIntentEnumFactory());
2567        this.intent.setValue(value);
2568      return this;
2569    }
2570
2571    /**
2572     * @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
2573     */
2574    public Enumeration<TaskPriority> getPriorityElement() { 
2575      if (this.priority == null)
2576        if (Configuration.errorOnAutoCreate())
2577          throw new Error("Attempt to auto-create Task.priority");
2578        else if (Configuration.doAutoCreate())
2579          this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory()); // bb
2580      return this.priority;
2581    }
2582
2583    public boolean hasPriorityElement() { 
2584      return this.priority != null && !this.priority.isEmpty();
2585    }
2586
2587    public boolean hasPriority() { 
2588      return this.priority != null && !this.priority.isEmpty();
2589    }
2590
2591    /**
2592     * @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
2593     */
2594    public Task setPriorityElement(Enumeration<TaskPriority> value) { 
2595      this.priority = value;
2596      return this;
2597    }
2598
2599    /**
2600     * @return Indicates how quickly the Task should be addressed with respect to other requests.
2601     */
2602    public TaskPriority getPriority() { 
2603      return this.priority == null ? null : this.priority.getValue();
2604    }
2605
2606    /**
2607     * @param value Indicates how quickly the Task should be addressed with respect to other requests.
2608     */
2609    public Task setPriority(TaskPriority value) { 
2610      if (value == null)
2611        this.priority = null;
2612      else {
2613        if (this.priority == null)
2614          this.priority = new Enumeration<TaskPriority>(new TaskPriorityEnumFactory());
2615        this.priority.setValue(value);
2616      }
2617      return this;
2618    }
2619
2620    /**
2621     * @return {@link #code} (A name or code (or both) briefly describing what the task involves.)
2622     */
2623    public CodeableConcept getCode() { 
2624      if (this.code == null)
2625        if (Configuration.errorOnAutoCreate())
2626          throw new Error("Attempt to auto-create Task.code");
2627        else if (Configuration.doAutoCreate())
2628          this.code = new CodeableConcept(); // cc
2629      return this.code;
2630    }
2631
2632    public boolean hasCode() { 
2633      return this.code != null && !this.code.isEmpty();
2634    }
2635
2636    /**
2637     * @param value {@link #code} (A name or code (or both) briefly describing what the task involves.)
2638     */
2639    public Task setCode(CodeableConcept value) { 
2640      this.code = value;
2641      return this;
2642    }
2643
2644    /**
2645     * @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
2646     */
2647    public StringType getDescriptionElement() { 
2648      if (this.description == null)
2649        if (Configuration.errorOnAutoCreate())
2650          throw new Error("Attempt to auto-create Task.description");
2651        else if (Configuration.doAutoCreate())
2652          this.description = new StringType(); // bb
2653      return this.description;
2654    }
2655
2656    public boolean hasDescriptionElement() { 
2657      return this.description != null && !this.description.isEmpty();
2658    }
2659
2660    public boolean hasDescription() { 
2661      return this.description != null && !this.description.isEmpty();
2662    }
2663
2664    /**
2665     * @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
2666     */
2667    public Task setDescriptionElement(StringType value) { 
2668      this.description = value;
2669      return this;
2670    }
2671
2672    /**
2673     * @return A free-text description of what is to be performed.
2674     */
2675    public String getDescription() { 
2676      return this.description == null ? null : this.description.getValue();
2677    }
2678
2679    /**
2680     * @param value A free-text description of what is to be performed.
2681     */
2682    public Task setDescription(String value) { 
2683      if (Utilities.noString(value))
2684        this.description = null;
2685      else {
2686        if (this.description == null)
2687          this.description = new StringType();
2688        this.description.setValue(value);
2689      }
2690      return this;
2691    }
2692
2693    /**
2694     * @return {@link #focus} (The request being actioned or the resource being manipulated by this task.)
2695     */
2696    public Reference getFocus() { 
2697      if (this.focus == null)
2698        if (Configuration.errorOnAutoCreate())
2699          throw new Error("Attempt to auto-create Task.focus");
2700        else if (Configuration.doAutoCreate())
2701          this.focus = new Reference(); // cc
2702      return this.focus;
2703    }
2704
2705    public boolean hasFocus() { 
2706      return this.focus != null && !this.focus.isEmpty();
2707    }
2708
2709    /**
2710     * @param value {@link #focus} (The request being actioned or the resource being manipulated by this task.)
2711     */
2712    public Task setFocus(Reference value) { 
2713      this.focus = value;
2714      return this;
2715    }
2716
2717    /**
2718     * @return {@link #focus} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The request being actioned or the resource being manipulated by this task.)
2719     */
2720    public Resource getFocusTarget() { 
2721      return this.focusTarget;
2722    }
2723
2724    /**
2725     * @param value {@link #focus} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The request being actioned or the resource being manipulated by this task.)
2726     */
2727    public Task setFocusTarget(Resource value) { 
2728      this.focusTarget = value;
2729      return this;
2730    }
2731
2732    /**
2733     * @return {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
2734     */
2735    public Reference getFor() { 
2736      if (this.for_ == null)
2737        if (Configuration.errorOnAutoCreate())
2738          throw new Error("Attempt to auto-create Task.for_");
2739        else if (Configuration.doAutoCreate())
2740          this.for_ = new Reference(); // cc
2741      return this.for_;
2742    }
2743
2744    public boolean hasFor() { 
2745      return this.for_ != null && !this.for_.isEmpty();
2746    }
2747
2748    /**
2749     * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
2750     */
2751    public Task setFor(Reference value) { 
2752      this.for_ = value;
2753      return this;
2754    }
2755
2756    /**
2757     * @return {@link #for_} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
2758     */
2759    public Resource getForTarget() { 
2760      return this.for_Target;
2761    }
2762
2763    /**
2764     * @param value {@link #for_} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).)
2765     */
2766    public Task setForTarget(Resource value) { 
2767      this.for_Target = value;
2768      return this;
2769    }
2770
2771    /**
2772     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
2773     */
2774    public Reference getEncounter() { 
2775      if (this.encounter == null)
2776        if (Configuration.errorOnAutoCreate())
2777          throw new Error("Attempt to auto-create Task.encounter");
2778        else if (Configuration.doAutoCreate())
2779          this.encounter = new Reference(); // cc
2780      return this.encounter;
2781    }
2782
2783    public boolean hasEncounter() { 
2784      return this.encounter != null && !this.encounter.isEmpty();
2785    }
2786
2787    /**
2788     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
2789     */
2790    public Task setEncounter(Reference value) { 
2791      this.encounter = value;
2792      return this;
2793    }
2794
2795    /**
2796     * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
2797     */
2798    public Encounter getEncounterTarget() { 
2799      if (this.encounterTarget == null)
2800        if (Configuration.errorOnAutoCreate())
2801          throw new Error("Attempt to auto-create Task.encounter");
2802        else if (Configuration.doAutoCreate())
2803          this.encounterTarget = new Encounter(); // aa
2804      return this.encounterTarget;
2805    }
2806
2807    /**
2808     * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.)
2809     */
2810    public Task setEncounterTarget(Encounter value) { 
2811      this.encounterTarget = value;
2812      return this;
2813    }
2814
2815    /**
2816     * @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).)
2817     */
2818    public Period getExecutionPeriod() { 
2819      if (this.executionPeriod == null)
2820        if (Configuration.errorOnAutoCreate())
2821          throw new Error("Attempt to auto-create Task.executionPeriod");
2822        else if (Configuration.doAutoCreate())
2823          this.executionPeriod = new Period(); // cc
2824      return this.executionPeriod;
2825    }
2826
2827    public boolean hasExecutionPeriod() { 
2828      return this.executionPeriod != null && !this.executionPeriod.isEmpty();
2829    }
2830
2831    /**
2832     * @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).)
2833     */
2834    public Task setExecutionPeriod(Period value) { 
2835      this.executionPeriod = value;
2836      return this;
2837    }
2838
2839    /**
2840     * @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
2841     */
2842    public DateTimeType getAuthoredOnElement() { 
2843      if (this.authoredOn == null)
2844        if (Configuration.errorOnAutoCreate())
2845          throw new Error("Attempt to auto-create Task.authoredOn");
2846        else if (Configuration.doAutoCreate())
2847          this.authoredOn = new DateTimeType(); // bb
2848      return this.authoredOn;
2849    }
2850
2851    public boolean hasAuthoredOnElement() { 
2852      return this.authoredOn != null && !this.authoredOn.isEmpty();
2853    }
2854
2855    public boolean hasAuthoredOn() { 
2856      return this.authoredOn != null && !this.authoredOn.isEmpty();
2857    }
2858
2859    /**
2860     * @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
2861     */
2862    public Task setAuthoredOnElement(DateTimeType value) { 
2863      this.authoredOn = value;
2864      return this;
2865    }
2866
2867    /**
2868     * @return The date and time this task was created.
2869     */
2870    public Date getAuthoredOn() { 
2871      return this.authoredOn == null ? null : this.authoredOn.getValue();
2872    }
2873
2874    /**
2875     * @param value The date and time this task was created.
2876     */
2877    public Task setAuthoredOn(Date value) { 
2878      if (value == null)
2879        this.authoredOn = null;
2880      else {
2881        if (this.authoredOn == null)
2882          this.authoredOn = new DateTimeType();
2883        this.authoredOn.setValue(value);
2884      }
2885      return this;
2886    }
2887
2888    /**
2889     * @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
2890     */
2891    public DateTimeType getLastModifiedElement() { 
2892      if (this.lastModified == null)
2893        if (Configuration.errorOnAutoCreate())
2894          throw new Error("Attempt to auto-create Task.lastModified");
2895        else if (Configuration.doAutoCreate())
2896          this.lastModified = new DateTimeType(); // bb
2897      return this.lastModified;
2898    }
2899
2900    public boolean hasLastModifiedElement() { 
2901      return this.lastModified != null && !this.lastModified.isEmpty();
2902    }
2903
2904    public boolean hasLastModified() { 
2905      return this.lastModified != null && !this.lastModified.isEmpty();
2906    }
2907
2908    /**
2909     * @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
2910     */
2911    public Task setLastModifiedElement(DateTimeType value) { 
2912      this.lastModified = value;
2913      return this;
2914    }
2915
2916    /**
2917     * @return The date and time of last modification to this task.
2918     */
2919    public Date getLastModified() { 
2920      return this.lastModified == null ? null : this.lastModified.getValue();
2921    }
2922
2923    /**
2924     * @param value The date and time of last modification to this task.
2925     */
2926    public Task setLastModified(Date value) { 
2927      if (value == null)
2928        this.lastModified = null;
2929      else {
2930        if (this.lastModified == null)
2931          this.lastModified = new DateTimeType();
2932        this.lastModified.setValue(value);
2933      }
2934      return this;
2935    }
2936
2937    /**
2938     * @return {@link #requester} (The creator of the task.)
2939     */
2940    public Reference getRequester() { 
2941      if (this.requester == null)
2942        if (Configuration.errorOnAutoCreate())
2943          throw new Error("Attempt to auto-create Task.requester");
2944        else if (Configuration.doAutoCreate())
2945          this.requester = new Reference(); // cc
2946      return this.requester;
2947    }
2948
2949    public boolean hasRequester() { 
2950      return this.requester != null && !this.requester.isEmpty();
2951    }
2952
2953    /**
2954     * @param value {@link #requester} (The creator of the task.)
2955     */
2956    public Task setRequester(Reference value) { 
2957      this.requester = value;
2958      return this;
2959    }
2960
2961    /**
2962     * @return {@link #requester} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The creator of the task.)
2963     */
2964    public Resource getRequesterTarget() { 
2965      return this.requesterTarget;
2966    }
2967
2968    /**
2969     * @param value {@link #requester} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The creator of the task.)
2970     */
2971    public Task setRequesterTarget(Resource value) { 
2972      this.requesterTarget = value;
2973      return this;
2974    }
2975
2976    /**
2977     * @return {@link #performerType} (The kind of participant that should perform the task.)
2978     */
2979    public List<CodeableConcept> getPerformerType() { 
2980      if (this.performerType == null)
2981        this.performerType = new ArrayList<CodeableConcept>();
2982      return this.performerType;
2983    }
2984
2985    /**
2986     * @return Returns a reference to <code>this</code> for easy method chaining
2987     */
2988    public Task setPerformerType(List<CodeableConcept> thePerformerType) { 
2989      this.performerType = thePerformerType;
2990      return this;
2991    }
2992
2993    public boolean hasPerformerType() { 
2994      if (this.performerType == null)
2995        return false;
2996      for (CodeableConcept item : this.performerType)
2997        if (!item.isEmpty())
2998          return true;
2999      return false;
3000    }
3001
3002    public CodeableConcept addPerformerType() { //3
3003      CodeableConcept t = new CodeableConcept();
3004      if (this.performerType == null)
3005        this.performerType = new ArrayList<CodeableConcept>();
3006      this.performerType.add(t);
3007      return t;
3008    }
3009
3010    public Task addPerformerType(CodeableConcept t) { //3
3011      if (t == null)
3012        return this;
3013      if (this.performerType == null)
3014        this.performerType = new ArrayList<CodeableConcept>();
3015      this.performerType.add(t);
3016      return this;
3017    }
3018
3019    /**
3020     * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist
3021     */
3022    public CodeableConcept getPerformerTypeFirstRep() { 
3023      if (getPerformerType().isEmpty()) {
3024        addPerformerType();
3025      }
3026      return getPerformerType().get(0);
3027    }
3028
3029    /**
3030     * @return {@link #owner} (Individual organization or Device currently responsible for task execution.)
3031     */
3032    public Reference getOwner() { 
3033      if (this.owner == null)
3034        if (Configuration.errorOnAutoCreate())
3035          throw new Error("Attempt to auto-create Task.owner");
3036        else if (Configuration.doAutoCreate())
3037          this.owner = new Reference(); // cc
3038      return this.owner;
3039    }
3040
3041    public boolean hasOwner() { 
3042      return this.owner != null && !this.owner.isEmpty();
3043    }
3044
3045    /**
3046     * @param value {@link #owner} (Individual organization or Device currently responsible for task execution.)
3047     */
3048    public Task setOwner(Reference value) { 
3049      this.owner = value;
3050      return this;
3051    }
3052
3053    /**
3054     * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual organization or Device currently responsible for task execution.)
3055     */
3056    public Resource getOwnerTarget() { 
3057      return this.ownerTarget;
3058    }
3059
3060    /**
3061     * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual organization or Device currently responsible for task execution.)
3062     */
3063    public Task setOwnerTarget(Resource value) { 
3064      this.ownerTarget = value;
3065      return this;
3066    }
3067
3068    /**
3069     * @return {@link #location} (The principal physical location where the this task is performed.)
3070     */
3071    public Reference getLocation() { 
3072      if (this.location == null)
3073        if (Configuration.errorOnAutoCreate())
3074          throw new Error("Attempt to auto-create Task.location");
3075        else if (Configuration.doAutoCreate())
3076          this.location = new Reference(); // cc
3077      return this.location;
3078    }
3079
3080    public boolean hasLocation() { 
3081      return this.location != null && !this.location.isEmpty();
3082    }
3083
3084    /**
3085     * @param value {@link #location} (The principal physical location where the this task is performed.)
3086     */
3087    public Task setLocation(Reference value) { 
3088      this.location = value;
3089      return this;
3090    }
3091
3092    /**
3093     * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The principal physical location where the this task is performed.)
3094     */
3095    public Location getLocationTarget() { 
3096      if (this.locationTarget == null)
3097        if (Configuration.errorOnAutoCreate())
3098          throw new Error("Attempt to auto-create Task.location");
3099        else if (Configuration.doAutoCreate())
3100          this.locationTarget = new Location(); // aa
3101      return this.locationTarget;
3102    }
3103
3104    /**
3105     * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The principal physical location where the this task is performed.)
3106     */
3107    public Task setLocationTarget(Location value) { 
3108      this.locationTarget = value;
3109      return this;
3110    }
3111
3112    /**
3113     * @return {@link #reasonCode} (A description or code indicating why this task needs to be performed.)
3114     */
3115    public CodeableConcept getReasonCode() { 
3116      if (this.reasonCode == null)
3117        if (Configuration.errorOnAutoCreate())
3118          throw new Error("Attempt to auto-create Task.reasonCode");
3119        else if (Configuration.doAutoCreate())
3120          this.reasonCode = new CodeableConcept(); // cc
3121      return this.reasonCode;
3122    }
3123
3124    public boolean hasReasonCode() { 
3125      return this.reasonCode != null && !this.reasonCode.isEmpty();
3126    }
3127
3128    /**
3129     * @param value {@link #reasonCode} (A description or code indicating why this task needs to be performed.)
3130     */
3131    public Task setReasonCode(CodeableConcept value) { 
3132      this.reasonCode = value;
3133      return this;
3134    }
3135
3136    /**
3137     * @return {@link #reasonReference} (A resource reference indicating why this task needs to be performed.)
3138     */
3139    public Reference getReasonReference() { 
3140      if (this.reasonReference == null)
3141        if (Configuration.errorOnAutoCreate())
3142          throw new Error("Attempt to auto-create Task.reasonReference");
3143        else if (Configuration.doAutoCreate())
3144          this.reasonReference = new Reference(); // cc
3145      return this.reasonReference;
3146    }
3147
3148    public boolean hasReasonReference() { 
3149      return this.reasonReference != null && !this.reasonReference.isEmpty();
3150    }
3151
3152    /**
3153     * @param value {@link #reasonReference} (A resource reference indicating why this task needs to be performed.)
3154     */
3155    public Task setReasonReference(Reference value) { 
3156      this.reasonReference = value;
3157      return this;
3158    }
3159
3160    /**
3161     * @return {@link #reasonReference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A resource reference indicating why this task needs to be performed.)
3162     */
3163    public Resource getReasonReferenceTarget() { 
3164      return this.reasonReferenceTarget;
3165    }
3166
3167    /**
3168     * @param value {@link #reasonReference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A resource reference indicating why this task needs to be performed.)
3169     */
3170    public Task setReasonReferenceTarget(Resource value) { 
3171      this.reasonReferenceTarget = value;
3172      return this;
3173    }
3174
3175    /**
3176     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.)
3177     */
3178    public List<Reference> getInsurance() { 
3179      if (this.insurance == null)
3180        this.insurance = new ArrayList<Reference>();
3181      return this.insurance;
3182    }
3183
3184    /**
3185     * @return Returns a reference to <code>this</code> for easy method chaining
3186     */
3187    public Task setInsurance(List<Reference> theInsurance) { 
3188      this.insurance = theInsurance;
3189      return this;
3190    }
3191
3192    public boolean hasInsurance() { 
3193      if (this.insurance == null)
3194        return false;
3195      for (Reference item : this.insurance)
3196        if (!item.isEmpty())
3197          return true;
3198      return false;
3199    }
3200
3201    public Reference addInsurance() { //3
3202      Reference t = new Reference();
3203      if (this.insurance == null)
3204        this.insurance = new ArrayList<Reference>();
3205      this.insurance.add(t);
3206      return t;
3207    }
3208
3209    public Task addInsurance(Reference t) { //3
3210      if (t == null)
3211        return this;
3212      if (this.insurance == null)
3213        this.insurance = new ArrayList<Reference>();
3214      this.insurance.add(t);
3215      return this;
3216    }
3217
3218    /**
3219     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist
3220     */
3221    public Reference getInsuranceFirstRep() { 
3222      if (getInsurance().isEmpty()) {
3223        addInsurance();
3224      }
3225      return getInsurance().get(0);
3226    }
3227
3228    /**
3229     * @deprecated Use Reference#setResource(IBaseResource) instead
3230     */
3231    @Deprecated
3232    public List<Resource> getInsuranceTarget() { 
3233      if (this.insuranceTarget == null)
3234        this.insuranceTarget = new ArrayList<Resource>();
3235      return this.insuranceTarget;
3236    }
3237
3238    /**
3239     * @return {@link #note} (Free-text information captured about the task as it progresses.)
3240     */
3241    public List<Annotation> getNote() { 
3242      if (this.note == null)
3243        this.note = new ArrayList<Annotation>();
3244      return this.note;
3245    }
3246
3247    /**
3248     * @return Returns a reference to <code>this</code> for easy method chaining
3249     */
3250    public Task setNote(List<Annotation> theNote) { 
3251      this.note = theNote;
3252      return this;
3253    }
3254
3255    public boolean hasNote() { 
3256      if (this.note == null)
3257        return false;
3258      for (Annotation item : this.note)
3259        if (!item.isEmpty())
3260          return true;
3261      return false;
3262    }
3263
3264    public Annotation addNote() { //3
3265      Annotation t = new Annotation();
3266      if (this.note == null)
3267        this.note = new ArrayList<Annotation>();
3268      this.note.add(t);
3269      return t;
3270    }
3271
3272    public Task addNote(Annotation t) { //3
3273      if (t == null)
3274        return this;
3275      if (this.note == null)
3276        this.note = new ArrayList<Annotation>();
3277      this.note.add(t);
3278      return this;
3279    }
3280
3281    /**
3282     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
3283     */
3284    public Annotation getNoteFirstRep() { 
3285      if (getNote().isEmpty()) {
3286        addNote();
3287      }
3288      return getNote().get(0);
3289    }
3290
3291    /**
3292     * @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.)
3293     */
3294    public List<Reference> getRelevantHistory() { 
3295      if (this.relevantHistory == null)
3296        this.relevantHistory = new ArrayList<Reference>();
3297      return this.relevantHistory;
3298    }
3299
3300    /**
3301     * @return Returns a reference to <code>this</code> for easy method chaining
3302     */
3303    public Task setRelevantHistory(List<Reference> theRelevantHistory) { 
3304      this.relevantHistory = theRelevantHistory;
3305      return this;
3306    }
3307
3308    public boolean hasRelevantHistory() { 
3309      if (this.relevantHistory == null)
3310        return false;
3311      for (Reference item : this.relevantHistory)
3312        if (!item.isEmpty())
3313          return true;
3314      return false;
3315    }
3316
3317    public Reference addRelevantHistory() { //3
3318      Reference t = new Reference();
3319      if (this.relevantHistory == null)
3320        this.relevantHistory = new ArrayList<Reference>();
3321      this.relevantHistory.add(t);
3322      return t;
3323    }
3324
3325    public Task addRelevantHistory(Reference t) { //3
3326      if (t == null)
3327        return this;
3328      if (this.relevantHistory == null)
3329        this.relevantHistory = new ArrayList<Reference>();
3330      this.relevantHistory.add(t);
3331      return this;
3332    }
3333
3334    /**
3335     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist
3336     */
3337    public Reference getRelevantHistoryFirstRep() { 
3338      if (getRelevantHistory().isEmpty()) {
3339        addRelevantHistory();
3340      }
3341      return getRelevantHistory().get(0);
3342    }
3343
3344    /**
3345     * @deprecated Use Reference#setResource(IBaseResource) instead
3346     */
3347    @Deprecated
3348    public List<Provenance> getRelevantHistoryTarget() { 
3349      if (this.relevantHistoryTarget == null)
3350        this.relevantHistoryTarget = new ArrayList<Provenance>();
3351      return this.relevantHistoryTarget;
3352    }
3353
3354    /**
3355     * @deprecated Use Reference#setResource(IBaseResource) instead
3356     */
3357    @Deprecated
3358    public Provenance addRelevantHistoryTarget() { 
3359      Provenance r = new Provenance();
3360      if (this.relevantHistoryTarget == null)
3361        this.relevantHistoryTarget = new ArrayList<Provenance>();
3362      this.relevantHistoryTarget.add(r);
3363      return r;
3364    }
3365
3366    /**
3367     * @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.)
3368     */
3369    public TaskRestrictionComponent getRestriction() { 
3370      if (this.restriction == null)
3371        if (Configuration.errorOnAutoCreate())
3372          throw new Error("Attempt to auto-create Task.restriction");
3373        else if (Configuration.doAutoCreate())
3374          this.restriction = new TaskRestrictionComponent(); // cc
3375      return this.restriction;
3376    }
3377
3378    public boolean hasRestriction() { 
3379      return this.restriction != null && !this.restriction.isEmpty();
3380    }
3381
3382    /**
3383     * @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.)
3384     */
3385    public Task setRestriction(TaskRestrictionComponent value) { 
3386      this.restriction = value;
3387      return this;
3388    }
3389
3390    /**
3391     * @return {@link #input} (Additional information that may be needed in the execution of the task.)
3392     */
3393    public List<ParameterComponent> getInput() { 
3394      if (this.input == null)
3395        this.input = new ArrayList<ParameterComponent>();
3396      return this.input;
3397    }
3398
3399    /**
3400     * @return Returns a reference to <code>this</code> for easy method chaining
3401     */
3402    public Task setInput(List<ParameterComponent> theInput) { 
3403      this.input = theInput;
3404      return this;
3405    }
3406
3407    public boolean hasInput() { 
3408      if (this.input == null)
3409        return false;
3410      for (ParameterComponent item : this.input)
3411        if (!item.isEmpty())
3412          return true;
3413      return false;
3414    }
3415
3416    public ParameterComponent addInput() { //3
3417      ParameterComponent t = new ParameterComponent();
3418      if (this.input == null)
3419        this.input = new ArrayList<ParameterComponent>();
3420      this.input.add(t);
3421      return t;
3422    }
3423
3424    public Task addInput(ParameterComponent t) { //3
3425      if (t == null)
3426        return this;
3427      if (this.input == null)
3428        this.input = new ArrayList<ParameterComponent>();
3429      this.input.add(t);
3430      return this;
3431    }
3432
3433    /**
3434     * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist
3435     */
3436    public ParameterComponent getInputFirstRep() { 
3437      if (getInput().isEmpty()) {
3438        addInput();
3439      }
3440      return getInput().get(0);
3441    }
3442
3443    /**
3444     * @return {@link #output} (Outputs produced by the Task.)
3445     */
3446    public List<TaskOutputComponent> getOutput() { 
3447      if (this.output == null)
3448        this.output = new ArrayList<TaskOutputComponent>();
3449      return this.output;
3450    }
3451
3452    /**
3453     * @return Returns a reference to <code>this</code> for easy method chaining
3454     */
3455    public Task setOutput(List<TaskOutputComponent> theOutput) { 
3456      this.output = theOutput;
3457      return this;
3458    }
3459
3460    public boolean hasOutput() { 
3461      if (this.output == null)
3462        return false;
3463      for (TaskOutputComponent item : this.output)
3464        if (!item.isEmpty())
3465          return true;
3466      return false;
3467    }
3468
3469    public TaskOutputComponent addOutput() { //3
3470      TaskOutputComponent t = new TaskOutputComponent();
3471      if (this.output == null)
3472        this.output = new ArrayList<TaskOutputComponent>();
3473      this.output.add(t);
3474      return t;
3475    }
3476
3477    public Task addOutput(TaskOutputComponent t) { //3
3478      if (t == null)
3479        return this;
3480      if (this.output == null)
3481        this.output = new ArrayList<TaskOutputComponent>();
3482      this.output.add(t);
3483      return this;
3484    }
3485
3486    /**
3487     * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist
3488     */
3489    public TaskOutputComponent getOutputFirstRep() { 
3490      if (getOutput().isEmpty()) {
3491        addOutput();
3492      }
3493      return getOutput().get(0);
3494    }
3495
3496      protected void listChildren(List<Property> children) {
3497        super.listChildren(children);
3498        children.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier));
3499        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));
3500        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));
3501        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));
3502        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));
3503        children.add(new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf));
3504        children.add(new Property("status", "code", "The current status of the task.", 0, 1, status));
3505        children.add(new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason));
3506        children.add(new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus));
3507        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));
3508        children.add(new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority));
3509        children.add(new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code));
3510        children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description));
3511        children.add(new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus));
3512        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_));
3513        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));
3514        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));
3515        children.add(new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn));
3516        children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified));
3517        children.add(new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester));
3518        children.add(new Property("performerType", "CodeableConcept", "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType));
3519        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));
3520        children.add(new Property("location", "Reference(Location)", "The principal physical location where the this task is performed.", 0, 1, location));
3521        children.add(new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode));
3522        children.add(new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference));
3523        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));
3524        children.add(new Property("note", "Annotation", "Free-text information captured about the task as it progresses.", 0, java.lang.Integer.MAX_VALUE, note));
3525        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));
3526        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));
3527        children.add(new Property("input", "", "Additional information that may be needed in the execution of the task.", 0, java.lang.Integer.MAX_VALUE, input));
3528        children.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output));
3529      }
3530
3531      @Override
3532      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3533        switch (_hash) {
3534        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier);
3535        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);
3536        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);
3537        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);
3538        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);
3539        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, partOf);
3540        case -892481550: /*status*/  return new Property("status", "code", "The current status of the task.", 0, 1, status);
3541        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "An explanation as to why this task is held, failed, was refused, etc.", 0, 1, statusReason);
3542        case 2008591314: /*businessStatus*/  return new Property("businessStatus", "CodeableConcept", "Contains business-specific nuances of the business state.", 0, 1, businessStatus);
3543        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);
3544        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the Task should be addressed with respect to other requests.", 0, 1, priority);
3545        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, 1, code);
3546        case -1724546052: /*description*/  return new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description);
3547        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this task.", 0, 1, focus);
3548        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_);
3549        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);
3550        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);
3551        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "The date and time this task was created.", 0, 1, authoredOn);
3552        case 1959003007: /*lastModified*/  return new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, 1, lastModified);
3553        case 693933948: /*requester*/  return new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the task.", 0, 1, requester);
3554        case -901444568: /*performerType*/  return new Property("performerType", "CodeableConcept", "The kind of participant that should perform the task.", 0, java.lang.Integer.MAX_VALUE, performerType);
3555        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);
3556        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The principal physical location where the this task is performed.", 0, 1, location);
3557        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "A description or code indicating why this task needs to be performed.", 0, 1, reasonCode);
3558        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Any)", "A resource reference indicating why this task needs to be performed.", 0, 1, reasonReference);
3559        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);
3560        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);
3561        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);
3562        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);
3563        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);
3564        case -1005512447: /*output*/  return new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output);
3565        default: return super.getNamedProperty(_hash, _name, _checkValid);
3566        }
3567
3568      }
3569
3570      @Override
3571      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3572        switch (hash) {
3573        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3574        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // CanonicalType
3575        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType
3576        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
3577        case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier
3578        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
3579        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<TaskStatus>
3580        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
3581        case 2008591314: /*businessStatus*/ return this.businessStatus == null ? new Base[0] : new Base[] {this.businessStatus}; // CodeableConcept
3582        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<TaskIntent>
3583        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<TaskPriority>
3584        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
3585        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3586        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference
3587        case 101577: /*for*/ return this.for_ == null ? new Base[0] : new Base[] {this.for_}; // Reference
3588        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
3589        case 1218624249: /*executionPeriod*/ return this.executionPeriod == null ? new Base[0] : new Base[] {this.executionPeriod}; // Period
3590        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
3591        case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // DateTimeType
3592        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
3593        case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept
3594        case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
3595        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
3596        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : new Base[] {this.reasonCode}; // CodeableConcept
3597        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : new Base[] {this.reasonReference}; // Reference
3598        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // Reference
3599        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
3600        case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference
3601        case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TaskRestrictionComponent
3602        case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // ParameterComponent
3603        case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TaskOutputComponent
3604        default: return super.getProperty(hash, name, checkValid);
3605        }
3606
3607      }
3608
3609      @Override
3610      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3611        switch (hash) {
3612        case -1618432855: // identifier
3613          this.getIdentifier().add(castToIdentifier(value)); // Identifier
3614          return value;
3615        case 8911915: // instantiatesCanonical
3616          this.instantiatesCanonical = castToCanonical(value); // CanonicalType
3617          return value;
3618        case -1926393373: // instantiatesUri
3619          this.instantiatesUri = castToUri(value); // UriType
3620          return value;
3621        case -332612366: // basedOn
3622          this.getBasedOn().add(castToReference(value)); // Reference
3623          return value;
3624        case -445338488: // groupIdentifier
3625          this.groupIdentifier = castToIdentifier(value); // Identifier
3626          return value;
3627        case -995410646: // partOf
3628          this.getPartOf().add(castToReference(value)); // Reference
3629          return value;
3630        case -892481550: // status
3631          value = new TaskStatusEnumFactory().fromType(castToCode(value));
3632          this.status = (Enumeration) value; // Enumeration<TaskStatus>
3633          return value;
3634        case 2051346646: // statusReason
3635          this.statusReason = castToCodeableConcept(value); // CodeableConcept
3636          return value;
3637        case 2008591314: // businessStatus
3638          this.businessStatus = castToCodeableConcept(value); // CodeableConcept
3639          return value;
3640        case -1183762788: // intent
3641          value = new TaskIntentEnumFactory().fromType(castToCode(value));
3642          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
3643          return value;
3644        case -1165461084: // priority
3645          value = new TaskPriorityEnumFactory().fromType(castToCode(value));
3646          this.priority = (Enumeration) value; // Enumeration<TaskPriority>
3647          return value;
3648        case 3059181: // code
3649          this.code = castToCodeableConcept(value); // CodeableConcept
3650          return value;
3651        case -1724546052: // description
3652          this.description = castToString(value); // StringType
3653          return value;
3654        case 97604824: // focus
3655          this.focus = castToReference(value); // Reference
3656          return value;
3657        case 101577: // for
3658          this.for_ = castToReference(value); // Reference
3659          return value;
3660        case 1524132147: // encounter
3661          this.encounter = castToReference(value); // Reference
3662          return value;
3663        case 1218624249: // executionPeriod
3664          this.executionPeriod = castToPeriod(value); // Period
3665          return value;
3666        case -1500852503: // authoredOn
3667          this.authoredOn = castToDateTime(value); // DateTimeType
3668          return value;
3669        case 1959003007: // lastModified
3670          this.lastModified = castToDateTime(value); // DateTimeType
3671          return value;
3672        case 693933948: // requester
3673          this.requester = castToReference(value); // Reference
3674          return value;
3675        case -901444568: // performerType
3676          this.getPerformerType().add(castToCodeableConcept(value)); // CodeableConcept
3677          return value;
3678        case 106164915: // owner
3679          this.owner = castToReference(value); // Reference
3680          return value;
3681        case 1901043637: // location
3682          this.location = castToReference(value); // Reference
3683          return value;
3684        case 722137681: // reasonCode
3685          this.reasonCode = castToCodeableConcept(value); // CodeableConcept
3686          return value;
3687        case -1146218137: // reasonReference
3688          this.reasonReference = castToReference(value); // Reference
3689          return value;
3690        case 73049818: // insurance
3691          this.getInsurance().add(castToReference(value)); // Reference
3692          return value;
3693        case 3387378: // note
3694          this.getNote().add(castToAnnotation(value)); // Annotation
3695          return value;
3696        case 1538891575: // relevantHistory
3697          this.getRelevantHistory().add(castToReference(value)); // Reference
3698          return value;
3699        case -1561062452: // restriction
3700          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
3701          return value;
3702        case 100358090: // input
3703          this.getInput().add((ParameterComponent) value); // ParameterComponent
3704          return value;
3705        case -1005512447: // output
3706          this.getOutput().add((TaskOutputComponent) value); // TaskOutputComponent
3707          return value;
3708        default: return super.setProperty(hash, name, value);
3709        }
3710
3711      }
3712
3713      @Override
3714      public Base setProperty(String name, Base value) throws FHIRException {
3715        if (name.equals("identifier")) {
3716          this.getIdentifier().add(castToIdentifier(value));
3717        } else if (name.equals("instantiatesCanonical")) {
3718          this.instantiatesCanonical = castToCanonical(value); // CanonicalType
3719        } else if (name.equals("instantiatesUri")) {
3720          this.instantiatesUri = castToUri(value); // UriType
3721        } else if (name.equals("basedOn")) {
3722          this.getBasedOn().add(castToReference(value));
3723        } else if (name.equals("groupIdentifier")) {
3724          this.groupIdentifier = castToIdentifier(value); // Identifier
3725        } else if (name.equals("partOf")) {
3726          this.getPartOf().add(castToReference(value));
3727        } else if (name.equals("status")) {
3728          value = new TaskStatusEnumFactory().fromType(castToCode(value));
3729          this.status = (Enumeration) value; // Enumeration<TaskStatus>
3730        } else if (name.equals("statusReason")) {
3731          this.statusReason = castToCodeableConcept(value); // CodeableConcept
3732        } else if (name.equals("businessStatus")) {
3733          this.businessStatus = castToCodeableConcept(value); // CodeableConcept
3734        } else if (name.equals("intent")) {
3735          value = new TaskIntentEnumFactory().fromType(castToCode(value));
3736          this.intent = (Enumeration) value; // Enumeration<TaskIntent>
3737        } else if (name.equals("priority")) {
3738          value = new TaskPriorityEnumFactory().fromType(castToCode(value));
3739          this.priority = (Enumeration) value; // Enumeration<TaskPriority>
3740        } else if (name.equals("code")) {
3741          this.code = castToCodeableConcept(value); // CodeableConcept
3742        } else if (name.equals("description")) {
3743          this.description = castToString(value); // StringType
3744        } else if (name.equals("focus")) {
3745          this.focus = castToReference(value); // Reference
3746        } else if (name.equals("for")) {
3747          this.for_ = castToReference(value); // Reference
3748        } else if (name.equals("encounter")) {
3749          this.encounter = castToReference(value); // Reference
3750        } else if (name.equals("executionPeriod")) {
3751          this.executionPeriod = castToPeriod(value); // Period
3752        } else if (name.equals("authoredOn")) {
3753          this.authoredOn = castToDateTime(value); // DateTimeType
3754        } else if (name.equals("lastModified")) {
3755          this.lastModified = castToDateTime(value); // DateTimeType
3756        } else if (name.equals("requester")) {
3757          this.requester = castToReference(value); // Reference
3758        } else if (name.equals("performerType")) {
3759          this.getPerformerType().add(castToCodeableConcept(value));
3760        } else if (name.equals("owner")) {
3761          this.owner = castToReference(value); // Reference
3762        } else if (name.equals("location")) {
3763          this.location = castToReference(value); // Reference
3764        } else if (name.equals("reasonCode")) {
3765          this.reasonCode = castToCodeableConcept(value); // CodeableConcept
3766        } else if (name.equals("reasonReference")) {
3767          this.reasonReference = castToReference(value); // Reference
3768        } else if (name.equals("insurance")) {
3769          this.getInsurance().add(castToReference(value));
3770        } else if (name.equals("note")) {
3771          this.getNote().add(castToAnnotation(value));
3772        } else if (name.equals("relevantHistory")) {
3773          this.getRelevantHistory().add(castToReference(value));
3774        } else if (name.equals("restriction")) {
3775          this.restriction = (TaskRestrictionComponent) value; // TaskRestrictionComponent
3776        } else if (name.equals("input")) {
3777          this.getInput().add((ParameterComponent) value);
3778        } else if (name.equals("output")) {
3779          this.getOutput().add((TaskOutputComponent) value);
3780        } else
3781          return super.setProperty(name, value);
3782        return value;
3783      }
3784
3785      @Override
3786      public Base makeProperty(int hash, String name) throws FHIRException {
3787        switch (hash) {
3788        case -1618432855:  return addIdentifier(); 
3789        case 8911915:  return getInstantiatesCanonicalElement();
3790        case -1926393373:  return getInstantiatesUriElement();
3791        case -332612366:  return addBasedOn(); 
3792        case -445338488:  return getGroupIdentifier(); 
3793        case -995410646:  return addPartOf(); 
3794        case -892481550:  return getStatusElement();
3795        case 2051346646:  return getStatusReason(); 
3796        case 2008591314:  return getBusinessStatus(); 
3797        case -1183762788:  return getIntentElement();
3798        case -1165461084:  return getPriorityElement();
3799        case 3059181:  return getCode(); 
3800        case -1724546052:  return getDescriptionElement();
3801        case 97604824:  return getFocus(); 
3802        case 101577:  return getFor(); 
3803        case 1524132147:  return getEncounter(); 
3804        case 1218624249:  return getExecutionPeriod(); 
3805        case -1500852503:  return getAuthoredOnElement();
3806        case 1959003007:  return getLastModifiedElement();
3807        case 693933948:  return getRequester(); 
3808        case -901444568:  return addPerformerType(); 
3809        case 106164915:  return getOwner(); 
3810        case 1901043637:  return getLocation(); 
3811        case 722137681:  return getReasonCode(); 
3812        case -1146218137:  return getReasonReference(); 
3813        case 73049818:  return addInsurance(); 
3814        case 3387378:  return addNote(); 
3815        case 1538891575:  return addRelevantHistory(); 
3816        case -1561062452:  return getRestriction(); 
3817        case 100358090:  return addInput(); 
3818        case -1005512447:  return addOutput(); 
3819        default: return super.makeProperty(hash, name);
3820        }
3821
3822      }
3823
3824      @Override
3825      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3826        switch (hash) {
3827        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3828        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
3829        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
3830        case -332612366: /*basedOn*/ return new String[] {"Reference"};
3831        case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"};
3832        case -995410646: /*partOf*/ return new String[] {"Reference"};
3833        case -892481550: /*status*/ return new String[] {"code"};
3834        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
3835        case 2008591314: /*businessStatus*/ return new String[] {"CodeableConcept"};
3836        case -1183762788: /*intent*/ return new String[] {"code"};
3837        case -1165461084: /*priority*/ return new String[] {"code"};
3838        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
3839        case -1724546052: /*description*/ return new String[] {"string"};
3840        case 97604824: /*focus*/ return new String[] {"Reference"};
3841        case 101577: /*for*/ return new String[] {"Reference"};
3842        case 1524132147: /*encounter*/ return new String[] {"Reference"};
3843        case 1218624249: /*executionPeriod*/ return new String[] {"Period"};
3844        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
3845        case 1959003007: /*lastModified*/ return new String[] {"dateTime"};
3846        case 693933948: /*requester*/ return new String[] {"Reference"};
3847        case -901444568: /*performerType*/ return new String[] {"CodeableConcept"};
3848        case 106164915: /*owner*/ return new String[] {"Reference"};
3849        case 1901043637: /*location*/ return new String[] {"Reference"};
3850        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
3851        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
3852        case 73049818: /*insurance*/ return new String[] {"Reference"};
3853        case 3387378: /*note*/ return new String[] {"Annotation"};
3854        case 1538891575: /*relevantHistory*/ return new String[] {"Reference"};
3855        case -1561062452: /*restriction*/ return new String[] {};
3856        case 100358090: /*input*/ return new String[] {};
3857        case -1005512447: /*output*/ return new String[] {};
3858        default: return super.getTypesForProperty(hash, name);
3859        }
3860
3861      }
3862
3863      @Override
3864      public Base addChild(String name) throws FHIRException {
3865        if (name.equals("identifier")) {
3866          return addIdentifier();
3867        }
3868        else if (name.equals("instantiatesCanonical")) {
3869          throw new FHIRException("Cannot call addChild on a primitive type Task.instantiatesCanonical");
3870        }
3871        else if (name.equals("instantiatesUri")) {
3872          throw new FHIRException("Cannot call addChild on a primitive type Task.instantiatesUri");
3873        }
3874        else if (name.equals("basedOn")) {
3875          return addBasedOn();
3876        }
3877        else if (name.equals("groupIdentifier")) {
3878          this.groupIdentifier = new Identifier();
3879          return this.groupIdentifier;
3880        }
3881        else if (name.equals("partOf")) {
3882          return addPartOf();
3883        }
3884        else if (name.equals("status")) {
3885          throw new FHIRException("Cannot call addChild on a primitive type Task.status");
3886        }
3887        else if (name.equals("statusReason")) {
3888          this.statusReason = new CodeableConcept();
3889          return this.statusReason;
3890        }
3891        else if (name.equals("businessStatus")) {
3892          this.businessStatus = new CodeableConcept();
3893          return this.businessStatus;
3894        }
3895        else if (name.equals("intent")) {
3896          throw new FHIRException("Cannot call addChild on a primitive type Task.intent");
3897        }
3898        else if (name.equals("priority")) {
3899          throw new FHIRException("Cannot call addChild on a primitive type Task.priority");
3900        }
3901        else if (name.equals("code")) {
3902          this.code = new CodeableConcept();
3903          return this.code;
3904        }
3905        else if (name.equals("description")) {
3906          throw new FHIRException("Cannot call addChild on a primitive type Task.description");
3907        }
3908        else if (name.equals("focus")) {
3909          this.focus = new Reference();
3910          return this.focus;
3911        }
3912        else if (name.equals("for")) {
3913          this.for_ = new Reference();
3914          return this.for_;
3915        }
3916        else if (name.equals("encounter")) {
3917          this.encounter = new Reference();
3918          return this.encounter;
3919        }
3920        else if (name.equals("executionPeriod")) {
3921          this.executionPeriod = new Period();
3922          return this.executionPeriod;
3923        }
3924        else if (name.equals("authoredOn")) {
3925          throw new FHIRException("Cannot call addChild on a primitive type Task.authoredOn");
3926        }
3927        else if (name.equals("lastModified")) {
3928          throw new FHIRException("Cannot call addChild on a primitive type Task.lastModified");
3929        }
3930        else if (name.equals("requester")) {
3931          this.requester = new Reference();
3932          return this.requester;
3933        }
3934        else if (name.equals("performerType")) {
3935          return addPerformerType();
3936        }
3937        else if (name.equals("owner")) {
3938          this.owner = new Reference();
3939          return this.owner;
3940        }
3941        else if (name.equals("location")) {
3942          this.location = new Reference();
3943          return this.location;
3944        }
3945        else if (name.equals("reasonCode")) {
3946          this.reasonCode = new CodeableConcept();
3947          return this.reasonCode;
3948        }
3949        else if (name.equals("reasonReference")) {
3950          this.reasonReference = new Reference();
3951          return this.reasonReference;
3952        }
3953        else if (name.equals("insurance")) {
3954          return addInsurance();
3955        }
3956        else if (name.equals("note")) {
3957          return addNote();
3958        }
3959        else if (name.equals("relevantHistory")) {
3960          return addRelevantHistory();
3961        }
3962        else if (name.equals("restriction")) {
3963          this.restriction = new TaskRestrictionComponent();
3964          return this.restriction;
3965        }
3966        else if (name.equals("input")) {
3967          return addInput();
3968        }
3969        else if (name.equals("output")) {
3970          return addOutput();
3971        }
3972        else
3973          return super.addChild(name);
3974      }
3975
3976  public String fhirType() {
3977    return "Task";
3978
3979  }
3980
3981      public Task copy() {
3982        Task dst = new Task();
3983        copyValues(dst);
3984        if (identifier != null) {
3985          dst.identifier = new ArrayList<Identifier>();
3986          for (Identifier i : identifier)
3987            dst.identifier.add(i.copy());
3988        };
3989        dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy();
3990        dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy();
3991        if (basedOn != null) {
3992          dst.basedOn = new ArrayList<Reference>();
3993          for (Reference i : basedOn)
3994            dst.basedOn.add(i.copy());
3995        };
3996        dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy();
3997        if (partOf != null) {
3998          dst.partOf = new ArrayList<Reference>();
3999          for (Reference i : partOf)
4000            dst.partOf.add(i.copy());
4001        };
4002        dst.status = status == null ? null : status.copy();
4003        dst.statusReason = statusReason == null ? null : statusReason.copy();
4004        dst.businessStatus = businessStatus == null ? null : businessStatus.copy();
4005        dst.intent = intent == null ? null : intent.copy();
4006        dst.priority = priority == null ? null : priority.copy();
4007        dst.code = code == null ? null : code.copy();
4008        dst.description = description == null ? null : description.copy();
4009        dst.focus = focus == null ? null : focus.copy();
4010        dst.for_ = for_ == null ? null : for_.copy();
4011        dst.encounter = encounter == null ? null : encounter.copy();
4012        dst.executionPeriod = executionPeriod == null ? null : executionPeriod.copy();
4013        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
4014        dst.lastModified = lastModified == null ? null : lastModified.copy();
4015        dst.requester = requester == null ? null : requester.copy();
4016        if (performerType != null) {
4017          dst.performerType = new ArrayList<CodeableConcept>();
4018          for (CodeableConcept i : performerType)
4019            dst.performerType.add(i.copy());
4020        };
4021        dst.owner = owner == null ? null : owner.copy();
4022        dst.location = location == null ? null : location.copy();
4023        dst.reasonCode = reasonCode == null ? null : reasonCode.copy();
4024        dst.reasonReference = reasonReference == null ? null : reasonReference.copy();
4025        if (insurance != null) {
4026          dst.insurance = new ArrayList<Reference>();
4027          for (Reference i : insurance)
4028            dst.insurance.add(i.copy());
4029        };
4030        if (note != null) {
4031          dst.note = new ArrayList<Annotation>();
4032          for (Annotation i : note)
4033            dst.note.add(i.copy());
4034        };
4035        if (relevantHistory != null) {
4036          dst.relevantHistory = new ArrayList<Reference>();
4037          for (Reference i : relevantHistory)
4038            dst.relevantHistory.add(i.copy());
4039        };
4040        dst.restriction = restriction == null ? null : restriction.copy();
4041        if (input != null) {
4042          dst.input = new ArrayList<ParameterComponent>();
4043          for (ParameterComponent i : input)
4044            dst.input.add(i.copy());
4045        };
4046        if (output != null) {
4047          dst.output = new ArrayList<TaskOutputComponent>();
4048          for (TaskOutputComponent i : output)
4049            dst.output.add(i.copy());
4050        };
4051        return dst;
4052      }
4053
4054      protected Task typedCopy() {
4055        return copy();
4056      }
4057
4058      @Override
4059      public boolean equalsDeep(Base other_) {
4060        if (!super.equalsDeep(other_))
4061          return false;
4062        if (!(other_ instanceof Task))
4063          return false;
4064        Task o = (Task) other_;
4065        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
4066           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
4067           && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(partOf, o.partOf, true)
4068           && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(businessStatus, o.businessStatus, true)
4069           && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) && compareDeep(code, o.code, true)
4070           && compareDeep(description, o.description, true) && compareDeep(focus, o.focus, true) && compareDeep(for_, o.for_, true)
4071           && compareDeep(encounter, o.encounter, true) && compareDeep(executionPeriod, o.executionPeriod, true)
4072           && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(lastModified, o.lastModified, true)
4073           && compareDeep(requester, o.requester, true) && compareDeep(performerType, o.performerType, true)
4074           && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(reasonCode, o.reasonCode, true)
4075           && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(insurance, o.insurance, true)
4076           && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true) && compareDeep(restriction, o.restriction, true)
4077           && compareDeep(input, o.input, true) && compareDeep(output, o.output, true);
4078      }
4079
4080      @Override
4081      public boolean equalsShallow(Base other_) {
4082        if (!super.equalsShallow(other_))
4083          return false;
4084        if (!(other_ instanceof Task))
4085          return false;
4086        Task o = (Task) other_;
4087        return compareValues(instantiatesUri, o.instantiatesUri, true) && compareValues(status, o.status, true)
4088           && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true) && compareValues(description, o.description, true)
4089           && compareValues(authoredOn, o.authoredOn, true) && compareValues(lastModified, o.lastModified, true)
4090          ;
4091      }
4092
4093      public boolean isEmpty() {
4094        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
4095          , instantiatesUri, basedOn, groupIdentifier, partOf, status, statusReason, businessStatus
4096          , intent, priority, code, description, focus, for_, encounter, executionPeriod
4097          , authoredOn, lastModified, requester, performerType, owner, location, reasonCode
4098          , reasonReference, insurance, note, relevantHistory, restriction, input, output
4099          );
4100      }
4101
4102  @Override
4103  public ResourceType getResourceType() {
4104    return ResourceType.Task;
4105   }
4106
4107 /**
4108   * Search parameter: <b>owner</b>
4109   * <p>
4110   * Description: <b>Search by task owner</b><br>
4111   * Type: <b>reference</b><br>
4112   * Path: <b>Task.owner</b><br>
4113   * </p>
4114   */
4115  @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 } )
4116  public static final String SP_OWNER = "owner";
4117 /**
4118   * <b>Fluent Client</b> search parameter constant for <b>owner</b>
4119   * <p>
4120   * Description: <b>Search by task owner</b><br>
4121   * Type: <b>reference</b><br>
4122   * Path: <b>Task.owner</b><br>
4123   * </p>
4124   */
4125  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER);
4126
4127/**
4128   * Constant for fluent queries to be used to add include statements. Specifies
4129   * the path value of "<b>Task:owner</b>".
4130   */
4131  public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner").toLocked();
4132
4133 /**
4134   * Search parameter: <b>requester</b>
4135   * <p>
4136   * Description: <b>Search by task requester</b><br>
4137   * Type: <b>reference</b><br>
4138   * Path: <b>Task.requester</b><br>
4139   * </p>
4140   */
4141  @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 } )
4142  public static final String SP_REQUESTER = "requester";
4143 /**
4144   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
4145   * <p>
4146   * Description: <b>Search by task requester</b><br>
4147   * Type: <b>reference</b><br>
4148   * Path: <b>Task.requester</b><br>
4149   * </p>
4150   */
4151  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
4152
4153/**
4154   * Constant for fluent queries to be used to add include statements. Specifies
4155   * the path value of "<b>Task:requester</b>".
4156   */
4157  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("Task:requester").toLocked();
4158
4159 /**
4160   * Search parameter: <b>identifier</b>
4161   * <p>
4162   * Description: <b>Search for a task instance by its business identifier</b><br>
4163   * Type: <b>token</b><br>
4164   * Path: <b>Task.identifier</b><br>
4165   * </p>
4166   */
4167  @SearchParamDefinition(name="identifier", path="Task.identifier", description="Search for a task instance by its business identifier", type="token" )
4168  public static final String SP_IDENTIFIER = "identifier";
4169 /**
4170   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4171   * <p>
4172   * Description: <b>Search for a task instance by its business identifier</b><br>
4173   * Type: <b>token</b><br>
4174   * Path: <b>Task.identifier</b><br>
4175   * </p>
4176   */
4177  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4178
4179 /**
4180   * Search parameter: <b>business-status</b>
4181   * <p>
4182   * Description: <b>Search by business status</b><br>
4183   * Type: <b>token</b><br>
4184   * Path: <b>Task.businessStatus</b><br>
4185   * </p>
4186   */
4187  @SearchParamDefinition(name="business-status", path="Task.businessStatus", description="Search by business status", type="token" )
4188  public static final String SP_BUSINESS_STATUS = "business-status";
4189 /**
4190   * <b>Fluent Client</b> search parameter constant for <b>business-status</b>
4191   * <p>
4192   * Description: <b>Search by business status</b><br>
4193   * Type: <b>token</b><br>
4194   * Path: <b>Task.businessStatus</b><br>
4195   * </p>
4196   */
4197  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BUSINESS_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BUSINESS_STATUS);
4198
4199 /**
4200   * Search parameter: <b>period</b>
4201   * <p>
4202   * Description: <b>Search by period Task is/was underway</b><br>
4203   * Type: <b>date</b><br>
4204   * Path: <b>Task.executionPeriod</b><br>
4205   * </p>
4206   */
4207  @SearchParamDefinition(name="period", path="Task.executionPeriod", description="Search by period Task is/was underway", type="date" )
4208  public static final String SP_PERIOD = "period";
4209 /**
4210   * <b>Fluent Client</b> search parameter constant for <b>period</b>
4211   * <p>
4212   * Description: <b>Search by period Task is/was underway</b><br>
4213   * Type: <b>date</b><br>
4214   * Path: <b>Task.executionPeriod</b><br>
4215   * </p>
4216   */
4217  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
4218
4219 /**
4220   * Search parameter: <b>code</b>
4221   * <p>
4222   * Description: <b>Search by task code</b><br>
4223   * Type: <b>token</b><br>
4224   * Path: <b>Task.code</b><br>
4225   * </p>
4226   */
4227  @SearchParamDefinition(name="code", path="Task.code", description="Search by task code", type="token" )
4228  public static final String SP_CODE = "code";
4229 /**
4230   * <b>Fluent Client</b> search parameter constant for <b>code</b>
4231   * <p>
4232   * Description: <b>Search by task code</b><br>
4233   * Type: <b>token</b><br>
4234   * Path: <b>Task.code</b><br>
4235   * </p>
4236   */
4237  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
4238
4239 /**
4240   * Search parameter: <b>performer</b>
4241   * <p>
4242   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
4243   * Type: <b>token</b><br>
4244   * Path: <b>Task.performerType</b><br>
4245   * </p>
4246   */
4247  @SearchParamDefinition(name="performer", path="Task.performerType", description="Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type="token" )
4248  public static final String SP_PERFORMER = "performer";
4249 /**
4250   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
4251   * <p>
4252   * Description: <b>Search by recommended type of performer (e.g., Requester, Performer, Scheduler).</b><br>
4253   * Type: <b>token</b><br>
4254   * Path: <b>Task.performerType</b><br>
4255   * </p>
4256   */
4257  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER);
4258
4259 /**
4260   * Search parameter: <b>subject</b>
4261   * <p>
4262   * Description: <b>Search by subject</b><br>
4263   * Type: <b>reference</b><br>
4264   * Path: <b>Task.for</b><br>
4265   * </p>
4266   */
4267  @SearchParamDefinition(name="subject", path="Task.for", description="Search by subject", type="reference" )
4268  public static final String SP_SUBJECT = "subject";
4269 /**
4270   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
4271   * <p>
4272   * Description: <b>Search by subject</b><br>
4273   * Type: <b>reference</b><br>
4274   * Path: <b>Task.for</b><br>
4275   * </p>
4276   */
4277  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
4278
4279/**
4280   * Constant for fluent queries to be used to add include statements. Specifies
4281   * the path value of "<b>Task:subject</b>".
4282   */
4283  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject").toLocked();
4284
4285 /**
4286   * Search parameter: <b>focus</b>
4287   * <p>
4288   * Description: <b>Search by task focus</b><br>
4289   * Type: <b>reference</b><br>
4290   * Path: <b>Task.focus</b><br>
4291   * </p>
4292   */
4293  @SearchParamDefinition(name="focus", path="Task.focus", description="Search by task focus", type="reference" )
4294  public static final String SP_FOCUS = "focus";
4295 /**
4296   * <b>Fluent Client</b> search parameter constant for <b>focus</b>
4297   * <p>
4298   * Description: <b>Search by task focus</b><br>
4299   * Type: <b>reference</b><br>
4300   * Path: <b>Task.focus</b><br>
4301   * </p>
4302   */
4303  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS);
4304
4305/**
4306   * Constant for fluent queries to be used to add include statements. Specifies
4307   * the path value of "<b>Task:focus</b>".
4308   */
4309  public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Task:focus").toLocked();
4310
4311 /**
4312   * Search parameter: <b>part-of</b>
4313   * <p>
4314   * Description: <b>Search by task this task is part of</b><br>
4315   * Type: <b>reference</b><br>
4316   * Path: <b>Task.partOf</b><br>
4317   * </p>
4318   */
4319  @SearchParamDefinition(name="part-of", path="Task.partOf", description="Search by task this task is part of", type="reference", target={Task.class } )
4320  public static final String SP_PART_OF = "part-of";
4321 /**
4322   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
4323   * <p>
4324   * Description: <b>Search by task this task is part of</b><br>
4325   * Type: <b>reference</b><br>
4326   * Path: <b>Task.partOf</b><br>
4327   * </p>
4328   */
4329  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
4330
4331/**
4332   * Constant for fluent queries to be used to add include statements. Specifies
4333   * the path value of "<b>Task:part-of</b>".
4334   */
4335  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Task:part-of").toLocked();
4336
4337 /**
4338   * Search parameter: <b>encounter</b>
4339   * <p>
4340   * Description: <b>Search by encounter</b><br>
4341   * Type: <b>reference</b><br>
4342   * Path: <b>Task.encounter</b><br>
4343   * </p>
4344   */
4345  @SearchParamDefinition(name="encounter", path="Task.encounter", description="Search by encounter", type="reference", target={Encounter.class } )
4346  public static final String SP_ENCOUNTER = "encounter";
4347 /**
4348   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
4349   * <p>
4350   * Description: <b>Search by encounter</b><br>
4351   * Type: <b>reference</b><br>
4352   * Path: <b>Task.encounter</b><br>
4353   * </p>
4354   */
4355  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
4356
4357/**
4358   * Constant for fluent queries to be used to add include statements. Specifies
4359   * the path value of "<b>Task:encounter</b>".
4360   */
4361  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Task:encounter").toLocked();
4362
4363 /**
4364   * Search parameter: <b>priority</b>
4365   * <p>
4366   * Description: <b>Search by task priority</b><br>
4367   * Type: <b>token</b><br>
4368   * Path: <b>Task.priority</b><br>
4369   * </p>
4370   */
4371  @SearchParamDefinition(name="priority", path="Task.priority", description="Search by task priority", type="token" )
4372  public static final String SP_PRIORITY = "priority";
4373 /**
4374   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
4375   * <p>
4376   * Description: <b>Search by task priority</b><br>
4377   * Type: <b>token</b><br>
4378   * Path: <b>Task.priority</b><br>
4379   * </p>
4380   */
4381  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
4382
4383 /**
4384   * Search parameter: <b>authored-on</b>
4385   * <p>
4386   * Description: <b>Search by creation date</b><br>
4387   * Type: <b>date</b><br>
4388   * Path: <b>Task.authoredOn</b><br>
4389   * </p>
4390   */
4391  @SearchParamDefinition(name="authored-on", path="Task.authoredOn", description="Search by creation date", type="date" )
4392  public static final String SP_AUTHORED_ON = "authored-on";
4393 /**
4394   * <b>Fluent Client</b> search parameter constant for <b>authored-on</b>
4395   * <p>
4396   * Description: <b>Search by creation date</b><br>
4397   * Type: <b>date</b><br>
4398   * Path: <b>Task.authoredOn</b><br>
4399   * </p>
4400   */
4401  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED_ON = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED_ON);
4402
4403 /**
4404   * Search parameter: <b>intent</b>
4405   * <p>
4406   * Description: <b>Search by task intent</b><br>
4407   * Type: <b>token</b><br>
4408   * Path: <b>Task.intent</b><br>
4409   * </p>
4410   */
4411  @SearchParamDefinition(name="intent", path="Task.intent", description="Search by task intent", type="token" )
4412  public static final String SP_INTENT = "intent";
4413 /**
4414   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
4415   * <p>
4416   * Description: <b>Search by task intent</b><br>
4417   * Type: <b>token</b><br>
4418   * Path: <b>Task.intent</b><br>
4419   * </p>
4420   */
4421  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
4422
4423 /**
4424   * Search parameter: <b>group-identifier</b>
4425   * <p>
4426   * Description: <b>Search by group identifier</b><br>
4427   * Type: <b>token</b><br>
4428   * Path: <b>Task.groupIdentifier</b><br>
4429   * </p>
4430   */
4431  @SearchParamDefinition(name="group-identifier", path="Task.groupIdentifier", description="Search by group identifier", type="token" )
4432  public static final String SP_GROUP_IDENTIFIER = "group-identifier";
4433 /**
4434   * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b>
4435   * <p>
4436   * Description: <b>Search by group identifier</b><br>
4437   * Type: <b>token</b><br>
4438   * Path: <b>Task.groupIdentifier</b><br>
4439   * </p>
4440   */
4441  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER);
4442
4443 /**
4444   * Search parameter: <b>based-on</b>
4445   * <p>
4446   * Description: <b>Search by requests this task is based on</b><br>
4447   * Type: <b>reference</b><br>
4448   * Path: <b>Task.basedOn</b><br>
4449   * </p>
4450   */
4451  @SearchParamDefinition(name="based-on", path="Task.basedOn", description="Search by requests this task is based on", type="reference" )
4452  public static final String SP_BASED_ON = "based-on";
4453 /**
4454   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
4455   * <p>
4456   * Description: <b>Search by requests this task is based on</b><br>
4457   * Type: <b>reference</b><br>
4458   * Path: <b>Task.basedOn</b><br>
4459   * </p>
4460   */
4461  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
4462
4463/**
4464   * Constant for fluent queries to be used to add include statements. Specifies
4465   * the path value of "<b>Task:based-on</b>".
4466   */
4467  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Task:based-on").toLocked();
4468
4469 /**
4470   * Search parameter: <b>patient</b>
4471   * <p>
4472   * Description: <b>Search by patient</b><br>
4473   * Type: <b>reference</b><br>
4474   * Path: <b>Task.for</b><br>
4475   * </p>
4476   */
4477  @SearchParamDefinition(name="patient", path="Task.for.where(resolve() is Patient)", description="Search by patient", type="reference", target={Patient.class } )
4478  public static final String SP_PATIENT = "patient";
4479 /**
4480   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
4481   * <p>
4482   * Description: <b>Search by patient</b><br>
4483   * Type: <b>reference</b><br>
4484   * Path: <b>Task.for</b><br>
4485   * </p>
4486   */
4487  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
4488
4489/**
4490   * Constant for fluent queries to be used to add include statements. Specifies
4491   * the path value of "<b>Task:patient</b>".
4492   */
4493  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Task:patient").toLocked();
4494
4495 /**
4496   * Search parameter: <b>modified</b>
4497   * <p>
4498   * Description: <b>Search by last modification date</b><br>
4499   * Type: <b>date</b><br>
4500   * Path: <b>Task.lastModified</b><br>
4501   * </p>
4502   */
4503  @SearchParamDefinition(name="modified", path="Task.lastModified", description="Search by last modification date", type="date" )
4504  public static final String SP_MODIFIED = "modified";
4505 /**
4506   * <b>Fluent Client</b> search parameter constant for <b>modified</b>
4507   * <p>
4508   * Description: <b>Search by last modification date</b><br>
4509   * Type: <b>date</b><br>
4510   * Path: <b>Task.lastModified</b><br>
4511   * </p>
4512   */
4513  public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_MODIFIED);
4514
4515 /**
4516   * Search parameter: <b>status</b>
4517   * <p>
4518   * Description: <b>Search by task status</b><br>
4519   * Type: <b>token</b><br>
4520   * Path: <b>Task.status</b><br>
4521   * </p>
4522   */
4523  @SearchParamDefinition(name="status", path="Task.status", description="Search by task status", type="token" )
4524  public static final String SP_STATUS = "status";
4525 /**
4526   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4527   * <p>
4528   * Description: <b>Search by task status</b><br>
4529   * Type: <b>token</b><br>
4530   * Path: <b>Task.status</b><br>
4531   * </p>
4532   */
4533  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4534
4535
4536}
4537