Skip to main content

Patient merge episode and pathway webhooks

Summary

When two patients are merged, existing episode.updated and pathway.updated webhook events are now emitted for each episode and pathway transferred from the deleted patient to the surviving patient.

These events are sent for merges performed through the standard patient merge workflow in the product, but not for background data-repair or record-reconciliation jobs.

What changed

  • patient.merged — unchanged. Still includes sourcePatientId and targetPatientId.
  • episode.updated — now also fires for each episode reassigned during a patient merge. patientId is the surviving patient's id.
  • pathway.updated — now also fires for each pathway reassigned during a patient merge. patientId is the surviving patient's id; episodeId is unchanged.

No new webhook event type was added.

See the Patient events, Episode events, and Pathway events reference pages.

Migration

Subscribe to episode.updated and pathway.updated if your integration must sync episode or pathway ownership when patients are merged. Existing patient.merged subscriptions are unchanged.

mutation CreateWebhook {
createWebhook(
input: {
label: "Patient merge sync"
url: "https://your-app.com/webhooks/semble"
eventTypes: ["patient.merged", "episode.updated", "pathway.updated"]
}
) {
data {
id
eventTypes
}
error
}
}