A patient's calls, texts and email — on the platform's own spine

FeatureSecurityService
Shipped
August 26, 2026 at 2:26 AM UTC
Author
Kamo
Commit
0973746

Not a second timeline. LeadCommunicationsService now takes a CommsSubject and the lead overload delegates to it, so /leads keeps its exact behaviour drift. A patient is just another owner. Notes and chat appear only for a lead, and that is a fact rather than a guard: notes come from a lead's media stream and chat from SocialRemoteUserLead, neither of which exists for a patient. Both sources already return empty when their link is absent, so a patient gets matched traffic and nothing pretends otherwise. Registering contact points is the half that makes it work. Pointing a timeline at a new owner changes what is READ; inbound traffic only ever LANDS on an owner the matcher can resolve, so a patient whose number is not a contact point receives calls that resolve to nobody. Registration is point-in-time like the lead spine — changing a number closes the old point and opens a new one, so a call from two years ago still explains what it matched — and it applies the same seven-digit floor, because a four-digit extension would otherwise match every patient sharing those digits. Reading any of it needs a care relationship with the patient, exactly like the chart, and every entry shown writes its own audit row. A voicemail from a patient is as identifying as a problem list. The email-body endpoint re-checks the row against the patient in the path. The care-relationship check is satisfied by the patient in the URL, so without that second check a clinician with a relationship to one patient could read any message in the practice by supplying its id — the lead endpoint makes the same re-check for the same reason. Its 404 is one answer for "not this patient's", "not an email" and "not locatable yet", so the response cannot be used to probe for message ids. Also here: the TEFCA exchange controller — a patient's §164.528 accounting, everything sent to one partner (the query somebody runs the hour a breach is reported), Part 2 disclosures as their own question, and the cross-organization match review queue. 1278 tests green.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing