001package org.hl7.fhir.r4b.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
052 */
053@ResourceDef(name="RequestGroup", profile="http://hl7.org/fhir/StructureDefinition/RequestGroup")
054public class RequestGroup extends DomainResource {
055
056    @Block()
057    public static class RequestGroupActionComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * A user-visible prefix for the action.
060         */
061        @Child(name = "prefix", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="User-visible prefix for the action (e.g. 1. or A.)", formalDefinition="A user-visible prefix for the action." )
063        protected StringType prefix;
064
065        /**
066         * The title of the action displayed to a user.
067         */
068        @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
069        @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." )
070        protected StringType title;
071
072        /**
073         * A short description of the action used to provide a summary to display to the user.
074         */
075        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
076        @Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." )
077        protected StringType description;
078
079        /**
080         * A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.
081         */
082        @Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
083        @Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically." )
084        protected StringType textEquivalent;
085
086        /**
087         * Indicates how quickly the action should be addressed with respect to other actions.
088         */
089        @Child(name = "priority", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
090        @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the action should be addressed with respect to other actions." )
091        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
092        protected Enumeration<RequestPriority> priority;
093
094        /**
095         * A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.
096         */
097        @Child(name = "code", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
098        @Description(shortDefinition="Code representing the meaning of the action or sub-actions", formalDefinition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template." )
099        protected List<CodeableConcept> code;
100
101        /**
102         * Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.
103         */
104        @Child(name = "documentation", type = {RelatedArtifact.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
105        @Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." )
106        protected List<RelatedArtifact> documentation;
107
108        /**
109         * An expression that describes applicability criteria, or start/stop conditions for the action.
110         */
111        @Child(name = "condition", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
112        @Description(shortDefinition="Whether or not the action is applicable", formalDefinition="An expression that describes applicability criteria, or start/stop conditions for the action." )
113        protected List<RequestGroupActionConditionComponent> condition;
114
115        /**
116         * A relationship to another action such as "before" or "30-60 minutes after start of".
117         */
118        @Child(name = "relatedAction", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
119        @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." )
120        protected List<RequestGroupActionRelatedActionComponent> relatedAction;
121
122        /**
123         * An optional value describing when the action should be performed.
124         */
125        @Child(name = "timing", type = {DateTimeType.class, Age.class, Period.class, Duration.class, Range.class, Timing.class}, order=10, min=0, max=1, modifier=false, summary=false)
126        @Description(shortDefinition="When the action should take place", formalDefinition="An optional value describing when the action should be performed." )
127        protected DataType timing;
128
129        /**
130         * The participant that should perform or be responsible for this action.
131         */
132        @Child(name = "participant", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Device.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
133        @Description(shortDefinition="Who should perform the action", formalDefinition="The participant that should perform or be responsible for this action." )
134        protected List<Reference> participant;
135
136        /**
137         * The type of action to perform (create, update, remove).
138         */
139        @Child(name = "type", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false)
140        @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." )
141        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-type")
142        protected CodeableConcept type;
143
144        /**
145         * Defines the grouping behavior for the action and its children.
146         */
147        @Child(name = "groupingBehavior", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false)
148        @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines the grouping behavior for the action and its children." )
149        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-grouping-behavior")
150        protected Enumeration<ActionGroupingBehavior> groupingBehavior;
151
152        /**
153         * Defines the selection behavior for the action and its children.
154         */
155        @Child(name = "selectionBehavior", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false)
156        @Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines the selection behavior for the action and its children." )
157        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-selection-behavior")
158        protected Enumeration<ActionSelectionBehavior> selectionBehavior;
159
160        /**
161         * Defines expectations around whether an action is required.
162         */
163        @Child(name = "requiredBehavior", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false)
164        @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines expectations around whether an action is required." )
165        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-required-behavior")
166        protected Enumeration<ActionRequiredBehavior> requiredBehavior;
167
168        /**
169         * Defines whether the action should usually be preselected.
170         */
171        @Child(name = "precheckBehavior", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
172        @Description(shortDefinition="yes | no", formalDefinition="Defines whether the action should usually be preselected." )
173        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-precheck-behavior")
174        protected Enumeration<ActionPrecheckBehavior> precheckBehavior;
175
176        /**
177         * Defines whether the action can be selected multiple times.
178         */
179        @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
180        @Description(shortDefinition="single | multiple", formalDefinition="Defines whether the action can be selected multiple times." )
181        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-cardinality-behavior")
182        protected Enumeration<ActionCardinalityBehavior> cardinalityBehavior;
183
184        /**
185         * The resource that is the target of the action (e.g. CommunicationRequest).
186         */
187        @Child(name = "resource", type = {Reference.class}, order=18, min=0, max=1, modifier=false, summary=false)
188        @Description(shortDefinition="The target of the action", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." )
189        protected Reference resource;
190
191        /**
192         * Sub actions.
193         */
194        @Child(name = "action", type = {RequestGroupActionComponent.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
195        @Description(shortDefinition="Sub action", formalDefinition="Sub actions." )
196        protected List<RequestGroupActionComponent> action;
197
198        private static final long serialVersionUID = -919880448L;
199
200    /**
201     * Constructor
202     */
203      public RequestGroupActionComponent() {
204        super();
205      }
206
207        /**
208         * @return {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value
209         */
210        public StringType getPrefixElement() { 
211          if (this.prefix == null)
212            if (Configuration.errorOnAutoCreate())
213              throw new Error("Attempt to auto-create RequestGroupActionComponent.prefix");
214            else if (Configuration.doAutoCreate())
215              this.prefix = new StringType(); // bb
216          return this.prefix;
217        }
218
219        public boolean hasPrefixElement() { 
220          return this.prefix != null && !this.prefix.isEmpty();
221        }
222
223        public boolean hasPrefix() { 
224          return this.prefix != null && !this.prefix.isEmpty();
225        }
226
227        /**
228         * @param value {@link #prefix} (A user-visible prefix for the action.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value
229         */
230        public RequestGroupActionComponent setPrefixElement(StringType value) { 
231          this.prefix = value;
232          return this;
233        }
234
235        /**
236         * @return A user-visible prefix for the action.
237         */
238        public String getPrefix() { 
239          return this.prefix == null ? null : this.prefix.getValue();
240        }
241
242        /**
243         * @param value A user-visible prefix for the action.
244         */
245        public RequestGroupActionComponent setPrefix(String value) { 
246          if (Utilities.noString(value))
247            this.prefix = null;
248          else {
249            if (this.prefix == null)
250              this.prefix = new StringType();
251            this.prefix.setValue(value);
252          }
253          return this;
254        }
255
256        /**
257         * @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
258         */
259        public StringType getTitleElement() { 
260          if (this.title == null)
261            if (Configuration.errorOnAutoCreate())
262              throw new Error("Attempt to auto-create RequestGroupActionComponent.title");
263            else if (Configuration.doAutoCreate())
264              this.title = new StringType(); // bb
265          return this.title;
266        }
267
268        public boolean hasTitleElement() { 
269          return this.title != null && !this.title.isEmpty();
270        }
271
272        public boolean hasTitle() { 
273          return this.title != null && !this.title.isEmpty();
274        }
275
276        /**
277         * @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
278         */
279        public RequestGroupActionComponent setTitleElement(StringType value) { 
280          this.title = value;
281          return this;
282        }
283
284        /**
285         * @return The title of the action displayed to a user.
286         */
287        public String getTitle() { 
288          return this.title == null ? null : this.title.getValue();
289        }
290
291        /**
292         * @param value The title of the action displayed to a user.
293         */
294        public RequestGroupActionComponent setTitle(String value) { 
295          if (Utilities.noString(value))
296            this.title = null;
297          else {
298            if (this.title == null)
299              this.title = new StringType();
300            this.title.setValue(value);
301          }
302          return this;
303        }
304
305        /**
306         * @return {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
307         */
308        public StringType getDescriptionElement() { 
309          if (this.description == null)
310            if (Configuration.errorOnAutoCreate())
311              throw new Error("Attempt to auto-create RequestGroupActionComponent.description");
312            else if (Configuration.doAutoCreate())
313              this.description = new StringType(); // bb
314          return this.description;
315        }
316
317        public boolean hasDescriptionElement() { 
318          return this.description != null && !this.description.isEmpty();
319        }
320
321        public boolean hasDescription() { 
322          return this.description != null && !this.description.isEmpty();
323        }
324
325        /**
326         * @param value {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
327         */
328        public RequestGroupActionComponent setDescriptionElement(StringType value) { 
329          this.description = value;
330          return this;
331        }
332
333        /**
334         * @return A short description of the action used to provide a summary to display to the user.
335         */
336        public String getDescription() { 
337          return this.description == null ? null : this.description.getValue();
338        }
339
340        /**
341         * @param value A short description of the action used to provide a summary to display to the user.
342         */
343        public RequestGroupActionComponent setDescription(String value) { 
344          if (Utilities.noString(value))
345            this.description = null;
346          else {
347            if (this.description == null)
348              this.description = new StringType();
349            this.description.setValue(value);
350          }
351          return this;
352        }
353
354        /**
355         * @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value
356         */
357        public StringType getTextEquivalentElement() { 
358          if (this.textEquivalent == null)
359            if (Configuration.errorOnAutoCreate())
360              throw new Error("Attempt to auto-create RequestGroupActionComponent.textEquivalent");
361            else if (Configuration.doAutoCreate())
362              this.textEquivalent = new StringType(); // bb
363          return this.textEquivalent;
364        }
365
366        public boolean hasTextEquivalentElement() { 
367          return this.textEquivalent != null && !this.textEquivalent.isEmpty();
368        }
369
370        public boolean hasTextEquivalent() { 
371          return this.textEquivalent != null && !this.textEquivalent.isEmpty();
372        }
373
374        /**
375         * @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value
376         */
377        public RequestGroupActionComponent setTextEquivalentElement(StringType value) { 
378          this.textEquivalent = value;
379          return this;
380        }
381
382        /**
383         * @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.
384         */
385        public String getTextEquivalent() { 
386          return this.textEquivalent == null ? null : this.textEquivalent.getValue();
387        }
388
389        /**
390         * @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.
391         */
392        public RequestGroupActionComponent setTextEquivalent(String value) { 
393          if (Utilities.noString(value))
394            this.textEquivalent = null;
395          else {
396            if (this.textEquivalent == null)
397              this.textEquivalent = new StringType();
398            this.textEquivalent.setValue(value);
399          }
400          return this;
401        }
402
403        /**
404         * @return {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
405         */
406        public Enumeration<RequestPriority> getPriorityElement() { 
407          if (this.priority == null)
408            if (Configuration.errorOnAutoCreate())
409              throw new Error("Attempt to auto-create RequestGroupActionComponent.priority");
410            else if (Configuration.doAutoCreate())
411              this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
412          return this.priority;
413        }
414
415        public boolean hasPriorityElement() { 
416          return this.priority != null && !this.priority.isEmpty();
417        }
418
419        public boolean hasPriority() { 
420          return this.priority != null && !this.priority.isEmpty();
421        }
422
423        /**
424         * @param value {@link #priority} (Indicates how quickly the action should be addressed with respect to other actions.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
425         */
426        public RequestGroupActionComponent setPriorityElement(Enumeration<RequestPriority> value) { 
427          this.priority = value;
428          return this;
429        }
430
431        /**
432         * @return Indicates how quickly the action should be addressed with respect to other actions.
433         */
434        public RequestPriority getPriority() { 
435          return this.priority == null ? null : this.priority.getValue();
436        }
437
438        /**
439         * @param value Indicates how quickly the action should be addressed with respect to other actions.
440         */
441        public RequestGroupActionComponent setPriority(RequestPriority value) { 
442          if (value == null)
443            this.priority = null;
444          else {
445            if (this.priority == null)
446              this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
447            this.priority.setValue(value);
448          }
449          return this;
450        }
451
452        /**
453         * @return {@link #code} (A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.)
454         */
455        public List<CodeableConcept> getCode() { 
456          if (this.code == null)
457            this.code = new ArrayList<CodeableConcept>();
458          return this.code;
459        }
460
461        /**
462         * @return Returns a reference to <code>this</code> for easy method chaining
463         */
464        public RequestGroupActionComponent setCode(List<CodeableConcept> theCode) { 
465          this.code = theCode;
466          return this;
467        }
468
469        public boolean hasCode() { 
470          if (this.code == null)
471            return false;
472          for (CodeableConcept item : this.code)
473            if (!item.isEmpty())
474              return true;
475          return false;
476        }
477
478        public CodeableConcept addCode() { //3
479          CodeableConcept t = new CodeableConcept();
480          if (this.code == null)
481            this.code = new ArrayList<CodeableConcept>();
482          this.code.add(t);
483          return t;
484        }
485
486        public RequestGroupActionComponent addCode(CodeableConcept t) { //3
487          if (t == null)
488            return this;
489          if (this.code == null)
490            this.code = new ArrayList<CodeableConcept>();
491          this.code.add(t);
492          return this;
493        }
494
495        /**
496         * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3}
497         */
498        public CodeableConcept getCodeFirstRep() { 
499          if (getCode().isEmpty()) {
500            addCode();
501          }
502          return getCode().get(0);
503        }
504
505        /**
506         * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.)
507         */
508        public List<RelatedArtifact> getDocumentation() { 
509          if (this.documentation == null)
510            this.documentation = new ArrayList<RelatedArtifact>();
511          return this.documentation;
512        }
513
514        /**
515         * @return Returns a reference to <code>this</code> for easy method chaining
516         */
517        public RequestGroupActionComponent setDocumentation(List<RelatedArtifact> theDocumentation) { 
518          this.documentation = theDocumentation;
519          return this;
520        }
521
522        public boolean hasDocumentation() { 
523          if (this.documentation == null)
524            return false;
525          for (RelatedArtifact item : this.documentation)
526            if (!item.isEmpty())
527              return true;
528          return false;
529        }
530
531        public RelatedArtifact addDocumentation() { //3
532          RelatedArtifact t = new RelatedArtifact();
533          if (this.documentation == null)
534            this.documentation = new ArrayList<RelatedArtifact>();
535          this.documentation.add(t);
536          return t;
537        }
538
539        public RequestGroupActionComponent addDocumentation(RelatedArtifact t) { //3
540          if (t == null)
541            return this;
542          if (this.documentation == null)
543            this.documentation = new ArrayList<RelatedArtifact>();
544          this.documentation.add(t);
545          return this;
546        }
547
548        /**
549         * @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist {3}
550         */
551        public RelatedArtifact getDocumentationFirstRep() { 
552          if (getDocumentation().isEmpty()) {
553            addDocumentation();
554          }
555          return getDocumentation().get(0);
556        }
557
558        /**
559         * @return {@link #condition} (An expression that describes applicability criteria, or start/stop conditions for the action.)
560         */
561        public List<RequestGroupActionConditionComponent> getCondition() { 
562          if (this.condition == null)
563            this.condition = new ArrayList<RequestGroupActionConditionComponent>();
564          return this.condition;
565        }
566
567        /**
568         * @return Returns a reference to <code>this</code> for easy method chaining
569         */
570        public RequestGroupActionComponent setCondition(List<RequestGroupActionConditionComponent> theCondition) { 
571          this.condition = theCondition;
572          return this;
573        }
574
575        public boolean hasCondition() { 
576          if (this.condition == null)
577            return false;
578          for (RequestGroupActionConditionComponent item : this.condition)
579            if (!item.isEmpty())
580              return true;
581          return false;
582        }
583
584        public RequestGroupActionConditionComponent addCondition() { //3
585          RequestGroupActionConditionComponent t = new RequestGroupActionConditionComponent();
586          if (this.condition == null)
587            this.condition = new ArrayList<RequestGroupActionConditionComponent>();
588          this.condition.add(t);
589          return t;
590        }
591
592        public RequestGroupActionComponent addCondition(RequestGroupActionConditionComponent t) { //3
593          if (t == null)
594            return this;
595          if (this.condition == null)
596            this.condition = new ArrayList<RequestGroupActionConditionComponent>();
597          this.condition.add(t);
598          return this;
599        }
600
601        /**
602         * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist {3}
603         */
604        public RequestGroupActionConditionComponent getConditionFirstRep() { 
605          if (getCondition().isEmpty()) {
606            addCondition();
607          }
608          return getCondition().get(0);
609        }
610
611        /**
612         * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".)
613         */
614        public List<RequestGroupActionRelatedActionComponent> getRelatedAction() { 
615          if (this.relatedAction == null)
616            this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>();
617          return this.relatedAction;
618        }
619
620        /**
621         * @return Returns a reference to <code>this</code> for easy method chaining
622         */
623        public RequestGroupActionComponent setRelatedAction(List<RequestGroupActionRelatedActionComponent> theRelatedAction) { 
624          this.relatedAction = theRelatedAction;
625          return this;
626        }
627
628        public boolean hasRelatedAction() { 
629          if (this.relatedAction == null)
630            return false;
631          for (RequestGroupActionRelatedActionComponent item : this.relatedAction)
632            if (!item.isEmpty())
633              return true;
634          return false;
635        }
636
637        public RequestGroupActionRelatedActionComponent addRelatedAction() { //3
638          RequestGroupActionRelatedActionComponent t = new RequestGroupActionRelatedActionComponent();
639          if (this.relatedAction == null)
640            this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>();
641          this.relatedAction.add(t);
642          return t;
643        }
644
645        public RequestGroupActionComponent addRelatedAction(RequestGroupActionRelatedActionComponent t) { //3
646          if (t == null)
647            return this;
648          if (this.relatedAction == null)
649            this.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>();
650          this.relatedAction.add(t);
651          return this;
652        }
653
654        /**
655         * @return The first repetition of repeating field {@link #relatedAction}, creating it if it does not already exist {3}
656         */
657        public RequestGroupActionRelatedActionComponent getRelatedActionFirstRep() { 
658          if (getRelatedAction().isEmpty()) {
659            addRelatedAction();
660          }
661          return getRelatedAction().get(0);
662        }
663
664        /**
665         * @return {@link #timing} (An optional value describing when the action should be performed.)
666         */
667        public DataType getTiming() { 
668          return this.timing;
669        }
670
671        /**
672         * @return {@link #timing} (An optional value describing when the action should be performed.)
673         */
674        public DateTimeType getTimingDateTimeType() throws FHIRException { 
675          if (this.timing == null)
676            this.timing = new DateTimeType();
677          if (!(this.timing instanceof DateTimeType))
678            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered");
679          return (DateTimeType) this.timing;
680        }
681
682        public boolean hasTimingDateTimeType() { 
683          return this != null && this.timing instanceof DateTimeType;
684        }
685
686        /**
687         * @return {@link #timing} (An optional value describing when the action should be performed.)
688         */
689        public Age getTimingAge() throws FHIRException { 
690          if (this.timing == null)
691            this.timing = new Age();
692          if (!(this.timing instanceof Age))
693            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.timing.getClass().getName()+" was encountered");
694          return (Age) this.timing;
695        }
696
697        public boolean hasTimingAge() { 
698          return this != null && this.timing instanceof Age;
699        }
700
701        /**
702         * @return {@link #timing} (An optional value describing when the action should be performed.)
703         */
704        public Period getTimingPeriod() throws FHIRException { 
705          if (this.timing == null)
706            this.timing = new Period();
707          if (!(this.timing instanceof Period))
708            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered");
709          return (Period) this.timing;
710        }
711
712        public boolean hasTimingPeriod() { 
713          return this != null && this.timing instanceof Period;
714        }
715
716        /**
717         * @return {@link #timing} (An optional value describing when the action should be performed.)
718         */
719        public Duration getTimingDuration() throws FHIRException { 
720          if (this.timing == null)
721            this.timing = new Duration();
722          if (!(this.timing instanceof Duration))
723            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered");
724          return (Duration) this.timing;
725        }
726
727        public boolean hasTimingDuration() { 
728          return this != null && this.timing instanceof Duration;
729        }
730
731        /**
732         * @return {@link #timing} (An optional value describing when the action should be performed.)
733         */
734        public Range getTimingRange() throws FHIRException { 
735          if (this.timing == null)
736            this.timing = new Range();
737          if (!(this.timing instanceof Range))
738            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered");
739          return (Range) this.timing;
740        }
741
742        public boolean hasTimingRange() { 
743          return this != null && this.timing instanceof Range;
744        }
745
746        /**
747         * @return {@link #timing} (An optional value describing when the action should be performed.)
748         */
749        public Timing getTimingTiming() throws FHIRException { 
750          if (this.timing == null)
751            this.timing = new Timing();
752          if (!(this.timing instanceof Timing))
753            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered");
754          return (Timing) this.timing;
755        }
756
757        public boolean hasTimingTiming() { 
758          return this != null && this.timing instanceof Timing;
759        }
760
761        public boolean hasTiming() { 
762          return this.timing != null && !this.timing.isEmpty();
763        }
764
765        /**
766         * @param value {@link #timing} (An optional value describing when the action should be performed.)
767         */
768        public RequestGroupActionComponent setTiming(DataType value) { 
769          if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Duration || value instanceof Range || value instanceof Timing))
770            throw new Error("Not the right type for RequestGroup.action.timing[x]: "+value.fhirType());
771          this.timing = value;
772          return this;
773        }
774
775        /**
776         * @return {@link #participant} (The participant that should perform or be responsible for this action.)
777         */
778        public List<Reference> getParticipant() { 
779          if (this.participant == null)
780            this.participant = new ArrayList<Reference>();
781          return this.participant;
782        }
783
784        /**
785         * @return Returns a reference to <code>this</code> for easy method chaining
786         */
787        public RequestGroupActionComponent setParticipant(List<Reference> theParticipant) { 
788          this.participant = theParticipant;
789          return this;
790        }
791
792        public boolean hasParticipant() { 
793          if (this.participant == null)
794            return false;
795          for (Reference item : this.participant)
796            if (!item.isEmpty())
797              return true;
798          return false;
799        }
800
801        public Reference addParticipant() { //3
802          Reference t = new Reference();
803          if (this.participant == null)
804            this.participant = new ArrayList<Reference>();
805          this.participant.add(t);
806          return t;
807        }
808
809        public RequestGroupActionComponent addParticipant(Reference t) { //3
810          if (t == null)
811            return this;
812          if (this.participant == null)
813            this.participant = new ArrayList<Reference>();
814          this.participant.add(t);
815          return this;
816        }
817
818        /**
819         * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
820         */
821        public Reference getParticipantFirstRep() { 
822          if (getParticipant().isEmpty()) {
823            addParticipant();
824          }
825          return getParticipant().get(0);
826        }
827
828        /**
829         * @return {@link #type} (The type of action to perform (create, update, remove).)
830         */
831        public CodeableConcept getType() { 
832          if (this.type == null)
833            if (Configuration.errorOnAutoCreate())
834              throw new Error("Attempt to auto-create RequestGroupActionComponent.type");
835            else if (Configuration.doAutoCreate())
836              this.type = new CodeableConcept(); // cc
837          return this.type;
838        }
839
840        public boolean hasType() { 
841          return this.type != null && !this.type.isEmpty();
842        }
843
844        /**
845         * @param value {@link #type} (The type of action to perform (create, update, remove).)
846         */
847        public RequestGroupActionComponent setType(CodeableConcept value) { 
848          this.type = value;
849          return this;
850        }
851
852        /**
853         * @return {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value
854         */
855        public Enumeration<ActionGroupingBehavior> getGroupingBehaviorElement() { 
856          if (this.groupingBehavior == null)
857            if (Configuration.errorOnAutoCreate())
858              throw new Error("Attempt to auto-create RequestGroupActionComponent.groupingBehavior");
859            else if (Configuration.doAutoCreate())
860              this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory()); // bb
861          return this.groupingBehavior;
862        }
863
864        public boolean hasGroupingBehaviorElement() { 
865          return this.groupingBehavior != null && !this.groupingBehavior.isEmpty();
866        }
867
868        public boolean hasGroupingBehavior() { 
869          return this.groupingBehavior != null && !this.groupingBehavior.isEmpty();
870        }
871
872        /**
873         * @param value {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value
874         */
875        public RequestGroupActionComponent setGroupingBehaviorElement(Enumeration<ActionGroupingBehavior> value) { 
876          this.groupingBehavior = value;
877          return this;
878        }
879
880        /**
881         * @return Defines the grouping behavior for the action and its children.
882         */
883        public ActionGroupingBehavior getGroupingBehavior() { 
884          return this.groupingBehavior == null ? null : this.groupingBehavior.getValue();
885        }
886
887        /**
888         * @param value Defines the grouping behavior for the action and its children.
889         */
890        public RequestGroupActionComponent setGroupingBehavior(ActionGroupingBehavior value) { 
891          if (value == null)
892            this.groupingBehavior = null;
893          else {
894            if (this.groupingBehavior == null)
895              this.groupingBehavior = new Enumeration<ActionGroupingBehavior>(new ActionGroupingBehaviorEnumFactory());
896            this.groupingBehavior.setValue(value);
897          }
898          return this;
899        }
900
901        /**
902         * @return {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value
903         */
904        public Enumeration<ActionSelectionBehavior> getSelectionBehaviorElement() { 
905          if (this.selectionBehavior == null)
906            if (Configuration.errorOnAutoCreate())
907              throw new Error("Attempt to auto-create RequestGroupActionComponent.selectionBehavior");
908            else if (Configuration.doAutoCreate())
909              this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory()); // bb
910          return this.selectionBehavior;
911        }
912
913        public boolean hasSelectionBehaviorElement() { 
914          return this.selectionBehavior != null && !this.selectionBehavior.isEmpty();
915        }
916
917        public boolean hasSelectionBehavior() { 
918          return this.selectionBehavior != null && !this.selectionBehavior.isEmpty();
919        }
920
921        /**
922         * @param value {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value
923         */
924        public RequestGroupActionComponent setSelectionBehaviorElement(Enumeration<ActionSelectionBehavior> value) { 
925          this.selectionBehavior = value;
926          return this;
927        }
928
929        /**
930         * @return Defines the selection behavior for the action and its children.
931         */
932        public ActionSelectionBehavior getSelectionBehavior() { 
933          return this.selectionBehavior == null ? null : this.selectionBehavior.getValue();
934        }
935
936        /**
937         * @param value Defines the selection behavior for the action and its children.
938         */
939        public RequestGroupActionComponent setSelectionBehavior(ActionSelectionBehavior value) { 
940          if (value == null)
941            this.selectionBehavior = null;
942          else {
943            if (this.selectionBehavior == null)
944              this.selectionBehavior = new Enumeration<ActionSelectionBehavior>(new ActionSelectionBehaviorEnumFactory());
945            this.selectionBehavior.setValue(value);
946          }
947          return this;
948        }
949
950        /**
951         * @return {@link #requiredBehavior} (Defines expectations around whether an action is required.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value
952         */
953        public Enumeration<ActionRequiredBehavior> getRequiredBehaviorElement() { 
954          if (this.requiredBehavior == null)
955            if (Configuration.errorOnAutoCreate())
956              throw new Error("Attempt to auto-create RequestGroupActionComponent.requiredBehavior");
957            else if (Configuration.doAutoCreate())
958              this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory()); // bb
959          return this.requiredBehavior;
960        }
961
962        public boolean hasRequiredBehaviorElement() { 
963          return this.requiredBehavior != null && !this.requiredBehavior.isEmpty();
964        }
965
966        public boolean hasRequiredBehavior() { 
967          return this.requiredBehavior != null && !this.requiredBehavior.isEmpty();
968        }
969
970        /**
971         * @param value {@link #requiredBehavior} (Defines expectations around whether an action is required.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value
972         */
973        public RequestGroupActionComponent setRequiredBehaviorElement(Enumeration<ActionRequiredBehavior> value) { 
974          this.requiredBehavior = value;
975          return this;
976        }
977
978        /**
979         * @return Defines expectations around whether an action is required.
980         */
981        public ActionRequiredBehavior getRequiredBehavior() { 
982          return this.requiredBehavior == null ? null : this.requiredBehavior.getValue();
983        }
984
985        /**
986         * @param value Defines expectations around whether an action is required.
987         */
988        public RequestGroupActionComponent setRequiredBehavior(ActionRequiredBehavior value) { 
989          if (value == null)
990            this.requiredBehavior = null;
991          else {
992            if (this.requiredBehavior == null)
993              this.requiredBehavior = new Enumeration<ActionRequiredBehavior>(new ActionRequiredBehaviorEnumFactory());
994            this.requiredBehavior.setValue(value);
995          }
996          return this;
997        }
998
999        /**
1000         * @return {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value
1001         */
1002        public Enumeration<ActionPrecheckBehavior> getPrecheckBehaviorElement() { 
1003          if (this.precheckBehavior == null)
1004            if (Configuration.errorOnAutoCreate())
1005              throw new Error("Attempt to auto-create RequestGroupActionComponent.precheckBehavior");
1006            else if (Configuration.doAutoCreate())
1007              this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory()); // bb
1008          return this.precheckBehavior;
1009        }
1010
1011        public boolean hasPrecheckBehaviorElement() { 
1012          return this.precheckBehavior != null && !this.precheckBehavior.isEmpty();
1013        }
1014
1015        public boolean hasPrecheckBehavior() { 
1016          return this.precheckBehavior != null && !this.precheckBehavior.isEmpty();
1017        }
1018
1019        /**
1020         * @param value {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value
1021         */
1022        public RequestGroupActionComponent setPrecheckBehaviorElement(Enumeration<ActionPrecheckBehavior> value) { 
1023          this.precheckBehavior = value;
1024          return this;
1025        }
1026
1027        /**
1028         * @return Defines whether the action should usually be preselected.
1029         */
1030        public ActionPrecheckBehavior getPrecheckBehavior() { 
1031          return this.precheckBehavior == null ? null : this.precheckBehavior.getValue();
1032        }
1033
1034        /**
1035         * @param value Defines whether the action should usually be preselected.
1036         */
1037        public RequestGroupActionComponent setPrecheckBehavior(ActionPrecheckBehavior value) { 
1038          if (value == null)
1039            this.precheckBehavior = null;
1040          else {
1041            if (this.precheckBehavior == null)
1042              this.precheckBehavior = new Enumeration<ActionPrecheckBehavior>(new ActionPrecheckBehaviorEnumFactory());
1043            this.precheckBehavior.setValue(value);
1044          }
1045          return this;
1046        }
1047
1048        /**
1049         * @return {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value
1050         */
1051        public Enumeration<ActionCardinalityBehavior> getCardinalityBehaviorElement() { 
1052          if (this.cardinalityBehavior == null)
1053            if (Configuration.errorOnAutoCreate())
1054              throw new Error("Attempt to auto-create RequestGroupActionComponent.cardinalityBehavior");
1055            else if (Configuration.doAutoCreate())
1056              this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory()); // bb
1057          return this.cardinalityBehavior;
1058        }
1059
1060        public boolean hasCardinalityBehaviorElement() { 
1061          return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty();
1062        }
1063
1064        public boolean hasCardinalityBehavior() { 
1065          return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty();
1066        }
1067
1068        /**
1069         * @param value {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value
1070         */
1071        public RequestGroupActionComponent setCardinalityBehaviorElement(Enumeration<ActionCardinalityBehavior> value) { 
1072          this.cardinalityBehavior = value;
1073          return this;
1074        }
1075
1076        /**
1077         * @return Defines whether the action can be selected multiple times.
1078         */
1079        public ActionCardinalityBehavior getCardinalityBehavior() { 
1080          return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue();
1081        }
1082
1083        /**
1084         * @param value Defines whether the action can be selected multiple times.
1085         */
1086        public RequestGroupActionComponent setCardinalityBehavior(ActionCardinalityBehavior value) { 
1087          if (value == null)
1088            this.cardinalityBehavior = null;
1089          else {
1090            if (this.cardinalityBehavior == null)
1091              this.cardinalityBehavior = new Enumeration<ActionCardinalityBehavior>(new ActionCardinalityBehaviorEnumFactory());
1092            this.cardinalityBehavior.setValue(value);
1093          }
1094          return this;
1095        }
1096
1097        /**
1098         * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).)
1099         */
1100        public Reference getResource() { 
1101          if (this.resource == null)
1102            if (Configuration.errorOnAutoCreate())
1103              throw new Error("Attempt to auto-create RequestGroupActionComponent.resource");
1104            else if (Configuration.doAutoCreate())
1105              this.resource = new Reference(); // cc
1106          return this.resource;
1107        }
1108
1109        public boolean hasResource() { 
1110          return this.resource != null && !this.resource.isEmpty();
1111        }
1112
1113        /**
1114         * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).)
1115         */
1116        public RequestGroupActionComponent setResource(Reference value) { 
1117          this.resource = value;
1118          return this;
1119        }
1120
1121        /**
1122         * @return {@link #action} (Sub actions.)
1123         */
1124        public List<RequestGroupActionComponent> getAction() { 
1125          if (this.action == null)
1126            this.action = new ArrayList<RequestGroupActionComponent>();
1127          return this.action;
1128        }
1129
1130        /**
1131         * @return Returns a reference to <code>this</code> for easy method chaining
1132         */
1133        public RequestGroupActionComponent setAction(List<RequestGroupActionComponent> theAction) { 
1134          this.action = theAction;
1135          return this;
1136        }
1137
1138        public boolean hasAction() { 
1139          if (this.action == null)
1140            return false;
1141          for (RequestGroupActionComponent item : this.action)
1142            if (!item.isEmpty())
1143              return true;
1144          return false;
1145        }
1146
1147        public RequestGroupActionComponent addAction() { //3
1148          RequestGroupActionComponent t = new RequestGroupActionComponent();
1149          if (this.action == null)
1150            this.action = new ArrayList<RequestGroupActionComponent>();
1151          this.action.add(t);
1152          return t;
1153        }
1154
1155        public RequestGroupActionComponent addAction(RequestGroupActionComponent t) { //3
1156          if (t == null)
1157            return this;
1158          if (this.action == null)
1159            this.action = new ArrayList<RequestGroupActionComponent>();
1160          this.action.add(t);
1161          return this;
1162        }
1163
1164        /**
1165         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist {3}
1166         */
1167        public RequestGroupActionComponent getActionFirstRep() { 
1168          if (getAction().isEmpty()) {
1169            addAction();
1170          }
1171          return getAction().get(0);
1172        }
1173
1174        protected void listChildren(List<Property> children) {
1175          super.listChildren(children);
1176          children.add(new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix));
1177          children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title));
1178          children.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description));
1179          children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent));
1180          children.add(new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority));
1181          children.add(new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code));
1182          children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation));
1183          children.add(new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition));
1184          children.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction));
1185          children.add(new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing));
1186          children.add(new Property("participant", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Device)", "The participant that should perform or be responsible for this action.", 0, java.lang.Integer.MAX_VALUE, participant));
1187          children.add(new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type));
1188          children.add(new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior));
1189          children.add(new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior));
1190          children.add(new Property("requiredBehavior", "code", "Defines expectations around whether an action is required.", 0, 1, requiredBehavior));
1191          children.add(new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior));
1192          children.add(new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior));
1193          children.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, 1, resource));
1194          children.add(new Property("action", "@RequestGroup.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, action));
1195        }
1196
1197        @Override
1198        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1199          switch (_hash) {
1200          case -980110702: /*prefix*/  return new Property("prefix", "string", "A user-visible prefix for the action.", 0, 1, prefix);
1201          case 110371416: /*title*/  return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title);
1202          case -1724546052: /*description*/  return new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description);
1203          case -900391049: /*textEquivalent*/  return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.", 0, 1, textEquivalent);
1204          case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the action should be addressed with respect to other actions.", 0, 1, priority);
1205          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code);
1206          case 1587405498: /*documentation*/  return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation);
1207          case -861311717: /*condition*/  return new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition);
1208          case -384107967: /*relatedAction*/  return new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction);
1209          case 164632566: /*timing[x]*/  return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
1210          case -873664438: /*timing*/  return new Property("timing[x]", "dateTime|Age|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
1211          case -1837458939: /*timingDateTime*/  return new Property("timing[x]", "dateTime", "An optional value describing when the action should be performed.", 0, 1, timing);
1212          case 164607061: /*timingAge*/  return new Property("timing[x]", "Age", "An optional value describing when the action should be performed.", 0, 1, timing);
1213          case -615615829: /*timingPeriod*/  return new Property("timing[x]", "Period", "An optional value describing when the action should be performed.", 0, 1, timing);
1214          case -1327253506: /*timingDuration*/  return new Property("timing[x]", "Duration", "An optional value describing when the action should be performed.", 0, 1, timing);
1215          case -710871277: /*timingRange*/  return new Property("timing[x]", "Range", "An optional value describing when the action should be performed.", 0, 1, timing);
1216          case -497554124: /*timingTiming*/  return new Property("timing[x]", "Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
1217          case 767422259: /*participant*/  return new Property("participant", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Device)", "The participant that should perform or be responsible for this action.", 0, java.lang.Integer.MAX_VALUE, participant);
1218          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The type of action to perform (create, update, remove).", 0, 1, type);
1219          case 586678389: /*groupingBehavior*/  return new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior);
1220          case 168639486: /*selectionBehavior*/  return new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior);
1221          case -1163906287: /*requiredBehavior*/  return new Property("requiredBehavior", "code", "Defines expectations around whether an action is required.", 0, 1, requiredBehavior);
1222          case -1174249033: /*precheckBehavior*/  return new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior);
1223          case -922577408: /*cardinalityBehavior*/  return new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior);
1224          case -341064690: /*resource*/  return new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, 1, resource);
1225          case -1422950858: /*action*/  return new Property("action", "@RequestGroup.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, action);
1226          default: return super.getNamedProperty(_hash, _name, _checkValid);
1227          }
1228
1229        }
1230
1231      @Override
1232      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1233        switch (hash) {
1234        case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType
1235        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1236        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1237        case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType
1238        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
1239        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
1240        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact
1241        case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // RequestGroupActionConditionComponent
1242        case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : this.relatedAction.toArray(new Base[this.relatedAction.size()]); // RequestGroupActionRelatedActionComponent
1243        case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // DataType
1244        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // Reference
1245        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1246        case 586678389: /*groupingBehavior*/ return this.groupingBehavior == null ? new Base[0] : new Base[] {this.groupingBehavior}; // Enumeration<ActionGroupingBehavior>
1247        case 168639486: /*selectionBehavior*/ return this.selectionBehavior == null ? new Base[0] : new Base[] {this.selectionBehavior}; // Enumeration<ActionSelectionBehavior>
1248        case -1163906287: /*requiredBehavior*/ return this.requiredBehavior == null ? new Base[0] : new Base[] {this.requiredBehavior}; // Enumeration<ActionRequiredBehavior>
1249        case -1174249033: /*precheckBehavior*/ return this.precheckBehavior == null ? new Base[0] : new Base[] {this.precheckBehavior}; // Enumeration<ActionPrecheckBehavior>
1250        case -922577408: /*cardinalityBehavior*/ return this.cardinalityBehavior == null ? new Base[0] : new Base[] {this.cardinalityBehavior}; // Enumeration<ActionCardinalityBehavior>
1251        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
1252        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // RequestGroupActionComponent
1253        default: return super.getProperty(hash, name, checkValid);
1254        }
1255
1256      }
1257
1258      @Override
1259      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1260        switch (hash) {
1261        case -980110702: // prefix
1262          this.prefix = TypeConvertor.castToString(value); // StringType
1263          return value;
1264        case 110371416: // title
1265          this.title = TypeConvertor.castToString(value); // StringType
1266          return value;
1267        case -1724546052: // description
1268          this.description = TypeConvertor.castToString(value); // StringType
1269          return value;
1270        case -900391049: // textEquivalent
1271          this.textEquivalent = TypeConvertor.castToString(value); // StringType
1272          return value;
1273        case -1165461084: // priority
1274          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1275          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1276          return value;
1277        case 3059181: // code
1278          this.getCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1279          return value;
1280        case 1587405498: // documentation
1281          this.getDocumentation().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
1282          return value;
1283        case -861311717: // condition
1284          this.getCondition().add((RequestGroupActionConditionComponent) value); // RequestGroupActionConditionComponent
1285          return value;
1286        case -384107967: // relatedAction
1287          this.getRelatedAction().add((RequestGroupActionRelatedActionComponent) value); // RequestGroupActionRelatedActionComponent
1288          return value;
1289        case -873664438: // timing
1290          this.timing = TypeConvertor.castToType(value); // DataType
1291          return value;
1292        case 767422259: // participant
1293          this.getParticipant().add(TypeConvertor.castToReference(value)); // Reference
1294          return value;
1295        case 3575610: // type
1296          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1297          return value;
1298        case 586678389: // groupingBehavior
1299          value = new ActionGroupingBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1300          this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior>
1301          return value;
1302        case 168639486: // selectionBehavior
1303          value = new ActionSelectionBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1304          this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior>
1305          return value;
1306        case -1163906287: // requiredBehavior
1307          value = new ActionRequiredBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1308          this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior>
1309          return value;
1310        case -1174249033: // precheckBehavior
1311          value = new ActionPrecheckBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1312          this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior>
1313          return value;
1314        case -922577408: // cardinalityBehavior
1315          value = new ActionCardinalityBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1316          this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior>
1317          return value;
1318        case -341064690: // resource
1319          this.resource = TypeConvertor.castToReference(value); // Reference
1320          return value;
1321        case -1422950858: // action
1322          this.getAction().add((RequestGroupActionComponent) value); // RequestGroupActionComponent
1323          return value;
1324        default: return super.setProperty(hash, name, value);
1325        }
1326
1327      }
1328
1329      @Override
1330      public Base setProperty(String name, Base value) throws FHIRException {
1331        if (name.equals("prefix")) {
1332          this.prefix = TypeConvertor.castToString(value); // StringType
1333        } else if (name.equals("title")) {
1334          this.title = TypeConvertor.castToString(value); // StringType
1335        } else if (name.equals("description")) {
1336          this.description = TypeConvertor.castToString(value); // StringType
1337        } else if (name.equals("textEquivalent")) {
1338          this.textEquivalent = TypeConvertor.castToString(value); // StringType
1339        } else if (name.equals("priority")) {
1340          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1341          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1342        } else if (name.equals("code")) {
1343          this.getCode().add(TypeConvertor.castToCodeableConcept(value));
1344        } else if (name.equals("documentation")) {
1345          this.getDocumentation().add(TypeConvertor.castToRelatedArtifact(value));
1346        } else if (name.equals("condition")) {
1347          this.getCondition().add((RequestGroupActionConditionComponent) value);
1348        } else if (name.equals("relatedAction")) {
1349          this.getRelatedAction().add((RequestGroupActionRelatedActionComponent) value);
1350        } else if (name.equals("timing[x]")) {
1351          this.timing = TypeConvertor.castToType(value); // DataType
1352        } else if (name.equals("participant")) {
1353          this.getParticipant().add(TypeConvertor.castToReference(value));
1354        } else if (name.equals("type")) {
1355          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1356        } else if (name.equals("groupingBehavior")) {
1357          value = new ActionGroupingBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1358          this.groupingBehavior = (Enumeration) value; // Enumeration<ActionGroupingBehavior>
1359        } else if (name.equals("selectionBehavior")) {
1360          value = new ActionSelectionBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1361          this.selectionBehavior = (Enumeration) value; // Enumeration<ActionSelectionBehavior>
1362        } else if (name.equals("requiredBehavior")) {
1363          value = new ActionRequiredBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1364          this.requiredBehavior = (Enumeration) value; // Enumeration<ActionRequiredBehavior>
1365        } else if (name.equals("precheckBehavior")) {
1366          value = new ActionPrecheckBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1367          this.precheckBehavior = (Enumeration) value; // Enumeration<ActionPrecheckBehavior>
1368        } else if (name.equals("cardinalityBehavior")) {
1369          value = new ActionCardinalityBehaviorEnumFactory().fromType(TypeConvertor.castToCode(value));
1370          this.cardinalityBehavior = (Enumeration) value; // Enumeration<ActionCardinalityBehavior>
1371        } else if (name.equals("resource")) {
1372          this.resource = TypeConvertor.castToReference(value); // Reference
1373        } else if (name.equals("action")) {
1374          this.getAction().add((RequestGroupActionComponent) value);
1375        } else
1376          return super.setProperty(name, value);
1377        return value;
1378      }
1379
1380      @Override
1381      public Base makeProperty(int hash, String name) throws FHIRException {
1382        switch (hash) {
1383        case -980110702:  return getPrefixElement();
1384        case 110371416:  return getTitleElement();
1385        case -1724546052:  return getDescriptionElement();
1386        case -900391049:  return getTextEquivalentElement();
1387        case -1165461084:  return getPriorityElement();
1388        case 3059181:  return addCode(); 
1389        case 1587405498:  return addDocumentation(); 
1390        case -861311717:  return addCondition(); 
1391        case -384107967:  return addRelatedAction(); 
1392        case 164632566:  return getTiming();
1393        case -873664438:  return getTiming();
1394        case 767422259:  return addParticipant(); 
1395        case 3575610:  return getType();
1396        case 586678389:  return getGroupingBehaviorElement();
1397        case 168639486:  return getSelectionBehaviorElement();
1398        case -1163906287:  return getRequiredBehaviorElement();
1399        case -1174249033:  return getPrecheckBehaviorElement();
1400        case -922577408:  return getCardinalityBehaviorElement();
1401        case -341064690:  return getResource();
1402        case -1422950858:  return addAction(); 
1403        default: return super.makeProperty(hash, name);
1404        }
1405
1406      }
1407
1408      @Override
1409      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1410        switch (hash) {
1411        case -980110702: /*prefix*/ return new String[] {"string"};
1412        case 110371416: /*title*/ return new String[] {"string"};
1413        case -1724546052: /*description*/ return new String[] {"string"};
1414        case -900391049: /*textEquivalent*/ return new String[] {"string"};
1415        case -1165461084: /*priority*/ return new String[] {"code"};
1416        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1417        case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"};
1418        case -861311717: /*condition*/ return new String[] {};
1419        case -384107967: /*relatedAction*/ return new String[] {};
1420        case -873664438: /*timing*/ return new String[] {"dateTime", "Age", "Period", "Duration", "Range", "Timing"};
1421        case 767422259: /*participant*/ return new String[] {"Reference"};
1422        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1423        case 586678389: /*groupingBehavior*/ return new String[] {"code"};
1424        case 168639486: /*selectionBehavior*/ return new String[] {"code"};
1425        case -1163906287: /*requiredBehavior*/ return new String[] {"code"};
1426        case -1174249033: /*precheckBehavior*/ return new String[] {"code"};
1427        case -922577408: /*cardinalityBehavior*/ return new String[] {"code"};
1428        case -341064690: /*resource*/ return new String[] {"Reference"};
1429        case -1422950858: /*action*/ return new String[] {"@RequestGroup.action"};
1430        default: return super.getTypesForProperty(hash, name);
1431        }
1432
1433      }
1434
1435      @Override
1436      public Base addChild(String name) throws FHIRException {
1437        if (name.equals("prefix")) {
1438          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.prefix");
1439        }
1440        else if (name.equals("title")) {
1441          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.title");
1442        }
1443        else if (name.equals("description")) {
1444          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.description");
1445        }
1446        else if (name.equals("textEquivalent")) {
1447          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.textEquivalent");
1448        }
1449        else if (name.equals("priority")) {
1450          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.priority");
1451        }
1452        else if (name.equals("code")) {
1453          return addCode();
1454        }
1455        else if (name.equals("documentation")) {
1456          return addDocumentation();
1457        }
1458        else if (name.equals("condition")) {
1459          return addCondition();
1460        }
1461        else if (name.equals("relatedAction")) {
1462          return addRelatedAction();
1463        }
1464        else if (name.equals("timingDateTime")) {
1465          this.timing = new DateTimeType();
1466          return this.timing;
1467        }
1468        else if (name.equals("timingAge")) {
1469          this.timing = new Age();
1470          return this.timing;
1471        }
1472        else if (name.equals("timingPeriod")) {
1473          this.timing = new Period();
1474          return this.timing;
1475        }
1476        else if (name.equals("timingDuration")) {
1477          this.timing = new Duration();
1478          return this.timing;
1479        }
1480        else if (name.equals("timingRange")) {
1481          this.timing = new Range();
1482          return this.timing;
1483        }
1484        else if (name.equals("timingTiming")) {
1485          this.timing = new Timing();
1486          return this.timing;
1487        }
1488        else if (name.equals("participant")) {
1489          return addParticipant();
1490        }
1491        else if (name.equals("type")) {
1492          this.type = new CodeableConcept();
1493          return this.type;
1494        }
1495        else if (name.equals("groupingBehavior")) {
1496          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.groupingBehavior");
1497        }
1498        else if (name.equals("selectionBehavior")) {
1499          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.selectionBehavior");
1500        }
1501        else if (name.equals("requiredBehavior")) {
1502          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.requiredBehavior");
1503        }
1504        else if (name.equals("precheckBehavior")) {
1505          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.precheckBehavior");
1506        }
1507        else if (name.equals("cardinalityBehavior")) {
1508          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.cardinalityBehavior");
1509        }
1510        else if (name.equals("resource")) {
1511          this.resource = new Reference();
1512          return this.resource;
1513        }
1514        else if (name.equals("action")) {
1515          return addAction();
1516        }
1517        else
1518          return super.addChild(name);
1519      }
1520
1521      public RequestGroupActionComponent copy() {
1522        RequestGroupActionComponent dst = new RequestGroupActionComponent();
1523        copyValues(dst);
1524        return dst;
1525      }
1526
1527      public void copyValues(RequestGroupActionComponent dst) {
1528        super.copyValues(dst);
1529        dst.prefix = prefix == null ? null : prefix.copy();
1530        dst.title = title == null ? null : title.copy();
1531        dst.description = description == null ? null : description.copy();
1532        dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy();
1533        dst.priority = priority == null ? null : priority.copy();
1534        if (code != null) {
1535          dst.code = new ArrayList<CodeableConcept>();
1536          for (CodeableConcept i : code)
1537            dst.code.add(i.copy());
1538        };
1539        if (documentation != null) {
1540          dst.documentation = new ArrayList<RelatedArtifact>();
1541          for (RelatedArtifact i : documentation)
1542            dst.documentation.add(i.copy());
1543        };
1544        if (condition != null) {
1545          dst.condition = new ArrayList<RequestGroupActionConditionComponent>();
1546          for (RequestGroupActionConditionComponent i : condition)
1547            dst.condition.add(i.copy());
1548        };
1549        if (relatedAction != null) {
1550          dst.relatedAction = new ArrayList<RequestGroupActionRelatedActionComponent>();
1551          for (RequestGroupActionRelatedActionComponent i : relatedAction)
1552            dst.relatedAction.add(i.copy());
1553        };
1554        dst.timing = timing == null ? null : timing.copy();
1555        if (participant != null) {
1556          dst.participant = new ArrayList<Reference>();
1557          for (Reference i : participant)
1558            dst.participant.add(i.copy());
1559        };
1560        dst.type = type == null ? null : type.copy();
1561        dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy();
1562        dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy();
1563        dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy();
1564        dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy();
1565        dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy();
1566        dst.resource = resource == null ? null : resource.copy();
1567        if (action != null) {
1568          dst.action = new ArrayList<RequestGroupActionComponent>();
1569          for (RequestGroupActionComponent i : action)
1570            dst.action.add(i.copy());
1571        };
1572      }
1573
1574      @Override
1575      public boolean equalsDeep(Base other_) {
1576        if (!super.equalsDeep(other_))
1577          return false;
1578        if (!(other_ instanceof RequestGroupActionComponent))
1579          return false;
1580        RequestGroupActionComponent o = (RequestGroupActionComponent) other_;
1581        return compareDeep(prefix, o.prefix, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true)
1582           && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(priority, o.priority, true)
1583           && compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true) && compareDeep(condition, o.condition, true)
1584           && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true)
1585           && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true)
1586           && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true)
1587           && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(resource, o.resource, true)
1588           && compareDeep(action, o.action, true);
1589      }
1590
1591      @Override
1592      public boolean equalsShallow(Base other_) {
1593        if (!super.equalsShallow(other_))
1594          return false;
1595        if (!(other_ instanceof RequestGroupActionComponent))
1596          return false;
1597        RequestGroupActionComponent o = (RequestGroupActionComponent) other_;
1598        return compareValues(prefix, o.prefix, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true)
1599           && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(priority, o.priority, true)
1600           && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true)
1601           && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true)
1602           && compareValues(cardinalityBehavior, o.cardinalityBehavior, true);
1603      }
1604
1605      public boolean isEmpty() {
1606        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(prefix, title, description
1607          , textEquivalent, priority, code, documentation, condition, relatedAction, timing
1608          , participant, type, groupingBehavior, selectionBehavior, requiredBehavior, precheckBehavior
1609          , cardinalityBehavior, resource, action);
1610      }
1611
1612  public String fhirType() {
1613    return "RequestGroup.action";
1614
1615  }
1616
1617  }
1618
1619    @Block()
1620    public static class RequestGroupActionConditionComponent extends BackboneElement implements IBaseBackboneElement {
1621        /**
1622         * The kind of condition.
1623         */
1624        @Child(name = "kind", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1625        @Description(shortDefinition="applicability | start | stop", formalDefinition="The kind of condition." )
1626        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-condition-kind")
1627        protected Enumeration<ActionConditionKind> kind;
1628
1629        /**
1630         * An expression that returns true or false, indicating whether or not the condition is satisfied.
1631         */
1632        @Child(name = "expression", type = {Expression.class}, order=2, min=0, max=1, modifier=false, summary=false)
1633        @Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether or not the condition is satisfied." )
1634        protected Expression expression;
1635
1636        private static final long serialVersionUID = -455150438L;
1637
1638    /**
1639     * Constructor
1640     */
1641      public RequestGroupActionConditionComponent() {
1642        super();
1643      }
1644
1645    /**
1646     * Constructor
1647     */
1648      public RequestGroupActionConditionComponent(ActionConditionKind kind) {
1649        super();
1650        this.setKind(kind);
1651      }
1652
1653        /**
1654         * @return {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1655         */
1656        public Enumeration<ActionConditionKind> getKindElement() { 
1657          if (this.kind == null)
1658            if (Configuration.errorOnAutoCreate())
1659              throw new Error("Attempt to auto-create RequestGroupActionConditionComponent.kind");
1660            else if (Configuration.doAutoCreate())
1661              this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory()); // bb
1662          return this.kind;
1663        }
1664
1665        public boolean hasKindElement() { 
1666          return this.kind != null && !this.kind.isEmpty();
1667        }
1668
1669        public boolean hasKind() { 
1670          return this.kind != null && !this.kind.isEmpty();
1671        }
1672
1673        /**
1674         * @param value {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1675         */
1676        public RequestGroupActionConditionComponent setKindElement(Enumeration<ActionConditionKind> value) { 
1677          this.kind = value;
1678          return this;
1679        }
1680
1681        /**
1682         * @return The kind of condition.
1683         */
1684        public ActionConditionKind getKind() { 
1685          return this.kind == null ? null : this.kind.getValue();
1686        }
1687
1688        /**
1689         * @param value The kind of condition.
1690         */
1691        public RequestGroupActionConditionComponent setKind(ActionConditionKind value) { 
1692            if (this.kind == null)
1693              this.kind = new Enumeration<ActionConditionKind>(new ActionConditionKindEnumFactory());
1694            this.kind.setValue(value);
1695          return this;
1696        }
1697
1698        /**
1699         * @return {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.)
1700         */
1701        public Expression getExpression() { 
1702          if (this.expression == null)
1703            if (Configuration.errorOnAutoCreate())
1704              throw new Error("Attempt to auto-create RequestGroupActionConditionComponent.expression");
1705            else if (Configuration.doAutoCreate())
1706              this.expression = new Expression(); // cc
1707          return this.expression;
1708        }
1709
1710        public boolean hasExpression() { 
1711          return this.expression != null && !this.expression.isEmpty();
1712        }
1713
1714        /**
1715         * @param value {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.)
1716         */
1717        public RequestGroupActionConditionComponent setExpression(Expression value) { 
1718          this.expression = value;
1719          return this;
1720        }
1721
1722        protected void listChildren(List<Property> children) {
1723          super.listChildren(children);
1724          children.add(new Property("kind", "code", "The kind of condition.", 0, 1, kind));
1725          children.add(new Property("expression", "Expression", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression));
1726        }
1727
1728        @Override
1729        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1730          switch (_hash) {
1731          case 3292052: /*kind*/  return new Property("kind", "code", "The kind of condition.", 0, 1, kind);
1732          case -1795452264: /*expression*/  return new Property("expression", "Expression", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression);
1733          default: return super.getNamedProperty(_hash, _name, _checkValid);
1734          }
1735
1736        }
1737
1738      @Override
1739      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1740        switch (hash) {
1741        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<ActionConditionKind>
1742        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // Expression
1743        default: return super.getProperty(hash, name, checkValid);
1744        }
1745
1746      }
1747
1748      @Override
1749      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1750        switch (hash) {
1751        case 3292052: // kind
1752          value = new ActionConditionKindEnumFactory().fromType(TypeConvertor.castToCode(value));
1753          this.kind = (Enumeration) value; // Enumeration<ActionConditionKind>
1754          return value;
1755        case -1795452264: // expression
1756          this.expression = TypeConvertor.castToExpression(value); // Expression
1757          return value;
1758        default: return super.setProperty(hash, name, value);
1759        }
1760
1761      }
1762
1763      @Override
1764      public Base setProperty(String name, Base value) throws FHIRException {
1765        if (name.equals("kind")) {
1766          value = new ActionConditionKindEnumFactory().fromType(TypeConvertor.castToCode(value));
1767          this.kind = (Enumeration) value; // Enumeration<ActionConditionKind>
1768        } else if (name.equals("expression")) {
1769          this.expression = TypeConvertor.castToExpression(value); // Expression
1770        } else
1771          return super.setProperty(name, value);
1772        return value;
1773      }
1774
1775      @Override
1776      public Base makeProperty(int hash, String name) throws FHIRException {
1777        switch (hash) {
1778        case 3292052:  return getKindElement();
1779        case -1795452264:  return getExpression();
1780        default: return super.makeProperty(hash, name);
1781        }
1782
1783      }
1784
1785      @Override
1786      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1787        switch (hash) {
1788        case 3292052: /*kind*/ return new String[] {"code"};
1789        case -1795452264: /*expression*/ return new String[] {"Expression"};
1790        default: return super.getTypesForProperty(hash, name);
1791        }
1792
1793      }
1794
1795      @Override
1796      public Base addChild(String name) throws FHIRException {
1797        if (name.equals("kind")) {
1798          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.condition.kind");
1799        }
1800        else if (name.equals("expression")) {
1801          this.expression = new Expression();
1802          return this.expression;
1803        }
1804        else
1805          return super.addChild(name);
1806      }
1807
1808      public RequestGroupActionConditionComponent copy() {
1809        RequestGroupActionConditionComponent dst = new RequestGroupActionConditionComponent();
1810        copyValues(dst);
1811        return dst;
1812      }
1813
1814      public void copyValues(RequestGroupActionConditionComponent dst) {
1815        super.copyValues(dst);
1816        dst.kind = kind == null ? null : kind.copy();
1817        dst.expression = expression == null ? null : expression.copy();
1818      }
1819
1820      @Override
1821      public boolean equalsDeep(Base other_) {
1822        if (!super.equalsDeep(other_))
1823          return false;
1824        if (!(other_ instanceof RequestGroupActionConditionComponent))
1825          return false;
1826        RequestGroupActionConditionComponent o = (RequestGroupActionConditionComponent) other_;
1827        return compareDeep(kind, o.kind, true) && compareDeep(expression, o.expression, true);
1828      }
1829
1830      @Override
1831      public boolean equalsShallow(Base other_) {
1832        if (!super.equalsShallow(other_))
1833          return false;
1834        if (!(other_ instanceof RequestGroupActionConditionComponent))
1835          return false;
1836        RequestGroupActionConditionComponent o = (RequestGroupActionConditionComponent) other_;
1837        return compareValues(kind, o.kind, true);
1838      }
1839
1840      public boolean isEmpty() {
1841        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, expression);
1842      }
1843
1844  public String fhirType() {
1845    return "RequestGroup.action.condition";
1846
1847  }
1848
1849  }
1850
1851    @Block()
1852    public static class RequestGroupActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement {
1853        /**
1854         * The element id of the action this is related to.
1855         */
1856        @Child(name = "actionId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1857        @Description(shortDefinition="What action this is related to", formalDefinition="The element id of the action this is related to." )
1858        protected IdType actionId;
1859
1860        /**
1861         * The relationship of this action to the related action.
1862         */
1863        @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1864        @Description(shortDefinition="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end", formalDefinition="The relationship of this action to the related action." )
1865        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-relationship-type")
1866        protected Enumeration<ActionRelationshipType> relationship;
1867
1868        /**
1869         * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.
1870         */
1871        @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false)
1872        @Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." )
1873        protected DataType offset;
1874
1875        private static final long serialVersionUID = 621784796L;
1876
1877    /**
1878     * Constructor
1879     */
1880      public RequestGroupActionRelatedActionComponent() {
1881        super();
1882      }
1883
1884    /**
1885     * Constructor
1886     */
1887      public RequestGroupActionRelatedActionComponent(String actionId, ActionRelationshipType relationship) {
1888        super();
1889        this.setActionId(actionId);
1890        this.setRelationship(relationship);
1891      }
1892
1893        /**
1894         * @return {@link #actionId} (The element id of the action this is related to.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value
1895         */
1896        public IdType getActionIdElement() { 
1897          if (this.actionId == null)
1898            if (Configuration.errorOnAutoCreate())
1899              throw new Error("Attempt to auto-create RequestGroupActionRelatedActionComponent.actionId");
1900            else if (Configuration.doAutoCreate())
1901              this.actionId = new IdType(); // bb
1902          return this.actionId;
1903        }
1904
1905        public boolean hasActionIdElement() { 
1906          return this.actionId != null && !this.actionId.isEmpty();
1907        }
1908
1909        public boolean hasActionId() { 
1910          return this.actionId != null && !this.actionId.isEmpty();
1911        }
1912
1913        /**
1914         * @param value {@link #actionId} (The element id of the action this is related to.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value
1915         */
1916        public RequestGroupActionRelatedActionComponent setActionIdElement(IdType value) { 
1917          this.actionId = value;
1918          return this;
1919        }
1920
1921        /**
1922         * @return The element id of the action this is related to.
1923         */
1924        public String getActionId() { 
1925          return this.actionId == null ? null : this.actionId.getValue();
1926        }
1927
1928        /**
1929         * @param value The element id of the action this is related to.
1930         */
1931        public RequestGroupActionRelatedActionComponent setActionId(String value) { 
1932            if (this.actionId == null)
1933              this.actionId = new IdType();
1934            this.actionId.setValue(value);
1935          return this;
1936        }
1937
1938        /**
1939         * @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
1940         */
1941        public Enumeration<ActionRelationshipType> getRelationshipElement() { 
1942          if (this.relationship == null)
1943            if (Configuration.errorOnAutoCreate())
1944              throw new Error("Attempt to auto-create RequestGroupActionRelatedActionComponent.relationship");
1945            else if (Configuration.doAutoCreate())
1946              this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory()); // bb
1947          return this.relationship;
1948        }
1949
1950        public boolean hasRelationshipElement() { 
1951          return this.relationship != null && !this.relationship.isEmpty();
1952        }
1953
1954        public boolean hasRelationship() { 
1955          return this.relationship != null && !this.relationship.isEmpty();
1956        }
1957
1958        /**
1959         * @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
1960         */
1961        public RequestGroupActionRelatedActionComponent setRelationshipElement(Enumeration<ActionRelationshipType> value) { 
1962          this.relationship = value;
1963          return this;
1964        }
1965
1966        /**
1967         * @return The relationship of this action to the related action.
1968         */
1969        public ActionRelationshipType getRelationship() { 
1970          return this.relationship == null ? null : this.relationship.getValue();
1971        }
1972
1973        /**
1974         * @param value The relationship of this action to the related action.
1975         */
1976        public RequestGroupActionRelatedActionComponent setRelationship(ActionRelationshipType value) { 
1977            if (this.relationship == null)
1978              this.relationship = new Enumeration<ActionRelationshipType>(new ActionRelationshipTypeEnumFactory());
1979            this.relationship.setValue(value);
1980          return this;
1981        }
1982
1983        /**
1984         * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
1985         */
1986        public DataType getOffset() { 
1987          return this.offset;
1988        }
1989
1990        /**
1991         * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
1992         */
1993        public Duration getOffsetDuration() throws FHIRException { 
1994          if (this.offset == null)
1995            this.offset = new Duration();
1996          if (!(this.offset instanceof Duration))
1997            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered");
1998          return (Duration) this.offset;
1999        }
2000
2001        public boolean hasOffsetDuration() { 
2002          return this != null && this.offset instanceof Duration;
2003        }
2004
2005        /**
2006         * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
2007         */
2008        public Range getOffsetRange() throws FHIRException { 
2009          if (this.offset == null)
2010            this.offset = new Range();
2011          if (!(this.offset instanceof Range))
2012            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered");
2013          return (Range) this.offset;
2014        }
2015
2016        public boolean hasOffsetRange() { 
2017          return this != null && this.offset instanceof Range;
2018        }
2019
2020        public boolean hasOffset() { 
2021          return this.offset != null && !this.offset.isEmpty();
2022        }
2023
2024        /**
2025         * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
2026         */
2027        public RequestGroupActionRelatedActionComponent setOffset(DataType value) { 
2028          if (value != null && !(value instanceof Duration || value instanceof Range))
2029            throw new Error("Not the right type for RequestGroup.action.relatedAction.offset[x]: "+value.fhirType());
2030          this.offset = value;
2031          return this;
2032        }
2033
2034        protected void listChildren(List<Property> children) {
2035          super.listChildren(children);
2036          children.add(new Property("actionId", "id", "The element id of the action this is related to.", 0, 1, actionId));
2037          children.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship));
2038          children.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset));
2039        }
2040
2041        @Override
2042        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2043          switch (_hash) {
2044          case -1656172047: /*actionId*/  return new Property("actionId", "id", "The element id of the action this is related to.", 0, 1, actionId);
2045          case -261851592: /*relationship*/  return new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship);
2046          case -1960684787: /*offset[x]*/  return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
2047          case -1019779949: /*offset*/  return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
2048          case 134075207: /*offsetDuration*/  return new Property("offset[x]", "Duration", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
2049          case 1263585386: /*offsetRange*/  return new Property("offset[x]", "Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
2050          default: return super.getNamedProperty(_hash, _name, _checkValid);
2051          }
2052
2053        }
2054
2055      @Override
2056      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2057        switch (hash) {
2058        case -1656172047: /*actionId*/ return this.actionId == null ? new Base[0] : new Base[] {this.actionId}; // IdType
2059        case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType>
2060        case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // DataType
2061        default: return super.getProperty(hash, name, checkValid);
2062        }
2063
2064      }
2065
2066      @Override
2067      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2068        switch (hash) {
2069        case -1656172047: // actionId
2070          this.actionId = TypeConvertor.castToId(value); // IdType
2071          return value;
2072        case -261851592: // relationship
2073          value = new ActionRelationshipTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
2074          this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType>
2075          return value;
2076        case -1019779949: // offset
2077          this.offset = TypeConvertor.castToType(value); // DataType
2078          return value;
2079        default: return super.setProperty(hash, name, value);
2080        }
2081
2082      }
2083
2084      @Override
2085      public Base setProperty(String name, Base value) throws FHIRException {
2086        if (name.equals("actionId")) {
2087          this.actionId = TypeConvertor.castToId(value); // IdType
2088        } else if (name.equals("relationship")) {
2089          value = new ActionRelationshipTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
2090          this.relationship = (Enumeration) value; // Enumeration<ActionRelationshipType>
2091        } else if (name.equals("offset[x]")) {
2092          this.offset = TypeConvertor.castToType(value); // DataType
2093        } else
2094          return super.setProperty(name, value);
2095        return value;
2096      }
2097
2098      @Override
2099      public Base makeProperty(int hash, String name) throws FHIRException {
2100        switch (hash) {
2101        case -1656172047:  return getActionIdElement();
2102        case -261851592:  return getRelationshipElement();
2103        case -1960684787:  return getOffset();
2104        case -1019779949:  return getOffset();
2105        default: return super.makeProperty(hash, name);
2106        }
2107
2108      }
2109
2110      @Override
2111      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2112        switch (hash) {
2113        case -1656172047: /*actionId*/ return new String[] {"id"};
2114        case -261851592: /*relationship*/ return new String[] {"code"};
2115        case -1019779949: /*offset*/ return new String[] {"Duration", "Range"};
2116        default: return super.getTypesForProperty(hash, name);
2117        }
2118
2119      }
2120
2121      @Override
2122      public Base addChild(String name) throws FHIRException {
2123        if (name.equals("actionId")) {
2124          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.relatedAction.actionId");
2125        }
2126        else if (name.equals("relationship")) {
2127          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.action.relatedAction.relationship");
2128        }
2129        else if (name.equals("offsetDuration")) {
2130          this.offset = new Duration();
2131          return this.offset;
2132        }
2133        else if (name.equals("offsetRange")) {
2134          this.offset = new Range();
2135          return this.offset;
2136        }
2137        else
2138          return super.addChild(name);
2139      }
2140
2141      public RequestGroupActionRelatedActionComponent copy() {
2142        RequestGroupActionRelatedActionComponent dst = new RequestGroupActionRelatedActionComponent();
2143        copyValues(dst);
2144        return dst;
2145      }
2146
2147      public void copyValues(RequestGroupActionRelatedActionComponent dst) {
2148        super.copyValues(dst);
2149        dst.actionId = actionId == null ? null : actionId.copy();
2150        dst.relationship = relationship == null ? null : relationship.copy();
2151        dst.offset = offset == null ? null : offset.copy();
2152      }
2153
2154      @Override
2155      public boolean equalsDeep(Base other_) {
2156        if (!super.equalsDeep(other_))
2157          return false;
2158        if (!(other_ instanceof RequestGroupActionRelatedActionComponent))
2159          return false;
2160        RequestGroupActionRelatedActionComponent o = (RequestGroupActionRelatedActionComponent) other_;
2161        return compareDeep(actionId, o.actionId, true) && compareDeep(relationship, o.relationship, true)
2162           && compareDeep(offset, o.offset, true);
2163      }
2164
2165      @Override
2166      public boolean equalsShallow(Base other_) {
2167        if (!super.equalsShallow(other_))
2168          return false;
2169        if (!(other_ instanceof RequestGroupActionRelatedActionComponent))
2170          return false;
2171        RequestGroupActionRelatedActionComponent o = (RequestGroupActionRelatedActionComponent) other_;
2172        return compareValues(actionId, o.actionId, true) && compareValues(relationship, o.relationship, true)
2173          ;
2174      }
2175
2176      public boolean isEmpty() {
2177        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionId, relationship, offset
2178          );
2179      }
2180
2181  public String fhirType() {
2182    return "RequestGroup.action.relatedAction";
2183
2184  }
2185
2186  }
2187
2188    /**
2189     * Allows a service to provide a unique, business identifier for the request.
2190     */
2191    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2192    @Description(shortDefinition="Business identifier", formalDefinition="Allows a service to provide a unique, business identifier for the request." )
2193    protected List<Identifier> identifier;
2194
2195    /**
2196     * A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.
2197     */
2198    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2199    @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." )
2200    protected List<CanonicalType> instantiatesCanonical;
2201
2202    /**
2203     * A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.
2204     */
2205    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2206    @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." )
2207    protected List<UriType> instantiatesUri;
2208
2209    /**
2210     * A plan, proposal or order that is fulfilled in whole or in part by this request.
2211     */
2212    @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2213    @Description(shortDefinition="Fulfills plan, proposal, or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this request." )
2214    protected List<Reference> basedOn;
2215
2216    /**
2217     * Completed or terminated request(s) whose function is taken by this new request.
2218     */
2219    @Child(name = "replaces", type = {Reference.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2220    @Description(shortDefinition="Request(s) replaced by this request", formalDefinition="Completed or terminated request(s) whose function is taken by this new request." )
2221    protected List<Reference> replaces;
2222
2223    /**
2224     * A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.
2225     */
2226    @Child(name = "groupIdentifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true)
2227    @Description(shortDefinition="Composite request this is part of", formalDefinition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form." )
2228    protected Identifier groupIdentifier;
2229
2230    /**
2231     * The current state of the request. For request groups, the status reflects the status of all the requests in the group.
2232     */
2233    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
2234    @Description(shortDefinition="draft | active | on-hold | revoked | completed | entered-in-error | unknown", formalDefinition="The current state of the request. For request groups, the status reflects the status of all the requests in the group." )
2235    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status")
2236    protected Enumeration<RequestStatus> status;
2237
2238    /**
2239     * Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.
2240     */
2241    @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true)
2242    @Description(shortDefinition="proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition="Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain." )
2243    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent")
2244    protected Enumeration<RequestIntent> intent;
2245
2246    /**
2247     * Indicates how quickly the request should be addressed with respect to other requests.
2248     */
2249    @Child(name = "priority", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
2250    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the request should be addressed with respect to other requests." )
2251    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
2252    protected Enumeration<RequestPriority> priority;
2253
2254    /**
2255     * A code that identifies what the overall request group is.
2256     */
2257    @Child(name = "code", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true)
2258    @Description(shortDefinition="What's being requested/ordered", formalDefinition="A code that identifies what the overall request group is." )
2259    protected CodeableConcept code;
2260
2261    /**
2262     * The subject for which the request group was created.
2263     */
2264    @Child(name = "subject", type = {Patient.class, Group.class}, order=10, min=0, max=1, modifier=false, summary=false)
2265    @Description(shortDefinition="Who the request group is about", formalDefinition="The subject for which the request group was created." )
2266    protected Reference subject;
2267
2268    /**
2269     * Describes the context of the request group, if any.
2270     */
2271    @Child(name = "encounter", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=false)
2272    @Description(shortDefinition="Created as part of", formalDefinition="Describes the context of the request group, if any." )
2273    protected Reference encounter;
2274
2275    /**
2276     * Indicates when the request group was created.
2277     */
2278    @Child(name = "authoredOn", type = {DateTimeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
2279    @Description(shortDefinition="When the request group was authored", formalDefinition="Indicates when the request group was created." )
2280    protected DateTimeType authoredOn;
2281
2282    /**
2283     * Provides a reference to the author of the request group.
2284     */
2285    @Child(name = "author", type = {Device.class, Practitioner.class, PractitionerRole.class}, order=13, min=0, max=1, modifier=false, summary=false)
2286    @Description(shortDefinition="Device or practitioner that authored the request group", formalDefinition="Provides a reference to the author of the request group." )
2287    protected Reference author;
2288
2289    /**
2290     * Describes the reason for the request group in coded or textual form.
2291     */
2292    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2293    @Description(shortDefinition="Why the request group is needed", formalDefinition="Describes the reason for the request group in coded or textual form." )
2294    protected List<CodeableConcept> reasonCode;
2295
2296    /**
2297     * Indicates another resource whose existence justifies this request group.
2298     */
2299    @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2300    @Description(shortDefinition="Why the request group is needed", formalDefinition="Indicates another resource whose existence justifies this request group." )
2301    protected List<Reference> reasonReference;
2302
2303    /**
2304     * Provides a mechanism to communicate additional information about the response.
2305     */
2306    @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2307    @Description(shortDefinition="Additional notes about the response", formalDefinition="Provides a mechanism to communicate additional information about the response." )
2308    protected List<Annotation> note;
2309
2310    /**
2311     * The actions, if any, produced by the evaluation of the artifact.
2312     */
2313    @Child(name = "action", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2314    @Description(shortDefinition="Proposed actions, if any", formalDefinition="The actions, if any, produced by the evaluation of the artifact." )
2315    protected List<RequestGroupActionComponent> action;
2316
2317    private static final long serialVersionUID = 1938026085L;
2318
2319  /**
2320   * Constructor
2321   */
2322    public RequestGroup() {
2323      super();
2324    }
2325
2326  /**
2327   * Constructor
2328   */
2329    public RequestGroup(RequestStatus status, RequestIntent intent) {
2330      super();
2331      this.setStatus(status);
2332      this.setIntent(intent);
2333    }
2334
2335    /**
2336     * @return {@link #identifier} (Allows a service to provide a unique, business identifier for the request.)
2337     */
2338    public List<Identifier> getIdentifier() { 
2339      if (this.identifier == null)
2340        this.identifier = new ArrayList<Identifier>();
2341      return this.identifier;
2342    }
2343
2344    /**
2345     * @return Returns a reference to <code>this</code> for easy method chaining
2346     */
2347    public RequestGroup setIdentifier(List<Identifier> theIdentifier) { 
2348      this.identifier = theIdentifier;
2349      return this;
2350    }
2351
2352    public boolean hasIdentifier() { 
2353      if (this.identifier == null)
2354        return false;
2355      for (Identifier item : this.identifier)
2356        if (!item.isEmpty())
2357          return true;
2358      return false;
2359    }
2360
2361    public Identifier addIdentifier() { //3
2362      Identifier t = new Identifier();
2363      if (this.identifier == null)
2364        this.identifier = new ArrayList<Identifier>();
2365      this.identifier.add(t);
2366      return t;
2367    }
2368
2369    public RequestGroup addIdentifier(Identifier t) { //3
2370      if (t == null)
2371        return this;
2372      if (this.identifier == null)
2373        this.identifier = new ArrayList<Identifier>();
2374      this.identifier.add(t);
2375      return this;
2376    }
2377
2378    /**
2379     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
2380     */
2381    public Identifier getIdentifierFirstRep() { 
2382      if (getIdentifier().isEmpty()) {
2383        addIdentifier();
2384      }
2385      return getIdentifier().get(0);
2386    }
2387
2388    /**
2389     * @return {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2390     */
2391    public List<CanonicalType> getInstantiatesCanonical() { 
2392      if (this.instantiatesCanonical == null)
2393        this.instantiatesCanonical = new ArrayList<CanonicalType>();
2394      return this.instantiatesCanonical;
2395    }
2396
2397    /**
2398     * @return Returns a reference to <code>this</code> for easy method chaining
2399     */
2400    public RequestGroup setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 
2401      this.instantiatesCanonical = theInstantiatesCanonical;
2402      return this;
2403    }
2404
2405    public boolean hasInstantiatesCanonical() { 
2406      if (this.instantiatesCanonical == null)
2407        return false;
2408      for (CanonicalType item : this.instantiatesCanonical)
2409        if (!item.isEmpty())
2410          return true;
2411      return false;
2412    }
2413
2414    /**
2415     * @return {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2416     */
2417    public CanonicalType addInstantiatesCanonicalElement() {//2 
2418      CanonicalType t = new CanonicalType();
2419      if (this.instantiatesCanonical == null)
2420        this.instantiatesCanonical = new ArrayList<CanonicalType>();
2421      this.instantiatesCanonical.add(t);
2422      return t;
2423    }
2424
2425    /**
2426     * @param value {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2427     */
2428    public RequestGroup addInstantiatesCanonical(String value) { //1
2429      CanonicalType t = new CanonicalType();
2430      t.setValue(value);
2431      if (this.instantiatesCanonical == null)
2432        this.instantiatesCanonical = new ArrayList<CanonicalType>();
2433      this.instantiatesCanonical.add(t);
2434      return this;
2435    }
2436
2437    /**
2438     * @param value {@link #instantiatesCanonical} (A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2439     */
2440    public boolean hasInstantiatesCanonical(String value) { 
2441      if (this.instantiatesCanonical == null)
2442        return false;
2443      for (CanonicalType v : this.instantiatesCanonical)
2444        if (v.getValue().equals(value)) // canonical
2445          return true;
2446      return false;
2447    }
2448
2449    /**
2450     * @return {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2451     */
2452    public List<UriType> getInstantiatesUri() { 
2453      if (this.instantiatesUri == null)
2454        this.instantiatesUri = new ArrayList<UriType>();
2455      return this.instantiatesUri;
2456    }
2457
2458    /**
2459     * @return Returns a reference to <code>this</code> for easy method chaining
2460     */
2461    public RequestGroup setInstantiatesUri(List<UriType> theInstantiatesUri) { 
2462      this.instantiatesUri = theInstantiatesUri;
2463      return this;
2464    }
2465
2466    public boolean hasInstantiatesUri() { 
2467      if (this.instantiatesUri == null)
2468        return false;
2469      for (UriType item : this.instantiatesUri)
2470        if (!item.isEmpty())
2471          return true;
2472      return false;
2473    }
2474
2475    /**
2476     * @return {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2477     */
2478    public UriType addInstantiatesUriElement() {//2 
2479      UriType t = new UriType();
2480      if (this.instantiatesUri == null)
2481        this.instantiatesUri = new ArrayList<UriType>();
2482      this.instantiatesUri.add(t);
2483      return t;
2484    }
2485
2486    /**
2487     * @param value {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2488     */
2489    public RequestGroup addInstantiatesUri(String value) { //1
2490      UriType t = new UriType();
2491      t.setValue(value);
2492      if (this.instantiatesUri == null)
2493        this.instantiatesUri = new ArrayList<UriType>();
2494      this.instantiatesUri.add(t);
2495      return this;
2496    }
2497
2498    /**
2499     * @param value {@link #instantiatesUri} (A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.)
2500     */
2501    public boolean hasInstantiatesUri(String value) { 
2502      if (this.instantiatesUri == null)
2503        return false;
2504      for (UriType v : this.instantiatesUri)
2505        if (v.getValue().equals(value)) // uri
2506          return true;
2507      return false;
2508    }
2509
2510    /**
2511     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this request.)
2512     */
2513    public List<Reference> getBasedOn() { 
2514      if (this.basedOn == null)
2515        this.basedOn = new ArrayList<Reference>();
2516      return this.basedOn;
2517    }
2518
2519    /**
2520     * @return Returns a reference to <code>this</code> for easy method chaining
2521     */
2522    public RequestGroup setBasedOn(List<Reference> theBasedOn) { 
2523      this.basedOn = theBasedOn;
2524      return this;
2525    }
2526
2527    public boolean hasBasedOn() { 
2528      if (this.basedOn == null)
2529        return false;
2530      for (Reference item : this.basedOn)
2531        if (!item.isEmpty())
2532          return true;
2533      return false;
2534    }
2535
2536    public Reference addBasedOn() { //3
2537      Reference t = new Reference();
2538      if (this.basedOn == null)
2539        this.basedOn = new ArrayList<Reference>();
2540      this.basedOn.add(t);
2541      return t;
2542    }
2543
2544    public RequestGroup addBasedOn(Reference t) { //3
2545      if (t == null)
2546        return this;
2547      if (this.basedOn == null)
2548        this.basedOn = new ArrayList<Reference>();
2549      this.basedOn.add(t);
2550      return this;
2551    }
2552
2553    /**
2554     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
2555     */
2556    public Reference getBasedOnFirstRep() { 
2557      if (getBasedOn().isEmpty()) {
2558        addBasedOn();
2559      }
2560      return getBasedOn().get(0);
2561    }
2562
2563    /**
2564     * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new request.)
2565     */
2566    public List<Reference> getReplaces() { 
2567      if (this.replaces == null)
2568        this.replaces = new ArrayList<Reference>();
2569      return this.replaces;
2570    }
2571
2572    /**
2573     * @return Returns a reference to <code>this</code> for easy method chaining
2574     */
2575    public RequestGroup setReplaces(List<Reference> theReplaces) { 
2576      this.replaces = theReplaces;
2577      return this;
2578    }
2579
2580    public boolean hasReplaces() { 
2581      if (this.replaces == null)
2582        return false;
2583      for (Reference item : this.replaces)
2584        if (!item.isEmpty())
2585          return true;
2586      return false;
2587    }
2588
2589    public Reference addReplaces() { //3
2590      Reference t = new Reference();
2591      if (this.replaces == null)
2592        this.replaces = new ArrayList<Reference>();
2593      this.replaces.add(t);
2594      return t;
2595    }
2596
2597    public RequestGroup addReplaces(Reference t) { //3
2598      if (t == null)
2599        return this;
2600      if (this.replaces == null)
2601        this.replaces = new ArrayList<Reference>();
2602      this.replaces.add(t);
2603      return this;
2604    }
2605
2606    /**
2607     * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3}
2608     */
2609    public Reference getReplacesFirstRep() { 
2610      if (getReplaces().isEmpty()) {
2611        addReplaces();
2612      }
2613      return getReplaces().get(0);
2614    }
2615
2616    /**
2617     * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.)
2618     */
2619    public Identifier getGroupIdentifier() { 
2620      if (this.groupIdentifier == null)
2621        if (Configuration.errorOnAutoCreate())
2622          throw new Error("Attempt to auto-create RequestGroup.groupIdentifier");
2623        else if (Configuration.doAutoCreate())
2624          this.groupIdentifier = new Identifier(); // cc
2625      return this.groupIdentifier;
2626    }
2627
2628    public boolean hasGroupIdentifier() { 
2629      return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
2630    }
2631
2632    /**
2633     * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.)
2634     */
2635    public RequestGroup setGroupIdentifier(Identifier value) { 
2636      this.groupIdentifier = value;
2637      return this;
2638    }
2639
2640    /**
2641     * @return {@link #status} (The current state of the request. For request groups, the status reflects the status of all the requests in the group.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2642     */
2643    public Enumeration<RequestStatus> getStatusElement() { 
2644      if (this.status == null)
2645        if (Configuration.errorOnAutoCreate())
2646          throw new Error("Attempt to auto-create RequestGroup.status");
2647        else if (Configuration.doAutoCreate())
2648          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb
2649      return this.status;
2650    }
2651
2652    public boolean hasStatusElement() { 
2653      return this.status != null && !this.status.isEmpty();
2654    }
2655
2656    public boolean hasStatus() { 
2657      return this.status != null && !this.status.isEmpty();
2658    }
2659
2660    /**
2661     * @param value {@link #status} (The current state of the request. For request groups, the status reflects the status of all the requests in the group.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2662     */
2663    public RequestGroup setStatusElement(Enumeration<RequestStatus> value) { 
2664      this.status = value;
2665      return this;
2666    }
2667
2668    /**
2669     * @return The current state of the request. For request groups, the status reflects the status of all the requests in the group.
2670     */
2671    public RequestStatus getStatus() { 
2672      return this.status == null ? null : this.status.getValue();
2673    }
2674
2675    /**
2676     * @param value The current state of the request. For request groups, the status reflects the status of all the requests in the group.
2677     */
2678    public RequestGroup setStatus(RequestStatus value) { 
2679        if (this.status == null)
2680          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory());
2681        this.status.setValue(value);
2682      return this;
2683    }
2684
2685    /**
2686     * @return {@link #intent} (Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
2687     */
2688    public Enumeration<RequestIntent> getIntentElement() { 
2689      if (this.intent == null)
2690        if (Configuration.errorOnAutoCreate())
2691          throw new Error("Attempt to auto-create RequestGroup.intent");
2692        else if (Configuration.doAutoCreate())
2693          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb
2694      return this.intent;
2695    }
2696
2697    public boolean hasIntentElement() { 
2698      return this.intent != null && !this.intent.isEmpty();
2699    }
2700
2701    public boolean hasIntent() { 
2702      return this.intent != null && !this.intent.isEmpty();
2703    }
2704
2705    /**
2706     * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
2707     */
2708    public RequestGroup setIntentElement(Enumeration<RequestIntent> value) { 
2709      this.intent = value;
2710      return this;
2711    }
2712
2713    /**
2714     * @return Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.
2715     */
2716    public RequestIntent getIntent() { 
2717      return this.intent == null ? null : this.intent.getValue();
2718    }
2719
2720    /**
2721     * @param value Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.
2722     */
2723    public RequestGroup setIntent(RequestIntent value) { 
2724        if (this.intent == null)
2725          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory());
2726        this.intent.setValue(value);
2727      return this;
2728    }
2729
2730    /**
2731     * @return {@link #priority} (Indicates how quickly the request 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
2732     */
2733    public Enumeration<RequestPriority> getPriorityElement() { 
2734      if (this.priority == null)
2735        if (Configuration.errorOnAutoCreate())
2736          throw new Error("Attempt to auto-create RequestGroup.priority");
2737        else if (Configuration.doAutoCreate())
2738          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
2739      return this.priority;
2740    }
2741
2742    public boolean hasPriorityElement() { 
2743      return this.priority != null && !this.priority.isEmpty();
2744    }
2745
2746    public boolean hasPriority() { 
2747      return this.priority != null && !this.priority.isEmpty();
2748    }
2749
2750    /**
2751     * @param value {@link #priority} (Indicates how quickly the request 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
2752     */
2753    public RequestGroup setPriorityElement(Enumeration<RequestPriority> value) { 
2754      this.priority = value;
2755      return this;
2756    }
2757
2758    /**
2759     * @return Indicates how quickly the request should be addressed with respect to other requests.
2760     */
2761    public RequestPriority getPriority() { 
2762      return this.priority == null ? null : this.priority.getValue();
2763    }
2764
2765    /**
2766     * @param value Indicates how quickly the request should be addressed with respect to other requests.
2767     */
2768    public RequestGroup setPriority(RequestPriority value) { 
2769      if (value == null)
2770        this.priority = null;
2771      else {
2772        if (this.priority == null)
2773          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
2774        this.priority.setValue(value);
2775      }
2776      return this;
2777    }
2778
2779    /**
2780     * @return {@link #code} (A code that identifies what the overall request group is.)
2781     */
2782    public CodeableConcept getCode() { 
2783      if (this.code == null)
2784        if (Configuration.errorOnAutoCreate())
2785          throw new Error("Attempt to auto-create RequestGroup.code");
2786        else if (Configuration.doAutoCreate())
2787          this.code = new CodeableConcept(); // cc
2788      return this.code;
2789    }
2790
2791    public boolean hasCode() { 
2792      return this.code != null && !this.code.isEmpty();
2793    }
2794
2795    /**
2796     * @param value {@link #code} (A code that identifies what the overall request group is.)
2797     */
2798    public RequestGroup setCode(CodeableConcept value) { 
2799      this.code = value;
2800      return this;
2801    }
2802
2803    /**
2804     * @return {@link #subject} (The subject for which the request group was created.)
2805     */
2806    public Reference getSubject() { 
2807      if (this.subject == null)
2808        if (Configuration.errorOnAutoCreate())
2809          throw new Error("Attempt to auto-create RequestGroup.subject");
2810        else if (Configuration.doAutoCreate())
2811          this.subject = new Reference(); // cc
2812      return this.subject;
2813    }
2814
2815    public boolean hasSubject() { 
2816      return this.subject != null && !this.subject.isEmpty();
2817    }
2818
2819    /**
2820     * @param value {@link #subject} (The subject for which the request group was created.)
2821     */
2822    public RequestGroup setSubject(Reference value) { 
2823      this.subject = value;
2824      return this;
2825    }
2826
2827    /**
2828     * @return {@link #encounter} (Describes the context of the request group, if any.)
2829     */
2830    public Reference getEncounter() { 
2831      if (this.encounter == null)
2832        if (Configuration.errorOnAutoCreate())
2833          throw new Error("Attempt to auto-create RequestGroup.encounter");
2834        else if (Configuration.doAutoCreate())
2835          this.encounter = new Reference(); // cc
2836      return this.encounter;
2837    }
2838
2839    public boolean hasEncounter() { 
2840      return this.encounter != null && !this.encounter.isEmpty();
2841    }
2842
2843    /**
2844     * @param value {@link #encounter} (Describes the context of the request group, if any.)
2845     */
2846    public RequestGroup setEncounter(Reference value) { 
2847      this.encounter = value;
2848      return this;
2849    }
2850
2851    /**
2852     * @return {@link #authoredOn} (Indicates when the request group was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
2853     */
2854    public DateTimeType getAuthoredOnElement() { 
2855      if (this.authoredOn == null)
2856        if (Configuration.errorOnAutoCreate())
2857          throw new Error("Attempt to auto-create RequestGroup.authoredOn");
2858        else if (Configuration.doAutoCreate())
2859          this.authoredOn = new DateTimeType(); // bb
2860      return this.authoredOn;
2861    }
2862
2863    public boolean hasAuthoredOnElement() { 
2864      return this.authoredOn != null && !this.authoredOn.isEmpty();
2865    }
2866
2867    public boolean hasAuthoredOn() { 
2868      return this.authoredOn != null && !this.authoredOn.isEmpty();
2869    }
2870
2871    /**
2872     * @param value {@link #authoredOn} (Indicates when the request group was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
2873     */
2874    public RequestGroup setAuthoredOnElement(DateTimeType value) { 
2875      this.authoredOn = value;
2876      return this;
2877    }
2878
2879    /**
2880     * @return Indicates when the request group was created.
2881     */
2882    public Date getAuthoredOn() { 
2883      return this.authoredOn == null ? null : this.authoredOn.getValue();
2884    }
2885
2886    /**
2887     * @param value Indicates when the request group was created.
2888     */
2889    public RequestGroup setAuthoredOn(Date value) { 
2890      if (value == null)
2891        this.authoredOn = null;
2892      else {
2893        if (this.authoredOn == null)
2894          this.authoredOn = new DateTimeType();
2895        this.authoredOn.setValue(value);
2896      }
2897      return this;
2898    }
2899
2900    /**
2901     * @return {@link #author} (Provides a reference to the author of the request group.)
2902     */
2903    public Reference getAuthor() { 
2904      if (this.author == null)
2905        if (Configuration.errorOnAutoCreate())
2906          throw new Error("Attempt to auto-create RequestGroup.author");
2907        else if (Configuration.doAutoCreate())
2908          this.author = new Reference(); // cc
2909      return this.author;
2910    }
2911
2912    public boolean hasAuthor() { 
2913      return this.author != null && !this.author.isEmpty();
2914    }
2915
2916    /**
2917     * @param value {@link #author} (Provides a reference to the author of the request group.)
2918     */
2919    public RequestGroup setAuthor(Reference value) { 
2920      this.author = value;
2921      return this;
2922    }
2923
2924    /**
2925     * @return {@link #reasonCode} (Describes the reason for the request group in coded or textual form.)
2926     */
2927    public List<CodeableConcept> getReasonCode() { 
2928      if (this.reasonCode == null)
2929        this.reasonCode = new ArrayList<CodeableConcept>();
2930      return this.reasonCode;
2931    }
2932
2933    /**
2934     * @return Returns a reference to <code>this</code> for easy method chaining
2935     */
2936    public RequestGroup setReasonCode(List<CodeableConcept> theReasonCode) { 
2937      this.reasonCode = theReasonCode;
2938      return this;
2939    }
2940
2941    public boolean hasReasonCode() { 
2942      if (this.reasonCode == null)
2943        return false;
2944      for (CodeableConcept item : this.reasonCode)
2945        if (!item.isEmpty())
2946          return true;
2947      return false;
2948    }
2949
2950    public CodeableConcept addReasonCode() { //3
2951      CodeableConcept t = new CodeableConcept();
2952      if (this.reasonCode == null)
2953        this.reasonCode = new ArrayList<CodeableConcept>();
2954      this.reasonCode.add(t);
2955      return t;
2956    }
2957
2958    public RequestGroup addReasonCode(CodeableConcept t) { //3
2959      if (t == null)
2960        return this;
2961      if (this.reasonCode == null)
2962        this.reasonCode = new ArrayList<CodeableConcept>();
2963      this.reasonCode.add(t);
2964      return this;
2965    }
2966
2967    /**
2968     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist {3}
2969     */
2970    public CodeableConcept getReasonCodeFirstRep() { 
2971      if (getReasonCode().isEmpty()) {
2972        addReasonCode();
2973      }
2974      return getReasonCode().get(0);
2975    }
2976
2977    /**
2978     * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request group.)
2979     */
2980    public List<Reference> getReasonReference() { 
2981      if (this.reasonReference == null)
2982        this.reasonReference = new ArrayList<Reference>();
2983      return this.reasonReference;
2984    }
2985
2986    /**
2987     * @return Returns a reference to <code>this</code> for easy method chaining
2988     */
2989    public RequestGroup setReasonReference(List<Reference> theReasonReference) { 
2990      this.reasonReference = theReasonReference;
2991      return this;
2992    }
2993
2994    public boolean hasReasonReference() { 
2995      if (this.reasonReference == null)
2996        return false;
2997      for (Reference item : this.reasonReference)
2998        if (!item.isEmpty())
2999          return true;
3000      return false;
3001    }
3002
3003    public Reference addReasonReference() { //3
3004      Reference t = new Reference();
3005      if (this.reasonReference == null)
3006        this.reasonReference = new ArrayList<Reference>();
3007      this.reasonReference.add(t);
3008      return t;
3009    }
3010
3011    public RequestGroup addReasonReference(Reference t) { //3
3012      if (t == null)
3013        return this;
3014      if (this.reasonReference == null)
3015        this.reasonReference = new ArrayList<Reference>();
3016      this.reasonReference.add(t);
3017      return this;
3018    }
3019
3020    /**
3021     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist {3}
3022     */
3023    public Reference getReasonReferenceFirstRep() { 
3024      if (getReasonReference().isEmpty()) {
3025        addReasonReference();
3026      }
3027      return getReasonReference().get(0);
3028    }
3029
3030    /**
3031     * @return {@link #note} (Provides a mechanism to communicate additional information about the response.)
3032     */
3033    public List<Annotation> getNote() { 
3034      if (this.note == null)
3035        this.note = new ArrayList<Annotation>();
3036      return this.note;
3037    }
3038
3039    /**
3040     * @return Returns a reference to <code>this</code> for easy method chaining
3041     */
3042    public RequestGroup setNote(List<Annotation> theNote) { 
3043      this.note = theNote;
3044      return this;
3045    }
3046
3047    public boolean hasNote() { 
3048      if (this.note == null)
3049        return false;
3050      for (Annotation item : this.note)
3051        if (!item.isEmpty())
3052          return true;
3053      return false;
3054    }
3055
3056    public Annotation addNote() { //3
3057      Annotation t = new Annotation();
3058      if (this.note == null)
3059        this.note = new ArrayList<Annotation>();
3060      this.note.add(t);
3061      return t;
3062    }
3063
3064    public RequestGroup addNote(Annotation t) { //3
3065      if (t == null)
3066        return this;
3067      if (this.note == null)
3068        this.note = new ArrayList<Annotation>();
3069      this.note.add(t);
3070      return this;
3071    }
3072
3073    /**
3074     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
3075     */
3076    public Annotation getNoteFirstRep() { 
3077      if (getNote().isEmpty()) {
3078        addNote();
3079      }
3080      return getNote().get(0);
3081    }
3082
3083    /**
3084     * @return {@link #action} (The actions, if any, produced by the evaluation of the artifact.)
3085     */
3086    public List<RequestGroupActionComponent> getAction() { 
3087      if (this.action == null)
3088        this.action = new ArrayList<RequestGroupActionComponent>();
3089      return this.action;
3090    }
3091
3092    /**
3093     * @return Returns a reference to <code>this</code> for easy method chaining
3094     */
3095    public RequestGroup setAction(List<RequestGroupActionComponent> theAction) { 
3096      this.action = theAction;
3097      return this;
3098    }
3099
3100    public boolean hasAction() { 
3101      if (this.action == null)
3102        return false;
3103      for (RequestGroupActionComponent item : this.action)
3104        if (!item.isEmpty())
3105          return true;
3106      return false;
3107    }
3108
3109    public RequestGroupActionComponent addAction() { //3
3110      RequestGroupActionComponent t = new RequestGroupActionComponent();
3111      if (this.action == null)
3112        this.action = new ArrayList<RequestGroupActionComponent>();
3113      this.action.add(t);
3114      return t;
3115    }
3116
3117    public RequestGroup addAction(RequestGroupActionComponent t) { //3
3118      if (t == null)
3119        return this;
3120      if (this.action == null)
3121        this.action = new ArrayList<RequestGroupActionComponent>();
3122      this.action.add(t);
3123      return this;
3124    }
3125
3126    /**
3127     * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist {3}
3128     */
3129    public RequestGroupActionComponent getActionFirstRep() { 
3130      if (getAction().isEmpty()) {
3131        addAction();
3132      }
3133      return getAction().get(0);
3134    }
3135
3136      protected void listChildren(List<Property> children) {
3137        super.listChildren(children);
3138        children.add(new Property("identifier", "Identifier", "Allows a service to provide a unique, business identifier for the request.", 0, java.lang.Integer.MAX_VALUE, identifier));
3139        children.add(new Property("instantiatesCanonical", "canonical", "A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical));
3140        children.add(new Property("instantiatesUri", "uri", "A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri));
3141        children.add(new Property("basedOn", "Reference(Any)", "A plan, proposal or order that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn));
3142        children.add(new Property("replaces", "Reference(Any)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces));
3143        children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier));
3144        children.add(new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status));
3145        children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent));
3146        children.add(new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority));
3147        children.add(new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code));
3148        children.add(new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject));
3149        children.add(new Property("encounter", "Reference(Encounter)", "Describes the context of the request group, if any.", 0, 1, encounter));
3150        children.add(new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn));
3151        children.add(new Property("author", "Reference(Device|Practitioner|PractitionerRole)", "Provides a reference to the author of the request group.", 0, 1, author));
3152        children.add(new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode));
3153        children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference));
3154        children.add(new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note));
3155        children.add(new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action));
3156      }
3157
3158      @Override
3159      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3160        switch (_hash) {
3161        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Allows a service to provide a unique, business identifier for the request.", 0, java.lang.Integer.MAX_VALUE, identifier);
3162        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical", "A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical);
3163        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri);
3164        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(Any)", "A plan, proposal or order that is fulfilled in whole or in part by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn);
3165        case -430332865: /*replaces*/  return new Property("replaces", "Reference(Any)", "Completed or terminated request(s) whose function is taken by this new request.", 0, java.lang.Integer.MAX_VALUE, replaces);
3166        case -445338488: /*groupIdentifier*/  return new Property("groupIdentifier", "Identifier", "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.", 0, 1, groupIdentifier);
3167        case -892481550: /*status*/  return new Property("status", "code", "The current state of the request. For request groups, the status reflects the status of all the requests in the group.", 0, 1, status);
3168        case -1183762788: /*intent*/  return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.", 0, 1, intent);
3169        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the request should be addressed with respect to other requests.", 0, 1, priority);
3170        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that identifies what the overall request group is.", 0, 1, code);
3171        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "The subject for which the request group was created.", 0, 1, subject);
3172        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "Describes the context of the request group, if any.", 0, 1, encounter);
3173        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "Indicates when the request group was created.", 0, 1, authoredOn);
3174        case -1406328437: /*author*/  return new Property("author", "Reference(Device|Practitioner|PractitionerRole)", "Provides a reference to the author of the request group.", 0, 1, author);
3175        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "Describes the reason for the request group in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode);
3176        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this request group.", 0, java.lang.Integer.MAX_VALUE, reasonReference);
3177        case 3387378: /*note*/  return new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note);
3178        case -1422950858: /*action*/  return new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action);
3179        default: return super.getNamedProperty(_hash, _name, _checkValid);
3180        }
3181
3182      }
3183
3184      @Override
3185      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3186        switch (hash) {
3187        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3188        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType
3189        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType
3190        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
3191        case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference
3192        case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier
3193        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus>
3194        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<RequestIntent>
3195        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
3196        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
3197        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
3198        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
3199        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
3200        case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
3201        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept
3202        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference
3203        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
3204        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // RequestGroupActionComponent
3205        default: return super.getProperty(hash, name, checkValid);
3206        }
3207
3208      }
3209
3210      @Override
3211      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3212        switch (hash) {
3213        case -1618432855: // identifier
3214          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3215          return value;
3216        case 8911915: // instantiatesCanonical
3217          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3218          return value;
3219        case -1926393373: // instantiatesUri
3220          this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType
3221          return value;
3222        case -332612366: // basedOn
3223          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
3224          return value;
3225        case -430332865: // replaces
3226          this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference
3227          return value;
3228        case -445338488: // groupIdentifier
3229          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
3230          return value;
3231        case -892481550: // status
3232          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3233          this.status = (Enumeration) value; // Enumeration<RequestStatus>
3234          return value;
3235        case -1183762788: // intent
3236          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
3237          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
3238          return value;
3239        case -1165461084: // priority
3240          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
3241          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
3242          return value;
3243        case 3059181: // code
3244          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3245          return value;
3246        case -1867885268: // subject
3247          this.subject = TypeConvertor.castToReference(value); // Reference
3248          return value;
3249        case 1524132147: // encounter
3250          this.encounter = TypeConvertor.castToReference(value); // Reference
3251          return value;
3252        case -1500852503: // authoredOn
3253          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
3254          return value;
3255        case -1406328437: // author
3256          this.author = TypeConvertor.castToReference(value); // Reference
3257          return value;
3258        case 722137681: // reasonCode
3259          this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3260          return value;
3261        case -1146218137: // reasonReference
3262          this.getReasonReference().add(TypeConvertor.castToReference(value)); // Reference
3263          return value;
3264        case 3387378: // note
3265          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
3266          return value;
3267        case -1422950858: // action
3268          this.getAction().add((RequestGroupActionComponent) value); // RequestGroupActionComponent
3269          return value;
3270        default: return super.setProperty(hash, name, value);
3271        }
3272
3273      }
3274
3275      @Override
3276      public Base setProperty(String name, Base value) throws FHIRException {
3277        if (name.equals("identifier")) {
3278          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3279        } else if (name.equals("instantiatesCanonical")) {
3280          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value));
3281        } else if (name.equals("instantiatesUri")) {
3282          this.getInstantiatesUri().add(TypeConvertor.castToUri(value));
3283        } else if (name.equals("basedOn")) {
3284          this.getBasedOn().add(TypeConvertor.castToReference(value));
3285        } else if (name.equals("replaces")) {
3286          this.getReplaces().add(TypeConvertor.castToReference(value));
3287        } else if (name.equals("groupIdentifier")) {
3288          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
3289        } else if (name.equals("status")) {
3290          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3291          this.status = (Enumeration) value; // Enumeration<RequestStatus>
3292        } else if (name.equals("intent")) {
3293          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
3294          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
3295        } else if (name.equals("priority")) {
3296          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
3297          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
3298        } else if (name.equals("code")) {
3299          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3300        } else if (name.equals("subject")) {
3301          this.subject = TypeConvertor.castToReference(value); // Reference
3302        } else if (name.equals("encounter")) {
3303          this.encounter = TypeConvertor.castToReference(value); // Reference
3304        } else if (name.equals("authoredOn")) {
3305          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
3306        } else if (name.equals("author")) {
3307          this.author = TypeConvertor.castToReference(value); // Reference
3308        } else if (name.equals("reasonCode")) {
3309          this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value));
3310        } else if (name.equals("reasonReference")) {
3311          this.getReasonReference().add(TypeConvertor.castToReference(value));
3312        } else if (name.equals("note")) {
3313          this.getNote().add(TypeConvertor.castToAnnotation(value));
3314        } else if (name.equals("action")) {
3315          this.getAction().add((RequestGroupActionComponent) value);
3316        } else
3317          return super.setProperty(name, value);
3318        return value;
3319      }
3320
3321      @Override
3322      public Base makeProperty(int hash, String name) throws FHIRException {
3323        switch (hash) {
3324        case -1618432855:  return addIdentifier(); 
3325        case 8911915:  return addInstantiatesCanonicalElement();
3326        case -1926393373:  return addInstantiatesUriElement();
3327        case -332612366:  return addBasedOn(); 
3328        case -430332865:  return addReplaces(); 
3329        case -445338488:  return getGroupIdentifier();
3330        case -892481550:  return getStatusElement();
3331        case -1183762788:  return getIntentElement();
3332        case -1165461084:  return getPriorityElement();
3333        case 3059181:  return getCode();
3334        case -1867885268:  return getSubject();
3335        case 1524132147:  return getEncounter();
3336        case -1500852503:  return getAuthoredOnElement();
3337        case -1406328437:  return getAuthor();
3338        case 722137681:  return addReasonCode(); 
3339        case -1146218137:  return addReasonReference(); 
3340        case 3387378:  return addNote(); 
3341        case -1422950858:  return addAction(); 
3342        default: return super.makeProperty(hash, name);
3343        }
3344
3345      }
3346
3347      @Override
3348      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3349        switch (hash) {
3350        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3351        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
3352        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
3353        case -332612366: /*basedOn*/ return new String[] {"Reference"};
3354        case -430332865: /*replaces*/ return new String[] {"Reference"};
3355        case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"};
3356        case -892481550: /*status*/ return new String[] {"code"};
3357        case -1183762788: /*intent*/ return new String[] {"code"};
3358        case -1165461084: /*priority*/ return new String[] {"code"};
3359        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
3360        case -1867885268: /*subject*/ return new String[] {"Reference"};
3361        case 1524132147: /*encounter*/ return new String[] {"Reference"};
3362        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
3363        case -1406328437: /*author*/ return new String[] {"Reference"};
3364        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
3365        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
3366        case 3387378: /*note*/ return new String[] {"Annotation"};
3367        case -1422950858: /*action*/ return new String[] {};
3368        default: return super.getTypesForProperty(hash, name);
3369        }
3370
3371      }
3372
3373      @Override
3374      public Base addChild(String name) throws FHIRException {
3375        if (name.equals("identifier")) {
3376          return addIdentifier();
3377        }
3378        else if (name.equals("instantiatesCanonical")) {
3379          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.instantiatesCanonical");
3380        }
3381        else if (name.equals("instantiatesUri")) {
3382          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.instantiatesUri");
3383        }
3384        else if (name.equals("basedOn")) {
3385          return addBasedOn();
3386        }
3387        else if (name.equals("replaces")) {
3388          return addReplaces();
3389        }
3390        else if (name.equals("groupIdentifier")) {
3391          this.groupIdentifier = new Identifier();
3392          return this.groupIdentifier;
3393        }
3394        else if (name.equals("status")) {
3395          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.status");
3396        }
3397        else if (name.equals("intent")) {
3398          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.intent");
3399        }
3400        else if (name.equals("priority")) {
3401          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.priority");
3402        }
3403        else if (name.equals("code")) {
3404          this.code = new CodeableConcept();
3405          return this.code;
3406        }
3407        else if (name.equals("subject")) {
3408          this.subject = new Reference();
3409          return this.subject;
3410        }
3411        else if (name.equals("encounter")) {
3412          this.encounter = new Reference();
3413          return this.encounter;
3414        }
3415        else if (name.equals("authoredOn")) {
3416          throw new FHIRException("Cannot call addChild on a primitive type RequestGroup.authoredOn");
3417        }
3418        else if (name.equals("author")) {
3419          this.author = new Reference();
3420          return this.author;
3421        }
3422        else if (name.equals("reasonCode")) {
3423          return addReasonCode();
3424        }
3425        else if (name.equals("reasonReference")) {
3426          return addReasonReference();
3427        }
3428        else if (name.equals("note")) {
3429          return addNote();
3430        }
3431        else if (name.equals("action")) {
3432          return addAction();
3433        }
3434        else
3435          return super.addChild(name);
3436      }
3437
3438  public String fhirType() {
3439    return "RequestGroup";
3440
3441  }
3442
3443      public RequestGroup copy() {
3444        RequestGroup dst = new RequestGroup();
3445        copyValues(dst);
3446        return dst;
3447      }
3448
3449      public void copyValues(RequestGroup dst) {
3450        super.copyValues(dst);
3451        if (identifier != null) {
3452          dst.identifier = new ArrayList<Identifier>();
3453          for (Identifier i : identifier)
3454            dst.identifier.add(i.copy());
3455        };
3456        if (instantiatesCanonical != null) {
3457          dst.instantiatesCanonical = new ArrayList<CanonicalType>();
3458          for (CanonicalType i : instantiatesCanonical)
3459            dst.instantiatesCanonical.add(i.copy());
3460        };
3461        if (instantiatesUri != null) {
3462          dst.instantiatesUri = new ArrayList<UriType>();
3463          for (UriType i : instantiatesUri)
3464            dst.instantiatesUri.add(i.copy());
3465        };
3466        if (basedOn != null) {
3467          dst.basedOn = new ArrayList<Reference>();
3468          for (Reference i : basedOn)
3469            dst.basedOn.add(i.copy());
3470        };
3471        if (replaces != null) {
3472          dst.replaces = new ArrayList<Reference>();
3473          for (Reference i : replaces)
3474            dst.replaces.add(i.copy());
3475        };
3476        dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy();
3477        dst.status = status == null ? null : status.copy();
3478        dst.intent = intent == null ? null : intent.copy();
3479        dst.priority = priority == null ? null : priority.copy();
3480        dst.code = code == null ? null : code.copy();
3481        dst.subject = subject == null ? null : subject.copy();
3482        dst.encounter = encounter == null ? null : encounter.copy();
3483        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
3484        dst.author = author == null ? null : author.copy();
3485        if (reasonCode != null) {
3486          dst.reasonCode = new ArrayList<CodeableConcept>();
3487          for (CodeableConcept i : reasonCode)
3488            dst.reasonCode.add(i.copy());
3489        };
3490        if (reasonReference != null) {
3491          dst.reasonReference = new ArrayList<Reference>();
3492          for (Reference i : reasonReference)
3493            dst.reasonReference.add(i.copy());
3494        };
3495        if (note != null) {
3496          dst.note = new ArrayList<Annotation>();
3497          for (Annotation i : note)
3498            dst.note.add(i.copy());
3499        };
3500        if (action != null) {
3501          dst.action = new ArrayList<RequestGroupActionComponent>();
3502          for (RequestGroupActionComponent i : action)
3503            dst.action.add(i.copy());
3504        };
3505      }
3506
3507      protected RequestGroup typedCopy() {
3508        return copy();
3509      }
3510
3511      @Override
3512      public boolean equalsDeep(Base other_) {
3513        if (!super.equalsDeep(other_))
3514          return false;
3515        if (!(other_ instanceof RequestGroup))
3516          return false;
3517        RequestGroup o = (RequestGroup) other_;
3518        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
3519           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
3520           && compareDeep(replaces, o.replaces, true) && compareDeep(groupIdentifier, o.groupIdentifier, true)
3521           && compareDeep(status, o.status, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true)
3522           && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
3523           && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(author, o.author, true) && compareDeep(reasonCode, o.reasonCode, true)
3524           && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(note, o.note, true) && compareDeep(action, o.action, true)
3525          ;
3526      }
3527
3528      @Override
3529      public boolean equalsShallow(Base other_) {
3530        if (!super.equalsShallow(other_))
3531          return false;
3532        if (!(other_ instanceof RequestGroup))
3533          return false;
3534        RequestGroup o = (RequestGroup) other_;
3535        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
3536           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true)
3537           && compareValues(authoredOn, o.authoredOn, true);
3538      }
3539
3540      public boolean isEmpty() {
3541        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
3542          , instantiatesUri, basedOn, replaces, groupIdentifier, status, intent, priority
3543          , code, subject, encounter, authoredOn, author, reasonCode, reasonReference, note
3544          , action);
3545      }
3546
3547  @Override
3548  public ResourceType getResourceType() {
3549    return ResourceType.RequestGroup;
3550   }
3551
3552 /**
3553   * Search parameter: <b>author</b>
3554   * <p>
3555   * Description: <b>The author of the request group</b><br>
3556   * Type: <b>reference</b><br>
3557   * Path: <b>RequestGroup.author</b><br>
3558   * </p>
3559   */
3560  @SearchParamDefinition(name="author", path="RequestGroup.author", description="The author of the request group", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Practitioner.class, PractitionerRole.class } )
3561  public static final String SP_AUTHOR = "author";
3562 /**
3563   * <b>Fluent Client</b> search parameter constant for <b>author</b>
3564   * <p>
3565   * Description: <b>The author of the request group</b><br>
3566   * Type: <b>reference</b><br>
3567   * Path: <b>RequestGroup.author</b><br>
3568   * </p>
3569   */
3570  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR);
3571
3572/**
3573   * Constant for fluent queries to be used to add include statements. Specifies
3574   * the path value of "<b>RequestGroup:author</b>".
3575   */
3576  public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("RequestGroup:author").toLocked();
3577
3578 /**
3579   * Search parameter: <b>authored</b>
3580   * <p>
3581   * Description: <b>The date the request group was authored</b><br>
3582   * Type: <b>date</b><br>
3583   * Path: <b>RequestGroup.authoredOn</b><br>
3584   * </p>
3585   */
3586  @SearchParamDefinition(name="authored", path="RequestGroup.authoredOn", description="The date the request group was authored", type="date" )
3587  public static final String SP_AUTHORED = "authored";
3588 /**
3589   * <b>Fluent Client</b> search parameter constant for <b>authored</b>
3590   * <p>
3591   * Description: <b>The date the request group was authored</b><br>
3592   * Type: <b>date</b><br>
3593   * Path: <b>RequestGroup.authoredOn</b><br>
3594   * </p>
3595   */
3596  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED);
3597
3598 /**
3599   * Search parameter: <b>code</b>
3600   * <p>
3601   * Description: <b>The code of the request group</b><br>
3602   * Type: <b>token</b><br>
3603   * Path: <b>RequestGroup.code</b><br>
3604   * </p>
3605   */
3606  @SearchParamDefinition(name="code", path="RequestGroup.code", description="The code of the request group", type="token" )
3607  public static final String SP_CODE = "code";
3608 /**
3609   * <b>Fluent Client</b> search parameter constant for <b>code</b>
3610   * <p>
3611   * Description: <b>The code of the request group</b><br>
3612   * Type: <b>token</b><br>
3613   * Path: <b>RequestGroup.code</b><br>
3614   * </p>
3615   */
3616  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
3617
3618 /**
3619   * Search parameter: <b>encounter</b>
3620   * <p>
3621   * Description: <b>The encounter the request group applies to</b><br>
3622   * Type: <b>reference</b><br>
3623   * Path: <b>RequestGroup.encounter</b><br>
3624   * </p>
3625   */
3626  @SearchParamDefinition(name="encounter", path="RequestGroup.encounter", description="The encounter the request group applies to", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
3627  public static final String SP_ENCOUNTER = "encounter";
3628 /**
3629   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
3630   * <p>
3631   * Description: <b>The encounter the request group applies to</b><br>
3632   * Type: <b>reference</b><br>
3633   * Path: <b>RequestGroup.encounter</b><br>
3634   * </p>
3635   */
3636  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
3637
3638/**
3639   * Constant for fluent queries to be used to add include statements. Specifies
3640   * the path value of "<b>RequestGroup:encounter</b>".
3641   */
3642  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("RequestGroup:encounter").toLocked();
3643
3644 /**
3645   * Search parameter: <b>group-identifier</b>
3646   * <p>
3647   * Description: <b>The group identifier for the request group</b><br>
3648   * Type: <b>token</b><br>
3649   * Path: <b>RequestGroup.groupIdentifier</b><br>
3650   * </p>
3651   */
3652  @SearchParamDefinition(name="group-identifier", path="RequestGroup.groupIdentifier", description="The group identifier for the request group", type="token" )
3653  public static final String SP_GROUP_IDENTIFIER = "group-identifier";
3654 /**
3655   * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b>
3656   * <p>
3657   * Description: <b>The group identifier for the request group</b><br>
3658   * Type: <b>token</b><br>
3659   * Path: <b>RequestGroup.groupIdentifier</b><br>
3660   * </p>
3661   */
3662  public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER);
3663
3664 /**
3665   * Search parameter: <b>identifier</b>
3666   * <p>
3667   * Description: <b>External identifiers for the request group</b><br>
3668   * Type: <b>token</b><br>
3669   * Path: <b>RequestGroup.identifier</b><br>
3670   * </p>
3671   */
3672  @SearchParamDefinition(name="identifier", path="RequestGroup.identifier", description="External identifiers for the request group", type="token" )
3673  public static final String SP_IDENTIFIER = "identifier";
3674 /**
3675   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3676   * <p>
3677   * Description: <b>External identifiers for the request group</b><br>
3678   * Type: <b>token</b><br>
3679   * Path: <b>RequestGroup.identifier</b><br>
3680   * </p>
3681   */
3682  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3683
3684 /**
3685   * Search parameter: <b>instantiates-canonical</b>
3686   * <p>
3687   * Description: <b>The FHIR-based definition from which the request group is realized</b><br>
3688   * Type: <b>reference</b><br>
3689   * Path: <b>RequestGroup.instantiatesCanonical</b><br>
3690   * </p>
3691   */
3692  @SearchParamDefinition(name="instantiates-canonical", path="RequestGroup.instantiatesCanonical", description="The FHIR-based definition from which the request group is realized", type="reference" )
3693  public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical";
3694 /**
3695   * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b>
3696   * <p>
3697   * Description: <b>The FHIR-based definition from which the request group is realized</b><br>
3698   * Type: <b>reference</b><br>
3699   * Path: <b>RequestGroup.instantiatesCanonical</b><br>
3700   * </p>
3701   */
3702  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL);
3703
3704/**
3705   * Constant for fluent queries to be used to add include statements. Specifies
3706   * the path value of "<b>RequestGroup:instantiates-canonical</b>".
3707   */
3708  public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("RequestGroup:instantiates-canonical").toLocked();
3709
3710 /**
3711   * Search parameter: <b>instantiates-uri</b>
3712   * <p>
3713   * Description: <b>The external definition from which the request group is realized</b><br>
3714   * Type: <b>uri</b><br>
3715   * Path: <b>RequestGroup.instantiatesUri</b><br>
3716   * </p>
3717   */
3718  @SearchParamDefinition(name="instantiates-uri", path="RequestGroup.instantiatesUri", description="The external definition from which the request group is realized", type="uri" )
3719  public static final String SP_INSTANTIATES_URI = "instantiates-uri";
3720 /**
3721   * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b>
3722   * <p>
3723   * Description: <b>The external definition from which the request group is realized</b><br>
3724   * Type: <b>uri</b><br>
3725   * Path: <b>RequestGroup.instantiatesUri</b><br>
3726   * </p>
3727   */
3728  public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI);
3729
3730 /**
3731   * Search parameter: <b>intent</b>
3732   * <p>
3733   * Description: <b>The intent of the request group</b><br>
3734   * Type: <b>token</b><br>
3735   * Path: <b>RequestGroup.intent</b><br>
3736   * </p>
3737   */
3738  @SearchParamDefinition(name="intent", path="RequestGroup.intent", description="The intent of the request group", type="token" )
3739  public static final String SP_INTENT = "intent";
3740 /**
3741   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
3742   * <p>
3743   * Description: <b>The intent of the request group</b><br>
3744   * Type: <b>token</b><br>
3745   * Path: <b>RequestGroup.intent</b><br>
3746   * </p>
3747   */
3748  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
3749
3750 /**
3751   * Search parameter: <b>participant</b>
3752   * <p>
3753   * Description: <b>The participant in the requests in the group</b><br>
3754   * Type: <b>reference</b><br>
3755   * Path: <b>RequestGroup.action.participant</b><br>
3756   * </p>
3757   */
3758  @SearchParamDefinition(name="participant", path="RequestGroup.action.participant", description="The participant in the requests in the group", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
3759  public static final String SP_PARTICIPANT = "participant";
3760 /**
3761   * <b>Fluent Client</b> search parameter constant for <b>participant</b>
3762   * <p>
3763   * Description: <b>The participant in the requests in the group</b><br>
3764   * Type: <b>reference</b><br>
3765   * Path: <b>RequestGroup.action.participant</b><br>
3766   * </p>
3767   */
3768  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT);
3769
3770/**
3771   * Constant for fluent queries to be used to add include statements. Specifies
3772   * the path value of "<b>RequestGroup:participant</b>".
3773   */
3774  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("RequestGroup:participant").toLocked();
3775
3776 /**
3777   * Search parameter: <b>patient</b>
3778   * <p>
3779   * Description: <b>The identity of a patient to search for request groups</b><br>
3780   * Type: <b>reference</b><br>
3781   * Path: <b>RequestGroup.subject.where(resolve() is Patient)</b><br>
3782   * </p>
3783   */
3784  @SearchParamDefinition(name="patient", path="RequestGroup.subject.where(resolve() is Patient)", description="The identity of a patient to search for request groups", type="reference", target={Group.class, Patient.class } )
3785  public static final String SP_PATIENT = "patient";
3786 /**
3787   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3788   * <p>
3789   * Description: <b>The identity of a patient to search for request groups</b><br>
3790   * Type: <b>reference</b><br>
3791   * Path: <b>RequestGroup.subject.where(resolve() is Patient)</b><br>
3792   * </p>
3793   */
3794  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3795
3796/**
3797   * Constant for fluent queries to be used to add include statements. Specifies
3798   * the path value of "<b>RequestGroup:patient</b>".
3799   */
3800  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("RequestGroup:patient").toLocked();
3801
3802 /**
3803   * Search parameter: <b>priority</b>
3804   * <p>
3805   * Description: <b>The priority of the request group</b><br>
3806   * Type: <b>token</b><br>
3807   * Path: <b>RequestGroup.priority</b><br>
3808   * </p>
3809   */
3810  @SearchParamDefinition(name="priority", path="RequestGroup.priority", description="The priority of the request group", type="token" )
3811  public static final String SP_PRIORITY = "priority";
3812 /**
3813   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
3814   * <p>
3815   * Description: <b>The priority of the request group</b><br>
3816   * Type: <b>token</b><br>
3817   * Path: <b>RequestGroup.priority</b><br>
3818   * </p>
3819   */
3820  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
3821
3822 /**
3823   * Search parameter: <b>status</b>
3824   * <p>
3825   * Description: <b>The status of the request group</b><br>
3826   * Type: <b>token</b><br>
3827   * Path: <b>RequestGroup.status</b><br>
3828   * </p>
3829   */
3830  @SearchParamDefinition(name="status", path="RequestGroup.status", description="The status of the request group", type="token" )
3831  public static final String SP_STATUS = "status";
3832 /**
3833   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3834   * <p>
3835   * Description: <b>The status of the request group</b><br>
3836   * Type: <b>token</b><br>
3837   * Path: <b>RequestGroup.status</b><br>
3838   * </p>
3839   */
3840  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3841
3842 /**
3843   * Search parameter: <b>subject</b>
3844   * <p>
3845   * Description: <b>The subject that the request group is about</b><br>
3846   * Type: <b>reference</b><br>
3847   * Path: <b>RequestGroup.subject</b><br>
3848   * </p>
3849   */
3850  @SearchParamDefinition(name="subject", path="RequestGroup.subject", description="The subject that the request group is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } )
3851  public static final String SP_SUBJECT = "subject";
3852 /**
3853   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
3854   * <p>
3855   * Description: <b>The subject that the request group is about</b><br>
3856   * Type: <b>reference</b><br>
3857   * Path: <b>RequestGroup.subject</b><br>
3858   * </p>
3859   */
3860  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
3861
3862/**
3863   * Constant for fluent queries to be used to add include statements. Specifies
3864   * the path value of "<b>RequestGroup:subject</b>".
3865   */
3866  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("RequestGroup:subject").toLocked();
3867
3868
3869}
3870