{"slug": "building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind", "title": "Building a 447-system healthcare OS in one codebase — the architecture behind BioMedixAI", "summary": "BioMedixAI has built an AI-native healthcare operating system unifying 447 management systems on a single multi-tenant platform. The architecture uses NestJS, Next.js, PostgreSQL with row-level security, and supports FHIR R4, HL7 v2, ICD-10, SNOMED, and LOINC standards. Key challenges solved include multi-role identity, cross-facility patient identity with a Universal Health ID, and tenant isolation at scale.", "body_md": "It started with a failed ambulance call at 2 AM and turned into a question I couldn't shake: why does every healthcare facility run 8 disconnected tools instead of one nervous system?\n\nOver the last cycle we shipped BioMedixAI — an AI-native healthcare operating system unifying 447+ management systems on a single multi-tenant platform. Here's the engineering reality behind that sentence.\n\nThe stack\n\nBackend: NestJS (TypeScript) — 103 modules, 151 Prisma models, 132 migrations\n\nFrontend: Next.js 15 (App Router / RSC), Tailwind + shadcn/ui, PWA-installable\n\nData: PostgreSQL 16 — shared-schema multi-tenancy, every query scoped by facilityId, with Row-Level-Security as a DB-level backstop\n\nStandards: FHIR R4 (read), HL7 v2 ADT/ORU, ICD-10 with ICD-11 crosswalk, SNOMED + LOINC\n\nThree hard problems we had to solve\n\nOne person, many roles. A doctor who also owns a diagnostic center is one identity with stacked roles — never duplicate accounts. Roles attach to a Person, modules activate per facility.\n\nCross-facility patient identity. A portable Universal Health ID (UHID) the patient can claim and carry across any facility — their data follows them, not the institution.\n\nTenant isolation at scale. Application-layer scoping on every query, plus flag-gated Postgres RLS so a bug in one layer can't leak across tenants.\n\nThe full series — multi-tenancy patterns, the \"modality-aware status set\" trick, surgical live-DB migrations without dropping 40 FKs — is coming. Follow along.\n\n👉 Live platform: [https://www.biomedixai.com/](https://www.biomedixai.com/)\n\nWhat's the most fragmented part of healthcare software you've had to integrate? I'd love war stories in the comments.", "url": "https://wpnews.pro/news/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind", "canonical_source": "https://dev.to/nazmulhd10/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind-biomedixai-3h46", "published_at": "2026-06-28 04:30:20+00:00", "updated_at": "2026-06-28 05:34:09.367353+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "ai-products", "ai-infrastructure"], "entities": ["BioMedixAI", "NestJS", "Next.js", "PostgreSQL", "FHIR R4", "HL7 v2", "ICD-10", "SNOMED"], "alternates": {"html": "https://wpnews.pro/news/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind", "markdown": "https://wpnews.pro/news/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind.md", "text": "https://wpnews.pro/news/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind.txt", "jsonld": "https://wpnews.pro/news/building-a-447-system-healthcare-os-in-one-codebase-the-architecture-behind.jsonld"}}