Inspiration When my sister Deborah had a C-section in Abuja, an HMO claim issue kept her in the hospital for two extra days, and her family had to pay extra money out of pocket. Her care was fine. The system around it had no trust layer: nobody could quickly prove a genuine claim was genuine, so it got stuck. The same gap lets fake claims through. Nigeria's health insurance covers only about 10% of people, and 23,000 ghost enrollees were expelled in a single quarter.

What it does ClaimGuard Pay is a spend-authority layer for healthcare claims. A hospital submits a claim and the system decides whether money may move.

  • Seven deterministic fraud rules decide first: ghost enrollee, missing or malformed NIN, malformed NHIA ID, amount over tariff, falsified C-Section, and upcoding.
  • A Gemini audit of the clinical notes can only escalate an approved claim to human review. It can never approve or unfreeze one, and the notes are treated as untrusted text, so nobody can write their way to a payout. -Only approved claims reach PayPal. They create a real sandbox order (Orders v2) and submit a payout batch (Payouts v1), capped at the lower of the claimed amount and the statutory tariff.
  • Gemini explains every decision in plain English for the hospital finance officer.

How I built it Next.js 14 and TypeScript on Vercel. PayPal REST APIs with OAuth2 client credentials. Gemini through the REST API with structured JSON output. Patient identifiers and emails are never sent to the model. If the AI is unavailable, the rule decision stands and nothing is fabricated: every order and payout ID shown is a real response from PayPal.

Challenges Keeping the AI useful without giving it spending authority, so I made it escalate-only. Replacing fake placeholder IDs with real sandbox calls. And being honest about what a sandbox proves.

What I learned The AI should be bounded by design, not by prompt. Real API calls with visible error messages beat polished mock-ups, and also, a name mismatch can also cause some friction in terms of API call especially in the environment variables.

Honest limits Sandbox only. Orders are created but not captured, and payouts stay PENDING. The registry check is a form checkbox and the NIN check is format-only. Tariffs are demo values.

What's next Duplicate-claim and phantom-billing rules, live NIMC and NHIA registry lookups, and payee onboarding.

Built With

Share this project:

Updates

Submission history