Skip to content

About

a software for hospitals that track and manage sales purely on ai algorithms.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

🏥 MediCore AI - Intelligent Hospital Management System

MediCore AI is a next-generation, AI-native Hospital Management System (HMS) designed to streamline clinical, administrative, and supply chain operations. Unlike traditional EHR or ERP systems, MediCore leverages pure machine learning and deep learning algorithms to predict patient inflow, optimize supply chains, and detect financial anomalies in real-time.

📖 Table of Contents


🚀 Key Features

1. AI-Powered Patient Management

  • Predictive Admissions: ML models (LSTM/XGBoost) forecast daily ER and ward admissions based on historical data, weather, and local epidemiology.
  • Risk Stratification: Real-time triage scoring using anomaly detection to identify high-risk patients before they deteriorate.
  • Smart Scheduling: Automated appointment booking that minimizes wait times and maximizes physician availability.

2. Intelligent Sales & Billing

  • Anomaly Detection: Isolated Forest algorithms flag unusual billing codes, insurance mismatches, or duplicate invoices to prevent revenue leakage.
  • Dynamic Pricing: Adjusts service costs based on insurance provider contracts and real-time operational costs.
  • Demand Forecasting: Predicts which medical services (e.g., surgeries, scans) will see high demand in the upcoming quarter.

3. Supply Chain & Inventory Optimization

  • Replenishment Prediction: ARIMA and Prophet models forecast usage of consumables (gloves, syringes, PPE) to automate purchase orders.
  • Supplier Scoring: NLP analyzes supplier contracts and historical delivery times to recommend the best vendor.
  • Waste Reduction: Identifies expiring medicines and suggests prioritized usage pathways to reduce waste.

🧠 AI Architecture

This platform is built on a Pure-AI Kernel—every feature relies on data-driven decisions rather than static rules.

Module Algorithm Purpose
Patient Flow XGBoost + LSTM Time-series forecasting of bed occupancy.
Clinical Risk Isolation Forest Detects outliers in vital signs/lab results.
Billing Fraud Autoencoders (Neural Nets) Reconstructs billing data; high reconstruction error = fraud.
Inventory Prophet (Meta) Seasonal decomposition for supply demand.
NLP Extractor BERT (Fine-tuned) Extracts structured data from physician notes.

🛠️ Tech Stack

  • Backend: Python 3.11 (FastAPI)
  • AI/ML: PyTorch, Scikit-learn, XGBoost, Prophet, HuggingFace Transformers
  • Database: PostgreSQL (Structured) + MongoDB (Unstructured notes)
  • Vector DB: Pinecone (for semantic search in medical history)
  • Orchestration: Apache Airflow (for retraining pipelines)
  • Frontend: React (TypeScript) + TailwindCSS
  • Infra: Docker + Kubernetes (Azure/AWS)

💻 Installation

Prerequisites

  • Python 3.11+
  • Docker & Docker Compose
  • Node.js 20+
  • PostgreSQL 15

1. Clone the repository

git clone https://github.com/yourorg/medicore-ai.git
cd medicore-ai

2. Set up the Backend

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your database credentials and API keys

3. Set up the Frontend

cd frontend
npm install

4. Run with Docker (Recommended)

docker-compose up --build

This spins up the API, Postgres, Redis, and the AI model serving layer.


⚙️ Configuration

Critical Environment Variables:

DATABASE_URL=postgresql://user:pass@localhost:5432/medicore
MODEL_REGISTRY_PATH=/models/registry
REDIS_URL=redis://localhost:6379
SECRET_KEY=your_jwt_secret
MLFLOW_TRACKING_URI=http://localhost:5000

Model Retraining Schedule: The models automatically retrain daily at 02:00 AM via Airflow DAGs. To manually trigger:

airflow dags trigger retrain_patient_flow

📊 Usage

Access the Dashboard

Once running, navigate to:

  • User Interface: http://localhost:3000
  • API Docs: http://localhost:8000/docs
  • ML Monitoring (MLflow): http://localhost:5000

API Endpoint Examples

# Predict bed occupancy for next 7 days
POST /api/v1/predict/beds
{
  "hospital_id": "H001"
}

# Detect fraudulent claims in billing
POST /api/v1/fraud/detect
{
  "invoice_id": "INV-90210"
}

# Restock recommendation
GET /api/v1/supplies/restock?ward_id=3

🏗️ System Architecture

graph TD
    UI[React Frontend] --> API[FastAPI Gateway]
    API --> Auth[JWT Auth]
    API --> Cache[Redis Cache]
    API --> DB[(PostgreSQL)]
    API --> ML[Model Serving Layer]
    
    ML --> LSTM[Patient Flow LSTM]
    ML --> FB[Prophet Inventory]
    ML --> AE[Autoencoder Fraud]
    
    DB --> ETL[ETL Pipelines]
    ETL --> Raw[Raw Data Lake]
    Raw --> Train[Retraining Triggers]
    Train --> Registry[MLflow Registry]
    Registry --> ML
Loading

🗺️ Roadmap

  • MVP with Patient Flow and Inventory (Q1)
  • Billing Fraud Detection Module (Q2)
  • GPT-based Clinical Assistant: Summarizing patient history for doctors (Q3)
  • Federated Learning: Enabling hospitals to train models without sharing sensitive data (Q4)

🤝 Contributing

We welcome contributions! Please read our Contributing Guidelines.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


📧 Contact

AI Engineering Lead: john.doe@medicore.com
Project Repository: [github.com/theinnsidecoder]

About

a software for hospitals that track and manage sales purely on ai algorithms.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages