PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.uv.tools.r4@0.3.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",
  "_filename": "StructureDefinition-CDSHooksResponse.json",
  "package_name": "hl7.fhir.uv.tools.r4",
  "date": "2024-10-27T07:27:27+11:00",
  "derivation": "specialization",
  "publisher": "HL7 International / FHIR Infrastructure",
  "fhirVersion": "4.0.1",
  "jurisdiction": [ {
    "coding": [ {
      "code": "001",
      "system": "http://unstats.un.org/unsd/methods/m49/m49.htm"
    } ]
  } ],
  "name": "CDSHooksResponse",
  "mapping": [ {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  } ],
  "abstract": false,
  "type": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse",
  "experimental": "true",
  "resourceType": "StructureDefinition",
  "title": "CDSHooks Response (Logical Definition)",
  "package_version": "0.3.0",
  "extension": [ {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
    "valueInteger": 2
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode": "fhir"
  } ],
  "snapshot": {
    "element": [ {
      "path": "CDSHooksResponse",
      "min": 0,
      "definition": "The response to the discovery endpoint",
      "isModifier": false,
      "short": "The response to the discovery endpoint",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "max": "*",
      "id": "CDSHooksResponse",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Base"
      }
    }, {
      "path": "CDSHooksResponse.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "constraint": [ {
        "key": "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"
      } ],
      "path": "CDSHooksResponse.cards",
      "min": 0,
      "definition": "An array of Cards. Cards can provide a combination of information (for reading), suggested actions (to be applied if a user selects them), and links (to launch an app if the user selects them).",
      "short": "An array of Cards that provide information, suggested actions, and links",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior",
        "valueCode": "present"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards",
      "comment": "The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards"
      }
    }, {
      "path": "CDSHooksResponse.cards.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "path": "CDSHooksResponse.cards.uuid",
      "min": 0,
      "definition": "Unique identifier of the card. MAY be used for auditing and logging cards and SHALL be included in any subsequent calls to the CDS service's feedback endpoint.",
      "short": "Unique identifier of the card (for logging/feedback)",
      "type": [ {
        "code": "uuid"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix",
        "valueString": "urn:uuid:"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.uuid",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.uuid"
      }
    }, {
      "id": "CDSHooksResponse.cards.summary",
      "max": "1",
      "min": 1,
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.summary"
      },
      "path": "CDSHooksResponse.cards.summary",
      "type": [ {
        "code": "string"
      } ],
      "short": "Summary message for display to the user (<140 char)",
      "definition": "One-sentence, <140-character summary message for display to the user inside of this card."
    }, {
      "id": "CDSHooksResponse.cards.detail",
      "max": "1",
      "min": 0,
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.detail"
      },
      "path": "CDSHooksResponse.cards.detail",
      "type": [ {
        "code": "markdown"
      } ],
      "short": "Optional detailed information to display (GitHub Flavored Markdown)",
      "definition": "Optional detailed information to display; if provided MUST be represented in (GitHub Flavored) Markdown. (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like 'view more details...')."
    }, {
      "path": "CDSHooksResponse.cards.indicator",
      "min": 0,
      "definition": "Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.",
      "short": "info, warning, critical - Urgency/importance of what this card conveys",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSIndicator"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.indicator",
      "comment": "The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.indicator"
      }
    }, {
      "id": "CDSHooksResponse.cards.source",
      "max": "1",
      "min": 1,
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.source"
      },
      "path": "CDSHooksResponse.cards.source",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "short": "The primary source of guidance for the content the card represents.",
      "definition": "The source should be the primary source of guidance for the decision support the card represents."
    }, {
      "path": "CDSHooksResponse.cards.source.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.source.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "id": "CDSHooksResponse.cards.source.label",
      "max": "1",
      "min": 1,
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.source.label"
      },
      "path": "CDSHooksResponse.cards.source.label",
      "type": [ {
        "code": "string"
      } ],
      "short": "Short, human-readable label to display for the source.",
      "definition": "A short, human-readable label to display for the source of the information displayed on this card. If a url is also specified, this MAY be the text for the hyperlink."
    }, {
      "path": "CDSHooksResponse.cards.source.url",
      "min": 0,
      "definition": "An optional absolute URL to load (via GET, in a browser context) when a user clicks on this link to learn more about the organization or data set that provided the information on this card.",
      "short": "Link for when user clicks for more information about the source",
      "type": [ {
        "code": "url"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.source.url",
      "comment": "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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.source.url"
      }
    }, {
      "id": "CDSHooksResponse.cards.source.icon",
      "max": "1",
      "min": 0,
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.source.icon"
      },
      "path": "CDSHooksResponse.cards.source.icon",
      "type": [ {
        "code": "url"
      } ],
      "short": "absolute URL to an icon for the source (<100x100 PNG))",
      "definition": "An absolute URL to an icon for the source of this card. The icon returned by this URL SHOULD be a 100x100 pixel PNG image without any transparent regions. The CDS Client may ignore or scale the image during display as appropriate for user experience."
    }, {
      "path": "CDSHooksResponse.cards.source.topic",
      "min": 0,
      "definition": "A topic describes the content of the card by providing a high-level categorization that can be useful for filtering, searching or ordered display of related cards in the CDS client's UI. This specification does not prescribe a standard set of topics",
      "short": "Describes the content of the card - can be useful for filtering, searching or ordered display",
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.source.topic",
      "comment": "This specification does not prescribe a standard set of topics",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.source.topic"
      }
    }, {
      "constraint": [ {
        "key": "cds-resp-5",
        "human": "All suggestion actions must have a description",
        "severity": "error",
        "expression": "actions.all(description.exists())"
      } ],
      "path": "CDSHooksResponse.cards.suggestions",
      "min": 0,
      "definition": "Allows a service to suggest a set of changes in the context of the current activity (e.g. changing the dose of a medication currently being prescribed, for the order-sign activity).",
      "short": "Suggest a set of changes in the context of the current activity",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.suggestions",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.label",
      "min": 1,
      "definition": "Human-readable label to display for this suggestion",
      "short": "Human-readable label to display for this suggestion",
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.label",
      "comment": "e.g. the CDS Client might render this as the text on a button tied to this suggestion",
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.suggestions.label"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.uuid",
      "min": 0,
      "definition": "Unique identifier, used for auditing and logging suggestions",
      "short": "Unique identifier, used for auditing and logging suggestions",
      "type": [ {
        "code": "uuid"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix",
        "valueString": "urn:uuid:"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.uuid",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.uuid"
      }
    }, {
      "id": "CDSHooksResponse.cards.suggestions.isRecommended",
      "max": "1",
      "min": 0,
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.isRecommended"
      },
      "path": "CDSHooksResponse.cards.suggestions.isRecommended",
      "type": [ {
        "code": "boolean"
      } ],
      "comment": "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.",
      "definition": "When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card"
    }, {
      "constraint": [ {
        "key": "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())"
      } ],
      "path": "CDSHooksResponse.cards.suggestions.actions",
      "min": 0,
      "definition": "Defines a suggested action. Within a suggestion, all actions are logically AND'd together, such that a user selecting a suggestion selects all of the actions within it",
      "short": "Defines a suggested action (all apply)",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.suggestions.actions",
      "comment": "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).",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.actions"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.actions.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.actions.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.actions.type",
      "min": 1,
      "definition": "The type of action being performed. Allowed values are: create, update, delete.",
      "short": "create, update, delete - type of action performed",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSActionType"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.actions.type",
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.suggestions.actions.type"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.actions.description",
      "min": 0,
      "definition": "Human-readable description of the suggested action that MAY be presented to the end-user.",
      "short": "Human-readable description of the suggested action (MAY be presented to the end-user)",
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.actions.description",
      "condition": [ "cds-resp-5" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.actions.description"
      }
    }, {
      "path": "CDSHooksResponse.cards.suggestions.actions.resource",
      "min": 0,
      "definition": "When the type attribute is create, the resource attribute SHALL contain a new FHIR resource to be created. For update, this holds the updated resource in its entirety and not just the changed fields.",
      "short": "FHIR resource to create/update",
      "type": [ {
        "code": "Resource"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.suggestions.actions.resource",
      "comment": "Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.actions.resource"
      }
    }, {
      "id": "CDSHooksResponse.cards.suggestions.actions.resourceId",
      "max": "*",
      "min": 0,
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards.suggestions.actions.resourceId"
      },
      "path": "CDSHooksResponse.cards.suggestions.actions.resourceId",
      "type": [ {
        "code": "url"
      } ],
      "short": "A relative reference to the relevant resource.",
      "definition": "A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete."
    }, {
      "path": "CDSHooksResponse.cards.selectionBehavior",
      "min": 0,
      "definition": "Describes the intended selection behavior of the suggestions in the card. Allowed values are: at-most-one, indicating that the user may choose none or at most one of the suggestions; any, indicating that the end user may choose any number of suggestions including none of them and all of them",
      "short": "at-most-one, any - intended selection behavior of the suggestions in the card",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.selectionBehavior",
      "comment": "CDS Clients that do not understand the value MUST treat the card as an error.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.selectionBehavior"
      }
    }, {
      "constraint": [ {
        "key": "cds-resp-4",
        "human": "the CDS Service MUST populate a display value for each reason's Coding",
        "severity": "error",
        "expression": "all(display.exists())"
      } ],
      "path": "CDSHooksResponse.cards.overrideReasons",
      "min": 0,
      "definition": "Override reasons can be selected by the end user when overriding a card without taking the suggested recommendations. The CDS service MAY return a list of override reasons to the CDS client.",
      "short": "Can be selected by the end user when overriding a card without taking the suggested recommendations.",
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.overrideReasons",
      "comment": "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",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards.overrideReasons"
      }
    }, {
      "constraint": [ {
        "key": "cds-resp-3",
        "human": "AppContext only for smart Apps",
        "severity": "error",
        "expression": "(type != 'smart') implies (appContext.empty())"
      } ],
      "path": "CDSHooksResponse.cards.links",
      "min": 0,
      "definition": "Allows a service to suggest a link to an app that the user might want to run for additional information or to help guide a decision.",
      "short": "Link to an app that the user might want to run for additional information or to help guide a decision",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.links",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.cards.links"
      }
    }, {
      "path": "CDSHooksResponse.cards.links.extension",
      "min": 0,
      "definition": "A JSON object that has properties where the names are defined by the extension definitions",
      "short": "Object that has Named Extension Properties",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/elementdefinition-extension-style",
        "valueCode": "named-elements"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.links.extension",
      "comment": "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",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksElement.extension"
      }
    }, {
      "id": "CDSHooksResponse.cards.links.label",
      "max": "1",
      "min": 1,
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.links.label"
      },
      "path": "CDSHooksResponse.cards.links.label",
      "type": [ {
        "code": "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).",
      "definition": "Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link)."
    }, {
      "id": "CDSHooksResponse.cards.links.url",
      "max": "1",
      "min": 1,
      "base": {
        "max": "1",
        "min": 1,
        "path": "CDSHooksResponse.cards.links.url"
      },
      "path": "CDSHooksResponse.cards.links.url",
      "type": [ {
        "code": "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.",
      "definition": "URL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash."
    }, {
      "path": "CDSHooksResponse.cards.links.type",
      "min": 0,
      "definition": "The type of the given URL. There are two possible values for this field. A type of absolute indicates that the URL is absolute and should be treated as-is. A type of smart indicates that the URL is a SMART app launch URL and the CDS Client should ensure the SMART app launch URL is populated with the appropriate SMART launch parameters",
      "short": "absolute, smart - how to use the link",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSLinkType"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.links.type",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.links.type"
      }
    }, {
      "path": "CDSHooksResponse.cards.links.appContext",
      "min": 0,
      "definition": "An optional field that allows the CDS Service to share information from the CDS card with a subsequently launched SMART app. The appContext field should only be valued if the link type is smart and is not valid for absolute links. The appContext field and value will be sent to the SMART app as part of the OAuth 2.0 access token response, alongside the other SMART launch parameters when the SMART app is launched. Note that appContext could be escaped JSON, base64 encoded XML, or even a simple string, so long as the SMART app can recognize it.",
      "short": "Allows the CDS Service to share information from the CDS card with a subsequently launched SMART app",
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "CDSHooksResponse.cards.links.appContext",
      "comment": "CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CDSHooksResponse.cards.links.appContext"
      }
    }, {
      "path": "CDSHooksResponse.systemActions",
      "min": 0,
      "definition": "An array of Actions that the CDS Service proposes to auto-apply",
      "short": "An array of Actions that the CDS Service proposes to auto-apply",
      "contentReference": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse.cards.suggestions.actions",
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior",
        "valueCode": "absent"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.systemActions",
      "comment": "Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CDSHooksResponse.systemActions"
      }
    } ]
  },
  "status": "draft",
  "id": "fceba168-133f-4d63-a7b6-54f2fb869d2a",
  "kind": "logical",
  "url": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse",
  "identifier": [ {
    "value": "urn:oid:2.16.840.1.113883.4.642.40.1.42.7",
    "system": "urn:ietf:rfc:3986"
  } ],
  "version": "0.3.0",
  "differential": {
    "element": [ {
      "id": "CDSHooksResponse",
      "path": "CDSHooksResponse",
      "short": "The response to the discovery endpoint",
      "definition": "The response to the discovery endpoint"
    }, {
      "constraint": [ {
        "key": "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"
      } ],
      "path": "CDSHooksResponse.cards",
      "min": 0,
      "definition": "An array of Cards. Cards can provide a combination of information (for reading), suggested actions (to be applied if a user selects them), and links (to launch an app if the user selects them).",
      "short": "An array of Cards that provide information, suggested actions, and links",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior",
        "valueCode": "present"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards",
      "comment": "The CDS Client decides how to display cards, but this specification recommends displaying suggestions using buttons, and links using underlined text."
    }, {
      "id": "CDSHooksResponse.cards.uuid",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.uuid",
      "type": [ {
        "code": "uuid"
      } ],
      "short": "Unique identifier of the card (for logging/feedback)",
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix",
        "valueString": "urn:uuid:"
      } ],
      "definition": "Unique identifier of the card. MAY be used for auditing and logging cards and SHALL be included in any subsequent calls to the CDS service's feedback endpoint."
    }, {
      "id": "CDSHooksResponse.cards.summary",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.summary",
      "type": [ {
        "code": "string"
      } ],
      "short": "Summary message for display to the user (<140 char)",
      "definition": "One-sentence, <140-character summary message for display to the user inside of this card."
    }, {
      "id": "CDSHooksResponse.cards.detail",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.detail",
      "type": [ {
        "code": "markdown"
      } ],
      "short": "Optional detailed information to display (GitHub Flavored Markdown)",
      "definition": "Optional detailed information to display; if provided MUST be represented in (GitHub Flavored) Markdown. (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like 'view more details...')."
    }, {
      "path": "CDSHooksResponse.cards.indicator",
      "min": 0,
      "definition": "Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: info, warning, critical.",
      "short": "info, warning, critical - Urgency/importance of what this card conveys",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSIndicator"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.indicator",
      "comment": "The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring."
    }, {
      "id": "CDSHooksResponse.cards.source",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.source",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "short": "The primary source of guidance for the content the card represents.",
      "definition": "The source should be the primary source of guidance for the decision support the card represents."
    }, {
      "id": "CDSHooksResponse.cards.source.label",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.source.label",
      "type": [ {
        "code": "string"
      } ],
      "short": "Short, human-readable label to display for the source.",
      "definition": "A short, human-readable label to display for the source of the information displayed on this card. If a url is also specified, this MAY be the text for the hyperlink."
    }, {
      "id": "CDSHooksResponse.cards.source.url",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.source.url",
      "type": [ {
        "code": "url"
      } ],
      "short": "Link for when user clicks for more information about the source",
      "comment": "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.",
      "definition": "An optional absolute URL to load (via GET, in a browser context) when a user clicks on this link to learn more about the organization or data set that provided the information on this card."
    }, {
      "id": "CDSHooksResponse.cards.source.icon",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.source.icon",
      "type": [ {
        "code": "url"
      } ],
      "short": "absolute URL to an icon for the source (<100x100 PNG))",
      "definition": "An absolute URL to an icon for the source of this card. The icon returned by this URL SHOULD be a 100x100 pixel PNG image without any transparent regions. The CDS Client may ignore or scale the image during display as appropriate for user experience."
    }, {
      "id": "CDSHooksResponse.cards.source.topic",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.source.topic",
      "type": [ {
        "code": "Coding"
      } ],
      "short": "Describes the content of the card - can be useful for filtering, searching or ordered display",
      "comment": "This specification does not prescribe a standard set of topics",
      "definition": "A topic describes the content of the card by providing a high-level categorization that can be useful for filtering, searching or ordered display of related cards in the CDS client's UI. This specification does not prescribe a standard set of topics"
    }, {
      "id": "CDSHooksResponse.cards.suggestions",
      "max": "*",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "short": "Suggest a set of changes in the context of the current activity",
      "constraint": [ {
        "key": "cds-resp-5",
        "human": "All suggestion actions must have a description",
        "severity": "error",
        "expression": "actions.all(description.exists())"
      } ],
      "definition": "Allows a service to suggest a set of changes in the context of the current activity (e.g. changing the dose of a medication currently being prescribed, for the order-sign activity)."
    }, {
      "id": "CDSHooksResponse.cards.suggestions.label",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.suggestions.label",
      "type": [ {
        "code": "string"
      } ],
      "short": "Human-readable label to display for this suggestion",
      "comment": "e.g. the CDS Client might render this as the text on a button tied to this suggestion",
      "definition": "Human-readable label to display for this suggestion"
    }, {
      "id": "CDSHooksResponse.cards.suggestions.uuid",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions.uuid",
      "type": [ {
        "code": "uuid"
      } ],
      "short": "Unique identifier, used for auditing and logging suggestions",
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix",
        "valueString": "urn:uuid:"
      } ],
      "definition": "Unique identifier, used for auditing and logging suggestions"
    }, {
      "id": "CDSHooksResponse.cards.suggestions.isRecommended",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions.isRecommended",
      "type": [ {
        "code": "boolean"
      } ],
      "comment": "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.",
      "definition": "When there are multiple suggestions, allows a service to indicate that a specific suggestion is recommended from all the available suggestions on the card"
    }, {
      "constraint": [ {
        "key": "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())"
      } ],
      "path": "CDSHooksResponse.cards.suggestions.actions",
      "min": 0,
      "definition": "Defines a suggested action. Within a suggestion, all actions are logically AND'd together, such that a user selecting a suggestion selects all of the actions within it",
      "short": "Defines a suggested action (all apply)",
      "type": [ {
        "code": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.suggestions.actions",
      "comment": "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)."
    }, {
      "id": "CDSHooksResponse.cards.suggestions.actions.type",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.suggestions.actions.type",
      "type": [ {
        "code": "code"
      } ],
      "short": "create, update, delete - type of action performed",
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSActionType"
      },
      "definition": "The type of action being performed. Allowed values are: create, update, delete."
    }, {
      "id": "CDSHooksResponse.cards.suggestions.actions.description",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions.actions.description",
      "type": [ {
        "code": "string"
      } ],
      "short": "Human-readable description of the suggested action (MAY be presented to the end-user)",
      "condition": [ "cds-resp-5" ],
      "definition": "Human-readable description of the suggested action that MAY be presented to the end-user."
    }, {
      "id": "CDSHooksResponse.cards.suggestions.actions.resource",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions.actions.resource",
      "type": [ {
        "code": "Resource"
      } ],
      "short": "FHIR resource to create/update",
      "comment": "Use of this field to communicate a string of a FHIR id for delete suggestions is DEPRECATED and resourceId SHOULD be used instead.",
      "definition": "When the type attribute is create, the resource attribute SHALL contain a new FHIR resource to be created. For update, this holds the updated resource in its entirety and not just the changed fields."
    }, {
      "id": "CDSHooksResponse.cards.suggestions.actions.resourceId",
      "max": "*",
      "min": 0,
      "path": "CDSHooksResponse.cards.suggestions.actions.resourceId",
      "type": [ {
        "code": "url"
      } ],
      "short": "A relative reference to the relevant resource.",
      "definition": "A relative reference to the relevant resource. SHOULD be provided when the type attribute is delete."
    }, {
      "path": "CDSHooksResponse.cards.selectionBehavior",
      "min": 0,
      "definition": "Describes the intended selection behavior of the suggestions in the card. Allowed values are: at-most-one, indicating that the user may choose none or at most one of the suggestions; any, indicating that the end user may choose any number of suggestions including none of them and all of them",
      "short": "at-most-one, any - intended selection behavior of the suggestions in the card",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSSelectionBehavior"
      },
      "max": "1",
      "id": "CDSHooksResponse.cards.selectionBehavior",
      "comment": "CDS Clients that do not understand the value MUST treat the card as an error."
    }, {
      "constraint": [ {
        "key": "cds-resp-4",
        "human": "the CDS Service MUST populate a display value for each reason's Coding",
        "severity": "error",
        "expression": "all(display.exists())"
      } ],
      "path": "CDSHooksResponse.cards.overrideReasons",
      "min": 0,
      "definition": "Override reasons can be selected by the end user when overriding a card without taking the suggested recommendations. The CDS service MAY return a list of override reasons to the CDS client.",
      "short": "Can be selected by the end user when overriding a card without taking the suggested recommendations.",
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.cards.overrideReasons",
      "comment": "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"
    }, {
      "id": "CDSHooksResponse.cards.links",
      "max": "*",
      "min": 0,
      "path": "CDSHooksResponse.cards.links",
      "type": [ {
        "code": "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": [ {
        "key": "cds-resp-3",
        "human": "AppContext only for smart Apps",
        "severity": "error",
        "expression": "(type != 'smart') implies (appContext.empty())"
      } ],
      "definition": "Allows a service to suggest a link to an app that the user might want to run for additional information or to help guide a decision."
    }, {
      "id": "CDSHooksResponse.cards.links.label",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.links.label",
      "type": [ {
        "code": "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).",
      "definition": "Human-readable label to display for this link (e.g. the CDS Client might render this as the underlined text of a clickable link)."
    }, {
      "id": "CDSHooksResponse.cards.links.url",
      "max": "1",
      "min": 1,
      "path": "CDSHooksResponse.cards.links.url",
      "type": [ {
        "code": "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.",
      "definition": "URL to load (via GET, in a browser context) when a user clicks on this link. Note that this MAY be a 'deep link' with context embedded in path segments, query parameters, or a hash."
    }, {
      "id": "CDSHooksResponse.cards.links.type",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.links.type",
      "type": [ {
        "code": "code"
      } ],
      "short": "absolute, smart - how to use the link",
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/tools/ValueSet/CDSLinkType"
      },
      "definition": "The type of the given URL. There are two possible values for this field. A type of absolute indicates that the URL is absolute and should be treated as-is. A type of smart indicates that the URL is a SMART app launch URL and the CDS Client should ensure the SMART app launch URL is populated with the appropriate SMART launch parameters"
    }, {
      "id": "CDSHooksResponse.cards.links.appContext",
      "max": "1",
      "min": 0,
      "path": "CDSHooksResponse.cards.links.appContext",
      "type": [ {
        "code": "string"
      } ],
      "short": "Allows the CDS Service to share information from the CDS card with a subsequently launched SMART app",
      "comment": "CDS Client support for appContext requires additional coordination with the authorization server that is not described or specified in CDS Hooks nor SMART.",
      "definition": "An optional field that allows the CDS Service to share information from the CDS card with a subsequently launched SMART app. The appContext field should only be valued if the link type is smart and is not valid for absolute links. The appContext field and value will be sent to the SMART app as part of the OAuth 2.0 access token response, alongside the other SMART launch parameters when the SMART app is launched. Note that appContext could be escaped JSON, base64 encoded XML, or even a simple string, so long as the SMART app can recognize it."
    }, {
      "path": "CDSHooksResponse.systemActions",
      "min": 0,
      "definition": "An array of Actions that the CDS Service proposes to auto-apply",
      "short": "An array of Actions that the CDS Service proposes to auto-apply",
      "contentReference": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse#CDSHooksResponse.cards.suggestions.actions",
      "extension": [ {
        "url": "http://hl7.org/fhir/tools/StructureDefinition/json-empty-behavior",
        "valueCode": "absent"
      } ],
      "max": "*",
      "id": "CDSHooksResponse.systemActions",
      "comment": "Each action follows the schema of a card-based suggestion.action. The CDS Client decides whether to auto-apply actions."
    } ]
  },
  "contact": [ {
    "telecom": [ {
      "value": "http://www.hl7.org/Special/committees/fiwg",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement"
}