  Current systems used by medical institutions for the management and transfer
of Electronic Medical Records (EMR) can be vulnerable to security and privacy
threats. In addition, these centralized systems often lack interoperability and
give patients limited or no access to their own EMRs. In this paper, we propose
a novel distributed data sharing scheme that applies the security benefits of
blockchain to handle these concerns. With blockchain, we incorporate smart
contracts and a distributed storage system to alleviate the dependence on the
record-generating institutions to manage and share patient records. To preserve
privacy of patient records, we implement our smart contracts as a method to
allow patients to verify attributes prior to granting access rights. Our
proposed scheme also facilitates selective sharing of medical records among
staff members that belong to different levels of a hierarchical institution. We
provide extensive security, privacy, and evaluation analyses to show that our
proposed scheme is both efficient and practical.
