CDS Hooks
3.0.0 - R3 Normative/Trial-Use International flag

CDS Hooks, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 3.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cds-hooks/ and changes regularly. See the Directory of published versions

Logical Model: CDSHooks Request (Logical Definition)

Official URL: http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest Version: 3.0.0
Standards status: Informative Maturity Level: 1 Computable Name: CDSHooksRequest
Other Identifiers: OID:2.16.840.1.113883.4.642.40.93.42.5

This structure is defined to allow the FHIR Validator to validate a CDSHooks Request Body.

Usages:

  • This Logical Model is not used by any profiles in this Specification

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description Differentials, Snapshots, and other representations.

This structure is derived from CDSHooksElement

NameFlagsCard.TypeDescription & Constraints    Filter: doco
CDSHooksRequest C 0..* CDSHooksElement A request for decision support

Elements defined in Ancestors:extension
Constraints: cds-r-1
CDSHooksRequest.hook 1..1 string The hook that triggered this CDS Service call
CDSHooksRequest.hookInstance 1..1 uuid A UUID for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
CDSHooksRequest.fhirServer 0..1 url The base URL of the CDS Client's FHIR server
CDSHooksRequest.fhirAuthorization.accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server
JSON Property Name: access_token
CDSHooksRequest.fhirAuthorization.tokenType 1..1 code Bearer
JSON Property Name: token_type
Fixed Value: Bearer (no extensions allowed)
CDSHooksRequest.fhirAuthorization.expiresIn 1..1 integer The lifetime in seconds of the access token
JSON Property Name: expires_in
CDSHooksRequest.fhirAuthorization.scope 1..1 string Scopes granted by access token
CDSHooksRequest.fhirAuthorization.subject 1..1 string OAuth 2.0 client identifier of the CDS Service
CDSHooksRequest.fhirAuthorization.patient 0..1 id FHIR id of the patient
CDSHooksRequest.context 1..1 CDSHookContext Contextual data always needed for this hook type
JSON: If%resource.hook = 'appointment-book'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext
JSON: If%resource.hook = 'encounter-start'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext
JSON: If%resource.hook = 'encounter-discharge'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext
JSON: If%resource.hook = 'patient-view'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext
JSON: If%resource.hook = 'order-dispatch'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext
JSON: If%resource.hook = 'order-sign'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext
CDSHooksRequest.prefetch 0..* Base Additional information requested by service for this hook type
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
CDSHooksRequest.prefetch.key 1..1 code Key of FHIR query
CDSHooksRequest.prefetch.value 1..1 Resource Results of query/read
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

Id Grade Path(s) Description Expression
cds-r-1 error CDSHooksRequest if fhirAuthorization details are provided, a fhirServer SHALL be specified fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2 warning CDSHooksRequest.fhirAuthorization 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()
NameFlagsCard.TypeDescription & Constraints    Filter: doco
CDSHooksRequest C 0..* CDSHooksElement A request for decision support

Elements defined in Ancestors:extension
Constraints: cds-r-1
CDSHooksRequest.extension 0..1 CDSHooksExtensions Object that has Named Extension Properties
CDSHooksRequest.hook 1..1 string The hook that triggered this CDS Service call
CDSHooksRequest.hookInstance 1..1 uuid A UUID for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
CDSHooksRequest.fhirServer 0..1 url The base URL of the CDS Client's FHIR server
CDSHooksRequest.fhirAuthorization C 0..1 CDSHooksElement Authorization info for service to use when querying
Constraints: cds-r-2
CDSHooksRequest.fhirAuthorization.extension 0..1 CDSHooksExtensions Object that has Named Extension Properties
CDSHooksRequest.fhirAuthorization.accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server
JSON Property Name: access_token
CDSHooksRequest.fhirAuthorization.tokenType 1..1 code Bearer
JSON Property Name: token_type
Fixed Value: Bearer (no extensions allowed)
CDSHooksRequest.fhirAuthorization.expiresIn 1..1 integer The lifetime in seconds of the access token
JSON Property Name: expires_in
CDSHooksRequest.fhirAuthorization.scope 1..1 string Scopes granted by access token
CDSHooksRequest.fhirAuthorization.subject 1..1 string OAuth 2.0 client identifier of the CDS Service
CDSHooksRequest.fhirAuthorization.patient 0..1 id FHIR id of the patient
CDSHooksRequest.context 1..1 CDSHookContext Contextual data always needed for this hook type
JSON: If%resource.hook = 'appointment-book'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext
JSON: If%resource.hook = 'encounter-start'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext
JSON: If%resource.hook = 'encounter-discharge'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext
JSON: If%resource.hook = 'patient-view'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext
JSON: If%resource.hook = 'order-dispatch'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext
JSON: If%resource.hook = 'order-sign'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext
CDSHooksRequest.prefetch 0..* Base Additional information requested by service for this hook type
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
CDSHooksRequest.prefetch.key 1..1 code Key of FHIR query
CDSHooksRequest.prefetch.value 1..1 Resource Results of query/read
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

Id Grade Path(s) Description Expression
cds-r-1 error CDSHooksRequest if fhirAuthorization details are provided, a fhirServer SHALL be specified fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2 warning CDSHooksRequest.fhirAuthorization 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()

This structure is derived from CDSHooksElement

Summary

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

Maturity: 1

Differential View

This structure is derived from CDSHooksElement

NameFlagsCard.TypeDescription & Constraints    Filter: doco
CDSHooksRequest C 0..* CDSHooksElement A request for decision support

Elements defined in Ancestors:extension
Constraints: cds-r-1
CDSHooksRequest.hook 1..1 string The hook that triggered this CDS Service call
CDSHooksRequest.hookInstance 1..1 uuid A UUID for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
CDSHooksRequest.fhirServer 0..1 url The base URL of the CDS Client's FHIR server
CDSHooksRequest.fhirAuthorization C 0..1 CDSHooksElement Authorization info for service to use when querying
Constraints: cds-r-2
CDSHooksRequest.fhirAuthorization.accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server
JSON Property Name: access_token
CDSHooksRequest.fhirAuthorization.tokenType 1..1 code Bearer
JSON Property Name: token_type
Fixed Value: Bearer (no extensions allowed)
CDSHooksRequest.fhirAuthorization.expiresIn 1..1 integer The lifetime in seconds of the access token
JSON Property Name: expires_in
CDSHooksRequest.fhirAuthorization.scope 1..1 string Scopes granted by access token
CDSHooksRequest.fhirAuthorization.subject 1..1 string OAuth 2.0 client identifier of the CDS Service
CDSHooksRequest.fhirAuthorization.patient 0..1 id FHIR id of the patient
CDSHooksRequest.context 1..1 CDSHookContext Contextual data always needed for this hook type
JSON: If%resource.hook = 'appointment-book'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext
JSON: If%resource.hook = 'encounter-start'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext
JSON: If%resource.hook = 'encounter-discharge'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext
JSON: If%resource.hook = 'patient-view'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext
JSON: If%resource.hook = 'order-dispatch'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext
JSON: If%resource.hook = 'order-sign'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext
CDSHooksRequest.prefetch 0..* Base Additional information requested by service for this hook type
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
CDSHooksRequest.prefetch.key 1..1 code Key of FHIR query
CDSHooksRequest.prefetch.value 1..1 Resource Results of query/read
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

Id Grade Path(s) Description Expression
cds-r-1 error CDSHooksRequest if fhirAuthorization details are provided, a fhirServer SHALL be specified fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2 warning CDSHooksRequest.fhirAuthorization 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()

Snapshot ViewView

NameFlagsCard.TypeDescription & Constraints    Filter: doco
CDSHooksRequest C 0..* CDSHooksElement A request for decision support

Elements defined in Ancestors:extension
Constraints: cds-r-1
CDSHooksRequest.extension 0..1 CDSHooksExtensions Object that has Named Extension Properties
CDSHooksRequest.hook 1..1 string The hook that triggered this CDS Service call
CDSHooksRequest.hookInstance 1..1 uuid A UUID for this particular hook call
When this element is read urn:uuid: is prefixed to the value before validation
CDSHooksRequest.fhirServer 0..1 url The base URL of the CDS Client's FHIR server
CDSHooksRequest.fhirAuthorization C 0..1 CDSHooksElement Authorization info for service to use when querying
Constraints: cds-r-2
CDSHooksRequest.fhirAuthorization.extension 0..1 CDSHooksExtensions Object that has Named Extension Properties
CDSHooksRequest.fhirAuthorization.accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server
JSON Property Name: access_token
CDSHooksRequest.fhirAuthorization.tokenType 1..1 code Bearer
JSON Property Name: token_type
Fixed Value: Bearer (no extensions allowed)
CDSHooksRequest.fhirAuthorization.expiresIn 1..1 integer The lifetime in seconds of the access token
JSON Property Name: expires_in
CDSHooksRequest.fhirAuthorization.scope 1..1 string Scopes granted by access token
CDSHooksRequest.fhirAuthorization.subject 1..1 string OAuth 2.0 client identifier of the CDS Service
CDSHooksRequest.fhirAuthorization.patient 0..1 id FHIR id of the patient
CDSHooksRequest.context 1..1 CDSHookContext Contextual data always needed for this hook type
JSON: If%resource.hook = 'appointment-book'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext
JSON: If%resource.hook = 'encounter-start'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext
JSON: If%resource.hook = 'encounter-discharge'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext
JSON: If%resource.hook = 'patient-view'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext
JSON: If%resource.hook = 'order-dispatch'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext
JSON: If%resource.hook = 'order-sign'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext
JSON: If%resource.hook = 'order-select'then the type is http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext
CDSHooksRequest.prefetch 0..* Base Additional information requested by service for this hook type
JSON: Represented as a single JSON Object with named properties using the value of the key child as the key
CDSHooksRequest.prefetch.key 1..1 code Key of FHIR query
CDSHooksRequest.prefetch.value 1..1 Resource Results of query/read
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

Id Grade Path(s) Description Expression
cds-r-1 error CDSHooksRequest if fhirAuthorization details are provided, a fhirServer SHALL be specified fhirAuthorization.exists() implies fhirServer.exists()
cds-r-2 warning CDSHooksRequest.fhirAuthorization 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()

This structure is derived from CDSHooksElement

Summary

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

Maturity: 1

 

Other representations of profile: CSV, Excel