Skip to content

Sundaram-Katare/Bennet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SehatDori πŸͺ’

Smart Maternal Care Powered by Graph Intelligence


πŸš€ Overview

Sehat Dori is a next-generation maternal healthcare platform designed to save lives in rural areas by intelligently connecting patients, ASHA workers, hospitals, and risk factors using a graph-based approach.

Every year, thousands of maternal deaths occur due to:

  • ❌ Missed checkups
  • ❌ Poor tracking of patient history
  • ❌ Lack of real-time risk identification
  • ❌ Fragmented healthcare systems

πŸ‘‰ Sehat Dori solves this using relationship-driven intelligence.


UI

image image

πŸ’‘ Key Idea

Instead of storing healthcare data in isolated tables, we model it as a connected graph:

Patient β†’ Visits β†’ Hospital  
       β†’ Risk Factors  
       β†’ ASHA Worker  

This allows us to:

  • Detect high-risk pregnancies in real-time
  • Enable priority-based care
  • Provide actionable insights to field workers

πŸ—οΈ Tech Stack

⚑ Core Technologies

  • Frontend: React + Tailwind CSS + Framer Motion
  • Backend: Node.js + Express
  • Graph Database: TigerGraph + MongoDB
  • Authentication: JWT

πŸ”— Architecture

React App (ASHA Dashboard)
        ↓
Node.js Backend (API Layer)
        ↓
TigerGraph (Risk Engine)
        ↓
Insights β†’ Alerts β†’ Actions 🚨

πŸ”₯ Features

🚨 Real-Time Risk Detection

  • Identifies high-risk pregnancies instantly

  • Combines multiple factors:

    • Hemoglobin levels
    • Missed visits
    • Medical conditions

πŸ“± Doctor Dashboard

  • Simple, mobile-friendly UI

  • Shows:

    • High-risk patients
    • Priority alerts
    • Action recommendations

πŸ” Secure & Scalable

  • JWT-based authentication

⚑ Fast Decision Making

  • Graph queries eliminate complex joins
  • Enables real-time healthcare decisions


🧠 How TigerGraph Powers Sehat Dori (Technical Deep Dive)

image

At the heart of Sehat Dori lies a powerful idea:

πŸ’‘ Healthcare is not isolated data β€” it is a network of relationships.

This is where TigerGraph becomes our core intelligence engine.


πŸ”— Why Graph Over Traditional Databases?

Traditional databases store data in tables:

  • Patients table
  • Visits table
  • Hospitals table

To answer a real-world question like:

β€œWhich pregnant women missed checkups AND have anemia AND are far from hospitals?”

You need:

  • Multiple joins
  • Complex queries
  • Slow execution ❌

πŸš€ With TigerGraph:

We model everything as a connected graph:

(Patient) ── HAS_RISK ──> (Anemia)
     β”‚
     β”œβ”€β”€ VISITED ──> (Visit: missed)
     β”‚
     └── ASSIGNED_TO ──> (ASHA Worker)

πŸ‘‰ Now, this becomes a simple traversal problem β€” not a join problem.


πŸ—οΈ Our Graph Schema

We designed a domain-specific healthcare graph:

πŸ”Ή Vertex Types

  • Patient
  • Hospital
  • Visit
  • User (for authentication)

πŸ”Ή Edge Types

  • Patient β†’ HAS_RISK β†’ RiskFactor
  • Patient β†’ VISITED β†’ Visit
  • Visit β†’ AT β†’ Hospital
  • Patient β†’ ASSIGNED_TO β†’ ASHA_Worker

βš™οΈ How We Use TigerGraph (Step-by-Step)


1️⃣ Data Modeling

Each real-world entity is stored as a vertex, and relationships are stored as edges.

Example:

Patient (Sita)
β†’ HAS_RISK β†’ Anemia  
β†’ VISITED β†’ Missed Visit  
β†’ ASSIGNED_TO β†’ ASHA Worker  

2️⃣ Query-Based Intelligence (GSQL)

Instead of raw queries, we use installed GSQL queries as APIs.

πŸ”₯ Example: High-Risk Detection

CREATE QUERY highRiskPatients() FOR GRAPH health_graph {
  Start = {Patient.*};

  HighRisk =
    SELECT p
    FROM Start:p -(HAS_RISK)-> r
    WHERE r.type == "anemia" AND p.hemoglobin < 9;

  PRINT HighRisk;
}

3️⃣ Multi-Factor Risk Scoring

We extend logic using accumulators:

CREATE QUERY priorityPatients() FOR GRAPH health_graph {
  Start = {Patient.*};

  Result =
    SELECT p
    FROM Start:p -(VISITED)-> v
    WHERE v.status == "missed"
    ACCUM p.@missed += 1;

  HighPriority =
    SELECT p
    FROM Result:p
    WHERE p.@missed >= 2;

  PRINT HighPriority;
}

πŸ‘‰ This allows real-time prioritization based on behavior patterns.


4️⃣ TigerGraph as an API Layer

TigerGraph automatically exposes queries as REST APIs:

GET /query/health_graph/highRiskPatients

5️⃣ Backend Integration

Our Node.js backend connects using HTTP:

axios.get(
  `${TG_HOST}/query/health_graph/highRiskPatients`,
  {
    headers: {
      Authorization: `Bearer ${TG_TOKEN}`
    }
  }
);

πŸ‘‰ No ORM, no joins β€” just direct graph intelligence


πŸ”„ End-to-End Flow

ASHA App β†’ Node API β†’ TigerGraph Query  
         β†’ Graph Traversal β†’ Risk Detection  
         β†’ Response β†’ Alert 🚨

⚑ Performance Advantage

Traditional DB TigerGraph
Heavy joins ❌ Native traversal βœ…
Slower queries ❌ Real-time insights βœ…
Rigid schema ❌ Flexible relationships βœ…

🎯 Real Impact

With TigerGraph, MomsMagic can:

  • βœ… Identify high-risk pregnancies instantly
  • βœ… Track patient journeys across multiple touchpoints
  • βœ… Enable proactive intervention instead of reactive care

🏁 Final Thought

β€œIn healthcare, relationships matter more than records.”

TigerGraph helps us see those relationships β€” and act on them.


πŸ“Š Example Use Case

πŸ‘© Sita (7 months pregnant)

  • Missed 2 checkups
  • Hemoglobin = 8.5
  • Lives far from hospital

πŸ‘‰ Sehat Dori flags her as:

🚨 HIGH PRIORITY PATIENT

πŸ‘‰ ASHA worker gets instant alert β†’ takes action β†’ life saved


πŸ§ͺ API Example

Get High-Risk Patients

GET /api/patients/high-risk

Response:

{
  "success": true,
  "data": [
    {
      "name": "Sita",
      "risk": "HIGH"
    }
  ]
}

πŸ› οΈ Installation & Setup

1️⃣ Clone Repo

git clone https://github.com/your-username/momsmagic.git
cd sehat-dori

2️⃣ Backend Setup

cd backend
npm install

Create .env:

PORT=5000
JWT_SECRET=your_secret

TG_HOST=https://your-instance.tgcloud.io
TG_GRAPH=health_graph
TG_TOKEN=your_api_key

Run server:

npm run dev

3️⃣ Frontend Setup

cd frontend
npm install
npm run dev

πŸ” Authentication Flow

  • Signup β†’ User stored in TigerGraph
  • Login β†’ JWT issued
  • Protected routes β†’ Verified using middleware

🧠 Why TigerGraph?

Traditional DBs:

  • ❌ Struggle with multi-relationship queries
  • ❌ Slow joins

TigerGraph:

  • βœ… Native graph traversal
  • βœ… Real-time insights
  • βœ… Perfect for healthcare relationships

🌍 Impact

SehatDori is not just a project β€” it's a life-saving system.

🎯 Goals:

  • Reduce maternal mortality
  • Improve rural healthcare connectivity
  • Empower ASHA workers with data

πŸš€ Future Scope

  • πŸ€– AI-based risk scoring
  • πŸ“‘ Offline-first support for rural areas
  • πŸ—ΊοΈ Geo-based emergency routing

πŸ‘¨β€πŸ’» Team - Byte Blaze

Built with ❀️ for real-world impact.

  • Sundaram Katare (Leader)
  • Aryan Routela
  • Khushi Sharma
  • Tanmay Kanchan

🏁 Final Thought

β€œData doesn’t save lives β€” connected data does.”

Sehat Dori turns connections into care.


⭐ If you like this project, give it a star!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors