ijosh-ch / API-EHR

API for Decentralized EHR Systems project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API-EHR


Introduction

This is an open-source API for decentralized EHR project. The back-end architecture of this API is consist of:

  1. Ethereum Blockchain (ex: Ganache or Geth)
    The purpose of blockchain is storing the metadata version of the EHR (hashed) for further verification process.
  2. 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

Guide

  1. Install the npm libraries using the command below:
npm install
  1. 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

  2. Run the API using the command below:
npm run dev
  1. Use the given API requests template below to test the API:
    Run in Postman
    Notes: you need to change the bc addresses of patient, doctor, & hospital using your own addresses

About

API for Decentralized EHR Systems project

License:GNU General Public License v3.0


Languages

Language:JavaScript 89.5%Language:Solidity 10.5%