FHIR Tooling Extensions IG
0.3.0 - Release 0.2.0 International flag

This page is part of the HL7 Tools Extension IG (v0.3.0: Releases - Informative) based on FHIR (HL7® FHIR® Standard) v5.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

Logical Model: CDSHooks Request (Logical Definition) ( Experimental )

Official URL: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksRequest Version: 0.3.0
Draft as of 2024-10-27 Maturity Level: 2 Computable Name: CDSHooksRequest
Other Identifiers: OID:2.16.840.1.113883.4.642.40.1.42.6

This structure is defined to allow the FHIR Validator to validate a CDSHooks Request Body. TODO: This content will be moved to the CDS Hooks specification in the future

Usage:

  • This Logical Model Profile is not used by any profiles in this Implementation Guide

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

This structure is derived from CDSHooksElement

NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirServer 0..1 url The base URL of the CDS Client's FHIR server
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()
NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirServer 0..1 url The base URL of the CDS Client's FHIR server
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()
NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... extension 0..1 CDSHooksElement Object that has Named Extension Properties
This element can be extended by named JSON elements
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirAuthorization C 0..1 CDSHooksElement 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
cds-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.
.... extension 0..1 CDSHooksElement Object that has Named Extension Properties
This element can be extended by named JSON elements
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()

This structure is derived from CDSHooksElement

Summary

Mandatory: 0 element(10 nested mandatory elements)
Fixed: 1 element

Maturity: 2

Differential View

This structure is derived from CDSHooksElement

NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirServer 0..1 url The base URL of the CDS Client's FHIR server
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirServer 0..1 url The base URL of the CDS Client's FHIR server
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C 0..* CDSHooksElement
Elements defined in Ancestors:extension
The response to the discovery endpoint
Instances of this logical model are not marked to be the target of a Reference
cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified
... extension 0..1 CDSHooksElement Object that has Named Extension Properties
This element can be extended by named JSON elements
... hook 1..1 code The hook that triggered this CDS Service call
... hookInstance 1..1 uuid A universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirAuthorization C 0..1 CDSHooksElement 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
cds-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.
.... extension 0..1 CDSHooksElement Object that has Named Extension Properties
This element can be extended by named JSON elements
.... accessToken 1..1 string This is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1 code Fixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1 integer The lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1 string The scopes the access token grants the CDS Service
.... subject 1..1 string The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1 id The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1 CDSHookContext Hook-specific contextual data that the CDS service will need
JSON: If%resource.hook = 'patient-view'then the type isCDSHookPatientViewContext
JSON: If%resource.hook = 'order-sign'then the type isCDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type isCDSHookOrderSelectContext
... prefetch 0..* Base Key/value pairs of FHIR queries the CDS Client provides on each call
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
.... key 1..1 code Key of FHIR query - name for client to use when sending to Request
.... value 1..1 Resource Value of FHIR query - FHIR Query for client to perform
Id may or not be present (this is the default for elements but not resources)
JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
cds-r-1errorCDSHooksRequestif fhirAuthorization details are provided, a fhirServer SHALL be specified
: fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2errorCDSHooksRequest.fhirAuthorizationIf 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()

This structure is derived from CDSHooksElement

Summary

Mandatory: 0 element(10 nested mandatory elements)
Fixed: 1 element

Maturity: 2

 

Other representations of profile: CSV, Excel