Skip to content

Commit b81c42f

Browse files
authored
feedback + card.uuid - first take
1 parent 6b835c3 commit b81c42f

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/specification/current.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ Each **Card** is described by the following attributes.
447447

448448
Field | Optionality | Type | Description
449449
----- | ----- | ----- | --------
450+
`uuid` | OPTIONAL | *string* | Unique identifier of the card, used for auditing and logging cards and to provide feedback.
450451
`summary` | REQUIRED | *string* | One-sentence, <140-character summary message for display to the user inside of this card.
451452
`detail` | OPTIONAL | *string* | Optional detailed information to display; if provided MUST be represented in [(GitHub Flavored) Markdown](https://github.github.com/gfm/). (For non-urgent cards, the CDS Client MAY hide these details until the user clicks a link like "view more details...").
452453
`indicator` | REQUIRED | *string* | Urgency/importance of what this card conveys. Allowed values, in order of increasing urgency, are: `info`, `warning`, `critical`. The CDS Client MAY use this field to help make UI display decisions such as sort order or coloring.
@@ -581,6 +582,81 @@ Field | Optionality | Type | Description
581582
}
582583
```
583584

585+
## Feedback
586+
587+
Once a CDS Hooks service responds to a hook by returning an info or suggestion card, the service has no further interaction with the CDS client. The acceptance or rejection of a suggestion is valuable information to enable a service to improve its behavior towards the goal of the end-user having a positive and meaningful experience with the CDS. A feedback endpoint enables suggestion tracking & analytics.
588+
589+
Upon receiving a card, a user may accept its sugestions, ignore it entirely, dismiss it without specifying a reason or dismiss it with a dismiss reason. Note that while a single suggestion can be accepted, an entire card is either ignored or dismissed.
590+
591+
Typically, an end user may only accept, or dismiss a card once; however, a card once ignored could later be acted upon. CDS Hooks does not specify the UI behavior of CDS clients, including the persistence of cards. CDS clients should faithfully report each of these distinct end-user interactions as feedback.
592+
593+
## Suggestion accepted
594+
595+
The CDS client can inform the service when one or more suggestions were accepted by POSTing a simple json object.
596+
597+
Upon the user accepting a suggestion (perhaps when she clicks a displayed label (e.g., button) from a "suggestion" card), the CDS client informs the service by posting the card and suggestion `uuid`s to the CDS Service's feedback endpoint with an outcome of `accepted`.
598+
599+
To enable a positive clinical experience, the analytics endpoint may be called for multiple hook instances or multiple cards at the same time or even multiple times for a card or suggestion. Depending upon the UI and workflow of the CDS client, a CDS Service may receive feedback for the same card instance multiple times.
600+
601+
```
602+
POST {baseUrl}/cds-services/{serviceId}/feedback
603+
604+
{
605+
"feedback":[
606+
{
607+
"card":"`card.uuid` from CDS Hooks response",
608+
"outcome":"accepted",
609+
"acceptedSuggestions": [ { "id" : "`card.suggestion.uuid` from CDS Hooks response" } ],
610+
"outcomeTimestamp": "iso timestamp in UTC when action was taken on card"
611+
}
612+
]
613+
}
614+
```
615+
616+
If either the card or the suggestion has no `uuid`, the CDS client does not send a notification.
617+
618+
## Card ignored
619+
620+
If the end-user doesn't interact with the CDS Service's card at all, the card is *ignored*. Why would this happen? Perhaps the priority indicator of the card deprioritized it, or the user simply ignored the guidance. In this case, the CDS Client does not inform the CDS Service of the rejected guidance. Even with a `card.uuid`, a `suggestion.uuid' and an available feedback service, the service is not informed.
621+
622+
## Dismissed guidance
623+
624+
A CDS client may enable the end user to dismiss guidance without providing an explicit reason for doing so. The CDS client can inform the service when a suggestion was dismissed by specifying an outcome of `dismissed` without providing an `dismissReason`.
625+
626+
```
627+
POST {baseUrl}/cds-services/{serviceId}/feedback
628+
629+
{
630+
"feedback":[
631+
{
632+
"card":"f6b95768-b1c8-40dc-8385-bf3504b82ffb", // uuid from `card.uuid`
633+
"outcome":"dismissed",
634+
"outcomeTimestamp": "iso timestamp in UTC when action was taken on card"
635+
}
636+
]
637+
}
638+
639+
```
640+
641+
## Explicit reject with dismiss reasons
642+
643+
A CDS client can inform the service when a suggestion was rejected by POSTing an outcome of `dismissed` along with a `dismissReason` to the service's feedback endpoint. The CDS Client may enable the clinician to supplement the `dismissReason` with a free text comment, supplied to the CDS Service in `dismissReason.userComment`.
644+
645+
```
646+
POST {baseUrl}/cds-services/{serviceId}/feedback
647+
648+
{
649+
"feedback":[
650+
{
651+
"card":"9368d37b-283f-44a0-93ea-547cebab93ed",
652+
"outcome":"dismissed",
653+
"dismissReason": { "key" : "reason-id-provided-by-service", "userComment" : "clinician entered comment>" }
654+
"outcomeTimestamp": "iso timestamp in UTC when action was taken on card"
655+
}
656+
]
657+
}
658+
659+
```
584660

585661
## Security and Safety
586662

0 commit comments

Comments
 (0)