This repository is one of the three repositories which are part of MediChain Project.
medichain-hardhat: Hardhat Repository of MediChain Project»
medichain-thegraph: The Graph Repository of MediChain Project»
Watch Demo Videos
View Demo
·
Report Bug
·
Request Feature
The current version (v2) of this project is available at github.com/myriad-org.
Table of Contents
Blockchain being an immutable ledger and with decentralized nature has a great potential for increasing the security, privacy and efficiency of Medical Health Record keeping systems. Currently existing solutions rely on centralised database which are susceptible to Ransomware attacks, Denial of Service(DoS) attacks and also have significant counterparty risks. Some decentralized solutions are also exist but some of them are not really decentralized that are based on private or permis- sioned blockchain, while some which are based on public blockchain have not properly addressed the performance and scalability issues.
The proposed system is based on EVM compatible public blockchains using IPFS as a decentralized file storage solution and uses 2048 bit RSA encryption to encrypt the IPFS HASH of file metadata on the client-side before uploading the HASH on the blockchain. For supporting fast and complex queries this system uses a decentralized indexing protocol The Graph. The smart contract is currently deployed on Goerli Testnet.
With this system patients can access their medical records anytime anywhere without the counterparty risk from centralized entity. This system also features QR code for sharing of medical files from patients to doctors. With the proposed implementation the decentralized medical record keeping system provides increased security and privacy compared to centralized systems without loss of significant performance or scalability benefits.
The following is a list of major frameworks, library and tools used for developing this repository.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- Nodejs
- You'll know you've installed nodejs right if you can run:
node --version
and get an ouput like:vx.x.x
- You'll know you've installed nodejs right if you can run:
- Yarn instead of
npm
- You'll know you've installed yarn right if you can run:
yarn --version
and get an output like:x.x.x
- You might need to install it with
npm
- You'll know you've installed yarn right if you can run:
- Optional Instruction
- Make sure that this repository and
medichain-hardhat
repository are in the same level in your directory structure. - This makes sure that whenever you deploy the smart contract, this repository's
constants
files are updated.
- Make sure that this repository and
git clone https://github.com/sadityakumar9211/medichain-nextjs
cd medichain-nextjs
yarn
If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the clone this repo
part.
- Deploy to your contract to Goerli After installing dependencies, deploy your contracts to goerli:
yarn hardhat deploy --network goerli
- Connecting with Subgraph
You can use the same subgraph temporary URI (as present in the pages/_app.js
) to query the data or you can clone this repository and deploy your own subgraph using the instructions in above repo and generate your own temporary query URI.
- Start your UI Make sure that:
In your networkMapping.json you have an entry for PatientMedicalRecordSystem
on the goerli network.
yarn dev
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL-3.0 License. See COPYING for more information.
If you appreciated this, feel free to follow me or donate!
ETH Address: 0xED5A704De64Ff9699dB62d09248C8d179bb77D8A
Project Link: https://github.com/sadityakumar9211/medichain-hardhat