0% found this document useful (0 votes)
124 views82 pages

Blockchain Drug Traceability Solution

Healthcare supply chains are complex structures spanning across multiple organizational and geographical boundaries, providing critical backbone to services vital for everyday life. The inherent complexity of such systems can introduce impurities including inaccurate information, lack of transparency and limited data provenance. Counterfeit drugs is one consequence of such limitations within existing supply chains which not only has serious adverse impact on human health but also causes severe e

Uploaded by

narayanait
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views82 pages

Blockchain Drug Traceability Solution

Healthcare supply chains are complex structures spanning across multiple organizational and geographical boundaries, providing critical backbone to services vital for everyday life. The inherent complexity of such systems can introduce impurities including inaccurate information, lack of transparency and limited data provenance. Counterfeit drugs is one consequence of such limitations within existing supply chains which not only has serious adverse impact on human health but also causes severe e

Uploaded by

narayanait
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 82

ABSTRACT

Healthcare supply chains are complex structures spanning across multiple organizational
and geographical boundaries, providing critical backbone to services vital for everyday life. The
inherent complexity of such systems can introduce impurities including inaccurate information,
lack of transparency and limited data provenance. Counterfeit drugs is one consequence of such
limitations within existing supply chains which not only has serious adverse impact on human
health but also causes severe economic loss to the healthcare industry. Consequently, existing
studies have emphasized the need for a robust, end to-end track and trace system for
pharmaceutical supply chains. Therein, an end-to-end product tracking system across the
pharmaceutical supply chain is paramount to ensuring product safety and eliminating
counterfeits. Most existing track and trace systems are centralized leading to data privacy,
transparency and authenticity issues in healthcare supply chains. In this paper, we present an
Ethereum blockchain-based approach leveraging smart contracts and decentralized off-chain
storage for efficient product traceability in the healthcare supply chain. The smart contract
guarantees data provenance, eliminates the need for intermediaries and provides a secure,
immutable history of transactions to all stakeholders. We present the system architecture and
detailed algorithms that govern the working principles of our proposed solution. We perform
testing and validation, and present cost and security analysis of the system to evaluate its
effectiveness to enhance traceability within pharmaceutical supply chains.
1. INTRODUCTION
Healthcare supply chain is a complex network of several independent entities that include
raw material suppliers, manufacturer, distributor, pharmacies, hospitals and patients. Tracking
supplies through this network is non-trivial due to several factors including lack of information,
centralized control and competing behaviour among stakeholders. Such complexity not only
results in in-efficiencies such as those highlighted through COVID-19 pandemic but can also
aggravate the challenge of mitigating against counterfeit drugs as these can easily permeate the
healthcare supply chain. Counterfeit drugs are products deliberately and fraudulently produced
and/or mislabeled with respect to identity and/or source to make it appear to be a genuine
product. Such drugs can include medications that contain no active pharmaceutical ingredient
(API), an incorrect amount of API, an inferior-quality API, a wrong API, contaminants, or
repackaged expired products. Some counterfeit medications may even be incorrectly formulated
and produced in substandard conditions .

According to the Health Research Funding Organization, up to 30% of the drugs sold in
developing countries are counterfeit. Further, a recent study by World Health Organization
(WHO) indicated counterfeit drugs as one of the major causes of deaths in developing countries,
and in most case the victims are children. In addition to the adverse impact on human lives,
counterfeit drugs also cause significant economic loss to the pharmaceutical industry. In this
respect, the annual economic loss to the US pharmaceutical industry due to counterfeit medicine
is estimated around $200 billion .

A typical drug supply chain distribution process is illustrated in Figure 1. An API supplier
is responsible for delivering the raw materials to manufacture drugs approved by a regulatory
agency such as the US Food and Drug Administration (US FDA). The manufacturer packages
the drug into a Lot or sends it to a re-packager. The primary distributor receives several Lots of
the product and is responsible for transferring them o pharmacies based on product demand or
secondary distributors (in case the quantity of Lots is very large) who can transfer these Lots to
the pharmacies Finally, a pharmacy will dispense the drug to patients typically based on a
doctor’s prescription. Throughout the supply chain, the transfer of drugs is usually facilitated b
third party logistic service providers such as UPS or FedEx and in some cases the distributors
operate their own fleet of vehicles to transport the products.
The primary reason for counterfeit drugs to reach end-user marketplace is due to the complex
structure of a healthcare supply chain. Leveraging the complexity of this distribution process,
medications can easily pass through with little o no trail of information and verifiable
documentation. Consequently, monitoring, effective control and tracking of products in
healthcare supply chain is fundamental to combating counterfeits.
The importance of drug traceability (track and trace) I increasingly emphasized and mandated
by several countries across the world. For example, the U.S. Drug Supply Chain Security Act
(DSCSA) has made it mandatory for the pharmaceutical industry to develop an electronic and
interoperable system that identifies and tracks prescription drugs as they are distributed across
the United States. Similarly, over the last 8 years, China required all the stakeholders involved in
the drugs supply chain to record information of individual pharmaceutical products in a
specialized IT system whenever drugs are sent to/from their warehouses. Therefore, drug
traceability has become an integral part of the pharmaceutical supply chain as it establishes
authenticity, and aims to track and trace chain of custody of the product across drug supply
chain.
Block chain technology has introduced a new model of application development
primarily based on the successful implementation of the data structure within the Bitcoin
application. The fundamental concept of the block chain data structure is similar to a linked list
i.e. it is shared among all the nodes of the network where each node keeps its local copy of all
the blocks (associated with the longest chain) starting from its genesis block. Recently, many
real-world application have been developed in diverse domains, such as the Internet of Things, e-
Government and e-document management. These applications leverage benefits of block chain
technology due to its self-cryptographic validation structure among transactions (through
hashes), and public availability of distributed ledger of transaction-records in a peer-to-peer
network. Creating a chain of blocks connected by cryptographic constructs (hashes) makes it
very difficult to tamper the records, as it would cost the rework from the genesis to the latest
transaction in blocks as illustrated by.
Within the context of block chain-based traceability for pharmaceutical supply chain,
presents one of the initial efforts. Although our solution has similarities with this effort due to the
focus on pharmaceutical supply chain as well as the use of block chains, we take a holistic view
of the pharmaceutical supply chain, presenting an end-to-end solution for drug traceability
whereas only focused on a subset of these challenges. Firstly, our approach identifies and
engages major stakeholders in the drug supply chain i.e. the FDA, supplier, manufacturer,
distributor, pharmacy, and patient, whereas is limited to the supplier, manufacturer, and
wholesaler as the stakeholders. Consequently, the pharmacists are represented as an external
entity which is not the case in a real drug supply chain. Secondly, we make explicit efforts to
identify and define relationships among stakeholders, on-chain resources, smart contracts, and
decentralized storage systems which is lacking in. Furthermore, in view of the significance of
interactions among stakeholders, we have included precise definitions to remove any ambiguity,
whereas such interactions have not been defined as part of. Thirdly, we use the smart contracts
technology to achieve real-time, seamless traceability with push notifications so as to minimize
human intervention and therefore undesired delays. Specifically, each drug Lot is assigned a
unique smart contract that generates an event whenever a change in ownership occurs and a list
of events is delivered to the DAPP user. However, the smart contracts in are programmed for
specific roles such as supplier, manufacturer, and wholesaler which requires each participant to
manually confirm which drugs are received. Such approach can introduce delays and
inaccuracies in the immutable data stored on the ledger. Finally, we have conducted a cost and
security analysis to evaluate the performance of the proposed solution including discussion on
how the proposed solution can be generalized to other supply chains.
The challenge of achieving traceability to mitigate against counterfeit drugs is well-
established and several efforts have been made to address this within pharmaceutical industry.
However, a careful review of literature presents several gaps and opportunities for a
comprehensive application of block chain technology for drug traceability. In this context, the
primary contributions of this paper can be summarized as follows:
3. SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
Traceability is defined as the ability to access any or all information relating to the object
under consideration, throughout its life cycle, by means of recorded identifications. The object
under consideration is referred to as Traceable Resource Unit (TRU) which is any traceable
object within the supply chain. Traceability objectives are twofold; to track the history of
transactions, and to track the real-time position of the TRU. In this context, a traceability system
requires access to information related to the drug which is the TRU in the supply chain by using
different identification techniques to record its identity and distinguish it from other TRUs. The
components of a traceability system can be broadly identified by a mechanism for identifying
TRUs, a mechanism for documenting the connections between TRUs, and a mechanism for
recording the attributes of the TRUs [21].

Existing solutions within supply chain management have traditionally used barcodes and
RFID tags as identification techniques, Wireless Sensor Networks (WSN) to capture data, and
Electronic Product Code (EPC) to identify, capture, and share product information to facilitate
tracking of goods through different stages [22] . In this context, Smart-Track [23] utilizes GS1
standards barcodes containing unique serialized product identifier, Lot production and expiration
dates.

The information contained in the GS1 barcode is captured across various supply chain
processes and used to maintain a continuous log of ownership transfers. As each stakeholder
records the possession of the product, an end user (patient) can verify authenticity through
central data repository maintained as Global Data Synchronization Network (GDSN) by using a
smart phone app. In the downstream supply chain at the warehouse, pharmacy and hospital units
can scan the barcode to verify the product and its characteristics. Similarly, Data-Matrix tracking
system [24] creates a Data-Matrix for each drug which includes the manufacturer ID, Product ID,
Unique ID of the package, the authentication code, and an optional meta-data. This allows the
patient to verify the origin of the drug by using the attached Data-Matrix.
Disadvantages:

 The system is less secured since blockchain techniques which are maintains trust between
data are not implemented.
 Trust is not implemented in which a multidisciplinary and multifaceted concept that has
been defined in various disciplines, such as sociology, economics, psychology,
computation, information and computer science, to model different types of relationships.
3.2 PROPOSED SYSTEM

The proposed system implements which approaches identifies and engages major
stakeholders in the drug supply chain i.e. the FDA, supplier, manufacturer, distributor,
pharmacy, and patient, whereas [20] is limited to the supplier, manufacturer, and wholesaler as
the stakeholders. Consequently, the pharmacists are represented as an external entity which is not
the case in a real drug supply chain.

Secondly, we make explicit efforts to identify and define relationships among


stakeholders, on-chain resources, smart contracts, and decentralized storage systems which is
lacking in [20]. Furthermore, in view of the significance of interactions among stakeholders, we
have included precise definitions to remove any ambiguity, whereas such interactions have not
been defined as part of [20].

Thirdly, we use the smart contracts technology to achieve real-time, seamless traceability
with push notifications so as to minimize human intervention and therefore undesired delays.
Specifically, each drug Lot is assigned a unique smart contract that generates an event whenever
a change in ownership occurs and a list of events is delivered to the DApp user. However, the
smart contracts in [20] are programmed for specific roles such as supplier, manufacturer, and
wholesaler which requires each participant to manually confirm which drugs are received. Such
approach can introduce delays and inaccuracies in the immutable data stored on the ledger.

Finally, we have conducted a cost and security analysis to evaluate the performance of
the proposed solution including discussion on how the proposed solution can be generalized to
other supply chains.
Advantages:

 The system proposes a blockchain-based solution for the pharmaceutical supply chain
that provides security, traceability, immutability, and accessibility of data provenance for
pharmaceutical drugs.
 The system designs a smart contract capable of handling various transactions among
pharmaceutical supply chain stakeholders.
 The system presents, implement and test the smart contract that defines the working
principles of our proposed solution.
 The system conducts security and cost analysis to evaluate the performance of the
proposed blockchain-based solution.

3.3FEASIBILITY STUDY
An important outcome of preliminary investigation is the determination that the system request is
feasible. This is possible only if it is feasible within limited resource and time. The different
feasibilities that have to be analyzed are

 Operational Feasibility
 Economic Feasibility
 Technical Feasibility

Operational Feasibility

Operational Feasibility deals with the study of prospects of the system to be developed. This
system operationally eliminates all the tensions of the Admin and helps him in effectively
tracking the project progress. This kind of automation will surely reduce the time and energy,
which previously consumed in manual work. Based on the study, the system is proved to be
operationally feasible.
Economic Feasibility

Economic Feasibility or Cost-benefit is an assessment of the economic justification for a


computer based project. As hardware was installed from the beginning & for lots of purposes
thus the cost on project of hardware is low. Since the system is a network based, any number of
employees connected to the LAN within that organization can use this tool from at anytime. The
Virtual Private Network is to be developed using the existing resources of the organization. So
the project is economically feasible.

Technical Feasibility

According to Roger S. Pressman, Technical Feasibility is the assessment of the technical


resources of the organization. The organization needs IBM compatible machines with a graphical
web browser connected to the Internet and Intranet. The system is developed for platform
Independent environment. Java Server Pages, JavaScript, HTML, SQL server and WebLogic
Server are used to develop the system. The technical feasibility has been carried out. The system
is technically feasible for development and can be developed with the existing facility.

3.4MODULES OF THE PROJECT


 Pharmacy Seller
 View And Authorize Users
 View Chart Results
 Users
3.4.1 Pharmacy sller

In this module, the seller has to login by using valid user name and password. After login
successful he can do some operations such as View & Authorize Users,Add Categories,Add
Drug,View all Drugs, View all Purchased Drugs, Find Total Bill On Purchased Drugs, List All
Drugs by Chain Tree, List All reviewed comments on Drugs,List All Search and View Details
History,View All User’s Drug Search, View Drugs Rank chart,View Search ratio in chart.

3.4.2 View and Authorize Users

In this module, the seller can view the list of users who all registered. In this, the admin can
view the user’s details such as, user name, email, address and admin authorizes the users.
3.4.3 View Chart Results

In this, the seller can view all charts related to View Search ratio in chart, View Drugs rank
in Chart.

3.4.4 User

In this module, there are n numbers of users are present. User should register before doing any
operations. Once user registers, their details will be stored to the database. After registration
successful, he has to login by using authorized user name and password. Once Login is
successful user will do some operations like My Profile,Account Management,Search Drugs and
Purchase,View my search History,View Drugs by Chain Tree,View Other Patient Comments On
Drugs,View Top K Drugs Purchase,View Top K Query Details.
4. HARDWARE AND SOFTWARE REQUIREMENTS
SPECIFICATIONS

H/W System Configuration:

 Processor - Pentium –IV


 RAM - 4 GB (min)
 Hard Disk - 20 GB
 Key Board - Standard Windows Keyboard
 Mouse - Two or Three Button Mouse
 Monitor - SVGA

Software Requirements:

 Operating System - Windows XP


 Coding Language - Java/J2EE(JSP,Servlet)
 Front End - J2EE
 Back End - MySQL

5. SYSTEM DESIGN
5.1 INTRODUCTION

A graphical tool used to describe and analyse the moment of data through a system manual or
automated including the process, stores of data, and delays in the system. Data Flow Diagrams
are the central tool and the basis from which other components are developed. The
transformation of data from input to output, through processes, may be described logically and
independently of the physical components associated with the system. The DFD is also known as
a data flow graph or a bubble chart. DFDs are the model of the proposed system. They clearly
should show the requirements on which the new system should be built. Later during design
activity this is taken as the basis for drawing the system’s structure charts. The Basic Notation
used to create a DFD’s are as follows:

1. Dataflow: Data move in a specific direction from an origin to a destination.

2.Process: People, procedures, or devices that use or produce (Transform) Data. The physical
component is not identified.

3.Source: External sources or destination of data, which may be People, programs, organizations
or other entities.
Systems design is the process or art of defining the architecture, components, modules,
interfaces, and data for a system to satisfy specified requirements. One could see it as the
application of systems theory to product development. There is some overlap and synergy with
the disciplines of systems analysis, systems architecture and systems engineering. Database
Designing is a part of the development process. In the linear development cycle, it is used during
the system requirements phase to construct the data components of the analysis model. This
model represents the major data objects and the relationship between them. It should not be
confused with data analysis, which takes place in the system design phase. As in a DFD, a model
of data consists of a number of symbols joined up according to certain conventions. System
designers describe these conceptual modeling using symbols from a modeling method known as
entity relationship analysis.
Entity Relationship Diagram:
Entity relationship analysis uses three major abstractions to describe data.
These are
1. Entities, which are distinct things in the enterprise.
2. Relationships, which are meaningful interactions between the objects.
3. Attributes, which are the properties of the entities and relationship.
The relative simplicity and pictorial clarity of this diagramming technique
may well account in large part for the widespread use of ER model. Such a diagram consists of
the following major components.
E-R Diagram Components:

Rectangles, which represent the entity set.

Ellipse, which represent attributes.


Diamonds, which represent relationship sets.

Lines, which link attributes to entity sets and entity sets to relationships.

Double Ellipse, which represents multi valued attributes.

Double lines, which indicates total participation of an

entity in a relationship set.

Entity

 An entity is an object that exists and is distinguishable from other objects.


 An entity may be concrete or abstract.
 An entity is a set of entities of the same type.
 Entity sets need not be disjoint.
 An entity is represented by a set of attributes.

Mapping Constraints:

An E-R diagram may define certain constraints which the contents of a database must conform.

Mapping Cardinalities:
It expresses the number of entities to which another entity can be associated via a relationship.
For binary relationship sets between entity sets A and B, the mapping cardinality must be one of
the following:

One-to-One – An entity in A is associated with at most one entity in B, and an entity in B is


associated with at most one entity in A.

One-to-many -An entity in A is associated with any number in B. An entity in B is associated


with any number in A.

Many-to-many – Entities in A and B are associated with any number from each other.

Cardinality: It indicates that which type relationship the business rule follows is called
cardinality.

Connectivity: It specifies that which type of notation the entities are connected in both sides that
one side or many side.

5.2 DATA DICTIONARY

The logical characteristics of current systems data stores, including name, description, aliases,
contents, and organization, identifies processes where the data are used and where immediate
access to information required, serves as the basis for identifying database requirements during
system design.

Uses of Data Dictionary

 To manage the details in large systems.


 To communicate a common meaning for all system elements.
 To Document the features of the system
 To facilitate analysis of the details in order to evaluate characteristics and determine where
system changes should be made.
 To locate errors and omissions in the system.

5.3 UML DIAGRAMS


It is a language to specifying, visualizing and constructing the artifacts of software system as
well as for business models. UML was originally motivated by the desire to standardize the
disparate notational system and approaches to software design developed by Grady Brooch, Ivar
Jacobson and James Rumbaugh at Rational Software in 1994-95. The UML notation is useful for
graphically depicting Object Oriented Analysis and Object-Oriented Design modules. The
unified modeling language is a standard language for specifying, Visualizing, Constructing and
documenting the software system and its components. It is a graphical language that provides a
vocabulary and set of semantics and rules. The UML focuses on the conceptual and physical
representation of the system. It captures the decisions and understandings about systems that
must be constructed. It is used to understand, design, configure, maintain and control information
about the systems.

An Overview of UML

The Unified Modeling Language is a language for

 Visualizing.
 Specifying.
 Constructing.
 Documenting.

UML Models

User model view

 This view represents the system from the user’s perspective.


 The analysis representation describes a usage scenario from the end-user’s perspective.

Structural model view

 In this model the data and functionality are arrived from inside the system.
 This model view models the static structures.

Behavioural model view


It represents the dynamic of Behavioural as parts of the system, depicting the interactions of
collection between various structural elements described in the user model and structural model
view.

Implementation model view

In this the structural and behavioural as parts of the system are represented as they are to be
built.

Environmental model view

In these the structural and Behavioral aspects of the environment in which the system is to be
implemented are represented. UML is specifically constructed through two different domains
they are

 UML Analysis modeling, this focuses on the user model and structural model views of the
system.
 UML design modeling, which focuses on the Behavioural modeling, implementation
modeling and environmental model views.

A Conceptual model of UML

 The three major elements of UML are


 The UML’s basic building blocks.
 The rules that dictate how those building blocks may be put together.
 Some common mechanisms that apply throughout the UML.

Basic building blocks of the UML

The vocabulary of UML encompasses three kinds of building blocks

 Things.
 Relationships.
 Diagrams.

Things
Things are the abstractions that are first-class citizens in a model. Relationships tie these things
together. Diagrams group the interesting collection of things. There are four kinds of things in
the UML

 Structural things
 Behavioural things
 Grouping things
 Annotational things

Structural Things

Structural things are the nouns of the UML models. These are mostly static parts of the model,
representing elements that are either conceptual or physical. In all, there are seven kinds of
Structural things.

Use Case

Use case is a description of a set of sequence of actions that a system performs that yields an
observable result of value to a particular thing in a model. Graphically, Use Case is rendered as
an ellipse with dashed lines, usually including only its name as shown below.

Fig- 5.3.1: Sample Use case diagram

Class

A class is a description of a set of objects that share the same attributes, operations,
relationships, and semantics. A class implements one or more interfaces. Graphically a class is
rendered as a rectangle, usually including its name, attributes and operations, as shown below.

Windows
Origin
Size
Open ()
Close ()
Move ()

Display ()
Fig-5.3.2: Sample Class Diagram

Interface

An interface is a collection of operations that specify a service of a class or component. An


interface describes the externally visible behaviour of element. Graphically the interface is
rendered as a circle together with its name

Fig-5.3.3: Interface

Collaboration

Collaboration defines an interaction and is a society of roles and other elements that work
together to provide some cooperative behaviour that’s bigger than the sum of all the elements.
Graphically, collaboration is rendered as an ellipse with dashed lines, usually including only its
name as shown below.
Fig-5.3.4: Sample Collaboration Diagram

Component

Component is a physical and replaceable part of a


system that conforms to and provides the
realization of a set of interfaces. Graphically, a
component is rendered as a rectangle with tabs,
usually including only its name, as
shown below.

Fig-5.3.5: Sample Component Diagram

Node
A Node is a physical element that exists at run time and represents a computational resource,
generally having at least some memory and often, processing capability. Graphically, a node is
rendered as a cube,usually including only its name, as show below.

Fig-5.3.6: Sample Node Diagram

Behavioural Things

Behavioural things are the dynamic parts of UML models. These are the verbs of a model,
representing behaviour over time and space.

Interaction

An interaction is a behaviour that comprises a set of messages exchanged among a set of objects
within a particular context to accomplish a specific purpose.

Display

Fig-5.3.7: Sample Interaction Diagram

State Machine

A state machine is a behaviour that specifies the sequence of states an object or an interaction
goes through during its lifetime on response to events, together with its responses to those
events. Graphically, a state is rendered as rounded rectangle usually including its name and its
sub-states, if any, as shown below.
Fig-5.3.8: Sample State Machine

Grouping Things
Grouping things are the organizational parts of the UML models. These are the boxes into which
a model can be decomposed.
Package
A package is a general-purpose mechanism for organizing elements into groups.

Fig-5.3.9: Sample Package Diagram

Annotational Things

Annotational things are the explanatory parts of the UML models.

Notes

A note is simply a symbol for rendering constraints and comments attached to an element or a
collection of elements. Graphically a note is rendered as a rectangle with dogeared corner
together, with a textual or graphical comment, as shown below.
Fig-5.3.10: Sample Note Diagram

Relationships in the UML

There are four kinds of relationships in the UML

 Dependency.
 Association.
 Generalization.
 Realization.

These relationships are the basic relational building blocks of the UML. You use them to write
well-formed models. Graphically dependency is rendered as a dashed line, possibly directed, and
occasionally including a label.

------------------->

Fig-5.3.11: Dependency

Second, an association is a structural relationship that describes a set of links, a link being a
connection among objects. Aggregation is a special kind of association, representing a structural
relationship between a whole and its parts. Graphically, an association is rendered as a solid line,
possibly directed, occasionally including a label, and often containing other adornments, such as
multiplicity and role names.

Employer Employee

Fig-5.3.12: Association
Third, a generalization is a specialization/generalization relationship in which objects of the
specialized element are substitutable for objects of the generalized element (the parent). In this
way, the child shares the structure and the behaviour of the parent. Graphically a generalization
relationship is rendered as a solid line with a hollow arrowhead pointing to the parent.

Fig-5.3.13: Generalization

Fourth, a realization is a semantic relationship between classifiers, wherein one classifier


specifies a contract that another classifier guarantees to carry out. You’ll encounter realization
relationships in two places between interfaces and the classes or components that realize them
and between use cases and the collaborations that realize them

Fig-5.3.14: Realization

Each UML diagram is designed to let developers and customers view a software system from a
different perspective and in varying degrees of abstraction. Use Case Diagram displays the
relationship among actors and use cases. Class Diagram models class structure and contents
using design elements such as classes, packages and objects. It also displays relationships such as
containment, inheritance, associations and others.

Interaction Diagrams

Sequence Diagram displays the time sequence of the objects participating in the interaction. This
consists of the vertical dimension (time) and horizontal dimension (different objects).

 Collaboration Diagram displays an interaction organized around the objects and their links to
one another. Numbers are used to show the sequence of messages.
 State Diagram displays the sequences of states that an object of an interaction goes through
during its life in response to received stimuli, together with its responses and actions.
Activity Diagram displays a special state diagram where most of the states are action states
and most of the transitions are triggered by completion of the actions in the source states.
This diagram focuses on flows driven by internal processing.
Physical Diagrams

 Component Diagram displays the high-level packaged structure of the code itself.
Dependencies among components are shown, including source code components, binary
code components, and executable components. Some components exist at compile time, at
link time, at run times well as at more than one time.
 Deployment Diagram displays the configuration of run-time processing elements and the
software components, processes, and objects that live on them. Software component
instances represent run-time manifestations of code.

Diagrams in the UML

5.3.1 Use Case Diagram

Use case diagram graphically depict system behaviour. These diagrams present a high-level view
of how the system is used as viewed from an outsider’s (actor’s) perspective. A use-case diagram
may depict all or some of the use cases of a system. A use-case diagram can contain:

 Actors
 Use cases

Interaction or relationship between actor and use cases in the system including the associations,
dependencies, and generalizations. Use-case diagram can be used during analysis to capture the
system requirements and to understand how the system should work. During the design phase,
you can use use-case diagrams to specify the behaviour of the systems implemented.
Use Case Diagram

Fig-5.3.1.1: Use Case Diagram


5.3.2. Class Diagram
In engineering, a class diagram in the Unified Modeling Language (UML) is a type of static
structure diagram that describes the structure of a system by showing the system's classes, their
attributes, operations (or methods), and the relationships among the classes. It explains which
class contains information.
Fig-5.3.2.1: Class Diagram

5.3.3 Sequence Diagram


A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and
timing diagrams.

Fig-5.3.3.1: Sequence Diagram

6. IMPLEMENTATION AND RESULTS


6.1 Technology Used
Java technology is both a programming language and a platform.

The Java Programming Language

The Java programming language is a high-level language that can be characterized by all of the
following buzzwords:

 Simple
 Architecture neutral
 Object oriented
 Portable
 Distributed
 High performance
 Interpreted
 Multithreaded
 Robust
 Dynamic
 Secure
With most programming languages, you either compile or interpret a program so that
you can run it on your computer. The Java programming language is unusual in that a program is
both compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes —the platform-independent codes interpreted by
the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time the
program is executed. The following figure illustrates how this works.

- 6.1.1 : Java Compiler Architecture


Fig- 6.1.1 : Java Compiler Architecture

You can think of Java byte codes as the machine code instructions for the Java Virtual
Machine (Java VM). Every Java interpreter, whether it’s a development tool or a Web browser
that can run applets, is an implementation of the Java VM. Java byte codes help make “write
once, run anywhere” possible. You can compile your program into byte codes on any platform
that has a Java compiler. The byte codes can then be run on any implementation of the Java VM.
That means that as long as a computer has a Java VM, the same program written in the Java
programming language can run on Windows 2000, a Solaris workstation, or on an iMac.

Fig- 6.1.2 : Platform Independent Architecture


The Java Platform
A platform is the hardware or software environment in which a program runs.
We’ve already mentioned some of the most popular platforms like Windows 2000,
Linux, Solaris, and MacOS. Most platforms can be described as a combination of the
operating system and hardware. The Java platform differs from most other platforms in
that it’s a software-only platform that runs on top of other hardware-based platforms.

The Java platform has two components:


 The Java Virtual Machine (Java VM)
 The Java Application Programming Interface (Java API)
You’ve already been introduced to the Java VM. It’s the base for the Java platform
and is ported onto various hardware-based platforms.
The Java API is a large collection of ready-made software components that provide
many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is
grouped into libraries of related classes and interfaces; these libraries are known as
packages. The next section, What Can Java Technology Do? Highlights what
functionality some of the packages in the Java API provide.
The following figure depicts a program that’s running on the Java platform. As the
figure shows, the Java API and the virtual machine insulate the program from the
hardware.

Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be a
bit slower than native code. However, smart compilers, well-tuned interpreters, and just-
in-time byte code compilers can bring performance close to that of native code without
threatening portability.

What Can Java Technology Do?


The most common types of programs written in the Java programming language are
applets and applications. If you’ve surfed the Web, you’re probably already familiar with
applets. An applet is a program that adheres to certain conventions that allow it to run
within a Java-enabled browser.

However, the Java programming language is not just for writing cute, entertaining applets
for the Web. The general-purpose, high-level Java programming language is also a
powerful software platform. Using the generous API, you can write many types of
programs.
An application is a standalone program that runs directly on the Java platform. A special
kind of application known as a server serves and supports clients on a network. Examples
of servers are Web servers, proxy servers, mail servers, and print servers. Another
specialized program is a servlet. A servlet can almost be thought of as an applet that runs
on the server side. Java Servlets are a popular choice for building interactive web
applications, replacing the use of CGI scripts. Servlets are similar to applets in that they
are runtime extensions of applications. Instead of working in browsers, though, servlets
run within Java Web servers, configuring or tailoring the server.
How does the API support all these kinds of programs? It does so with packages of
software components that provides a wide range of functionality. Every full
implementation of the Java platform gives you the following features:
 The essentials: Objects, strings, threads, numbers, input and output, data
structures, system properties, date and time, and so on.
 Applets: The set of conventions used by applets.
 Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram
Protocol) sockets, and IP (Internet Protocol) addresses.
 Internationalization: Help for writing programs that can be localized for users
worldwide. Programs can automatically adapt to specific locales and be displayed
in the appropriate language.
 Security: Both low level and high level, including electronic signatures, public
and private key management, access control, and certificates.
 Software components: Known as JavaBeansTM, can plug into existing component
architectures.
 Object serialization: Allows lightweight persistence and communication via
Remote Method Invocation (RMI).
 Java Database Connectivity (JDBCTM): Provides uniform access to a wide
range of relational databases.
The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts what
is included in the Java 2 SDK.
Fig- 6.1.3 : JRE

How Will Java Technology Change My Life?

We can’t promise you fame, fortune, or even a job if you learn the Java programming
language. Still, it is likely to make your programs better and requires less effort than
other languages. We believe that Java technology will help you do the following:

 Get started quickly: Although the Java programming language is a powerful


object-oriented language, it’s easy to learn, especially for programmers already
familiar with C or C++.
 Write less code: Comparisons of program metrics (class counts, method counts,
and so on) suggest that a program written in the Java programming language can
be four times smaller than the same program in C++.
 Write better code: The Java programming language encourages good coding
practices, and its garbage collection helps you avoid memory leaks. Its object
orientation, its JavaBeans component architecture, and its wide-ranging, easily
extendible API let you reuse other people’s tested code and introduce fewer bugs.
 Develop programs more quickly: Your development time may be as much as
twice as fast versus writing the same program in C++. Why? You write fewer
lines of code and it is a simpler programming language than C++.
 Avoid platform dependencies with 100% Pure Java: You can keep your
program portable by avoiding the use of libraries written in other languages. The
100% Pure JavaTM Product Certification Program has a repository of historical
process manuals, white papers, brochures, and similar materials online.
 Write once, run anywhere: Because 100% Pure Java programs are compiled into
machine-independent byte codes, they run consistently on any Java platform.
 Distribute software more easily: You can upgrade applets easily from a central
server. Applets take advantage of the feature of allowing new classes to be loaded
“on the fly,” without recompiling the entire program.
6.2 Methods of Implementation
ODBC
Microsoft Open Database Connectivity (ODBC) is a standard programming interface for
application developers and database systems providers. Before ODBC became a de facto
standard for Windows programs to interface with database systems, programmers had to use
proprietary languages for each database they wanted to connect to. Now, ODBC has made the
choice of the database system almost irrelevant from a coding perspective, which is as it should
be. Application developers have much more important things to worry about than the syntax that
is needed to port their program from one database to another when business needs suddenly
change.
Through the ODBC Administrator in Control Panel, you can specify the particular
database that is associated with a data source that an ODBC application program is written to
use. Think of an ODBC data source as a door with a name on it. Each door will lead you to a
particular database. For example, the data source named Sales Figures might be a SQL Server
database, whereas the Accounts Payable data source could refer to an Access database. The
physical database referred to by a data source can reside anywhere on the LAN.
The ODBC system files are not installed on your system by Windows 95. Rather, they
are installed when you setup a separate database application, such as SQL Server Client or
Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a file called
ODBCINST.DLL. It is also possible to administer your ODBC data sources through a stand-
alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit version of this program
and each maintains a separate list of ODBC data sources.
From a programming perspective, the beauty of ODBC is that the application can be
written to use the same set of function calls to interface with any data source, regardless of the
database vendor. The source code of the application doesn’t change whether it talks to Oracle or
SQL Server. We only mention these two as an example. There are ODBC drivers available for
several dozen popular database systems. Even Excel spreadsheets and plain text files can be
turned into data sources. The operating system uses the Registry information written by ODBC
Administrator to determine which low-level ODBC drivers are needed to talk to the data source
(such as the interface to Oracle or SQL Server). The loading of the ODBC drivers is transparent
to the ODBC application program. In a client/server environment, the ODBC API even handles
many of the network issues for the application programmer.
The advantages of this scheme are so numerous that you are probably thinking there must
be some catch. The only disadvantage of ODBC is that it isn’t as efficient as talking directly to
the native database interface. ODBC has had many detractors make the charge that it is too slow.
Microsoft has always claimed that the critical factor in performance is the quality of the driver
software that is used. In our humble opinion, this is true. The availability of good ODBC drivers
has improved a great deal recently. And anyway, the criticism about performance is somewhat
analogous to those who said that compilers would never match the speed of pure assembly
language. Maybe not, but the compiler (or ODBC) gives you the opportunity to write cleaner
programs, which means you finish sooner. Meanwhile, computers get faster every year.

JDBC
In an effort to set an independent database standard API for Java; Sun Microsystems
developed Java Database Connectivity, or JDBC. JDBC offers a generic SQL database access
mechanism that provides a consistent interface to a variety of RDBMSs. This consistent interface
is achieved through the use of “plug-in” database connectivity modules, or drivers. If a database
vendor wishes to have JDBC support, he or she must provide the driver for each platform that the
database and Java run on.
To gain a wider acceptance of JDBC, Sun based JDBC’s framework on ODBC. As you
discovered earlier in this chapter, ODBC has widespread support on a variety of platforms.
Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market much faster than
developing a completely new connectivity solution.
JDBC was announced in March of 1996. It was released for a 90 day public review that
ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was released soon
after.
The remainder of this section will cover enough information about JDBC for you to know what it
is about and how to use it effectively. This is by no means a complete overview of JDBC. That
would fill an entire book.

JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that, because of
its many goals, drove the development of the API. These goals, in conjunction with early
reviewer feedback, have finalized the JDBC class library into a solid framework for building
database applications in Java.
The goals that were set for JDBC are important. They will give you some insight as to why
certain classes and functionalities behave the way they do. The eight design goals for JDBC are
as follows:

1. SQL Level API


The designers felt that their main goal was to define a SQL interface for Java. Although
not the lowest database interface level possible, it is at a low enough level for higher-level
tools and APIs to be created. Conversely, it is at a high enough level for application
programmers to use it confidently. Attaining this goal allows for future tool vendors to
“generate” JDBC code and to hide many of JDBC’s complexities from the end user.

2. SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an effort to
support a wide variety of vendors, JDBC will allow any query statement to be passed through
it to the underlying database driver. This allows the connectivity module to handle non-
standard functionality in a manner that is suitable for its users.

3. JDBC must be implemental on top of common database interfaces


The JDBC SQL API must “sit” on top of other common SQL level APIs. This goal
allows JDBC to use existing ODBC level drivers by the use of a software interface. This
interface would translate JDBC calls to ODBC and vice versa.
4. Provide a Java interface that is consistent with the rest of the Java system
Because of Java’s acceptance in the user community thus far, the designers feel that they
should not stray from the current design of the core Java system.

5. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no exception.
Sun felt that the design of JDBC should be very simple, allowing for only one method of
completing a task per mechanism. Allowing duplicate functionality only serves to confuse
the users of the API.

6. Use strong, static typing wherever possible


Strong typing allows for more error checking to be done at compile time; also, less error
appear at runtime.

7. Keep the common cases simple


Because more often than not, the usual SQL calls used by the programmer are simple
SELECT’s, INSERT’s, DELETE’s and UPDATE’s, these queries should be simple to
perform with JDBC. However, more complex SQL statements should also be possible.
Finally we decided to proceed the implementation using Java Networking.
And for dynamically updating the cache table we go for MS Access database.
Java ha two things: a programming language and a platform.
Java is a high-level programming language that is all of the following

Simple Architecture-neutral
Object-oriented Portable
Distributed High-performance
Interpreted Multithreaded
Robust Dynamic
Secure
Java is also unusual in that each Java program is both compiled and interpreted.
With a compile you translate a Java program into an intermediate language called Java
byte codes the platform-independent code instruction is passed and run on the
computer.

Compilation happens just once; interpretation occurs each time the program is
executed. The figure illustrates how this works.

You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether it’s a Java development
tool or a Web browser that can run Java applets, is an implementation of the Java VM.
The Java VM can also be implemented in hardware.
Java byte codes help make “write once, run anywhere” possible. You can compile
your Java program into byte codes on my platform that has a Java compiler. The byte
codes can then be run any implementation of the Java VM. For example, the same
Java program can run Windows NT, Solaris, and Macintosh.
Networking
TCP/IP stack

The TCP/IP stack is shorter than the OSI one:


TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a
connectionless protocol.

IP datagram’s

The IP layer provides a connectionless and unreliable delivery system. It considers


each datagram independently of the others. Any association between datagram must be
supplied by the higher layers. The IP layer supplies a checksum that includes its own
header. The header includes the source and destination addresses. The IP layer handles
routing through an Internet. It is also responsible for breaking up large datagram into
smaller ones for transmission and reassembling them at the other end.

UDP

UDP is also connectionless and unreliable. What it adds to IP is a checksum for the
contents of the datagram and port numbers. These are used to give a client/server model
- see later.

TCP
TCP supplies logic to give a reliable connection-oriented protocol above IP. It
provides a virtual circuit that two processes can use to communicate.

Internet addresses

In order to use a service, you must be able to find it. The Internet uses an address
scheme for machines so that they can be located. The address is a 32 bit integer which
gives the IP address. This encodes a network ID and more addressing. The network ID
falls into various classes according to the size of the network address.

Network address

Class A uses 8 bits for the network address with 24 bits left over for other
addressing. Class B uses 16 bit network addressing. Class C uses 24 bit network
addressing and class D uses all 32.

Subnet address

Internally, the UNIX network is divided into sub networks. Building 11 is currently
on one sub network and uses 10-bit addressing, allowing 1024 different hosts.

Host address

8 bits are finally used for host addresses within our subnet. This places a limit of
256 machines that can be on the subnet.

Total address
The 32 bit address is usually written as 4 integers separated by dots.

Port addresses

A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, you send it to the port for that service of the host that it is
running on. This is not location transparency! Certain of these ports are "well known".

Sockets

A socket is a data structure maintained by the system to handle network


connections. A socket is created using the call socket. It returns an integer that is like a
file descriptor. In fact, under Windows, this handle can be used with Read File and
Write File functions.

#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);

Here "family" will be AF_INET for IP communications, protocol will be zero, and
type will depend on whether TCP or UDP is used. Two processes wishing to
communicate over a network create a socket each. These are similar to two ends of a
pipe - but the actual pipe does not yet exist.

JFree Chart

JFreeChart is a free 100% Java chart library that makes it easy for developers to
display professional quality charts in their applications. JFreeChart's extensive feature set
includes:

A consistent and well-documented API, supporting a wide range of chart types;


A flexible design that is easy to extend, and targets both server-side and client-
side applications;

Support for many output types, including Swing components, image files
(including PNG and JPEG), and vector graphics file formats (including PDF, EPS and
SVG);

J Free Chart is "open source" or, more specifically, free software. It is distributed
under the terms of the GNU Lesser General Public License(LGPL), which permits use in
proprietary applications.

1. Map Visualizations
Charts showing values that relate to geographical areas. Some examples include:
(a) population density in each state of the United States, (b) income per capita for each
country in Europe, (c) life expectancy in each country of the world. The tasks in this
project include: Sourcing freely redistributable vector outlines for the countries of the
world, states/provinces in particular countries (USA in particular, but also other areas);
Creating an appropriate dataset interface (plus default implementation), a rendered, and
integrating this with the existing X Y Plot class in J Free Chart;

Testing,documenting, testing some more, documenting some more.

2. Time Series Chart Interactivity

Implement a new (to J Free Chart) feature for interactive time series charts --- to display a
separate control that shows a small version of ALL the time series data, with a sliding "view"
rectangle that allows you to select the subset of the time series data to display in the main chart.
3. Dashboards

There is currently a lot of interest in dashboard displays. Create a flexible dashboard


mechanism that supports a subset of J Free Chart types (dials, pies, thermometers, bars, and
lines/time series) that can be delivered easily via both Java Web Start and an applet.
4. Property Editors

The property editor mechanism in J Free Chart only handles a small subset of the properties
that can be set for charts. Extend(or re implement) this mechanism to provide greater end-user
control over the appearance of the charts.

J2ME (Java 2 Micro edition):-

Sun Microsystems defines J2ME as "a highly optimized Java run-time environment
targeting a wide range of consumer products, including pagers, cellular phones, screen-phones,
digital set-top boxes and car navigation systems." Announced in June 1999 at the Java One
Developer Conference, J2ME brings the cross-platform functionality of the Java language to
smaller devices, allowing mobile wireless devices to share applications. With J2ME, Sun has
adapted the Java platform for consumer products that incorporate or are based on small
computing devices.

1. General J2ME architecture

J2ME uses configurations and profiles to customize the Java Runtime Environment (JRE). As a
complete JRE, J2ME is comprised of a configuration, which determines the JVM used, and a
profile, which defines the application by adding domain-specific classes. The configuration
defines the basic run-time environment as a set of core classes and a specific JVM that run on
specific types of devices. We'll discuss configurations in detail in the The profile defines the
application; specifically, it adds domain-specific classes to the J2ME configuration to define
certain uses for devices. The following graphic depicts the relationship between the different
virtual machines, configurations, and profiles. It also draws a parallel with the J2SE API and its
Java virtual machine. While the J2SE virtual machine is generally referred to as a JVM, the
J2ME virtual machines, KVM and CVM, are subsets of JVM. Both KVM and CVM can be
thought of as a kind of Java virtual machine -- it's just that they are shrunken versions of the
J2SE JVM and are specific to J2ME.

2.Developing J2ME applications

Introduction In this section, we will go over some considerations you need to keep in mind when
developing applications for smaller devices. We'll take a look at the way the compiler is invoked
when using J2SE to compile J2ME applications. Finally, we'll explore packaging and
deployment and the role pre verification plays in this process.

3.Design considerations for small devices

Developing applications for small devices requires you to keep certain strategies in mind during
the design phase. It is best to strategically design an application for a small device before you
begin coding. Correcting the code because you failed to consider all of the "gotchas" before
developing the application can be a painful process. Here are some design strategies to consider:

* Keep it simple. Remove unnecessary features, possibly making those features a separate,
secondary application.

* Smaller is better. This consideration should be a "no brainer" for all developers. Smaller
applications use less memory on the device and require shorter installation times. Consider
packaging your Java applications as compressed Java Archive (jar) files.

* Minimize run-time memory use. To minimize the amount of memory used at run time, use
scalar types in place of object types. Also, do not depend on the garbage collector. You should
manage the memory efficiently yourself by setting object references to null when you are
finished with them. Another way to reduce run-time memory is to use lazy instantiation, only
allocating objects on an as-needed basis. Other ways of reducing overall and peak memory use
on small devices are to release resources quickly, reuse objects, and avoid exceptions.
4.Configurations overview

The configuration defines the basic run-time environment as a set of core classes and a specific
JVM that run on specific types of devices. Currently, two configurations exist for J2ME, though
others may be defined in the future:

* Connected Limited Device Configuration (CLDC) is used specifically with the KVM for
16-bit or 32-bit devices with limited amounts of memory. This is the configuration (and the
virtual machine) used for developing small J2ME applications. Its size limitations make CLDC
more interesting and challenging (from a development point of view) than CDC. CLDC is also
the configuration that we will use for developing our drawing tool application. An example of a
small wireless device running small applications is a Palm hand-held computer.

* Connected Device Configuration (CDC) is used with the C virtual machine (CVM) and is
used for 32-bit architectures requiring more than 2 MB of memory. An example of such a device
is a Net TV box.

5.J2ME profiles

What is a J2ME profile?

As we mentioned earlier in this tutorial, a profile defines the type of device supported. The
Mobile Information Device Profile (MIDP), for example, defines classes for cellular phones. It
adds domain-specific classes to the J2ME configuration to define uses for similar devices. Two
profiles have been defined for J2ME and are built upon CLDC: K Java and MIDP. Both K Java
and MIDP are associated with CLDC and smaller devices. Profiles are built on top of
configurations. Because profiles are specific to the size of the device (amount of memory) on
which an application runs, certain profiles are associated with certain configurations.

A skeleton profile upon which you can create your own profile, the Foundation Profile, is
available for CDC.

Profile 1: KJava

K Java is Sun's proprietary profile and contains the K Java API. The K Java profile is built on
top of the CLDC configuration. The K Java virtual machine, KVM, accepts the same byte codes
and class file format as the classic J2SE virtual machine. K Java contains a Sun-specific API that
runs on the Palm OS. The K Java API has a great deal in common with the J2SE Abstract
Windowing Toolkit (AWT). However, because it is not a standard J2ME package, its main
package is com.sun.kjava. We'll learn more about the K Java API later in this tutorial when we
develop some sample applications.

Profile 2: MIDP

MIDP is geared toward mobile devices such as cellular phones and pagers. The MIDP, like K
Java, is built upon CLDC and provides a standard run-time environment that allows new
applications and services to be deployed dynamically on end user devices. MIDP is a common,
industry-standard profile for mobile devices that is not dependent on a specific vendor. It is a
complete and supported foundation for mobile application

development. MIDP contains the following packages, the first three of which are core CLDC
packages, plus three MIDP-specific packages.

* java.lang

* java.io

* java.util

* javax.microedition.io

* javax.microedition.lcdui

* javax.microedition.midlet

* javax.microedition.rms

6.3 DATABASE

SQL LevelAPI

ThedesignersfeltthattheirmaingoalwastodefineaSQLinterfaceforJava.Althoughnotthelo
westdatabaseinterfacelevelpossible, it is at a low enough level for higher-level tools and
APIs to be created. Conversely, it is at a high enough level for application programmers to
use it confidently. Attaining this goal allows for future tool vendors
to“generate”JDBCcodeandto hidemany ofJDBC’scomplexities fromthe enduser.
1.SQLConformance

SQL syntax varies as you move from database vendor to database vendor. In an
effortto support a wide variety of vendors, JDBC will allow any query statement to be
passedthroughittotheunderlyingdatabasedriver.Thisallowstheconnectivitymoduletohandlen
on-standardfunctionality inamanner thatis suitableforits users.

1.JDBC must be implemental on top of common database


interfaces

TheJDBCSQLAPImust“sit”ontopofothercommonSQLlevelAPIs.ThisgoalallowsJDBC
touseexistingODBCleveldriversbytheuseofasoftwareinterface.Thisinterfacewouldtranslate
JDBC calls to ODBC and viceversa.
2. ProvideaJavainterfacethatisconsistentwiththerestoftheJavasystem
Because of Java’s acceptance in the user community thus far, the designers
feelthatthey should not strayfrom thecurrent designofthecoreJavasystem.
3.Keepit simple
Thisgoalprobablyappearsinallsoftwaredesigngoallistings.JDBCisnoexception. Sun
felt that the design of JDBC should be very simple, allowing for only
onemethodofcompletingataskpermechanism.Allowingduplicatefunctionalityonlyservestoc
onfusethe users oftheAPI.
4.Usestrong,statictypingwhereverpossible
Strongtypingallowsformoreerrorcheckingtobedoneat compiletime;also,lesserror
appear at runtime.

5. Keepthecommon casessimple

Because more often than not, the usual SQL calls used by the programmer
aresimpleSELECT’s,INSERT’s,DELETE’sandUPDATE’s,thesequeriesshouldbesimpleto
performwith JDBC.However, morecomplex SQLstatements shouldalsobe possible.
Theyare,
1. TABLE
2. QUERY
3. FORM
4. REPORT
5. MACRO

1. Design View
2. Datasheet View
Design View: To build or modify the structure of a table we work in the table design
view. We can specify what kind of data will be hold.
Datasheet View: To add, editor analyses the data itself we work in tables data sheet view
mode.
Query: A query is a question that has to be asked the data. Access gathers data that
answers the question from one or more table. The data that make up the answer is either
dynaset (if you edit it) or a snapshot (it cannot be edited).Each time we run query, we get
latest information in the dynaset. Access either displays the dynaset or snapshot for us to
view or perform an action on it, such as deleting or updating.
7.SAMPLE CODE

Index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Home Page</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

<script type="text/javascript" src="js/droid_sans_400-droid_sans_700.font.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="js/script.js"></script>

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<style type="text/css">

<!--

.style1 {font-size: 36px}

.style2 {color: #FFFFFF}

-->

</style>
</head>

<body>

<div class="main">

<div class="header">

<div class="header_resize">

<div class="menu_nav">

<ul>

<li class="active"><a href="index.html"><span>Home Page</span></a></li>

<li><a href="A_Login.jsp"><span>Admin</span></a></li>

<li><a href="U_Login.jsp"><span>User</span></a></li>

</ul>

</div>

<div class="clr"></div>

<div class="searchform"></div>

<div class="logo">

<h1><a href="index.html" class="style1">A Blockchain-Based Approach for Drug


Traceability in Healthcare Supply Chain</a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider"><a href="#"><img src="images/slide1.jpg" width="960"


height="360" alt="" /></a><a href="#"><img src="images/slide2.jpg" width="960"
height="360" alt="" /></a><a href="#"><img src="images/slide3.jpg" width="960"
height="360" alt="" /></a></div>

<div class="clr"></div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<div class="article">

<h2>A Blockchain-based Approach for Drug Traceability in Healthcare Supply


Chain</h2>

<div class="clr"></div>

<p><img src="images/Architecture.png" width="612" height="412" /></p>

<p align="justify" class="style2">Healthcare supply chains are complex structures


spanning across multiple organizational and geographical boundaries, providing critical
backbone to services vital for everyday life. The inherent complexity of such systems can
introduce impurities including inaccurate information, lack of transparency and limited
data provenance. Counterfeit drugs is one consequence of such limitations within existing
supply chains which not only has serious adverse impact on human health but also causes
severe economic loss to the healthcare industry. Consequently, existing studies have
emphasized the need for a robust, end to- end track and trace system for pharmaceutical
supply chains. Therein, an end-to-end product tracking system across the pharmaceutical
supply chain is paramount to ensuring product safety and eliminating counterfeits. Most
existing track and trace systems are centralized leading to data privacy, transparency and
authenticity issues in healthcare supply chains. In this paper, we present an Ethereum
blockchain-based approach leveraging smart contracts and decentralized off-chain
storage for efficient product traceability in the healthcare supply chain. The smart
contract guarantees data provenance, eliminates the need for intermediaries and provides
a secure, immutable history of transactions to all stakeholders. We present the system
architecture and detailed algorithms that govern the working principles of our proposed
solution. We perform testing and validation, and present cost and security analysis of the
system to evaluate its effectiveness to enhance traceability within pharmaceutical supply
chains.</p>

<div class="post_content"><p align="justify">&nbsp;</p>

</div>

<div class="clr"></div>

</div>

</div>

<div class="sidebar">

<div class="gadget">

<h2 class="star"><span>Index</span> Menu</h2>

<div class="clr"></div>

<ul class="sb_menu">

<li><a href="#">Home</a></li>

<li><a href="A_Login.jsp">Admin</a></li>

<li><a href="U_Login.jsp">User</a></li>

</ul>
</div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<div style="clear:both;"></div>

</div>

</div>

</div>

<div align=center></div>

</body>

</html>

A_Addcategory.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Add Categories...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

<script type="text/javascript" src="js/droid_sans_400-droid_sans_700.font.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="js/script.js"></script>

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<script language="javascript" type="text/javascript"><!--Start Reg Validation Jai


Siddalinga-->

function valid()

var na3=document.s.categorie.value;

if(na3=="")

alert("Please Enter Categorie");

document.s.categorie.focus();

return false;
}

else

</script>

<style type="text/css">

<!--

.style1 {font-size: 36px}

.style2 {

color: #FF00FF;

font-size: 36px;

.style3 {color: #FF0000}

-->

</style>

</head>

<body>
<div class="main">

<div class="header">

<div class="header_resize">

<div class="menu_nav">

<ul>

<li><a href="index.html"><span>Home Page</span></a></li>

<li class="active"><a href="A_Login.jsp"><span>Pharmacy_Seller</span></a></li>

<li><a href="U_Login.jsp"><span>User</span></a></li>

</ul>

</div>

<div class="clr"></div>

<div class="searchform"></div>

<div class="logo">

<h1><a href="index.html" class="style1">A Blockchain-Based Approach for Drug


Traceability in Healthcare Supply Chain</a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider"><a href="#"><img src="images/slide1.jpg" width="960"


height="360" alt="" /></a><a href="#"><img src="images/slide2.jpg" width="960"
height="360" alt="" /></a><a href="#"><img src="images/slide3.jpg" width="960"
height="360" alt="" /></a></div>
<div class="clr"></div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<div class="article">

<h2 class="style2">Add Categories...</h2>

<div class="img"></div>

<div class="post_content">

<form name="s" action="A_AddCategoryConf.jsp" method="post"


enctype="multipart/form-data" onSubmit="return valid()" ons target="_top">

<table width="323" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td width="117" height="50" valign="middle" bgcolor="#FFFFFF" style="color:


#2c83b0;"><div align="left" class="style7 style15 style18 style21 style4 style3"
style="margin-left:20px;">Categorie</div></td>

<td width="206" height="50" valign="middle" bgcolor="#FFFFFF"


style="color:#000000;"><div align="left" style="margin-left:20px;"><input type="text"
name="categorie"></div></td>

</tr>
</span><div >

<tr>

<td height="30" colspan="2" id="learn_more" align="center"


style="color:#FFFFFF;"><input type="submit" value="Add" style="width:100px;
height:25px; background-color:#000000; color:#FFFFFF;"/></td>

</tr></div>

</table>

</form>

<p>&nbsp;</p>

<div align="right" class="style7"><a href="A_Main.jsp">Back</a></div>

</div>

</div>

</div>

<div class="sidebar">

<div class="gadget">

<h2 class="star"><span>Sidebar</span> Menu</h2>

<div class="clr"></div>

<ul class="sb_menu">

<li><a href="A_Main.jsp">Home</a></li>

<li><a href="A_Login.jsp">Logout</a></li>

</ul>
</div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<div style="clear:both;"></div>

</div>

</div>

</div>

<div align=center></div>

</body>

</html>

U_main.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Patient Main Page...</title>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

<script type="text/javascript" src="js/droid_sans_400-droid_sans_700.font.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="js/script.js"></script>

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<style type="text/css">

<!--

.style1 {font-size: 36px}

.style2 { color: #FFFFFF;

font-size: 12px;

-->

</style>

</head>

<body>

<div class="main">

<div class="header">

<div class="header_resize">
<div class="menu_nav">

<ul>

<li><a href="index.html"><span>Home Page</span></a></li>

<li><a href="A_Login.jsp"><span>Admin</span></a></li>

<li class="active"><a href="U_Login.jsp"><span>Patient</span></a></li>

</ul>

</div>

<div class="clr"></div>

<div class="searchform"></div>

<div class="logo">

<h1><a href="index.html" class="style1">A Blockchain-Based Approach for Drug


Traceability in Healthcare Supply Chain</a><a href="index.html"></a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider"><a href="#"><img src="images/slide1.jpg" width="960"


height="360" alt="" /></a><a href="#"><img src="images/slide2.jpg" width="960"
height="360" alt="" /></a><a href="#"><img src="images/slide3.jpg" width="960"
height="360" alt="" /></a></div>

<div class="clr"></div>

</div>

<div class="clr"></div>
</div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<h2 class="style5">Welcome Patient<span class="style6"> :: <


%=(String)application.getAttribute("uname")%></span>.. </h2>

<p class="style5">&nbsp;</p>

<p class="style5"><img src="images/img1.jpg" width="570" height="206"


/></p>

<p align="center" class="style5"><span class="style2">Healthcare supply chains


are complex structures spanning across multiple organizational and geographical
boundaries, providing critical backbone to services vital for everyday life. The inherent
complexity of such systems can introduce impurities including inaccurate information,
lack of transparency and limited data provenance. Counterfeit drugs is one consequence
of such limitations within existing supply chains which not only has serious adverse
impact on human health but also causes severe economic loss to the healthcare industry.
Consequently, existing studies have emphasized the need for a robust, end to- end track
and trace system for pharmaceutical supply chains. Therein, an end-to-end product
tracking system across the pharmaceutical supply chain is paramount to ensuring product
safety and eliminating counterfeits. Most existing track and trace systems are centralized
leading to data privacy, transparency and authenticity issues in healthcare supply chains.
In this paper, we present an Ethereum block chain-based approach leveraging smart
contracts and decentralized off-chain storage for efficient product traceability in the
healthcare supply chain. The smart contract guarantees data provenance, eliminates the
need for intermediaries and provides a secure, immutable history of transactions to all
stakeholders. We present the system architecture and detailed algorithms that govern the
working principles of our proposed solution. We perform testing and validation, and
present cost and security analysis of the system to evaluate its effectiveness to enhance
traceability within pharmaceutical supply chains.</span></p>

<p class="style5">&nbsp;</p>

<p class="style5">&nbsp;</p>

</div>

<div class="sidebar">

<div class="clr"></div>

<div class="gadget">

<h2 class="star">Patient Menu</h2>

<div class="clr"></div>

<ul class="sb_menu">

<li><a href="U_Main.jsp">Home</a></li>

<li><a href="U_Profile.jsp">My Profile</a></li>

<li><a href="Account_Management.jsp">Account Management</a></li>

<li><a href="U_SearchPosts.jsp">Search Drugs and Purchase</a></li>

<li><a href="U_SearchHistory.jsp">View my search History </a></li>

<li><a href="R_Tree.jsp">View Drugs by Chain Tree</a></li>

<li><a href="U_OtherComment.jsp">View Other Patient


Comments On Drugs</a></li>

<li><a href="U_TopKSearch.jsp">View Top K Drugs Purchase</a></li>


<li><a href="U_TopKQuery.jsp">View Top K Query
Details</a></li>

<li><a href="index.html">Log Out </a></li>

</ul>

</div>

<div class="clr"></div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<p class="rf"></a></p>

<div style="clear:both;"></div>

</div>

</div>

</div>

<div align=center></div></body></html>
8.TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product It is
the process of exercising software with the intent of ensuring that the

Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a specific
testing requirement.

TYPES OF TESTS

Unit testing

Unit testing involves the design of test cases that validate that the internal program
logic is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit
before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit tests perform basic tests at component level and test a specific
business process, application, and/or system configuration. Unit tests ensure that each
unique path of a business process performs accurately to the documented specifications
and contains clearly defined inputs and expected results.

Integration testing

Integration tests are designed to test integrated software components to determine


if they actually run as one program. Testing is event driven and is more concerned with
the basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically
aimed at exposing the problems that arise from the combination of components.
Functional test

Functional tests provide systematic demonstrations that functions tested are


available as specified by the business and technical requirements, system documentation,
and user manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify
Business process flows; data fields, predefined processes, and successive processes must
be considered for testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.

System Test

System testing ensures that the entire integrated software system meets requirements.
It tests a configuration to ensure known and predictable results. An example of system
testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration
points.

White Box Testing

White Box Testing is a testing in which in which the software tester has knowledge
of the inner workings, structure and language of the software, or at least its purpose. It is
purpose. It is used to test areas that cannot be reached from a black box level.
Black Box Testing

Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most other
kinds of tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in
which the software under test is treated, as a black box .you cannot “see” into it. The test
provides inputs and responds to outputs without considering how the software works.

8.1 Unit Testing:

Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.

Test strategy and approach

Field testing will be performed manually and functional tests will be written in detail.

Test objectives

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.

Features to be tested
 Verify that the entries are of the correct format
 No duplicate entries should be allowed
 All links should take the user to the correct page.
8.2 Integration Testing
Software integration testing is the incremental integration testing of two or more
integrated software components on a single platform to produce failures caused by
interface defects.The task of the integration test is to check that components or software
applications, e.g. components in a software system or – one step up – software
applications at the company level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
8.3 Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.

SYSTEM TESTING

TESTING METHODOLOGIES
The following are the Testing Methodologies:

o Unit Testing.
o Integration Testing.
o User Acceptance Testing.
o Output Testing.
o Validation Testing.
Unit Testing
Unit testing focuses verification effort on the smallest unit of Software design that
is the module. Unit testing exercises specific paths in a module’s control structure to
ensure complete coverage and maximum error detection. This test focuses on each
module individually, ensuring that it functions properly as a unit. Hence, the naming is
Unit Testing.

During this testing, each module is tested individually and the module interfaces
are verified for the consistency with design specification. All important processing path
are tested for the expected results. All error handling paths are also tested.

Integration Testing

Integration testing addresses the issues associated with the dual problems of
verification and program construction. After the software has been integrated a set of
high order tests are conducted. The main objective in this testing process is to take unit
tested modules and builds a program structure that has been dictated by design.

The following are the types of Integration Testing:

1.Top Down Integration

This method is an incremental approach to the construction of program structure.


Modules are integrated by moving downward through the control hierarchy, beginning
with the main program module. The module subordinates to the main program module
are incorporated into the structure in either a depth first or breadth first manner.
In this method, the software is tested from main module and individual stubs are
replaced when the test proceeds downwards.

2. Bottom-up Integration

This method begins the construction and testing with the modules at the lowest
level in the program structure. Since the modules are integrated from the bottom up,
processing required for modules subordinate to a given level is always available and the
need for stubs is eliminated. The bottom up integration strategy may be implemented
with the following steps:

 The low-level modules are combined into clusters into clusters that
perform a specific Software sub-function.
 A driver (i.e.) the control program for testing is written to coordinate test case
input and output.
 The cluster is tested.
 Drivers are removed and clusters are combined moving upward in the
program structure
The bottom up approaches tests each module individually and then each module is
module is integrated with a main module and tested for functionality.
OTHER TESTING METHODOLOGIES

User Acceptance Testing

User Acceptance of a system is the key factor for the success of any system. The system
under consideration is tested for user acceptance by constantly keeping in touch with the
prospective system users at the time of developing and making changes wherever
required. The system developed provides a friendly user interface that can easily be
understood even by a person who is new to the system.

Output Testing

After performing the validation testing, the next step is output testing of the

proposed system, since no system could be useful if it does not produce the required

output in the specified format. Asking the users about the format required by them tests

the outputs generated or displayed by the system under consideration. Hence the output

format is considered in 2 ways – one is on screen and another in printed format.

Validation Checking

Validation checks are performed on the following fields.

Text Field:

The text field can contain only the number of characters lesser than or equal to its
size. The text fields are alphanumeric in some tables and alphabetic in other tables.
Incorrect entry always flashes and error message.
Numeric Field:

The numeric field can contain only numbers from 0 to 9. An entry of any
character flashes an error messages. The individual modules are checked for accuracy
and what it has to perform. Each module is subjected to test run along with sample data.
The individually tested modules are integrated into a single system. Testing involves
executing the real data information is used in the program the existence of any program
defect is inferred from the output. The testing should be planned so that all the
requirements are individually tested.

A successful test is one that gives out the defects for the inappropriate data and
produces and output revealing the errors in the system.

Preparation of Test Data

Taking various kinds of test data does the above testing. Preparation of test data
plays a vital role in the system testing. After preparing the test data the system under
study is tested using that test data. While testing the system by using test data errors are
again uncovered and corrected by using above testing steps and corrections are also noted
for future use.

Using Live Test Data:

Live test data are those that are actually extracted from organization files. After a

system is partially constructed, programmers or analysts often ask users to key in a set of

data from their normal activities. Then, the systems person uses this data as a way to

partially test the system. In other instances, programmers or analysts extract a set of live

data from the files and have them entered themselves.

It is difficult to obtain live data in sufficient amounts to conduct extensive testing.


And, although it is realistic data that will show how the system will perform for the
typical processing requirement, assuming that the live data entered are in fact typical,
such data generally will not test all combinations or formats that can enter the system.
This bias toward typical values then does not provide a true systems test and in fact
ignores the cases most likely to cause system failure.
Using Artificial Test Data:

Artificial test data are created solely for test purposes, since they can be generated to test
all combinations of formats and values. In other words, the artificial data, which can
quickly be prepared by a data generating utility program in the information systems
department, make possible the testing of all login and control paths through the program.

The most effective test programs use artificial test data generated by persons other than
those who wrote the programs. Often, an independent team of testers formulates a testing
plan, using the systems specifications.

The package “Virtual Private Network” has satisfied all the requirements specified as per
software requirement specification and was accepted.

USER TRAINING

Whenever a new system is developed, user training is required to educate them about the
working of the system so that it can be put to efficient use by those for whom the system
has been primarily designed. For this purpose the normal working of the project was
demonstrated to the prospective users. Its working is easily understandable and since the
expected users are people who have good knowledge of computers, the use of this system
is very easy.

MAINTAINENCE

This covers a wide range of activities including correcting code and design errors. To
reduce the need for maintenance in the long run, we have more accurately defined the
user’s requirements during the process of system development. Depending on the
requirements, this system has been developed to satisfy the needs to the largest possible
extent. With development in technology, it may be possible to add many more features
based on the requirements in future. The coding and designing is simple and easy to
understand which will make maintenance easier.
9.SCREENS

Fig-9.1: Home Page

Fig-9.1.1: Index menu of Home Page


Fig-9.2: Pharmacy Seller Login Page

Fig-9.2.1: Pharmacy Seller Login Page And Sidebar Menu


Fig-9.2.2: Pharmacy Seller Menu

Fig-9.2.2.1: View Users And Authorize


Fig-9.2.2.2: Add Categories

Fig-9.2.2.3: Add Drugs

Fig-9.2.2.4: View Drug Traceability in Healthcare Supply Chain


Fig-9.2.2.5: Find Total Bill on Purchased Drugs

Fig-9.2.2.6: List All Drugs in Chain Tree

Fig-9.2.2.7: View All Comments On Drugs


Fig-9.2.2.8: View All Drugs search Chart Results

Fig-9.3: Patient Login Page

Fig-9.3.1: Patient Menu


Fig-9.3.1.1: Patient Profile

Fig-9.3.1.2: Patient Account Management

Fig-9.3.1.3: Patient Bank Account Registration


Fig-9.3.1.4: Patient Ministatement

Fig-9.3.1.5: View Top K Drugs Purchase

Fig-9.3.1.6: Search Drug by content keyword


10. CONCLUSION
In this paper, we have investigated the challenge of drug traceability within
pharmaceutical supply chains highlighting its significance especially to protect against
counterfeit drugs. We have developed and evaluated a block chain-based solution for the
pharmaceutical supply chain to track and trace drugs in a decentralized manner.
Specifically, our proposed solution leverages cryptographic fundamentals underlying
block chain technology to achieve tamper-proof logs of events within the supply chain
and utilizes smart contracts within Ethereum block chain to achieve automated recording
of events that are accessible to all participating stakeholders.

We have demonstrated that our proposed solution is cost efficient in terms of the
amount of gas spent in executing the different functions that are triggered within the
smart contract. Moreover, the conducted security analysis has shown that our proposed
solution achieves protection against malicious attempts targeting is integrity, availability
and non repudiation of transaction data which is critical in a complex multi-party settings
such as the pharmaceutical supply chain.

We continue our efforts to enhance the efficiency of pharmaceutical supply chains


and envision to focus on extending the proposed system to achieve end to end
transparency and verifiability of drugs use as future work.

You might also like