001package org.hl7.fhir.r5.patterns;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, May 8, 2019 10:40+1000 for FHIR v4.1.0
054
055import org.hl7.fhir.r5.model.*;
056import org.hl7.fhir.r5.model.Enumeration;
057import java.util.*;
058
059import org.hl7.fhir.utilities.Utilities;
060import org.hl7.fhir.exceptions.FHIRException;
061/**
062 * A pattern to be followed by resources that represent a specific proposal, plan and/or order for some sort of action or service.
063 */
064public interface Request extends PatternBase {
065
066    public enum RequestStatus {
067        /**
068         * The request has been created but is not yet complete or ready for action.
069         */
070        DRAFT, 
071        /**
072         * The request is in force and ready to be acted upon.
073         */
074        ACTIVE, 
075        /**
076         * The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.
077         */
078        ONHOLD, 
079        /**
080         * The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions.  No further activity should occur.
081         */
082        REVOKED, 
083        /**
084         * The activity described by the request has been fully performed.  No further activity will occur.
085         */
086        COMPLETED, 
087        /**
088         * This request should never have existed and should be considered 'void'.  (It is possible that real-world decisions were based on it.  If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".).
089         */
090        ENTEREDINERROR, 
091        /**
092         * The authoring/source system does not know which of the status values currently applies for this request.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.
093         */
094        UNKNOWN, 
095        /**
096         * added to help the parsers with the generic types
097         */
098        NULL;
099        public static RequestStatus fromCode(String codeString) throws FHIRException {
100            if (codeString == null || "".equals(codeString))
101                return null;
102        if ("draft".equals(codeString))
103          return DRAFT;
104        if ("active".equals(codeString))
105          return ACTIVE;
106        if ("on-hold".equals(codeString))
107          return ONHOLD;
108        if ("revoked".equals(codeString))
109          return REVOKED;
110        if ("completed".equals(codeString))
111          return COMPLETED;
112        if ("entered-in-error".equals(codeString))
113          return ENTEREDINERROR;
114        if ("unknown".equals(codeString))
115          return UNKNOWN;
116        if (Configuration.isAcceptInvalidEnums())
117          return null;
118        else
119          throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
120        }
121        public String toCode() {
122          switch (this) {
123            case DRAFT: return "draft";
124            case ACTIVE: return "active";
125            case ONHOLD: return "on-hold";
126            case REVOKED: return "revoked";
127            case COMPLETED: return "completed";
128            case ENTEREDINERROR: return "entered-in-error";
129            case UNKNOWN: return "unknown";
130            default: return "?";
131          }
132        }
133        public String getSystem() {
134          switch (this) {
135            case DRAFT: return "http://hl7.org/fhir/request-status";
136            case ACTIVE: return "http://hl7.org/fhir/request-status";
137            case ONHOLD: return "http://hl7.org/fhir/request-status";
138            case REVOKED: return "http://hl7.org/fhir/request-status";
139            case COMPLETED: return "http://hl7.org/fhir/request-status";
140            case ENTEREDINERROR: return "http://hl7.org/fhir/request-status";
141            case UNKNOWN: return "http://hl7.org/fhir/request-status";
142            default: return "?";
143          }
144        }
145        public String getDefinition() {
146          switch (this) {
147            case DRAFT: return "The request has been created but is not yet complete or ready for action.";
148            case ACTIVE: return "The request is in force and ready to be acted upon.";
149            case ONHOLD: return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.";
150            case REVOKED: return "The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions.  No further activity should occur.";
151            case COMPLETED: return "The activity described by the request has been fully performed.  No further activity will occur.";
152            case ENTEREDINERROR: return "This request should never have existed and should be considered 'void'.  (It is possible that real-world decisions were based on it.  If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
153            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this request.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.";
154            default: return "?";
155          }
156        }
157        public String getDisplay() {
158          switch (this) {
159            case DRAFT: return "Draft";
160            case ACTIVE: return "Active";
161            case ONHOLD: return "On Hold";
162            case REVOKED: return "Revoked";
163            case COMPLETED: return "Completed";
164            case ENTEREDINERROR: return "Entered in Error";
165            case UNKNOWN: return "Unknown";
166            default: return "?";
167          }
168        }
169    }
170
171  public class RequestStatusEnumFactory implements EnumFactory<RequestStatus> {
172    public RequestStatus fromCode(String codeString) throws IllegalArgumentException {
173      if (codeString == null || "".equals(codeString))
174            if (codeString == null || "".equals(codeString))
175                return null;
176        if ("draft".equals(codeString))
177          return RequestStatus.DRAFT;
178        if ("active".equals(codeString))
179          return RequestStatus.ACTIVE;
180        if ("on-hold".equals(codeString))
181          return RequestStatus.ONHOLD;
182        if ("revoked".equals(codeString))
183          return RequestStatus.REVOKED;
184        if ("completed".equals(codeString))
185          return RequestStatus.COMPLETED;
186        if ("entered-in-error".equals(codeString))
187          return RequestStatus.ENTEREDINERROR;
188        if ("unknown".equals(codeString))
189          return RequestStatus.UNKNOWN;
190        throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'");
191        }
192        public Enumeration<RequestStatus> fromType(Base code) throws FHIRException {
193          if (code == null)
194            return null;
195          if (code.isEmpty())
196            return new Enumeration<RequestStatus>(this);
197          String codeString = ((PrimitiveType) code).asStringValue();
198          if (codeString == null || "".equals(codeString))
199            return null;
200        if ("draft".equals(codeString))
201          return new Enumeration<RequestStatus>(this, RequestStatus.DRAFT);
202        if ("active".equals(codeString))
203          return new Enumeration<RequestStatus>(this, RequestStatus.ACTIVE);
204        if ("on-hold".equals(codeString))
205          return new Enumeration<RequestStatus>(this, RequestStatus.ONHOLD);
206        if ("revoked".equals(codeString))
207          return new Enumeration<RequestStatus>(this, RequestStatus.REVOKED);
208        if ("completed".equals(codeString))
209          return new Enumeration<RequestStatus>(this, RequestStatus.COMPLETED);
210        if ("entered-in-error".equals(codeString))
211          return new Enumeration<RequestStatus>(this, RequestStatus.ENTEREDINERROR);
212        if ("unknown".equals(codeString))
213          return new Enumeration<RequestStatus>(this, RequestStatus.UNKNOWN);
214        throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
215        }
216    public String toCode(RequestStatus code) {
217      if (code == RequestStatus.DRAFT)
218        return "draft";
219      if (code == RequestStatus.ACTIVE)
220        return "active";
221      if (code == RequestStatus.ONHOLD)
222        return "on-hold";
223      if (code == RequestStatus.REVOKED)
224        return "revoked";
225      if (code == RequestStatus.COMPLETED)
226        return "completed";
227      if (code == RequestStatus.ENTEREDINERROR)
228        return "entered-in-error";
229      if (code == RequestStatus.UNKNOWN)
230        return "unknown";
231      return "?";
232      }
233    public String toSystem(RequestStatus code) {
234      return code.getSystem();
235      }
236    }
237
238    public enum RequestIntent {
239        /**
240         * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.
241         */
242        PROPOSAL, 
243        /**
244         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
245         */
246        PLAN, 
247        /**
248         * The request represents a legally binding instruction authored by a Patient or RelatedPerson.
249         */
250        DIRECTIVE, 
251        /**
252         * The request represents a request/demand and authorization for action by a Practitioner.
253         */
254        ORDER, 
255        /**
256         * The request represents an original authorization for action.
257         */
258        ORIGINALORDER, 
259        /**
260         * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.
261         */
262        REFLEXORDER, 
263        /**
264         * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
265         */
266        FILLERORDER, 
267        /**
268         * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.
269         */
270        INSTANCEORDER, 
271        /**
272         * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] for additional information on how this status is used.
273         */
274        OPTION, 
275        /**
276         * added to help the parsers with the generic types
277         */
278        NULL;
279        public static RequestIntent fromCode(String codeString) throws FHIRException {
280            if (codeString == null || "".equals(codeString))
281                return null;
282        if ("proposal".equals(codeString))
283          return PROPOSAL;
284        if ("plan".equals(codeString))
285          return PLAN;
286        if ("directive".equals(codeString))
287          return DIRECTIVE;
288        if ("order".equals(codeString))
289          return ORDER;
290        if ("original-order".equals(codeString))
291          return ORIGINALORDER;
292        if ("reflex-order".equals(codeString))
293          return REFLEXORDER;
294        if ("filler-order".equals(codeString))
295          return FILLERORDER;
296        if ("instance-order".equals(codeString))
297          return INSTANCEORDER;
298        if ("option".equals(codeString))
299          return OPTION;
300        if (Configuration.isAcceptInvalidEnums())
301          return null;
302        else
303          throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
304        }
305        public String toCode() {
306          switch (this) {
307            case PROPOSAL: return "proposal";
308            case PLAN: return "plan";
309            case DIRECTIVE: return "directive";
310            case ORDER: return "order";
311            case ORIGINALORDER: return "original-order";
312            case REFLEXORDER: return "reflex-order";
313            case FILLERORDER: return "filler-order";
314            case INSTANCEORDER: return "instance-order";
315            case OPTION: return "option";
316            default: return "?";
317          }
318        }
319        public String getSystem() {
320          switch (this) {
321            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
322            case PLAN: return "http://hl7.org/fhir/request-intent";
323            case DIRECTIVE: return "http://hl7.org/fhir/request-intent";
324            case ORDER: return "http://hl7.org/fhir/request-intent";
325            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
326            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
327            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
328            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
329            case OPTION: return "http://hl7.org/fhir/request-intent";
330            default: return "?";
331          }
332        }
333        public String getDefinition() {
334          switch (this) {
335            case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
336            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
337            case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson.";
338            case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner.";
339            case ORIGINALORDER: return "The request represents an original authorization for action.";
340            case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.";
341            case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
342            case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.";
343            case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] for additional information on how this status is used.";
344            default: return "?";
345          }
346        }
347        public String getDisplay() {
348          switch (this) {
349            case PROPOSAL: return "Proposal";
350            case PLAN: return "Plan";
351            case DIRECTIVE: return "Directive";
352            case ORDER: return "Order";
353            case ORIGINALORDER: return "Original Order";
354            case REFLEXORDER: return "Reflex Order";
355            case FILLERORDER: return "Filler Order";
356            case INSTANCEORDER: return "Instance Order";
357            case OPTION: return "Option";
358            default: return "?";
359          }
360        }
361    }
362
363  public class RequestIntentEnumFactory implements EnumFactory<RequestIntent> {
364    public RequestIntent fromCode(String codeString) throws IllegalArgumentException {
365      if (codeString == null || "".equals(codeString))
366            if (codeString == null || "".equals(codeString))
367                return null;
368        if ("proposal".equals(codeString))
369          return RequestIntent.PROPOSAL;
370        if ("plan".equals(codeString))
371          return RequestIntent.PLAN;
372        if ("directive".equals(codeString))
373          return RequestIntent.DIRECTIVE;
374        if ("order".equals(codeString))
375          return RequestIntent.ORDER;
376        if ("original-order".equals(codeString))
377          return RequestIntent.ORIGINALORDER;
378        if ("reflex-order".equals(codeString))
379          return RequestIntent.REFLEXORDER;
380        if ("filler-order".equals(codeString))
381          return RequestIntent.FILLERORDER;
382        if ("instance-order".equals(codeString))
383          return RequestIntent.INSTANCEORDER;
384        if ("option".equals(codeString))
385          return RequestIntent.OPTION;
386        throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'");
387        }
388        public Enumeration<RequestIntent> fromType(Base code) throws FHIRException {
389          if (code == null)
390            return null;
391          if (code.isEmpty())
392            return new Enumeration<RequestIntent>(this);
393          String codeString = ((PrimitiveType) code).asStringValue();
394          if (codeString == null || "".equals(codeString))
395            return null;
396        if ("proposal".equals(codeString))
397          return new Enumeration<RequestIntent>(this, RequestIntent.PROPOSAL);
398        if ("plan".equals(codeString))
399          return new Enumeration<RequestIntent>(this, RequestIntent.PLAN);
400        if ("directive".equals(codeString))
401          return new Enumeration<RequestIntent>(this, RequestIntent.DIRECTIVE);
402        if ("order".equals(codeString))
403          return new Enumeration<RequestIntent>(this, RequestIntent.ORDER);
404        if ("original-order".equals(codeString))
405          return new Enumeration<RequestIntent>(this, RequestIntent.ORIGINALORDER);
406        if ("reflex-order".equals(codeString))
407          return new Enumeration<RequestIntent>(this, RequestIntent.REFLEXORDER);
408        if ("filler-order".equals(codeString))
409          return new Enumeration<RequestIntent>(this, RequestIntent.FILLERORDER);
410        if ("instance-order".equals(codeString))
411          return new Enumeration<RequestIntent>(this, RequestIntent.INSTANCEORDER);
412        if ("option".equals(codeString))
413          return new Enumeration<RequestIntent>(this, RequestIntent.OPTION);
414        throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
415        }
416    public String toCode(RequestIntent code) {
417      if (code == RequestIntent.PROPOSAL)
418        return "proposal";
419      if (code == RequestIntent.PLAN)
420        return "plan";
421      if (code == RequestIntent.DIRECTIVE)
422        return "directive";
423      if (code == RequestIntent.ORDER)
424        return "order";
425      if (code == RequestIntent.ORIGINALORDER)
426        return "original-order";
427      if (code == RequestIntent.REFLEXORDER)
428        return "reflex-order";
429      if (code == RequestIntent.FILLERORDER)
430        return "filler-order";
431      if (code == RequestIntent.INSTANCEORDER)
432        return "instance-order";
433      if (code == RequestIntent.OPTION)
434        return "option";
435      return "?";
436      }
437    public String toSystem(RequestIntent code) {
438      return code.getSystem();
439      }
440    }
441
442    public enum RequestPriority {
443        /**
444         * The request has normal priority.
445         */
446        ROUTINE, 
447        /**
448         * The request should be actioned promptly - higher priority than routine.
449         */
450        URGENT, 
451        /**
452         * The request should be actioned as soon as possible - higher priority than urgent.
453         */
454        ASAP, 
455        /**
456         * The request should be actioned immediately - highest possible priority.  E.g. an emergency.
457         */
458        STAT, 
459        /**
460         * added to help the parsers with the generic types
461         */
462        NULL;
463        public static RequestPriority fromCode(String codeString) throws FHIRException {
464            if (codeString == null || "".equals(codeString))
465                return null;
466        if ("routine".equals(codeString))
467          return ROUTINE;
468        if ("urgent".equals(codeString))
469          return URGENT;
470        if ("asap".equals(codeString))
471          return ASAP;
472        if ("stat".equals(codeString))
473          return STAT;
474        if (Configuration.isAcceptInvalidEnums())
475          return null;
476        else
477          throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
478        }
479        public String toCode() {
480          switch (this) {
481            case ROUTINE: return "routine";
482            case URGENT: return "urgent";
483            case ASAP: return "asap";
484            case STAT: return "stat";
485            default: return "?";
486          }
487        }
488        public String getSystem() {
489          switch (this) {
490            case ROUTINE: return "http://hl7.org/fhir/request-priority";
491            case URGENT: return "http://hl7.org/fhir/request-priority";
492            case ASAP: return "http://hl7.org/fhir/request-priority";
493            case STAT: return "http://hl7.org/fhir/request-priority";
494            default: return "?";
495          }
496        }
497        public String getDefinition() {
498          switch (this) {
499            case ROUTINE: return "The request has normal priority.";
500            case URGENT: return "The request should be actioned promptly - higher priority than routine.";
501            case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent.";
502            case STAT: return "The request should be actioned immediately - highest possible priority.  E.g. an emergency.";
503            default: return "?";
504          }
505        }
506        public String getDisplay() {
507          switch (this) {
508            case ROUTINE: return "Routine";
509            case URGENT: return "Urgent";
510            case ASAP: return "ASAP";
511            case STAT: return "STAT";
512            default: return "?";
513          }
514        }
515    }
516
517  public class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> {
518    public RequestPriority fromCode(String codeString) throws IllegalArgumentException {
519      if (codeString == null || "".equals(codeString))
520            if (codeString == null || "".equals(codeString))
521                return null;
522        if ("routine".equals(codeString))
523          return RequestPriority.ROUTINE;
524        if ("urgent".equals(codeString))
525          return RequestPriority.URGENT;
526        if ("asap".equals(codeString))
527          return RequestPriority.ASAP;
528        if ("stat".equals(codeString))
529          return RequestPriority.STAT;
530        throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'");
531        }
532        public Enumeration<RequestPriority> fromType(Base code) throws FHIRException {
533          if (code == null)
534            return null;
535          if (code.isEmpty())
536            return new Enumeration<RequestPriority>(this);
537          String codeString = ((PrimitiveType) code).asStringValue();
538          if (codeString == null || "".equals(codeString))
539            return null;
540        if ("routine".equals(codeString))
541          return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE);
542        if ("urgent".equals(codeString))
543          return new Enumeration<RequestPriority>(this, RequestPriority.URGENT);
544        if ("asap".equals(codeString))
545          return new Enumeration<RequestPriority>(this, RequestPriority.ASAP);
546        if ("stat".equals(codeString))
547          return new Enumeration<RequestPriority>(this, RequestPriority.STAT);
548        throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
549        }
550    public String toCode(RequestPriority code) {
551      if (code == RequestPriority.ROUTINE)
552        return "routine";
553      if (code == RequestPriority.URGENT)
554        return "urgent";
555      if (code == RequestPriority.ASAP)
556        return "asap";
557      if (code == RequestPriority.STAT)
558        return "stat";
559      return "?";
560      }
561    public String toSystem(RequestPriority code) {
562      return code.getSystem();
563      }
564    }
565
566    /**
567     * @return {@link #identifier} (Business identifiers assigned to this {{title}} by the author and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.)
568     */
569    public List<Identifier> getIdentifier() throws FHIRException;
570
571    /**
572     * @return Returns a reference to <code>this</code> for easy method chaining
573     */
574    public Request setIdentifier(List<Identifier> theIdentifier) throws FHIRException;
575
576    /**
577     * @return whether there is more than zero values for identifier
578     */
579    public boolean hasIdentifier();
580    /**
581     * @return minimum allowed cardinality for identifier. Note that with patterns, this may be different for the underlying resource
582     */
583    public int getIdentifierMin();
584    /**
585     * @return maximum allowed cardinality for identifier. Note that with patterns, this may be different for the underlying resource
586     */
587    public int getIdentifierMax();
588
589    public Identifier addIdentifier() throws FHIRException;
590
591    public Request addIdentifier(Identifier t) throws FHIRException;
592
593    /**
594     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
595     */
596    public Identifier getIdentifierFirstRep() throws FHIRException;
597
598    /**
599     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
600     */
601    public List<CanonicalType> getInstantiatesCanonical() throws FHIRException;
602
603    /**
604     * @return Returns a reference to <code>this</code> for easy method chaining
605     */
606    public Request setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) throws FHIRException;
607
608    /**
609     * @return whether there is more than zero values for instantiatesCanonical
610     */
611    public boolean hasInstantiatesCanonical();
612    /**
613     * @return minimum allowed cardinality for instantiatesCanonical. Note that with patterns, this may be different for the underlying resource
614     */
615    public int getInstantiatesCanonicalMin();
616    /**
617     * @return maximum allowed cardinality for instantiatesCanonical. Note that with patterns, this may be different for the underlying resource
618     */
619    public int getInstantiatesCanonicalMax();
620
621    /**
622     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
623     */
624    public CanonicalType addInstantiatesCanonicalElement() throws FHIRException;
625
626    /**
627     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
628     */
629    public Request addInstantiatesCanonical(String value) throws FHIRException;
630
631    /**
632     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
633     */
634    public boolean hasInstantiatesCanonical(String value)  throws FHIRException;
635
636    /**
637     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
638     */
639    public List<UriType> getInstantiatesUri() throws FHIRException;
640
641    /**
642     * @return Returns a reference to <code>this</code> for easy method chaining
643     */
644    public Request setInstantiatesUri(List<UriType> theInstantiatesUri) throws FHIRException;
645
646    /**
647     * @return whether there is more than zero values for instantiatesUri
648     */
649    public boolean hasInstantiatesUri();
650    /**
651     * @return minimum allowed cardinality for instantiatesUri. Note that with patterns, this may be different for the underlying resource
652     */
653    public int getInstantiatesUriMin();
654    /**
655     * @return maximum allowed cardinality for instantiatesUri. Note that with patterns, this may be different for the underlying resource
656     */
657    public int getInstantiatesUriMax();
658
659    /**
660     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
661     */
662    public UriType addInstantiatesUriElement() throws FHIRException;
663
664    /**
665     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
666     */
667    public Request addInstantiatesUri(String value) throws FHIRException;
668
669    /**
670     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this {{title}}.)
671     */
672    public boolean hasInstantiatesUri(String value)  throws FHIRException;
673
674    /**
675     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this {{title}}.)
676     */
677    public List<Reference> getBasedOn() throws FHIRException;
678
679    /**
680     * @return Returns a reference to <code>this</code> for easy method chaining
681     */
682    public Request setBasedOn(List<Reference> theBasedOn) throws FHIRException;
683
684    /**
685     * @return whether there is more than zero values for basedOn
686     */
687    public boolean hasBasedOn();
688    /**
689     * @return minimum allowed cardinality for basedOn. Note that with patterns, this may be different for the underlying resource
690     */
691    public int getBasedOnMin();
692    /**
693     * @return maximum allowed cardinality for basedOn. Note that with patterns, this may be different for the underlying resource
694     */
695    public int getBasedOnMax();
696
697    public Reference addBasedOn() throws FHIRException;
698
699    public Request addBasedOn(Reference t) throws FHIRException;
700
701    /**
702     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist
703     */
704    public Reference getBasedOnFirstRep() throws FHIRException;
705
706    /**
707     * @return {@link #replaces} (Completed or terminated request(s) whose function is taken by this new {{title}}.)
708     */
709    public List<Reference> getReplaces() throws FHIRException;
710
711    /**
712     * @return Returns a reference to <code>this</code> for easy method chaining
713     */
714    public Request setReplaces(List<Reference> theReplaces) throws FHIRException;
715
716    /**
717     * @return whether there is more than zero values for replaces
718     */
719    public boolean hasReplaces();
720    /**
721     * @return minimum allowed cardinality for replaces. Note that with patterns, this may be different for the underlying resource
722     */
723    public int getReplacesMin();
724    /**
725     * @return maximum allowed cardinality for replaces. Note that with patterns, this may be different for the underlying resource
726     */
727    public int getReplacesMax();
728
729    public Reference addReplaces() throws FHIRException;
730
731    public Request addReplaces(Reference t) throws FHIRException;
732
733    /**
734     * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist
735     */
736    public Reference getReplacesFirstRep() throws FHIRException;
737
738    /**
739     * @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.)
740     */
741    public Identifier getGroupIdentifier() throws FHIRException ;
742
743    /**
744     * @return whether there is more than zero values for groupIdentifier
745     */
746    public boolean hasGroupIdentifier();
747    /**
748     * @return minimum allowed cardinality for groupIdentifier. Note that with patterns, this may be different for the underlying resource
749     */
750    public int getGroupIdentifierMin();
751    /**
752     * @return maximum allowed cardinality for groupIdentifier. Note that with patterns, this may be different for the underlying resource
753     */
754    public int getGroupIdentifierMax();
755    /**
756     * @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.)
757     */
758    public Request setGroupIdentifier(Identifier value) throws FHIRException;
759
760    /**
761     * @return {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
762     */
763    public Enumeration<RequestStatus> getStatusElement() throws FHIRException;
764
765    /**
766     * @return whether there is more than zero values for status
767     */
768    public boolean hasStatus();
769    /**
770     * @return minimum allowed cardinality for status. Note that with patterns, this may be different for the underlying resource
771     */
772    public int getStatusMin() throws FHIRException;
773    /**
774     * @return maximum allowed cardinality for status. Note that with patterns, this may be different for the underlying resource
775     */
776    public int getStatusMax() throws FHIRException;
777    public boolean hasStatusElement();
778
779    /**
780     * @param value {@link #status} (The current state of the {{title}}.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
781     */
782    public Request setStatusElement(Enumeration<RequestStatus> value) throws FHIRException;
783
784    /**
785     * @return The current state of the {{title}}.
786     */
787    public RequestStatus getStatus() throws FHIRException;
788
789    /**
790     * @param value The current state of the {{title}}.
791     */
792    public Request setStatus(RequestStatus value) throws FHIRException;
793
794    /**
795     * @return {@link #statusReason} (Captures the reason for the current state of the {{title}}.)
796     */
797    public CodeableConcept getStatusReason() throws FHIRException ;
798
799    /**
800     * @return whether there is more than zero values for statusReason
801     */
802    public boolean hasStatusReason();
803    /**
804     * @return minimum allowed cardinality for statusReason. Note that with patterns, this may be different for the underlying resource
805     */
806    public int getStatusReasonMin();
807    /**
808     * @return maximum allowed cardinality for statusReason. Note that with patterns, this may be different for the underlying resource
809     */
810    public int getStatusReasonMax();
811    /**
812     * @param value {@link #statusReason} (Captures the reason for the current state of the {{title}}.)
813     */
814    public Request setStatusReason(CodeableConcept value) throws FHIRException;
815
816    /**
817     * @return {@link #intent} (Indicates the level of authority/intentionality associated with the {{title}} 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
818     */
819    public Enumeration<RequestIntent> getIntentElement() throws FHIRException;
820
821    /**
822     * @return whether there is more than zero values for intent
823     */
824    public boolean hasIntent();
825    /**
826     * @return minimum allowed cardinality for intent. Note that with patterns, this may be different for the underlying resource
827     */
828    public int getIntentMin() throws FHIRException;
829    /**
830     * @return maximum allowed cardinality for intent. Note that with patterns, this may be different for the underlying resource
831     */
832    public int getIntentMax() throws FHIRException;
833    public boolean hasIntentElement();
834
835    /**
836     * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the {{title}} 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
837     */
838    public Request setIntentElement(Enumeration<RequestIntent> value) throws FHIRException;
839
840    /**
841     * @return Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain.
842     */
843    public RequestIntent getIntent() throws FHIRException;
844
845    /**
846     * @param value Indicates the level of authority/intentionality associated with the {{title}} and where the request fits into the workflow chain.
847     */
848    public Request setIntent(RequestIntent value) throws FHIRException;
849
850    /**
851     * @return {@link #priority} (Indicates how quickly the {{title}} 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
852     */
853    public Enumeration<RequestPriority> getPriorityElement() throws FHIRException;
854
855    /**
856     * @return whether there is more than zero values for priority
857     */
858    public boolean hasPriority();
859    /**
860     * @return minimum allowed cardinality for priority. Note that with patterns, this may be different for the underlying resource
861     */
862    public int getPriorityMin() throws FHIRException;
863    /**
864     * @return maximum allowed cardinality for priority. Note that with patterns, this may be different for the underlying resource
865     */
866    public int getPriorityMax() throws FHIRException;
867    public boolean hasPriorityElement();
868
869    /**
870     * @param value {@link #priority} (Indicates how quickly the {{title}} 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
871     */
872    public Request setPriorityElement(Enumeration<RequestPriority> value) throws FHIRException;
873
874    /**
875     * @return Indicates how quickly the {{title}} should be addressed with respect to other requests.
876     */
877    public RequestPriority getPriority() throws FHIRException;
878
879    /**
880     * @param value Indicates how quickly the {{title}} should be addressed with respect to other requests.
881     */
882    public Request setPriority(RequestPriority value) throws FHIRException;
883
884    /**
885     * @return {@link #doNotPerform} (If true indicates that the {{title}} is asking for the specified action to *not* occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
886     */
887    public BooleanType getDoNotPerformElement() throws FHIRException;
888
889    /**
890     * @return whether there is more than zero values for doNotPerform
891     */
892    public boolean hasDoNotPerform();
893    /**
894     * @return minimum allowed cardinality for doNotPerform. Note that with patterns, this may be different for the underlying resource
895     */
896    public int getDoNotPerformMin() throws FHIRException;
897    /**
898     * @return maximum allowed cardinality for doNotPerform. Note that with patterns, this may be different for the underlying resource
899     */
900    public int getDoNotPerformMax() throws FHIRException;
901    public boolean hasDoNotPerformElement();
902
903    /**
904     * @param value {@link #doNotPerform} (If true indicates that the {{title}} is asking for the specified action to *not* occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
905     */
906    public Request setDoNotPerformElement(BooleanType value) throws FHIRException;
907
908    /**
909     * @return If true indicates that the {{title}} is asking for the specified action to *not* occur.
910     */
911    public boolean getDoNotPerform() throws FHIRException;
912
913    /**
914     * @param value If true indicates that the {{title}} is asking for the specified action to *not* occur.
915     */
916    public Request setDoNotPerform(boolean value) throws FHIRException;
917
918    /**
919     * @return {@link #code} (A code that identifies the specific service or action being asked to be done (or not done).)
920     */
921    public CodeableConcept getCode() throws FHIRException ;
922
923    /**
924     * @return whether there is more than zero values for code
925     */
926    public boolean hasCode();
927    /**
928     * @return minimum allowed cardinality for code. Note that with patterns, this may be different for the underlying resource
929     */
930    public int getCodeMin();
931    /**
932     * @return maximum allowed cardinality for code. Note that with patterns, this may be different for the underlying resource
933     */
934    public int getCodeMax();
935    /**
936     * @param value {@link #code} (A code that identifies the specific service or action being asked to be done (or not done).)
937     */
938    public Request setCode(CodeableConcept value) throws FHIRException;
939
940    /**
941     * @return {@link #subject} (The individual or set of individuals the action is to be performed/not performed on or for.)
942     */
943    public Reference getSubject() throws FHIRException ;
944
945    /**
946     * @return whether there is more than zero values for subject
947     */
948    public boolean hasSubject();
949    /**
950     * @return minimum allowed cardinality for subject. Note that with patterns, this may be different for the underlying resource
951     */
952    public int getSubjectMin();
953    /**
954     * @return maximum allowed cardinality for subject. Note that with patterns, this may be different for the underlying resource
955     */
956    public int getSubjectMax();
957    /**
958     * @param value {@link #subject} (The individual or set of individuals the action is to be performed/not performed on or for.)
959     */
960    public Request setSubject(Reference value) throws FHIRException;
961
962    /**
963     * @return {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.)
964     */
965    public Reference getEncounter() throws FHIRException ;
966
967    /**
968     * @return whether there is more than zero values for encounter
969     */
970    public boolean hasEncounter();
971    /**
972     * @return minimum allowed cardinality for encounter. Note that with patterns, this may be different for the underlying resource
973     */
974    public int getEncounterMin();
975    /**
976     * @return maximum allowed cardinality for encounter. Note that with patterns, this may be different for the underlying resource
977     */
978    public int getEncounterMax();
979    /**
980     * @param value {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.)
981     */
982    public Request setEncounter(Reference value) throws FHIRException;
983
984    /**
985     * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.)
986     */
987    public DataType getOccurrence() throws FHIRException ;
988
989    /**
990     * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.)
991     */
992    public DateTimeType getOccurrenceDateTimeType() throws FHIRException;
993
994    public boolean hasOccurrenceDateTimeType();
995
996    /**
997     * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.)
998     */
999    public Period getOccurrencePeriod() throws FHIRException;
1000
1001    public boolean hasOccurrencePeriod();
1002
1003    /**
1004     * @return {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.)
1005     */
1006    public Timing getOccurrenceTiming() throws FHIRException;
1007
1008    public boolean hasOccurrenceTiming();
1009
1010    /**
1011     * @return whether there is more than zero values for occurrence
1012     */
1013    public boolean hasOccurrence();
1014    /**
1015     * @return minimum allowed cardinality for occurrence. Note that with patterns, this may be different for the underlying resource
1016     */
1017    public int getOccurrenceMin();
1018    /**
1019     * @return maximum allowed cardinality for occurrence. Note that with patterns, this may be different for the underlying resource
1020     */
1021    public int getOccurrenceMax();
1022    /**
1023     * @param value {@link #occurrence} (The date or time(s) at which the activity or service is desired to occur or not occur.)
1024     */
1025    public Request setOccurrence(DataType value) throws FHIRException;
1026
1027    /**
1028     * @return {@link #authoredOn} (For draft {{title}}s, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1029     */
1030    public DateTimeType getAuthoredOnElement() throws FHIRException;
1031
1032    /**
1033     * @return whether there is more than zero values for authoredOn
1034     */
1035    public boolean hasAuthoredOn();
1036    /**
1037     * @return minimum allowed cardinality for authoredOn. Note that with patterns, this may be different for the underlying resource
1038     */
1039    public int getAuthoredOnMin() throws FHIRException;
1040    /**
1041     * @return maximum allowed cardinality for authoredOn. Note that with patterns, this may be different for the underlying resource
1042     */
1043    public int getAuthoredOnMax() throws FHIRException;
1044    public boolean hasAuthoredOnElement();
1045
1046    /**
1047     * @param value {@link #authoredOn} (For draft {{title}}s, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1048     */
1049    public Request setAuthoredOnElement(DateTimeType value) throws FHIRException;
1050
1051    /**
1052     * @return For draft {{title}}s, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.
1053     */
1054    public Date getAuthoredOn() throws FHIRException;
1055
1056    /**
1057     * @param value For draft {{title}}s, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.
1058     */
1059    public Request setAuthoredOn(Date value) throws FHIRException;
1060
1061    /**
1062     * @return {@link #requester} (Who initiated the {{request}} and has responsibility for its activation.)
1063     */
1064    public Reference getRequester() throws FHIRException ;
1065
1066    /**
1067     * @return whether there is more than zero values for requester
1068     */
1069    public boolean hasRequester();
1070    /**
1071     * @return minimum allowed cardinality for requester. Note that with patterns, this may be different for the underlying resource
1072     */
1073    public int getRequesterMin();
1074    /**
1075     * @return maximum allowed cardinality for requester. Note that with patterns, this may be different for the underlying resource
1076     */
1077    public int getRequesterMax();
1078    /**
1079     * @param value {@link #requester} (Who initiated the {{request}} and has responsibility for its activation.)
1080     */
1081    public Request setRequester(Reference value) throws FHIRException;
1082
1083    /**
1084     * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report.)
1085     */
1086    public DataType getReported() throws FHIRException ;
1087
1088    /**
1089     * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report.)
1090     */
1091    public BooleanType getReportedBooleanType() throws FHIRException;
1092
1093    public boolean hasReportedBooleanType();
1094
1095    /**
1096     * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report.)
1097     */
1098    public Reference getReportedReference() throws FHIRException;
1099
1100    public boolean hasReportedReference();
1101
1102    /**
1103     * @return whether there is more than zero values for reported
1104     */
1105    public boolean hasReported();
1106    /**
1107     * @return minimum allowed cardinality for reported. Note that with patterns, this may be different for the underlying resource
1108     */
1109    public int getReportedMin();
1110    /**
1111     * @return maximum allowed cardinality for reported. Note that with patterns, this may be different for the underlying resource
1112     */
1113    public int getReportedMax();
1114    /**
1115     * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report.)
1116     */
1117    public Request setReported(DataType value) throws FHIRException;
1118
1119    /**
1120     * @return {@link #performerType} (The type of individual that is desired to act upon/ not act upon the {{request}}.)
1121     */
1122    public CodeableConcept getPerformerType() throws FHIRException ;
1123
1124    /**
1125     * @return whether there is more than zero values for performerType
1126     */
1127    public boolean hasPerformerType();
1128    /**
1129     * @return minimum allowed cardinality for performerType. Note that with patterns, this may be different for the underlying resource
1130     */
1131    public int getPerformerTypeMin();
1132    /**
1133     * @return maximum allowed cardinality for performerType. Note that with patterns, this may be different for the underlying resource
1134     */
1135    public int getPerformerTypeMax();
1136    /**
1137     * @param value {@link #performerType} (The type of individual that is desired to act upon/ not act upon the {{request}}.)
1138     */
1139    public Request setPerformerType(CodeableConcept value) throws FHIRException;
1140
1141    /**
1142     * @return {@link #performer} (Indicates who or what is being asked to perform (or not perform) the {{request}}.)
1143     */
1144    public Reference getPerformer() throws FHIRException ;
1145
1146    /**
1147     * @return whether there is more than zero values for performer
1148     */
1149    public boolean hasPerformer();
1150    /**
1151     * @return minimum allowed cardinality for performer. Note that with patterns, this may be different for the underlying resource
1152     */
1153    public int getPerformerMin();
1154    /**
1155     * @return maximum allowed cardinality for performer. Note that with patterns, this may be different for the underlying resource
1156     */
1157    public int getPerformerMax();
1158    /**
1159     * @param value {@link #performer} (Indicates who or what is being asked to perform (or not perform) the {{request}}.)
1160     */
1161    public Request setPerformer(Reference value) throws FHIRException;
1162
1163    /**
1164     * @return {@link #reasonCode} (Describes why the request is being made in coded or textual form.)
1165     */
1166    public List<CodeableConcept> getReasonCode() throws FHIRException;
1167
1168    /**
1169     * @return Returns a reference to <code>this</code> for easy method chaining
1170     */
1171    public Request setReasonCode(List<CodeableConcept> theReasonCode) throws FHIRException;
1172
1173    /**
1174     * @return whether there is more than zero values for reasonCode
1175     */
1176    public boolean hasReasonCode();
1177    /**
1178     * @return minimum allowed cardinality for reasonCode. Note that with patterns, this may be different for the underlying resource
1179     */
1180    public int getReasonCodeMin();
1181    /**
1182     * @return maximum allowed cardinality for reasonCode. Note that with patterns, this may be different for the underlying resource
1183     */
1184    public int getReasonCodeMax();
1185
1186    public CodeableConcept addReasonCode() throws FHIRException;
1187
1188    public Request addReasonCode(CodeableConcept t) throws FHIRException;
1189
1190    /**
1191     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
1192     */
1193    public CodeableConcept getReasonCodeFirstRep() throws FHIRException;
1194
1195    /**
1196     * @return {@link #reasonReference} (Indicates another resource whose existence justifies this request.)
1197     */
1198    public List<Reference> getReasonReference() throws FHIRException;
1199
1200    /**
1201     * @return Returns a reference to <code>this</code> for easy method chaining
1202     */
1203    public Request setReasonReference(List<Reference> theReasonReference) throws FHIRException;
1204
1205    /**
1206     * @return whether there is more than zero values for reasonReference
1207     */
1208    public boolean hasReasonReference();
1209    /**
1210     * @return minimum allowed cardinality for reasonReference. Note that with patterns, this may be different for the underlying resource
1211     */
1212    public int getReasonReferenceMin();
1213    /**
1214     * @return maximum allowed cardinality for reasonReference. Note that with patterns, this may be different for the underlying resource
1215     */
1216    public int getReasonReferenceMax();
1217
1218    public Reference addReasonReference() throws FHIRException;
1219
1220    public Request addReasonReference(Reference t) throws FHIRException;
1221
1222    /**
1223     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
1224     */
1225    public Reference getReasonReferenceFirstRep() throws FHIRException;
1226
1227    /**
1228     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant in delivering the requested service.)
1229     */
1230    public List<Reference> getInsurance() throws FHIRException;
1231
1232    /**
1233     * @return Returns a reference to <code>this</code> for easy method chaining
1234     */
1235    public Request setInsurance(List<Reference> theInsurance) throws FHIRException;
1236
1237    /**
1238     * @return whether there is more than zero values for insurance
1239     */
1240    public boolean hasInsurance();
1241    /**
1242     * @return minimum allowed cardinality for insurance. Note that with patterns, this may be different for the underlying resource
1243     */
1244    public int getInsuranceMin();
1245    /**
1246     * @return maximum allowed cardinality for insurance. Note that with patterns, this may be different for the underlying resource
1247     */
1248    public int getInsuranceMax();
1249
1250    public Reference addInsurance() throws FHIRException;
1251
1252    public Request addInsurance(Reference t) throws FHIRException;
1253
1254    /**
1255     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist
1256     */
1257    public Reference getInsuranceFirstRep() throws FHIRException;
1258
1259    /**
1260     * @return {@link #supportingInfo} (Information that may be needed by/relevant to the performer in their execution of this {{title}}.)
1261     */
1262    public List<Reference> getSupportingInfo() throws FHIRException;
1263
1264    /**
1265     * @return Returns a reference to <code>this</code> for easy method chaining
1266     */
1267    public Request setSupportingInfo(List<Reference> theSupportingInfo) throws FHIRException;
1268
1269    /**
1270     * @return whether there is more than zero values for supportingInfo
1271     */
1272    public boolean hasSupportingInfo();
1273    /**
1274     * @return minimum allowed cardinality for supportingInfo. Note that with patterns, this may be different for the underlying resource
1275     */
1276    public int getSupportingInfoMin();
1277    /**
1278     * @return maximum allowed cardinality for supportingInfo. Note that with patterns, this may be different for the underlying resource
1279     */
1280    public int getSupportingInfoMax();
1281
1282    public Reference addSupportingInfo() throws FHIRException;
1283
1284    public Request addSupportingInfo(Reference t) throws FHIRException;
1285
1286    /**
1287     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist
1288     */
1289    public Reference getSupportingInfoFirstRep() throws FHIRException;
1290
1291    /**
1292     * @return {@link #note} (Comments made about the {{title}} by the requester, performer, subject or other participants.)
1293     */
1294    public List<Annotation> getNote() throws FHIRException;
1295
1296    /**
1297     * @return Returns a reference to <code>this</code> for easy method chaining
1298     */
1299    public Request setNote(List<Annotation> theNote) throws FHIRException;
1300
1301    /**
1302     * @return whether there is more than zero values for note
1303     */
1304    public boolean hasNote();
1305    /**
1306     * @return minimum allowed cardinality for note. Note that with patterns, this may be different for the underlying resource
1307     */
1308    public int getNoteMin();
1309    /**
1310     * @return maximum allowed cardinality for note. Note that with patterns, this may be different for the underlying resource
1311     */
1312    public int getNoteMax();
1313
1314    public Annotation addNote() throws FHIRException;
1315
1316    public Request addNote(Annotation t) throws FHIRException;
1317
1318    /**
1319     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
1320     */
1321    public Annotation getNoteFirstRep() throws FHIRException;
1322
1323    /**
1324     * @return {@link #relevantHistory} (Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.)
1325     */
1326    public List<Reference> getRelevantHistory() throws FHIRException;
1327
1328    /**
1329     * @return Returns a reference to <code>this</code> for easy method chaining
1330     */
1331    public Request setRelevantHistory(List<Reference> theRelevantHistory) throws FHIRException;
1332
1333    /**
1334     * @return whether there is more than zero values for relevantHistory
1335     */
1336    public boolean hasRelevantHistory();
1337    /**
1338     * @return minimum allowed cardinality for relevantHistory. Note that with patterns, this may be different for the underlying resource
1339     */
1340    public int getRelevantHistoryMin();
1341    /**
1342     * @return maximum allowed cardinality for relevantHistory. Note that with patterns, this may be different for the underlying resource
1343     */
1344    public int getRelevantHistoryMax();
1345
1346    public Reference addRelevantHistory() throws FHIRException;
1347
1348    public Request addRelevantHistory(Reference t) throws FHIRException;
1349
1350    /**
1351     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist
1352     */
1353    public Reference getRelevantHistoryFirstRep() throws FHIRException;
1354
1355  public String fhirType();
1356
1357
1358}
1359