Case Study
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.
The Challenge
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.
The Migration
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.
| Layer | Before (AWS) | After (Azure) |
|---|---|---|
| Backend | Node.js Lambda (SAM / CloudFormation) | Python FastAPI on Linux App Service (Docker via ACR) |
| Frontend | Next.js on S3 / CloudFront | Next.js on Linux App Service (standalone build) |
| Database | DynamoDB | Azure Cosmos DB for NoSQL (tenant-partitioned containers) |
| File storage | S3 | Azure Blob Storage (private endpoints) |
| Async processing | EventBridge + Lambda | Azure Service Bus + Container Apps workers (scale to zero) |
| Auth | Auth0 JWT custom authorizer | Auth0 (unchanged — JWKS middleware in FastAPI) |
| Infrastructure | CloudFormation / SAM | Terraform (dev, stage, prod environments) |
| CI/CD | Manual Lambda ZIP deploys | GitHub Actions — infra plan/apply, Docker backend, frontend, DB migrations |
| AI | — | Azure OpenAI + Mistral Document AI OCR; LangGraph multi-agent reviews |
What We Built
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.
DevOps & Security
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.
Technology
What We Used
Application
Platform & DevOps
The Result
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.
Similar Challenge?
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.