FHIR Tooling Extensions IG
0.2.0 - Release 0.2.0 International flag

This page is part of the HL7 Tools Extension IG (v0.2.0: Releases - Informative) based on FHIR (HL7® FHIR® Standard) v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Logical Model: CDSHooksResponse - Detailed Descriptions

Draft as of 2024-04-26 Maturity Level: 2

Definitions for the CDSHooksResponse logical model.

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksResponse
Definition

The response to the discovery endpoint

ShortThe response to the discovery endpoint
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. CDSHooksResponse.cards
Definition

An array of Cards. Cards can provide a combination of information (for reading), suggested actions (to be applied if a user selects them), and links (to launch an app if the user selects them).

ShortAn array of Cards that provide information, suggested actions, and links
Comments

The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
JSON FormatThe JSON Array for this property is present even when there are no items in the instance (e.g. as an empty array)
Invariantscds-resp-1: only one action can be suggested if selectionBehavior = at-most-one ((selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1)
4. CDSHooksResponse.cards.uuid
Definition

Unique identifier of the card. MAY be used for auditing and logging cards and SHALL be included in any subsequent calls to the CDS service's feedback endpoint.

ShortUnique identifier of the card (for logging/feedback)
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
6. CDSHooksResponse.cards.summary
Definition

One-sentence, <140-character summary message for display to the user inside of this card.

ShortSummary message for display to the user (<140 char)
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. CDSHooksResponse.cards.detail
Definition

Optional detailed information to display; if provided MUST be represented in (GitHub Flavored) Markdown. (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like 'view more details...').

ShortOptional detailed information to display (GitHub Flavored Markdown)
Control0..1
Typemarkdown
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. CDSHooksResponse.cards.indicator
Definition

Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.

Shortinfo, warning, critical - Urgency/importance of what this card conveys
Comments

The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.

Control0..1
BindingThe codes SHALL be taken from CDSIndicator Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSIndicator)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. CDSHooksResponse.cards.source
Definition

The source should be the primary source of guidance for the decision support the card represents.

ShortThe primary source of guidance for the content the card represents.
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
14. CDSHooksResponse.cards.source.label
Definition

A short, human-readable label to display for the source of the information displayed on this card. If a url is also specified, this MAY be the text for the hyperlink.

ShortShort, human-readable label to display for the source.
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
16. CDSHooksResponse.cards.source.url
Definition

An optional absolute URL to load (via GET, in a browser context) when a user clicks on this link to learn more about the organization or data set that provided the information on this card.

ShortLink for when user clicks for more information about the source
Comments

Note that this URL should not be used to supply a context-specific 'drill-down' view of the information on this card. For that, use card.link.url instead.

Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
18. CDSHooksResponse.cards.source.icon
Definition

An absolute URL to an icon for the source of this card. The icon returned by this URL SHOULD be a 100x100 pixel PNG image without any transparent regions. The CDS Client may ignore or scale the image during display as appropriate for user experience.

Shortabsolute URL to an icon for the source (<100x100 PNG))
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. CDSHooksResponse.cards.source.topic
Definition

A topic describes the content of the card by providing a high-level categorization that can be useful for filtering, searching or ordered display of related cards in the CDS client's UI. This specification does not prescribe a standard set of topics

ShortDescribes the content of the card - can be useful for filtering, searching or ordered display
Comments

This specification does not prescribe a standard set of topics

Control0..1
TypeCoding
22. CDSHooksResponse.cards.suggestions
Definition

Allows a service to suggest a set of changes in the context of the current activity (e.g. changing the dose of a medication currently being prescribed, for the order-sign activity).

ShortSuggest a set of changes in the context of the current activity
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-5: All suggestion actions must have a description (actions.all(description.exists()))
24. CDSHooksResponse.cards.suggestions.label
Definition

Human-readable label to display for this suggestion

ShortHuman-readable label to display for this suggestion
Comments

e.g. the CDS Client might render this as the text on a button tied to this suggestion

Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. CDSHooksResponse.cards.suggestions.uuid
Definition

Unique identifier, used for auditing and logging suggestions

ShortUnique identifier, used for auditing and logging suggestions
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
28. CDSHooksResponse.cards.suggestions.isRecommended
Definition

When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card

Comments

CDS Hooks clients may choose to influence their UI based on this value, such as pre-selecting, or highlighting recommended suggestions. Multiple suggestions MAY be recommended, if card.selectionBehavior is any.

Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
30. CDSHooksResponse.cards.suggestions.actions
Definition

Defines a suggested action. Within a suggestion, all actions are logically AND'd together, such that a user selecting a suggestion selects all of the actions within it

ShortDefines a suggested action (all apply)
Comments

When a suggestion contains multiple actions, the actions SHOULD be processed as per FHIR's rules for processing transactions with the CDS Client's fhirServer as the base url for the inferred full URL of the transaction bundle entries. (Specifically, deletes happen first, then creates, then updates).

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-2: A resourceId not a resource must be provided when type = delete ((type = 'delete') implies (resourceId.exists() and resource.empty()))
32. CDSHooksResponse.cards.suggestions.actions.type
Definition

The type of action being performed. Allowed values are: create, update, delete.

Shortcreate, update, delete - type of action performed
Control1..1
BindingThe codes SHALL be taken from CDSActionType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSActionType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. CDSHooksResponse.cards.suggestions.actions.description
Definition

Human-readable description of the suggested action that MAY be presented to the end-user.

ShortHuman-readable description of the suggested action (MAY be presented to the end-user)
Control0..1
This element is affected by the following invariants: cds-resp-5
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
36. CDSHooksResponse.cards.suggestions.actions.resource
Definition

When the type attribute is create, the resource attribute SHALL contain a new FHIR resource to be created. For update, this holds the updated resource in its entirety and not just the changed fields.

ShortFHIR resource to create/update
Comments

Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.

Control0..1
TypeResource
38. CDSHooksResponse.cards.suggestions.actions.resourceId
Definition

A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.

ShortA relative reference to the relevant resource.
Control0..*
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
40. CDSHooksResponse.cards.selectionBehavior
Definition

Describes the intended selection behavior of the suggestions in the card. Allowed values are: at-most-one, indicating that the user may choose none or at most one of the suggestions; any, indicating that the end user may choose any number of suggestions including none of them and all of them

Shortat-most-one, any - intended selection behavior of the suggestions in the card
Comments

CDS Clients that do not understand the value MUST treat the card as an error.

Control0..1
BindingThe codes SHALL be taken from CDSSelectionBehavior Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
42. CDSHooksResponse.cards.overrideReasons
Definition

Override reasons can be selected by the end user when overriding a card without taking the suggested recommendations. The CDS service MAY return a list of override reasons to the CDS client.

ShortCan be selected by the end user when overriding a card without taking the suggested recommendations.
Comments

The CDS Client SHOULD present these reasons to the clinician when they dismiss a card. A CDS Client MAY augment the override reasons presented to the user with its own reasons

Control0..*
TypeCoding
Invariantscds-resp-4: the CDS Service MUST populate a display value for each reason's Coding (all(display.exists()))
44. CDSHooksResponse.cards.links
Definition

Allows a service to suggest a link to an app that the user might want to run for additional information or to help guide a decision.

ShortLink to an app that the user might want to run for additional information or to help guide a decision
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-3: AppContext only for smart Apps ((type != 'smart') implies (appContext.empty()))
46. CDSHooksResponse.cards.links.label
Definition

Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).

ShortHuman-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
48. CDSHooksResponse.cards.links.url
Definition

URL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.

ShortURL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
50. CDSHooksResponse.cards.links.type
Definition

The type of the given URL. 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

Shortabsolute, smart - how to use the link
Control0..1
BindingThe codes SHALL be taken from CDSLinkType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSLinkType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. CDSHooksResponse.cards.links.appContext
Definition

An optional field that allows the CDS Service to share information from the CDS card with a subsequently launched SMART app. The appContext field should only be valued if the link type is smart and is not valid for absolute links. The appContext field and value will be sent to the SMART app as part of the OAuth 2.0 access token response, alongside the other SMART launch parameters when the SMART app is launched. Note that appContext could be escaped JSON, base64 encoded XML, or even a simple string, so long as the SMART app can recognize it.

ShortAllows the CDS Service to share information from the CDS card with a subsequently launched SMART app
Comments

CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
54. CDSHooksResponse.systemActions
Definition

An array of Actions that the CDS Service proposes to auto-apply

ShortAn array of Actions that the CDS Service proposes to auto-apply
Comments

Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.

Control0..*
TypeSee ttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse.cards.suggestions.actions
JSON FormatThe JSON Array for this property is not present when there are no items in the instance (e.g. never as an empty array)

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksResponse
Definition

The response to the discovery endpoint


Base definition for all types defined in FHIR type system.

ShortThe response to the discovery endpointBase for all types and resources
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. CDSHooksResponse.cards
Definition

An array of Cards. Cards can provide a combination of information (for reading), suggested actions (to be applied if a user selects them), and links (to launch an app if the user selects them).

ShortAn array of Cards that provide information, suggested actions, and links
Comments

The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
JSON FormatThe JSON Array for this property is present even when there are no items in the instance (e.g. as an empty array)
Invariantscds-resp-1: only one action can be suggested if selectionBehavior = at-most-one ((selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1)
4. CDSHooksResponse.cards.uuid
Definition

Unique identifier of the card. MAY be used for auditing and logging cards and SHALL be included in any subsequent calls to the CDS service's feedback endpoint.

ShortUnique identifier of the card (for logging/feedback)
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
6. CDSHooksResponse.cards.summary
Definition

One-sentence, <140-character summary message for display to the user inside of this card.

ShortSummary message for display to the user (<140 char)
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. CDSHooksResponse.cards.detail
Definition

Optional detailed information to display; if provided MUST be represented in (GitHub Flavored) Markdown. (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like 'view more details...').

ShortOptional detailed information to display (GitHub Flavored Markdown)
Control0..1
Typemarkdown
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. CDSHooksResponse.cards.indicator
Definition

Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.

Shortinfo, warning, critical - Urgency/importance of what this card conveys
Comments

The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.

Control0..1
BindingThe codes SHALL be taken from CDSIndicator Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSIndicator)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. CDSHooksResponse.cards.source
Definition

The source should be the primary source of guidance for the decision support the card represents.

ShortThe primary source of guidance for the content the card represents.
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
14. CDSHooksResponse.cards.source.label
Definition

A short, human-readable label to display for the source of the information displayed on this card. If a url is also specified, this MAY be the text for the hyperlink.

ShortShort, human-readable label to display for the source.
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
16. CDSHooksResponse.cards.source.url
Definition

An optional absolute URL to load (via GET, in a browser context) when a user clicks on this link to learn more about the organization or data set that provided the information on this card.

ShortLink for when user clicks for more information about the source
Comments

Note that this URL should not be used to supply a context-specific 'drill-down' view of the information on this card. For that, use card.link.url instead.

Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
18. CDSHooksResponse.cards.source.icon
Definition

An absolute URL to an icon for the source of this card. The icon returned by this URL SHOULD be a 100x100 pixel PNG image without any transparent regions. The CDS Client may ignore or scale the image during display as appropriate for user experience.

Shortabsolute URL to an icon for the source (<100x100 PNG))
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. CDSHooksResponse.cards.source.topic
Definition

A topic describes the content of the card by providing a high-level categorization that can be useful for filtering, searching or ordered display of related cards in the CDS client's UI. This specification does not prescribe a standard set of topics

ShortDescribes the content of the card - can be useful for filtering, searching or ordered display
Comments

This specification does not prescribe a standard set of topics

Control0..1
TypeCoding
22. CDSHooksResponse.cards.suggestions
Definition

Allows a service to suggest a set of changes in the context of the current activity (e.g. changing the dose of a medication currently being prescribed, for the order-sign activity).

ShortSuggest a set of changes in the context of the current activity
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-5: All suggestion actions must have a description (actions.all(description.exists()))
24. CDSHooksResponse.cards.suggestions.label
Definition

Human-readable label to display for this suggestion

ShortHuman-readable label to display for this suggestion
Comments

e.g. the CDS Client might render this as the text on a button tied to this suggestion

Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. CDSHooksResponse.cards.suggestions.uuid
Definition

Unique identifier, used for auditing and logging suggestions

ShortUnique identifier, used for auditing and logging suggestions
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
28. CDSHooksResponse.cards.suggestions.isRecommended
Definition

When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card

Comments

CDS Hooks clients may choose to influence their UI based on this value, such as pre-selecting, or highlighting recommended suggestions. Multiple suggestions MAY be recommended, if card.selectionBehavior is any.

Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
30. CDSHooksResponse.cards.suggestions.actions
Definition

Defines a suggested action. Within a suggestion, all actions are logically AND'd together, such that a user selecting a suggestion selects all of the actions within it

ShortDefines a suggested action (all apply)
Comments

When a suggestion contains multiple actions, the actions SHOULD be processed as per FHIR's rules for processing transactions with the CDS Client's fhirServer as the base url for the inferred full URL of the transaction bundle entries. (Specifically, deletes happen first, then creates, then updates).

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-2: A resourceId not a resource must be provided when type = delete ((type = 'delete') implies (resourceId.exists() and resource.empty()))
32. CDSHooksResponse.cards.suggestions.actions.type
Definition

The type of action being performed. Allowed values are: create, update, delete.

Shortcreate, update, delete - type of action performed
Control1..1
BindingThe codes SHALL be taken from CDSActionType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSActionType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. CDSHooksResponse.cards.suggestions.actions.description
Definition

Human-readable description of the suggested action that MAY be presented to the end-user.

ShortHuman-readable description of the suggested action (MAY be presented to the end-user)
Control0..1
This element is affected by the following invariants: cds-resp-5
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
36. CDSHooksResponse.cards.suggestions.actions.resource
Definition

When the type attribute is create, the resource attribute SHALL contain a new FHIR resource to be created. For update, this holds the updated resource in its entirety and not just the changed fields.

ShortFHIR resource to create/update
Comments

Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.

Control0..1
TypeResource
38. CDSHooksResponse.cards.suggestions.actions.resourceId
Definition

A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.

ShortA relative reference to the relevant resource.
Control0..*
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
40. CDSHooksResponse.cards.selectionBehavior
Definition

Describes the intended selection behavior of the suggestions in the card. Allowed values are: at-most-one, indicating that the user may choose none or at most one of the suggestions; any, indicating that the end user may choose any number of suggestions including none of them and all of them

Shortat-most-one, any - intended selection behavior of the suggestions in the card
Comments

CDS Clients that do not understand the value MUST treat the card as an error.

Control0..1
BindingThe codes SHALL be taken from CDSSelectionBehavior Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
42. CDSHooksResponse.cards.overrideReasons
Definition

Override reasons can be selected by the end user when overriding a card without taking the suggested recommendations. The CDS service MAY return a list of override reasons to the CDS client.

ShortCan be selected by the end user when overriding a card without taking the suggested recommendations.
Comments

The CDS Client SHOULD present these reasons to the clinician when they dismiss a card. A CDS Client MAY augment the override reasons presented to the user with its own reasons

Control0..*
TypeCoding
Invariantscds-resp-4: the CDS Service MUST populate a display value for each reason's Coding (all(display.exists()))
44. CDSHooksResponse.cards.links
Definition

Allows a service to suggest a link to an app that the user might want to run for additional information or to help guide a decision.

ShortLink to an app that the user might want to run for additional information or to help guide a decision
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-3: AppContext only for smart Apps ((type != 'smart') implies (appContext.empty()))
46. CDSHooksResponse.cards.links.label
Definition

Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).

ShortHuman-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
48. CDSHooksResponse.cards.links.url
Definition

URL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.

ShortURL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
50. CDSHooksResponse.cards.links.type
Definition

The type of the given URL. 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

Shortabsolute, smart - how to use the link
Control0..1
BindingThe codes SHALL be taken from CDSLinkType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSLinkType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. CDSHooksResponse.cards.links.appContext
Definition

An optional field that allows the CDS Service to share information from the CDS card with a subsequently launched SMART app. The appContext field should only be valued if the link type is smart and is not valid for absolute links. The appContext field and value will be sent to the SMART app as part of the OAuth 2.0 access token response, alongside the other SMART launch parameters when the SMART app is launched. Note that appContext could be escaped JSON, base64 encoded XML, or even a simple string, so long as the SMART app can recognize it.

ShortAllows the CDS Service to share information from the CDS card with a subsequently launched SMART app
Comments

CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
54. CDSHooksResponse.systemActions
Definition

An array of Actions that the CDS Service proposes to auto-apply

ShortAn array of Actions that the CDS Service proposes to auto-apply
Comments

Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.

Control0..*
TypeSee ttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse.cards.suggestions.actions
JSON FormatThe JSON Array for this property is not present when there are no items in the instance (e.g. never as an empty array)

Guidance on how to interpret the contents of this table can be found here

0. CDSHooksResponse
Definition

The response to the discovery endpoint

ShortThe response to the discovery endpoint
Control0..*
Is Modifierfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. CDSHooksResponse.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
4. CDSHooksResponse.cards
Definition

An array of Cards. Cards can provide a combination of information (for reading), suggested actions (to be applied if a user selects them), and links (to launch an app if the user selects them).

ShortAn array of Cards that provide information, suggested actions, and links
Comments

The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
JSON FormatThe JSON Array for this property is present even when there are no items in the instance (e.g. as an empty array)
Invariantscds-resp-1: only one action can be suggested if selectionBehavior = at-most-one ((selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1)
6. CDSHooksResponse.cards.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
8. CDSHooksResponse.cards.uuid
Definition

Unique identifier of the card. MAY be used for auditing and logging cards and SHALL be included in any subsequent calls to the CDS service's feedback endpoint.

ShortUnique identifier of the card (for logging/feedback)
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
10. CDSHooksResponse.cards.summary
Definition

One-sentence, <140-character summary message for display to the user inside of this card.

ShortSummary message for display to the user (<140 char)
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. CDSHooksResponse.cards.detail
Definition

Optional detailed information to display; if provided MUST be represented in (GitHub Flavored) Markdown. (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like 'view more details...').

ShortOptional detailed information to display (GitHub Flavored Markdown)
Control0..1
Typemarkdown
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
14. CDSHooksResponse.cards.indicator
Definition

Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.

Shortinfo, warning, critical - Urgency/importance of what this card conveys
Comments

The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.

Control0..1
BindingThe codes SHALL be taken from CDSIndicator Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSIndicator)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
16. CDSHooksResponse.cards.source
Definition

The source should be the primary source of guidance for the decision support the card represents.

ShortThe primary source of guidance for the content the card represents.
Control1..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
18. CDSHooksResponse.cards.source.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
20. CDSHooksResponse.cards.source.label
Definition

A short, human-readable label to display for the source of the information displayed on this card. If a url is also specified, this MAY be the text for the hyperlink.

ShortShort, human-readable label to display for the source.
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. CDSHooksResponse.cards.source.url
Definition

An optional absolute URL to load (via GET, in a browser context) when a user clicks on this link to learn more about the organization or data set that provided the information on this card.

ShortLink for when user clicks for more information about the source
Comments

Note that this URL should not be used to supply a context-specific 'drill-down' view of the information on this card. For that, use card.link.url instead.

Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
24. CDSHooksResponse.cards.source.icon
Definition

An absolute URL to an icon for the source of this card. The icon returned by this URL SHOULD be a 100x100 pixel PNG image without any transparent regions. The CDS Client may ignore or scale the image during display as appropriate for user experience.

Shortabsolute URL to an icon for the source (<100x100 PNG))
Control0..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. CDSHooksResponse.cards.source.topic
Definition

A topic describes the content of the card by providing a high-level categorization that can be useful for filtering, searching or ordered display of related cards in the CDS client's UI. This specification does not prescribe a standard set of topics

ShortDescribes the content of the card - can be useful for filtering, searching or ordered display
Comments

This specification does not prescribe a standard set of topics

Control0..1
TypeCoding
28. CDSHooksResponse.cards.suggestions
Definition

Allows a service to suggest a set of changes in the context of the current activity (e.g. changing the dose of a medication currently being prescribed, for the order-sign activity).

ShortSuggest a set of changes in the context of the current activity
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-5: All suggestion actions must have a description (actions.all(description.exists()))
30. CDSHooksResponse.cards.suggestions.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
32. CDSHooksResponse.cards.suggestions.label
Definition

Human-readable label to display for this suggestion

ShortHuman-readable label to display for this suggestion
Comments

e.g. the CDS Client might render this as the text on a button tied to this suggestion

Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. CDSHooksResponse.cards.suggestions.uuid
Definition

Unique identifier, used for auditing and logging suggestions

ShortUnique identifier, used for auditing and logging suggestions
Control0..1
Typeuuid
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
String FormatWhen this element is read urn:uuid:is prefixed to the value before validation
36. CDSHooksResponse.cards.suggestions.isRecommended
Definition

When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card

Comments

CDS Hooks clients may choose to influence their UI based on this value, such as pre-selecting, or highlighting recommended suggestions. Multiple suggestions MAY be recommended, if card.selectionBehavior is any.

Control0..1
Typeboolean
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
38. CDSHooksResponse.cards.suggestions.actions
Definition

Defines a suggested action. Within a suggestion, all actions are logically AND'd together, such that a user selecting a suggestion selects all of the actions within it

ShortDefines a suggested action (all apply)
Comments

When a suggestion contains multiple actions, the actions SHOULD be processed as per FHIR's rules for processing transactions with the CDS Client's fhirServer as the base url for the inferred full URL of the transaction bundle entries. (Specifically, deletes happen first, then creates, then updates).

Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-2: A resourceId not a resource must be provided when type = delete ((type = 'delete') implies (resourceId.exists() and resource.empty()))
40. CDSHooksResponse.cards.suggestions.actions.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
42. CDSHooksResponse.cards.suggestions.actions.type
Definition

The type of action being performed. Allowed values are: create, update, delete.

Shortcreate, update, delete - type of action performed
Control1..1
BindingThe codes SHALL be taken from CDSActionType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSActionType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
44. CDSHooksResponse.cards.suggestions.actions.description
Definition

Human-readable description of the suggested action that MAY be presented to the end-user.

ShortHuman-readable description of the suggested action (MAY be presented to the end-user)
Control0..1
This element is affected by the following invariants: cds-resp-5
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
46. CDSHooksResponse.cards.suggestions.actions.resource
Definition

When the type attribute is create, the resource attribute SHALL contain a new FHIR resource to be created. For update, this holds the updated resource in its entirety and not just the changed fields.

ShortFHIR resource to create/update
Comments

Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.

Control0..1
TypeResource
48. CDSHooksResponse.cards.suggestions.actions.resourceId
Definition

A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.

ShortA relative reference to the relevant resource.
Control0..*
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
50. CDSHooksResponse.cards.selectionBehavior
Definition

Describes the intended selection behavior of the suggestions in the card. Allowed values are: at-most-one, indicating that the user may choose none or at most one of the suggestions; any, indicating that the end user may choose any number of suggestions including none of them and all of them

Shortat-most-one, any - intended selection behavior of the suggestions in the card
Comments

CDS Clients that do not understand the value MUST treat the card as an error.

Control0..1
BindingThe codes SHALL be taken from CDSSelectionBehavior Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. CDSHooksResponse.cards.overrideReasons
Definition

Override reasons can be selected by the end user when overriding a card without taking the suggested recommendations. The CDS service MAY return a list of override reasons to the CDS client.

ShortCan be selected by the end user when overriding a card without taking the suggested recommendations.
Comments

The CDS Client SHOULD present these reasons to the clinician when they dismiss a card. A CDS Client MAY augment the override reasons presented to the user with its own reasons

Control0..*
TypeCoding
Invariantscds-resp-4: the CDS Service MUST populate a display value for each reason's Coding (all(display.exists()))
54. CDSHooksResponse.cards.links
Definition

Allows a service to suggest a link to an app that the user might want to run for additional information or to help guide a decision.

ShortLink to an app that the user might want to run for additional information or to help guide a decision
Control0..*
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Invariantscds-resp-3: AppContext only for smart Apps ((type != 'smart') implies (appContext.empty()))
56. CDSHooksResponse.cards.links.extension
Definition

A JSON object that has properties where the names are defined by the extension definitions

ShortObject that has Named Extension Properties
Comments

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

Control0..1
Typehttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
Extension StyleThis element can be extended by named JSON elements
58. CDSHooksResponse.cards.links.label
Definition

Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).

ShortHuman-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
60. CDSHooksResponse.cards.links.url
Definition

URL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.

ShortURL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash.
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
62. CDSHooksResponse.cards.links.type
Definition

The type of the given URL. 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

Shortabsolute, smart - how to use the link
Control0..1
BindingThe codes SHALL be taken from CDSLinkType Codes ValueSet
(required to http://hl7.org/fhir/tools/ValueSet/CDSLinkType)
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
64. CDSHooksResponse.cards.links.appContext
Definition

An optional field that allows the CDS Service to share information from the CDS card with a subsequently launched SMART app. The appContext field should only be valued if the link type is smart and is not valid for absolute links. The appContext field and value will be sent to the SMART app as part of the OAuth 2.0 access token response, alongside the other SMART launch parameters when the SMART app is launched. Note that appContext could be escaped JSON, base64 encoded XML, or even a simple string, so long as the SMART app can recognize it.

ShortAllows the CDS Service to share information from the CDS card with a subsequently launched SMART app
Comments

CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
66. CDSHooksResponse.systemActions
Definition

An array of Actions that the CDS Service proposes to auto-apply

ShortAn array of Actions that the CDS Service proposes to auto-apply
Comments

Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.

Control0..*
TypeSee ttp://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse.cards.suggestions.actions
JSON FormatThe JSON Array for this property is not present when there are no items in the instance (e.g. never as an empty array)