Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿซ€ PRANA โ€“ AI-Assisted Liver Transplant Allocation System

PRANA is an AI-assisted clinical decision support system designed to streamline the liver transplant allocation process. It integrates donor and recipient management, longitudinal clinical monitoring, AI-based survival prediction, dynamic waitlist ranking, compatibility matching, and organ allocation into a unified platform.

An end-to-end AI-assisted liver transplant allocation platform integrating longitudinal clinical monitoring, deep learning-based survival prediction, dynamic waitlist prioritization, and compatibility-driven organ allocation.

Note: PRANA is developed as an academic/hackathon project and is intended for educational and research purposes only. It is not a replacement for clinical judgment or certified medical software.


Python Django PyTorch Status License

๐Ÿ“‘ Table of Contents

๐Ÿ“Œ Problem Statement

Liver transplantation requires careful coordination between donor registration, recipient evaluation, clinical scoring, compatibility assessment, and waitlist prioritization.

Traditional workflows often involve multiple disconnected systems, making the process time-consuming and prone to delays.

PRANA addresses this by providing a centralized platform with AI-assisted decision support while ensuring that final allocation decisions remain under physician supervision.


Key Contributions

  • End-to-end liver transplant allocation platform built with Django
  • AI-assisted 90-day survival prediction using a BiLSTM + Attention architecture
  • Longitudinal patient monitoring using 15-day laboratory trends
  • Dynamic waitlist generation and priority ranking
  • Compatibility-based donor-recipient matching
  • Automated allocation workflow with notifications
  • Interactive dashboard for transplant management

โœจ Features

๐Ÿฉธ Donor Management

  • Register liver donors
  • Brain death verification
  • Next-of-kin consent verification
  • Automatic donor ID generation
  • Donor status tracking

๐Ÿ‘ค Recipient Management

  • Recipient registration
  • Longitudinal laboratory monitoring
  • Clinical assessment records
  • Automatic recipient ID generation
  • Patient progress tracking

๐Ÿงช Clinical Assessment

Automatically computes multiple liver disease severity scores including:

  • MELD
  • MELD-Na
  • MELD 3.0
  • Child-Pugh (CTP)
  • ALBI
  • APRI
  • FIB-4

๐Ÿค– AI Prediction Module

  • 90-day post-transplant survival prediction
  • Mortality probability estimation
  • Risk categorization
  • AI-based ranking recommendation
  • Doctor verification workflow

๐Ÿ“‹ Dynamic Waitlist

  • Automatic waitlist generation
  • Priority score calculation
  • Dynamic patient ranking
  • Active waitlist management

๐Ÿซ€ Compatibility Matching

The matching engine evaluates:

  • Blood group compatibility
  • Height compatibility
  • Weight compatibility
  • Standard Liver Volume (SLV)
  • Graft-to-Recipient Weight Ratio (GRWR)

Only medically compatible recipients proceed to allocation.


โš™๏ธ Allocation Engine

Automatically:

  • Selects the highest-ranked compatible recipient
  • Creates allocation records
  • Updates donor status
  • Updates recipient status
  • Removes recipient from active waitlist
  • Generates hospital notifications

๐Ÿ”” Notification System

  • Allocation notifications
  • Read/unread tracking
  • Notification history

๐Ÿ“Š Dashboard

Provides real-time overview of:

  • Registered donors
  • Registered recipients
  • Active waitlist
  • AI predictions
  • Organ allocations
  • High-priority patients
  • Notifications

๐Ÿ—๏ธ System Architecture

Hospital

      โ”‚

      โ–ผ

Dashboard
      โ”‚
      โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚              โ”‚
      โ–ผ              โ–ผ
Donor Module     Recipient Module
      โ”‚              โ”‚
      โ”‚              โ–ผ
      โ”‚         Clinical Assessment
      โ”‚              โ”‚
      โ”‚         AI Prediction
      โ”‚              โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Waitlist
                     โ”‚
                     โ–ผ
             Matching Engine
                     โ”‚
                     โ–ผ
             Allocation Engine
                     โ”‚
                     โ–ผ
              Notification System

๐Ÿ—„๏ธ Database Design

Main entities:

  • Hospital
  • Liver Donor
  • Recipient
  • Recipient Lab
  • Clinical Assessment
  • Prediction
  • Waitlist
  • Allocation
  • Notification

Relationships are managed using Django ORM with ForeignKey and OneToOne relationships.


๐Ÿ› ๏ธ Tech Stack

Backend

  • Python
  • Django
  • SQLite
  • Django ORM

AI & Deep Learning

The survival prediction model is built using a deep learning architecture designed for longitudinal clinical data.

Model Architecture

  • Bidirectional LSTM (BiLSTM)
  • Attention Mechanism
  • Fully Connected Layers
  • Sigmoid Output Layer

Purpose

The model analyzes temporal trends in patient laboratory values collected over 15 days and predicts:

  • 90-day post-transplant survival probability
  • Mortality probability
  • Risk category

The prediction is then incorporated into the dynamic waitlist ranking, subject to physician verification.

Deep Learning Architecture

The AI prediction module utilizes a Bidirectional Long Short-Term Memory (BiLSTM) network enhanced with an Attention Mechanism.

Clinical Time-Series
(15 Days)

        โ”‚

        โ–ผ

BiLSTM Encoder

        โ”‚

        โ–ผ

Attention Layer

        โ”‚

        โ–ผ

Dense Layers

        โ”‚

        โ–ผ

Sigmoid

        โ”‚

        โ–ผ

Survival Probability

The BiLSTM captures temporal dependencies from both past and future laboratory observations, while the Attention layer emphasizes clinically significant time points before generating the final prediction.

Frontend

  • HTML
  • CSS
  • Bootstrap
  • JavaScript

๐Ÿค– AI Workflow

Recipient Registration
          โ”‚
          โ–ผ
 Laboratory Data Collection
          โ”‚
          โ–ผ
 Clinical Score Calculation
          โ”‚
          โ–ผ
 AI Survival Prediction
          โ”‚
          โ–ผ
 Doctor Verification
          โ”‚
          โ–ผ
 Waitlist Ranking
          โ”‚
          โ–ผ
 Compatibility Matching
          โ”‚
          โ–ผ
 Organ Allocation

Repository Structure

|   .gitignore
|   manage.py
|   readme.md
|   requirements.txt
|
+---liver
|   |   admin.py
|   |   apps.py
|   |   calculations.py
|   |   context_processors.py
|   |   demo_data.py
|   |   forms.py
|   |   models.py
|   |   signals.py
|   |   tests.py
|   |   urls.py
|   |   utils.py
|   |   views.py
|   |   __init__.py
|   |
|   +---ai
|   |   |   model.py
|   |   |   model_loader.py
|   |   |   predictor.py
|   |   |   preprocessing.py
|   |   |   risk.py
|   |   |
|   |   +---artifacts (Model Assets excluded from Public Repo)
|   |
|   +---services
|   |   |   allocation.py
|   |   |   matching.py
|   |   |   prediction.py
|   |   |   waitlist.py
|   |   |
|   |   \---__pycache__
|   |           allocation.cpython-313.pyc
|   |           matching.cpython-313.pyc
|   |           prediction.cpython-313.pyc
|   |           waitlist.cpython-313.pyc
|   |
|   +---static
|   |   +---css
|   |   |       style.css
|   |   |
|   |   \---js
|   +---templates
|   |   \---liver
|   |           add_lab_report.html
|   |           allocation.html
|   |           allocation_detail.html
|   |           allocation_list.html
|   |           base.html
|   |           dashboard.html
|   |           donor_list.html
|   |           donor_register.html
|   |           history.html
|   |           home.html
|   |           landing.html
|   |           login.html
|   |           notification_detail.html
|   |           notification_list.html
|   |           recipient_detail.html
|   |           recipient_list.html
|   |           recipient_predictions.html
|   |           recipient_register.html
|   |           support.html
|   |           waitlist.html
|   
|
+---PRANA
|   |   asgi.py
|   |   settings.py
|   |   urls.py
|   |   wsgi.py
|   |   __init__.py
|   |
|
\---screenshots
        AI_Survival_Prediction.png
        Dashboard_1.png
        Dashboard_2.png
        Liver_Allocation.png
        Liver_Allocation_2.png
        Patient_details_1.png
        Patient_Details_2.png
        Patient_Details_3.png
        Recipient_Register(1).png
        Recipient_Register.png
        Waitlist.png

๐Ÿ“ท Screenshots

Dashboard

Dashboard

Dashboard


Recipient Register

Register

Register

Recipient Detail

Recipient

Recipient

Recipient


AI Prediction

Prediction


Waitlist

Waitlist


Allocation

Allocation

Allocation


๐Ÿš€ Installation

Clone the repository

git clone https://github.com/yourusername/PRANA.git

Navigate to the project

cd PRANA

Install dependencies

pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate

Start the server

python manage.py runserver

Open

http://127.0.0.1:8000/

Note: AI model artifacts and preprocessing files are intentionally omitted from this public repository. Certain AI prediction features will require these assets during runtime.


Model Availability

The repository contains the complete source code for the PRANA platform.

To protect ongoing research and responsibly distribute AI assets, the following components are intentionally excluded from the public repository:

  • Trained model weights (.pth)
  • Preprocessing pipelines (.pkl)
  • StandardScaler parameters
  • Training datasets
  • Intermediate checkpoints

The application architecture, workflow, and source code are fully available. Model artifacts can be demonstrated during evaluation or provided separately if required by the organizers.

๐Ÿ”ฎ Future Improvements

  • Multi-organ transplant support
  • Hospital authentication
  • Integration with Electronic Medical Records (EMR)
  • Explainable AI (XAI)
  • National transplant registry integration
  • REST API for external hospital systems

โš ๏ธ Disclaimer

This project was developed as an academic/hackathon prototype to demonstrate the integration of artificial intelligence into transplant allocation workflows.

The AI model is intended to assist clinicians and does not replace medical decision-making.


๐Ÿ‘จโ€๐Ÿ’ป Authors

Yash Singh

Computer Science & Engineering (AI & ML)


License

This repository is intended for educational, research, and hackathon evaluation purposes.

Please contact the authors before redistributing trained models or research assets.

About

AI-assisted liver transplant allocation platform supporting donor-recipient matching, longitudinal patient monitoring, and survival prediction for clinical decision support.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages