Back to projects

LLM healthcare workflow

CarPlan

A production-oriented application that validates structured patient data and asynchronously generates care plans for specialty pharmacies.

Healthcare AIAsync JobsValidationMulti-LLM
Role
AI / Full-Stack Engineer
Domain
Specialty Pharmacy
Goal
Reduce 20–40 minutes of manual work
02 · ASYNC WORKFLOW

Validation before generation

HTTP stays responsive while generation runs safely in the background.

CLIENTReact + VitePatient & Order Forms
DOMAIN APIDjango RESTValidation · Duplicates
BROKERRedis QueueAsync job hand-off
WORKERCeleryRetry · Status · Prompt
MODELLLM ProviderClaude · OpenAI · Mock
SOURCE OF TRUTHPostgreSQLPatients · Orders · Care Plans · Status
① API writes validated order② Worker reads order context③ Worker persists generated care plan
MRN / NPI validationDuplicate detectionStructured output contractRetries + observable status

Problem and goal

Care plans are required for compliance and reimbursement, yet they consume substantial pharmacist time. CarPlan structures data intake, validates medical and administrative fields, and generates a consistently formatted draft for professional review.

My contribution

I designed the end-to-end workflow: React forms, REST API, domain models, duplicate and field validation, asynchronous LLM jobs, provider abstraction, downloads, and reporting exports.

System architecture

  • React and Vite for guided data entry and generation status
  • Django REST Framework with separate patient, provider, order, and care-plan domains
  • Celery and Redis decouple LLM calls from HTTP requests
  • PostgreSQL for transactional data and traceable status changes
  • Strategy and factory patterns for Claude, OpenAI, and mock providers

Key engineering decisions

  • Exact duplicates are blocked while reviewable conflicts become explicit warnings.
  • LLM output must follow required sections for problems, SMART goals, interventions, and monitoring.
  • Async execution, retries, and status endpoints keep the UI responsive and failures visible.

What this project demonstrates

  • LLM integration inside a real business workflow
  • Clean domain boundaries and testable services
  • Validation before generation rather than blind prompting
  • Interchangeable model providers and containerized delivery

Technologies

PythonDjangoDjango RESTCeleryRedisPostgreSQLReactViteDockerTerraformAWS
View code on GitHub