Project Introduction & Vision
Relevant source files
The following files were used as context for generating this wiki page:
- README.md
- readmes/FINAL_SUMMARY.md
- readmes/ARCHITECTURE_OVERVIEW.md (Referenced via documentation indices)
- deployment/HOSPITAL-DEPLOYMENT-GUIDE.md
- AGENTS.md
- readmes/README_VOICE_VITALS.md
- openMRS-main/README.md
OpenMRS AI EHR is an advanced, AI-assisted Electronic Health Record (EHR) system designed to streamline clinical workflows through intelligent automation. The project integrates traditional medical record-keeping with modern Artificial Intelligence capabilities, specifically focusing on voice-to-vitals recording, automated transcription, and structured data extraction. The vision is to reduce the administrative burden on clinical staff, such as nurses and doctors, by allowing them to record patient information naturally via voice and have it automatically processed into structured data within the OpenMRS ecosystem.
The system is built upon a modular architecture consisting of the OpenMRS Core, a React-based frontend patient chart, and a specialized FastAPI AI backend. By leveraging cloud-based AI services like Sarvam AI for transcription and Google Gemini for natural language processing (NLP), the project provides a production-ready solution for high-accuracy medical documentation and vitals management.
Sources: README.md:3-8, readmes/FINAL_SUMMARY.md:3-10, readmes/README_VOICE_VITALS.md:3-12
System Architecture & Layers
The project is structured into three distinct technical layers that collaborate to provide the AI-powered EHR experience. These layers communicate via REST APIs and are orchestrated using Docker for consistent deployment across hospital environments.
Core Component Breakdown
| Layer | Location | Technology Stack | Purpose |
|---|---|---|---|
| OpenMRS Backend | o3-docker-compose/ | Java, Spring, MariaDB | Core EHR REST API, clinical data storage, and patient database management. |
| Frontend Chart | openmrs-esm-patient-chart-main/ | React, TypeScript, Carbon Design | Patient chart SPA providing the user interface for clinicians. |
| AI/ML Backend | openMRS-main/ | Python, FastAPI | Specialized services for voice transcription, OCR, and vitals extraction. |
| EHR Dashboard | ehr-dashboard-app/ | React, Vite | Consolidated view for doctors to see patient overviews and AI summaries. |
Sources: README.md:14-20, AGENTS.md:7-12, deployment/HOSPITAL-DEPLOYMENT-GUIDE.md:20-29
High-Level System Flow
The following diagram illustrates the interaction between the hospital staff, the frontend interfaces, and the various backend services.
The diagram shows the data flow from clinical input through the AI processing pipeline and finally to persistent storage in the OpenMRS database.
Sources: deployment/HOSPITAL-DEPLOYMENT-GUIDE.md:32-44, readmes/README_VOICE_VITALS.md:105-120
Vision: The Voice Vitals Feature
A central pillar of the project's vision is the Voice Vitals Recording system. This feature represents the primary innovation of the project, moving away from manual data entry toward an AI-assisted capture model.
Functional Workflow
Nurses utilize a dedicated recording widget within the patient chart to capture vital signs spoken in natural language. The system handles the entire lifecycle from raw audio capture to form auto-population.
- Capture: Audio is recorded via the Web Audio API directly in the browser.
- Transcription: The audio blob is sent to the AI backend, which utilizes Sarvam AI for speech-to-text conversion.
- Extraction: The resulting transcript is processed by Google Gemini, which identifies specific vitals (e.g., Temperature, BP, Heart Rate).
- Mapping & Population: Extracted data is mapped to the OpenMRS form schema, including automatic unit conversions (e.g., Fahrenheit to Celsius).
Sources: readmes/FINAL_SUMMARY.md:112-135, readmes/README_VOICE_VITALS.md:140-155
Structured Data Extraction Lifecycle
This sequence diagram details the backend orchestration required to convert a spoken sentence into structured form data.
Sources: readmes/FINAL_SUMMARY.md:112-135, readmes/README_VOICE_VITALS.md:105-120
Technical Standards & Quality Vision
The project adheres to strict technical guidelines to ensure it is production-ready for hospital environments. The vision for code quality includes:
- Type Safety: 100% TypeScript coverage in new frontend components and Python type hints in the AI backend.
- Unit Conversion Intelligence: Automatic handling of unit conversions (F→C, lbs→kg, in→cm) and Blood Pressure parsing (systolic/diastolic splitting).
- User Control: AI is assistive, not authoritative. The system allows clinicians to review and edit all auto-populated fields before saving.
- Resiliency: Comprehensive error handling at all layers, including microphone permission management and API failure recovery.
Sources: readmes/FINAL_SUMMARY.md:150-180, readmes/README_VOICE_VITALS.md:160-185, openMRS-main/README.md:25-35
Deployment & Scalability
The vision for the project's deployment is based on a "container-first" approach. This ensures that the complex stack of Java, Python, and Node.js components can be deployed consistently in various hospital settings.
- Environment Orchestration: Docker Compose is used to manage the lifecycle of all 7+ microservices.
- Metadata Stability: Custom medical concepts and encounter types are managed through idempotent Python scripts and deterministic UUIDs, ensuring that different installations remain compatible.
- Hardware Flexibility: While AI-powered, the system runs against cloud APIs, meaning high-end GPUs are not required on-site, allowing for deployment on standard hospital server hardware.
Sources: deployment/HOSPITAL-DEPLOYMENT-GUIDE.md:65-80, deployment/HOSPITAL-DEPLOYMENT-GUIDE.md:150-165, README.md:100-115
Conclusion
The Project Introduction & Vision for the OpenMRS AI EHR centers on the successful integration of modern AI tools into the established OpenMRS framework. By focusing on critical clinical tasks like vitals recording and providing a robust, containerized architecture, the project aims to modernize patient care delivery through intelligent automation while maintaining the high standards of data integrity required in healthcare.