FHIR Tooling Extensions IG
0.2.0 - Release 0.2.0 International flag

FHIR Tooling Extensions IG, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/fhir-tools-ig/ and changes regularly. See the Directory of published versions

Logical Model: CDSHooksRequest - Detailed Descriptions

Draft as of 2024-10-23 Maturity Level: 2

Definitions for the CDSHooksRequest logical model.

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksRequest
Definition

The response to the discovery endpoint

ShortThe response to the discovery endpoint
Logical ModelInstances of this logical model are not marked to be the target of a Reference
Invariantscds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists())
2. CDSHooksRequest.hook
Definition

The hook that triggered this CDS Service call

ShortThe hook that triggered this CDS Service call
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
4. CDSHooksRequest.hookInstance
Definition

While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation

ShortA universally unique identifier (UUID) for this particular hook call
Comments

Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable.

Control1..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
6. CDSHooksRequest.fhirServer
Definition

The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged

ShortThe base URL of the CDS Client's FHIR server
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. CDSHooksRequest.fhirAuthorization
Definition

A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token

ShortA structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token
Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists())
10. CDSHooksRequest.fhirAuthorization.accessToken
Definition

This is the OAuth 2.0 access token that provides access to the FHIR server

ShortThis is the OAuth 2.0 access token that provides access to the FHIR server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameaccess_token
12. CDSHooksRequest.fhirAuthorization.tokenType
Definition

Fixed value: Bearer

ShortFixed value: Bearer
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nametoken_type
Fixed ValueBearer
14. CDSHooksRequest.fhirAuthorization.expiresIn
Definition

The lifetime in seconds of the access token.

ShortThe lifetime in seconds of the access token.
Control1..1
Typeinteger
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameexpires_in
16. CDSHooksRequest.fhirAuthorization.scope
Definition

The scopes the access token grants the CDS Service

ShortThe scopes the access token grants the CDS Service
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
18. CDSHooksRequest.fhirAuthorization.subject
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. CDSHooksRequest.fhirAuthorization.patient
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control0..1
Typeid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. CDSHooksRequest.context
Definition

Hook-specific contextual data that the CDS service will need

ShortHook-specific contextual data that the CDS service will need
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHookContext
Type SpecifiersIf %resource.hook = 'patient-view' then the type is CDSHookPatientViewContext
If %resource.hook = 'order-sign' then the type is CDSHookOrderSignContext
If %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext
24. CDSHooksRequest.prefetch
Definition

An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query

ShortKey/value pairs of FHIR queries the CDS Client provides on each call
Control0..*
TypeBase
JSON FormatThis repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child
26. CDSHooksRequest.prefetch.key
Definition

Key of FHIR query - name for client to use when sending to Request

ShortKey of FHIR query - name for client to use when sending to Request
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
28. CDSHooksRequest.prefetch.value
Definition

Value of FHIR query - FHIR Query for client to perform

ShortValue of FHIR query - FHIR Query for client to perform
Control1..1
TypeResource
ID ExpectationId may or not be present (this is the default for elements but not resources)
JSON FormatThis object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksRequest
Definition

The response to the discovery endpoint


Base definition for all types defined in FHIR type system.

ShortThe response to the discovery endpointBase for all types and resources
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
Invariantscds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists())
2. CDSHooksRequest.hook
Definition

The hook that triggered this CDS Service call

ShortThe hook that triggered this CDS Service call
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
4. CDSHooksRequest.hookInstance
Definition

While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation

ShortA universally unique identifier (UUID) for this particular hook call
Comments

Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable.

Control1..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
6. CDSHooksRequest.fhirServer
Definition

The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged

ShortThe base URL of the CDS Client's FHIR server
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. CDSHooksRequest.fhirAuthorization
Definition

A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token

ShortA structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token
Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists())
10. CDSHooksRequest.fhirAuthorization.accessToken
Definition

This is the OAuth 2.0 access token that provides access to the FHIR server

ShortThis is the OAuth 2.0 access token that provides access to the FHIR server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameaccess_token
12. CDSHooksRequest.fhirAuthorization.tokenType
Definition

Fixed value: Bearer

ShortFixed value: Bearer
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nametoken_type
Fixed ValueBearer
14. CDSHooksRequest.fhirAuthorization.expiresIn
Definition

The lifetime in seconds of the access token.

ShortThe lifetime in seconds of the access token.
Control1..1
Typeinteger
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameexpires_in
16. CDSHooksRequest.fhirAuthorization.scope
Definition

The scopes the access token grants the CDS Service

ShortThe scopes the access token grants the CDS Service
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
18. CDSHooksRequest.fhirAuthorization.subject
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. CDSHooksRequest.fhirAuthorization.patient
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control0..1
Typeid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. CDSHooksRequest.context
Definition

Hook-specific contextual data that the CDS service will need

ShortHook-specific contextual data that the CDS service will need
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHookContext
Type SpecifiersIf %resource.hook = 'patient-view' then the type is CDSHookPatientViewContext
If %resource.hook = 'order-sign' then the type is CDSHookOrderSignContext
If %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext
24. CDSHooksRequest.prefetch
Definition

An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query

ShortKey/value pairs of FHIR queries the CDS Client provides on each call
Control0..*
TypeBase
JSON FormatThis repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child
26. CDSHooksRequest.prefetch.key
Definition

Key of FHIR query - name for client to use when sending to Request

ShortKey of FHIR query - name for client to use when sending to Request
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
28. CDSHooksRequest.prefetch.value
Definition

Value of FHIR query - FHIR Query for client to perform

ShortValue of FHIR query - FHIR Query for client to perform
Control1..1
TypeResource
ID ExpectationId may or not be present (this is the default for elements but not resources)
JSON FormatThis object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksRequest
Definition

The response to the discovery endpoint

ShortThe response to the discovery endpoint
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
Invariantscds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists())
2. CDSHooksRequest.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

Extension structures SHOULD use a strategy for naming that ensures global uniqueness, such as reverse-domain-name notation, e.g. com.cds-hooks.sandbox.myextension-practitionerspecialty

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
4. CDSHooksRequest.hook
Definition

The hook that triggered this CDS Service call

ShortThe hook that triggered this CDS Service call
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
6. CDSHooksRequest.hookInstance
Definition

While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation

ShortA universally unique identifier (UUID) for this particular hook call
Comments

Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable.

Control1..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
8. CDSHooksRequest.fhirServer
Definition

The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged

ShortThe base URL of the CDS Client's FHIR server
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. CDSHooksRequest.fhirAuthorization
Definition

A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token

ShortA structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token
Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists())
12. CDSHooksRequest.fhirAuthorization.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

Extension structures SHOULD use a strategy for naming that ensures global uniqueness, such as reverse-domain-name notation, e.g. com.cds-hooks.sandbox.myextension-practitionerspecialty

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
14. CDSHooksRequest.fhirAuthorization.accessToken
Definition

This is the OAuth 2.0 access token that provides access to the FHIR server

ShortThis is the OAuth 2.0 access token that provides access to the FHIR server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameaccess_token
16. CDSHooksRequest.fhirAuthorization.tokenType
Definition

Fixed value: Bearer

ShortFixed value: Bearer
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nametoken_type
Fixed ValueBearer
18. CDSHooksRequest.fhirAuthorization.expiresIn
Definition

The lifetime in seconds of the access token.

ShortThe lifetime in seconds of the access token.
Control1..1
Typeinteger
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
JSON FormatThis property appears in JSON with the property nameexpires_in
20. CDSHooksRequest.fhirAuthorization.scope
Definition

The scopes the access token grants the CDS Service

ShortThe scopes the access token grants the CDS Service
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. CDSHooksRequest.fhirAuthorization.subject
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
24. CDSHooksRequest.fhirAuthorization.patient
Definition

The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server

ShortThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Control0..1
Typeid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. CDSHooksRequest.context
Definition

Hook-specific contextual data that the CDS service will need

ShortHook-specific contextual data that the CDS service will need
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHookContext
Type SpecifiersIf %resource.hook = 'patient-view' then the type is CDSHookPatientViewContext
If %resource.hook = 'order-sign' then the type is CDSHookOrderSignContext
If %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext
28. CDSHooksRequest.prefetch
Definition

An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query

ShortKey/value pairs of FHIR queries the CDS Client provides on each call
Control0..*
TypeBase
JSON FormatThis repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child
30. CDSHooksRequest.prefetch.key
Definition

Key of FHIR query - name for client to use when sending to Request

ShortKey of FHIR query - name for client to use when sending to Request
Control1..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
32. CDSHooksRequest.prefetch.value
Definition

Value of FHIR query - FHIR Query for client to perform

ShortValue of FHIR query - FHIR Query for client to perform
Control1..1
TypeResource
ID ExpectationId may or not be present (this is the default for elements but not resources)
JSON FormatThis object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)