fix: stop auto-creating Unknown leads on every call

Caller resolver now returns empty IDs for unrecognized numbers instead
of eagerly creating lead+patient records. Records are created when the
agent explicitly books an appointment or logs an enquiry — per PRD.

- caller-resolution.service.ts: return unresolved result, don't create
- call-desk.tsx: toast changed to 'No existing records found'
- appointment-form.tsx: create patient on save if none exists

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 11:22:23 +05:30
parent d24945a3af
commit d3e6934dcb
2 changed files with 21 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ export const CallDeskPage = () => {
.then((result) => {
setResolvedCaller(result);
if (result.isNew) {
notify.info('New Caller', 'Lead and patient records created');
notify.info('New Caller', 'No existing records found for this number');
}
})
.catch((err) => {