Blockchain For Giving Patients Control O
Blockchain For Giving Patients Control O
ABSTRACT Personal health records (PHRs) are valuable assets to individuals because they enable them
to integrate and manage their medical data. A PHR is an electronic application through which patients can
manage their health information. Giving patients control over their medical data offers an advantageous
realignment of the doctor-patient dynamic. However, today’s PHR management systems fall short of giving
reliable, traceable, trustful, and secure patients control over their medical data, which poses serious threats
to their authenticity and accuracy. Moreover, most of the current approaches and systems leveraged for
managing PHR are centralized that not only make medical data sharing difficult but also pose a risk of
single point of failure problem. In this paper, we propose Ethereum blockchain-based smart contracts to
give patients control over their data in a manner that is decentralized, immutable, transparent, traceable,
trustful, and secure. The proposed system employs decentralized storage of interplanetary file systems (IPFS)
and trusted reputation-based re-encryption oracles to securely fetch, store, and share patients’ medical data.
We present algorithms along with their full implementation details. We evaluate the proposed smart contracts
using two important performance metrics, such as cost and correctness. Furthermore, we provide security
analysis and discuss the generalization aspects of our solution. We outline the limitations of the proposed
approach. We make the smart contract source code publicly available on Github.
INDEX TERMS Blockchain, Ethereum, smart contracts, personal health records, healthcare, access control.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
193102 VOLUME 8, 2020
M. M. Madine et al.: Blockchain for Giving Patients Control Over Their Medical Records
collecting data from MIs is a time consuming and tedious existing PHR systems. In certain use case scenarios,
process. Although automated PHR solutions can enable indi- blockchain technology requires pairing it with some com-
viduals to manage their data efficiently, they take away the plementary technologies, such as IntraPlanetary File Sys-
ownership of data from the patient due to the involvement tem (IPFS), trusted oracles, reputation systems, and proxy
of third parties. Besides, mostly such solutions are central- re-encryption. IPFS is a decentralized peer-to-peer storage
ized and lack transparency, privacy, traceability, immutability, system. Integrating blockchain with IPFS can help to over-
trust, and security features. An ideal patient-centered solu- come the issue of large-size file storage in existing blockchain
tion for a PHR system can only be designed by combin- systems. Trusted oracles can be used to retrieve medical
ing multiple features, such as immutability and provenance records in a trustful manner. On the other hand, a reputation
of records and patient-doctor interactions, resiliency against system can assist to stop/lessen or prevent oracle misbe-
security attacks, and audit and accountability. These features haviors. The proxy re-encryption scheme helps to preserve
and requirements nominate the blockchain technology as an the privacy of medical records and ensure they can only
ideal option for laying the groundwork for a decentralized, be shared with intended doctors. Based on the high merits
trustful, and secure PHR system. and favorable features of blockchain technology, we propose
Blockchain is a promising technology that has the poten- leveraging blockchain technology for PHR management sys-
tial to reshape the way data is being controlled or managed tems. Specifically, the main focus of our proposal is to enable
in existing PHRs management systems. It employs smart decentralized access control for medical records between
contracts to ensure that transaction processes are secure and a patient and a doctor, along with interacting with various
traceable [6]. The decentralized architecture of blockchain other entities, such as IPFS and trusted oracles, as shown in
can guarantee that the PHR is stored in a manner that Figure 1. Note that our proposed system design does not focus
is immutable, traceable, transparent, auditable, and secure. on other aspects, such as standardization of medical record
Also, blockchain can enable individuals to manage their file formats, digital rights management, the inheritance of
health records information in such a way through which PHR data upon the death of a patient, and monetization of
they can authorize certain entities (e.g., patients and health patient data.
institutions the authority) to securely access and update their
PHRs [7], [8]. Blockchain architectures are mainly of three A. RELATED WORKS AND CONTRIBUTIONS
types, such as public, private, and consortium. Based on Blockchain has the potential to bring major improvements
the specific needs and requirements of individuals, these and key innovations in the existing healthcare data manage-
blockchain architectures can be employed as they can help to ment systems as discussed in [9]–[11]. To explore the poten-
meet the objectives of different use case scenarios. Undoubt- tial of blockchain technology in the PHR systems, there have
edly, blockchain can bring major improvements in the been numerous research efforts. For example, the authors
of [12], [13] have discussed how blockchain technology Iryo is a healthcare ecosystem that employs blockchain
can be leveraged to facilitate patients to devise efficient technology to decentralize access to medical records [24].
access control policies and store health data in a secure and It uses NuCypher key management system (KMS) to address
decentralized manner. On the other hand, several solutions the limitations of using consensus networks for securely
have been proposed to extend the capabilities of typical storing and manipulating encrypted data [25]. Nucypher
blockchain technology by adding additional features, such offers encryption and cryptographic access control through
as bottom-up design, robust data provenance, accountability, proxy re-encryption. Despite many advantages of the solu-
and decentralization. On top of that, the studies conducted tion; however, utilizing NuCypher is costly because nodes
in [14]–[16] investigate certain methods used to grant access in the NuCypher network need to be incentivized to prevent
to medical data by incorporating multi-signature technol- misbehavior.
ogy into the blockchain architecture. The major limitations The authors of [26] have employed blockchain technology
of these solutions are that they are partially decentralized to efficiently maintain patient records in terms of privacy,
and neither tested nor verified in a real-world blockchain scalability, and availability. The solution encrypts patients’
ecosystem. data with their public keys. It uses a proxy re-encryption
HealthBank [17] has proposed a trusted ecosystem that mechanism on the centralized server for transferring the
enables end-users to manage and control their healthcare encrypted data from the patient to the doctor. In this solution,
data. The solution is not only general data protection reg- the patient-centered aspect is still missing because medical
ulation (GDPR) compliant but it also offers a wide range records are under the control of hospitals. Another limitation
of features including user-friendly interface, complex data is that the process of re-encryption is conducted on a single
encryption, immutability, and accountability. Factom [18] has server.
employed blockchain technology to ensure the integrity of In summary, most of the existing healthcare data manage-
patients’ medical records while providing complete trans- ment systems are centralized and fall short to give patients
parency and maintaining their privacy. control over their health records in a traceable, trustful, and
In [19], the authors have presented an approach that secure manner. They are unable to trace and track PHRs
requires all entities of a typical PHR system to be on the in a tamper-proof and transparent manner. Also, the exist-
chain; whereas, the encrypted medical data is stored on a sep- ing literature lacks patient-centric solutions. Such limita-
arate centralized storage server to enable faster and low-cost tions can be overcome by integrating blockchain technology
access. One of the key limitations of the approach is routing with PHR management systems. In this paper, we propose
the medical records through a transaction call, which ends a blockchain-based architecture to manage access control of
up storing the entire medical record files on the chain. Cen- PHR systems. Our proposed approach decentralizes all the
tralization is another limitation of this approach because the patient-doctor interactions. Our solution integrates multiple
process of retrieving medical records can be compromised technologies to alleviate the typical limitations of blockchain
internally by the datastore owner or externally through technology in terms of large-size data storage and program
attacks, such as the denial of service (DDoS) attack. execution. Our key contributions are summarized below:
MedRec [20] is another approach that aims to resolve the 1) We showcase a blockchain-based approach for
issue of storing large chunks of data in the ledger by offload- patient-centered PHRs that constitutes a fully secure
ing them to the centralized database. Only pointers’ infor- and decentralized architecture with complete medical
mation is stored in the ledger. However, the proposal does record provenance and immutability.
not discuss how medical records can be encrypted before 2) We develop smart contracts and propose algorithms to
uploading them to centralized servers. Another disadvantage implement the functions, modifiers, and trigger events.
of the approach is that it involves third parties that make it The implementation code is made publicly available.1
vulnerable to security attacks and pose the risk of a single 3) We integrate our blockchain-based system with the
point of failure problem. IPFS and trusted reputations-based oracles to securely
The study conducted in [21] proposes the fast health- fetch, store, and retrieve PHRs. We incorporate a proxy
care interoperability resources (FHIR) prototype that enables re-encryption scheme to preserve the privacy of med-
patients to securely and scalably share their clinical data using ical records and ensure they can only be shared with
blockchain technology. Another approach proposed in [22] intended doctors.
considers the hospital as the medical record creator and the 4) We present cost and security analysis, and perform
patient as the owner. In this approach, the process of sharing correctness verification to evaluate the limitations, reli-
medical records is not fully decentralized because all the ability, and practicality of the proposed solution.
data related to retrieval, querying, and doctor requests are 5) We propose a generic solution that can be customized
executed off-chain. In [23], the concept of using hospitals and implemented on public or private blockchains
for data storage and managing access permissions has been based on the needs and preferences of healthcare
introduced. However, one of the major limitations is that industries.
through this solution patients do not have full control over
their data because it is stored in hospitals. 1 https://github.com/madmoh/patient-phr
The remainder of the paper is organized as follows. as proxy re-encryption nodes. They are capable of fetching
In Section II, we present the proposed approach by explain- data from the IPFS network and send it to the doctor after
ing the different entities and technologies involved in the re-encrypting it. The second type of oracles is used for time-
solution. Section III presents the design, implementation, outs and time-based event triggers, which are crucial since
and evaluation details. In Section IV, we provide a detailed such functionality cannot be natively supported in the Solidity
discussion on how the proposed solution meets the crucial language. Ethereum Alarm Clock (EAC) is one example of
requirements along with the security analysis and limitations the second type of oracles [32].
of the study. We present conclusion in Section V. A reputation system that keeps track of the oracles’ behav-
ior is important to avoid misbehaving oracles. Our reputation
II. PROPOSED BLOCKCHAIN-BASED SOLUTION system design evaluates the oracles on two measures: based
In this section, we present the details of our proposed on its interactions with the smart contracts, and based on
Ethereum blockchain-based solution along with its system its interactions with the doctor. The main advantage of the
components, such as proxy re-encryption, trusted oracles, reputation system is that it helps to identify the misbehaving
reputation systems, and IPFS. We also explain the system oracle nodes by giving them low rating scores which can
architecture and sequential interactions between the entities cause their removal.
and the smart contracts.
D. OVERALL SYSTEM ARCHITECTURE
A. ETHEREUM In our approach, all entities, except for the decentralized
Ethereum is a public blockchain platform that enables devel- storage must be registered on the blockchain network. Fig-
opers to deploy decentralized applications through smart con- ure 1 depicts the main components of the system, which are
tracts. Ethereum smart contracts are executed using Ethereum discussed below:
virtual machines (EVMs). Ether is the native cryptocurrency
used on the Ethereum blockchain. Gas is the unit used to • Regulatory Agency: The government or a trusted public
measure the cost of executing a function in the smart contract. authority that is responsible for registering hospitals,
The average price of gas is about 20Gwei, where 1wei = patients, and doctors, in addition to overseeing the gen-
10−18 Ether. To ensure that all the distributed EVMs fol- eral process.
low their agreements in terms of execution, Ethereum uses • Hospital: An entity that communicates with the patient
Ethash, which is a proof-of-work (PoW) function [27], [28]. to generate a symmetric key unique to each medical
record file. Hospitals are responsible for transferring
the medical records and their associated keys to the
B. PROXY RE-ENCRYPTION
patient directly. Ideally, this process is automated and
Proxy re-encryption schemes are cryptosystems that enable
requires no human interaction, which is possible with the
third parties to re-encrypt the ciphertext that has already
Internet of things (IoT)-enabled hardware and software
been encrypted by one party. The notable examples of
components [33], [34].
re-encryption schemes include Ateniese, Fu, Green and
• Patient: A PHR software that could be deployed on a
Hohenberger (AFGH) [29]. To further improve the security
device belonging to a patient (personal smartphone or
and efficiency of the classic approaches, several solutions
computer) or on a trusted third-party (TTP) automated
have already been proposed [30], [31]. In general, proxy
PHR service. Patients are responsible for registering
re-encryption schemes consist of the following functions:
themselves into the system, deploying their smart con-
1) Key generation: Generates the public and private key tract, uploading and submitting the medical records, and
p p
pairs (k p , k s ) of the patient (kP , kPs ) and doctor (kD , kDs ). responding to data queries from doctors (requests to
2) Encryption: Encrypts a message m with a certain key share medical records). In this paper, we assume all
k to get encrypted message mk = E(m, k). patients can decide on accepting or rejecting the request
3) Decryption: Decrypts a message mk with the counter- from their doctors. Note that patients may choose some
part key k −1 to get the original message m. third party to deploy the smart contract.
4) Re-encryption key generation: Patients employ their • Doctor: An entity that requests encrypted medical
private keys, and the public keys of the doctors to record files and decrypts the files locally.
generate the re-encryption key kP→D . • Trusted Re-encryption Oracles: The trusted general-
5) Re-encryption: Changes the encrypted message from purpose nodes that work as a re-encryption proxy to
mkP to mkD using kP→D . re-encrypt the symmetric keys from the patient to the
doctor. Oracle nodes execute their programs off-chain,
C. TRUSTED ORACLES AND REPUTATION SYSTEM and therefore must be incentivized using a reputation
Oracles are trusted computation nodes that execute their system to avoid misbehavior.
software off-chain and report back to a certain smart con- • Decentralized Database Storage: The off-chain nodes
tract operating on the blockchain. In our solution, there are that are used to store the encrypted medical record files
two types of trusted oracles. Oracles of the first type act along with the encrypted symmetric keys. One of the
possible decentralized database storage services is IPFS. is decided by comparing the key hashes and deducing
These nodes store the files voluntarily, and therefore which oracle provided the fastest response. Based on
must be incentivized using proof-of-stake or a reputation these two factors, along with the previous reputation of
system technique. the oracles, the system picks the most reputable oracle.
• Insurance Company: Responsible for paying the At this point, a token is sent both to the doctor and to
decentralized storage and oracle nodes. the selected oracle.
Two smart contracts that are responsible for managing the 6) The doctor requests the medical record from the
above-mentioned entities are listed below: selected oracle by submitting the token. After acknowl-
edging the correctness of the token, the oracle will
• Controller Smart Contract (CSC): It is deployed once
re-encrypt the symmetric key using the re-encryption
and responsible for registering the above entities, as well
key generated by the patient, so it becomes encrypted
as keeping track of the reputations of involved oracles.
by the public key of the doctor that initiated the request.
The smart contract allows the doctor to submit an eval-
Once the re-encryption process is done, the entire med-
uation of their interaction with the oracle.
ical record bundle is sent to the doctor.
• Patient Records Smart Contract (PRSC): It is
7) The doctor decrypts the re-encrypted symmetric key
deployed once per patient and responsible for storing
using their private key, revealing the plaintext symmet-
metadata about patient records and requests made by
ric key that was used to encrypt the medical record.
doctors. It allows the patients to respond to data access
Next, the doctor decrypts the medical record using the
requests, and accepts oracles participation to send the
plaintext symmetric key, thereby getting the original
records to the doctor. It is also responsible for evaluating
readable medical record data.
the oracles and selecting the most reputable one.
8) Based on the doctor-oracle interaction, the doctor sub-
mits an honest rating to the controller smart contract,
E. INTERACTIONS AND MESSAGE SEQUENCE which will update the reputation of the oracle based on
A typical successful sequence of actions for receiving a med- Equation 1, where X is the average reputation, N is the
ical record file from the hospital, and sharing it with a doctor number of oracle interactions with doctors, and xN +1 is
is shown in Figure 2. The activities depicted in the sequence the new rating.
diagram start after all the entities have been registered and the
medical records have been sent to the patient. The sequence N X current + xN+1
X new = (1)
of actions is as follows: N +1
1) The patient generates a symmetric key against the med- We upload the medical record files on the decentralized
ical record file to perform encryption. The public key storage (i.e., IPFS) to lessen the burden on the network and
p
kP of the patient is used to encrypt the symmetric key. increase the efficiency of accessing the files. To ensure the
Both the encrypted medical record and the encrypted traceability of the medical records, they are only considered
symmetric key files are uploaded on the decentralized valid once the hash of the file is registered in the smart
storage, and the hash of the encrypted medical record contract. This makes the file available to the patient. It is
file is stored on-chain. crucial in this step to have the patient as the owner of the smart
2) The doctor queries the available medical record files. contract that governs the medical record. The PRSC stores
This communication takes place off-chain. Once the metadata, such as title, creation date, and description of the
doctor decides what medical records need (based on file, in addition to the hash of the file. Furthermore, the PRSC
the recorded metadata), the patient is notified with a keeps a log of all the access requests and responses.
data request. The patient decides whether to accept An alternative to querying patient data off-chain is to
the request or deny it, which is done by sending the search the distributed encrypted data directly in a decen-
response as a transaction to their personal PRSC. tralized manner. The authors in [35] have proposed an
3) In case a patient accepts the request, the patient gen- encrypted decentralized storage architecture that supports
erates a re-encryption key (through the PHR software) keyword searching to prevent returning the malicious results.
and sends it to the PRSC. At this point, this smart con- A downside of implementing such a technique is the require-
tract informs the doctor and the oracles that a request ment of establishing a new storage architecture that can add
for data has been granted. complexity to the solution.
4) The oracles will fetch the requested file from the IPFS. When a patient authorizes the doctor to access a certain
The file gets downloaded as a bundle, which contains medical record, he/she generates a re-encryption key that
both the medical record data and the encrypted sym- can, through the proxy re-encryption oracle nodes, atomically
metric key. The task for the oracles is to compute the re-encrypt the medical record without disclosing the symmet-
hash of the encrypted symmetric key and send it to the ric key to the proxy re-encryption nodes. At every interaction
patient smart contract. of the patient or the doctor with the trusted oracles, there is a
5) Based on multiple responses from oracles, the PRSC possibility that some oracle nodes will misbehave. Therefore,
determines which oracle had the correct response. This on top of ensuring that a majority of the oracle nodes have a
consensus on the result, we chose to implement a reputation III. IMPLEMENTATION AND EVALUATION
system that reactively incentivizes the nodes to act properly. In this section, we present the implementation details of
Along with receiving the symmetric key, the doctor also our smart contracts developed in Solidity language. We use
attains the encrypted medical record file by requesting an the online Remix IDE to write, compile, debug, and deploy
access token from the PRSC. This is crucial because the the Solidity code. Testing was carried out by sending real
doctor will not directly download the medical record files Ethereum transactions using multiple accounts.
from the decentralized storage, but rather through the oracles.
In this way, we ensure that attempts made by the doctor to A. IMPLEMENTATION
download the medical record files are indisputably registered Figure 3 shows the entity-relationship diagram to provide
into the blockchain. the necessary implementation details. It shows that the
Controller smart contract is deployed once by the reg- Algorithm 1 submitRecord: Submit New Medical
ulatory agency, and it determines which entities are part of Record
the network. 1 Input: new bundle hash b#
All the stakeholders are initially required to be a part of 2 Require: owner patient only
the Ethereum blockchain network. The first interaction is 3 Push b# to array of uploaded bundle hashes B#
initiated by the patient, and it includes deploying a smart 4 Create new record r with empty requests list
contract called PatientRecord. This contract is used for 5 Add r to array of records R
managing the patient’s medical records. This smart contract 6 Emit: inform patient about successful record addition
is dedicated to one patient, and it stores an array of hashes of
medical record bundles and their mapping to original medical
records. Additionally, this smart contract is connected to a Once a doctor wants to access a certain record of the
universal Controller smart contract, which governs the patient, the doctor needs to call a requestRecord function
existing patients, doctors, oracles; and updates the reputations of the PatientRecord smart contract, as discussed in
of oracles and controls the tokens of oracles. The patient sub- Algorithm 2. The function takes several parameters to iden-
mits a new medical record by calling the submitRecord tify the desired medical record, the public key of the doctor,
function of the PatientRecord smart contract (by issuing and the acceptable range of the number of oracles. The func-
a transaction on the Ethereum blockchain), as described in tion verifies that the doctor supplied the correct public key by
detail in Algorithm 1. computing its hash, and performing a bit-wise AND operation
The code was tested and verified for its functionality and
completeness by going through the expected sequence of 2) CORRECTNESS VERIFICATION
actions, starting from deploying the records, until submit- We perform testing of the proposed smart contracts under
ting scores for each oracle. We performed the testing on a simplified PHR environment to verify their correctness.
JavaScript-based Ethereum Virtual Machines (EVMs) in an Our verification process has comprised six major steps as
Ethereum test network (testnet). discussed below.
1) First, Controller smart contract gets deployed.
B. COST ANALYSIS AND CORRECTNESS VERIFICATION Subsequently, a patient, doctor, and three oracles are
Herein, we present the cost analysis. We verify our imple- added using unique Ethereum addresses. In case of any
mented solution in terms of efficiency and correctness. The address holder attempts to register again, the request
importance of efficiency in Solidity functions is linked to the will be rejected. This can be seen in Figure 4, where an
reward that miners usually get after executing the functions. Ethereum account attempts to register twice times as an
While executing a function, the miners keep track of the oracle with the same address. As expected, the second
operations performed in the function that leads to measure time, execution gets failed. This requirement is impor-
the cost of execution based on the data types and number of tant since we cannot let accounts reset their state in
operations. the network, which is even more crucial for oracles
because their accumulated state overtime highlights
1) COST ANALYSIS their reputation. In case if such a requirement does not
We have implemented and deployed two smart contracts. exist, oracles with low reputations would reset their
Table 1 shows the transaction costs of the functions, execution ratings simply by registering again.
costs expended by the miners, and how those costs are con- 2) The patient adds two medical records. This step is
verted into USD. On April 10, 2020, Ether closed at $159.68, relatively less crucial, and that is because the patient
which is the conversion value used in the table. As for is dealing with his/her own smart contract.
the gas price, we set it to 20 Gwei, which is comfortably 3) The doctor requests both medical records of the patient
above its average, currently floating between 10 Gwei and and sets a minimum oracle count of 2 and a maxi-
15 Gwei. mum oracle count of 3. This request can only be made
The constructor calls inside the smart contracts make by the doctor’s account, and therefore, non-doctors
up the major share of the transaction and execution costs. cannot successfully execute this function. Figure 5
On the other hand, the adder functions have a much shows an example of the patient trying to request the
lower cost as they only initialize the variables of their medical record, which has eventually failed. After any
corresponding stakeholders. As for the remaining func- request, regardless of its failure or success, the patient
tions, starting with submitRecord, the costs are slightly will be informed through an event message on their
increased, especially for the functions requestRecord DApp.
and addOracleRespnose as they perform expensive 4) The patient will respond to the request of the doctor,
checks, array creations, and loops. either by denying or granting access to the data. In our
the doctor’s public key in a one-way process that cannot TABLE 2. Comparison with existing solutions.
be reversed. Furthermore, medical records are stored in a
distributed and decentralized storage, such as IPFS, which
enables patients to offload storing medical files. Using the
proposed approach, the patients do not need to trust any
centralized third party entity to store the files. This ensures
that the stored data is secure enough against well-knows
attacks (e.g., DDoS).
Using Ethereum as a foundation for our approach, allows
the fundamental data flow to become fully traceable. Exam-
ples of such data include logs of requests to medical records,
token creation and transmission, and reputation calculations, C. LIMITATIONS AND CHALLENGES
all along with their changes across time for full provenance Herein, we identify and outline important challenges that
ability. Furthermore, Ethereum gives the ability to authen- pose limitations on the proposed blockchain-based solution
ticate that the addresses of stakeholders are never tampered for a patient-centered PHR system.
with and can only refer to their legitimate entity. Our solution • Interoperability: Extending our approach to a global
design ensures that one Ethereum address is not associated context would require multiple deployments of the
with multiple entities, which eliminates the cases of imper- smart contracts to interoperate among each other. For
sonation or Sybil attacks. example, a registered patient that travels to another
The system network is protected from the internal and country must register again under the new country’s
external attacks. Security is ensured by multiple levels of Controller smart contract. Since the Ethereum
protection. First is the decentralization of the network that blockchain does not offer integration across different
eliminates the risk of the single point of failure problem, and deployments, the patient will not have a global view of
therefore preventing downtime attacks. Second is limiting the their medical records. However, a possibility to mitigate
accessibility of the functions to the registered identities and this limitation is to rely on a global healthcare DApp that
ensuring no function that modifies patient data is accessed can perform the required integration.
by any other entity than the patient specifically. The third is • Key management: Even though the key manage-
implementing a reputation system that is resilient against the ment architecture of blockchain systems is reliable in
vulnerabilities caused by majority vote mechanisms, thereby terms of authenticating the patients; however, they lack
preventing oracles from misbehaving when communicating user-friendly features and do not have any room of
with the smart contract. leniency in case the patients forget their wallet creden-
The privacy of all entities in general and patients in specific tials.
is guaranteed, as a result of the anonymity of all identities • GDPR: As a result of the immutable nature of
and the encryption of all medical record data. Our proposed blockchain, all data stored on-chain cannot be taken off.
system does not store or depend on any database that reveals Our system design partially mitigates this limitation by
the physical identity of users. Moreover, patients do not dis- storing the medical records on IPFS, and thus the records
close any personal information to blockchain, IPFS, or proxy can be deleted. However, the metadata is stored on-
re-encryption nodes even while sharing the medical records chain, which means it cannot be removed even if it is
with their doctors. requested by the patient.
• Smart contracts upgradability: In Ethereum bloc-
B. GENERALIZATION
kchain, smart contracts are stored on-chain, making
Although the proposed solution is targeting a specific use
them immutable. However, this poses a major chal-
case, it can be generalized for a wide range of other prob-
lenge in the development process of smart contracts,
lems. First, we can consider the patient as a general source
as immutability makes them lack upgradability. Once
of information. This is more appropriate than considering
smart contracts are developed and deployed, they can no
the hospital as the source because the source will become
longer be modified. Therefore, it is not possible to patch
the entity that controls who can or cannot access the files.
security vulnerabilities or software bugs with an update.
The doctor can be considered as any entity requesting pri-
vate and sensitive information, which means in some cases D. COMPARISON WITH THE CLOUD-BASED PHR
the same user may want to act as both, either a source of MANAGEMENT SOLUTIONS
information or the requester. The structure of oracles in our We compared our proposed solution with two existing
solution is flexible and can be adapted into other systems. cloud-based PHR management solutions [36], [37] as
The proposed approach is designed for a generic healthcare shown in Table 2. The table shows the superiority of
system, so it can either be tailored to the healthcare system the proposed solution as it employs blockchain technol-
of a specific country or made even more generalized in the ogy, Ethereum smart contracts, distributed trusted ora-
context of universal environments. cles, distributed decentralized database storage, and proxy
re-encryption technology. The proposed solution achieves all [14] W. J. Gordon and C. Catalini, ‘‘Blockchain technology for healthcare:
of the requirements set by our initial design. Facilitating the transition to patient-driven interoperability,’’ Comput.
Struct. Biotechnol. J., vol. 16, pp. 224–230, Jan. 2018.
V. CONCLUSION [15] J. M. Roman-Belmonte, H. De la Corte-Rodriguez, and
E. C. Rodriguez-Merchan, ‘‘How blockchain technology can change
In this paper, we have proposed a blockchain-based approach medicine,’’ Postgraduate Med., vol. 130, no. 4, pp. 420–427, May 2018.
to give patients control over their medical records in a [16] X. Huang, ‘‘Blockchain in healthcare: A patient-centered model,’’ Biomed.
decentralized, traceable, reliable, trustful, and secure manner. J. Sci. Tech. Res., vol. 20, no. 3, p. 15017, Aug. 2019.
[17] (2018). Healthbank Creates the First Patient-Centric Healthcare Trust
We developed two Ethereum-based smart contracts to auto- Ecosystem. Accessed: Mar. 4, 2020. [Online]. Available: https://www.
mate the functionality of the defined events. We integrated healthbank.coop/2018/10/30/healthbank-creates-the-first-pat ient-centric-
our proposed solution with different systems and technolo- healthcare-trust-ecosystem/
[18] (2015). HealthNautica + Factom Announce Partnership. Accessed:
gies, such as IPFS, proxy re-encryption, trusted oracles, and Mar. 16, 2020. [Online]. Available: https://www.factom.com/company-
reputation systems to securely fetch, store, and share patients’ updates/healthnautica-factom-announce-pa rtnership/
medical records. We presented algorithms along with their [19] G. Zyskind, O. Nathan, and A. Pentland, ‘‘Decentralizing privacy: Using
blockchain to protect personal data,’’ in Proc. IEEE Secur. Privacy Work-
implementation and testing details. We evaluated the pro- shops, May 2015, pp. 180–184.
posed contracts under a patient health record (PHR) envi- [20] A. Azaria, A. Ekblaw, T. Vieira, and A. Lippman, ‘‘MedRec: Using
ronment to verify their correctness. We presented cost and blockchain for medical data access and permission management,’’ in Proc.
2nd Int. Conf. Open Big Data (OBD), Aug. 2016, pp. 25–30.
security analysis to show the practicality, resiliency against [21] P. Zhang, J. White, D. C. Schmidt, G. Lenz, and S. T. Rosenbloom,
attacks, and feasibility of the proposed solution. We dis- ‘‘FHIRChain: Applying blockchain to securely and scalably share clinical
cussed how the proposed solution can satisfy defined system data,’’ Comput. Struct. Biotechnol. J., vol. 16, pp. 267–278, Jan. 2018.
[22] V. Patel, ‘‘A framework for secure and decentralized sharing of medical
requirements. We outlined several limitations of the proposed imaging data via blockchain consensus,’’ Health Informat. J., vol. 25, no. 4,
solution. The proposed solution is generic enough and can be pp. 1398–1411, Dec. 2019.
adopted for both permissioned or permissionless blockchain [23] M. Du, Q. Chen, J. Chen, and X. Ma, ‘‘An optimized consortium
blockchain for medical information sharing,’’ IEEE Trans. Eng. Manag.,
networks. The implemented code of proposed smart contracts early access, Feb. 3, 2020, doi: 10.1109/TEM.2020.2966832.
has been made publicly available on GitHub. [24] (2017). Iryo: Global Participatory Healthcare Ecosystem. Accessed:
Apr. 21, 2020. [Online]. Available: https://iryo.network/iryo_whitepaper.
REFERENCES pdf
[1] J. S. Ancker, M. Silver, and R. Kaushal, ‘‘Rapid growth in use of personal [25] M. Egorov, M. Wilkison, and D. Nunez, ‘‘NuCypher KMS: Decentralized
health records in new york, 2012–2013,’’ J. Gen. Internal Med., vol. 29, key management system,’’ 2017, arXiv:1707.06140. [Online]. Available:
no. 6, pp. 850–854, Jun. 2014. http://arxiv.org/abs/1707.06140
[2] EHRs Have Made it Easy for Cardiologists to Treat Their Patients. [26] D. Tith, J.-S. Lee, H. Suzuki, W. Wijesundara, N. Taira, T. Obi, and
Accessed: Jul. 8, 2020. [Online]. Available: http://tbrcinfo.blogspot.com/ N. Ohyama, ‘‘Application of blockchain to maintaining patient records in
2018/12/ehrs-have-made-it-easy-for.html electronic health record for enhanced privacy, scalability, and availability,’’
[3] EMR vs EHR—What is the Difference. Accessed: Jul. 12, 2020. Healthcare Informat. Res., vol. 26, no. 1, pp. 3–12, 2020.
[Online]. Available: https://www.healthit.gov/buzz-blog/electronic-health- [27] C. Chinchilla. (2019). A Next-Generation Smart Contract and Decentral-
and-medical-record s/emr-vs-ehr-difference ized Application Platform. Accessed: Mar. 23, 2020. [Online]. Available:
[4] EHR vs EMR: A Comprehensive Comparison of the Difference Between https://github.com/ethereum/wiki/wiki/White-Paper/
Them. Accessed: Jul. 7, 2020. [Online]. Available: https://www.selecthub. [28] G. Wood, ‘‘Ethereum: A secure decentralised generalised transac-
com/medical-software/the-difference-between-ehr-v s-emr/ tion ledger,’’ Ethereum Project Yellow Paper, vol. 151, pp. 1–32,
Apr. 2014.
[5] (2018). Health Records—Apple. Accessed: Mar. 16, 2020]. [Online].
[29] G. Ateniese, K. Fu, M. Green, and S. Hohenberger, ‘‘Improved proxy re-
Available: https://www.apple.com/healthcare/health-records/
encryption schemes with applications to secure distributed storage,’’ ACM
[6] A. Bhardwaj, S. B. H. Shah, A. Shankar, M. Alazab, M. Kumar,
Trans. Inf. Syst. Secur., vol. 9, no. 1, pp. 1–30, Feb. 2006.
and T. R. Gadekallu, ‘‘Penetration testing framework for smart con-
[30] M. Green and G. Ateniese, ‘‘Identity-based proxy re-encryption,’’ in Proc.
tract blockchain,’’ Peer-to-Peer Netw. Appl., pp. 1–16, Sep. 2020,
Int. Conf. Appl. Cryptogr. Netw. Secur. Berlin, Germany: Springer, 2007,
doi: 10.1007/s12083-020-00991-6.
pp. 288–306.
[7] Y. Sharma and B. Balamurugan, ‘‘Preserving the privacy of electronic [31] S. S. Chow, J. Weng, Y. Yang, and R. H. Deng, ‘‘Efficient unidirectional
health records using blockchain,’’ Procedia Comput. Sci., vol. 173, proxy re-encryption,’’ in Proc. Int. Conf. Cryptol. Afr., Stellenbosch, South
pp. 171–180, Jan. 2020. Africa: Springer, 2010, pp. 316–332.
[8] M. Qazi, D. Kulkarni, and M. Nagori, ‘‘Proof of authenticity-based elec- [32] Ethereum alarm clock. Accessed: Jul. 25, 2020. [Online]. Available:
tronic medical records storage on blockchain,’’ in Smart Trends in Com- https://www.ethereum-alarm-clock.com/
puting and Communications. Singapore: Springer, 2019, pp. 297–306. [33] A. Garai, ‘‘Empirical and practical implementation methodology for clin-
[9] T. McGhin, K.-K. R. Choo, C. Z. Liu, and D. He, ‘‘Blockchain in healthcare ical integration of E-Health iot technology,’’ Int. J. Med. Health Sci. Res.,
applications: Research challenges and opportunities,’’ J. Netw. Comput. vol. 3, no. 12, pp. 117–125, 2016.
Appl., vol. 135, pp. 62–75, Jun. 2019. [Online]. Available: http://www. [34] R. Xu, S. Chen, L. Yang, Y. Chen, and G. Chen, ‘‘Decentralized
sciencedirect.com/science/article/pii/S1084804519300864 autonomous imaging data processing using blockchain,’’ Proc. SPIE,
[10] D. V. Dimitrov, ‘‘Blockchain applications for healthcare data manage- vol. 10871, Feb. 2019, Art. no. 108710U.
ment,’’ Health Inf. Res., vol. 25, no. 1, pp. 51–56, 2019. [Online]. Avail- [35] C. Cai, X. Yuan, and C. Wang, ‘‘Towards trustworthy and private keyword
able: http://www.e-sciencecentral.org/articles/?scid=1115984 search in encrypted decentralized storage,’’ in IEEE Int. Conf. Commun.
[11] B. Houtan, A. S. Hafid, and D. Makrakis, ‘‘A survey on blockchain- (ICC), Paris, France, May 2017, pp. 1–7.
based self-sovereign patient identity in healthcare,’’ IEEE Access, vol. 8, [36] S. Pariselvam and M. Swarnamukhi, ‘‘Encrypted cloud based personal
pp. 90478–90494, 2020. health record management using Des.scheme,’’ in Proc. IEEE Int. Conf.
[12] L. J. Kish and E. J. Topol, ‘‘Unpatients—Why patients should own their Syst., Comput., Autom. Netw. (ICSCAN), Mar. 2019, pp. 1–6.
medical data,’’ Nature Biotechnol., vol. 33, no. 9, p. 921, 2015. [37] C.-J. Wang, X.-L. Xu, D.-Y. Shi, and W.-L. Lin, ‘‘An efficient cloud-
[13] Y. B. Perez. (2015). Medical Records Project Wins Top Prize at Blockchain based personal health records system using attribute-based encryption
Hackathon. Accessed: Mar. 15, 2020. [Online]. Available: https://www. and anonymous multi-receiver identity-based encryption,’’ in Proc. 9th
coindesk.com/medvault-wins-e5000-at-deloitte-sponsored-bloc kchain- Int. Conf. P2P, Parallel, Grid, Cloud Internet Comput., Nov. 2014,
hackathon pp. 74–81.
MOHAMMAD MOUSSA MADINE (Member, RAJA JAYARAMAN received the bachelor’s and
IEEE) received the B.Sc. degree in computer engi- master’s degrees in mathematics from India,
neering from Khalifa University, Abu Dhabi, UAE, the M.Sc. degree in industrial engineering from
in 2019. He is currently a Graduate Researcher New Mexico State University, and the Ph.D.
and a Teaching Assistant pursuing his graduate degree in industrial engineering from Texas Tech
studies with Khalifa University. His research inter- University. He is currently an Associate Professor
ests include blockchain solutions in healthcare, with the Department of Industrial & Systems Engi-
personal health records, and edge computing. neering, Khalifa University, Abu Dhabi, UAE. His
expertise is in multi-criteria optimization tech-
niques applied to diverse applications, including
supply chain and logistics, healthcare, energy, environment, and sustainabil-
ity. His research interests include blockchain technology, systems engineer-
ing and process optimization techniques to characterize, model and analyze
AMMAR AYMAN BATTAH received the B.Sc. complex systems with applications to supply chains, maintenance operations
degree in computer engineering from Khalifa Uni- planning, and healthcare delivery. His postdoctoral research was centered
versity, Abu Dhabi, UAE, in 2019. He is currently on technology adoption and implementation of innovative practices in the
a Researcher and a Teaching Assistant pursuing healthcare supply chains and service delivery. He has led several successful
his graduate studies in computer science with research projects and pilot implementations in the area of supply chain data
Khalifa University. His current research interests standards adoption in the US healthcare system. His research has appeared
include blockchain technologies, the Internet of in top-rated journals including: Annals of Operations Research, IISE Trans-
Things (IoT) security, and information security. actions, Energy Policy, Applied Energy, Knowledge Based Systems, IEEE
ACCESS, Journal of Theoretical Biology, Engineering Management Journal,
and others.
SAMER ELLAHHAM received the bachelor’s in Dubai. He was the Middle East Representative of the JCI Standards
degree in biology and the M.D. degree from the Subcommittee and a member on the Editorial Advisory Board of the Joint
American University of Beirut, Beirut, Lebanon. Commission Journal on Quality and Patient Safety. He was a Reviewer of
He is currently a Cleveland Clinic Caregiver, HCAC Cardiac Quality and Safety Standards. He has been a Champion
Cleveland, OH, USA, seconded as a Senior and the Leader of the use of Lean, Six Sigma, and Change Management
Cardiovascular Consultant and the Director of to improve healthcare quality and has numerous publications in this area.
Accreditation in the Quality and Safety Institute, He is also a Lean Six Sigma Master Black Belt Certified. He is also an
Cleveland Clinic Abu Dhabi. He is also the Middle American Society of Quality (ASQ) trainer in Lean and Six Sigma both
East Regional Chair, the Patient Safety Movement green and black belt. He is also the ISQua Expert. He is also a Recognized
Foundation, the ISQua Expert, the AHA Hospi- Innovative Leader in quality, safety, patient experience, artificial intelligence,
tal Accreditation Science Committee, a member, the European Society of blockchain, telehealth, clinical cardiology, and the use of robust perfor-
Cardiology Heart Failure Writing Group, a member, and an ex-Middle East mance improvement in improving healthcare delivery. He also serves on
Representative of the JCI Standards Subcommittee and American College of several U.S. and international prestigious committees and advisory bodies.
Cardiology Accreditation Foundation Board, Member. He finished his inter- He is also the Middle East Regional Chair of the Patient Safety Move-
nal medicine residency at Georgetown University Hospital–Washington Hos- ment Foundation. He also received several research awards, including the
pital Center and his fellowship in Cardiology at the Virginia Commonwealth DuPont Pharmaceuticals Research Award, ACCP 58th Annual Scientific
University Health System in the USA. He worked in Washington, DC, USA Assembly, Young Investigator Award; the Alfred Soffer Research Award,
at the Georgetown University Hospital–Washington Hospital Center and in ACCP 58th Annual Scientific Assembly, Finalist; the First Young Inves-
several clinical and leadership positions before moving to UAE in 2008. tigator Award 12th, Annual Meeting of the Mediterranean Association of
He continues to be an active clinician. He demonstrates great skill and experi- Cardiology and Cardiac Surgery, American Heart Association Get with the
ence in the management of patients with heart failure, ischemic heart disease, Guidelines Award, SKMC Infection Prevention Award in 2011 and 2012,
and valvular heart disease and led a Multi-Disciplinary Team in the care and Sheikh Khalifa Excellence Award in 2014, Quality Leadership Award from
delivery of advanced therapies to these patients. He has unique abilities to the World Quality Congress and Awards, Business Leadership Excellence
partner and engages local and regional referring providers. He can work in Award from World Leadership Congress in 2015, one the nominees for Safe
a highly matrixed environment, possess strong leadership and organizational Care magazine Person of the Year in the United States, Dubai Quality Award
skills, and have the experience of working effectively in a large health system. in 2015, and Sheikh Khalifa Excellence Golden Award in 2015. He is also an
He led the First AHA GWTG Heart Failure Initiative outside the US and Avid Researcher; his research interests include heart failure, acute coronary
was a recipient of the AHA GWTG Award in Washington. He is also the syndromes, frailty, dyslipidemia, accreditation, second victim phenomenon,
Champion of the AHA GWTG in the region. He has served as a Chief Quality resilience, innovation, artificial intelligence, telehealth, blockchain, patient
Officer for SKMC from 2009 till 2017. In his role, he has led the devel- flow, patient experience and engagement, lean-six sigma, patient safety,
opment of a quality and program that has been successful and visible and bowtie risk management tool, and KPI management. He is also a Recog-
has been recognized internationally by several awards. As a Chief Quality nized World-Leader in these fields. He is also the Eminent Editor of the
Officer and a Global Healthcare Leader, he had a focus on ensuring that the Journal of Cardiology & Cardiovascular Therapy and an Associate Editor
implementation of these best practices leads to breakthrough improvements of the American Journal of Medical Quality. In addition, he also serves
in clinical quality, patient safety, patient experience, and risk management. on the editorial board of Journal of Thoracic Disease and Cardiothoracic
He was the Executive SKMC sponsor of the American College of Surgeons Surgery, Developments in Clinical & Medical Pathology (DCMP), The Joint
National Surgical Quality Improvement Program (ACS NSQIP R ) the lead- Commission Journal on Quality and Patient Safety, Telehealth and Medicine
ing US validated, risk-adjusted, and outcomes-based program to measure and Today (TMT), Blockchain journal (BHTY), Medical Science, Open Journal
improve the quality of surgical care. SKMC is the first multispecialty ACS of Cardiatic Research, UPI Journal of Pharmaceutical, Medical and Health
NSQIP center outside the U.S. He led the publication of, first in the region, Sciences (UPI-JPMHS), Open Access Research in Anatomy, Gerontology
annual SKMC outcome books, since 2011. He is also a strong believer in & Geriatrics studies, Open Access Journal of Clinical Trials, Hyperten-
transparency in health care and external reporting. He was the Leader of sion Today Journal and Focus on Hypertension Journal, Journal of Heart
the First Pilot International Robust Process Improvement (RPI) project by Health, Journal of Cardiovascular Pharmacology, Scientific Research and
the Joint Commission Center for Transforming Healthcare and several other Community, Journal of Surgery and Surgical Procedures, EC Cardiology,
similar successful performance improvement projects at SKMC. He is also Journal of Cardiovascular and Pulmonary Medicine, and Canadian Journal
the American Board Certified in Internal Medicine, Cardiovascular Disease, of Biomedical Research. He is also a reviewer for several peer-reviewed
Vascular Medicine, and American Board of Medical Quality. He was recently journals, including Joint Commission Journal on Quality and Patient Safety,
recertified in 2017 by the American Board of Cardiology (ABIM). He is International Journal of Quality & Reliability Management, the Journal of
also a Certified Professional in Healthcare Quality (CPHQ) by The National American College of Cardiology, the American Heart Journal, Annals of
Association for Healthcare Quality (NAHQ), Certified in Medical Qual- Internal Medicine, Archives of Internal Medicine, Chest, Circulation, Clini-
ity (CMQ) by The American Board of Medical Quality (ABMQ), and Cer- cal Cardiology, Chest, Lancet, Diabetes Care, Archives of Internal Medicine,
tified as the EFQM Model assessor and the Lead Trainer in TeamSTEPPS. Endocrinology and Metabolism, European Journal of Heart Failure, Con-
He is also a Fellow of the American College of Cardiology, the American gestive Heart Failure Journal, Journal of Nuclear Cardiology, the Journal
Heart Association, the American College of Chest Physicians, the American of Transplant Coordination, the Journal of Cardiovascular Pharmacology,
College of Physicians, the American College of Medical Quality, and the the Southern Medical Journal, European Journal of Innovation Manage-
American College of Cardiology, and a Key Member of Heart Failure and ment, The Anatolian Journal of Cardiology, and npj Digital Medicine.
Transplant, Adult Congenital and Pediatric Cardiology, Cardio-oncology, He enjoys volunteering, tennis, healthy lifestyle, innovation, teaching, and
Innovation, Quality, and Peripheral Vascular Disease Sections. He is also a future health.
Distinguished Fellow of the New Westminster College in British Columbia,
Canada, and an Advisory Board Member, the University of Wollongong