Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Establish private data collections on Hyperledger Fabric

Summary

This developer code pattern was built using the IBM Blockchain Platform connected to the IBM Cloud™ Kubernetes service. The application showcases using these services in the healthcare industry to follow a single pill through the medical supply chain from the manufacturer to the patient. The pattern illustrates the flow of the application from the points of view of the manufacturer, wholesaler, pharmacy, and patient.

Description

In the medical supply chain, there are multiple entities, such as the drug manufacturers, wholesalers, pharmacies, and patients. These entities share data about a drug as it moves through the chain. However, there are cases where entities want to keep some data about the drug hidden from the other entities. Consider the instance where a manufacturer has negotiated different price rates with the wholesalers. They wouldn’t want the various wholesalers to be able to see the differing negotiated drug rates. Having all entities on the same blockchain channel would inherently make every transaction between any two entities visible to every other entity. With the introduction of private data collections, certain data parts associated with a given transaction can be kept private from other entities.

In this developer code pattern, we showcase one manufacturer, two wholesalers, one pharmacy, and one patient that are connected on the same channel on a blockchain ledger. The manufacturer generates a new pill medication and sells it at different prices to the two wholesalers. Only the manufacturer and the patient can see the two negotiated prices for this example.

This code pattern is for developers who want to learn how to use the private data collections feature in Hyperledger Fabric. When you have completed it, you will understand how to:

  • Create multiple organizations with the IBM Blockchain Platform.
  • Create a Vue.js web app that has multiple dashboards on a single-page application, which can communicate in real time.
  • Create a Node.js server that’s deployed to Kubernetes on IBM Cloud.
  • Use private data collections to enforce data privacy between organizations on the same channel.

Flow

flow

  1. The blockchain operator creates an IBM Kubernetes Service cluster and an IBM Blockchain Platform service.
  2. The IBM Blockchain Platform creates a Hyperledger Fabric network on an IBM Kubernetes Service, and the operator installs and instantiates the smart contract on the network.
  3. The Node.js application server uses the Fabric SDK to interact with the deployed network on IBM Blockchain Platform.
  4. The React UI uses the Node.js application API to interact and submit transactions to the network.
  5. The user interacts with the supply chain application web interface to update and query the blockchain ledger and state.

Conclusion

Ready to get started? Check out the README for detailed instructions.

Ashutosh Nath Agarwal