Status: Research & Educational Screening Prototype
Scope: Privacy-Preserving Architecture, Data Lifecycle, and Deployer Responsibilities
Regulatory Statement: OphthalmoAI is NOT certified under HIPAA, GDPR, or India's DPDP Act. This software is provided as open-source research and educational software without warranties of regulatory compliance.
OphthalmoAI is designed around data minimization, ephemeral in-memory processing, and zero-egress offline capability:
- Zero Unconsented Persistence: By default (
PERSIST_SCANS=false), uploaded retinal images are held ephemerally in RAM buffers for the duration of the HTTP inference request and discarded upon response delivery. - Deterministic Metadata Stripping: All EXIF, TIFF, GPS, camera serial, and DICOM patient headers are stripped in memory prior to neural model ingestion.
- Local-First Privacy: Point-of-care screening can execute entirely on client workstations via ONNX Runtime Web (
frontend/src/edgeInference.js) or fully offline local backends without external cloud dependencies. - No Unconsented Third-Party Sharing: The conversational assistant runs by default via local Ollama inference (
OLLAMA_URL) or mock educational responses. Connection to third-party APIs (such as Google Gemini) is strictly opt-in via manualGEMINI_API_KEYconfiguration, and patient imagery is never sent to any conversational LLM provider.
| Data Element | Format / Type | Purpose | Default Storage | Transmission Destination |
|---|---|---|---|---|
| Retinal Fundus Image | JPEG / PNG / TIFF buffer | Disease feature classification and Grad-CAM | In-memory buffer only (PERSIST_SCANS=false) |
Processed on local server GPU/CPU; never transmitted externally |
| Reported Symptoms | Form text (pain, vision, itch, etc.) |
Symptom discordance validation | Stored in database scan record only if PERSIST_SCANS=true |
Processed locally; sanitized text sent to LLM only if chat is invoked |
| Biomarker Data | Floats (hba1c, bp, age, iop) |
Multimodal risk estimation | Stored in database only if scan persistence enabled | Processed locally on server |
| Model Predictions | Floats & strings (probabilities, confidence, uncertainty) |
Clinical decision support payload | Database scan_results table |
Returned to calling client via HTTP JSON |
| Audit Log Entry | Timestamp, action, anonymized IP, user ID | Security tracking and access audit | Database audit_logs table |
Retained on local database only |
| User Credentials | Email, Argon2/Bcrypt password hash | RBAC authentication | Database users table |
Transmitted over TLS during login only |
- Default Mode (
PERSIST_SCANS=false):- Images: Ephemeral RAM lifecycle. Freed immediately after tensor inference via garbage collection (
gc.collect()). - Scan Records: Minimal anonymous metrics stored; no raw pixels or file paths written to disk.
- Images: Ephemeral RAM lifecycle. Freed immediately after tensor inference via garbage collection (
- Opt-In Persistence Mode (
PERSIST_SCANS=true):- If enabled by institutional policy, images are stored in a local directory (
static/uploads/) or private S3/GCS bucket using randomized UUID filenames (uuid4().hex). - Filenames never contain patient names, dates of birth, or MRNs.
- Institution administrators can configure retention windows (e.g., 30-day auto-purge) via cron or S3 lifecycle rules.
- If enabled by institutional policy, images are stored in a local directory (
Institutions or individuals deploying OphthalmoAI can wipe all application data with standard commands:
# 1. Wipe local database records
python -c "import os; [os.remove(f) for f in ['ophthalmoai.db', 'test_ophthalmoai.db'] if os.path.exists(f)]"
# 2. Purge uploaded images (if persistence was enabled)
rm -rf static/uploads/*
# 3. Clean all Docker persistent volumes
docker compose down -vOphthalmoAI is NOT pre-certified for clinical deployment under:
- HIPAA (United States): Not an HIPAA-compliant service as packaged.
- GDPR (European Union): Not verified for GDPR compliance out of the box.
- DPDP Act (India): Not audited under Digital Personal Data Protection standards.
Any healthcare provider, clinical research team, or institution seeking to deploy OphthalmoAI with real human subjects must implement:
- Business Associate Agreements (BAAs): Execute BAAs with all cloud hosting providers (AWS, Azure, GCP).
- Storage Encryption at Rest: Enable AES-256 / KMS volume encryption for all database volumes and object buckets.
- Transport Layer Security (TLS 1.3): Configure strict HTTPS termination via Nginx or ingress controllers; enforce HSTS.
- Audit Trail Immutability: Forward
audit_logsto a Write-Once-Read-Many (WORM) centralized SIEM (e.g., AWS CloudWatch, Datadog, Splunk). - Informed Patient Consent: Present explicit research consent forms advising that AI outputs are investigational screening aids and do not constitute a definitive medical diagnosis.
- Local LLM Enforcement: Unset
GEMINI_API_KEYand enforceOLLAMA_URLpointing to an internal air-gapped server to prevent any data from crossing external boundaries.