FHIR Tooling Extensions IG
0.1.0 - Release International flag

This page is part of the HL7 Tools Extension IG (v0.1.0: Releases - Informative) based on FHIR (HL7® FHIR® Standard) v5.0.0. . 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.1.0
Draft as of 2023-12-19 Maturity Level: 2 Computable Name: CDSHooksRequest

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 C0..*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..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA 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..1urlThe base URL of the CDS Client's FHIR server
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 C0..*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..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA 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..1urlThe base URL of the CDS Client's FHIR server
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 C0..*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..1CDSHooksElementObject that has Named Extension Properties
This element can be extended by named JSON elements
... hook 1..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirAuthorization C0..1CDSHooksElementA 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..1CDSHooksElementObject that has Named Extension Properties
This element can be extended by named JSON elements
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 Value: 1 element

Maturity: 2

Differential View

This structure is derived from CDSHooksElement

NameFlagsCard.TypeDescription & Constraintsdoco
.. CDSHooksRequest C0..*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..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA 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..1urlThe base URL of the CDS Client's FHIR server
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 C0..*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..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA 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..1urlThe base URL of the CDS Client's FHIR server
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 C0..*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..1CDSHooksElementObject that has Named Extension Properties
This element can be extended by named JSON elements
... hook 1..1codeThe hook that triggered this CDS Service call
... hookInstance 1..1uuidA universally unique identifier (UUID) for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
... fhirAuthorization C0..1CDSHooksElementA 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..1CDSHooksElementObject that has Named Extension Properties
This element can be extended by named JSON elements
.... accessToken 1..1stringThis is the OAuth 2.0 access token that provides access to the FHIR server
JSON Property Name: access_token
.... tokenType 1..1codeFixed value: Bearer
JSON Property Name: token_type
Fixed Value: Bearer
.... expiresIn 1..1integerThe lifetime in seconds of the access token.
JSON Property Name: expires_in
.... scope 1..1stringThe scopes the access token grants the CDS Service
.... subject 1..1stringThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
.... patient 0..1idThe OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
... context 1..1CDSHookContextHook-specific contextual data that the CDS service will need
JSON: If %resource.hook = 'patient-view'then the type is CDSHookPatientViewContext
JSON: If %resource.hook = 'order-sign'then the type is CDSHookOrderSignContext
JSON: If %resource.hook = 'order-select'then the type is CDSHookOrderSelectContext
... prefetch 0..*BaseKey/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..1codeKey of FHIR query - name for client to use when sending to Request
.... value 1..1ResourceValue 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 Value: 1 element

Maturity: 2

 

Other representations of profile: CSV, Excel