Skip to content

CDS Hooks service returns Questionnaire

Isaac Vetter edited this page Jul 10, 2019 · 2 revisions

Why

The FHIR Questionnaire resource is an organized collection of questions intended to communicate data originating from forms used in medical history examinations, research questionnaires and sometimes full clinical specialty records.

A CDS Service may need to gather additional information from the user to deliver its best guidance. Typically, this is done by the service presenting an app link card to the user, and subsequently providing a series of questions directly in the app.

A SMART app is both more functional and more complex than a Questionnaire resource.

CDS Service returns Questionnaire as link

Upon being triggered by a hook, a CDS service may return one or more cards. Each card may contain one or more links. Each link has a type of either absolute or smart. Here's what the spec says about this:

There are two possible values for this field. A type of absolute indicates that the URL is absolute and should be treated as-is. A type of smart indicates that the URL is a SMART app launch URL and the CDS Client should ensure the SMART app launch URL is populated with the appropriate SMART launch parameters.

A new type of questionnaire indicates to the CDS Client that the url is a reference to a FHIR Questionnaire resource and requires specific treatment.

{
  "cards": [
    {
      "summary": "Example Card",
      "indicator": "info",
      "detail": "This is an example card.",
      "source": {
        "label": "Static CDS Service Example",
        "url": "https://example.com",
        "icon": "https://example.com/img/icon-100px.png"
      },
      "links": [
        {
          "label": "Google",
          "url": "https://google.com",
          "type": "absolute"
        },
        {
          "label": "SMART Example App",
          "url": "https://smart.example.com/launch",
          "type": "smart",
          "appContext": "{\"session\":3456356,\"settings\":{\"module\":4235}}"
        },
        {
          "label": "Provide more information for more detailed guidance.",
          "url": "{client's fhir base url}/Questionnaire/detailed-form123",
          "type": "questionnaire"
        }
      ]
    },
    {
      "summary": "Another card",
      "indicator": "warning",
      "source": {
        "label": "Static CDS Service Example"
      }
    }
  ]
}

CDS Service accesses results and re-returns guidance to user

How? Perhaps, the CDS Client triggers a "meta" hook indicating that there's new guidance.

Outstanding questions

  1. Is it reasonable to ask the service to create a Questionnaire on the EHR and then return that url? Alternatively, should the the service host the questionnaire?
  2. Why shouldn't the Questionnaire be returned inline? Maybe as a question card ?
  3. How does the CDS Service present guidance following the questionnaire being answered?