A Proposed Framework
Nowadays, the issue of counterfeiting in the pharmaceutical industry is one of the main challenges facing many countries. maybe due to the lack of effective methods of tracking the product through the different stages of the supply chain and the lack of concurrent observations between all parties involved in the system about the current status of the product.
the research purposes framework is to use the block chain technology that demonstrates how integrating blockchain technology with IOT-based technology. pharmacy supply chain management system can provide greater security, we look at peer-reviewed blockchain technologies against two criteria for supply chains: on-chain storage and off-chain storage.
Therefore, we used IPFS to achieve tamper-proof storage it is required to avoid unauthorized modifications. Thus, we have achieved a great degree of transparency and trust in the supply chain. By improving the methods of controlling the storage, shipping, and distribution, through the constant storage of product status changes that are shared across all parties to enable verification of product authenticity across various parties in the supply chain that leverage the blockchain.
1. Proposed Solution
In this paper, we suggest a blockchain-based approach integrated by IPFS to address the validity and authenticity of the drug supply chain. In the paper we illustrate how this issue in the supply chain can be addressed for shipping. We demonstrate how our system is capable of tracing and monitoring the digital content of the shipment, back to the actual licensed product made by the original manufacturer.
Since the inception of the term smart contracts in the mid-1990s with the Ethereum platform, they have had a keen interest in the job market. So, in our solution, we highlighted the using of smart contracts enhance the scalability and off-chain storage with their efficiency and blockchain compliant limitations, we proposed using IPFS. We need IPFS in our solution to store digital consignment content which includes product manufacturer data and shipping data itself like Drug-ID1, Drug-ID2 etc. In a decentralized, distributed manner, reliant on a “content-addressing” mechanism, and which realizes the decentralized delivery of off-chain content.
Which enable us later to retrieve the original content stored in IPFS. The smart Ethereum blockchain contract makes use of this IPFS hash to ensure integrity, authenticity and validity. The IPFS hash value remains the same if the content of the shipment remains unchanged. if the content is tampered during the supply chain phases, the IPFS hash for this shipment is changed, and then the hash contained inside the smart contract does not match that.
Thus, each participant will monitor and verify the authenticity, location and history of the product information stored in IPFS and ensures that the product obtained is legitimate for the manufacturer.Also our solution ISCE keep track and validate sensors readings.The next diagram illustrates the proposed Architecture:
1.1 System Architecture and Design
Figure 1 illustrates the overall system architecture and design for automating the pharmaceutical industry authenticity, originality, and integrity using IPFS and Ethereum smart contracts. The proposed solution uses smart contracts to trigger events that are logged to notify the participating parties to keep track of events and transaction details.
The figure highlights the interactions of the smart contract with main participants that include manufacturer, main distributor, and other distributors, and consumers. Each participating entity has a role, association, and interaction with the smart contract. There are four participating entities, and their role are summarized as follows:
Manufacturer: is the participant of the supply chain or node in a blockchain that owns the original product of the drug and digital content of the shipment (QR-code). The Manufacturer creates a smart contract and also maintains the original hash of the shipment. and provides permission for one or more distributors to deliver his shipment. The distributor uploads the digital content of drug shipment on IPFS, only if the manufacturer’s notarization is completed.
Distributer: is the entity that obtains permission fromthe manufacturer to deliver the shipment content in various sources such aspharmacy, hospital, or any end consumer.
IPFS provides us with maintaining the shipment content as presented by the manufacturer, it also helps the distributor to obtain the proof of site certificates and the conditions recorded in the ledger, and then the distributor uploads the shipment data to files in IPFS. IPFS provides us with maintaining the shipment content as presented by the manufacturer, it also helps the distributor to obtain the proof of site certificates and the conditions recorded in the ledger, and then the distributor uploads the shipment data (QR-code) to files in an IPFS. Instantly, a hash of that data is generated automatically and then stored in the smart contract for later validation and verification by the manufacturer.
Endconsumers or Retailers:To check the originality of the shipment, IPFS offers trace back functionality through IPFS hash to the end consumers. In consideration of the originality, quality, and credibility of the shipment, retailers can access the history of notarization.
IOT :(IoT) describes the network of physical objectsthat are embedded with sensors, software, and other technologies for the purpose of connecting and exchanging data with other devices and systems over the internet so in our frame work IOT keep tracking the medicine status such as temperate, humidity and light during the shipment.
In our proposed solution, the manufacturer initially produces the medication, creates the contract which includes key attributes about the medication to include the drug name, a QRcode of the drug, timestamp, and drug usage details.
The medication data is then submitted to IPFS, after which Instantly, a hash of that data is generated automatically and then stored in the smart contract for later validation and verification by the manufacturer. Which enables us later to retrieve the original content stored in IPFS.
Where the smart Ethereum blockchain contract makes use of this IPFS hash to ensure integrity, authenticity, and validity. and the IPFS hash value remains the same if the content of the shipment remains unchanged. If the content has tampered with during the supply chain phases, the IPFS hash for this shipment is changed, and then the hash contained inside the smart contract does not match that.
The medication manufacture assigns a vehicle to carry the shipment and then stores the vehicle’s, transaction’s IDs, and timestamp in the smart contract.
Implementation and Testing
In this section, we provide the implementation details and focus primarily on testing the correct interaction and functionality among system participants. the code was written in Solidity language using the truffle framework. where there are three entities participating in the contract, manufacturer, distributor, and the end consumer. Each of the entities has an Ethereum address and can participate by calling functions within the smart contract at certain time stamps.
Implementation Details
We have chosen to work with the Go Ethereum (Geth) client, along with Solidity language for smart contracts programming, The Ethereum protocol specifies an interface allowing people to interact with smart contracts and each other over a network.
We use the web3.py library to communicate with Ethereum nodes and smart contracts in the EVM with an HTTP link to access up-to-date details regarding contract status, and new transactions. A smart contract is a program that runs within a blockchain. It contains a set of rules that constitute an agreement made between two or more parties.
When these rules are met, the digital contract executes the transaction. also, With IPFS, we can address vast volumes of data and put immutable, permanent links in transactions, time stamping, and protecting content, without putting the data itself on-chain.
produces two components when the contract is deployed: the bytecode to run on EVM and the Program Binary Interface (ABI). Bytecode runs whenever a function is called from the application and stored into Ethereum blockchain under contract address. ABI defines the structures and functions that can be invoked explicitly. In other words, ABI grants access to call functions in smart contracts. To sum up, three requirements should be satisfied to interact with a smart contract:
Bytecode must be deployed to the blockchain.
Address of bytecode must be known.
ABI of the smart contract must be known.
To complete system integration we used pyQt package to build main system interface, pyQt is the standard Python interface to the Qt GUI toolkit. Both Qt and pyQt are available on most Unix platforms, including macOS, as well as on Windows systems. also we used flask and it is main integration component between main system and IOT sensors, Flask is a lightweight WSGI web application framework.
It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks. Also OpenCV used to process images (QRCode), OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.
OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and modify the code.
The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms.
These algorithms can be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, extract 3D models of objects, produce 3D point clouds from stereo cameras, stitch images together to produce a high resolution image of an entire scene, find similar images from an image database, remove red eyes from images taken using flash, follow eye movements, recognize scenery and establish markers to overlay it with augmented reality, etc.
OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 18 million. The library is used extensively in companies, research groups and by governmental bodies. Pyzbar and Pyqrcode used to generate and decode Qrcodes, Pyzbar is a pure Python library that reads one-dimensional barcodes and QR codes using the zbar library, an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors.
The pyqrcode module is a QR code generator that is simple to use and written in pure python. The module can automates most of the building process for creating QR codes. Most codes can be created using only two lines of code! Unlike other generators, all of the helpers can be controlled manually.
ESP8266 is all about Wi-Fi. If you are eager to connect your new ESP8266 module to a Wi-Fi network to start sending and receiving data. DHT sensor library is an Arduino library for the DHT series of low-cost temperature/humidity sensors.
In summary, we can implement are as follows:
Design concept of an end-to-end embedded system
Basic principles of blockchain and decentralized storage technologies
Creating transactions on Ethereum network
Writing smart contracts and designing decentralized autonomous applications (DApp)
Pushing IoT device data into the IPFS and storing a reference to the file in a smart contract.
System Design [ Sequence Diagram]
Figure 2, Sequence diagram showing interactions among manufacturer, Distributor, Smart contract and end consumer
The tools and technologies used for the implementation
System Component
Description
Operating System
win10
CPU
Intel (R) Core (TM) i7
Ethereum
v1.12
CLI Tool
gnash
Programming Language
python, Solidity
Client application)
Solidity, HTML,
IDE (Platform)
remix ide
Buy Answer of This Assessment & Raise Your Grades
The post Nowadays, the issue of counterfeiting in the pharmaceutical industry is one of the main challenges facing many countries: Experimental Results Thesis, UK appeared first on Students Assignment Help UK.