alert.note

When Signals sends alert.note, its payload and how to handle it in Node.js, Python and Java.

A reading carries a note, for a patient with alertIfNote on.

Payload

Every delivery is the envelope type, timestamp, sequence and data; the delivery's id is the webhook-id header. See Verify webhooks.

{
  "type": "alert.note",
  "timestamp": "2026-10-25T08:00:02.000Z",
  "sequence": 1047,
  "data": {
    "id": "0b9d7e52-1f3a-4e8c-b6a2-7c4d9e1f2a35",
    "patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
    "observation": "a3e8f1c2-5d6b-4a7e-9c0f-1b2d3e4f5a6b",
    "component": {
      "code": {
        "coding": [
          {
            "code": "8867-4",
            "system": "http://loinc.org"
          }
        ]
      }
    },
    "message": "Resident refused breakfast",
    "reason": "note",
    "createdAt": "2026-10-25T08:00:02.000Z",
    "updatedAt": "2026-10-25T08:00:02.000Z",
    "effectiveTS": "2026-10-25T08:00:00.000Z",
    "observationRefId": "reading-0001",
    "derivedObservation": null,
    "patientRefId": "resident-001",
    "episodeId": null,
    "acknowledgedAt": null,
    "acknowledgedBy": null,
    "version": 1
  }
}

The data fields are those of alert.triggered. reason is note, and message is the note's text. Every note is its own alert.

Handle the event

Verify the delivery first (Verify webhooks), then act on the verified event as in Handle an event.

alert-note.js
export async function handle(webhookId, event) {
  if (!(await firstTime(webhookId))) return;
  const { data } = event;
  switch (event.type) {
    case 'alert.note':
      await notifyCareTeam(data.patientRefId, data.message);
      break;
    default:
      break;
  }
}

Last updated on

On this page