0% found this document useful (0 votes)
576 views

BCT Mini Project

This document describes a mini project report on developing a blockchain-based application for medical records. A group of 4 students submitted the report as part of their term work. It aims to build a web application using blockchain to allow patients to securely and universally access their medical records across all healthcare providers. Maintaining medical records on a blockchain could improve security, reduce costs, and allow real-time access to up-to-date records compared to traditional centralized systems prone to data breaches. The project proposes storing hash values of electronic medical records on blockchain to ensure integrity and authenticity while lowering server load.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
576 views

BCT Mini Project

This document describes a mini project report on developing a blockchain-based application for medical records. A group of 4 students submitted the report as part of their term work. It aims to build a web application using blockchain to allow patients to securely and universally access their medical records across all healthcare providers. Maintaining medical records on a blockchain could improve security, reduce costs, and allow real-time access to up-to-date records compared to traditional centralized systems prone to data breaches. The project proposes storing hash values of electronic medical records on blockchain to ensure integrity and authenticity while lowering server load.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Pune Vidyarthi Griha’s College of Engineering and

Technology & G.K. Pate (Wani) Institute of Management,


Pune- 411009.
(Affiliated to Savitribai Phule Pune University)

A Mini Project Report On

“A BLOCKCHAIN BASED APPLICATION FOR HEALTH RELATED


MEDICAL RECORDS”
Submitted in Partial Fulfillment for the Term-work of Fourth year in Computer Engineering of
Savitribai Phule Pune University.
By
1. Ayush Bolla 0077
2. Deep Pawar 0071
3. Pranit Rathod 9028
4. Vishakha Matkar 9083

Under The Guidance of


Prof. A. A. Junnarkar
Department of Computer Engineering
Academic Year: - 2021-2022
Pune Vidyarthi Griha’s College of Engineering and
Technology & G.K. Pate (Wani) Institute of Management,
Pune- 411009.
(Affiliated to Savitribai Phule Pune University)

CERTIFICATE
This is to certify that the Project report entitled “A BLOCKCHAIN BASED APPLICATION
FOR HEALTH RELATED MEDICAL RECORDS” submitted by,
Students Name Roll No
1. Ayush Bolla 0077
2. Deep Pawar 0071

3.Pranit Rathod 9028


4. Vishakha Matkar 9083

is a record of bonafide work carried out by him/her, in the partial fulfilment of the Term-work of fourth
year in Computer Engineering of Savitribai Phule Pune University at Pune Vidyarthi Griha’s College of
Engineering and Technology & G.K. Pate (Wani) Institute of Management, Pune under Savitribai Phule
Pune University, Pune. This work is done during the academic year 2022-23.

Date: - 10/11/22 Place: - Pune

Prof. A. A. Junnarkar Prof. D. D. Sapkal


Subject Teacher H.O.D. (Computer Engg.)
ABSTRACT

In the medical system, the verification, preservation and synchronization of electronic medical
records has always been a difficult problem, and the random dissemination of patient records
will bring various risks to patient privacy. Therefore, how to achieve secure data sharing on
the basis of ensuring users’ personal privacy becomes the key. In recent years, blockchain has
been proposed to be a promising solution to achieve data sharing with security and privacy
preservation due to its advantages of immutability. So, a distributed electronic medical
records searchable scheme was proposed by leveraging blockchain and smart contract
technology. Firstly, we perform a hash calculation on the electronic medical data and store the
corresponding value on the blockchain to ensure its integrity and authenticity. These
operations not only can solve centralized data store of servers of several medical institutions,
but also be good at lowering stress from data store and high-frequency access to blockchain.

Block chain-based implementation of EMR is a secured transaction and maintaining of


medical records in various hospitals. Now technology has developed, but the technology in
the medical record transaction has not developed. Still now, each hospital is maintaining a
separate database to maintain their patient details. When the patient moved to another
hospital, they need to carry document each and every time. If they missed the document, they
need to take all the report from starting. It takes more time and cost. To avoid this, we need to
maintain the globalized database to store the data in secure manner using block chain
technology. Here the donor database also connected to it, when there is any emergency in the
organ transplantation and any blood requirement, the hospital can approach the donor who are
connected to this system and get the immediate transaction. It also reduces the time to get the
donor at the necessary time.
INTRODUCTION
Most of us remember going to the doctors and seeing them pull out a dreary-looking folder
with our name written on the front. If you had found yourself going to the doctors quite
frequently, your folder will probably have been loaded with different pieces of paper making
it look scarily full. It is very important to maintain all the record in secure manner and also
confidentiality is very important. Because the medial reports are more sensitive.

Blockchain is a new emerging technology of distributed databases, which guarantees the


integrity, security and incorruptibility of data by means of the cryptography. Such features are
suitable for secure and reliable data storage. Moreover, the blockchain technique accelerates
the medical record or information exchange such that the cost of human resource is significant
reduced. All patients can manage their individual medical records and information easily in
the different hospitals and clinics. They also have the privilege to deal with and authorize
personal medical records in the proposed management framework. Blockchain has a wide
range of applications and uses in healthcare. Distributed ledger technology facilitates the
secure transfer of patient medical records, manages the medicine supply chain and helps
healthcare researchers unlock genetic code.

Need for EMR:

Since blockchain technology relies on a distributed network there is no one point of failure.
This means that it is not possible for hackers to simply find an electronic health record
security flaw and then gain access to the data in this way. Should a hacker target any one node
on the blockchain network and attempt to make an unauthorized change then the other nodes
will prevent it from happening. Blockchain technology would prevent the majority of the 477
separate breaches that took place in the last years from ever happening. Any attack that
exploited the single point of failure weakness of the traditional client-server model has would
be useless against a blockchain database.

As each participant on the network has a complete copy of the entire blockchain ledger, they
are able to independently verify any new block being added and identify any attempt to alter
any previous block. As every new data block that is added would also contain details of the
doctor who added it, blockchain EMRs would offer full accountability for the data that they
contain. In the case of incorrect diagnoses, for example, patients could be confident that there
is no way that records could be altered should the doctor or healthcare provider wish to deny
accountability.
UNIVERSAL ACCESS:

The fact that it is possible to encrypt data stored on a blockchain means that it is possible to
keep sensitive patient data on these distributed networks without the risk of unauthorized
access.

Creating a non-centralized EMR blockchain would mean that it is possible for any authorized
healthcare provider to access patient information.

Since no one healthcare provider would be liable for any data breach when using such a
database, there need not be any resistance to making records universally available. As long as
a provider has software that is compatible with the data to the blockchain then they will be
able to access it.

All that would be required is for a patient to authorize access to their protected health
information, possible through a secure blockchain-based ID verification solution like Sovrin.
After this, the doctor would have full access to their records and would, therefore, be able to
treat the patient.

Aside from allowing lifesaving care by emergency services to be improved, such universal
access to personal health information also promises to save healthcare providers huge sums of
money from lower administration costs relating to the upkeep and transfer of records as well
as from reduced liability from data breaches, etc.

Keeping our important medical data safe and secure is the most popular blockchain healthcare
application at the moment, which isn’t surprising. Security is a major issue in the healthcare
industry. There were 692 large healthcare data breaches reported between July 2021 and June
2022. The perpetrators stole credit card and banking information, as well as health and
genomic testing records.

Blockchain’s ability to keep an incorruptible, decentralized and transparent log of all patient
data makes it a technology rife for security applications. Additionally, while blockchain is
transparent, it is also private, concealing the identity of any individual with complex and
secure codes that can protect the sensitivity of medical data. The decentralized nature of the
technology also allows patients, doctors and healthcare providers to share the same
information quickly and safely.
SUMMARY OF POTENTIAL ADVANTAGES TO BLOCKCHAIN EMR:

• Universal Access

• Real-Time Up-To-Date records

• Reduced Costs

• Better Security

• Automation through the use of Smart Contracts

• Health insurance portability

• Health care organizations no longer need to keep large amounts of records on their system

Aim and objective

The main objective of this project is to build a web application using blockchain
technology which establishes that a patient’s medical record is safe, consistent,
and accessible across all healthcare providers, as determined by the patient.
SYSTEM REQUIREMENTS

Functional Requirements
Functional Requirement defines a function of software system and how the system
must behave when presented with specific inputs or conditions. These may include
calculations, data manipulation and processing and other specific functionality. The
functional requirements of the project are one of the most important aspects in terms
of entire mechanism of modules.

The functional requirements here are:

 Maintaining user: interface responsiveness: If the application needs to


perform a time-consuming task, multiple threads can be used to prevent user
interface from becoming unresponsive while the task is in progress. If the
program is downloading information from the Internet, this will keep the
user- interface running at nearly full-speed while the download is in progress.

 Simple Multitasking: Multitasking allows to execute multiple instances of a


process quit easily. The downloading routine just mentioned can be extended
so that the program can transfer multiple files simultaneously and still keep
the user interface well behaved. All that is needed is to create another thread
for each file to download.

 Building Multi-user Applications: Multithreading is often used when


building server applications. Server applications wait for request to arrive and
then establish conversations with the requester.

 Multiprocessing: Many operating systems support machines with multiple


processors. Most of these systems are unable to break a single thread of
execution for execution on different processors. By breaking an application
into different Threads, it is possible to make the best use of processing power.
NON FUNCTIONAL REQUIREMENT

Reliability

The framework ought to be dependable and solid in giving the functionalities. When
a client has rolled out a few improvements, the progressions must be made
unmistakable by the framework. The progressions made by the Programmer ought to
be unmistakable both to the Project pioneer and in addition the Test designer.

Security
Aside from bug following the framework must give important security and must
secure the entire procedure from smashing. As innovation started to develop in
quickrate the security turned into the significant concern of an association. A great
many dollars are put resources into giving security. Bug following conveys the
greatest security accessible at the most noteworthy execution rate conceivable,
guaranteeing that unapproved clients can't get to imperative issue data without
consent. Bugfollowing framework issues diverse validated clients their mystery
passwords so thereare limited functionalities for all the clients.

Maintainability
The framework observing and upkeep ought to be basic and target in its approach.
There should not be an excess of occupations running on diverse machines such that
it gets hard to screen whether the employments are running without lapses.

Performance
The framework will be utilized by numerous representatives all the while. Since the
framework will be facilitated on a solitary web server with a solitary database server
out of sight, execution turns into a noteworthy concern. The framework ought not
succumbwhen numerous clients would be utilizing it all the while. It ought to permit
quick availability to every last bit of its clients. For instance, if two test specialists
are all thewhile attempting to report the vicinity of a bug, then there ought not to be
any irregularity at the same time.
HARDWARE REQUIREMENTS

 Processor type : Intel core i3 and above


 Processor speed : Minimum 2.00 GHz and above
 RAM : 4 GB and above
 HARD DISK : 400 GB or more
 Monitor : 800x600 or higher resolution

SOFTWARE REQUIREMENTS

 Operating System : Windows 7 (32 bit and 64 bit) and Above


 Development Environment : Python Programming, Web Development
(CSS, HTML,JAVA SCRIPT)
 Scripting Language : Python, Html, CSS
 Browser : Google Chrome, Microsoft Edge
 Software : Visual Studio or Similar IDE
CODE
 app.py
from flask import Flask,render_template,request,url_for,session,redirect,jsonify
import json,sqlite3
from datetime import date
import datetime
from time import time
from hashlib import sha256
import datetime,time,pymongo
from passlib.context import CryptContext
import requests, ipfshttpclient
import os,webbrowser
from werkzeug.utils import secure_filename

states=["Andhra Pradesh","Arunachal Pradesh


","Assam","Bihar","Chhattisgarh","Goa","Gujarat","Haryana","Himachal
Pradesh","Jammu and Kashmir","Jharkhand","Karnataka","Kerala","Madhya
Pradesh","Maharashtra","Manipur","Meghalaya","Mizoram","Nagaland","Odisha","Punj
ab","Rajasthan","Sikkim","Tamil Nadu","Telangana","Tripura","Uttar
Pradesh","Uttarakhand","West Bengal","Andaman and Nicobar
Islands","Chandigarh","Dadra and Nagar Haveli","Daman and
Diu","Lakshadweep","NCT","Puducherry"]
#session['user']='Genesis'
'''Blockchain=[{
'index':'0',zzz
'patientid':'00000',
'first': '',
'last': '',
'doctor id': '',
'Dor': '12-13-2019',
'Age': '',
'haemo':'',
'blood':'',
}]'''

login_status=0
app= Flask( name )
app.secret_key = 'PATREC Authentication'

#Password encryption scheme


pwd_context = CryptContext(
schemes=["pbkdf2_sha256"],
default="pbkdf2_sha256",
pbkdf2_sha256 default_rounds=30000
)

#Sessio variables
'''class sessionlog:
def init (self):
self.username=''
self.id=''
sess=sessionlog()'''
def encrypt_password(password):
return pwd_context.hash(password)

def check_encrypted_password(password, hashed):


return pwd_context.verify(password, hashed)

'''hashset=[]
ind=-1
patdoc= mycol.find()
for x in patdoc:
hashset.append(x['hash'])
ind=ind+1

class index:
index=ind
def getindex(self):
self.index=int(self.index+1)
return self.index

idv=index()'''
@app.route('/')
@app.route('/home')
def home():
return render_template('index.html')

@app.route('/learnmore')
def learnmore():
return render_template('generic.html')

'''def oldhome():
return render_template('welcome.html')'''

@app.route('/addguard')
def addguard():
return render_template('addguard.html')

@app.route('/addguardian',methods=['post'])
def addguardian():
con=mydb['Guardian_contract']
contract={
'guardian':request.form['guardian'],
'owner':request.form['owner']
}

@app.route('/linkedacc')
def linkedacc():
acc=session['user']
con=mydb['Guardian_contract']
contract={
'guardian':acc
}
myval=con.find(contract)
mycontro=[]
for i in myval:
mycontro.append(i)
contract={
'owner':acc
}
myval=con.find(contract)
outcontro=[]
for i in myval:
outcontro.append(i)
return render_template('linkedacc.html',mycontrol=mycontro,outcontrol=outcontro)

'''
#MEDREC form creation
@app.route('/create', methods=['POST'])
def createblock():
pid=request.form['pid']
doc= request.form['doc']
blood= request.form['blood']
serum= request.form['serum']
thdl=request.form['thdl']
ldl=request.form['ldl']
rbc=request.form['rbc']
pulse=request.form['pulse']
patdoc= myrow.find()
ind=-1
for x in patdoc:
prev=x['hash']
ind=ind+1
ts=time.time()
st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
block={
'_id':pid+'REC'+str(ind+1),
'owner':pid,
'doc':doc,
'gluc':pp,
'glucf':fast,
'serum':serum,
'blood':blood,
'chol': tot,
'thdl':thdl,
'ldl':ldl,
'rbc':rbc,
'pulse':pulse,
'prev': prev,
'timestamp':st
}

block_string = json.dumps(block, sort_keys=True)


hashval=sha256(block_string.encode()).hexdigest()
block={
'_id': pid+'REC'+str(ind+1),
'owner':pid,
'doc':doc,
'gluc':pp,
'glucf':fast,
'serum':serum,
'blood':blood,
'chol': tot,
'thdl':thdl,
'ldl':ldl,
'rbc':rbc,
'pulse':pulse,
'prev': prev,
'hash':hashval,
'timestamp':st

}
myrow.insert_one(block)
return render_template('newrec.html',post=block)

 Main.css

@charset "UTF-8";
@import url(font-awesome.min.css);
@import url("https://fonts.googleapis.com/css?family=Raleway:400,500,700");

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small,
strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label,
legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
{ display: block;
}

body {
line-height: 1;
}

ol, ul {
list-style: none;
}

blockquote, q {
quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after


{ content: '';
content: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}

body {
-webkit-text-size-adjust: none;
}

/* Box Model */

*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

.container {
margin-left: auto;
margin-right: auto;
}
.container.\31 25\25 {
width: 100%;
max-width: 100em;
min-width: 80em;
}
.container.\37 5\25 {
width: 60em;
}
.container.\35 0\25 {
width: 40em;
}
.container.\32 5\25 {
width: 20em;
}
.container {
width: 80em;
}
OUTPUT
CONCLUSION
Applying blockchain technology to the secure electronic health records industry is set
to bring about some exciting new changes to the availability and use of our medical
records.
While it remains in the early days, blockchain will overcome the difficulties of technical
safeguards that caused such disappointment in past attempts to create electronic medical
records. The main challenge that blockchain is sure to face comes from storing such large
amounts of data on the chain. Blockchain bloat is a fundamental problem that pertains to all
blockchains.
The amount of medical data required for the 100‘s of millions of medical records currently
stored by healthcare providers worldwide will take a vast network of nodes to maintain and
process.
With the leading smart contract platform, Ethereum‘s, network already running at 100%
capacity, blockchain can truly store tamper proof medical records.
REFERENCES

[1] H. Yang and B. Yang, “A blockchain-based approach to the secure


sharing of healthcare data”, Proc. Norwegian Inf. Secur. Conf., pp. 1-12,
2017

[2] Q. Xia, E. B. Sifah, A. Smahi, S. Amofa and X. Zhang, “BBDS:


Blockchain-based data sharing for electronic medical records in
cloud environments”, Information, vol. 8, no. 2, pp. 44, 2017

[3] https://www.devteam.space/blog/blockchain-for-medical-records/

[4] Ariel Ekblaw, Asaph Azaria, John D. Halamka: “A Case Study for
Blockchain in Healthcare”, MIT Media Lab, Beth Israel Deaconess
Medical Center, 2017

You might also like