This project is a healthcare records management system built on the Hyperledger Fabric blockchain. It allows patients to securely store and share his records with different healthcare providers, like doctor, pharmacy, lab. Patient can even claim for insurance for a record using the same system. This ensures patient privacy and data security.
- Hyperledger Fabric
- Hyperledger Explorer
- CouchDB
- Docker
- NodeJS
- ExpressJS
- MongoDB
- ReactJS
- TailwindCSS
- Registration by anyone
- Login
- Allow access to particular healthcare provider(doctor, pharmacy, lab, insurance)
- See all records
- Claim for Insurance
- Registration by Admin
- Login
- See record history of patient
- Write Prescription
- Registration by Admin
- Login
- See Medicines Written in prescription by doctor
- Update Dispensed medicine record with bill Amount
- Write comment on unavailable medicine
- Registration by Admin
- Login
- See Lab Tests Written in prescription by doctor
- Update Lab Test record with bill Amount
- Registration by Admin
- Login
- See all claim requests
- Approve/Decline Claim Request
Verify that you have the following installed:
$ node -v
v16.20.0
$ npm -v
8.19.4
$ docker -v
Docker version 23.0.1, build a5ee5b1
$ docker-compose -v
Docker Compose version v2.15.1
$ git --version
git version 2.39.2
-
Clone the repository
$ git clone https://github.com/raj-71/heathcare-hyperledger.git $ cd heathcare-hyperledger
-
Add .env file as specified in the backend folder
-
Start the hyperledger fabric network
$ ./fablo up fablo-config.json $ cd backend/config $ ./generate-ccp
-
Start the backend server
$ cd backend $ npm install $ node app.js
-
Start the frontend server
$ cd client $ npm install $ npm start
-
Open the frontend server in browser
http://localhost:3000
-
You have to add admin credentials in mongodb manually with the format given below in users file to create Doctor, Pharmacy, Lab, Insurance users
{ userName:"your_user_name" orgName: "Admin" userId:"your_user_id" password:"password" }
-
Now you can register as a patient and other users with admin credentials and login to the system
- 5 Organizations
- Patient
- Doctor
- Pharmacy
- Lab
- Insurance
- Peers
- 1 Peer for each organization
- Ledger
- 1 CouchDB ledger for each peer
- Channel
- main-channel1
- Chaincode
- chaincode1
Incase if any of the commands fail due to configurations or the network was not brought down properly use the following commands to clear the corrupted docker images and fix the issue.
-
Stop the network
$ ./fablo down
-
Again Up the network
$ ./fablo up fablo-config.json
-
Stop the containers
$ docker stop $(docker ps -a -q)
-
Remove the containers
$ docker rm $(docker ps -a -q)
-
Remove all local volumns
$ docker volume prune
-
Remove all wallets
$ rm -rf /backend/*-wallet
-
Authorization error code 71 -> Regenerate all connection profies in backend
$ cd backend/config $ ./generate-ccp
-
Incase of affiliation error -> authorization error code 20
Copy paste these lines in all the fabric-ca-server-config.yaml (total 6 such files) files in the network. File locations:
/fablo-target/fabric-config/fabric-ca-server-config/*.healthcare.com/fabric-ca-server-config.yaml
affiliations: patient: - department1 doctor: - department1 pharmacy: - department1 lab: - department1 insurance: - department1
Project Work: CS731 - Blockchain Technology and Application Professor: Angshuman Karmakar
- Raj Kumar - 22111050
- Madhav Maheswari - 22111037
- Sarthak Neema - 22111079
- Sumit Chaudhary - 22111060