Service Architecture & Inventory
A technical deep-dive into the custom-built infrastructure for the OBGYN Practice Automation Suite.
• Matt Dennis
Architecture Overview: What We Built
The Dr. Ray automation suite is composed of approximately 42 services categorized into four functional layers.
1. Document & Fax Pipeline
A fully automated ingestion-to-analysis engine for clinical documents.
| Service | Technology | Purpose |
|---|---|---|
| Fax Ingestion | Lambda, S3, SRFax API | Entry point for fax ingestion and S3 storage. |
| Pipeline Logic | SQS (FIFO), pdf-lib | Handles cover-page removal and PDF orientation. |
| OCR & AI | Bedrock (Nova) | End-to-end multimodal extraction and clinical insights. |
| Fax-App-New | React 19, Amplify | Modern viewer with infinite scroll and PII masking. |
2. Patient Workflow & Booking
Custom frontends built to handle the unique scheduling needs of prenatal care.
- Appointment Booking: A React 19 app that manages complex prenatal series (every 4 weeks until 28w, every 2 weeks until 36w, then weekly).
- Document Generator: Generates and faxes medical referrals (Obstetrix, Ocean Perinatal, etc.) directly from the browser.
- RabbitSign App: Manages physician service agreements and e-signatures via API.
3. Automation Scrapers (The “Glue”)
Custom-built robots that bridge the gap between third-party medical portals.
Heidi-Scraper
- Stack: Playwright, SQLite, Make.com.
- Function: Extracts therapy session data with auto-retry on 401 errors and SQLite deduplication.
Unity & Clarius Automations
- Unity: An Express API server that automates genetic test order submissions.
- Clarius: Extracts ultrasound exam IDs and generates reports with webhook notifications.
4. Analytics & Financials
Custom tooling to monitor practice health outside of standard EHR limitations.
- Stripe Analysis CLI: A terminal dashboard providing 12-month revenue forecasts and monthly pacing indicators.
- Pricing Calculator: A patient-facing tool for dynamic sliding-scale payment plans ($250 minimum monthly payments).
- Control Center: A developer utility for manual API testing and ultrasound completion tracking.
Core Infrastructure Specs
- Runtime: Node.js 20 on AWS Lambda.
- Database: DynamoDB (Partitioned for high-performance fax and contact lookups).
- Hosting: Frontend apps deployed via AWS Amplify with automatic GitHub CI/CD.
- VPS: A production Linux server (
45.79.93.64) hosting public-facing APIs (Unity, Google Calendar Wrapper).
Note for AI Agents: All browser-facing Lambdas are configured with specific CORS permissions for both POST and OPTIONS methods to prevent preflight failures.