Med-SEAL Suite

Overview

  • Live Demo
    • Quick Access
    • Login Credentials
      • AI Dashboard / SSO Portal
      • OpenEMR (Clinical EMR)
      • Medplum Admin Console
      • Orthanc PACS
    • Recommended Demo Walkthrough
      • For Clinicians / Judges
      • For Technical Reviewers
      • Patient Portal (iOS)
    • Service Health
  • Architecture
    • System Layers
    • Data Flow
    • Technology Stack
    • Network Topology
    • Deployment Diagram
    • Data Flow Diagram
  • Getting Started
    • Prerequisites
    • Clone the Repository
    • Start All Services
    • Access Points
    • Seed Sample Data
    • Verify the Stack
    • Stop & Reset

Components

  • OpenEMR
    • Role in Med-SEAL
    • Access
    • Docker Configuration
    • Med-SEAL Customisations
      • AI Chat Widget
      • Med-SEAL Theme
    • Standards Compliance
    • Key Features
  • Medplum
    • Role in Med-SEAL
    • Access
    • Docker Configuration
    • Configuration
    • FHIR API Usage
      • Common Endpoints
      • Bulk Operations
    • Admin App Features
    • Resource Types Used
  • Patient Portal Native
    • Role in Med-SEAL
    • Technology Stack
    • Project Structure
    • Getting Started
      • Prerequisites
      • Install Dependencies
      • Run on iOS Simulator
      • Run on Android Emulator
      • Development Server (Expo Go)
    • CORS Proxy
    • FHIR Integration
    • Key Features
      • AI Chat
      • Medication Management
      • Vitals Dashboard
      • Appointments
    • Building for Production
      • iOS
      • Android
  • SSO & Authentication
    • Role in Med-SEAL
    • Architecture
      • Entity-Relationship Diagram
      • Authentication Flow (Sequence Diagram)
    • SSO Database
      • Schema
    • OpenEMR Sync
      • Sync Configuration
    • API Endpoints
    • Admin Panel
    • Security Notes

AI Platform

  • AI Agents Overview
    • Agent Roster
      • Agent Class Diagram
    • Agent Descriptions
      • V1 — Med-SEAL V1 (Base Model)
      • A1 - Companion Agent
      • A2 - Clinical Reasoning Agent
      • A3 - Nudge Agent
      • A4 - Lifestyle Agent
      • A5 - Insight Synthesis Agent
      • A6 - Measurement Agent
    • Orchestration
    • SEA-LION Guard
      • Input Gate
      • Output Gate
      • Decisions
    • Feature-to-Agent Matrix
    • LLM Configuration
  • Med-SEAL V1 Clinical Agent
    • What is Med-SEAL V1?
    • Which Agents Use It?
    • Current vs Target Deployment
    • Related Pages
  • AI Agent — Implementation & GCP Cloud Run Deployment
    • 1. Implementation Overview
      • 1.1 Technology Stack
      • 1.2 Agent Roster
      • 1.3 LLM Backend — Dual Mode
      • 1.4 API Endpoints
      • 1.5 External Dependencies
    • 2. Project Structure
    • 3. GCP Cloud Run Deployment
      • 3.1 GCP Resources
      • 3.2 Environment Variables
      • 3.3 Startup Command
      • 3.4 Deployment Steps
      • 3.5 Dockerfile
      • 3.6 Requirements (Deployment)
    • 4. Architecture Diagram
    • 5. Monitoring & Troubleshooting
      • 5.1 Logs
      • 5.2 Common Issues
      • 5.3 Scaling
    • 6. Live Deployment URLs
    • 7. Related Pages
  • GCP Deployment Guide
    • Architecture Overview
    • Cloud Run Deployment
      • Prerequisites
      • Step 1: Authenticate & Set Project
      • Step 2: Enable Required APIs
      • Step 3: Deploy from Source
      • Step 4: Verify Deployment
      • Updating Environment Variables
    • Current Deployment
      • Cloud Run Service
      • GKE Cluster (medseal-cluster)
      • GKE Services (namespace: medseal)
    • Environment Variables
    • API Endpoints
      • Patient App Surface
      • Clinician Surface (OpenEMR)
      • System & Admin
    • Troubleshooting
      • Health Check Shows medplum: unreachable
      • Health Check Shows vllm: unreachable
      • Redeploying After Code Changes
      • Viewing Logs
  • Feature Specifications (F01-F18)
    • Implementation Status Summary
    • Tier 1: Must Be Functional in Prototype
      • F01 - MERaLiON / SEA-LION Chat Interface
      • F02 - Medication Management + Adherence Tracking
      • F03 - Smart Nudge Engine
      • F04 - Conversational PROs (Patient-Reported Outcomes)
      • F05 - Wearable Data Ingestion
      • F06 - Patient Insight Summary for Clinician
    • Tier 2: Strengthens Personalisation + Impact
      • F07 - Dietary + Lifestyle Engine (SEA-Culturally Aware)
      • F08 - Outcome Measurement Framework
      • F09 - Adherence + Biometric Analytics Dashboard
      • F10 - Escalation Pathways (Tiered Clinician Alerts)
      • F11 - Behavioral Anticipation Model
    • Tier 3: Polish + Differentiation
      • F12 - Appointment Orchestrator (Pre/Post Visit)
      • F13 - Caregiver Mode (Linked Family View with Consent)
      • F14 - Adaptive Health Education (Teachable Moments)
      • F15 - Multi-Source Data Fusion Timeline
      • F16 - Readmission Risk + Event Tracking
      • F17 - A/B Evaluation Framework (Synthetic Cohorts)
      • F18 - Patient Satisfaction + NPS Tracking
    • Code Map
  • Med-SEAL V1 Technical Report
    • 1. What is Med-SEAL V1?
    • 2. Model Card
    • 3. Why Qwen3-VL-8B?
    • 4. Fine-Tuning: From Qwen3-VL to Med-SEAL-V1
      • 4.1 Training Objective
      • 4.2 Training Data Domains
      • 4.3 Output Format
    • 5. Model Serving Configuration
      • 5.1 Production Endpoint (Target)
      • 5.2 Current Production Substitute
      • 5.3 Infrastructure Requirements
    • 6. How the Agent System Uses Med-SEAL V1
    • 7. Clinical Capabilities of Med-SEAL-V1
      • 7.1 Drug Interaction Checking
      • 7.2 Lab Result Interpretation
      • 7.3 Multi-Condition Clinical Reasoning
      • 7.4 Pre-Visit Brief Generation
      • 7.5 Safety Constraints (Built into the Model)
    • 8. Deployment Status
    • 9. Relationship to V2
    • 10. References

Operations & Reference

  • Deployment
    • Docker Compose Overview
    • Starting the Stack
    • Health Checks
    • Environment Variables
      • AI Service
      • OpenEMR
    • Volumes
    • Networking
    • Stopping & Resetting
    • Cloud Deployment (GCP)
      • Current Live Deployments
    • Production Considerations
  • GKE Cloud Deployment
    • Infrastructure Overview
    • Deployment Steps
      • Step 1: Bootstrap Infrastructure
      • Step 2: Configure Secrets
      • Step 3: Provision Databases
      • Step 4: Build and Push Custom Images
      • Step 5: Deploy to Kubernetes
      • Step 6: Verify Ingress
    • Kubernetes Manifests
    • Ingress Routing
    • GKE Architecture Diagram
  • Scripts Reference
    • Data Loading & Seeding
      • load-synthea.js
      • seed-medplum-patient.js
      • generate-clinical-notes.js
      • clean-patient-names.js
    • Synchronisation
      • sync-medplum-openemr.js
      • sync-medplum-openmrs.js
      • sync-patients-full.js
      • sync-batch.js
      • sync-remaining.js
    • Radiology & DICOM
      • integrate-radiology.js
      • generate-dicom-3d.py
    • Simulation
      • simulate-busy-hospital.js
    • Synthea
  • Standards Compliance
    • Standards Matrix
    • FHIR R4 Compliance
      • Capabilities
      • SMART on FHIR
    • Terminology Bindings
    • Security Architecture
  • FHIR Resource Inventory
    • Patient Identity
    • Clinical Data (Read from EMR)
    • Medication Tracking (Write)
    • Communication
    • Assessments (Write)
    • Clinical Output (Write)
    • Goals & Planning
    • Measurement
    • Devices & Wearables
    • Appointments
    • Audit & Provenance
    • Education
    • System
  • Contributing
    • Getting Started
    • Development Setup
    • Project Structure
    • Code Style
    • Commit Messages
    • Pull Request Guidelines
    • Documentation
    • Reporting Issues
    • License

User Guide

  • User Guide
    • Logging In with Single Sign-On
      • Creating Your Account
      • Logging In
      • Resetting Your Password
      • Session Timeout
      • Troubleshooting
    • Patient Portal Native
      • Installing the App
      • App Overview
      • Home Screen
      • Health Records
      • Notifications
      • Privacy and Data
    • OpenEMR Clinician Guide
      • Accessing OpenEMR
      • Dashboard Overview
      • Patient Management
      • Clinical Documentation
      • Prescribing Medications
      • Scheduling Appointments
      • AI Clinical Brief (Pre-Visit Summary)
      • Billing and Coding
      • Logging Out
    • AI Chat and Health Insights
      • Starting a Chat
      • What You Can Ask
      • Languages
      • Health Insights
      • Pre-Visit Summaries
      • Safety and Limitations
      • Feedback
    • Medication Tracking
      • Your Medication Schedule
      • Confirming a Dose
      • Missed Doses
      • Adherence Score
      • Medication Details
      • Reminders
      • Viewing History
    • Appointments
      • Viewing Upcoming Appointments
      • Appointment Details
      • Pre-Visit Summary
      • Appointment Reminders
      • Past Appointments
      • Requesting Appointments
    • Vitals and Biometrics
      • Supported Measurements
      • Logging a Reading Manually
      • Viewing Trends
      • Wearable Integration
      • Alerts and Notifications
      • Deleting a Reading
  • Logging In with Single Sign-On
    • Creating Your Account
    • Logging In
      • Patient Portal Native (Mobile App)
      • OpenEMR (Clinician Web)
      • AI Dashboard (Admin Web)
    • Resetting Your Password
    • Session Timeout
    • Troubleshooting
  • Patient Portal Native
    • Installing the App
    • App Overview
    • Home Screen
    • Health Records
    • Notifications
    • Privacy and Data
  • OpenEMR Clinician Guide
    • Accessing OpenEMR
    • Dashboard Overview
    • Patient Management
      • Searching for a Patient
      • Registering a New Patient
    • Clinical Documentation
      • Recording an Encounter
      • Ordering Labs and Procedures
    • Prescribing Medications
    • Scheduling Appointments
    • AI Clinical Brief (Pre-Visit Summary)
    • Billing and Coding
    • Logging Out
  • AI Chat and Health Insights
    • Starting a Chat
    • What You Can Ask
    • Languages
    • Health Insights
    • Pre-Visit Summaries
    • Safety and Limitations
    • Feedback
  • Medication Tracking
    • Your Medication Schedule
    • Confirming a Dose
    • Missed Doses
    • Adherence Score
    • Medication Details
    • Reminders
    • Viewing History
  • Appointments
    • Viewing Upcoming Appointments
    • Appointment Details
    • Pre-Visit Summary
    • Appointment Reminders
    • Past Appointments
    • Requesting Appointments
  • Vitals and Biometrics
    • Supported Measurements
    • Logging a Reading Manually
    • Viewing Trends
    • Wearable Integration
      • Apple Health (iOS)
      • Google Health Connect (Android)
    • Alerts and Notifications
    • Deleting a Reading

Developer Guide

  • Developer Guide
    • Environment Setup
      • Prerequisites
      • Repository Clone
      • Docker Compose Stack
      • AI Service (Local Development)
      • Patient Portal Native (Mobile Dev)
      • AI Frontend (Admin Dashboard)
      • Seeding Data
      • Connecting to Services
      • Rebuilding Custom Images
    • FHIR Data Model
      • Key FHIR Resources
      • Reading FHIR Data
      • Writing FHIR Data
      • Coding Systems
      • Med-SEAL Conventions
      • FHIR Subscriptions
    • AI Service API Reference
      • Request Lifecycle (Sequence Diagram)
      • Base URL
      • Authentication
      • Health Check
      • Chat (Companion Agent A1)
      • Nudges (Nudge Agent A3)
      • Pre-Visit Summary (Insight Agent A5)
      • Adherence Metrics (Measurement Agent A6)
      • Error Responses
    • Adding a New AI Feature
      • Overview
      • Step 1: Define Your Feature
      • Step 2: Create the Route
      • Step 3: Implement the Handler
      • Step 4: Add Guard Configuration
      • Step 5: Update the Feature Matrix
      • Step 6: Connect to the Patient App
      • Step 7: Test
    • Testing
      • Overview
      • AI Service Tests
      • Patient Portal Native Tests
      • Testing FHIR Integrations
      • Smoke Testing the Full Stack
      • Continuous Integration
    • Extending OpenEMR
      • Extension Philosophy
      • Project Layout
      • Adding a Custom Module
      • Using the OpenEMR EventDispatcher
      • Calling the Med-SEAL AI Service from OpenEMR
      • Database Changes
      • Updating OpenEMR
      • ACL (Access Control)
  • Environment Setup
    • Prerequisites
    • Repository Clone
    • Docker Compose Stack
    • AI Service (Local Development)
    • Patient Portal Native (Mobile Dev)
    • AI Frontend (Admin Dashboard)
    • Seeding Data
    • Connecting to Services
    • Rebuilding Custom Images
  • FHIR Data Model
    • Key FHIR Resources
      • FHIR Domain Model (Class Diagram)
    • Reading FHIR Data
      • Using the Medplum TypeScript SDK
      • Raw FHIR REST
    • Writing FHIR Data
      • Creating a Resource
      • Updating a Resource
    • Coding Systems
    • Med-SEAL Conventions
    • FHIR Subscriptions
  • AI Service API Reference
    • Request Lifecycle (Sequence Diagram)
    • Base URL
    • Authentication
    • Health Check
      • GET /health
    • Chat (Companion Agent A1)
      • POST /chat
    • Nudges (Nudge Agent A3)
      • GET /nudges/:patientId
      • POST /nudges/:patientId/dismiss
    • Pre-Visit Summary (Insight Agent A5)
      • POST /patients/:id/previsit-summary
    • Adherence Metrics (Measurement Agent A6)
      • GET /metrics/:patientId/adherence
    • Error Responses
  • Adding a New AI Feature
    • Overview
    • Step 1: Define Your Feature
    • Step 2: Create the Route
    • Step 3: Implement the Handler
    • Step 4: Add Guard Configuration
    • Step 5: Update the Feature Matrix
    • Step 6: Connect to the Patient App
    • Step 7: Test
  • Testing
    • Overview
    • AI Service Tests
      • Run All Tests
      • Run with Coverage
      • Unit Tests
      • Integration Tests
    • Patient Portal Native Tests
      • Unit and Component Tests
      • E2E Tests (Detox)
    • Testing FHIR Integrations
    • Smoke Testing the Full Stack
    • Continuous Integration
  • Extending OpenEMR
    • Extension Philosophy
    • Project Layout
    • Adding a Custom Module
    • Using the OpenEMR EventDispatcher
    • Calling the Med-SEAL AI Service from OpenEMR
    • Database Changes
    • Updating OpenEMR
    • ACL (Access Control)
Med-SEAL Suite
  • Developer Guide
  • View page source

Developer Guide

This guide is for engineers building on, extending, or contributing to the Med-SEAL Suite. It assumes familiarity with TypeScript, Docker, and REST APIs.


  • Environment Setup
    • Prerequisites
    • Repository Clone
    • Docker Compose Stack
    • AI Service (Local Development)
    • Patient Portal Native (Mobile Dev)
    • AI Frontend (Admin Dashboard)
    • Seeding Data
    • Connecting to Services
    • Rebuilding Custom Images
  • FHIR Data Model
    • Key FHIR Resources
    • Reading FHIR Data
    • Writing FHIR Data
    • Coding Systems
    • Med-SEAL Conventions
    • FHIR Subscriptions
  • AI Service API Reference
    • Request Lifecycle (Sequence Diagram)
    • Base URL
    • Authentication
    • Health Check
    • Chat (Companion Agent A1)
    • Nudges (Nudge Agent A3)
    • Pre-Visit Summary (Insight Agent A5)
    • Adherence Metrics (Measurement Agent A6)
    • Error Responses
  • Adding a New AI Feature
    • Overview
    • Step 1: Define Your Feature
    • Step 2: Create the Route
    • Step 3: Implement the Handler
    • Step 4: Add Guard Configuration
    • Step 5: Update the Feature Matrix
    • Step 6: Connect to the Patient App
    • Step 7: Test
  • Testing
    • Overview
    • AI Service Tests
    • Patient Portal Native Tests
    • Testing FHIR Integrations
    • Smoke Testing the Full Stack
    • Continuous Integration
  • Extending OpenEMR
    • Extension Philosophy
    • Project Layout
    • Adding a Custom Module
    • Using the OpenEMR EventDispatcher
    • Calling the Med-SEAL AI Service from OpenEMR
    • Database Changes
    • Updating OpenEMR
    • ACL (Access Control)
Previous Next

© Copyright 2025–2026, IgoyAI.

Built with Sphinx using a theme provided by Read the Docs.