001package org.hl7.fhir.r5.patterns;
002
003
004
005
006import java.util.Date;
007import java.util.List;
008
009import org.hl7.fhir.exceptions.FHIRException;
010
011/*
012  Copyright (c) 2011+, HL7, Inc.
013  All rights reserved.
014  
015  Redistribution and use in source and binary forms, with or without modification, 
016  are permitted provided that the following conditions are met:
017  
018   * Redistributions of source code must retain the above copyright notice, this 
019     list of conditions and the following disclaimer.
020   * Redistributions in binary form must reproduce the above copyright notice, 
021     this list of conditions and the following disclaimer in the documentation 
022     and/or other materials provided with the distribution.
023   * Neither the name of HL7 nor the names of its contributors may be used to 
024     endorse or promote products derived from this software without specific 
025     prior written permission.
026  
027  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
028  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
029  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
030  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
031  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
032  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
033  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
034  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
035  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
036  POSSIBILITY OF SUCH DAMAGE.
037  
038*/
039
040// Generated on Wed, May 8, 2019 10:40+1000 for FHIR v4.1.0
041import org.hl7.fhir.r5.model.Annotation;
042import org.hl7.fhir.r5.model.Base;
043import org.hl7.fhir.r5.model.BooleanType;
044import org.hl7.fhir.r5.model.CanonicalType;
045import org.hl7.fhir.r5.model.CodeableConcept;
046import org.hl7.fhir.r5.model.Configuration;
047import org.hl7.fhir.r5.model.DataType;
048import org.hl7.fhir.r5.model.DateTimeType;
049import org.hl7.fhir.r5.model.EnumFactory;
050import org.hl7.fhir.r5.model.Enumeration;
051import org.hl7.fhir.r5.model.Identifier;
052import org.hl7.fhir.r5.model.Period;
053import org.hl7.fhir.r5.model.PrimitiveType;
054import org.hl7.fhir.r5.model.Reference;
055import org.hl7.fhir.r5.model.Timing;
056import org.hl7.fhir.r5.model.UriType;
057/**
058 * A pattern to be followed by resources that represent the performance of some activity, possibly in accordance with a request or service definition.
059 */
060public interface Event extends PatternBase {
061
062    public enum EventStatus {
063        /**
064         * The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.
065         */
066        PREPARATION, 
067        /**
068         * The event is currently occurring.
069         */
070        INPROGRESS, 
071        /**
072         * The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.
073         */
074        NOTDONE, 
075        /**
076         * The event has been temporarily stopped but is expected to resume in the future.
077         */
078        ONHOLD, 
079        /**
080         * The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.
081         */
082        STOPPED, 
083        /**
084         * The event has now concluded.
085         */
086        COMPLETED, 
087        /**
088         * This electronic record should never have existed, though 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 event.  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 EventStatus fromCode(String codeString) throws FHIRException {
100            if (codeString == null || "".equals(codeString))
101                return null;
102        if ("preparation".equals(codeString))
103          return PREPARATION;
104        if ("in-progress".equals(codeString))
105          return INPROGRESS;
106        if ("not-done".equals(codeString))
107          return NOTDONE;
108        if ("on-hold".equals(codeString))
109          return ONHOLD;
110        if ("stopped".equals(codeString))
111          return STOPPED;
112        if ("completed".equals(codeString))
113          return COMPLETED;
114        if ("entered-in-error".equals(codeString))
115          return ENTEREDINERROR;
116        if ("unknown".equals(codeString))
117          return UNKNOWN;
118        if (Configuration.isAcceptInvalidEnums())
119          return null;
120        else
121          throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
122        }
123        public String toCode() {
124          switch (this) {
125            case PREPARATION: return "preparation";
126            case INPROGRESS: return "in-progress";
127            case NOTDONE: return "not-done";
128            case ONHOLD: return "on-hold";
129            case STOPPED: return "stopped";
130            case COMPLETED: return "completed";
131            case ENTEREDINERROR: return "entered-in-error";
132            case UNKNOWN: return "unknown";
133            case NULL: return null;
134            default: return "?";
135          }
136        }
137        public String getSystem() {
138          switch (this) {
139            case PREPARATION: return "http://hl7.org/fhir/event-status";
140            case INPROGRESS: return "http://hl7.org/fhir/event-status";
141            case NOTDONE: return "http://hl7.org/fhir/event-status";
142            case ONHOLD: return "http://hl7.org/fhir/event-status";
143            case STOPPED: return "http://hl7.org/fhir/event-status";
144            case COMPLETED: return "http://hl7.org/fhir/event-status";
145            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
146            case UNKNOWN: return "http://hl7.org/fhir/event-status";
147            case NULL: return null;
148            default: return "?";
149          }
150        }
151        public String getDefinition() {
152          switch (this) {
153            case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.";
154            case INPROGRESS: return "The event is currently occurring.";
155            case NOTDONE: return "The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.";
156            case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future.";
157            case STOPPED: return "The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.";
158            case COMPLETED: return "The event has now concluded.";
159            case ENTEREDINERROR: return "This electronic record should never have existed, though 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\".).";
160            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this event.  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.";
161            case NULL: return null;
162            default: return "?";
163          }
164        }
165        public String getDisplay() {
166          switch (this) {
167            case PREPARATION: return "Preparation";
168            case INPROGRESS: return "In Progress";
169            case NOTDONE: return "Not Done";
170            case ONHOLD: return "On Hold";
171            case STOPPED: return "Stopped";
172            case COMPLETED: return "Completed";
173            case ENTEREDINERROR: return "Entered in Error";
174            case UNKNOWN: return "Unknown";
175            case NULL: return null;
176            default: return "?";
177          }
178        }
179    }
180
181  public class EventStatusEnumFactory implements EnumFactory<EventStatus> {
182    public EventStatus fromCode(String codeString) throws IllegalArgumentException {
183      if (codeString == null || "".equals(codeString))
184            if (codeString == null || "".equals(codeString))
185                return null;
186        if ("preparation".equals(codeString))
187          return EventStatus.PREPARATION;
188        if ("in-progress".equals(codeString))
189          return EventStatus.INPROGRESS;
190        if ("not-done".equals(codeString))
191          return EventStatus.NOTDONE;
192        if ("on-hold".equals(codeString))
193          return EventStatus.ONHOLD;
194        if ("stopped".equals(codeString))
195          return EventStatus.STOPPED;
196        if ("completed".equals(codeString))
197          return EventStatus.COMPLETED;
198        if ("entered-in-error".equals(codeString))
199          return EventStatus.ENTEREDINERROR;
200        if ("unknown".equals(codeString))
201          return EventStatus.UNKNOWN;
202        throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'");
203        }
204        public Enumeration<EventStatus> fromType(PrimitiveType<?> code) throws FHIRException {
205          if (code == null)
206            return null;
207          if (code.isEmpty())
208            return new Enumeration<EventStatus>(this, EventStatus.NULL, code);
209          String codeString = ((PrimitiveType) code).asStringValue();
210          if (codeString == null || "".equals(codeString))
211            return new Enumeration<EventStatus>(this, EventStatus.NULL, code);
212        if ("preparation".equals(codeString))
213          return new Enumeration<EventStatus>(this, EventStatus.PREPARATION, code);
214        if ("in-progress".equals(codeString))
215          return new Enumeration<EventStatus>(this, EventStatus.INPROGRESS, code);
216        if ("not-done".equals(codeString))
217          return new Enumeration<EventStatus>(this, EventStatus.NOTDONE, code);
218        if ("on-hold".equals(codeString))
219          return new Enumeration<EventStatus>(this, EventStatus.ONHOLD, code);
220        if ("stopped".equals(codeString))
221          return new Enumeration<EventStatus>(this, EventStatus.STOPPED, code);
222        if ("completed".equals(codeString))
223          return new Enumeration<EventStatus>(this, EventStatus.COMPLETED, code);
224        if ("entered-in-error".equals(codeString))
225          return new Enumeration<EventStatus>(this, EventStatus.ENTEREDINERROR, code);
226        if ("unknown".equals(codeString))
227          return new Enumeration<EventStatus>(this, EventStatus.UNKNOWN, code);
228        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
229        }
230    public String toCode(EventStatus code) {
231      if (code == EventStatus.PREPARATION)
232        return "preparation";
233      if (code == EventStatus.INPROGRESS)
234        return "in-progress";
235      if (code == EventStatus.NOTDONE)
236        return "not-done";
237      if (code == EventStatus.ONHOLD)
238        return "on-hold";
239      if (code == EventStatus.STOPPED)
240        return "stopped";
241      if (code == EventStatus.COMPLETED)
242        return "completed";
243      if (code == EventStatus.ENTEREDINERROR)
244        return "entered-in-error";
245      if (code == EventStatus.UNKNOWN)
246        return "unknown";
247      return "?";
248      }
249    public String toSystem(EventStatus code) {
250      return code.getSystem();
251      }
252    }
253
254    public interface EventPerformerComponent extends PatternBase {
255        /**
256         * @return {@link #function} (Distinguishes the type of involvement of the performer in the {{title}}. [Consider adding examples].)
257         */
258        public CodeableConcept getFunction() throws FHIRException ;
259
260        /**
261         * @return whether there is more than zero values for function
262         */
263        public boolean hasFunction();
264        /**
265         * @return minimum allowed cardinality for function. Note that with patterns, this may be different for the underlying resource
266         */
267        public int getFunctionMin();
268        /**
269         * @return maximum allowed cardinality for function. Note that with patterns, this may be different for the underlying resource
270         */
271        public int getFunctionMax();
272        /**
273         * @param value {@link #function} (Distinguishes the type of involvement of the performer in the {{title}}. [Consider adding examples].)
274         */
275        public EventPerformerComponent setFunction(CodeableConcept value) throws FHIRException;
276
277        /**
278         * @return {@link #actor} (Indicates who or what performed the {{title}}.)
279         */
280        public Reference getActor() throws FHIRException ;
281
282        /**
283         * @return whether there is more than zero values for actor
284         */
285        public boolean hasActor();
286        /**
287         * @return minimum allowed cardinality for actor. Note that with patterns, this may be different for the underlying resource
288         */
289        public int getActorMin();
290        /**
291         * @return maximum allowed cardinality for actor. Note that with patterns, this may be different for the underlying resource
292         */
293        public int getActorMax();
294        /**
295         * @param value {@link #actor} (Indicates who or what performed the {{title}}.)
296         */
297        public EventPerformerComponent setActor(Reference value) throws FHIRException;
298
299  }
300
301    /**
302     * @return {@link #identifier} (Business identifiers assigned to this {{title}} by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.)
303     */
304    public List<Identifier> getIdentifier() throws FHIRException;
305
306    /**
307     * @return Returns a reference to <code>this</code> for easy method chaining
308     */
309    public Event setIdentifier(List<Identifier> theIdentifier) throws FHIRException;
310
311    /**
312     * @return whether there is more than zero values for identifier
313     */
314    public boolean hasIdentifier();
315    /**
316     * @return minimum allowed cardinality for identifier. Note that with patterns, this may be different for the underlying resource
317     */
318    public int getIdentifierMin();
319    /**
320     * @return maximum allowed cardinality for identifier. Note that with patterns, this may be different for the underlying resource
321     */
322    public int getIdentifierMax();
323
324    public Identifier addIdentifier() throws FHIRException;
325
326    public Event addIdentifier(Identifier t) throws FHIRException;
327
328    /**
329     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
330     */
331    public Identifier getIdentifierFirstRep() throws FHIRException;
332
333    /**
334     * @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}}.)
335     */
336    public List<CanonicalType> getInstantiatesCanonical() throws FHIRException;
337
338    /**
339     * @return Returns a reference to <code>this</code> for easy method chaining
340     */
341    public Event setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) throws FHIRException;
342
343    /**
344     * @return whether there is more than zero values for instantiatesCanonical
345     */
346    public boolean hasInstantiatesCanonical();
347    /**
348     * @return minimum allowed cardinality for instantiatesCanonical. Note that with patterns, this may be different for the underlying resource
349     */
350    public int getInstantiatesCanonicalMin();
351    /**
352     * @return maximum allowed cardinality for instantiatesCanonical. Note that with patterns, this may be different for the underlying resource
353     */
354    public int getInstantiatesCanonicalMax();
355
356    /**
357     * @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}}.)
358     */
359    public CanonicalType addInstantiatesCanonicalElement() throws FHIRException;
360
361    /**
362     * @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}}.)
363     */
364    public Event addInstantiatesCanonical(String value) throws FHIRException;
365
366    /**
367     * @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}}.)
368     */
369    public boolean hasInstantiatesCanonical(String value)  throws FHIRException;
370
371    /**
372     * @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}}.)
373     */
374    public List<UriType> getInstantiatesUri() throws FHIRException;
375
376    /**
377     * @return Returns a reference to <code>this</code> for easy method chaining
378     */
379    public Event setInstantiatesUri(List<UriType> theInstantiatesUri) throws FHIRException;
380
381    /**
382     * @return whether there is more than zero values for instantiatesUri
383     */
384    public boolean hasInstantiatesUri();
385    /**
386     * @return minimum allowed cardinality for instantiatesUri. Note that with patterns, this may be different for the underlying resource
387     */
388    public int getInstantiatesUriMin();
389    /**
390     * @return maximum allowed cardinality for instantiatesUri. Note that with patterns, this may be different for the underlying resource
391     */
392    public int getInstantiatesUriMax();
393
394    /**
395     * @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}}.)
396     */
397    public UriType addInstantiatesUriElement() throws FHIRException;
398
399    /**
400     * @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}}.)
401     */
402    public Event addInstantiatesUri(String value) throws FHIRException;
403
404    /**
405     * @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}}.)
406     */
407    public boolean hasInstantiatesUri(String value)  throws FHIRException;
408
409    /**
410     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this {{title}}.)
411     */
412    public List<Reference> getBasedOn() throws FHIRException;
413
414    /**
415     * @return Returns a reference to <code>this</code> for easy method chaining
416     */
417    public Event setBasedOn(List<Reference> theBasedOn) throws FHIRException;
418
419    /**
420     * @return whether there is more than zero values for basedOn
421     */
422    public boolean hasBasedOn();
423    /**
424     * @return minimum allowed cardinality for basedOn. Note that with patterns, this may be different for the underlying resource
425     */
426    public int getBasedOnMin();
427    /**
428     * @return maximum allowed cardinality for basedOn. Note that with patterns, this may be different for the underlying resource
429     */
430    public int getBasedOnMax();
431
432    public Reference addBasedOn() throws FHIRException;
433
434    public Event addBasedOn(Reference t) throws FHIRException;
435
436    /**
437     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist
438     */
439    public Reference getBasedOnFirstRep() throws FHIRException;
440
441    /**
442     * @return {@link #partOf} (A larger event of which this particular {{title}} is a component or step.)
443     */
444    public List<Reference> getPartOf() throws FHIRException;
445
446    /**
447     * @return Returns a reference to <code>this</code> for easy method chaining
448     */
449    public Event setPartOf(List<Reference> thePartOf) throws FHIRException;
450
451    /**
452     * @return whether there is more than zero values for partOf
453     */
454    public boolean hasPartOf();
455    /**
456     * @return minimum allowed cardinality for partOf. Note that with patterns, this may be different for the underlying resource
457     */
458    public int getPartOfMin();
459    /**
460     * @return maximum allowed cardinality for partOf. Note that with patterns, this may be different for the underlying resource
461     */
462    public int getPartOfMax();
463
464    public Reference addPartOf() throws FHIRException;
465
466    public Event addPartOf(Reference t) throws FHIRException;
467
468    /**
469     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist
470     */
471    public Reference getPartOfFirstRep() throws FHIRException;
472
473    /**
474     * @return {@link #researchStudy} (Indicates that this {{title}} is relevant to the specified research study(ies).)
475     */
476    public List<Reference> getResearchStudy() throws FHIRException;
477
478    /**
479     * @return Returns a reference to <code>this</code> for easy method chaining
480     */
481    public Event setResearchStudy(List<Reference> theResearchStudy) throws FHIRException;
482
483    /**
484     * @return whether there is more than zero values for researchStudy
485     */
486    public boolean hasResearchStudy();
487    /**
488     * @return minimum allowed cardinality for researchStudy. Note that with patterns, this may be different for the underlying resource
489     */
490    public int getResearchStudyMin();
491    /**
492     * @return maximum allowed cardinality for researchStudy. Note that with patterns, this may be different for the underlying resource
493     */
494    public int getResearchStudyMax();
495
496    public Reference addResearchStudy() throws FHIRException;
497
498    public Event addResearchStudy(Reference t) throws FHIRException;
499
500    /**
501     * @return The first repetition of repeating field {@link #researchStudy}, creating it if it does not already exist
502     */
503    public Reference getResearchStudyFirstRep() throws FHIRException;
504
505    /**
506     * @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
507     */
508    public Enumeration<EventStatus> getStatusElement() throws FHIRException;
509
510    /**
511     * @return whether there is more than zero values for status
512     */
513    public boolean hasStatus();
514    /**
515     * @return minimum allowed cardinality for status. Note that with patterns, this may be different for the underlying resource
516     */
517    public int getStatusMin() throws FHIRException;
518    /**
519     * @return maximum allowed cardinality for status. Note that with patterns, this may be different for the underlying resource
520     */
521    public int getStatusMax() throws FHIRException;
522    public boolean hasStatusElement();
523
524    /**
525     * @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
526     */
527    public Event setStatusElement(Enumeration<EventStatus> value) throws FHIRException;
528
529    /**
530     * @return The current state of the {{title}}.
531     */
532    public EventStatus getStatus() throws FHIRException;
533
534    /**
535     * @param value The current state of the {{title}}.
536     */
537    public Event setStatus(EventStatus value) throws FHIRException;
538
539    /**
540     * @return {@link #statusReason} (Captures the reason for the current state of the {{title}}.)
541     */
542    public CodeableConcept getStatusReason() throws FHIRException ;
543
544    /**
545     * @return whether there is more than zero values for statusReason
546     */
547    public boolean hasStatusReason();
548    /**
549     * @return minimum allowed cardinality for statusReason. Note that with patterns, this may be different for the underlying resource
550     */
551    public int getStatusReasonMin();
552    /**
553     * @return maximum allowed cardinality for statusReason. Note that with patterns, this may be different for the underlying resource
554     */
555    public int getStatusReasonMax();
556    /**
557     * @param value {@link #statusReason} (Captures the reason for the current state of the {{title}}.)
558     */
559    public Event setStatusReason(CodeableConcept value) throws FHIRException;
560
561    /**
562     * @return {@link #code} (A code that identifies the specific service or action that was or is being performed.)
563     */
564    public CodeableConcept getCode() throws FHIRException ;
565
566    /**
567     * @return whether there is more than zero values for code
568     */
569    public boolean hasCode();
570    /**
571     * @return minimum allowed cardinality for code. Note that with patterns, this may be different for the underlying resource
572     */
573    public int getCodeMin();
574    /**
575     * @return maximum allowed cardinality for code. Note that with patterns, this may be different for the underlying resource
576     */
577    public int getCodeMax();
578    /**
579     * @param value {@link #code} (A code that identifies the specific service or action that was or is being performed.)
580     */
581    public Event setCode(CodeableConcept value) throws FHIRException;
582
583    /**
584     * @return {@link #subject} (The individual or set of individuals the action is being or was performed on.)
585     */
586    public Reference getSubject() throws FHIRException ;
587
588    /**
589     * @return whether there is more than zero values for subject
590     */
591    public boolean hasSubject();
592    /**
593     * @return minimum allowed cardinality for subject. Note that with patterns, this may be different for the underlying resource
594     */
595    public int getSubjectMin();
596    /**
597     * @return maximum allowed cardinality for subject. Note that with patterns, this may be different for the underlying resource
598     */
599    public int getSubjectMax();
600    /**
601     * @param value {@link #subject} (The individual or set of individuals the action is being or was performed on.)
602     */
603    public Event setSubject(Reference value) throws FHIRException;
604
605    /**
606     * @return {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.)
607     */
608    public Reference getEncounter() throws FHIRException ;
609
610    /**
611     * @return whether there is more than zero values for encounter
612     */
613    public boolean hasEncounter();
614    /**
615     * @return minimum allowed cardinality for encounter. Note that with patterns, this may be different for the underlying resource
616     */
617    public int getEncounterMin();
618    /**
619     * @return maximum allowed cardinality for encounter. Note that with patterns, this may be different for the underlying resource
620     */
621    public int getEncounterMax();
622    /**
623     * @param value {@link #encounter} (The Encounter during which this {{title}} was created or to which the creation of this record is tightly associated.)
624     */
625    public Event setEncounter(Reference value) throws FHIRException;
626
627    /**
628     * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.)
629     */
630    public DataType getOccurrence() throws FHIRException ;
631
632    /**
633     * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.)
634     */
635    public DateTimeType getOccurrenceDateTimeType() throws FHIRException;
636
637    public boolean hasOccurrenceDateTimeType();
638
639    /**
640     * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.)
641     */
642    public Period getOccurrencePeriod() throws FHIRException;
643
644    public boolean hasOccurrencePeriod();
645
646    /**
647     * @return {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.)
648     */
649    public Timing getOccurrenceTiming() throws FHIRException;
650
651    public boolean hasOccurrenceTiming();
652
653    /**
654     * @return whether there is more than zero values for occurrence
655     */
656    public boolean hasOccurrence();
657    /**
658     * @return minimum allowed cardinality for occurrence. Note that with patterns, this may be different for the underlying resource
659     */
660    public int getOccurrenceMin();
661    /**
662     * @return maximum allowed cardinality for occurrence. Note that with patterns, this may be different for the underlying resource
663     */
664    public int getOccurrenceMax();
665    /**
666     * @param value {@link #occurrence} (The date, period or timing when the {{title}} did occur or is occurring.)
667     */
668    public Event setOccurrence(DataType value) throws FHIRException;
669
670    /**
671     * @return {@link #recorded} (The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value
672     */
673    public DateTimeType getRecordedElement() throws FHIRException;
674
675    /**
676     * @return whether there is more than zero values for recorded
677     */
678    public boolean hasRecorded();
679    /**
680     * @return minimum allowed cardinality for recorded. Note that with patterns, this may be different for the underlying resource
681     */
682    public int getRecordedMin() throws FHIRException;
683    /**
684     * @return maximum allowed cardinality for recorded. Note that with patterns, this may be different for the underlying resource
685     */
686    public int getRecordedMax() throws FHIRException;
687    public boolean hasRecordedElement();
688
689    /**
690     * @param value {@link #recorded} (The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value
691     */
692    public Event setRecordedElement(DateTimeType value) throws FHIRException;
693
694    /**
695     * @return The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.
696     */
697    public Date getRecorded() throws FHIRException;
698
699    /**
700     * @param value The date the occurrence of the {{title}} was first captured in the record - potentially significantly after the occurrence of the event.
701     */
702    public Event setRecorded(Date value) throws FHIRException;
703
704    /**
705     * @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.)
706     */
707    public DataType getReported() throws FHIRException ;
708
709    /**
710     * @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.)
711     */
712    public BooleanType getReportedBooleanType() throws FHIRException;
713
714    public boolean hasReportedBooleanType();
715
716    /**
717     * @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.)
718     */
719    public Reference getReportedReference() throws FHIRException;
720
721    public boolean hasReportedReference();
722
723    /**
724     * @return whether there is more than zero values for reported
725     */
726    public boolean hasReported();
727    /**
728     * @return minimum allowed cardinality for reported. Note that with patterns, this may be different for the underlying resource
729     */
730    public int getReportedMin();
731    /**
732     * @return maximum allowed cardinality for reported. Note that with patterns, this may be different for the underlying resource
733     */
734    public int getReportedMax();
735    /**
736     * @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.)
737     */
738    public Event setReported(DataType value) throws FHIRException;
739
740    /**
741     * @return {@link #performer} (Indicates who or what performed the {{title}} and how they were involved.)
742     */
743    public List<EventPerformerComponent> getPerformer() throws FHIRException;
744
745    /**
746     * @return Returns a reference to <code>this</code> for easy method chaining
747     */
748    public Event setPerformer(List<EventPerformerComponent> thePerformer) throws FHIRException;
749
750    /**
751     * @return whether there is more than zero values for performer
752     */
753    public boolean hasPerformer();
754    /**
755     * @return minimum allowed cardinality for performer. Note that with patterns, this may be different for the underlying resource
756     */
757    public int getPerformerMin();
758    /**
759     * @return maximum allowed cardinality for performer. Note that with patterns, this may be different for the underlying resource
760     */
761    public int getPerformerMax();
762
763    public EventPerformerComponent addPerformer() throws FHIRException;
764
765    public Event addPerformer(EventPerformerComponent t) throws FHIRException;
766
767    /**
768     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist
769     */
770    public EventPerformerComponent getPerformerFirstRep() throws FHIRException;
771
772    /**
773     * @return {@link #location} (The principal physical location where the {{title}} was performed.)
774     */
775    public Reference getLocation() throws FHIRException ;
776
777    /**
778     * @return whether there is more than zero values for location
779     */
780    public boolean hasLocation();
781    /**
782     * @return minimum allowed cardinality for location. Note that with patterns, this may be different for the underlying resource
783     */
784    public int getLocationMin();
785    /**
786     * @return maximum allowed cardinality for location. Note that with patterns, this may be different for the underlying resource
787     */
788    public int getLocationMax();
789    /**
790     * @param value {@link #location} (The principal physical location where the {{title}} was performed.)
791     */
792    public Event setLocation(Reference value) throws FHIRException;
793
794    /**
795     * @return {@link #reasonCode} (Describes why the {{title}} occurred in coded or textual form.)
796     */
797    public List<CodeableConcept> getReasonCode() throws FHIRException;
798
799    /**
800     * @return Returns a reference to <code>this</code> for easy method chaining
801     */
802    public Event setReasonCode(List<CodeableConcept> theReasonCode) throws FHIRException;
803
804    /**
805     * @return whether there is more than zero values for reasonCode
806     */
807    public boolean hasReasonCode();
808    /**
809     * @return minimum allowed cardinality for reasonCode. Note that with patterns, this may be different for the underlying resource
810     */
811    public int getReasonCodeMin();
812    /**
813     * @return maximum allowed cardinality for reasonCode. Note that with patterns, this may be different for the underlying resource
814     */
815    public int getReasonCodeMax();
816
817    public CodeableConcept addReasonCode() throws FHIRException;
818
819    public Event addReasonCode(CodeableConcept t) throws FHIRException;
820
821    /**
822     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
823     */
824    public CodeableConcept getReasonCodeFirstRep() throws FHIRException;
825
826    /**
827     * @return {@link #reasonReference} (Indicates another resource whose existence justifies this {{title}}.)
828     */
829    public List<Reference> getReasonReference() throws FHIRException;
830
831    /**
832     * @return Returns a reference to <code>this</code> for easy method chaining
833     */
834    public Event setReasonReference(List<Reference> theReasonReference) throws FHIRException;
835
836    /**
837     * @return whether there is more than zero values for reasonReference
838     */
839    public boolean hasReasonReference();
840    /**
841     * @return minimum allowed cardinality for reasonReference. Note that with patterns, this may be different for the underlying resource
842     */
843    public int getReasonReferenceMin();
844    /**
845     * @return maximum allowed cardinality for reasonReference. Note that with patterns, this may be different for the underlying resource
846     */
847    public int getReasonReferenceMax();
848
849    public Reference addReasonReference() throws FHIRException;
850
851    public Event addReasonReference(Reference t) throws FHIRException;
852
853    /**
854     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
855     */
856    public Reference getReasonReferenceFirstRep() throws FHIRException;
857
858    /**
859     * @return {@link #note} (Comments made about the {{title}} by the performer, subject or other participants.)
860     */
861    public List<Annotation> getNote() throws FHIRException;
862
863    /**
864     * @return Returns a reference to <code>this</code> for easy method chaining
865     */
866    public Event setNote(List<Annotation> theNote) throws FHIRException;
867
868    /**
869     * @return whether there is more than zero values for note
870     */
871    public boolean hasNote();
872    /**
873     * @return minimum allowed cardinality for note. Note that with patterns, this may be different for the underlying resource
874     */
875    public int getNoteMin();
876    /**
877     * @return maximum allowed cardinality for note. Note that with patterns, this may be different for the underlying resource
878     */
879    public int getNoteMax();
880
881    public Annotation addNote() throws FHIRException;
882
883    public Event addNote(Annotation t) throws FHIRException;
884
885    /**
886     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
887     */
888    public Annotation getNoteFirstRep() throws FHIRException;
889
890  public String fhirType();
891
892
893}