BCT Mini Project
BCT Mini Project
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
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.
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.
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
• Reduced Costs
• Better Security
• Health care organizations no longer need to keep large amounts of records on their system
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.
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
SOFTWARE REQUIREMENTS
login_status=0
app= Flask( name )
app.secret_key = 'PATREC Authentication'
#Sessio variables
'''class sessionlog:
def init (self):
self.username=''
self.id=''
sess=sessionlog()'''
def encrypt_password(password):
return pwd_context.hash(password)
'''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
}
}
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;
}
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
[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