Giter Club home page Giter Club logo

digital_healthcare's Introduction

digital_healthcare

electronic health records on blockchain

Note: Demo url to work you need to have metamask extension installed in your browser and to buy fake tickets you need to have fake ethers from rinkeby faceut.
Optimized contract can be found in contracts/optimized_healthCare.sol

Summary

Project stores patient records on blockchain(hybrid). Hybrid because files are not stored on blockchain, but access information is stored on blockchain. There will be two participants doctor and patient.

  • Doctor register by providing name.
  • Patient register by providing name and age.
  • Patient uploads files and provides random nounce to encrypt the file, file will be uploaded to IPFS and secret is stored in ethereum.
  • Patient provides access to particular doctor.
  • Once doctor is given access by patient, he will be able to see patient's address in his home page.
  • Doctor can get all files ipfs hash of patient and send request to node app for file view.
  • Node app will fetch file from ipfs and get secret from blockchain, decrypt file and send it to doctor.

Note

Code has been tested only with ganache, not with any testnet.

Project setup

HTTP_PROVIDER = provider url ex: http://127.0.0.1:7545
IPFS_HOST = currently infura (can be changed to local node as well)

1. Start Ganache
   Contract can be deployed to any network, In my case ganache. Update CONTRACT_DEPLOYED_PORT in env, which can be found in build -> contracts -> HealthCare.json -> "networks".

2. Start react server
   npm run start
    visit http://localhost:3000

3. Start node app
   npm run server

4. Connect metamask to ganache and Import ganache accounts to metamask
   ex: http://localhost:7545

High Level Use Case

Alt text

Sign In

    User should sign challenge to login, after which jwt token will be issued

Alt text

Upload Files

    Here we have two layer of security

  1. hash provided by ipfs(ie. files can be accessed only if file hash is known)
  2. file uploaded to ipfs is encrypted by secret (however secret is not encrypted in ethereum, should be done in future)

Alt text

Access Files

Alt text

TODO

  • Test cases, Currently deployment and registation tests has been written.
  • Encrypt file secret while saving on ethereum (can be encrypted or NuCypher etc)

digital_healthcare's People

Contributors

pramodramdas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.