Skip to content

JeffreytheCoder/med-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Markdownify

A blockchain-based Electrical Medical Records (EMR) system.

Key FeaturesHow It WorksHow To UseSupport

Key Features

MedChain is powered by IPFS, where every patient's medical records are stored on the distributed file system, not owned by any centralized entity like hospitals or governments. Each patient has a digital identity on Ethereum blockchain, who and whose doctor can access medical records by interacting with smart contracts.

On MedChain,

  • A healthcare provider can register using a crypto wallet like Metamask.
  • The healthcare provider can register a patient by using the public address of the patient’s wallet, usually provided during an appointment.
  • The health provider can search for a patient’s records using the address, and upload a new record for the patient.
  • The patient can also view his or her records, after connected with a wallet which address is registered by the health provider.

This project is the 3rd place winner of NextStep Hacks 2022.

How It Works

There are three major components of MedChain:

  1. React client (connected with MetaMask)
  2. Solidity smart contract on Ethereum blockchain
  3. Interplanetary file system (IPFS)

The client first connects with crypto wallet, and use smart contract to mint a patient or doctor block if the public address of the user’s wallet is not registered.

The client can upload a record file to IPFS, which address is linked to a patient block in ETH chain. The client can get all record addressed stored in a patient block from smart contract, and get a record file by its address from IPFS.

How To Use

Install Truffle globally if you haven't.

$ npm install -g truffle

Install Truffle dependencies and deploy smart contracts to local Ethereum network like Ganache.

$ cd truffle
$ npm install
$ truffle compile
$ truffle deploy

Install React dependencies and start React app.

$ cd ../client
$ npm install
$ npm start

Add your Infura IPFS project ID and secret to .env. You can create an project here.

REACT_APP_IPFS_PROJECT_ID={YOUR_IPFS_PROJECT_ID}
REACT_APP_IPFS_PROJECT_SECRET={YOUR_IPFS_PROJECT_SECRET}

You should be able to see the application running at http://localhost:3000.

Support

If you like this project, please leave a star ⭐️. This helps more people to know this project.


GitHub @jeffreythecoder  ·  Twitter @jeffreyzepengyu