Git Product home page Git Product logo

bhatvineeth / hyperledger-fabric-patient-data-management Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sgirdhar/hyperledger-fabric-patient-data-management

0.0 0.0 0.0 126.08 MB

This is a repo for the HIS Project on Blockchain in the Internet of Things WS20/21

Go 24.20% Java 18.68% JavaScript 29.22% TypeScript 9.31% Shell 15.36% HTML 2.73% CSS 0.28% SCSS 0.17% Dockerfile 0.04%

hyperledger-fabric-patient-data-management's Introduction

Patient Data Management using Hyperledger Fabric

A Hyperledger Fabric prototype as a solution to overcome the problems of traditional records management in hospital/medical system such as accesibility, transfer of records and control of one's own record.

Fabric Network configuration

Prerequisite

Follow the instructions given in the link to install necessary tools and to configure the system: https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html

Bring up the network

Follow the instructions to successfully setup the hospital network.

  1. Clone / Download the repository
$ git clone https://github.com/Shubham-Girdhar/hyperledger-fabric-patient-data-management.git
  1. Before starting with the network is set-up start the docker.

  2. Run the following command to install the binaries and images.

$ curl -sSL https://bit.ly/2ysbOFE | bash -s
  1. Change the working directory to /fabric-samples/pdm-network
$ cd ../fabric-samples/pdm-network
  1. Use the following command to start the network, with 2 organization hospital1 and hospital2 with one peer each (peer0) and an Orderer node.
$ ./network.sh createChannel -ca -s couchdb
  1. Deploy the chaincode. Note: If default channel name is not used then the following command applies, else remove the channel arguments (-c) and run the command.
$ ./network.sh deployCC -ccn custom -ccp ../pdm-custom/chaincode-javascript -ccl javascript

This command will deploy a javascript chaincode on mychannel

  1. Use this command to bring the network down
$ ./network.sh down

To setup the SDK

Reguister the admins by excuting the regesisterHospital1Admin.js and regesisterHospital2Admin.js in th sdk directory

$ cd ..
$ cd sdk
$ node regesisterHospital1Admin.js
$ node regesisterHospital2Admin.js

To setup the SDK

Move to the client directory and execute the client.js

$ cd ..
$ cd client
$ node client.js

To setup the Angulat Frontend

Change to the directory pdm

$ cd ..
$ cd pdm

Then excute the following commands

$ ng serve -o

Troubleshooting

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.

  1. Stop the containers.
$docker stop $(docker ps -a -q)
  1. Remove the containers
$docker rm -f $(docker ps -aq)
  1. Remove all unused images not just dangling ones
$docker system prune -a
  1. Remove all unused local volumes
$docker volume prune
  1. Restart the docker.

  2. Once the docker is up ,open a new terminal and download the images. (same as Step 3 in Bring up the network section)

$ curl -sSL https://bit.ly/2ysbOFE | bash -s

hyperledger-fabric-patient-data-management's People

Contributors

bhatvineeth avatar farazshamim9 avatar sgirdhar avatar towficaziz 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.