Skip to content
Back to Work

Dr. Ray OBGYN Automation Suite

A comprehensive healthcare automation system built for a medical practice in California.

20
Lambda Functions
12
React Apps
10
Automation Tools
Faxes Processed

System Overview

Fax Processing Pipeline

End-to-end fax automation: receive via SRFax API → OCR with AWS Textract → AI analysis with Bedrock → structured data storage.

Document Generation

Dynamic PDF generation for medical referrals. Auto-fills provider forms (Obstetrix, Ocean Perinatal, Lamb PT) with patient data.

Appointment Scheduling

Smart scheduling system with gestational age calculations, prenatal series booking, and calendar integration.

Integration Layer

Connectors for Stripe (payments), RabbitSign (e-signatures), OpenPhone (communications), and multiple medical platforms.

Data Scrapers

Automated data extraction from Heidi Health, Clarius Cloud, Maternity Neighborhood, and Unity Screen platforms.

Analytics & Reporting

Revenue tracking with Stripe, patient communication summaries, and automated report generation.

Technology Stack

Backend

  • AWS Lambda (Node.js 20)
  • DynamoDB (DocumentClient)
  • S3 for document storage
  • SQS for queue processing
  • AWS Textract for OCR
  • AWS Bedrock for AI analysis

Frontend

  • React 19 + Vite
  • Tailwind CSS
  • Lucide React icons
  • AWS Amplify deployment

Integrations

  • SRFax API (fax transmission)
  • Stripe (payments)
  • RabbitSign (e-signatures)
  • OpenPhone (communications)
  • Make.com (workflow automation)

Automation

  • Playwright (browser automation)
  • Puppeteer (legacy scrapers)
  • Playwright Test framework
  • Webhooks for real-time sync

Key Features

Intelligent Fax Processing

Incoming faxes are automatically processed: cover pages removed, OCR extracted, AI-analyzed for content classification, and routed to appropriate workflows. The system handles everything from lab results to insurance documents.

Dynamic Document Generation

Medical referral forms are auto-populated with patient data, calculated fields (age, gestational age), and provider-specific formatting. Generated documents can be faxed directly from the system with status tracking.

Smart Appointment Scheduling

Prenatal appointment series are calculated based on gestational age, with automatic scheduling rules (every 4 weeks until 28w, every 2 weeks until 36w, weekly after). Finds first available slots across multiple locations.

Comprehensive Analytics

Real-time revenue tracking with Stripe integration, patient communication summaries combining OpenPhone and fax data, and automated daily/weekly reports delivered to staff.

Architecture Highlights

The system is built on AWS serverless architecture for scalability and cost-efficiency. Lambda functions handle discrete tasks—fax retrieval, document processing, AI analysis— triggered by API Gateway, S3 events, SQS messages, or direct invocation.

Data flows through DynamoDB as the system of record, with S3 for document storage. Frontend applications communicate via RESTful APIs, with real-time updates via webhooks for status changes.

All components follow consistent patterns: standardized error handling, comprehensive logging, CORS configuration for browser access, and environment-based configuration management. The entire system is documented with AGENTS.md files for AI-assisted maintenance and development.