Batch-6-1
Batch-6-1
Project Report
On
DECENTRALISED HEALTH RECORD MANAGEMENT
Submitted for partial fulfillment of the requirements for the award of the degree
Of
BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE AND ENGINEERING
By
Ms. Satya Sree Donga (2451-21-733-071)
Ms. Veda Vamsitha Bogem (2451-21-733-080)
Under the guidance of
Mrs. N. Sabitha
Assistant Professor
Department of CSE
Certificate
This is to certify that the project work entitled “Decentralised Health Record Management” is a bonafide
work carried out by Ms. Satya Sree Donga(2451-21-733-071) and Ms.Veda Vamsitha Bogem(2451-21-
733-080)in partial fulfilment of the requirements for the award of degree of Bachelor of Engineering in
Computer Science and Engineering from Maturi Venkata Subba Rao (MVSR) Engineering College,
affiliated to OSMANIA UNIVERSITY, Hyderabad, during the Academic Year 2023-24 under our guidance
and supervision.
The results embodied in this report have not been submitted to any other university or institute for the award
of any degree or diploma to the best of our knowledge and belief.
External Examiner
i
DECLARATION
This is to certify that the work reported in the present project entitled “ Decentralised Health Record
Management” is a record of bonafide work done by us in the Department of Computer Science and
Engineering, Maturi Venkata Subba Rao (MVSR) Engineering College, Osmania University during the
Academic Year 2024-25. The reports are based on the project work done entirely by us and not copied from
any other source. The results embodied in this project report have not been submitted to any other University
or Institute for the award of any degree or diploma.
ii
ACKNOWLEDGEMENTS
We would like to express our sincere gratitude and indebtedness to our project guide Mrs. N Sabitha for
her valuable suggestions and interest throughout the course of this project.
We are also thankful to our principal Dr. Vijaya Gunturu and Mr. J Prasanna Kumar, Professor and
Head, Department of Computer Science and Engineering, Maturi Venkata Subba Rao Engineering College,
Hyderabad for providing excellent infrastructure for completing this project successfully as a part of our
B.E. Degree (CSE). We would like to thank our project coordinator for her constant monitoring, guidance
and support.
We convey our heartfelt thanks to the lab staff for allowing us to use the required equipment whenever
needed. We sincerely acknowledge and thank all those who gave directly or indirectly their support in the
completion of this work.
iii
VISION
To impart technical education of the highest standards, producing competent and confident engineers
with an ability to use computer science knowledge to solve societal problems.
MISSION
To make learning process exciting, stimulating and interesting.
To impart adequate fundamental knowledge and soft skills to students.
To expose students to advanced computer technologies in order to excel in engineering practices by
bringing out the creativity in students.
To develop economically feasible and socially acceptable software.
PEOs:
PEO-1: Achieve recognition through demonstration of technical competence for successful execution of
software projects to meet customer business objectives.
PEO-2: Practice life-long learning by pursuing professional certifications, higher education or research in
the emerging areas of information processing and intelligent systems at a global level.
PEO-3: Contribute to society by understanding the impact of computing using a multidisciplinary and
ethical approach.
PROGRAM OUTCOMES (POs)
At the end of the program the students (Engineering Graduates) will be able to:
1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals,
and an engineering specialisation for the solution of complex engineering problems.
2. Problem analysis: Identify, formulate, research literature, and analyse complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for
public health and safety, and cultural, societal, and environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge research methods
including design of experiments, analysis an interpretation of data, and synthesis of the information
to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering activities with
an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal, and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
iv
7. Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and the need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
9. Individual and teamwork: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the engineering
community and with the society at large, such as being able to comprehend and write effective
reports and design documentation, make effective presentations, and give and receive clear
instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s work, as a member and leader in a team, to
manage projects and in multidisciplinary environments.
12. Lifelong learning: Recognise the need for and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
PROGRAM SPECIFIC OUTCOMES (PSOs)
13. (PSO-1) Demonstrate competence to build effective solutions for computational real-world problems
using software and hardware across multi-disciplinary domains.
14. (PSO-2) Adapt to current computing trends for meeting the industrial and societal needs through a
holistic professional development leading to pioneering careers or entrepreneurship.
v
COURSE OBJECTIVES AND OUTCOMES
Course Code: U21PW881CS
Course Objectives
To enhance practical and professional skills.
To familiarize tools and techniques of systematic Literature survey and documentation.
To expose the students to industry practices and teamwork.
To encourage students to work with innovative and entrepreneurial ideas.
Course Outcomes
Upon completion of the course, the student will be able to:
1. Demonstrate the ability to synthesize and apply the knowledge and skills acquired in the academic
program to real-world problems.
2. Evaluate different solutions based on economic and technical feasibility.
3. Effectively plan a project and confidently perform all the aspects of project management.
4. Demonstrate effective written and oral communication skills.
5. Present the proposed project using PPT.
vi
ABSTRACT
MedVault represents a transformative approach to the way Electronic Medical Records (EMRs) are
managed, shared, and stored in the healthcare industry. Traditional EMR systems, despite their widespread
use, face several critical limitations. These systems are often centralized, which makes them highly
susceptible to issues like data breaches, unauthorized access, poor interoperability, and lack of patient
control over their own medical data. MedVault seeks to address all these challenges by leveraging
blockchain technology and), creating a decentralized, secure, and highly efficient platform for storing and
exchanging medical records InterPlanetary File System (IPFS.)
At the heart of MedVault’s design is the use of blockchain, particularly the Ethereum network, which serves
as the backbone of the system. Blockchain provides a decentralized ledger that ensures data immutability.
Once a medical record is stored on the blockchain, it cannot be altered or deleted without detection,
providing an unchangeable and verifiable record of patient data. This feature dramatically enhances data
integrity, eliminating the risk of tampering or unauthorized changes. The blockchain also facilitates
transparency, as all transactions involving medical records are publicly traceable and auditable by authorized
parties. Each action—whether it's an update to a patient's record, a change in access permissions, or a query
request—leaves a digital footprint, providing a complete, verifiable audit trail. This is a game-changer for
regulatory compliance, as it ensures that the record-keeping process adheres to laws such as the Health
Insurance Portability and Accountability Act (HIPAA).
Furthermore, MedVault integrates smart contracts, which automatically execute actions when predefined
conditions are met, ensuring that record-sharing and management processes are secure, transparent, and free
from manual intervention. For example, a smart contract could automatically grant a doctor access to a
patient's record upon receiving the necessary consent from the patient, and it could revoke that access after a
specified time. This automation minimizes the potential for human error and reduces the administrative
burden on healthcare providers, allowing them to focus more on patient care. Smart contracts also make the
system auditable, as each interaction is logged, and the contract’s execution can be reviewed for compliance
and transparency.
The integration of IPFS adds another layer of decentralization and efficiency to the system. IPFS is a peer-
to-peer distributed file storage system that allows large data files, such as medical imaging, lab results, and
detailed patient histories, to be stored and retrieved efficiently without relying on centralized servers. This
eliminates the single point of failure inherent in traditional systems, where a single server or database can be
hacked, compromised, or go offline, potentially leading to the loss of critical data. Instead, with IPFS, data is
broken into chunks, encrypted, and distributed across a global network of nodes, making it both more
resilient and scalable. This allows for fast, secure, and fault-tolerant retrieval of medical records, even in
cases of server failures or cyberattacks. Additionally, because IPFS operates in a decentralized manner, there
is no need for an intermediary or central authority, further enhancing the privacy and security of patient data.
A significant advantage of MedVault is the control it gives patients over their own health data. In traditional
EMR systems, patients often have limited control over who accesses their records and how their data is
vii
shared. MedVault, on the other hand, empowers patients by allowing them to grant or revoke access to their
medical records at any time, providing them with full control over their health information. This is achieved
through the use of cryptographic keys, which patients can use to manage access permissions securely. If a
patient needs to share their medical history with a new doctor or specialist, they can do so by simply
providing them with the necessary credentials, while ensuring that their records remain encrypted and
protected from unauthorized access.
Granular access control is another critical feature of MedVault. Instead of granting blanket access to a
patient’s entire medical history, MedVault allows healthcare providers to access specific pieces of
information that are relevant to their care. For example, a cardiologist may only need access to a patient’s
heart-related data, while a general practitioner may require access to the patient’s full medical history. This
targeted access ensures that data privacy is maintained while also making information available to healthcare
providers when needed for critical decision-making.
MedVault also addresses the issue of interoperability, which has long been a challenge in the healthcare
industry. Many healthcare providers and institutions use different systems that often cannot communicate
with each other effectively, leading to fragmented and incomplete patient records. By utilizing blockchain
and IPFS, MedVault enables seamless and trustless data exchange between different healthcare entities, even
if they use different technologies. This promotes better coordination of care, reduces the risk of errors due to
incomplete or outdated information, and enhances the overall quality of patient care. Moreover, because
MedVault is based on open-source technologies, it has the potential to integrate with a wide range of
existing healthcare systems, facilitating widespread adoption.
In summary, MedVault provides a decentralized, secure, and transparent solution to the challenges faced by
traditional EMR systems. By utilizing blockchain and IPFS, it ensures that patient data is immutable,
auditable, and resilient to tampering or loss, while giving patients greater control over their health
information. The use of smart contracts and granular access control enhances both the efficiency and privacy
of data exchange, making the process of sharing and managing medical records more secure and
streamlined. Ultimately, MedVault represents a patient-centric approach that prioritizes data privacy,
security, and interoperability, paving the way for a future in which healthcare providers and patients can
share information seamlessly, securely, and with greater trust.
MedVault is a decentralized solution designed to address the challenges faced by Electronic Medical
Records (EMR) sharing systems. Leveraging the Ethereum network and IPFS technology, MedVault offers a
secure and efficient platform for storing and exchanging medical records. Traditional EMR systems often
encounter issues such as data breaches, lack of interoperability, and limited patient control over their own
records. MedVault aims to overcome these challenges by employing blockchain technology, ensuring data
immutability, transparency, and enhanced security. By utilizing the Ethereum network, MedVault establishes
a decentralized infrastructure that allows healthcare providers, patients, and other authorized parties to
access and share medical records in a seamless and trustless manner.
viii
The use of smart contracts further enhances the integrity and reliability of transactions, enabling
automated and auditable interactions. In addition, MedVault incorporates IPFS (InterPlanetary File System)
technology to efficiently store and distribute medical records. IPFS facilitates the decentralized storage and
retrieval of data, eliminating reliance on a single central server and enabling greater scalability and
resilience. The key features of MedVault include secure patient identification, granular access control, data
privacy, and auditability. Patients have full control over their medical records, granting or revoking access to
healthcare providers as needed. The system ensures data privacy through encryption techniques, while still
allowing authorized parties to trace and audit record access and modifications.
Through the implementation of MedVault, the healthcare industry can benefit from a decentralized and
secure solution for EMR sharing. It has the potential to streamline record management, enhance patient
privacy and control, and foster interoperability among different healthcare entities.
ix
TABLE OF CONTENTS
PAGE NOS.
Certificate …………………………………………………………………….. i
Declaration ...…………………………………………………………………… ii
Acknowledgment……………………………………………………………..… iii
Vision & Missions,PEOs,Pos and PSOs….…………………………………….. iv
Course Objectives and Outcomes…………………………………………….… vi
Abstract………………………………………………………………….……… vii
Table of Contents…………………………………………………….…………. viii
List of Figures …………………………………………………..…………….. x
List of Tables…………………………………….….………………..………… x
x
CONTENTS
CHAPTER I
1. INTRODUCTION 01 - 05
1.1 PROBLEM STATEMENT 02
1.2 OBJECTIVE 02
1.3 MOTIVATION 02-03
1.4 SCOPE OF THE PROJECT 03-04
1.5 SOFTWARE REQUIREMENTS 04-05
CHAPTER II
2. LITERATURE SURVEY 06-07
CHAPTER III
3. SYSTEM DESIGN 08-16
3.1 FLOW CHARTS 08
3.2 SYSTEM ARCHITECTURE 08-09
3.3 UML DIAGRAMS 09-13
3.4 PROJECT PLAN 13-16
CHAPTER IV
4. SYSTEM IMPLEMENTATION & METHODOLOGIES 17-26
4.1 SYSTEM IMPLEMENTATION 17
4.2 TECHNOLOGY STACK 17-18
4.3 SYSTEM ARCHITECTURE 18
4.4 USER ROLES AND PERMISSIONS 18-20
4.5 SYSTEM WORKFLOW 20-21
4.6 METHODOLOGIES USED 21-22
4.7 USER INTERFACE 23-26
CHAPTER V
5. TESTING AND RESULTS 27-30
CHAPTER VI
6. CONCLUSION & FUTURE ENHANCEMENTS 31-32
REFERENCES 33-34
APPENDIX 1-6
xi
LIST OF FIGURES
LIST OF TABLES
xii
Decentralized Health Record Management
CHAPTER 1
INTRODUCTION
In the context of healthcare, Electronic Health Records (EHRs) have become an essential tool for
maintaining a patient's comprehensive medical history, containing vital clinical and administrative
information necessary for effective healthcare delivery. EHRs aim to streamline various processes within
healthcare systems, such as improving patient care, enhancing communication between healthcare providers,
and making information easily accessible in real-time. These records often include data like diagnoses,
medications, allergies, immunization records, lab results, and more, all of which play a critical role in
ensuring patients receive accurate and timely care. However, despite their advantages, traditional EHR
systems face significant challenges, particularly around the security of data, privacy concerns, and the lack
of interoperability between disparate healthcare systems.
The issue of security remains a top concern, as healthcare organizations are frequent targets of
cyberattacks, and unauthorized access to sensitive patient data can have severe consequences. Traditional
centralized EHR systems often struggle with vulnerabilities, such as potential hacking risks and data
breaches, which compromise patient confidentiality. Moreover, privacy concerns, especially regarding who
has access to a patient’s health information and how it's shared, have created significant apprehensions.
Furthermore, the lack of interoperability between various EHR systems and healthcare providers further
complicates the efficient sharing of medical information. Data often resides in isolated silos, requiring
complex and inefficient processes to transfer records from one provider to another, which can delay care and
lead to errors.
Blockchain technology presents a powerful solution to these challenges. By leveraging its
decentralized distributed ledger, blockchain ensures the integrity of medical records through cryptographic
hashing. This means that once data is entered into the system, it becomes nearly impossible to alter or
tamper with without consensus from multiple network participants, significantly reducing the risk of data
manipulation. Each record in the blockchain is cryptographically linked to the previous one, forming an
immutable chain of data. Additionally, public-key cryptography is utilized to secure the data and ensure
confidentiality. Each user of the system is assigned a unique public and private key pair, which guarantees
that only authorized individuals can access or modify records, while maintaining the privacy of sensitive
patient information.
The integration of blockchain technology into EHR systems provides an effective solution to the
interoperability issues faced by traditional systems. Because blockchain is decentralized, it allows for
seamless and secure sharing of health data between trusted parties, regardless of the systems they are using.
This eliminates the need for costly and inefficient methods, such as manually transferring records or using
proprietary file formats, that often plague traditional systems. Authorized parties can access the relevant data
In addition to addressing interoperability, blockchain-based health record management aims to automate and
enforce privacy policies and data access controls, ensuring that patient health records remain secure and
accessible only to authorized individuals. Blockchain's robust security features, such as cryptographic
encryption and smart contracts, allow for fine-grained access controls, where data interactions are only
permitted based on pre-established rules and conditions. This means that patients can have complete control
over who accesses their medical information, and healthcare providers can be certain that they are only
interacting with the data they are authorized to view. By automating these access controls, blockchain
eliminates the need for manual intervention or complex administrative processes that are prone to human
error. Additionally, blockchain ensures that any access to patient records is auditable, providing a transparent
and verifiable trail of who accessed the information, when, and for what purpose. This enhances the overall
privacy and security of patient data, ensuring compliance with regulations such as HIPAA and GDPR, and
mitigating the risks associated with unauthorized access, data breaches, and potential misuse of sensitive
health information. In essence, blockchain-based health record management not only enhances
interoperability but also fortifies patient privacy, empowers individuals with control over their data, and
creates a more secure and efficient healthcare environment.
1.3 MOTIVATION
Our motivation stems from the need to revolutionize healthcare by addressing the complex challenges of
decentralized health record management, leveraging the power 0f blockchain technology and the Inter
Planetary File System (IPFS). Imagine a healthcare ecosystem where patient data is securely stored, easily
accessible, and fully controlled by patients themselves, ensuring that their health history is transparent,
immutable, and seamlessly shared among authorized entities.
This vision serves as the driving force behind our pursuit of a decentralized health record management
system. In today's world, healthcare data is often siloed and fragmented across various systems, leading to
inefficiencies, errors, and even loss of critical patient information. This fragmentation can result in delayed
diagnoses, unnecessary treatments, and compromised patient safety. Our motivation is to address these
issues head-on by creating a unified, blockchain-based solution that guarantees data integrity, privacy, and
access control while empowering patients to own and manage their health records.
Blockchain technology offers a unique solution to these challenges. Its decentralized, transparent, and
immutable nature ensures that patient data is not only secure but also easily accessible, fostering greater
collaboration and trust among healthcare providers. By integrating IPFS, a distributed file system, we aim to
enhance data storage capabilities. IPFS allows patient records to be stored in a decentralized manner,
In essence, our motivation lies in the desire to enhance healthcare outcomes by eliminating data
fragmentation, improving patient safety, and ensuring that patients have complete ownership and control of
their health information. By leveraging cutting-edge technologies like blockchain and IPFS, we aim to create
a seamless, efficient, and secure environment for decentralized health record management. This will
transform how healthcare data is stored, accessed, and shared, ultimately improving patient care and
fostering a more connected, innovative healthcare ecosystem.
1.4 SCOPE OF THE PROJECT
In addressing the challenges present in the current healthcare data management systems, the proposed
web application aims to offer innovative solutions that will benefit both patients and healthcare
professionals. One of the primary problems in the current healthcare landscape is the lack of effective data
sharing and integration between different hospitals and healthcare institutes. Typically, patient records are
siloed within each institution, making it difficult for healthcare providers to access comprehensive medical
histories when needed. This fragmentation of medical data often leads to inefficiencies, such as repeated
tests, delayed diagnoses, and incomplete treatment plans. Our web application will tackle this issue by
creating a centralized platform where patient data from various healthcare providers can be securely
aggregated and made accessible in one place. This system will allow healthcare professionals to quickly find
all the relevant information they need, regardless of which institution it originates from, enabling a more
coordinated and holistic approach to patient care.
The second challenge that our web application will address is the difficulty patients face in maintaining and
accessing their medical history. Many patients struggle to keep track of their health records, particularly
when they have complex or long-term medical conditions. This can result in a lack of awareness of their own
medical history, which is crucial for ongoing treatment and preventive care. Our solution will allow patients
to store all their medical records in a single digital file that can be easily accessed and updated. With a
comprehensive view of their health history, patients will be better equipped to manage their healthcare
needs, ensuring that both they and their healthcare providers have access to critical information when
making decisions.
The third aspect of the project is aimed at improving the accuracy of diagnoses made by specialists. Often,
specialists rely on a limited view of a patient's medical background, which can lead to misdiagnosis or
missed conditions. Our application will provide specialists with access to a patient’s entire medical history,
enabling them to make more informed and accurate diagnoses. By having detailed records, including past
illnesses, treatments, and test results, specialists can compare a patient’s current condition to similar cases,
which can significantly enhance diagnostic accuracy. The more information a specialist has about a patient's
Provides medical history will help doctors to diagnose the disease as by knowing the patients’
old diseases will increase the percentage of accurate diagnose in a lot of diseases as we mentioned
before and save doctors and patient’s time.Our project will provide a single format for all patient’s
medical record so it will be more readable and easier to record it from different institutes.
We have used a combination of technology and tools that help build a decentralized medical
record system:
1.5.1 Front-End:
1.5.2 Back-End:
Web3.js (library that allows to interact with a Ethereum node, smart contract, and
your app)
Solidity (Programming language for implementing smart contracts on blockchain
network)
1.5.3 Blockchain:
Ethereum network
Truffle (Farmwork for Dapp that provide EVM (Ethereum Virtual Machine) so
we can deploy and test)
Ganache (It is local Ethereum blockchain. It provided us with number of accounts
allowed us to test and deploy the application and dividing them among application
different end users.)
MetaMask (Browser extension that is gateway to blockchain apps by make
account to manage Ethereum smart contract)
1.5.4 Workspace
Visual Studio Code & GitHub
CHAPTER 2
LITERATURE SURVEY
Traditional EHR systems face security, privacy, and interoperability challenges. Blockchain ensures
tamper-proof record-keeping, while IPFS provides efficient off-chain storage. This combination enhances
data integrity and accessibility across healthcare institutions.
Table 2.1
4 2022 Sharma, S., Singh, Smart Contracts Designed Ethereum- High gas fees due
S., and Kumar, P. for EHR Access based smart contracts to Ethereum's
Control to regulate EHR transaction costs.
sharing between
hospitals and patients.
The reviewed studies collectively underscore the transformative potential of blockchain and IPFS in
reshaping healthcare record management by addressing critical challenges faced by traditional systems. One
of the most significant advantages of blockchain technology is its immutability, which guarantees that once a
record is entered into the system, it cannot be altered or tampered with. This feature provides a high level of
integrity to medical records, reducing the risk of fraud, data manipulation, and unauthorized alterations,
which are major concerns in conventional healthcare systems. The use of cryptographic techniques, such as
public-key encryption, further enhances data security by ensuring that only authorized individuals can access
or modify patient records. This not only safeguards sensitive medical data but also aligns with strict privacy
regulations, such as HIPAA and GDPR, which demand robust protection of patient information.
Moreover, blockchain's decentralized nature offers significant benefits in terms of data sharing and
interoperability. Unlike traditional centralized systems, where data is siloed within individual healthcare
institutions, blockchain enables seamless, secure sharing of patient records across multiple healthcare
providers. This decentralized approach removes barriers to data exchange, allowing healthcare professionals
to access comprehensive patient histories, regardless of where the records are stored. This can improve
decision-making, reduce medical errors, and promote better-coordinated care, particularly for patients who
move between different healthcare settings or have complex, ongoing health conditions. The ability to
securely share data between healthcare institutions could drastically improve the overall efficiency of
healthcare delivery and lead to better patient outcomes.
While blockchain offers a promising solution for secure and transparent data management, it also faces some
scalability challenges. One limitation is the issue of data storage. Blockchain's decentralized ledger is not
well-suited for storing large volumes of data, such as medical imaging or detailed patient records. This is
where IPFS (InterPlanetary File System) comes in, as it provides an efficient decentralized storage solution.
IPFS allows for the distributed storage and retrieval of large files, making it an ideal complement to
blockchain. It ensures that the bulk of medical data, such as images and extensive patient histories, can be
Another key benefit of blockchain-based healthcare systems is the increased control it gives to patients over
their medical data. Traditional healthcare systems often place the responsibility of managing and securing
patient data in the hands of healthcare institutions, leaving patients with limited visibility or control. In a
blockchain-based system, patients are granted greater autonomy through features such as smart contracts,
which enable them to set permissions for who can access their medical data and under what conditions. For
example, a patient can allow a healthcare provider to view their records for a specific treatment, and once the
treatment is completed, the access can be revoked. This system provides a transparent and auditable trail of
who accessed the data and when, ensuring that patient consent is always respected. As a result, patients not
only have more control over their healthcare information but also experience enhanced privacy and security,
knowing that their data is stored in a secure, tamper-resistant system.
In summary, the integration of blockchain and IPFS in healthcare record management offers significant
benefits in terms of data security, privacy, interoperability, and patient control. By providing a decentralized,
immutable, and transparent platform for managing medical records, these technologies hold the potential to
revolutionize the healthcare industry, improving both the quality of care and the efficiency of healthcare
delivery. However, to fully realize this potential, ongoing efforts are needed to address scalability issues,
ensuring that these systems can handle the large volumes of data required for large-scale implementation.
Despite these challenges, the promise of a more secure, efficient, and patient-centric healthcare system
through blockchain and IPFS remains a compelling vision for the future.
The reviewed studies collectively highlight the potential of blockchain and IPFS in revolutionizing
healthcare record management. Blockchain's immutability ensures that records cannot be tampered with,
while cryptographic techniques secure data access, enhancing security and privacy. Additionally,
decentralized systems enable seamless sharing of records across different healthcare institutions, improving
interoperability. While IPFS addresses blockchain storage limitations, large-scale implementation still
requires optimization to efficiently handle millions of records, posing scalability challenges. Furthermore,
patients gain greater control over their medical data, allowing them to securely share information with
healthcare providers through smart contracts, thus enhancing accessibility and data security in decentralized
health record management.
CHAPTER 3
SYSTEM DESIGN
3.1 FLOWCHART
The depicted flowchart outlines the functioning of the Electronic Health Record Management System. It
visually represents the processes of encryption, key generation, and access control
The second module is the EHR Storage Layer, which serves as the backbone of the project. In this
module, data is stored in blockchains maintained by hospitals, with databases that are distributed across the
network. Popular tools that have been used in this module include Next.js, Ganache, Truffle, and MetaMask.
APIs are used to facilitate communication between the User Management Layer and the EHR Storage Layer,
with incoming requests triggering data storage procedures in the latter.
The third module is the EHR Generation and View Layer, which provides a comprehensive and
efficient means of managing patient health information in electronic format. Healthcare providers can access
patient data from multiple sources through this module, which includes tools for searching, filtering, and
visualizing trends and patterns in the data.
The use-case diagram is shown in Figure 3.3. This application’s use-case has three key entities: an
Admin, a patient, and a doctor. various user roles interact to facilitate secure and efficient healthcare
management
State diagram:
The UML state diagram for the MedRecChain system illustrates the various states and transitions
involved in its operation. The system begins in the Start state, where users initiate the login process. Upon
entering the Login state, the system verifies the user's Ethereum account. If authentication succeeds, the user
transitions to their respective dashboards: Admin Dashboard, Hospital Dashboard, Doctor Dashboard, or
Patient Dashboard, based on their role. If authentication fails, the system moves to the Login Error state.
Sequence diagram:
The Sequential Diagram below offers a visual representation illustrating the interactions and
communication flow among various entities, including the Patient, Doctor, Web Server, Smart Contract, and
IPFS. The following sequential diagram provides insights into the communication process and the steps
involved in how patient upload their medical records, subsequently accessed by doctors via blockchain
Technology
Tasks:
• Conduct a project kickoff meeting to align the team on objectives, roles, and responsibilities.
• Create a new BlockChain environment and install necessary dependencies.
• Configure the development environment for GPU usage to ensure optimal performance.
• Set up version control with Git and establish a repository for the project.
Objective: Set up the blockchain network and IPFS for decentralized storage.
Tasks:
Rinkeby, Polygon).
Set up IPFS for decentralized file storage and configure local or cloud-based
IPFS nodes.
Develop and test scripts for uploading, retrieving, and pinning files on IPFS.
Establish a connection between the blockchain and IPFS for storing file hashes
securely.
Perform initial tests to ensure blockchain transactions and IPFS integration work seamlessly.
Objective: Develop and deploy smart contracts for health record management
Tasks:
• Define smart contract functionalities, including record creation, access control, and permission
management.
• Develop smart contracts using Solidity or another blockchain programming language.
• Test smart contracts on a local blockchain environment using tools like Ganache.
• Document the contract APIs and integrate them with the backend.
Tasks:
Objective: Build the backend to interact with the blockchain and IPFS.
Tasks:
• Implement APIs for creating, updating, and retrieving health records via the blockchain.
• Integrate backend logic to interact with IPFS for storing and retrieving files.
• Test the backend thoroughly to ensure seamless integration with blockchain and IPFS.
Tasks:
• Implement access control mechanisms to ensure only authorized users can access specific records.
• Enhance transaction security using private keys and wallets (e.g., MetaMask).
Objective: Integrate all components and conduct thorough testing of the system.
Tasks:
• Integrate the frontend, backend, blockchain, and IPFS components into a cohesive system.
• Perform end-to-end testing to ensure all components work seamlessly.
• Identify and resolve any integration issues or bugs.
• Conduct user acceptance testing with healthcare professionals or a small user group to gather
feedback
• Refine the system based on feedback to ensure reliability and usability.
Tasks:
• Prepare the deployment environment and configure server settings for hosting the application.
• Deploy the system to a cloud platform (e.g., AWS, Azure) or decentralized hosting services (e.g.,
Fleek, Filecoin).
• Provide comprehensive documentation, including a user manual, developer guide, and system
architecture.
• Conduct a final project review meeting to discuss achievements, challenges, and future
enhancements.
CHAPTER 4
SYSTEM IMPLEMENTATION & METHODOLOGIES
4.1 SYSTEM IMPLEMENTATION
With the increasing digitization of healthcare systems worldwide, Electronic Health Records (EHRs)
have become not only a repository of patient history but also a rich source of data for clinical decision-
making, population health monitoring, and medical research. EHRs consist of a wide array of data types,
including structured elements such as laboratory test results, medication prescriptions, ICD diagnosis codes,
and procedure records, as well as unstructured components like physicians' free-text notes, radiology and
pathology reports, discharge summaries, and referral letters. Furthermore, the integration of real-time patient
monitoring systems and medical imaging adds to the complexity and richness of the data. Managing and
making sense of this heterogeneous, high-dimensional, and frequently updated data at scale poses a
significant challenge for clinicians, hospital administrators, and researchers alike. Consequently, the ability
to automatically identify and extract relevant medical events based on user-specific or task-specific queries
has become critical for improving both individual patient care and system-wide healthcare efficiency.
In response to this need, several core EHR-related tasks have emerged. Clinical event extraction is a
foundational capability that involves automatically identifying, classifying, and organizing clinically
significant events—such as the onset of symptoms, the administration of treatments, or the confirmation of
diagnoses—from large volumes of unstructured text. This task often leverages natural language processing
(NLP) techniques to interpret complex medical language, resolve ambiguous terms, and structure events in a
way that supports automated querying and reasoning. For instance, a physician might use such a system to
identify all cases within a patient population who developed renal failure following the administration of a
specific medication, thus enabling faster identification of treatment risks or drug side effects.
Anomaly detection, on the other hand, focuses on identifying unusual or potentially harmful patterns
in patient data that deviate from expected norms. This can include sudden changes in vital signs (e.g., blood
pressure spikes), unexpected lab value fluctuations, missed medication doses, or the co-prescription of
contraindicated drugs. These anomalies might signal clinical deterioration, medication errors, or early
warnings of disease progression, allowing healthcare providers to intervene proactively. Sophisticated
The heart of the system is built on Ethereum, a well-established and secure blockchain network. Ethereum
provides a decentralized environment for storing data and executing smart contracts, which are self-
executing contracts with the terms of the agreement directly written into code. Using Solidity, Ethereum’s
smart contract programming language, we will define and deploy contracts that govern how medical records
While blockchain offers secure, transparent, and immutable data management, storing large medical files
like images, lab results, or extensive clinical notes directly on the blockchain can be inefficient and costly.
To address this issue, IPFS will be used for storing and retrieving large files. IPFS is a decentralized file
storage system that enables the distribution of data across a peer-to-peer network. It ensures that medical
records are stored securely and can be easily retrieved from multiple locations. When a medical record (e.g.,
an MRI scan or a doctor's note) is added, it will be stored on IPFS, and a unique content identifier (CID) will
be generated. This CID will be saved on the Ethereum blockchain, linking the file to the patient’s record and
ensuring data integrity, accessibility, and security.
Access Control: Smart Contracts and Cryptographic Techniques (Public-Private Key Encryption)
To ensure that only authorized individuals can access a patient’s medical data, we will utilize smart contracts
and cryptographic techniques such as public-private key encryption. Smart contracts will define the rules for
data access, granting permission only to authorized parties such as doctors, specialists, or patients
themselves. Through public-private key encryption, each user (patients, doctors, and healthcare providers)
will have a unique pair of cryptographic keys. The public key will serve as the user’s address, while the
private key will provide access to encrypted data. When a user attempts to access a record, the system will
verify their identity through the use of cryptographic techniques, ensuring that only those with the proper
credentials can view or update the medical data.
The user interface of the Decentralized Health Record Management system will be designed to be intuitive,
responsive, and easy to use. We will use modern frontend frameworks like React.js, Next.js, or Vue.js to
build a seamless, fast, and interactive UI. These frameworks will help us create dynamic and responsive
components for managing patient records, viewing medical history, granting access permissions, and more.
With React.js and Next.js, the application will benefit from features such as server-side rendering (SSR) for
faster load times and enhanced SEO. Vue.js, known for its simplicity and ease of integration, will also be a
potential choice, depending on the specific needs of the frontend. The frontend will ensure that both
healthcare professionals and patients can interact with the system intuitively, whether it's accessing records,
sharing data, or controlling access.
Development & Testing: Ganache (Local Blockchain), Truffle/Hardhat (for Development & Testing)
During the development phase, we will use Ganache, a personal Ethereum blockchain for quick
development and testing. Ganache allows us to simulate blockchain transactions and test the smart contracts
in a controlled environment before deploying them to the live Ethereum network. It provides us with tools to
simulate various network conditions and test contract functionality. Truffle and Hardhat will be used as
development frameworks to write, test, and deploy Ethereum smart contracts. Both tools simplify the
process of compiling, deploying, and testing smart contracts on Ethereum, and they offer robust testing
frameworks that ensure the correctness and security of the contracts before going live. These tools are
essential for ensuring that the smart contracts function as intended and are secure from potential
vulnerabilities.
For the system to interact with the Ethereum blockchain, we will use MetaMask, a popular cryptocurrency
wallet and browser extension, to facilitate user authentication and interaction with smart contracts.
MetaMask enables users to store their Ethereum private keys securely and allows them to sign transactions
on the blockchain. We will integrate Web3.js, a JavaScript library that enables communication between the
frontend and Ethereum, to allow users to interact with the blockchain directly from the web application.
With MetaMask and Web3.js, users will be able to sign transactions, manage access permissions, and
approve data sharing securely within the decentralized system.
The entire system will be built with a strong focus on security, ensuring that patient data is protected at all
stages. Smart contracts will be rigorously tested to prevent exploits, and cryptographic techniques will
ensure that sensitive information is securely encrypted and accessible only to authorized individuals.
Additionally, since the system operates in a decentralized environment, there will be no central point of
failure, reducing the risk of data breaches and ensuring higher uptime and reliability.
Conclusion
The decentralized health record management system utilizes a three-layered architecture to provide a
secure, efficient, and user-friendly solution for managing medical records. Each layer serves a distinct
function, contributing to the overall integrity, privacy, and accessibility of patient data. The layers consist of
the Blockchain Layer, the IPFS Storage Layer, and the Application Layer. Below is an expanded
explanation of each layer and its respective components:
The Blockchain Layer is the foundational component of the system, providing a decentralized and secure
infrastructure for managing health records. This layer utilizes the Ethereum blockchain to store critical
metadata, implement permission management, and ensure transparency and immutability of the data.
Metadata Storage (IPFS Hashes, User Roles, Access Control): The blockchain stores essential
metadata such as the IPFS hash (a unique identifier pointing to the actual medical records stored on
IPFS), user roles (defining the type of user and their privileges), and access control information. The
IPFS hash allows the system to link the decentralized file storage (IPFS) with the Ethereum
blockchain, ensuring the immutability of both the metadata and associated records.
Smart Contracts for Permission Management: Smart contracts on the Ethereum network govern
access to patient records, ensuring that only authorized users—such as healthcare providers, patients,
or other designated entities—can view or update the records. These smart contracts automate the
enforcement of data-sharing permissions, making sure that patient consent is respected at all times.
For example, a patient can grant access to their medical history for a specific treatment or
consultation and revoke access once the session ends.
Logging Transactions (Record Uploads, Access Grants, Modifications): The blockchain records
all transactions related to the medical records, including record uploads, access grants, and
modifications. This creates a transparent, auditable trail, enabling both patients and healthcare
providers to track the history of the records, including who accessed the data, when it was accessed,
The IPFS Storage Layer addresses the need for scalable, decentralized storage of large medical records,
such as diagnostic images, test results, and long medical histories, which are not suitable for storage directly
on the blockchain due to space and cost constraints.
Encrypting and Storing Health Records Off-Chain: Medical records are encrypted and stored off-
chain in the InterPlanetary File System (IPFS), a decentralized and distributed file storage network.
IPFS provides a cost-effective and scalable way to store large files securely, ensuring that they are
distributed across a network of nodes rather than relying on a centralized server. The encryption
ensures that sensitive data remains protected and accessible only by authorized parties, even though it
is stored on a public decentralized network.
Content Identifier (CID) Storage On-Chain: For each health record uploaded to IPFS, a unique
Content Identifier (CID) is generated. The CID is a hash of the content, serving as a reference to the
actual file stored on IPFS. The CID is then stored on the Ethereum blockchain, linking the health
record to the immutable ledger. Storing the CID on-chain ensures that the record can be verified and
retrieved securely, and that the link between the medical data and the blockchain remains tamper-
proof.
Decentralized and Tamper-Proof Storage: IPFS ensures that records are stored in a decentralized
manner, meaning that no single point of failure exists, which reduces the risk of data loss or
downtime. The content is distributed across the network, and its integrity is ensured through
cryptographic hashes. This decentralized storage ensures that medical records are both highly
available and tamper-resistant, providing a secure foundation for the entire system.
The Application Layer is the interface through which users interact with the system. This layer provides a
user-friendly experience for patients, doctors, and hospitals while integrating with the underlying blockchain
and IPFS layers. The application layer ensures that users can easily access, manage, and share health records
while maintaining control over their personal information.
User-Friendly Interface for Patients, Doctors, and Hospitals: The system will feature a
responsive and intuitive user interface designed for multiple user roles, including patients, doctors,
and hospital administrators. Each user will have access to specific features based on their role and
level of authorization. For example, patients will be able to view their medical history, grant or
revoke access to healthcare providers, and track their records. Doctors and hospitals will be able to
Web3 Integration for Authentication and Blockchain Interaction: The Web3 integration allows
the application to interact directly with the Ethereum blockchain. Web3.js, a JavaScript library,
enables the frontend to connect to the blockchain, manage user authentication, and perform
transactions such as granting access, uploading records, or viewing medical data. Through MetaMask
or other Ethereum wallets, users will authenticate themselves and sign transactions securely, ensuring
that only authorized individuals can interact with the system.
Role-Based Dashboards for Managing Records: The application will feature role-based
dashboards that provide tailored experiences for each type of user. For instance:
o Patients: The dashboard will allow patients to view their health records, grant or revoke
access to healthcare providers, and track who has accessed their information. Patients will
also have the ability to update their profile information and manage privacy settings.
o Doctors: The doctor’s dashboard will allow them to access the patient’s medical history, add
new records, and request permission to view specific data. They will also be able to monitor
changes to records, including any updates made by other providers.
Conclusion
This three-layered architecture ensures that the Decentralized Health Record Management system is
scalable, secure, and efficient, with each layer playing a critical role in the overall functioning of the system.
The Blockchain Layer provides security, transparency, and tamper-proof metadata storage, while the IPFS
Storage Layer addresses the challenge of storing large, sensitive medical records in a decentralized and cost-
effective manner. Finally, the Application Layer serves as the user interface, providing an intuitive and
seamless experience for patients, doctors, and healthcare providers, while integrating seamlessly with the
underlying blockchain and storage systems. Together, these layers work to create a decentralized, secure,
and user-friendly system for managing health records in a way that enhances patient privacy, improves
healthcare interoperability, and empowers patients to have greater control over their health data.
RBAC minimizes security risks by assigning permissions based on job responsibilities, preventing
unauthorized access while ensuring that healthcare providers have the information they need.
Component Description
AccessControl Rules that dictate how and when users can access EHR data.
A user-friendly and role-based UI is crucial for an EHR system to ensure that patients, doctors, and
administrators can efficiently access and manage medical records while maintaining security and
compliance.The dashboard provides rolebased interface for managing electronic health records.
Super Admins oversee system access, Hospitals manage doctors, Doctors request and update patient
records, and Patients control their data, granting or revoking access. This secure, blockchain-based system
ensures transparency, privacy, and efficient healthcare data management.
The admin dashboard in provides an overview of the system, displaying the number of registered
hospitals, doctors, and patients. It includes data visualizations for medical record distribution, enabling
administrators to monitor user activity and system performance efficiently while ensuring secure access
control and regulatory compliance.
The hospital dashboard provides an overview of registered hospitals, doctors, and patients. It displays
hospital details, including address, phone number, and public key.
The doctor dashboard allows doctors to access and manage patient records securely. It provides an
overview of assigned patients and medical data. Doctors can update clinical notes, prescribe medications,
and request access to records
The patient dashboard allows users to manage their medical records and control access permissions.
Patients can view their health data, grant or revoke access to doctors, and monitor record requests.
CHAPTER 5
Test Case: The objective of this test case is to verify that users can successfully connect their MetaMask
wallet for authentication. The user clicks the "Connect Wallet" button, selects MetaMask, and approves
the connection request. The system should verify the wallet address and authenticate the user based on
their role.
Expected Result: The user should successfully connect their MetaMask wallet and be redirected to the
appropriate dashboard. If the connection fails or the wallet is not recognized, the system should display an
error message and deny access
Test Case: This test case verifies that an administrator can successfully add a new hospital to the system.
The admin logs in, navigates to the hospital management section, enters the required hospital details, and
clicks the "Add" button to submit the information.
Test Case: Verify that users can only access dashboards assigned to their role based on their MetaMask
login.
Expected Result: If the logged-in MetaMask account is assigned as an admin, attempting to access hospital,
doctor, or patient dashboards should trigger an error message stating "Not your role." Only the assigned
role's dashboard should be accessible.
Test Case: This test case ensures that a doctor, after logging in via MetaMask, can upload a patient’s
medical record. The system should verify that the doctor has the necessary permissions and associate the
uploaded record with the correct patient.
Expected Result: The system should allow the doctor to upload the record only for assigned patients. Upon
successful upload, the record should be stored in IPFS, and the corresponding hash should be saved on the
blockchain.
Test Case: Verify that a doctor can send a request to a patient for access to their medical records
CHAPTER 6
There are several promising directions for future work that can significantly enhance the
capabilities, scalability, and user-friendliness of MedVault, the decentralized solution for Electronic
Medical Records (EMR) sharing. These enhancements would not only improve the current system
architecture but also make the platform more adaptable, secure, and widely adoptable across the
healthcare sector. Below is an in-depth exploration of potential areas for future development.
6.2 CONCLUSION
The use of blockchain technology not only enhances data integrity and auditability but also
enables smart contracts to automate access control and enforce consent policies. This ensures that
medical records are shared only with authorized entities, in accordance with the patient's preferences
and privacy requirements. Patients gain full ownership and oversight of their medical data, including
the ability to grant, monitor, or revoke access to specific healthcare providers. At the same time,
healthcare institutions benefit from seamless record retrieval and accurate, up-to-date information
that enhances clinical decision-making and reduces redundancies in care.
Scalability remains another key area of focus, especially as the platform expands to
accommodate larger datasets and a growing user base. Layer-2 solutions, sidechains, and advanced
storage techniques can be explored to maintain system performance while controlling costs.
Additionally, continuous improvements in user experience—through intuitive design, responsive
dashboards, mobile support, and accessibility features—will be critical in driving adoption among
both patients and medical professionals.
In essence, MedVault is not just a technological innovation but a paradigm shift in how
medical data is managed, shared, and protected. It paves the way for a more secure, transparent, and
patient-centered healthcare environment. As it evolves, MedVault holds the potential to become a
global standard for decentralized health information systems, contributing significantly to the
modernization and improvement of healthcare delivery across different regions and healthcare
models.
The combination of the Ethereum network and IPFS technology empowers patients, healthcare
providers, and relevant parties to securely store, access, and share electronic medical records. It
promotes data integrity, privacy, and control, while facilitating efficient interoperability and
collaboration among healthcare systems.
Looking ahead, future work can focus on areas such as interoperability with other blockchain
platforms, integration with emerging technologies, enhancing privacy and data protection, addressing
scalability and performance challenges, and refining the user experience and interface design.
REFERENCES
[1] Sharma, Ashutosh, Sarishma, Ravi Tomar, Naveen Chilamkurti, and Byung-Gyu Kim. "Blockchain
based smart contracts for internet of medical things in e-healthcare." Electronics 9, no. 10 (2020): 1609.
[2] Watkinson-Powell, Anna, and A. Lee. "Benefits of an electronic medical records system in rural
Nepal." Journal of the Nepal Medical Association 52, no. 188 (2012).
[3] Yang, Huihui, and Bian Yang. "A blockchain-based approach to the secure sharing of healthcare
data." In Proceedings of the norwegian information security conference, pp. 100-111. Oslo, Norway: Nisk J,
2017.
[4] Azaria, Asaph, Ariel Ekblaw, Thiago Vieira, and Andrew Lippman. "Medrec: Using blockchain for
medical data access and permission management." In 2016 2nd international conference on open and big
data (OBD), pp. 25-30. IEEE, 2016.
[5] Gharat, Anurag, Pratik Aher, Punit Chaudhari, and Bhavana Alte. "A framework for secure storage
and sharing of electronic health records using blockchain technology." In ITM Web of Conferences, vol. 40,
p. 03037. EDP Sciences, 2021.
[7] Nishi, Farjana Khanam, Mahizebin Shams-E-Mofiz, Mohammad Monirujjaman Khan, Abdulmajeed
Alsufyani, Sami Bourouis, Punit Gupta, and Dinesh Kumar Saini. "Electronic healthcare data record security
using blockchain and smart contract." Journal of Sensors 2022 (2022): 1-22.
[8] Linn, Laure A., and Martha B. Koo. "Blockchain for health data and its potential use in health it and
health care related research." In ONC/NIST Use of Blockchain for Healthcare and Research Workshop.
Gaithersburg, Maryland, United States: ONC/NIST, pp. 1-10. 2016.
[9] Akhter Md Hasib, Kazi Tamzid, Ixion Chowdhury, Saadman Sakib, Mohammad Monirujjaman
Khan, Nawal Alsufyani, Abdulmajeed Alsufyani, and Sami Bourouis. "Electronic health record monitoring
system and data security using blockchain technology." Security and Communication Networks 2022
(2022): 1-15.
[10] Yue, Xiao, Huiju Wang, Dawei Jin, Mingqiang Li, and Wei Jiang. "Healthcare data gateways: found
healthcare intelligence on blockchain with novel privacy risk control." Journal of medical systems 40
(2016): 1-8.
[12] Chaudhuri, A. B. Flowchart and algorithm basics: The art of programming. Mercury Learning and
Information, 2020.
[13] Jiang, Shan, Jiannong Cao, Hanqing Wu, Yanni Yang, Mingyu Ma, and Jianfei He. "Blochie: a
blockchain-based platform for healthcare information exchange." In 2018 ieee international conference on
smart computing (smartcomp), pp. 49-56. IEEE, 2018.
[14] Buterin, Vitalik. "A next-generation smart contract and decentralized application platform." white
paper 3, no. 37 (2014): 2-1.
APPENDIX
import "bootstrap/dist/css/bootstrap.css";
import "../src/assets/css/style.css";
import "react-bootstrap-icons";
path: "/",
},
path: "/home",
},
path: "/admin",
},
path: "/registeredHospitals",
},
path: "/registeredDoctors",
},
path: "/registeredPatients",
},
},
path: "/patientRecords",
},
path: "/previewRecordForDoctor",
},
path: "/previewRecordForPatient",
},
path: "/patientProfile",
},
},
path: "/dashboard",
},
path: "/contact",
},
path: "/addHospital",
},
path: "/addDoctor",
},
path: "/addPatient",
},
path: "/addRecord",
},
path: "/doctorProfile",
},
path: "/PatientRecordsForDoctor",
},
path: "/doctorRequest",
},
path: "/hospitalProfile",
path: "/showAllDocrorsForHospital",
},
path: "/showAllPatientForHospital",
},
path: "/allRequestes",
},
]);
root.render(
<React.StrictMode>
</React.StrictMode>
);