Medical Case Management Platform

PotSolutions delivered a full development project — migrating a HIPAA case management platform from AWS serverless to Azure, and implementing the AI review engine, clinical guidelines pipeline, document intelligence, and production infrastructure.

Healthcare SaaS AWS → Azure HIPAA SaaS AI / FastAPI

A Basic App, Ambitious Product Vision

A HIPAA-oriented SaaS platform served law firms and hospitals with essential case management on AWS — create cases, upload medical records, manage users and firms. The legacy stack ran on Node.js Lambda, API Gateway, DynamoDB, S3, and EventBridge.

The product roadmap called for significantly more: AI-assisted quality reviews, clinical guideline management, automated document processing, multi-agent case evaluation with audit trails, credit-based billing, and a HIPAA-ready Azure estate with production-grade CI/CD.

PotSolutions delivered the full project — migrating the core application to Azure, rebuilding the backend in Python, modernising the Next.js frontend, and implementing the advanced capabilities that define the product today.


AWS to Azure — Plus Everything New

PotSolutions migrated the foundational case management workflows to Azure and built the entire AI and async processing stack as new development on top.

LayerBefore (AWS)After (Azure)
BackendNode.js Lambda (SAM / CloudFormation)Python FastAPI on Linux App Service (Docker via ACR)
FrontendNext.js on S3 / CloudFrontNext.js on Linux App Service (standalone build)
DatabaseDynamoDBAzure Cosmos DB for NoSQL (tenant-partitioned containers)
File storageS3Azure Blob Storage (private endpoints)
Async processingEventBridge + LambdaAzure Service Bus + Container Apps workers (scale to zero)
AuthAuth0 JWT custom authorizerAuth0 (unchanged — JWKS middleware in FastAPI)
InfrastructureCloudFormation / SAMTerraform (dev, stage, prod environments)
CI/CDManual Lambda ZIP deploysGitHub Actions — infra plan/apply, Docker backend, frontend, DB migrations
AIAzure OpenAI + Mistral Document AI OCR; LangGraph multi-agent reviews

Full Platform Delivery

PotSolutions handled end-to-end development — from Azure infrastructure and CI/CD through to the AI systems that define the product today.

Core platform migration

  • Core case management — create and track medico-legal cases, assign quality controllers, download case document ZIPs.
  • Basic document upload and storage for intake forms and medical records.
  • Multi-tenant user and firm administration with Auth0 identity.
  • Next.js frontend experience, modernised and pointed at the new FastAPI backend.

Advanced capabilities

  • Document intelligence pipeline — OCR via Mistral Document AI, GPT-based clinical timeline structuring, and queue-driven processing through Container Apps workers.
  • Clinical guidelines platform — upload, version, and categorise guidelines; automated rule extraction pipeline with dedicated Service Bus workers.
  • Multi-agent AI reviews — eight specialised agents evaluate cases against clinical rules with full step-by-step audit trails suitable for medico-legal defensibility.
  • Interactive AI chat — attorneys and quality controllers discuss review findings with agent-backed conversational UI.
  • Credit-based billing — per-tenant credit metering and atomic deductions for review services.
  • Production platform — Terraform infrastructure, VNet with private endpoints, GitHub Actions CI/CD, Cosmos DB data layer, and Application Insights across all services.
Next.js frontend (App Service) — Auth0 session → FastAPI /api/v1/* │ ▼ FastAPI API (App Service, Docker/ACR) Routers: cases, users, firms, documents, guidelines, agents, activity logs │ ├─► Cosmos DB (20+ containers, pk = customer_id / owner_id) ├─► Blob Storage (case files + knowledge base, private endpoints) │ ▼ Azure Service Bus document-ocr | document-structure | document-rescan guideline-extract | guideline-rules | agent-review │ ▼ Container Apps workers (queue-triggered, scale to zero) OCR worker → Mistral Document AI Structure worker → GPT clinical timeline extraction Guideline worker → rule extraction pipeline Agent review worker → LangGraph ReAct agent evaluations Network: VNet per environment · NAT Gateway · private endpoints for Blob + Cosmos Observability: Application Insights + Log Analytics per service

Infrastructure and Pipelines

Terraform defines the full Azure estate per environment. GitHub Actions handles everything from infra plan/apply to Docker builds, frontend deploys, and database cutover migrations.

CI/CD pipelines

  • Infrastructure — separate Terraform plan/apply workflows for dev, staging, and production with environment-specific tfvars.
  • Backend — Docker build and push to Azure Container Registry; deploy to Linux App Service with managed identity.
  • Frontend — Next.js standalone build deployed to App Service on each environment promotion.
  • Cosmos DB migrations — automated container provisioning and data import pipelines with firewall orchestration during cutover.
  • Test suite — pytest backend tests with mocked Auth0 and Blob; Jest frontend tests covering core user flows.

HIPAA-oriented network design

  • Dedicated virtual network per environment with subnet isolation for App Service, Container Apps, and private endpoints.
  • NAT Gateway for predictable outbound egress — required for allowlisting external AI and email services.
  • Private endpoints for Blob Storage and Cosmos DB — data plane traffic stays off the public internet.
  • User-assigned managed identities with RBAC — no connection strings in application code for core Azure services.
  • Custom Azure OpenAI responsible-AI content filter policy tuned for clinical document categories.

What We Used

Application

Python / FastAPI Next.js / React / TypeScript Auth0 LangGraph / LangChain Azure OpenAI Mistral Document AI Pydantic

Platform & DevOps

Azure App Service Azure Container Apps Azure Cosmos DB Azure Blob Storage Azure Service Bus Azure Container Registry Terraform GitHub Actions Application Insights

A Production-Ready Clinical SaaS on Azure

PotSolutions delivered a production-ready clinical SaaS on Azure — migrating basic case management and building the AI, guidelines, and infrastructure layers that make the product what it is today.

Full
End-to-end delivery by PotSolutions
8
Specialist AI review agents
20+
Cosmos DB containers
16
GitHub Actions workflows
AWS-to-Azure migration with AI review engine, guidelines pipeline, document intelligence, and production infrastructure delivered end-to-end
Queue-driven document pipeline — OCR, clinical structuring, and multi-agent review without Lambda timeout limits
Multi-tenant SaaS — law firms and hospitals isolated by customer ID with role-based access and per-tenant credit metering
HIPAA-oriented network — private endpoints, NAT egress, managed identities, and clinical-tuned AI content filtering
Full Terraform estate and GitHub Actions CI/CD — reproducible environments from dev through production
Audit-defensible AI reviews — every agent step and finding logged for medico-legal traceability

Building or Migrating a SaaS Platform?

Whether you’re moving off AWS, standing up a HIPAA-ready Azure estate, or need an AI pipeline with proper audit trails — we design and build production platforms from architecture through CI/CD.

Theme