This developer code pattern was built using the IBM Blockchain Platform connected to the IBM Cloud™ Kubernetes service. Using the private data collections released in Hyperledger 1.2, the pattern showcases the use case of needing to hide negotiated price details from competing wholesalers, while still using one channel to ensure that all data between the manufacturers, wholesalers, pharmacies, and patients is on one ledger. This keeps certain details of transactions (such as negotiated price) private, while keeping other details publicly available to all network participants.
On a healthcare platform, there are multiple entities such as the drug manufacturers, wholesalers, pharmacies, and patients. These entities share data about the creation of the drug. 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 drug and sells it at different prices to the two different 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 and the IBM Blockchain Platform. 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 with each other 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.
- The blockchain operator creates an IBM Cloud Kubernetes Service cluster and an IBM Blockchain Platform service.
- The IBM Blockchain Platform creates a Hyperledger Fabric network on an IBM Cloud Kubernetes Service, and the operator installs and instantiates the smart contract on the network.
- The Node.js application server uses the Fabric SDK to interact with the deployed network on IBM Blockchain Platform.
- The Vue.js UI uses the Node.js application API to interact and submit transactions to the network.
- The user interacts with the healthcare platform web app to update and query the blockchain ledger and state.
Ready to get started? Check out the README for detailed instructions.