Inspiration
Healthcare quality improvement teams spend hours manually tracing whether positive mental health screenings receive timely follow-up assessments. The rules are buried in policy documents, the data lives in disconnected systems, and the audit trail is a spreadsheet. We wanted to build a system where the reconciliation logic is transparent, every decision traces back to the source evidence that defines it, and the knowledge corpus is explorable — not just searchable.
What it does
Meridian is a multi-tenant reconciliation platform that answers one critical question: Did each positive PHQ-9 screen get a follow-up C-SSRS assessment within two business days?
It ingests screening events and assessment events, runs a deterministic reconciliation engine that classifies each screen by eligibility and linkage outcome, and presents results through both a data table and a visual pairing view with timeline visualization. A "Company Brain" module connects the reconciliation decisions back to source documents — publications, procedures, and policy memos — so analysts can see why a decision was made, not just what it was.
How we built it
- Backend: NestJS + Prisma + PostgreSQL with a pure-function reconciliation engine that computes eligibility, business-day windows (accounting for weekends and holidays), and linkage state for every screen.
- Frontend: Next.js App Router + Tailwind + shadcn/Radix components, with a visual pairing view (screen↔assessment card pairs with color-coded connectors), donut chart summary dashboard, and business-day timeline.
- Knowledge layer: HydraDB-backed document store with cross-collection unified search, provenance linking (decisions traced to source passages), graph context rendering showing how publications inform protocols, and a document upload UI.
- Infrastructure: Turborepo monorepo, pnpm workspaces, Docker (Postgres + Redis + Mailpit), with shared types across API and web to catch drift at compile time.
Challenges we ran into
- Field name drift between the reconciliation engine and the frontend DTOs — the engine uses matureEligible and absentLink while the UI expected mature and absent. This produced a page full of zeros that looked like missing data but was actually a mapping bug.
- Multi-tenant data isolation made debugging harder: seed data lived in one organization while the logged-in user was navigating a different one, so everything appeared empty despite the database being full.
- Business-day calculation across weekends and holidays (e.g., a Friday screen before Labor Day) required careful timezone-aware logic to get the two-day window right.
Accomplishments that we're proud of
- The reconciliation engine is a pure deterministic function — same inputs, same outputs, every time. No AI in the decision loop.
- Every decision can be traced back to source evidence via provenance linking, closing the loop between "what happened" and "why the rule says so."
- The visual pairing view makes screen-to-assessment matches visible at a glance — blue connectors for within-window, amber for late, dashed grey for missing, with expandable business-day timelines.
- Seven features shipped end-to-end (migration → service → DTO → API client → UI) in a single session.
What we learned
- Building across the full stack in one pass (as the codebase conventions demand) catches integration bugs immediately — splitting backend and frontend into separate tasks is where field names drift apart.
- Multi-tenant systems need seed data that matches the actual user's org membership, or demo day is a blank screen.
- A "Company Brain" is fundamentally different from a search box — it's about showing connections between documents, not just listing results.
What's next for Meridian
- Live reconciliation streaming — run the engine incrementally as new screens arrive instead of batch-triggering.
- AI-assisted review — use Claude to summarize ambiguous decisions and suggest resolution paths, while keeping the deterministic engine as the source of truth.
- Multi-protocol support — extend beyond PHQ-9/C-SSRS to arbitrary screen-assessment protocol pairs defined by each organization.
- FHIR integration — ingest screening and assessment events directly from EHR systems via FHIR R4 resources.
- Audit workflow — built-in review queues with role-based assignments, sign-off chains, and exportable audit packages for regulatory submissions.
Built With
- claude
- docker
- nestjs
- next.js
- node.js
- pnpm
- postgresql
- prisma
- radix-ui
- react
- redis
- shadcn/ui
- tailwind-css
- tmux
- turborepo
- typescript
Log in or sign up for Devpost to join the conversation.