CRDHooksResponse
type: StructureDefinition
node role: treeRoot
id:
  v: CRDHooksResponse
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition CRDHooksResponse Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> CDSHooksResponse 0..* CRDHooksResponseBase The response to the discovery endpoint #xD; Slices for cards 0..* CDSHooksElement CDS responses to show user Slice: Unordered, Open by profile:$this #xD; cards:externalReference 0..* CRDHooksResponseExternalReference CDS responses to show user #xD; cards:instructions 0..* CRDHooksResponseInstructions CDS responses to show user #xD; cards:alternateRequest 0..* CRDHooksResponseAlternateRequest CDS responses to show user #xD; cards:additionalOrders 0..* CRDHooksResponseAdditionalOrders CDS responses to show user #xD; cards:formCompletion 0..* CRDHooksResponseFormCompletion CDS responses to show user #xD; cards:adjustCoverage 0..* CRDHooksResponseAdjustCoverage CDS responses to show user #xD; cards:launchSMART 0..* CRDHooksResponseLaunchSMART CDS responses to show user #xD; Slices for systemActions 0..* CDSHooksElement Actions to auto-apply Slice: Unordered, Open by profile:$this #xD; systemActions:coverageInformation 0..* CRDHooksResponseCoverageInformation Actions to auto-apply #xD; systemActions:formCompletion 0..* CRDHooksResponseFormCompletion Actions to auto-apply #xD; systemActions:adjustCoverage 0..* CRDHooksResponseAdjustCoverage Actions to auto-apply #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-suppress-resourcetype
    l: json-suppress-resourcetype
  value: Boolean
    v: true
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: fm
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
    l: structuredefinition-fmm
  value: Integer
    v: 4
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Canonical
        v: http://hl7.org/fhir/us/davinci-crd/ImplementationGuide/davinci-crd
        l: davinci-crd
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: trial-use
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Canonical
        v: http://hl7.org/fhir/us/davinci-crd/ImplementationGuide/davinci-crd
        l: davinci-crd
url:
  v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse
  l: CRDHooksResponse
identifier:
  system:
    v: urn:ietf:rfc:3986
    l: 3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.18.42.35
version:
  v: 2.2.0-ballot
name:
  v: CRDHooksResponse
title:
  v: CRD CDSHooks Response (Logical Definition)
status:
  v: active
date:
  v: 2025-10-30T03:51:27+00:00
publisher:
  v: HL7 International / Financial Management
contact:
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fm
description:
  v: Defines CRD-specific constraints on the CDS Hooks Response body
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: US
fhir version:
  v: 4.0.1
kind:
  v: logical
abstract:
  v: false
type:
  v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
  l: CDSHooksResponse
base definition:
  v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponseBase
  l: CRDHooksResponseBase
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 2.2.0-ballot
  element:
    id:
      v: CDSHooksResponse
    path:
      v: CDSHooksResponse
    short:
      v: The response to the discovery endpoint
    definition:
      v: The response to the discovery endpoint
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Base
      min:
        v: 0
      max:
        v: *
    is modifier:
      v: false
  element:
    id:
      v: CDSHooksResponse.extension
    path:
      v: CDSHooksResponse.extension
    short:
      v: Object that has Named Extension Properties
    definition:
      v: A JSON object that has properties where the names are defined by the extension definitions
    comment:
      v: 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
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: CDSHooksElement.extension
      min:
        v: 0
      max:
        v: 1
    type:
      code:
        v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
        l: CDSHooksExtensions
  element:
    id:
      v: CDSHooksResponse.cards
    extension:
      url:
        v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
        l: json-empty-behavior
      value: Code
        v: present
    path:
      v: CDSHooksResponse.cards
    slicing:
      rules:
        v: open
    short:
      v: CDS responses to show user
    definition:
      v: 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).
    comment:
      v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: CDSHooksResponse.cards
      min:
        v: 0
      max:
        v: *
    type:
      code:
        v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
        l: CDSHooksElement
    constraint:
      key:
        v: cds-resp-1
      severity:
        v: error
      human:
        v: only one action can be suggested if selectionBehavior = at-most-one
      expression:
        v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
      source:
        v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
        l: CDSHooksResponse
    constraint:
      key:
        v: cds-resp-6

v: profile

v: $this

v: error

v: If suggestions are present, selectionBehavior MUST also be provided.

v: suggestions.exists() implies selectionBehavior.exists()

id:
  v: CDSHooksResponse.cards.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: externalReference
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-externalReference
    l: CRDHooksResponse-externalReference
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:externalReference.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:externalReference.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:externalReference.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:externalReference.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:externalReference.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:externalReference.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:externalReference.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:externalReference.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:externalReference.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:externalReference.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:externalReference.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:externalReference.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:externalReference.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:externalReference.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:externalReference.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:externalReference.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: instructions
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-instructions
    l: CRDHooksResponse-instructions
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:instructions.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:instructions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:instructions.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:instructions.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:instructions.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:instructions.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:instructions.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:instructions.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:instructions.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:instructions.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:instructions.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:instructions.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:instructions.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:instructions.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:instructions.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:instructions.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:instructions.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:instructions.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:instructions.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: alternateRequest
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-alternateRequest
    l: CRDHooksResponse-alternateRequest
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:alternateRequest.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:alternateRequest.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:alternateRequest.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:alternateRequest.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:alternateRequest.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:alternateRequest.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:alternateRequest.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:alternateRequest.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:alternateRequest.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:alternateRequest.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:alternateRequest.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:alternateRequest.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:alternateRequest.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:alternateRequest.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:alternateRequest.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: additionalOrders
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-additionalOrders
    l: CRDHooksResponse-additionalOrders
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:additionalOrders.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:additionalOrders.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:additionalOrders.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:additionalOrders.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:additionalOrders.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:additionalOrders.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:additionalOrders.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:additionalOrders.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:additionalOrders.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:additionalOrders.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:additionalOrders.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:additionalOrders.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:additionalOrders.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:additionalOrders.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:additionalOrders.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: formCompletion
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-formCompletion
    l: CRDHooksResponse-formCompletion
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:formCompletion.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:formCompletion.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:formCompletion.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:formCompletion.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:formCompletion.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:formCompletion.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:formCompletion.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:formCompletion.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:formCompletion.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:formCompletion.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:formCompletion.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:formCompletion.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:formCompletion.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:formCompletion.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:formCompletion.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: adjustCoverage
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-adjustCoverage
    l: CRDHooksResponse-adjustCoverage
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:adjustCoverage.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:adjustCoverage.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:adjustCoverage.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:adjustCoverage.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:adjustCoverage.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:adjustCoverage.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:adjustCoverage.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:adjustCoverage.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:adjustCoverage.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:adjustCoverage.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:adjustCoverage.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:adjustCoverage.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:adjustCoverage.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:adjustCoverage.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:adjustCoverage.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: present
path:
  v: CDSHooksResponse.cards
slice name:
  v: launchSMART
short:
  v: CDS responses to show user
definition:
  v: 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).
comment:
  v: The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-launchSMART
    l: CRDHooksResponse-launchSMART
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards
constraint:
  key:
    v: cds-resp-1
  severity:
    v: error
  human:
    v: only one action can be suggested if selectionBehavior = at-most-one
  expression:
    v: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse
constraint:
  key:
    v: cds-resp-6
  severity:
    v: error
  human:
    v: If suggestions are present, selectionBehavior MUST also be provided.
  expression:
    v: suggestions.exists() implies selectionBehavior.exists()
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:launchSMART.extension
path:
  v: CDSHooksResponse.cards.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:launchSMART.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.uuid
short:
  v: Unique identifier of the card (for logging/feedback)
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.summary
path:
  v: CDSHooksResponse.cards.summary
short:
  v: Summary message for display to the user (<140 char)
definition:
  v: One-sentence, <140-character summary message for display to the user inside of this card.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.summary
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.detail
path:
  v: CDSHooksResponse.cards.detail
short:
  v: Optional detailed information to display (GitHub Flavored Markdown)
definition:
  v: 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...').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.detail
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown

id:
  v: CDSHooksResponse.cards:launchSMART.indicator
path:
  v: CDSHooksResponse.cards.indicator
short:
  v: info, warning, critical - Urgency/importance of what this card conveys
definition:
  v: Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.
comment:
  v: The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.indicator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSIndicator
    l: CDSIndicator

id:
  v: CDSHooksResponse.cards:launchSMART.source
path:
  v: CDSHooksResponse.cards.source
short:
  v: The primary source of guidance for the content the card represents.
definition:
  v: The source should be the primary source of guidance for the decision support the card represents.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.source.extension
path:
  v: CDSHooksResponse.cards.source.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:launchSMART.source.label
path:
  v: CDSHooksResponse.cards.source.label
short:
  v: Short, human-readable label to display for the source.
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.source.url
path:
  v: CDSHooksResponse.cards.source.url
short:
  v: Link for when user clicks for more information about the source
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:launchSMART.source.icon
path:
  v: CDSHooksResponse.cards.source.icon
short:
  v: absolute URL to an icon for the source (<100x100 PNG))
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.icon
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:launchSMART.source.topic
path:
  v: CDSHooksResponse.cards.source.topic
short:
  v: Describes the content of the card
definition:
  v: 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
comment:
  v: This specification does not prescribe a standard set of topics
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.source.topic
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
    l: Coding
must support:
  v: true
binding:
  strength:
    v: extensible
  value set:
    v: http://hl7.org/fhir/us/davinci-crd/ValueSet/cardType
    l: cardType

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions
path:
  v: CDSHooksResponse.cards.suggestions
short:
  v: Suggest a set of changes in the context of the current activity
definition:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
constraint:
  key:
    v: cds-resp-5
  severity:
    v: error
  human:
    v: All suggestion actions must have a description
  expression:
    v: actions.all(description.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.extension
path:
  v: CDSHooksResponse.cards.suggestions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.label
path:
  v: CDSHooksResponse.cards.suggestions.label
short:
  v: Human-readable label to display for this suggestion
definition:
  v: Human-readable label to display for this suggestion
comment:
  v: e.g. the CDS Client might render this as the text on a button tied to this suggestion
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.uuid
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix
    l: implied-string-prefix
  value: String
    v: urn:uuid:
path:
  v: CDSHooksResponse.cards.suggestions.uuid
short:
  v: Unique identifier, used for auditing and logging suggestions
definition:
  v: Unique identifier, used for auditing and logging suggestions
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.uuid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uuid
    l: uuid

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.isRecommended
path:
  v: CDSHooksResponse.cards.suggestions.isRecommended
short:
  v: Which suggestion is most preferred of a set
definition:
  v: When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.isRecommended
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions
path:
  v: CDSHooksResponse.cards.suggestions.actions
short:
  v: Defines a suggested action (all apply)
definition:
  v: 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
comment:
  v: 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).
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-2
  severity:
    v: warning
  human:
    v: A resourceId not a resource must be provided when type = delete
  expression:
    v: (type = 'delete') implies (resourceId.exists() and resource.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions.extension
path:
  v: CDSHooksResponse.cards.suggestions.actions.extension
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions.type
path:
  v: CDSHooksResponse.cards.suggestions.actions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions.description
path:
  v: CDSHooksResponse.cards.suggestions.actions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions.resource
path:
  v: CDSHooksResponse.cards.suggestions.actions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.cards:launchSMART.suggestions.actions.resourceId
path:
  v: CDSHooksResponse.cards.suggestions.actions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.cards:launchSMART.selectionBehavior
path:
  v: CDSHooksResponse.cards.selectionBehavior
short:
  v: at-most-one | any
definition:
  v: 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
comment:
  v: CDS Clients that do not understand the value MUST treat the card as an error.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.selectionBehavior
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: cds-resp-1
condition:
  v: cds-resp-6
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior
    l: CDSSelectionBehavior

id:
  v: CDSHooksResponse.cards:launchSMART.overrideReasons
path:
  v: CDSHooksResponse.cards.overrideReasons
short:
  v: Feedback from user on card - why not acted on
definition:
  v: 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.
comment:
  v: 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
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.overrideReasons
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: cds-resp-4
  severity:
    v: error
  human:
    v: the CDS Service MUST populate a display value for each reason's Coding
  expression:
    v: all(display.exists())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:launchSMART.links
path:
  v: CDSHooksResponse.cards.links
short:
  v: Link to app or additional information
definition:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.cards.links
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
constraint:
  key:
    v: cds-resp-3
  severity:
    v: error
  human:
    v: AppContext only for smart Apps
  expression:
    v: (type != 'smart') implies (appContext.empty())
  source:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
    l: CDSHooksResponse

id:
  v: CDSHooksResponse.cards:launchSMART.links.extension
path:
  v: CDSHooksResponse.cards.links.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.cards:launchSMART.links.label
path:
  v: CDSHooksResponse.cards.links.label
short:
  v: Human-readable label to display for this link
definition:
  v: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.label
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.links.url
path:
  v: CDSHooksResponse.cards.links.url
short:
  v: URL to load
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.url
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url
    l: url
must support:
  v: true

id:
  v: CDSHooksResponse.cards:launchSMART.links.type
path:
  v: CDSHooksResponse.cards.links.type
short:
  v: absolute | smart
definition:
  v: 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
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSLinkType
    l: CDSLinkType

id:
  v: CDSHooksResponse.cards:launchSMART.links.appContext
path:
  v: CDSHooksResponse.cards.links.appContext
short:
  v: Information to share when launching SMART app
definition:
  v: 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.
comment:
  v: CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.links.appContext
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
must support:
  v: true

id:
  v: CDSHooksResponse.systemActions
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: absent
path:
  v: CDSHooksResponse.systemActions
slicing:
  discriminator:
    type:
      v: profile
    path:
      v: $this
  rules:
    v: open
short:
  v: Actions to auto-apply
definition:
  v: An array of Actions that the CDS Service proposes to auto-apply
comment:
  v: Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.systemActions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement

id:
  v: CDSHooksResponse.systemActions.extension
path:
  v: CDSHooksResponse.systemActions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.systemActions.type
path:
  v: CDSHooksResponse.systemActions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.systemActions.description
path:
  v: CDSHooksResponse.systemActions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5

id:
  v: CDSHooksResponse.systemActions.resource
path:
  v: CDSHooksResponse.systemActions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.systemActions.resourceId
path:
  v: CDSHooksResponse.systemActions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.systemActions:coverageInformation
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: absent
path:
  v: CDSHooksResponse.systemActions
slice name:
  v: coverageInformation
short:
  v: Actions to auto-apply
definition:
  v: An array of Actions that the CDS Service proposes to auto-apply
comment:
  v: Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.systemActions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-coverageInformation
    l: CRDHooksResponse-coverageInformation
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.systemActions

id:
  v: CDSHooksResponse.systemActions:coverageInformation.extension
path:
  v: CDSHooksResponse.systemActions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.systemActions:coverageInformation.type
path:
  v: CDSHooksResponse.systemActions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.systemActions:coverageInformation.description
path:
  v: CDSHooksResponse.systemActions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5

id:
  v: CDSHooksResponse.systemActions:coverageInformation.resource
path:
  v: CDSHooksResponse.systemActions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.systemActions:coverageInformation.resourceId
path:
  v: CDSHooksResponse.systemActions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.systemActions:formCompletion
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: absent
path:
  v: CDSHooksResponse.systemActions
slice name:
  v: formCompletion
short:
  v: Actions to auto-apply
definition:
  v: An array of Actions that the CDS Service proposes to auto-apply
comment:
  v: Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.systemActions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-formCompletion
    l: CRDHooksResponse-formCompletion
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards.suggestions.actions

id:
  v: CDSHooksResponse.systemActions:formCompletion.extension
path:
  v: CDSHooksResponse.systemActions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.systemActions:formCompletion.type
path:
  v: CDSHooksResponse.systemActions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.systemActions:formCompletion.description
path:
  v: CDSHooksResponse.systemActions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5

id:
  v: CDSHooksResponse.systemActions:formCompletion.resource
path:
  v: CDSHooksResponse.systemActions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.systemActions:formCompletion.resourceId
path:
  v: CDSHooksResponse.systemActions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

id:
  v: CDSHooksResponse.systemActions:adjustCoverage
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior
    l: json-empty-behavior
  value: Code
    v: absent
path:
  v: CDSHooksResponse.systemActions
slice name:
  v: adjustCoverage
short:
  v: Actions to auto-apply
definition:
  v: An array of Actions that the CDS Service proposes to auto-apply
comment:
  v: Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CDSHooksResponse.systemActions
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    l: CDSHooksElement
  profile:
    v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-adjustCoverage
    l: CRDHooksResponse-adjustCoverage
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element
        l: elementdefinition-profile-element
      value: String
        v: CDSHooksResponse.cards.suggestions.actions

id:
  v: CDSHooksResponse.systemActions:adjustCoverage.extension
path:
  v: CDSHooksResponse.systemActions.extension
short:
  v: Object that has Named Extension Properties
definition:
  v: A JSON object that has properties where the names are defined by the extension definitions
comment:
  v: 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
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksElement.extension
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksExtensions
    l: CDSHooksExtensions

id:
  v: CDSHooksResponse.systemActions:adjustCoverage.type
path:
  v: CDSHooksResponse.systemActions.type
short:
  v: create, update, delete - type of action performed
definition:
  v: The type of action being performed. Allowed values are: create, update, delete.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/tools/ValueSet/CDSActionType
    l: CDSActionType

id:
  v: CDSHooksResponse.systemActions:adjustCoverage.description
path:
  v: CDSHooksResponse.systemActions.description
short:
  v: Human-readable description of the suggested action
definition:
  v: Human-readable description of the suggested action that MAY be presented to the end-user.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: cds-resp-5

id:
  v: CDSHooksResponse.systemActions:adjustCoverage.resource
path:
  v: CDSHooksResponse.systemActions.resource
short:
  v: FHIR resource to create/update
definition:
  v: 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.
comment:
  v: Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource
    l: Resource

id:
  v: CDSHooksResponse.systemActions:adjustCoverage.resourceId
path:
  v: CDSHooksResponse.systemActions.resourceId
short:
  v: A relative reference to the relevant resource.
definition:
  v: A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CDSHooksResponse.cards.suggestions.actions.resourceId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
    l: url

element:
  id:
    v: CDSHooksResponse
  path:
    v: CDSHooksResponse
element:
  id:
    v: CDSHooksResponse.cards
  path:
    v: CDSHooksResponse.cards
  slicing:
    discriminator:
      type:
        v: profile
      path:
        v: $this
    rules:
      v: open
element:
  id:
    v: CDSHooksResponse.cards:externalReference
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: externalReference
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-externalReference
      l: CRDHooksResponse-externalReference
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:instructions
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: instructions
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-instructions
      l: CRDHooksResponse-instructions
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:alternateRequest
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: alternateRequest
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-alternateRequest
      l: CRDHooksResponse-alternateRequest
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:additionalOrders
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: additionalOrders
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-additionalOrders
      l: CRDHooksResponse-additionalOrders
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:formCompletion
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: formCompletion
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-formCompletion
      l: CRDHooksResponse-formCompletion
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:adjustCoverage
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: adjustCoverage
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-adjustCoverage
      l: CRDHooksResponse-adjustCoverage
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.cards:launchSMART
  path:
    v: CDSHooksResponse.cards
  slice name:
    v: launchSMART
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-launchSMART
      l: CRDHooksResponse-launchSMART
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.systemActions
  path:
    v: CDSHooksResponse.systemActions
  slicing:
    discriminator:
      type:
        v: profile
      path:
        v: $this
    rules:
      v: open
element:
  id:
    v: CDSHooksResponse.systemActions:coverageInformation
  path:
    v: CDSHooksResponse.systemActions
  slice name:
    v: coverageInformation
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-coverageInformation
      l: CRDHooksResponse-coverageInformation
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.systemActions:formCompletion
  path:
    v: CDSHooksResponse.systemActions
  slice name:
    v: formCompletion
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-formCompletion
      l: CRDHooksResponse-formCompletion
      extension:
        value: String
element:
  id:
    v: CDSHooksResponse.systemActions:adjustCoverage
  path:
    v: CDSHooksResponse.systemActions
  slice name:
    v: adjustCoverage
  type:
    code:
      v: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
      l: CDSHooksElement
    profile:
      v: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-adjustCoverage
      l: CRDHooksResponse-adjustCoverage
      extension:
        value: String

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.cards

String
v: CDSHooksResponse.systemActions

String
v: CDSHooksResponse.cards.suggestions.actions

String
v: CDSHooksResponse.cards.suggestions.actions