PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.uv.tools.r5@0.4.0
    http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
description: 'This structure is defined to allow the FHIR Validator to validate a CDSHooks Response body. TODO: This content will be moved to the CDS Hooks specification in the future'
package_name: hl7.fhir.uv.tools.r5
derivation: specialization
name: CDSHooksResponse
type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
elements:
  cards:
    constraint:
      cds-resp-1: {human: only one action can be suggested if selectionBehavior = at-most-one, severity: error, expression: (selectionBehavior = 'at-most-one') implies suggestions.where(isRecommended).count() <= 1}
      cds-resp-6: {human: 'If suggestions are present, selectionBehavior MUST also be provided.', severity: error, expression: suggestions.exists() implies selectionBehavior.exists()}
    short: An array of Cards that provide information, suggested actions, and links
    type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
    array: true
    index: 0
    elements:
      source:
        type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
        short: The primary source of guidance for the content the card represents.
        index: 5
        elements:
          label: {type: string, short: 'Short, human-readable label to display for the source.', index: 6}
          url: {type: url, short: Link for when user clicks for more information about the source, index: 7}
          icon: {type: url, short: absolute URL to an icon for the source (<100x100 PNG)), index: 8}
          topic: {type: Coding, short: 'Describes the content of the card - can be useful for filtering, searching or ordered display', index: 9}
        required: [label]
      selectionBehavior:
        short: at-most-one, any - intended selection behavior of the suggestions in the card
        type: code
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior'}
        index: 19
      summary: {type: string, short: Summary message for display to the user (<140 char), index: 2}
      overrideReasons:
        constraint:
          cds-resp-4: {human: the CDS Service MUST populate a display value for each reason's Coding, severity: error, expression: all(display.exists())}
        short: Can be selected by the end user when overriding a card without taking the suggested recommendations.
        type: Coding
        array: true
        index: 20
      indicator:
        short: info, warning, critical - Urgency/importance of what this card conveys
        type: code
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/tools/ValueSet/CDSIndicator'}
        index: 4
      suggestions:
        constraint:
          cds-resp-5: {human: All suggestion actions must have a description, severity: error, expression: actions.all(description.exists())}
        short: Suggest a set of changes in the context of the current activity
        type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
        array: true
        index: 10
        elements:
          label: {type: string, short: Human-readable label to display for this suggestion, index: 11}
          uuid: {type: uuid, short: 'Unique identifier, used for auditing and logging suggestions', index: 12}
          isRecommended: {type: boolean, index: 13}
          actions:
            constraint:
              cds-resp-2: {human: A resourceId not a resource must be provided when type = delete, severity: warning, expression: (type = 'delete') implies (resourceId.exists() and resource.empty())}
            short: Defines a suggested action (all apply)
            type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
            array: true
            index: 14
            elements:
              type:
                type: code
                short: create, update, delete - type of action performed
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/tools/ValueSet/CDSActionType'}
                index: 15
              description: {type: string, short: Human-readable description of the suggested action (MAY be presented to the end-user), index: 16}
              resource: {type: Resource, short: FHIR resource to create/update, index: 17}
              resourceId: {type: url, short: A relative reference to the relevant resource., index: 18}
            required: [type]
        required: [label]
      uuid: {type: uuid, short: Unique identifier of the card (for logging/feedback), index: 1}
      links:
        type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
        short: Link to an app that the user might want to run for additional information or to help guide a decision
        constraint:
          cds-resp-3: {human: AppContext only for smart Apps, severity: error, expression: (type != 'smart') implies (appContext.empty())}
        array: true
        index: 21
        elements:
          label: {type: string, short: Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link)., index: 22}
          url: {type: url, short: '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.', index: 23}
          type:
            type: code
            short: absolute, smart - how to use the link
            binding: {strength: required, valueSet: 'http://hl7.org/fhir/tools/ValueSet/CDSLinkType'}
            index: 24
          appContext: {type: string, short: Allows the CDS Service to share information from the CDS card with a subsequently launched SMART app, index: 25}
        required: [url, label]
      detail: {type: markdown, short: Optional detailed information to display (GitHub Flavored Markdown), index: 3}
    required: [summary, source]
  systemActions:
    elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse', elements, org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse, elements, cards, elements, suggestions, elements, actions]
    short: An array of Actions that the CDS Service proposes to auto-apply
    array: true
    index: 26
package_version: 0.4.0
class: logical
kind: logical
url: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
base: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement
version: 0.4.0