https://github.com/jeffreythecoder/med-chain
A blockchain-based Electrical Medical Records (EMR) system.
https://github.com/jeffreythecoder/med-chain
blockchain ethereum ipfs react
Last synced: 4 months ago
JSON representation
A blockchain-based Electrical Medical Records (EMR) system.
- Host: GitHub
- URL: https://github.com/jeffreythecoder/med-chain
- Owner: JeffreytheCoder
- License: mit
- Created: 2022-08-13T06:09:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T20:47:03.000Z (about 2 years ago)
- Last Synced: 2025-10-14T12:34:38.675Z (8 months ago)
- Topics: blockchain, ethereum, ipfs, react
- Language: JavaScript
- Homepage: https://devpost.com/software/medchain-k4wzry
- Size: 26.4 MB
- Stars: 40
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A blockchain-based Electrical Medical Records (EMR) system.
Key Features •
How It Works •
How To Use •
Support
## Key Features
MedChain is powered by [IPFS](https://ipfs.tech/), 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](https://ethereum.org/) 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](https://devpost.com/software/medchain-k4wzry).
## 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.
```sh
$ npm install -g truffle
```
Install Truffle dependencies and deploy smart contracts to local Ethereum network like [Ganache](https://trufflesuite.com/ganache/).
```sh
$ cd truffle
$ npm install
$ truffle compile
$ truffle deploy
```
Install React dependencies and start React app.
```sh
$ cd ../client
$ npm install
$ npm start
```
Add your Infura IPFS project ID and secret to `.env`. You can create an project [here](https://www.infura.io/).
```
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](https://github.com/JeffreytheCoder/JeffreytheCoder) ·
> Twitter [@jeffreyzepengyu](https://twitter.com/jeffreyzepengyu)