---
type: "resource"
title: "EventDefinition"
resource: "EventDefinition"
---
# EventDefinition
## Introduction
## Scope and Usage
**This resource is a _definition_ resource from a FHIR workflow perspective** - see [Workflow](workflow), specifically [Definition](workflow#definition).
The EventDefinition resource provides a reusable description of an event. The resource supports describing different kinds of events, including named events, periodic events, and data-based events. For each of these, the resource also supports a formal description of the event. For example, a 'monitor-emergency-admissions' event can be a named event, but also provide a formal description of the event as monitoring for encounters that occur in emergency department locations.
## Boundaries and Relationships
The EventDefinition resource is intended to be used to provide a reusable description of events for use by other resources that require event definition, such as MessageDefinition. The SubscriptionTopic resource is focused on supporting the definition of topics that can be used in Subscriptions. EventDefinition is a definition of an event that could occur, whereas Subscription is asking for notification of events when they occur.
The EventDefinition resource uses the [TriggerDefinition](metadatatypes#TriggerDefinition) data type to represent the description of an event as one of:
- Named event: An event identified by the implementation environment
- Schedule event: An event occurs on a fixed or periodic schedule
- Data event: An event that occurs when data is change such as a record being added, updated, or deleted
- Subscription topic: An event that is defined by referencing a subscription topic
This allows an EventDefinition to be used to reference a SubscriptionTopic, enabling subscriptions to be used in MessageDefinition and PlanDefinition.
## Background and Context
Provides additional detail on exactly how the resource is to be used
## Notes
## Examples
The following examples illustrate EventDefinition resources representing the event "3 consecutive negative stick tests" using the different approaches to event representation supported by the resource.
### Named Event
The _named event_ approach uses a name, or code to identify the event. In this approach, a unique code for the event is agreed upon by both sides of an integration. The [Workflow](https://terminology.hl7.org/ValueSet-v3-ActEncounterCode.html) and [Task](https://terminology.hl7.org/ValueSet-v3-ActTaskCode.html) usage context types are another example. CDS Hooks hook names are another example of this approach.
The following example illustrates this approach for a `three-consecutive-negative-stick-tests` event:
```
```
### Data Event
Alternatively, a trigger may be identified as a _data event_. In this approach, a [DataRequirement](metadatatypes#DataRequirement) is used to identify the data change event:
```
```
This example indicates that the event should be triggered when Observations with a code matching a code in the `http://example.org/ValueSet/stick-test-codes` value set is created, updated, or deleted.
In addition, the example has a `condition` element providing an expression that is evaluated as part of determining whether or not the event is triggered. If the expression evaluates to `true`, the event is triggered.
The expression in this case:
```
StickTest.consecutivelyFrom(%context).take(3).negative().count() = 3
```
Relies on the fluent functions defined in the [`ExampleEventDefinitionLogic`](library-ExampleEventDefinitionLogic) library:
```
define StickTest:
[Observation: "Stick Test Codes"] O
where O.status in { 'final', 'amended', 'corrected' }
define fluent function negative(observations List):
observations O
where O.interpretation ~ "LA6577-6|http://loinc.org"
define fluent function during(observations List, encounter Encounter):
observations O
where O.issued during minute of encounter.period
define fluent function within(observations List, quantity Quantity):
observations O
where (O.issued + quantity) on or after minute of Now()
define fluent function consecutively(observations List):
observations O
sort by issued
define fluent function consecutivelyFrom(observations List, observation Observation):
observations O
where O.issued on or after observation.issued
sort by issued
```
Alternatively, if a profile is available, it can be used to define the data requirement, as well as to provide the starting data element in the expression:
```
```
### Periodic Event
And finally, the _periodic_ approach can be used to indicate the event should occur on a timing:
```
```
### Use With RelativeTime
Once an event has been defined, it can be referenced as the context of a [RelativeTime](datatypes#RelativeTime):
```
```
## StructureDefinition
### Elements (Simplified)
- **[EventDefinition](/eventdefinition-definitions#EventDefinition)** [0..*]: - A description of when an event can occur
- **[EventDefinition.url](/eventdefinition-definitions#EventDefinition.url)** [0..1]: [uri](/uri) Canonical identifier for this event definition, represented as a URI (globally unique)
- **[EventDefinition.identifier](/eventdefinition-definitions#EventDefinition.identifier)** [0..*]: [Identifier](/Identifier) Additional identifier for the event definition
- **[EventDefinition.version](/eventdefinition-definitions#EventDefinition.version)** [0..1]: [string](/string) Business version of the event definition
- **[EventDefinition.versionAlgorithm[x]](/eventdefinition-definitions#EventDefinition.versionAlgorithm%5Bx%5D)** [0..1]: [string](/string), [Coding](/Coding) extensible:[version-algorithm](/valueset-version-algorithm) How to compare versions
- **[EventDefinition.name](/eventdefinition-definitions#EventDefinition.name)** [0..1]: [string](/string) Name for this event definition (computer friendly)
- **[EventDefinition.title](/eventdefinition-definitions#EventDefinition.title)** [0..1]: [string](/string) Name for this event definition (human friendly)
- **[EventDefinition.subtitle](/eventdefinition-definitions#EventDefinition.subtitle)** [0..1]: [string](/string) Subordinate title of the event definition
- **[EventDefinition.status](/eventdefinition-definitions#EventDefinition.status)** [1..1]: [code](/code) required:[publication-status](/valueset-publication-status) draft | active | retired | unknown
- **[EventDefinition.experimental](/eventdefinition-definitions#EventDefinition.experimental)** [0..1]: [boolean](/boolean) For testing only - never for real usage
- **[EventDefinition.subject[x]](/eventdefinition-definitions#EventDefinition.subject%5Bx%5D)** [0..1]: [CodeableConcept](/CodeableConcept), Reference([Group](/Group)) extensible:[participant-resource-types](/valueset-participant-resource-types) Type of individual the event definition is focused on
- **[EventDefinition.date](/eventdefinition-definitions#EventDefinition.date)** [0..1]: [dateTime](/dateTime) Date last changed
- **[EventDefinition.publisher](/eventdefinition-definitions#EventDefinition.publisher)** [0..1]: [string](/string) Name of the publisher/steward (organization or individual)
- **[EventDefinition.contact](/eventdefinition-definitions#EventDefinition.contact)** [0..*]: [ContactDetail](/ContactDetail) Contact details for the publisher
- **[EventDefinition.description](/eventdefinition-definitions#EventDefinition.description)** [0..1]: [markdown](/markdown) Natural language description of the event definition
- **[EventDefinition.useContext](/eventdefinition-definitions#EventDefinition.useContext)** [0..*]: [UsageContext](/UsageContext) The context that the content is intended to support
- **[EventDefinition.jurisdiction](/eventdefinition-definitions#EventDefinition.jurisdiction)** [0..*]: [CodeableConcept](/CodeableConcept) extensible:[jurisdiction](/valueset-jurisdiction) Jurisdiction of the authority that maintains the event definition (if applicable)
- **[EventDefinition.purpose](/eventdefinition-definitions#EventDefinition.purpose)** [0..1]: [markdown](/markdown) Why this event definition is defined
- **[EventDefinition.usage](/eventdefinition-definitions#EventDefinition.usage)** [0..1]: [markdown](/markdown) Describes the clinical usage of the event definition
- **[EventDefinition.copyright](/eventdefinition-definitions#EventDefinition.copyright)** [0..1]: [markdown](/markdown) Notice about intellectual property ownership, can include restrictions on use
- **[EventDefinition.copyrightLabel](/eventdefinition-definitions#EventDefinition.copyrightLabel)** [0..1]: [string](/string) Copyright holder and year(s)
- **[EventDefinition.approvalDate](/eventdefinition-definitions#EventDefinition.approvalDate)** [0..1]: [date](/date) When the event definition was approved by publisher
- **[EventDefinition.lastReviewDate](/eventdefinition-definitions#EventDefinition.lastReviewDate)** [0..1]: [date](/date) When the event definition was last reviewed by the publisher
- **[EventDefinition.effectivePeriod](/eventdefinition-definitions#EventDefinition.effectivePeriod)** [0..1]: [Period](/Period) When the event definition is expected to be used
- **[EventDefinition.topic](/eventdefinition-definitions#EventDefinition.topic)** [0..*]: [CodeableConcept](/CodeableConcept) example:[definition-topic](/valueset-definition-topic) E.g. Education, Treatment, Assessment, etc
- **[EventDefinition.author](/eventdefinition-definitions#EventDefinition.author)** [0..*]: [ContactDetail](/ContactDetail) Who authored the content
- **[EventDefinition.editor](/eventdefinition-definitions#EventDefinition.editor)** [0..*]: [ContactDetail](/ContactDetail) Who edited the content
- **[EventDefinition.reviewer](/eventdefinition-definitions#EventDefinition.reviewer)** [0..*]: [ContactDetail](/ContactDetail) Who reviewed the content
- **[EventDefinition.endorser](/eventdefinition-definitions#EventDefinition.endorser)** [0..*]: [ContactDetail](/ContactDetail) Who endorsed the content
- **[EventDefinition.relatedArtifact](/eventdefinition-definitions#EventDefinition.relatedArtifact)** [0..*]: [RelatedArtifact](/RelatedArtifact) Additional documentation, citations, etc
- **[EventDefinition.trigger](/eventdefinition-definitions#EventDefinition.trigger)** [1..*]: [TriggerDefinition](/TriggerDefinition) "when" the event occurs (multiple = 'or')
## Mappings
- [EventDefinition Mappings](/eventdefinition-mappings) — 43 mapping entries
## Resource Packs
### list-EventDefinition-packs.xml
```xml
```
## Search Parameters
- [composed-of](/eventdefinition-search#composed-of) — **reference** — What resource is being referenced — `EventDefinition.relatedArtifact.where(type='composed-of').resource`
- [context](/eventdefinition-search#context) — **token** — A use context assigned to the event definition — `(EventDefinition.useContext.value.ofType(CodeableConcept))`
- [context-quantity](/eventdefinition-search#context-quantity) — **quantity** — A quantity- or range-valued use context assigned to the event definition — `(EventDefinition.useContext.value.ofType(Quantity)) | (EventDefinition.useContext.value.ofType(Range))`
- [context-type](/eventdefinition-search#context-type) — **token** — A type of use context assigned to the event definition — `EventDefinition.useContext.code`
- [context-type-quantity](/eventdefinition-search#context-type-quantity) — **composite** — A use context type and quantity- or range-based value assigned to the event definition — `EventDefinition.useContext`
- [context-type-value](/eventdefinition-search#context-type-value) — **composite** — A use context type and value assigned to the event definition — `EventDefinition.useContext`
- [date](/eventdefinition-search#date) — **date** — The event definition publication date — `EventDefinition.date`
- [depends-on](/eventdefinition-search#depends-on) — **reference** — What resource is being referenced — `EventDefinition.relatedArtifact.where(type='depends-on').resource`
- [derived-from](/eventdefinition-search#derived-from) — **reference** — What resource is being referenced — `EventDefinition.relatedArtifact.where(type='derived-from').resource`
- [description](/eventdefinition-search#description) — **string** — The description of the event definition — `EventDefinition.description`
- [effective](/eventdefinition-search#effective) — **date** — The time during which the event definition is intended to be in use — `EventDefinition.effectivePeriod`
- [identifier](/eventdefinition-search#identifier) — **token** — External identifier for the event definition — `EventDefinition.identifier`
- [jurisdiction](/eventdefinition-search#jurisdiction) — **token** — Jurisdiction of the authority that maintains the the event definition — `EventDefinition.jurisdiction`
- [name](/eventdefinition-search#name) — **string** — Computationally friendly name of the event definition — `EventDefinition.name`
- [predecessor](/eventdefinition-search#predecessor) — **reference** — What resource is being referenced — `EventDefinition.relatedArtifact.where(type='predecessor').resource`
- [publisher](/eventdefinition-search#publisher) — **string** — Name of the publisher of the event definition — `EventDefinition.publisher`
- [status](/eventdefinition-search#status) — **token** — The current status of the event definition — `EventDefinition.status`
- [successor](/eventdefinition-search#successor) — **reference** — What resource is being referenced — `EventDefinition.relatedArtifact.where(type='successor').resource`
- [title](/eventdefinition-search#title) — **string** — The human-friendly name of the event definition — `EventDefinition.title`
- [topic](/eventdefinition-search#topic) — **token** — Topics associated with the module — `EventDefinition.topic`
- [url](/eventdefinition-search#url) — **uri** — The uri that identifies the event definition — `EventDefinition.url`
- [version](/eventdefinition-search#version) — **token** — The business version of the event definition — `EventDefinition.version`
- [experimental](/eventdefinition-search#experimental) — **token** — Whether the EventDefinition is experimental — `EventDefinition.experimental`
[Full Search Parameters](/eventdefinition-search)
## Examples
- [eventdefinition-example](/eventdefinition-example-eventdefinition-example) — eventdefinition-example
- [eventdefinition-example-data](/eventdefinition-example-eventdefinition-example-data) — eventdefinition-example-data
- [eventdefinition-example-data-with-profile](/eventdefinition-example-eventdefinition-example-data-with-profile) — eventdefinition-example-data-with-profile
- [eventdefinition-example-named](/eventdefinition-example-eventdefinition-example-named) — eventdefinition-example-named
- [eventdefinition-example-periodic](/eventdefinition-example-eventdefinition-example-periodic) — eventdefinition-example-periodic
- [eventdefinition-examples-header](/eventdefinition-example-eventdefinition-examples-header) — eventdefinition-examples-header
- [example](/eventdefinition-example-example) — eventdefinition-example — Example of an EventDefinition for monitoring emergency department admissions.
- [example-data](/eventdefinition-example-example-data) — eventdefinition-example-data — Example of an EventDefinition using the data event approach.
- [example-data-with-profile](/eventdefinition-example-example-data-with-profile) — eventdefinition-example-data-with-profile — Example of an EventDefinition using the data event approach with a profile in the data requirement.
- [example-named](/eventdefinition-example-example-named) — eventdefinition-example-named — Example of an EventDefinition using the named event approach.
- [example-periodic](/eventdefinition-example-example-periodic) — eventdefinition-example-periodic — Example of an EventDefinition using the periodic approach.
[Full Examples](/eventdefinition-examples)
## Mapping Exceptions
### eventdefinition-definition-mapping-exceptions.xml
### Divergent Elements
- **Definition.url** → **EventDefinition.url**
- shortUnmatched | reason=Unknown | pattern=Canonical identifier for this event definition, represented as an absolute URI (globally unique) | resource=Canonical identifier for this event definition, represented as a URI (globally unique)
- commentsUnmatched | reason=Unknown | pattern=Can be a `urn:uuid:` or a `urn:oid:` but real `http/s:` addresses are preferred. Multiple instances may share the same URL if they have a distinct version.
The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author. Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions).
In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found. | resource=Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred. Multiple instances may share the same URL if they have a distinct version.
The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author. Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions).
In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found.
- **Definition.identifier** → **EventDefinition.identifier**
- shortUnmatched | reason=Unknown | pattern=Business identifier for event definition | resource=Additional identifier for the event definition
- commentsUnmatched | reason=Unknown | pattern=Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this event definition outside of FHIR, where it is not possible to use the logical URI.
- requirementsUnmatched | reason=Unknown | pattern=Allows externally provided and/or usable business identifiers to be easily associated with the event definition. | resource=Allows externally provided and/or usable business identifiers to be easily associated with the module.
- **Definition.version** → **EventDefinition.version**
- commentsUnmatched | reason=Unknown | pattern=There may be different event definitions that have the same url but different versions. The version can be appended to the url in a reference to allow a reference to a particular business version of the event definition with the format. The version SHOULD NOT contain a '#' - see [Business Version](resource.html#bv-format). | resource=There may be different event definition instances that have the same identifier but different versions. The version can be appended to the url in a reference to allow a reference to a particular business version of the event definition with the format [url]|[version]. The version SHOULD NOT contain a '#' - see [Business Version](resource.html#bv-format).
- **Definition.name** → **EventDefinition.name**
- commentsUnmatched | reason=Unknown | pattern=The name is not expected to be globally unique. The name should be a simple alphanumeric type no-whitespace name to ensure that it is machine-processing friendly. | resource=The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.
- requirementsUnmatched | reason=Unknown | pattern=Supports code generation. | resource=Support human navigation and code generation.
- **Definition.status** → **EventDefinition.status**
- definitionUnmatched | reason=Unknown | pattern=The current state of this event definition. | resource=The status of this event definition. Enables tracking the life-cycle of the content.
- commentsUnmatched | reason=Unknown | pattern=A nominal state-transition diagram can be found in the] documentation
Unknown does not represent 'other' - one of the defined statuses must apply. Unknown is used when the authoring system is not sure what the current status is. | resource=Allows filtering of event definitions that are appropriate for use versus not.
See guidance around (not) making local changes to elements [here](canonicalresource.html#localization).
- requirementsUnmatched | reason=Unknown | pattern=Enables tracking the lifecycle of the content and filtering of event definitions that are appropriate for use versus not.
- **Definition.subject** → **EventDefinition.subject[x]**
- missingTypes | reason=Unknown | pattern=CodeableReference(Group)
- extraTypes | reason=Unknown
- summary | reason=Unknown | pattern=true
- bindingStrength | reason=Unknown | pattern=example
- shortUnmatched | reason=Unknown | pattern=Type of individual the defined service is for | resource=Type of individual the event definition is focused on
- definitionUnmatched | reason=Unknown | pattern=A code or group definition that describes the intended subject of instantiations of this definition. | resource=A code or group definition that describes the intended subject of the event definition.
- requirementsUnmatched | reason=Unknown | pattern=Many protocols, order sets and guidelines are intended for use only with specific types of patients or subjects.
- **Definition.description** → **EventDefinition.description**
- summary | reason=Unknown | pattern=true
- commentsUnmatched | reason=Unknown | pattern=This description can be used to capture details such as comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the event definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context. | resource=This description can be used to capture details such as comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the event definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the event definition is presumed to be the predominant language in the place the event definition was created).
- **Definition.useContext** → **EventDefinition.useContext**
- definitionUnmatched | reason=Unknown | pattern=The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definitions. | resource=The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.
- commentsUnmatched | reason=Unknown | pattern=When multiple useContexts are specified, there is no expectation that all or even any of the contexts apply. | resource=When multiple useContexts are specified, there is no expectation that all or any of the contexts apply.
- **Definition.jurisdiction** → **EventDefinition.jurisdiction**
- shortUnmatched | reason=Unknown | pattern=Intended jurisdiction for event definition (if applicable) | resource=Jurisdiction of the authority that maintains the event definition (if applicable)
- definitionUnmatched | reason=Unknown | pattern=A legal or geographic region in which the event definition is intended to be used. | resource=A legal or geographic region in which the authority that maintains the resource is operating. In general, the jurisdiction is also found in the useContext. The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.
- commentsUnmatched | reason=Unknown | pattern=It may be possible for the event definition to be used in jurisdictions other than those for which it was originally designed or intended
DEPRECATION NOTE: For consistency, implementations are encouraged to migrate to using the new 'jurisdiction' code in the useContext element. (I.e. useContext.code indicating http://terminology.hl7.org/CodeSystem/usage-context-type#jurisdiction and useContext.valueCodeableConcept indicating the jurisdiction.). | resource=It may be possible for the event definition to be used in jurisdictions other than those for which it was originally designed or intended.
DEPRECATION NOTE: For consistency, implementations are encouraged to migrate to using the new 'jurisdiction' code in the useContext element. (I.e. useContext.code indicating http://terminology.hl7.org/CodeSystem/usage-context-type#jurisdiction and useContext.valueCodeableConcept indicating the jurisdiction.)
- **Definition.copyright** → **EventDefinition.copyright**
- requirementsUnmatched | reason=Unknown | pattern=Consumers of the event definition must be able to determine any legal restrictions on the use of the artifact and/or its content. | resource=Consumers must be able to determine any legal restrictions on the use of the event definition and/or its content.
- **Definition.approvalDate** → **EventDefinition.approvalDate**
- summary | reason=Unknown | pattern=false
- **Definition.lastReviewDate** → **EventDefinition.lastReviewDate**
- summary | reason=Unknown | pattern=false
- **Definition.effectivePeriod** → **EventDefinition.effectivePeriod**
- commentsUnmatched | reason=Unknown | pattern=The effective period for a event definition determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015. | resource=The effective period for an event definition determines when the content is applicable for usage and is independent of publication and review dates. For example, a definition intended to be used for the year 2016 might be published in 2015.
See guidance around (not) making local changes to elements [here](canonicalresource.html#localization).
### Unmapped Elements
- **Definition.derivedFromCanonical** — Unknown
- **Definition.product** — Unknown
- **Definition.code** — Unknown
- **Definition.derivedFromUri** — Unknown
- **Definition.performerType** — Unknown
- **Definition.partOf** — Unknown
- **Definition.topic** — Unknown
### eventdefinition-fivews-mapping-exceptions.xml
### Unmapped Elements
- **FiveWs.what** — Unknown
- **FiveWs.author** — Unknown
- **FiveWs.actor** — Unknown
- **FiveWs.cause** — Unknown
- **FiveWs.where** — Unknown
- **FiveWs.context** — Unknown
- **FiveWs.init** — Unknown
- **FiveWs.source** — Unknown
- **FiveWs.who** — Unknown
- **FiveWs.grade** — Unknown
- **FiveWs.planned** — Unknown
- **FiveWs.done** — Unknown
- **FiveWs.subject** — Unknown