Skip to content

joha546/RuralHealthChain_BD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RuralHealthChain_BD

A Healthcare Management & AI Insights System

Problem Statement

বাংলাদেশ সহ অনেক উন্নয়নশীল দেশে রোগীর ডেটা ম্যানেজমেন্ট, সঠিক মেডিকেল ইতিহাস সংরক্ষণ এবং বিভিন্ন হেলথওয়ার্কার/ডাক্তারের মধ্যে তথ্য সমন্বয় করা কঠিন

  • কাগজে-কলমে রাখা তথ্য হারিয়ে যায়।
  • রোগীর এক জায়গার তথ্য আরেক জায়গায় পাওয়া যায় না।
  • রোগী যখন অন্য হাসপাতালে যায়, তখন তার আগের ডেটা আর দেখা যায় না।
  • অফলাইনে কাজ করার প্রয়োজনীয়তা থাকলেও, সিস্টেমগুলো শুধুই অনলাইনে চলে।

Solution – RuralHealthChain_BD

RuralHealthChain_BD একটি AI-powered Healthcare Management Platform যা রোগীর ডেটা নিরাপদভাবে সংরক্ষণ, ডাক্তারের কাছে সহজে শেয়ার, এবং AI insights এর মাধ্যমে রোগীর ইতিহাস থেকে চিকিৎসকের জন্য গুরুত্বপূর্ণ পরামর্শ তৈরি করে।

Key Features:

  • Role-based access: Admin, Doctor, Health Worker, Patient
  • Patient profile management (medical history, visits, lab tests)
  • Offline-first support: কাজ অফলাইনে queue হবে এবং পরে sync হবে
  • AI health insights: Patient record থেকে চিকিৎসার পরামর্শ
  • Redis caching: দ্রুত patient stats serve করা
  • PDF export: রিপোর্ট এবং প্রেসক্রিপশন
  • BatchSync API: একসাথে একাধিক অপারেশন sync করার সুবিধা

System Architecture

Frontend (React)
  |
  |--> Service Worker (offline-first, background sync)
  |
Backend (Node.js / Express)
  |--> REST APIs (Auth, Patients, Visits, LabTests, AI Insights, Sync)
  |--> Role-based Access Middleware
  |
Database:
  |--> MongoDB Atlas (Replica + Sharded by patientId)
  |--> Redis (Cache, Redlock, Queue)
  |
Integrations:
  |--> Cloudinary / (Lab test uploads)
  |--> Nodemailer (Email notifications)

Tech Stack

Frontend:

  • React
  • Service Workers (offline support)

Backend:

  • Node.js / Express
  • JWT Authentication & Role-based Access
  • Redis (caching + distributed locking with Redlock)

Database:

  • MongoDB Atlas (Replica set + Sharding)
  • Indexes on voterId, role, patientId, region

DevOps & Infra:

  • Docker + Docker Compose
  • Cloudinary lab file storage

Installation & Setup

Clone the Repo

git clone https://github.com/joha546/RuralHealthChain_BD.git
cd RuralHealthChain_BD

Install Dependencies

npm install

Environment Variables

Create .env file:

MONGO_URI=your_mongodb_atlas_url
JWT_SECRET=your_jwt_secret
REDIS_URL=redis://localhost:6379
CLOUDINARY_URL=your_cloudinary_url
EMAIL_USER=your_email
EMAIL_PASS=your_password

Run with Docker

docker-compose up --build

Run Locally

npm run dev

API Overview

Auth

  • POST /auth/login → Login with role
  • POST /auth/register → Register patient/doctor/health_worker

Patients

  • POST /patients → Create patient
  • GET /patients/:id → Get patient profile
  • PUT /patients/:id → Update profile
  • POST /patients/:id/visits → Append new visit

Batch Sync

  • POST /sync/batch → Push offline operations to server

AI Insights

  • GET /insights/:patientId → Generate AI-based health summary

Database Strategies

  • Indexes:

    • Users: { voterId: 1 } (unique)
    • Patients: { demographics.contact: 1 }
    • Visits: { patient: 1, date: -1 }
  • Sharding:

    • Hashed patientId for even distribution
  • Replication:

    • Replica set for HA, w: majority for consistency
  • Caching:

    • Redis caching of patient stats (5 min TTL)

Future Scope

  • ML-based predictive health analytics
  • Mobile app integration for patients & health workers
  • Advanced dashboards for government/public health officials
  • Regional sharding to support country-wide deployment
  • Real-time notifications for doctors/patients

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages