02 · MedReclaim AI · Healthcare / Agentic AI

Healthcare recovery: private data with clear safety checks

Challenge: Healthcare debt recovery needs help across several channels without exposing private data or letting software make uncontrolled decisions. Solution: I designed a LangGraph gateway and FastAPI tool server with tenant and identity checks, PHI filtering, audit logs, payment and document flows, and human handoff. Outcome: an implementation-ready design with clear safety checks; no live performance metric is claimed. Next: Message me to map this to your regulated workflow.

AI Systems Architect2026Implementation-ready

Case study

What was built and why it mattered.

Outcome, ownership, architecture, and evidence in one view.

MedReclaim addresses healthcare debt recovery, where help must be useful without exposing patient data, disputed accounts, or sensitive personal details. It was designed for several communication channels rather than as a simple chat window.

I separated the conversation service from the protected tool service. The FastAPI service checks customer space, identity, permissions, audit records, and compliance before sensitive actions are allowed. This keeps the AI useful without giving it unchecked access.

The implementation plan covers WhatsApp, Telegram, SMS, voice, and email; payment and document workflows; insurance-remittance analysis; and clear handoff to a person. It is an implementation-ready example for a regulated workflow.

The conversation flow is kept separate from sensitive actions: a protected service checks customer space, identity, health data, payments, records, and handoffs.RECOVERY REQUEST PATH / SEVERAL CHANNELSSAFETY CHECKS + HUMAN HANDOFFPatientAccount or billingconversationChannelsWhatsApp • SMS • voiceemail • TelegramConversation serviceMessages + campaignssession stateFastAPI tool serverTenant + identity checksscoped operationsRecords + providersPostgreSQL • paymentsdocuments + callbacksSafety checksPHI filtering • audit logsHuman handoffDisputes • judgement • pause
The conversation flow is kept separate from sensitive actions: a protected service checks customer space, identity, health data, payments, records, and handoffs.Solid = primary flow · dashed = support / control path
Download editable Excalidraw

01

SEVERAL_CHANNELS

One workflow coordinates conversations across WhatsApp, Telegram, SMS, voice, and email while keeping channel rules clear.

02

PRIVATE_DATA_CHECKS

A FastAPI tool server checks customer space, patient identity, private health data, and interaction records before actions run.

03

RECOVERY_WORK

Payment plans, promises to pay, billing-dispute pauses, documents, remittance analysis, and handoff are treated as real work.

04

READY_TO_BUILD

The design uses containerized services, private connections, PostgreSQL, async Python, payment and messaging providers, and health checks.

The challenge

Healthcare debt recovery is a difficult automation problem. A system needs to work across the channels people actually use, explain bills and insurance remittances clearly, enable payment action, and still protect sensitive data, respect disputes, and hand difficult matters to people.

MedReclaim was designed as a multi-tenant healthcare-recovery platform, not a generic chat assistant. The objective was to make the agent useful while keeping the security and compliance boundary outside the model runtime.

My role

I designed the AI systems architecture: the split between the agent runtime and the FastAPI tool server; tenant and identity enforcement; channel integrations; compliance controls; payment and document flows; and the health-data model required for auditable recovery operations.

Architecture

Architecture diagram
Loading diagram…

The key design choice: the agent is not the security boundary

The agent gateway handles conversation state, campaign behavior, and tool invocation. The FastAPI service is deliberately stateless and independently validates every sensitive operation. It scopes data by provider, confirms patient identity against the session context, applies channel-specific PHI filtering, and writes audit records.

That separation is essential because an AI runtime should not be trusted to enforce multi-tenant access simply because its prompt says it should.

Workflow design

Omnichannel by design

The agent can participate across WhatsApp, Telegram, SMS, voice, and email, while the backend handles provider-specific callbacks and normalizes events. The same underlying account, payment, and escalation context can follow a patient across channels.

Recovery, not just conversation

The platform models accounts, itemized charges, insurance information, remittances, payments, payment plans, promises to pay, generated documents, scheduled actions, and escalations. This gives the agent tools that map to actual work instead of a single text-response endpoint.

Safety controls are first-class

Contact rules, PHI filtering, billing-dispute pauses, tenant isolation, patient identity checks, and interaction logging sit in the backend. When a request needs human judgement, the platform creates an escalation instead of improvising a decision.

Implementation foundation

  • FastAPI, async SQLAlchemy, PostgreSQL, Alembic, Pydantic, Docker, and health endpoints.
  • An agent gateway with tool-oriented skills, session management, scheduled campaigns, and model fallbacks.
  • Payment, PDF generation, SMS/voice, TTS, and channel webhook integrations.
  • Private service-to-service networking and a multi-tenant data model designed around healthcare providers.

Delivery status

Implementation-ready architecture. The case study reflects the documented product and technical implementation, rather than claiming production outcomes that have not been independently measured.

What this case study proves

MedReclaim demonstrates the AI systems judgment behind a senior engineer’s work: agent orchestration, security boundaries, compliance-aware product design, asynchronous Python services, and practical multi-channel automation.