Blog Layout

CDS Hooks - A Technology That Complements SMART Apps

CDS Hooks fhir


Clinicians require a variety of timely information about individual patients, their condition and potential treatment options to develop cost-effective, high-quality care plans. EHRs have struggled to offer precision-driven, personalized decision support tools that can provide the clinicians the information they require. 

 

SMART on FHIR has had considerable early success in building an ecosystem of apps that can be plugged into a variety of EHR systems making structured healthcare data available from third-party applications. However, a challenge faced by clinicians even with the availability of a myriad of such apps is to know exactly which app to invoke at which point in their workflow within the EHR. 

 

A clinician may want to use an app that helps in adjusting the drug dosage based on the patient’s genotype and require to invoke it while making a prescription. The ideal scenario would be to get such clinical decision support that runs automatically with the relevant information presented when it matters the most. 

 

CDS (clinical decision support) Hooks is one such HL7 based open specification that can query for decision support during the clinical workflows, monitoring the on-going activity in the source system (e.g., a hospital information system or EHR), and is triggered in real-time by user actions such as opening a patient record or filling out a patient’s prescription or the beginning of an encounter. 

 

The technical capability offered by CDS Hooks enables the creation of standard points within the EHR workflow known as hooks, where the EHR can issue a notification to an external service that a specific activity occurred within an EHR user session. This notification received by an external application can, in turn return pertinent information mostly in the form of actionable insights to the EHR that gets eventually displayed to the user within the EHR workflow. Data is obtained by the CDS services using FHIR. 

 

CDS Hooks is a vendor agnostic remote decision support specification that can be integrated into any SMART compatible EHR. 


Components of CDS Hooks 

 

CDS Services 

 

A CDS Service is an external service that responds to CDS Client requests by providing recommendations and guidance through cards. The CDS Service provides a “Discovery” endpoint for the CDS Client to discover the available services, and the events (hooks) a service should be invoked on and optionally, any prefetch (additional) information that could be provided to the service.

 

To begin with a CDS Client needs to configure their system to support a set of hooks within their workflow. The service has its own logic to return the advice in the context of the workflow. The way the external service generates the advice can be based out of a flowchart logic, a decision tree or neural network and is out of scope for the CDS specs. 

 

CDS Clients 

 

A CDS Client is an electronic health record, or other clinical information system that consumes decision support by calling CDS Services at specific points in the application's workflow called hooks. In addition, CDS Clients may provide an authorization and FHIR resource server as part of the request to enable services to request additional information. 

 

Hook 

 

A defined point within the client system's workflow with contextual information provided. Each hook defines the hook context available within the CDS Client and specific to the workflow. Each CDS service advertises which hooks it supports and what prefetch data (information needed by the CDS Service to determine what decision support should be presented) it requires. 

 

Cards 

 

Decision support is returned to the CDS Client in the form of cards, displayed to the end-user as part of their workflow. Cards may be informational, or they may provide suggestions that the user may accept or reject, or they may provide a link to additional information or even launch a SMART app when additional user interaction is required. 

 

CDS Cards 

 

A CDS service can return any number of cards with appropriate information. EHR renders each card as it sees fit. Each card has the following attributes: 

 

  • Concise summary 
  • Indicator noting the importance of the card 
  • Information source of the card’s data (an organization or data set) 

 

CDS Card Indicators include the following categories: 

 

  • Informational 
  • Warning 
  • Critical 

 

Each card is labelled with one of these types of indicators and the EHR uses this information for rendering the card with respect to UI display such as coloring. Cards may include categories of data such as Information, Suggestions and SMART App links all embedded into the same card. When the CDS service returns the card, it can do so in any combination of the categories of Information, Suggestions or SMART App links depending on the EHR workflow in question. 

 

Cards convey some combination of text (information card), alternative suggestions (suggestion card), and links to apps or reference materials (app link card), sometimes all embedded into the same card. Following is a snapshot of the categories of cards: 

Components of CDS Hooks

A clinical scenario to understand CDS Hooks 

 

CDS Hooks is an attempt to help clinicians with clinical decision support by running checks automatically for them ahead of time, and then providing information within the context of the EHR. 

 

When a triggering activity occurs, the CDS Client (EHR) notifies each CDS service registered for the activity, which then provide near-real-time feedback about the triggering event with basic details about the clinical workflow context (via the context parameter of the hook) plus whatever service-specific data are required (via the pre-fetch-template parameter).



A clinical scenario to understand CDS Hooks

A great example by which to visualize the way this technology works is in the context of prescription writing.  The event of writing the prescription triggers a CDS Hook which learns that the physician is in the process of writing a prescription, and it can return some information in the form of a “card” that will be displayed inside the EHR. There can be three categories of data that CDS hooks can return: 

 

  • Information card: Providing the financials of the drug being prescribed 
  • Suggestion card: Proposing an alternate drug in accordance with the age of the patient with a button to switch over. 
  • App link card: Providing link to an external app. Example, while in the medication prescription workflow, if it makes sense to run an app that can provide guidelines on managing hypertension, the CDS service might return a link to that app. Therefore, CDS hooks is a technology that complements SMART Apps as it enables to launch the right app at the right time. 

 

Hook context 

 

Any user workflow or action within an EHR (CDS Client) will include contextual information such as the current user, patient and so on. CDS Hooks refers to this information as context. For each hook, a set of context parameters get defined each of which can be either optional or required (depending on the capabilities of individual CDS Clients) and each has a data type associated with it. However, the context information is intended to be relevant to most CDS Services subscribing to the hook. 

 

Each hook includes: 


  • Data specific to a hook 
  • Data that all CDS services using that hook would use 
  • Can be FHIR data or references to FHIR data 
  • Every hook defines its own context 

 

Hook prefetch 

 

For understanding the concept of Hook Prefetch, let us consider the example of a Patient view hook. CDS services that may require the full patient details, can request it to be prefetched or fetch it as needed from the FHIR server using a prefetch template in their discovery response. Another example is the ePrescription workflow. While placing medication order, allergies do not form part of the official set of contexts that the hook defines. However, one can register with the CDS service a “Prefetch request”. Once registered with the service every time the EHR calls the service, the allergies information must be fetched from the EHR and included while calling the service.  This however is an optional requirement as not all EHR can support this. Every CDS service may have different requirements, and the services can register a set of their requirements when they get configured to work inside an EHR. 

 

Prefetch data is always FHIR data, specific to a given CDS Service and expressed as FHIR read/search queries. 

 

Prefetch data is defined by each CDS Service because it is specific to the information that service needs in order to process. 

 

 “Standard Hooks” available for use 

 

Patient View: This is invoked when a patient record gets opened. 

Order Select: This is fired when a clinician selects one or more orders to place 

Order Sign: This is invoked when a clinician is ready to sign one or more orders for a patient 

Appointment Book: This is invoked when the user is scheduling encounters/visits for the patient 

Encounter Start: This is invoked when the user is initiating a new encounter. In Inpatient setting this would be at the time of admission and in Outpatient setting this would be the time of patient-check-in for a face-to-face or equivalent for a virtual/telephone encounter 

Encounter Discharge: This is invoked while performing discharge formalities relevant for an inpatient encounter 

 

 

Security of CDS Hooks 

 

When an EHR needs to configure a new set of CDS service, the CDS service provider hosts a Discovery endpoint which includes a list of services provided. So, Discovery provides the end-to-end way to configure all the details required for one or more services that needs to be connected to. 

 

Before the CDS service and the EHR get connected, the EHR needs to adequately protect the clinical data it supplies. This is done by registering the service with the EHR’s Authorization server and generate access tokens by the Auth service for the EHR to pass to the service. When the EHR calls the service, it uses transport layer security (TLS) as the communications channel and uses certificates to establish the identity of the service to the EHR. 

 

Likewise, the CDS service also needs to be able to trust that the call is from a known EHR and needs to authenticate the EHR that’s invoking it. Each call from the EHR to the service is accompanied by a JSON web token signed by the EHRs private key which allows the CDS service to verify that the call is legitimate. 

 

Clinical decision making is complex involving myriad data points, inputs, changing guidelines and protocols and need to be patient and event specific and standard EHR systems often fail to support clinical decision making. CDS hooks is fast emerging as a probable answer to the challenges of providing patient/context specific decision support by enabling information displayed within the EHR to be specific to both the patient and stage of treatment. In addition, CDS hooks can also be actionable to the clinician within the context of the EHR workflow.


CDS hooks can be tailored to integrate seamlessly with the diverse EHR vendors systems. A well-designed implementation of CDS Hooks will enable software to remember when providers accept or reject cards so that information flows to the provider in a way that’s useful and usable. With careful design to limit the possibility of alert fatigue often associated with CDS, EHRs will be able to offer customers the advantages of a new clinical quality-enhancing functionality with limited development effort, making this technology a win-win-win-win for providers, patients, EHR vendors and third-party software developers.


In the current healthcare scenario, CDS hooks can be considered best fit since every vendor will be supporting the same FHIR based APIs with standardized hooks which means that CDS developers need not build unique interfaces with every clinical application it seeks to integrate, rather build a single standardized API that works with all. 

 

A common set of CDS Hooks is already drafted for established use cases, however it is by no means a closed list and digital health communities such as the FHIR Implementations working group are encouraged to develop and implement new ‘Hooks’ for new use cases in the days to come. 

Share by: