MediChain is a Consortium Blockchain for Seamless Patient Information Management in National Healthcare
- To implement a blockchain-based system, called MediChain for maintaining the medical records of all patients in a country.
- We would need to design a distributed database that is composed of interconnected nodes.
- Each hospital would act as a node on the network and would be responsible for securely storing and updating the medical records of its patients.
- Everytime a patient undergoes a diagnosis, the hospital has to make a new transaction in the blockchain to add the details of that particular diagnosis.
- We will use a custom version of Proof of Stake (PoS).
The implementation details of our blockchain system:
- The government will have a node on the blockchain, which will allow it to govern the addition or removal of hospital nodes from the network. However, the government node will not have access to or control over the data stored on the blockchain.
- The hospital nodes will be able to add and validate data on the blockchain. This will allow hospitals to securely store and access their patient's medical records, while also maintaining the integrity and reliability of the information.
- The blockchain will use a permission-based, or private model, where only authorized hospitals and medical professionals have access to the network. This will ensure that the data is only accessible to those who are authorized to view it and will help to protect patient privacy.
- To ensure the accuracy and authenticity of the data on the blockchain, the hospital nodes will use PoS (Proof of Stake) consensus (A Modified Version) to verify the information.
- There exists one Government Node.
- All the other Nodes are Hospital Nodes. -Information transfer can only occur between Government Node and Hospital Nodes.
- Each Hospital Node has equal voting power.
- Government Node connects with all the Hospital Nodes.
- Hospital Nodes have access to their copy of the database.
- If you have not initialized the blockchain and are running it for the first time, move to database directory and run the database_init.py file.
cd database
python database_init.py
- Initiate a Government Node by running the following command in an insance of a terminal. This terminal instance emulates a Government Node.
python government.py
- Initiate Several Instances of Hospital Nodes by running the following command in several instances of the terminal. These instances will act as Hospital Nodes.
python hospital.py
- Select an option for all the Hospital Nodes if you want them to participate. Choosing Idle implies that a hospital Node is available for validating transactions. Where as Choosing option to add patient data would imply that the hospital intends to make a transaction.
- Now the Blockchain will randomly choose an idle hospital and based on whether that particular hospital validates the diagnosis or not, the blockchain will start mining or cancel the transaction.
- To view the blockchain, move to database directory and run the database_view.py file.
cd database
python database_view.py