This is an open-source API for decentralized EHR project. The back-end architecture of this API is consist of:
- Ethereum Blockchain (ex: Ganache or Geth)
The purpose of blockchain is storing the metadata version of the EHR (hashed) for further verification process. - Decentralized DB (ex: BigchainDB)
The purpose of DDB is storing the original version of the EHR (encrypted) that will be broadcast to other hospitals within the network.
Setup tutorial: How to setup BigchainDB notes
- Install the npm libraries using the command below:
npm install
- Set up the blockchain configuration:
a. Copy the template file & rename it to be "bc.connection.js"
b. Deploy the smart contracts to your Ethereum VM using truffle / remix
c. Set up the hospital blockchain & deployed contract information on bc.connection.js from step 2.a - Run the API using the command below:
npm run dev