Healthcare-Blockchain

Each folder holds the source code to implement each scenario detailed in the report. As well as the source code each folder apart from \encrpytion scenario has a JavaScript file called test.js which can be used to test each business network on Hyperledger Composer.
This readme will outline the configuration of a .bna as well as the structure.

Prerequisites

  • Ubuntu 16+
  • Install Hyperledger Fabric
  • Install Hyperledger Composer

    Configuration

  • Open linux terminal
  • Go to the fabric directory start fabric and create a peer admin card
    
    cd ~/fabric-dev-servers
    
    export FABRIC_VERSION=hlfv11
    
    ./startFabric.sh
    
    ./createPeerAdminCard.sh
    
    
  • Go to BNA Directory
  • Configure the bna
    
    composer archive create -t dir -n .
    
    composer network install --card PeerAdmin@hlfv1 --archiveFile xxx@yy.bna
    
    composer network start --networkName xxx --networkVersion yy --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
    
    
  • start hyperledger composer
    
    composer-playground
    
    

    BNA Structure

    The files in bold have all been detailed within the report and can be seen as high importance files.

  • Unzip BNA

  • lib\ehr.js - **Script file** *(N/A in Basic Scenario)*
  • models\org.health.system.cto - **Model File**
  • permissions.acl - **Permission File**
  • queries.qry - **Query File** *(Only present in Encryption)*
  • package.json - Configuration File