02 · Case study

Reside Health

Unifying patient identity across login, EHR, billing and CRM, so every sign-up path links to one person instead of creating duplicates.

Role
Engineer (contract)
Focus
Identity resolution, Data reconciliation, Integrations, Event-driven workflows
Stack
Ruby · React Native · Auth0 · athenahealth · Stripe · HubSpot
Status
Shipped

Problem

Reside Health was a membership-based healthcare startup. It has since shut down, so this write-up stands in for a live product link.

A person could become a customer through at least five doors. Each door wrote to a different subset of systems, with no shared key and no check for an existing record.

Entry point What it created What it missed
Web or iOS sign-up Auth0 account, Stripe customer with a trial Athena link, unless the user arrived by invite
ZocDoc booking or walk-in Athena patient, Stripe customer with no subscription, activation email Auth0 account until the invite was activated, which many never did
In-person events and front desk Stripe customer, to take payment Auth0 and Athena
Marketing promos Stripe customer Auth0 and Athena; a later sign-up started a second trial
Website lead form HubSpot lead Everything else

Stripe does not enforce unique emails, so every door could add another customer for the same person. That produced duplicate Stripe customers, double charges when a member on a trial upgraded in person, accounts that never got their Athena patient ID, and workflows that errored when the records they expected were missing.

My role

I owned this end to end: mapping every sign-up path, the reconciliation audit, the design, the implementation in our event-driven workflows, and testing.

Beyond this project, I revamped the sponsored sign-up flow, added feature flags, and upgraded the system documentation and processes.

Architecture

Every path that creates a record first searches Auth0, Athena and Stripe by email, links what it finds, and only creates what is missing. The check runs at the three places a record is born: an account created in Auth0, a patient created in Athena, and a Stripe customer created at an event or through a promo.

Reside Health identity checkThree triggers, an Auth0 account, an Athena patient or a Stripe customer being created, all run one check that searches Auth0, Athena and Stripe by email. An exact email match links the records, a name-only match alerts ops, and no match creates the record and sends an invite. Each system then stores the IDs of the others.account createdpatient createdStripe customer createdcheck before createsearch all 3 by emailexact email → linkname only → alert opsno match → create + inviteeach system stores the IDs of the others
Auth0 sign-up, Athena patient or Stripe customer → search Auth0, Athena and Stripe by email → link on an exact match, alert ops on a name-only match, or create and invite. IDs are written back to every system.

Exact email matches are linked automatically. Name-only matches raise an alert for the ops team. Anything with no match is created, and the person is sent an activation invite. Each system then stores the IDs of the others. When Stripe already held several customers for one email, the lookup picked the one with the most linked metadata.

The logic ran inside the existing account and patient workflows, so no sign-up path changed for users.

Engineering challenges

Finding out how bad it was

I mapped every sign-up path, then exported users from Auth0, Stripe and Athena and joined them on the IDs each system stored about the others. With Athena as the core table:

Linkage state Patients Likely cause
In Auth0 and Stripe ~6,400 Healthy
In Stripe, not Auth0 ~4,300 Invite never activated, or signed up with a different email
In neither Auth0 nor Stripe ~380 A path that skipped saving the patient ID to Auth0 (fixed during this work)
In Auth0, not Stripe ~38 Should not happen; flagged for follow-up

Exact matches only

In healthcare, linking two different people is far worse than leaving a duplicate. It can show one patient another’s records or bill the wrong card. A name-based matcher would have cleaned up more records automatically, but one wrong merge is a privacy incident. So only exact email matches merge automatically, and some duplicates stay until a person reviews them.

Fixing the integration layer, not rebuilding membership

Many duplicates came from staff creating customers directly in Stripe at events and the front desk. The clean fix was an admin portal for memberships with the checks built in, but that meant supporting promo codes, skipped trials and other edge cases. I scoped it out and made every creation path idempotent instead, so the existing workflows became safe right away.

Outcome

The reconciliation audit was the baseline. Success meant new records arriving already linked instead of adding to the unlinked counts. I tested each cross-system scenario end to end in our dev and preview environments, including a returning Stripe customer signing up, an existing patient creating an account, and a new patient whose account and Stripe customer already existed.

The planned next step was one internal person ID as the source of truth, with Auth0, Athena, Stripe and HubSpot as linked accounts, and an admin portal so staff never create customers in Stripe directly.