The blockchain is one of the most ingenious inventions. It changed traditional approach to the transactions that are made between computers virtually, Blockchain allows digital format of information to travel across the world without being tampered, was originally made for bitcoin exchanges which were a virtual currency that was circulated by open source developers and certain hosting companies. Since it is secure and incorruptible digital ledger, we made our project to store all the transactions based on custom SHA-256 and Base64 encoding methods, since blockchain is based on the peer-to-peer network the other mediums never know the hashed content. The database updates are shared across the network and so it resists from single point failure, being controlled by certain authority, Overriding of data.
Simple Blockchain Eco System for medical data management
1. KONERU LAKSHMAIAH EDUCATION FOUNDATION 1
Blockchain Eco-System for Medical Data
Management
A Project Report
Submitted in the partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology
in
Department of Computer Science Engineering
By
150030135 B RAM SAI PRAKASH
150030403 K RAMA GAYATHRI
150030486 K KUSUMA LATHA
150031000 S V ROHITH
Under the Supervision of
Dr. PVRD PRASADA RAO
KONERU LAKSHMAIAH EDUCATION FOUNDATION,
Green Fields, Vaddeswaram- 522502, Guntur, Andhra Pradesh, India. November - 2018
2. KONERU LAKSHMAIAH EDUCATION FOUNDATION 2
KONERU LAKSHMAIAH EDUCATION FOUNDATION
DEPARTMENT OF CSE
DECLARATION
This is to certify that the Project entitled “Blockchain eco-system for medical data
management”, being submitted by B Ram Sai Prakash (150030135), K Rama Gayathri
(150030403), K Kusuma Latha (150030486), S.V. Rohith (150031000) in partial
fulfilment for the award of degree of Bachelor of Technology in Computer science
Engineering is a record of detailed work carried out under the guidance, during the
academic year 2018-19 and it has been found worthy of acceptance according to the
requirements of the university.
150030135 B RAM SAI PRAKASH
150030403 K RAMA GAYATHRI
150030486 K KUSUMA LATHA
150031000 S V ROHITH
3. KONERU LAKSHMAIAH EDUCATION FOUNDATION 3
KONERU LAKSHMAIAH EDUCATION FOUNDATION
DEPARTMENT OF CSE
CERTIFICATE
This is to certifythat the project report entitled “Blockchain eco-system for medical data
management” is being submitted by B Ram Sai Prakash (150030135), K Rama Gayathri
(150030403), K Kusuma Latha (150030486), S.V. Rohith (150031000) in partial
fulfillment for the award of Bachelor of Technology in CSE during the academic year
2018-19. The results embodied in this report have not been copied from any other
Department/University/Institute
Signature of the Supervisor Signature of the HOD
Name and Designation Name and Designation
Signature of the EXTERNAL EXAMINER
4. KONERU LAKSHMAIAH EDUCATION FOUNDATION 4
KONERU LAKSHMAIAH EDUCATION FOUNDATION
DEPARTMENT OF CSE
Acknowledgment
We are very much thankful to our loving Parents and Faculty for their care and
responsibility in helping us to achieve this work done. We owe our gratitude to our
institution that has provided a healthy environment to drive us to achieve our ambitions
and goals.
We are highly indebted to Dr. PVRD PRASADA RAO sir, for his guidance and constant
supervision and providing necessary information regarding the project in completing the
project.
We express our sincere thanks to Dr. V Hari Kiran, Head of the Department of Computer
Science and Engineering for providing us with adequate facilities. Finally, want to thank
all the teaching and non-teaching staff for their efforts in pushing me further.
5. KONERU LAKSHMAIAH EDUCATION FOUNDATION 5
Abstract
The blockchain is one of the most ingenious inventions. It changed traditional approach to
the transactions that are made between computers virtually, Blockchain allows digital
format of information to travel across the world without being tampered, was originally
made for bitcoin exchanges which were a virtual currency that was circulated by open
source developers and certain hosting companies. Since itis secure and incorruptible digital
ledger, we made our project to store all the transactions based on custom SHA-256 and
Base64 encoding methods, since blockchain is based on the peer-to-peer network the other
mediums never know the hashed content. The database updates are shared across the
network and so it resists from single point failure, being controlled by certain authority,
Overriding of data.
Our aim is to create a secured Blockchain Database System to store and retrieve medical
records. The blockchain system centralizes data sharing among all the medical hospitals,
Insurance departments. This secures the data without any tampering, perform insurance
and medical activities efficiently.
6. KONERU LAKSHMAIAH EDUCATION FOUNDATION 6
Table of contents
1. Introduction
1.1 What is Blockchain?
1.2 History of Blockchain
1.3 Features and Classification.
1.4 Transaction Scenario.
1.5 Challenges.
2. Literature Survey
2.1 MedRec prototype for electronic health records.
2.2 Big chain DB 2.0: The Blockchain Database.
2.3 Applications of Blockchain Technology beyond Cryptocurrency
3. Theoretical Analysis
3.1 Storing the user data.
3.2 Storing the medical data.
3.3 Hashing techniques.
3.4 Data Retrieval.
4. Experimental Results.
5. Discussion of the Results.
6. Recommendations
7. Summary and Conclusion
8. Reference/bibliography
7. KONERU LAKSHMAIAH EDUCATION FOUNDATION 7
LIST OF DIAGRAMS
1. Centralized Vs Decentralized Vs Distributed Ledgers.
2. Classification figure.
3. Alice and Bob physical transaction figure.
4. Alice and Bob digital transaction figure.
5. Alice and Bob digital ledger transaction figure.
6. Alice and Bob decentralized transaction figure.
7. Base64 encoding figure.
8. Base64 example figure.
9. Index.php: the home page for user sign-up/sign-in.
10.insert_data.php: sign-up page.
11.Hash generated for the above user.
12.Medical Data insertion into the chain.
13.Hashed transaction into a database.
14.Data retrieval.
9. KONERU LAKSHMAIAH EDUCATION FOUNDATION 9
1. INTRODUCTION
1.1 What is Blockchain?
Blockchain technology shows a path for untrusted parties to maintain a digital history of
transactions (consensus) on a common platform. A common digital history is required to
connect all these parties and provide a common treasure or data sharing platform, it
removes all the fraudulent activities to be detained. Blockchain technology solves this
downside while not employing a sure negotiate.
This explainer can provide straightforward definitions and analogies for blockchain
technology. It will also define Bitcoin, Bitcoin Cash, Ethereum, Litecoin, the blockchain,
and initial coin offerings. Along the manner, we’ll highlight promising use cases for
blockchain technology.
Blockchain technology may have considerable potential in healthcare, although opinion
leaders concede that identifying a genuine ‘killer app’ in healthcare is currently difficult.
However, we believe that there are several interesting use cases where blockchain
represents a potential advance or opportunity, including reimbursement of healthcare
services, exchange of health data, clinical trials and supply chains. Yet several challenges
are preventing the large-scale deployment of this technology in healthcare, such as
distributed governance of blockchain ecosystems, interoperability, and data privacy. The
use of the blockchain technology in healthcare management remains a challenge.
Figure 1
10. KONERU LAKSHMAIAH EDUCATION FOUNDATION 10
1.2 History
The 2008 monetary crisis caused tons of individuals to lose trust in banks as sure third
parties. Many questioned whether banks were the simplest guardians of the world
economic system. Bad investment choices by major banks had tested ruinous, with ripple
consequences.
Bitcoin — conjointly projected in 2008 — conferred an alternate.
According to its whitepaper, Bitcoin is a “peer-to-peer electronic cash system” that
“allow[s] for online payments to be sent directly from one party to another without going
through a financial institution.”
In alternative words, Bitcoin created digital transactions attainable while not a “trusted
negotiate.” The technology allowed this to happen at scale, globally, with cryptography
doing what institutions like commercial banks, financial regulators, and central banks
accustomed do: verify the legitimacy of transactions and safeguard the integrity of the
underlying plus.
Bitcoin is a decentralized, public ledger. There is no sure third-party dominant the ledger.
Anyone with bitcoin will participate within the network, send and receive bitcoin, and even
hold a copy of this ledger if they want to. In that sense, the ledger may be involved with all
kinds of transactions varying from criminals to bankers.
Since the ledger is defined with certain limit of existence only certain Bitcoins around 21M
can be mined and operated in the chain. Because of this cover on the number of bitcoins in
circulation, which will eventually be reached, bitcoin is inherently resistant to inflation.
That means that a lot of bitcoin can’t be written at a whim and scale back the worth of the
currency.
All participants should comply with the ledger’s rules to use it.
Bitcoin is politically decentralized — no single entity runs bitcoin — but centralized from
a data standpoint — all participants (nodes) agree on the state of the ledger and its rules.
A bitcoin or a group action can’t be modified, erased, copied, or cast – everyone would
apprehend.
11. KONERU LAKSHMAIAH EDUCATION FOUNDATION 11
1.3 Features
1.3.1 Decentralization
Bitcoin’s most vital characteristic is that it's suburbanized. No single institution controls
the bitcoin network. It is maintained by a group of volunteers and run by an open network
of dedicated computers spread around the world. This attracts people and teams that square
measure uncomfortable with the management that banks or government establishments
have over their cash.
Bitcoin solves the “double outlay problem” of electronic currencies (in that digital assets
will simply be derived and re-used) through a resourceful combination of cryptography
and economic incentives. In electronic enactment currencies, this operate is consummated
by banks, which provides them management over the standard system. With bitcoin, the
list of the transactions is completely distributed, across the users and not limited to any
particular.
1.3.2 Limited supply
Fiat currencies (dollars, euros, yen, etc.) have an infinite provide – central banks will issue
as several as they need and might plan to manipulate a currency’s worth relative to others.
Holders of the currency (and particularly voters with a touch alternative) bear the price.
With bitcoin, on the opposite hand, the availability is tightly controlled by the underlying
formula. A small range of latest bitcoins trickle out each hour and can still do therefore at
a decreasing rate till most of twenty-one million has been reached. This makes bitcoin a lot
of enticing as an associate plus – in theory if demand grows and the provision remains
constant, the value will increase.
1.3.3 – Pseudonymise
While senders of ancient electronic payments square measure sometimes known (for
verification functions, and to accommodates anti-money wash and different legislation),
users of bitcoin, in theory, operate in semi-anonymity. Since there's no central “validator,”
users don't get to determine themselves once causation bitcoin to a different user. When a
dealings request is submitted, the protocol checks all previous transactions to substantiate
that the sender has the required bitcoin stillbecause the authority to send them. The system
doesn't get to grasp his or her identity.
12. KONERU LAKSHMAIAH EDUCATION FOUNDATION 12
I observe, every user is known by the address of his or her pocketbook. Transactions can
be de-hashed alongside with developers that are the creators of the actual logic. Also,
capable of identification of the user’s personal details if necessary.
Furthermore, most exchanges are required by law to perform identity checks on their
customers before they can buy or sell bitcoin, facilitating another way that bitcoin usage
can be tracked. Since the total network is free and easy to understand, the complete
transactions and the history is public.
1.3.4 – Immutability
Bitcoin transactions cannot be reversed, not like electronic rescript transactions.
This is as a result of there's no central “adjudicator” that may say “ok, come to the cash.”
If a transaction is recorded on the network, and if more than an hour has passed, it is
impossible to modify.
While this might disquiet some, it does mean that any transaction on the bitcoin network
cannot be tampered with.
1.3.5 – Divisibility
The smallest unit of a bitcoin is named a Satoshi. It is 100 millionth of a bitcoin
(0.00000001) – at today’s prices, about one-hundredth of a cent. This could conceivably
modify microtransactions that ancient electronic cash cannot.
13. KONERU LAKSHMAIAH EDUCATION FOUNDATION 13
Classification
1. Public Blockchain:
A public Blockchain network or permission less Blockchain network is totally open-ended
and anyone willing to participate during this reasonable network will participate with none
permission. This is the main and solelydistinctionbetween public and personal Blockchain
network. Any user can add their account and be part to participate publicly.
2. Private Blockchain
A Private Blockchain Network needs a request to participate within the network. The
provision entry to this network is possible either by the moderator or certain society or
department or by certain rule and conditions. Permitted Blockchain Network puts a
restrictionon the entry of participant and allows only the kind of participant that is required
in the network.
Figure 2
14. KONERU LAKSHMAIAH EDUCATION FOUNDATION 14
1.4 The simple transaction scenario
To understand better how this peer-to-peer electronic cash system allows for online
payments to move from one party to another without going through a financial institution,
let’s use a simple example.
Figure 3
Here’s a scenario: Alice hands Bob a physical arcade token. Bob currently has one token,
and Alice has zero. The transaction is complete. Alice associated Bob don't want an
intercessor to verify the dealings. Alice can’t provide Charlie constant token, as a result of
she now not has the token to allow — she gave it to Bob.
But what if the same transaction were digital? Alice sends Bob a digital arcade token —
via email, for instance. Bob ought to have the digital token, and Alice shouldn't.
Right?
Not so fast. What if Alice created copies or “forgeries” of the digital token? What if Alice
places constant digital token on-line for all to download? After all, a digital token may be
a string of ones and zeros.
Figure 4
15. KONERU LAKSHMAIAH EDUCATION FOUNDATION 15
If Alice and Bob “own” constant string of ones and zeros, UN agency is that the true owner
of the digital token? If digital assets are often reproduced thus simply, what stops Alice
from attempting to “spend” constant digital plus doubly by additional causation it to
Charlie?
One answer: use a database — a ledger. This ledger can track one asset: digital arcade
tokens. When Alice offers Bob the digital token, the ledger records the dealings. Bob has
the token, and Alice does not.
Now, they face a replacement problem: whose job can it's to carry the ledger? Alice can’t
hold it as a result of she may erase the dealings and say that she still owns the digital token,
even supposing she gave it to Bob. It additionally can’t be Bob, as a result of he may alter
the dealings and misinform say that Alice gave him 2 tokens, doubling his arcade time.
Bob and Alice will solve this downside by employing a trusty third party, associate
intercessorUN agency isn't concernedwithin the dealings in the least — let’s decision him,
Dave. Dave can hold the ledger and check that that it’s up-to-date.
This situation is fine — until it’s not.
Figure 5
What if Dave decides to charge a fee that neither Alice nor Bob need to pay? Or, what if
Alice bribes Dave to erase her transaction? Maybe Dave needs the digital token for himself,
and adds a false dealing to the ledger to misappropriate it, language that Bob gave him the
token?
Think back to the primary physical dealings between Alice and Bob. Is there the simplest
way to create digital transactions look additional like that?
Here’s a thought: Alice and Bob may distribute the ledger to any or all their trusty friends,
not simply Dave, and alter trust. Because the ledger is digital, all copies of the ledger may
correct along. If an easy majority of participants agree that the dealings are valid (e.g.
confirm that Alice owns the token she wants to send), it gets added to the ledger.
16. KONERU LAKSHMAIAH EDUCATION FOUNDATION 16
Figure 6
When tons of individuals have a duplicate of the constant ledger, it becomes more difficult
to cheat. If Alice or Bob wanted to falsify a transaction, they would have to compromise
most participants, which is much harder than compromising a single participant.
Alice can’t claim that she ne'er sent a digital token to Bob — her ledger wouldn't accept as
true with everybody else’s. Bob couldn’t claim that Alice gave him 2 tokens — his ledger
would be out of correct. And albeit Alice bribes Dave to alter his copy of the ledger, Dave
solely holds one copy of the ledger; the bulk opinion would show the digital token was
sent.
In sum, this distributed ledger works as a result of everyone seems to be holding a duplicate
of the constant digital ledger. The additional trusty folks that hold the ledger, the stronger
it becomes.
Such a ledger permits Alice to send a digital token to Bob while not surfing Dave. In a
sense, she is remodeling her digital dealings into one thing that appears additional sort of
a physical one within the globe, wherever possession associated inadequacy of a plus are
tangible and obvious.
17. KONERU LAKSHMAIAH EDUCATION FOUNDATION 17
1.5 Challenges
Blockchain technology implementation is being explored in many industries, ranging from
supply chain to financial services. While there's little question that distributed ledger,
technology is one in every of the best innovations of recent times, it is likely that it will
take a substantial amount of time before the technology is adopted widely. That is as a
result of their area unit many challenges related to blockchain adoption that has to 1st be
quenched before widespread integration will happen.
Scalability
Blockchains are having trouble effectively supporting many users on the network. Both
Bitcoin and Ethereum, the leading blockchain networks, have experienced slowed
transaction speeds and higher fees charged per transaction as a result of a substantial
increase in users.
While this fact has led to in-depth research about how to help both these networks and
blockchains, to scale, the conversations around the proposals are highly varied and are
likely to take a significant amount of time.
The Criminal Connection
Since its launch, bitcoin has long been related to the shadowy dealings of the black market
and the dark internet. Because this is often the primary interaction of the general public
with blockchain technology, this association has persisted with bitcoin, altcoins, and the
tech underlying it as well.
In a paper titled ‘A Survey on the safety of Blockchain Systems’ printed through the
University Library, a team of researchers found that cryptocurrencies area unit utilized by
criminals to facilitate purchases of restrictedmaterials on online marketplaces, as a tool for
concealment, as well as payment methods for ransomware.
While these activities area unit ill-gotten, they're a result of people’s applications of digital
currencies and may be dispensed with enactment currency too. However, for blockchain
technology to be accepted by the general public, it must shake this shadowy association.
Inefficient Technological Design
The Ethereum sensible contract platform permits developers to deploy their own
decentralized apps (DApps) for a varied array of uses. While bitcoin is that the leading
18. KONERU LAKSHMAIAH EDUCATION FOUNDATION 18
cryptocurrency, the Ethereum network permits users to transfer the potential of the
blockchain to real-world applications. However, analysis has shown that a considerable
variety of sensible contracts deployed on the platform have vulnerabilities because of their
writing.
Moreover, the Bitcoinnetwork is meant to incorporate a major quantity of knowledge with
every dealing. While several this data is very important, not all of it is essential. This makes
the Bitcoin blockchain serious and rather slow. Blockchain style should be efficient and
optimized to attenuate these inefficiencies to lead to widespread adoption.
Privacy
The Bitcoin blockchain is designed to be publicly visible. All the information pertaining to
a transaction is available for anyone to view. Except for privacy-centric coins, this is the
same with many of the blockchains currently in existence.
While this feature may be important in some contexts, it becomes a liability if distributed
ledgers are to be used in sensitive environments. For instance, private patient data should
not be available for all as is the case with proprietary business data. This is also applicable
to government data or financial data. For blockchain technology to be adopted on a wide
scale, the ledgers need to be altered in order to limit access to the data contained therein to
only those who have the necessary clearance.
Costs
Blockchain technology is an efficient tool for reducing prices. It reduces the fees related to
transferring worth and may contour operational processes.
However, because it is a relative innovation, it is difficult to integrate it with legacy
systems. Such a method is probably going to be a rich affair that a lot of companies and
governments are unwilling to undertake.
The World Won’t Run on the Blockchain Anytime Soon
While there's very little doubt that blockchain technology can play Associate in Nursing
integral half in each the general public and the personal sector within the future, this future
continues to be more away than many belief. The above-mentioned list of challenges
clearly highlights the need for technological improvements to the current state of
blockchain technology for this innovative new technology to take hold on a large scale.
20. KONERU LAKSHMAIAH EDUCATION FOUNDATION 20
2. LITERATURE SURVEY
2.1 MedRec prototype for electronic health records[4]
For MedRec, the block content represents information possession and viewership
permissions shared by members of a personal, peer-to-peer network. Blockchain
technology supports the utilization of “smart contracts,” which permit a North American
nation to alter and track bound state transitions (such as a modification in viewership rights,
or the birth of a new record in the system). Via sensible contracts on AN Ethereum
blockchain, we log patient-provider relationships that associate a medical record with
viewing permissions and data retrieval instructions (essentiallydata pointers) for execution
on external databases.
2.2 Bigchain DB 2.0: The Blockchain Database [5]
BigchainDB is termed a blockchain information as a result of it's some blockchain
properties and a few information properties. The original style started with a information
and extra some blockchain characteristics like decentralization, immutability, and owner-
controlled assets. The idea was that the resulting system would inherit the desirable
properties of the database such as low latency, high transaction rate, and high capacity.
BigchainDB may be a blockchain information: it's each blockchain properties and database
properties. That combination makes it helpful for a good style of use cases, including
supply chain, IP rights management, digital twins & IoT, identity, data governance, and
immutable audit trails. BigchainDB 2.0 is now production-ready for many use cases.
2.3 Applications of BlockchainTechnology beyond Cryptocurrency [6]
The application of the Blockchain idea and technology has big on the far side its use for
Bitcoin generation and transactions. The properties of its security, privacy, traceability,
inherent data provenance and time-stamping has seen its adoption beyond its initial
application areas. The Blockchain itself and its variants area unit currently want to secure
any form of transactions, whether it be human-to-human communications or machine-to-
machine. Its adoption seems to be secure particularly with the world emergence of the
Internet-of-Things. Its localized application across the already established world net is
additionally terribly appealing in terms of guaranteeing information redundancy and thus
survivability. The Blockchain has been particularly known to be appropriate in developing
21. KONERU LAKSHMAIAH EDUCATION FOUNDATION 21
nations wherever guaranteeing trust is of a significant concern. Thus, the invention of the
Blockchain is seen to be a significant and far required further element of the web that was
lacking in security and trust before. BC technology still has not reached its maturity with a
prediction of 5 years as novel applications still be enforced globally.
23. KONERU LAKSHMAIAH EDUCATION FOUNDATION 23
3. THEORETICAL ANALYSIS
3.1 Storing the User Data
1. Initially, the “index.php” was developed to set up the basic interface to either sign-
up or sign-in to view his/her medical record.
2. Sign-up is proceeded with “insert_data.php” where it is further related to the
addition of the user details in hashed format into the database.
3. Sign-in proceeds with “get_data.php” where the user logins using all his details.
4. The database is created to maintain the data of the users in a hashed format to
remove the intrusions and provide the security.
5. Sign-up phase <name>+<Aadhaar>+<email>+<mobile>+<PIN>
6. Now the personal details are hashed and stored into the REGISTER_DB
Personal details
c3Zyb2hpdGg5IDEyMzQ1Njc
4OTAgc3Zyb2hpdGg5QGdtY
WlsLmNvbSAwOTg3NjU0MzI
xIDUyMjAwMg==
Base64_encode
Insert into database
25. KONERU LAKSHMAIAH EDUCATION FOUNDATION 25
3.2 Storing Medical Data
1. Users that are signed up have access to the database to store all the medical record.
2. The health data are stored in the database using a custom hashing technique to
provide the relation between the user medical record data.
3. While user signs into the “get_data.php”
4. An action is performed through “verify_data.php”, it verifies the database using
the hash that is generated now with the existing hash, now a login session is
activated, and it helps to carry this hash of the user to proceed with the further
choices that are to be selected.
5. The “verify_data.php” shows options for the user to redirectto perform the desired
task.
6. If the user chooses the option to ADD data to his account now a different action is
performed by the “action_in.php”, it hashes the data that is inserted by the user
under his chain.
7. The hashing that is performed while adding the medical data uses a custom SHA-
256 algorithm.
Personal details
c3Zyb2hpdGg5IDEyMzQ1Njc
4OTAgc3Zyb2hpdGg5QGdtY
WlsLmNvbSAwOTg3NjU0MzI
xIDUyMjAwMg==
Base64_encode
check database
27. KONERU LAKSHMAIAH EDUCATION FOUNDATION 27
3.3 Hashing Techniques
3.3.1 BASE64_ENCODING
1. It takes 3 bytes and each byte consists of 8 bits.
2. The encoding process is done using two different steps.
3. The first step is to convert 3 bytes into 4 numbers of 6 bits. Each character in
ASCII standard consists of 7 bits.
4. Now the 4 individual six bits are calculated to produce 4 values, which is
later converted into corresponding values.
5. Corresponding values are [0-25] =[A-Z], [26-51] =[a-z], [52-61] = [0-
9],62=’+’, 63=’/’.
Example
Figure 8
100110111010001011101001
1001101 100010 101010 101111
38 58 11 41
m6Lp
28. KONERU LAKSHMAIAH EDUCATION FOUNDATION 28
3.3.2 SHA256
1. It is one of the advanced hashing techniques that are available in php.
2. It provides the most secure and faster hashing of the data.
3. The SHA_256 is processed along with the input hash (user id hash) and a separate element $i,
where $i is the link for the current link to the next link.
Example
29. KONERU LAKSHMAIAH EDUCATION FOUNDATION 29
3.4 Data Retrieval
The Medical data is stored as text along with the default time-stamp that is
automatically generated during the transaction, the transaction id isgenerated during
the insertion query.
$var=$_SESSION['id'];
//echo$var;
include 'includes/connect_db.php';
//echo$data;
$i=0;
$ans=1;
//echo$ans;
while($ans==1)
{
$encr=hash('sha256’, $i.$var);
$sql="SELECT * FROMhealth_datawhere trans_id='$encr';";
$res=mysqli_query($con,$sql);
if(mysqli_num_rows($res)>0)
{
while ($row=mysqli_fetch_assoc($res))
{
echo$row['time'];
echo $row['data'];
?>
30. KONERU LAKSHMAIAH EDUCATION FOUNDATION 30
The above code generates the result of each user while the user chooses to show his
data.
While (Hash==present)
Hash=hash (sha-
256, user_hash*$i)
Data, Time retrieve
exit
32. KONERU LAKSHMAIAH EDUCATION FOUNDATION 32
4. EXPERIMENTAL RESULTS
Figure 9 Index.php: the home page for user sign-up/sign-in
Figure 10 - insert_data.php: sign-up page
33. KONERU LAKSHMAIAH EDUCATION FOUNDATION 33
Figure 11 Hash generated for the above user
Figure 12 Medical Data insertion into chain
Figure 13 Hashed transaction into the database
36. KONERU LAKSHMAIAH EDUCATION FOUNDATION 36
5. DISCUSSION OF RESULTS
1. The complete project is compromised with all securityaspects concerned to the real-
world difficulties.
2. All the scripts are SQL injection free to prevent malicious operations to be
performed on the database.
3. The hash that is generated while user signs up is the unique combination of the all
his personal details.
4. The user hash is verified at the time of sign-in in the server. After a successful
verification access to his data is shown.
5. His details are stored as <hashed-transaction> and <data> combined.
6. All the data are retrieved based on verification of the user_hash along with custom
hashed SHA256 hash.
7. There is no possible way to get two similar hashed strings in the database since all
users have different combinations of personal details and health data.
38. KONERU LAKSHMAIAH EDUCATION FOUNDATION 38
6. RECOMMENDATIONS
1. Bitcoin, Ethereum, Litecoin are some of the cryptocurrencies that are responsible for major
use of this technology.
2. Blockchain plays a major rolein the detection of the fraudulent ids. It can also be extended
to link the entire education life of a student and his scores,certifications,and achievements.
3. Blockchain can also be introduced to sports culture to continuously update the player
profiles authentically and tamper-free.
4. The financial or intellectual properties such as houses, lands, vehicles services, sales must
be linked with Blockchain in order to avoid bribery, extra duty charges.
5. Pharma industry should also develop a concise Blockchain approach to avoid misuse of
the manufacturers.
6. Expensive elements such as Platinum, Gold, Diamonds must be tagged with Blockchain
based in order to prove that element is authentic and show the details of its processing
stages.
40. KONERU LAKSHMAIAH EDUCATION FOUNDATION 40
7. SUMMARY AND CONCLUSION
The current version of the medical data is mostly raw, they are maintained on papers and
few digitally on computers. In such cases, there would be unexpected loss during the times
of certaincalamities. We can consider hospitals of UK which are mostly operated on digital
records suffered once from a WannaCry Ransomware attack that encrypted all the
records of the patients and hence the doctors are unaware of the treatment that is done to
their corresponding patients. This centralized system can be replaced by the decentralized
and distributed Blockchain, each recordwill be storedacross multiple nodes in a system.
It is safe and can be further extended to insurance companies to simplify the process of
insurance claims. This improves trust among parties and increases the efficiency of the
overall system.
The transactions are everywhere around us in this digital world, it is suitable to use this
Blockchain approach to avoid malpractices and crisis.
42. KONERU LAKSHMAIAH EDUCATION FOUNDATION 42
8. REFERENCES/BIBLIOGRAPHY
[1]. https://en.wikipedia.org/wiki/Blockchain
[2]. https://mastanbtc.github.io/blockchainnotes
[3]. https://blockchainhub.net/blockchains-and-distributed-ledger-technologies-in-general
[4]. A Case Study for Blockchain in Healthcare: “MedRec” prototype for electronic health
records and medical research data White Paper Ariel Ekblaw, Asaph Azaria, John D. Halamka,
Andrew Lippman https://dci.mit.edu/research/blockchain-medical-records
[5]. BigchainDB: A Scalable Blockchain Database. Marques R, Müller A, De Jonghe D,
McConaghy T, McMullen G, Henderson R, Bellemare S, Granzotto A. '17.
[6]. Applications of Blockchain Technology beyond Cryptocurrency- Annals of Emerging
Technologies in Computing (AETiC) https://arxiv.org/ftp/arxiv/papers/1801/1801.03528.pdf
[7]. https://www.investopedia.com/terms/b/blockchain.asp
[8]. https://blockgeeks.com/guides/what-is-blockchain-technology/
[9]. https://www.cbinsights.com/research/what-is-blockchain-technology
[10]. https://blockgeeks.com/guides/what-is-blockchain-technology