Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ template/
output/
updateWebsite.sh
nginx.conf
fhircast-template/content/.index.json
fhircast-template/content/assets/.index.json
fhircast-template/content/assets/ico/.index.json
fhircast-template/content/assets/images/.index.json
fhircast-template/includes/.index.json
fhircast-template/**/.index.json
fhircast-template/**/.index.db
11 changes: 5 additions & 6 deletions FHIR-fhircast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<artifact id="Observation/435098234" key="Observation-435098234" name="FHIRcastObservation-Example"/>
<artifact id="Patient/503824b8-fe8c-4227-b061-7181ba6c3926-close" key="Patient-503824b8-fe8c-4227-b061-7181ba6c3926-close" name="FHIRcastPatientClose-Example"/>
<artifact id="Patient/503824b8-fe8c-4227-b061-7181ba6c3926" key="Patient-503824b8-fe8c-4227-b061-7181ba6c3926" name="FHIRcastPatientOpen-Example"/>
<artifact id="SubscriptionTopic/container-update-resource" key="SubscriptionTopic-container-update-resource" name="FhirCastContainerResourceTopic"/>
<artifact id="SubscriptionTopic/container-update-topic" key="SubscriptionTopic-container-update-topic" name="FhirCastContainerTopicTopic"/>
<artifact id="SubscriptionTopic/container-update-topic" key="SubscriptionTopic-container-update-topic" name="Subscribe to container changes in a topic"/>
<artifact id="SubscriptionTopic/container-update-resource" key="SubscriptionTopic-container-update-resource" name="Subscribe to container changes of an resource"/>
<page key="NA" name="(NA)"/>
<page key="many" name="(many)"/>
<page deprecated="true" key="profiles" name="(profiles)"/>
Expand Down Expand Up @@ -75,7 +75,6 @@
<page deprecated="true" key="specification" name="FHIRcast specification"/>
<page key="GetCurrentContext" name="Get Current Context"/>
<page key="glossary" name="Glossary"/>
<page key="3-2-2-Heartbeat" name="HeartBeat Event"/>
<page deprecated="true" key="heartbeat" name="Heartbeat event"/>
<page key="4-7-hybrid-content-sharing" name="Hybrid Content Sharing"/>
<page key="imagingstudyevents" name="ImagingStudy Events"/>
Expand Down Expand Up @@ -105,13 +104,13 @@
<page key="6_change-log" name="Specification Information"/>
<page deprecated="true" key="subscribing-and-unsubscribing" name="Subscribing and unsubscribing"/>
<page key="2-4-Subscribing" name="Subscribing to Events"/>
<page key="3-2-1-SyncError" name="Sync error Event"/>
<page deprecated="true" key="syncerror" name="Sync error event"/>
<page key="3-2-1-SyncError" name="SyncError Event"/>
<page key="4-2-syncconsiderations" name="Synchronization Considerations"/>
<page deprecated="true" key="synchronization-considerations" name="Synchronization considerations"/>
<page key="table-of-contents" name="Table of Contents"/>
<page key="3-2-4-UserHibernate" name="User hibernate Event"/>
<page deprecated="true" key="userhibernate" name="User hibernate event"/>
<page key="3-2-3-UserLogout" name="User logout Event"/>
<page deprecated="true" key="userlogout" name="User logout event"/>
<page key="3-2-3-UserLogout" name="UserLogout Event"/>
<page key="3-2-4-UserHibernate" name="userhibernate Event"/>
</specification>
4 changes: 0 additions & 4 deletions fhircast-template/content/.index.json

This file was deleted.

4 changes: 0 additions & 4 deletions fhircast-template/content/assets/.index.json

This file was deleted.

4 changes: 0 additions & 4 deletions fhircast-template/content/assets/ico/.index.json

This file was deleted.

4 changes: 0 additions & 4 deletions fhircast-template/content/assets/images/.index.json

This file was deleted.

4 changes: 0 additions & 4 deletions fhircast-template/includes/.index.json

This file was deleted.

4 changes: 0 additions & 4 deletions fhircast-template/package/.index.json

This file was deleted.

2 changes: 1 addition & 1 deletion input/fsh/FHIRcastDiagnosticReportClose.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A logical id of the resource must be provided. The provided `id` SHALL be the sa
* identifier ^short = "At least one identifier of the DiagnosticReport SHOULD be provided in an [FHIR resource]-close request."
* identifier ^definition =
"""
At least one `identifier` of the DiagnosticReport SHOULD be provided in a [FHIR resource]-close request. This could be a business identifier provided in the DiagnosticReport-open event or a business identifier provided subsequently in a [DiagnosticReport-update](3-6-3-diagnosticreport-update.html) event.
At least one `identifier` of the DiagnosticReport SHOULD be provided in a [FHIR resource]-close request. This could be a business identifier provided in the DiagnosticReport-open event or a business identifier provided subsequently in a [DiagnosticReport-update](3-6-3-DiagnosticReport-update.html) event.
"""
* basedOn 0..* MS
* basedOn ^short = "At least one business identifier of the DiagnosticReport SHOULD be provided in a [FHIR resource]-open request (see detailed description)."
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/FHIRcastDiagnosticReportOpen.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The Study Instance UID SHALL be included as a business identifier if it is known
* status ^short = "Status of the DiagnosticReport, note this may not be known and hence have a value of `unknown`; however, is included since it is required by FHIR"
* status ^definition =
"""
While initially the `status` of the report may begin as `unknown` or `preliminary` (or something else), throughout the lifecycle of the context the report's status may transition. For example, a reporting application may enable a clinician to sign the report. In such a situation this change in status could become final and would be communicated through a [`DiagnosticReport-update`](3-6-3-diagnosticreport-update.html)
While initially the `status` of the report may begin as `unknown` or `preliminary` (or something else), throughout the lifecycle of the context the report's status may transition. For example, a reporting application may enable a clinician to sign the report. In such a situation this change in status could become final and would be communicated through a [`DiagnosticReport-update`](3-6-3-DiagnosticReport-update.html)
event prior to the DiagnosticReport context being closed by a DiagnosticReport-close event.
"""
* subject 1..1
Expand Down
28 changes: 21 additions & 7 deletions input/pagecontent/2-3-Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Field | Optionality | Type | Description
`hub.event` | Required | string | The event that triggered this notification, taken from the list of events from the subscription request.
`context` | Required | array | An array of named FHIR objects corresponding to the user's context after the given event has occurred.

The notification's `hub.event` and `context` fields inform the Subscriber of the current state of the user's session. The `hub.event` is a user workflow event, from the [Event Catalog](3_Events.html) (or an organization-specific event in reverse-domain name notation). The `context` is an array of named FHIR resources (similar to [CDS Hooks's context](https://cds-hooks.hl7.org/1.0/#http-request_1) field) that describe the current content of the user's session. Each event in the [Event Catalog](3_Events.html) defines what context is included in the notification. The context contains zero, one, or more FHIR resources. Hubs SHOULD use the [FHIR _elements parameter](https://www.hl7.org/fhir/search.html#elements) to limit the size of the data being passed while also including additional, local identifiers that are likely already in use in production implementations. Subscribers SHALL accept a full FHIR resource or the [_elements](https://www.hl7.org/fhir/search.html#elements)-limited resource as defined in the Event Catalog.
The notification's `hub.event` and `context` fields inform the Subscriber of the current state of the user's session. The `hub.event` is a user workflow event, from the [Event Catalog](3_Events.html) (or an organization-specific event in reverse-domain name notation). The `context` is an array of named FHIR resources (similar to [CDS Hooks's context](https://cds-hooks.hl7.org/1.0/#http-request_1) field) that describes the current content of the user's session. Each event in the [Event Catalog](3_Events.html) defines what context is included in the notification. The context contains zero, one, or more FHIR resources. Hubs SHOULD use the [FHIR _elements parameter](https://www.hl7.org/fhir/search.html#elements) to limit the size of the data being passed while also including additional, local identifiers that are likely already in use in production implementations. Subscribers SHALL accept a full FHIR resource or the [_elements](https://www.hl7.org/fhir/search.html#elements)-limited resource as defined in the Event Catalog.

The Subscriber requesting a context change SHALL ensure consistency of the FHIR resources in the `context` array. For example, the Hub will not check that the Patient resource in an Encounter-open `context` array is in fact the patient associated with the encounter in the real world.

Expand Down Expand Up @@ -50,9 +50,11 @@ When subscribing to FHIRcast events a list of events is added. These events may
| `*-update` | All update events |
| `*-select` | All select events |

### Context
### Event Context

Describes the set of contextual data associated with this event. Only data logically and necessarily associated with the purpose of this workflow related event should be represented in context. An event SHALL contain all required data fields, MAY contain optional data fields and SHALL NOT contain any additional fields.
The event context describes the set of contextual data associated with this event. Only data logically and necessarily associated with the purpose of this workflow related event should be represented in context. An event SHALL contain all required data fields, MAY contain optional data fields and SHALL NOT contain any additional fields.

The Subscriber requesting a context change SHALL ensure consistency of the FHIR resources in the `context` array. For example, the Hub will not check that the Patient resource in an Encounter-open `context` array is in fact the patient associated with the encounter in the real world.

All fields available within an event's context SHALL be defined in a table where each field is described by the following attributes:

Expand All @@ -63,6 +65,7 @@ All fields available within an event's context SHALL be defined in a table where

A Hub SHALL at least send the elements indicated in *FHIR operation to generate context*; a Subscriber SHALL gracefully handle receiving a full FHIR resource in the context of a notification. For example, when the [`ImagingStudy-open`](3-5-1-ImagingStudy-open.html) event occurs, the notification sent to a Subscriber includes an ImagingStudy FHIR resource, which contains at least the elements defined in the *_elements* query parameter, as indicated in the event's definition. For ImagingStudy, this is defined as: `ImagingStudy/{id}?_elements=identifier`. (The *_elements* query parameter is defined in the [FHIR specification](https://www.hl7.org/fhir/search.html#elements)).


The key used for indicating a context change event's FHIR resource SHALL be the lower-case resourceType of the resource. In the case the resource refers to other FHIR resources that represent their own context, these can be included as well. The resources to include are defined in the corresponding event definition in the [event catalog](3_Events.html).

The Hub SHALL only return FHIR resources that the Subscriber is authorized to receive with the existing OAuth 2.0 access_token's granted `fhircast/` scopes.
Expand All @@ -73,7 +76,9 @@ The FHIRcast specification supports many different events. These events are defi

#### Context-change events

FHIRcast context-change events that describe context changes SHALL conform to the following extensible syntax. Patterned after the SMART on FHIR scope syntax and expressed in EBNF notation, the FHIRcast syntax for context-change related event names is:
FHIRcast context-change events change the current [context](5_glossary.html) of a topic. The current context of a topic is defined as the set of resources that define what the user is currently working on. It can be represented as a single resource (e.g. Patient) or as a set (e.g. Patient, Encounter, ImagingStudy and DiagnosticReport). For each resource type, the context can hold one resource. Context-change events signal changes in this set.

Context-change events SHALL conform to the following extensible syntax. Patterned after the SMART on FHIR scope syntax and expressed in EBNF notation, the FHIRcast syntax for context-change related event names is:

```ebnf
ContextChangeEventName ::= ( FHIRresource ) '-' ( 'open' | 'close' )
Expand All @@ -83,8 +88,18 @@ ContextChangeEventName ::= ( FHIRresource ) '-' ( 'open' | 'close' )

Context change events SHALL include the resource the context change relates to. Common FHIR resources are: Patient, Encounter, ImagingStudy, and DiagnosticReport.

An `<FHIRresource>-open` event signals that the resource in the event now is the anchor-resource for that resource type in the current context.

An `<FHIRresource>-close` event signals that the resource in the event should be removed from the current context.

The key used for indicating a context change event's anchor FHIR resource SHALL be the lower-case resourceType of the resource as defined in the [resource type valueset]( http://build.fhir.org/valueset-version-independent-resource-types.html) of the resource. The [patient-open](3-3-1-Patient-open.html) event uses the `patient` key to signal the new Patient in context, the [encounter-open](3-4-1-Encounter-open.html) event uses the `encounter` key to indicate the new Encounter in anchor resource. Note that due to legacy reasons, some events in the [event catalog](3_Events.html) deviate from this pattern, `study` is used instead of `imagingstudy` for [imagingstudy events](3-5-0-imagingstudyevents.html) and `report` is used instead of `diagnosticreport` for [diagnosticreport events](3-6-0-diagnosticreportevents.html)).

In the case the resource refers to other FHIR resources that represent their own context, these can be included as well. For example, an [`Encounter-open`](3-4-1-Encounter-open.html) also refers to the patient that is the subject of the Encounter. What resources to include is defined in the corresponding event definition in the [event catalog](3_Events.html).

The keys to refer to these anchor FHIR resources SHALL be named as they are named in the deriveable event. E.g. the [`Encounter-open`](3-4-1-Encounter-open.html) event also signals to the patient that is the subject of the Encounter using the `patient` key. What additional anchor-resources to include in an context-change event is defined in the corresponding event definition in the [event catalog](3_Events.html).

An context-change event SHOULD NOT refer to non-anchor resources (resource that are not to be included in the context). In the case this is absolutely required, the key of these resources SHALL be named any arbitrary string which is not a value from the [resource type valueset]( http://build.fhir.org/valueset-version-independent-resource-types.html).

FHIRcast defines profiles for FHIR resources used in `*-open` and `*-close` events documented in the [`event catalog`](3_Events.html). Each resource used to establish context has a profile for when that resource is used in an `*-open` event and a different profile for when that resource is used in a `*-close` event. The profiles for *-`open` events mandate more attributes than those for `*-close` events since all Subscribers need enough information to identify the appropriate information associated with the context resource(s) in their application enabling them to participate in a common context.

FHIRcast does not mandate that contextual subjects have any FHIR persistance; sufficient information to establish a common context may simply be exchanged using FHIR resources as the structure to hold the necessary information without the resources ever existing in a FHIR server (in fact it may be that there is no FHIR server in the infrastructure associated with any Subscriber synchronizing in a FHIRcast topic). As this is an FHIR R4 implementation guide, all profiles and examples conform to FHIR R4 resource specifications. Where relevant/required, notes have been added to the description of the resource profiles indicating how to use the resources in a FHIRcast session using FHIR R5-based resources.
Expand All @@ -105,10 +120,9 @@ FHIRcast supports all events that follow this format. The most common events def

#### Infrastructure events
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should UserHubernate and UserLogout events be here?


This event category contains events required to maintain a FHIRcast session. The main events in this category are:
This event category contains events required to maintain a FHIRcast session. The main event in this category is:

| [`SyncError`](3-2-1-SyncError.html) | indicates refusal to follow context or inability to deliver an event
| [`Heartbeat.html`](3-2-2-Heartbeat.html) | for monitoring the connection to the hub
| [`syncerror`](3-2-1-SyncError.html) | indicates refusal to follow context or inability to deliver an event

#### Selection events

Expand Down
5 changes: 2 additions & 3 deletions input/pagecontent/2-5-EventNotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ In addition to distributing [`SyncError`](3-2-1-SyncError.html) events sent by o

Upon communicating a `SyncError` resulting from an unresponsive Subscriber, the Hub SHALL unsubscribe the Subscriber.

The Hub SHALL NOT generate [`SyncError`](3-2-1-SyncError.html) events in the following situations:
The Hub SHALL NOT generate [`syncerror`](3-2-1-SyncError.html) events in the following situation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be "SyncError" to be consistent with the sentences immediately above?


1. A Subscriber fails to respond to a [`Heartbeat.html`](3-2-2-Heartbeat.html) event (because occasional missed Heartbeat.htmls are expected and are not a context synchronization failure).
2. A Subscriber closes its WebSocket connection to the Hub with a [Connection Close Reason](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1) of 1000 (normal closure) or 1001 (going away).
1. A Subscriber closes its WebSocket connection to the Hub with a [Connection Close Reason](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1) of 1000 (normal closure) or 1001 (going away).

During a normal shutdown of a Subscriber, it SHALL unsubscribe, and provide a WebSocket Connection Close Reason of 1000 and not rely upon the Hub recognizing and unsubscribing it as an unresponsive Subscriber.

Expand Down
2 changes: 1 addition & 1 deletion input/pagecontent/2-9-GetCurrentContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GET `base-hub-URL/{topic}`

### Get Current Context Response

This method returns an object containing the current context of a topic; where the current context is the most recent *-open event according to the Subscriber's subscription. The current context is made up of one or more "top-level" contextual resources and the type of the anchor context SHALL be in the `context.type` field. For example, if the current context was established using a [`Patient-open`](3-3-1-patient-open.html) request the returned object will contain `context.type: "Patient"`. If the current context was created by a [`DiagnosticReport-open`](3-6-1-diagnosticreport-open.html) request the returned object will contain `context.type: "DiagnosticReport"`. If there is no context currently established, the `context.type` SHALL contain an empty string and the `context` SHALL be an empty array.
This method returns an object containing the current context of a topic; where the current context is the most recent *-open event according to the Subscriber's subscription. The current context is made up of one or more "top-level" contextual resources and the type of the anchor context SHALL be in the `context.type` field. For example, if the current context was established using a [`Patient-open`](3-3-1-Patient-open.html) request the returned object will contain `context.type: "Patient"`. If the current context was created by a [`DiagnosticReport-open`](3-6-1-DiagnosticReport-open.html) request the returned object will contain `context.type: "DiagnosticReport"`. If there is no context currently established, the `context.type` SHALL contain an empty string and the `context` SHALL be an empty array.

If an established context is closed without another being opened, the Hub SHALL return an empty context (which as specified above is indicated by returning an empty string for the `context.type` and an empty array in `context`). See [Multi-tab Considerations](4-4-multitab-considerations.html) for additional discussion on multiple context scenarios.

Expand Down
Loading