Skip to content

MediChain is an innovative solution aimed at revolutionizing the healthcare preauthorization process using blockchain technology.

License

Notifications You must be signed in to change notification settings

Dhaval-pathak/MediChain-A-Decentralized-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEDICHAIN - A Patient Management and Insurance Claims Decentralized App

Project Description

MediChain is an innovative solution aimed at revolutionizing the healthcare preauthorization process using blockchain technology. This project addresses the inefficiencies and delays inherent in the traditional preauthorization process by leveraging the immutable and transparent nature of blockchain.

Importance

The traditional healthcare preauthorization process is often cumbersome, slow, and prone to errors, leading to delays in patient care and increased administrative costs. By utilizing blockchain technology, the Preauth Project aims to streamline this process, providing a secure, transparent, and efficient system that benefits patients, healthcare providers, and insurance companies alike.

Use Cases

  1. Patient Management: Patients can submit preauthorization requests and track their status in real-time.
  2. Healthcare Providers: Hospitals and clinics can manage patient records, submit requests, and receive approvals faster.
  3. Insurance Companies: Insurance firms can efficiently manage and process preauthorization requests, reducing processing times and improving customer satisfaction.

Advantages

  • Transparency: All transactions and operations are recorded on the blockchain, ensuring transparency for all parties involved.
  • Security: The use of blockchain technology ensures that data is immutable and secure from unauthorized modifications.
  • Efficiency: Automating the preauthorization process reduces the time and effort required, leading to faster approvals and better patient care.
  • Cost-Effective: Reduces administrative overhead and costs associated with the manual processing of preauthorizations.
  • Decentralization: Eliminates the need for a central authority, reducing the risk of data breaches and single points of failure.

Key Components

  1. Frontend: A React application that provides an intuitive interface for patients, healthcare providers, and insurance companies to interact with the system.
  2. Backend: A Node.js server that handles user authentication, interacts with the PostgreSQL database, and communicates with the blockchain.
  3. Smart Contracts: Solidity contracts deployed on the Ethereum blockchain using Truffle to manage healthcare preauthorization processes securely and transparently.

Folder Structure

  • backend: Contains the Node.js server files.
  • contracts: Contains the Solidity smart contracts.
  • frontend: Contains the React application.
  • migrations: Contains the migration scripts for the smart contracts.
  • test: Contains test files for the smart contracts.
  • .gitignore: Specifies files and directories to be ignored by git.
  • README.md: This file.
  • truffle-config.js: Configuration file for Truffle.

Project Layout

Frontend

  • Uses React for the user interface.
  • Implements routing using react-router-dom.
  • Main components:
    • Admin: Admin layout.
    • Auth: Authentication layout.
    • Patient: Patient layout.
    • Insurance: Insurance company layout.

Backend

  • Uses Express for the server.
  • Implements authentication using bcrypt and JWT.
  • Connects to a PostgreSQL database.
  • Main endpoints:
    • /api/register: Registers a new user.
    • /api/login: Logs in an existing user.
    • /api/insuranceCompanies: Retrieves a list of insurance companies.

Smart Contracts

  • Written in Solidity.
  • Manages healthcare preauthorization processes.
  • Main contracts:
    • Cashless.sol
    • Main_Structure.sol
    • Migrations.sol
    • Patient_Management_System.sol
    • Reimbursement.sol

How to Run

Prerequisites

  • Node.js
  • npm (Node Package Manager)
  • PostgreSQL
  • Truffle
  • Ganache (for local Ethereum blockchain)

Frontend

  1. Navigate to the frontend directory:

    cd frontend
  2. Install the required packages:

    npm install
  3. Start the React application:

    npm start

The React application will be running on http://localhost:3000.

Backend

  1. Navigate to the backend directory:

    cd backend
  2. Install the required packages:

    npm install
  3. Start the Node.js server:

    node server.js

The Node.js server will be running on http://localhost:3001.

Smart Contracts

  1. Navigate to the root directory of the project.

  2. Install Truffle globally if you haven't already:

    npm install -g truffle
  3. Compile the smart contracts:

    truffle compile
  4. Deploy the smart contracts to your local blockchain (Ganache):

    truffle migrate

Database Setup

  1. Make sure you have PostgreSQL installed and running.

  2. Create a new PostgreSQL database:

    createdb preauth
  3. Connect to the database and create the necessary tables:

    CREATE TABLE users (
        id SERIAL PRIMARY KEY,
        username VARCHAR(50) UNIQUE NOT NULL,
        email VARCHAR(50) UNIQUE NOT NULL,
        password_hash VARCHAR(100) NOT NULL,
        role VARCHAR(50) NOT NULL
    );
    
    CREATE TABLE insurancecompany (
        id SERIAL PRIMARY KEY,
        name VARCHAR(100) NOT NULL,
        address VARCHAR(255) NOT NULL,
        contact_info VARCHAR(255) NOT NULL
    );

Running Tests

To run tests for the smart contracts:

  1. Navigate to the root directory of the project.

  2. Run the tests:

    truffle test

Demo Images

User Authentication

Login Screen Registration Page
Login Screen Registration Page

Doctor Dashboard

Patient List

image

Bill Creation Interface

image


Insurance Company Dashboard

Policy Creation Form

image

Active Policies Overview

image


Patient Dashboard

Patient Bill History

image

Pre-authorization Request Form

image

Contributing

Feel free to fork this repository and make contributions. Pull requests are welcome.

License

This project is licensed under the MIT License.

About

MediChain is an innovative solution aimed at revolutionizing the healthcare preauthorization process using blockchain technology.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published