SlimSlim/Notifications

Edit a note's text

  • Sandbox: available
  • Staging: available
  • Production: unknown
PATCH
/v1/slim/notifications/notes/{noteId}

Changes a note's text. A note is a practitioner's comment on a notification, stored as a FHIR Communication whose basedOn points at the alert. The alert itself is never changed.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Patient:read (an admin or super admin who holds no access policy skips this check). Only the note's author can change it. Scope: The caller's project (from the token). An alert or note from another project, of another kind, or that does not exist answers the same 404.

Behaviour

  • Same effect as PUT: a note's text is the only field a caller can change.
  • text is trimmed and must be 1 to 2000 characters.
  • If the note changed while your edit was in flight, the route answers 409. Reload the note and try again.

Example

curl -X PATCH 'https://api.sandbox.ovok.com/v1/slim/notifications/notes/c3499c27-2973-0a7f-807e-fb8676a92dcb' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{ "text": "Resident was in the bathroom; back in bed 02:14." }'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

noteId*string
Formatuuid

Request Body

application/json
  1. body
text*string
Length1 <= length <= 2000

Response Body

The note as stored.

application/json
  1. response
id*string
target*
patientId*string
text*string
author*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.sandbox.ovok.com/v1/slim/notifications/notes/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
{  "id": "string",  "target": {    "kind": "oob",    "id": "string"  },  "patientId": "string",  "text": "string",  "author": {    "practitionerId": "string",    "name": "string"  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

A raw Signals alert's notes GET

Lists the notes on a raw Signals alert. A note is a practitioner's comment on a notification, stored as a FHIR `Communication` whose `basedOn` points at the alert. The alert itself is never changed. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Patient:read` (an admin or super admin who holds no access policy skips this check). **Scope:** The alert is read from Signals first: 404 when it isn't in the caller's project or the caller can't read its resident. ## Behaviour - Newest first. Deleted notes are not listed. - Answers 503 `signals_unavailable` while Signals is down. Retry once Signals is back. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/raw-alerts/c3499c27-2973-0a7f-807e-fb8676a92dcb/notes' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

Delete a note DELETE

Deletes a note. A note is a practitioner's comment on a notification, stored as a FHIR `Communication` whose `basedOn` points at the alert. The alert itself is never changed. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Patient:read` (an admin or super admin who holds no access policy skips this check). Only the note's author can delete it. **Scope:** The caller's project (from the token). An alert or note from another project, of another kind, or that does not exist answers the same 404. ## Behaviour - The note is marked `entered-in-error`, not erased, so the clinical record and its history survive. - A deleted note leaves every list and every `noteCount`. - Answers 204 with no body. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/notifications/notes/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```