English Generated Narrative: StructureDefinition CDSHooksRequest Name Flags Card. Type Description & Constraints CDSHooksRequest C 0..* CDSHooksElement A request for decision support Elements defined in Ancestors:extension Constraints: cds-r-1 #xD; hook 1..1 code The hook that triggered this CDS Service call #xD; 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 #xD; fhirServer 0..1 url The base URL of the CDS Client's FHIR server #xD; fhirAuthorization C 0..1 CDSHooksElement Authorization info for service to use when querying Constraints: cds-r-2 #xD; accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server JSON Property Name: access_token #xD; tokenType 1..1 code Bearer JSON Property Name: token_type Fixed Value: Bearer #xD; expiresIn 1..1 integer The lifetime in seconds of the access token JSON Property Name: expires_in #xD; scope 1..1 string Scopes granted by access token #xD; subject 1..1 string OAuth 2.0 client identifier of the CDS Service #xD; patient 0..1 id OAuth 2.0 client identifier of the CDS Service #xD; context 1..1 CDSHookContext Contextual data always needed for this hook type JSON: If%resource.hook = 'appointment-book'then the type is CDSHookAppointmentBookContext JSON: If%resource.hook = 'encounter-start'then the type is CDSHookEncounterStartContext JSON: If%resource.hook = 'encounter-discharge'then the type is CDSHookEncounterDischargeContext JSON: If%resource.hook = 'patient-view'then the type is CDSHookPatientViewContext JSON: If%resource.hook = 'order-dispatch'then the type is CDSHookOrderDispatchContext JSON: If%resource.hook = 'order-sign'then the type is CDSHookOrderSignContext JSON: If%resource.hook = 'order-select'then the type is CDSHookOrderSelectContext #xD; 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 #xD; key 1..1 code Key of FHIR query #xD; 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) #xD; Documentation for this format Spanish Generated Narrative: StructureDefinition CDSHooksRequest Name Flags Card. Type Description & Constraints CDSHooksRequest C 0..* CDSHooksElement A request for decision support Elements defined in Ancestors:extension Constraints: cds-r-1 #xD; hook 1..1 code The hook that triggered this CDS Service call #xD; 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 #xD; fhirServer 0..1 url The base URL of the CDS Client's FHIR server #xD; fhirAuthorization C 0..1 CDSHooksElement Authorization info for service to use when querying Constraints: cds-r-2 #xD; accessToken 1..1 string OAuth 2.0 access token giving access to FHIR server JSON Property Name: access_token #xD; tokenType 1..1 code Bearer JSON Property Name: token_type Fixed Value: Bearer #xD; expiresIn 1..1 integer The lifetime in seconds of the access token JSON Property Name: expires_in #xD; scope 1..1 string Scopes granted by access token #xD; subject 1..1 string OAuth 2.0 client identifier of the CDS Service #xD; patient 0..1 id OAuth 2.0 client identifier of the CDS Service #xD; context 1..1 CDSHookContext Contextual data always needed for this hook type JSON: If%resource.hook = 'appointment-book'then the type is CDSHookAppointmentBookContext JSON: If%resource.hook = 'encounter-start'then the type is CDSHookEncounterStartContext JSON: If%resource.hook = 'encounter-discharge'then the type is CDSHookEncounterDischargeContext JSON: If%resource.hook = 'patient-view'then the type is CDSHookPatientViewContext JSON: If%resource.hook = 'order-dispatch'then the type is CDSHookOrderDispatchContext JSON: If%resource.hook = 'order-sign'then the type is CDSHookOrderSignContext JSON: If%resource.hook = 'order-select'then the type is CDSHookOrderSelectContext #xD; 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 #xD; key 1..1 code Key of FHIR query #xD; 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) #xD; Documentation for this format
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
The data structure that used when invoking a CDS Hook service
if fhirAuthorization details are provided, a fhirServer SHALL be specified
fhirAuthorization.exists() implies fhirServer.exists()
Object that has Named Extension Properties
A JSON object that has properties where the names are defined by the extension definitions
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. How to handle complex extensions (objects) is not defined
The hook that triggered this CDS Service call
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
Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable.
The base URL of the CDS Client's FHIR server
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
Authorization info for service to use when querying
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
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()
OAuth 2.0 access token giving access to FHIR server
This is the OAuth 2.0 access token that provides access to the FHIR server
The type of token provided. (Present to support future extensibility)
The lifetime in seconds of the access token
The lifetime in seconds of the access token.
The scopes the access token grants the CDS Service
OAuth 2.0 client identifier of the CDS Service
The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server
Contextual data always needed for this hook type
Hook-specific contextual data that the CDS service will need
Additional information requested by service for this hook type
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
Name of the FHIR query/read from the CDS Hooks Services object provided by the server
What was found by executing the search or read requested by the CDS Hooks Service in the context of this particular hook invocation