key: cord-0057801-wh5s6euz authors: Schnitzbauer, Michael title: Smart Contracts in Healthcare date: 2021-03-14 journal: Digitalization in Healthcare DOI: 10.1007/978-3-030-65896-0_19 sha: fb61d5cefd64e349c6fc1e2f46355737dce2dd9e doc_id: 57801 cord_uid: wh5s6euz Decentralized digital ledger technology (DLT) archives data transparent and immutable with a trustless encrypted protocol and a consensus mechanism. It allows secure, public or private transactions with or without anonymity, depending on the blockchain. Smart contracts consist of code that can be executed in a DLT environment. The smart contracts technology enables the development of decentralized apps (DApps) who can interact directly with the blockchain and support on-chain storage. DLT with smart contracts and DApps could solve key challenges in healthcare ecosystems, i.e. healthcare interoperability, multi-center-studies with automatic patient acquisition by smart contracts, patient-centric identification and authentication, pharmacovigilance. code. Smart contracts permit trusted transactions and agreements to be carried out among disparate, anonymous parties without the need for central authority, legal system, or external enforcement mechanism. They render transactions traceable, transparent, and irreversible" (Mohanty 2018) . Smart contracts can be developed and run on the DLT as decentralized Apps (DApps). They interact with the DLT and facilitate on-chain storage (Johnston et al. 2014 ). Antonopoulos and Wood provide a detailed description of smart contracts development with solidity on the Ethereum blockchain (Antonopoulos and Wood 2019) . The number of DApps is increasing and DApp.com gives as a cross-chain platform an overview about current and future developments (DApp.com 2020). Digitalization could help to transform the current centralized healthcare ecosystems via a partly centralized and decentralized system to a fully interoperable decentralized system. In the transformation process centralized IT systems should coexist with decentralized IT systems. The operability of the healthcare system could be ensured in the transformation phase. Profits could be directly invested in the transformation process. Decentralized IT systems could leverage patient-centered care on a national and global scale. The patients own their health data in these systems and decide who can access the data, powered by smart contracts. To start the transformation process towards a more efficient and effective decentralized infrastructure a change in IT strategy in Germany is necessary. It is a major problem that in Germany IT strategy is not aligned with business strategies or IT strategy does not even exist. The IT investment budget can be very low and in around 66% of hospitals in Germany, supported by a study from Deloitte, chief information officers (CIO) reported that the IT budget is only 3% of the total budget. The other 33% have an IT budget of around 6%. New technologies are not sufficiently supported and therefore IT departments lack a lot of funding (Deloitte 2018). The law for the future of hospitals in Germany (Krankenhauszukunftgesetz) will support the healthcare ecosystem to build up a digital infrastructure with 3 billion euros and this could also help to establish decentralized technologies in the future healthcare system in Germany (German Health Ministry 2020a). A decentralized integrated DLT with smart contracts provides the technologies to carry out authorizations and identifications. Therefore it could help to achieve the transformation of patients' health data to electronic health records (EHR). Many countries started their own initiatives to digitalize their health care ecosystems on a national level. Estonia is very successful in this transformation and they even implemented a system with a full blockchain environment to manage EHR (Estonia Health Ministry 2020). The German "elektronische Gesundheitsakte" will be introduced in 2021 and insurance companies for healthcare in the public and private sector have to offer an EHR to their customers by law which will lead again to many solutions without interoperability (German Health Ministry 2020b). The USA started its initiative in 2009 and still has not succeeded to introduce a complete national EHR system and a high number of data breaches happened in the EHR system since 2009 (ARRA 2009; Liu et al. 2015) . In Germany a EHR with interoperability will not be introduced in the near future, but the investment of 3 billion euros could help to start the transformation and implementation of higher IT budgets. The IT strategy decisions in the next 5 years will show whether Germany will transform its healthcare system to an interoperable system with a decentralized infrastructure powered by smart contracts. There are many prerequisites to do before this transformation can successfully happen. The following sections should give an idea which key tasks need to be accomplished to switch in the direction of decentralization and the potent role of smart contracts could play in this scenario. Two privacy data laws shall provide the example how privacy laws guarantee the secure transaction of health data within the healthcare ecosystem. In the USA the Health Insurance Portability and Accountability Act (HIPAA) was introduced to manage patients' privacy. HIPAA privacy regulations ensure that health information of the identifiable individual is managed confidential and the individual person is protected when healthcare data is transferred, received, handled, or shared by healthcare stakeholders, for example, organizations and healthcare professionals. It guarantees that only the minimum necessary health information is used or shared when operating a business. A prerequisite for digital health apps and other systems used in healthcare is that they must be HIPAA compliant when they share personally identifiable information (PII) (HIPAA 2020). In Germany the General Data Protection Regulation (GDPR) protects health data as special categories of personal data. Sector-specific provisions need to be observed, i.e. provisions of the social code, the German E-health Act, federal state laws on hospitals, or the professional codes of ethics for physicians and pharmacists. Additionally, medical secrecy has to be protected under the data protection regulations. Efficient data protection concepts have to be implemented in all entities processing health data (GDPR 2020). These regulations require law advice when you want to develop a DApp as an entrepreneur for the European or American market and they have to be followed to publish the DApp on those markets. In case of the US system any PII to be accessed by a DApp or which is written on a digital ledger when it is public must be encrypted and the interaction parties have to manage the secure interaction with the DApp and any other software solution or system created to collect and add data to an EHR (Zhang et al. 2017 ). In an interoperable healthcare system, clinics can exchange their healthcare information without any boundaries and they also can optimize their healthcare processes (Geraci et al. 1991 ). There are three types of interoperability: 1. Foundational interoperability: data exchange between multiple healthcare institutions. Data interpretation is not required by the responder. 2. Structural interoperability: data exchange mediated by structured data formats. Data interpretation guaranteed by the usage of these standardized data formats. 3. Semantic interoperability: data interpretation enabled at the level of semantics which allows the interpretation of data meaning. The three interoperability types allow different IT architectures and integrated data acquisition devices, i.e. mobile devices for blood sugar acquisition or mobile health tracking devices for blood pressure, pulse, etc. to deliver their structured data with quality, security, and in a cost-effective way. Foundational and structural interoperability are prerequisites for the achievement of semantic interoperability which is high in demand for quality of care and the future implementation of new technologies like decentralized DLT frameworks with smart contracts and future technology integration of artificial intelligence (Zhang et al. 2017) . Additionally, chief medical officers are needed to communicate clinical domain knowledge to data scientists and more sophisticated data standards are necessary for the preparation of unstructured acquired data into the EHR, i.e. acquisition of mobile health data by tracking devices for preventive or personalized medicine. Key in the future will be to integrate clinical domain knowledge and integrated standards who communicate this knowledge, because the myriad sources of health care information cannot be easily interpreted with information systems (Zhang et al. 2017) . Health Level Seven International developed the fast healthcare interoperability resources (FHIR) as an interoperability standard to facilitate the transfer of healthcare information between healthcare stakeholders, like patients, caregivers, healthcare providers, payers, researches, etc. FHIR can directly share specific and well-structured data in comparison to a document-centric approach like PDF-file storage which stores a wide-range of unstructured data with a high security risk. A modern healthcare app like DApps should support data standards like HL7 FHIR which is the blueprint for a standard application programming interface (API) and also is a step towards semantic interoperability (HL7 2020). Patient-centered care gives back autonomy to patients and gives them full access, decision, and control to their health care data. This prevents data fragmentation, communication inaccuracy, and transmission delays (Oates et al. 2000; Reynolds 2009; Ash et al. 2004; Zhang et al. 2017) . In patient-centered care three components are critical to the process: health promotion, communication, and partnership (Constand et al. 2014 ). We owe the patient a fourth component in a decentralized world: health data sovereignty (see Fig. 1 ). DApps should allow data view in real time and patients should be notified when new data is added to the EHR, e.g. in a COVID-19 test, when results are directly transmitted to the EHR. Current health systems have limitations that prevent and further refine a fully patient-centered model: Patients have a lack of data access control in the conventional system. In the conventional health system patients cannot easily change or cancel a health provider's access to their data. Providers own the patient´s data permanently after they get access. Patients move between many providers during their life when they have medical issues or just visit their general practitioner for a recipe. In their life time many providers get access to their data. The more parties have stored your patient's data, the higher the risk of data theft due to the increasing probability of data security breaches. In the conventional health care system the access to stored health care data from a specific patient is a challenge. Patients cannot cancel access to their data by the providers, nor can they share data with other providers. The lack of interoperability between providers prevents secure patient-centered health data management. Patients have to register at every provider with communicating their health data and they have to fill out registration forms every time they seek medical treatment at a hospital, clinic, etc. Their data is stored in centralized silo databases at every provider in their own data processing center (Zhang et al. 2017) . The Whole DApp Workflow Must Be GDPR or HIPAA Compliant The protection of PII against confidentiality breach is a main proposition of HIPAA compliance. A healthcare app data processing workflow from accessing to processing and then distributing the data necessitates HIPAA compliance. In centralized healthcare systems data servers are encrypted and data is protected behind firewalls. In a DLT environment data is publicly available and it is complicated to securely store and manage sensitive health information on the digital ledger (Zhang et al. 2017) . In GDPR the patient must give explicit consent that his sensitive personal data can be processed (GDPR 2020). Currently, DLT cannot be used to store encrypted health data on the ledger. The storage costs and operation expenses would be high to manage the data. Another problem of a public ledger is that the stored sensitive health data would be publicly accessible as long as the ledger is running. Private blockchains could revolutionize this challenge in the future when storage gets cheaper and faster access technology is broadly available, i.e. 5G. The encryption mechanism of the DLT/blockchain used to protect stored data is critical. It could lead to large data loss when the algorithm is corrupted. New algorithms could damage the algorithm and higher computing power, for example, by quantum computing could solve the cryptographic puzzle and make the stored data vulnerable for hackers. Technology in DLT/blockchain can be updated by hard forks and also if the encryption algorithms are updated frequently maximum protection can only be guaranteed if any temporary breach is prevented (Zhang et al. 2017) . Healthcare DApps should be designed well and the storage of encrypted sensitive information should be avoided on the DLT/blockchain. In the future new promising technologies will allow to store data in decentralized cloud systems. A current approach to connect the DLT/blockchain to patients' health data is to store and point at non-identifiable or encrypted metadata. The metadata refers to the actual patient's health data. Another possibility is to store a small data package which is necessary to transfer sensitive data via a trusted channel, like Chainlink that allows a smart contract on the DLT to search and call a data source off-chain. "[Chainlinks'] smart Contracts provide the ability to execute tamper-proof digital agreements, which are considered highly secure and highly reliable. In order to maintain a contract's overall reliability, the inputs and outputs that the contract relies on also need to be secure. Chainlinks provide a reliable connection to external data that is provably secure end-to-end" (Chainlink 2020). Bitcoin was the first cryptocurrency and it was designed to buy and sell commodities on a crypto exchange securely and pseudo-anonymously (Nakamoto 2009 Two stakeholders in healthcare need identification and authentication: patients and healthcare professionals, i.e. physicians, pharmacists, administrators of clinics and insurance companies. Generally, to forget or misplace PII is more prevalent among patients which is the bigger group compared to healthcare professionals. Exposition to healthcare information and continuing education material is higher with healthcare professionals. DApps have to support user identifiability and authentication in addition to strategies to mitigate lost PII (Zhang et al. 2017 ). Vendor-specific data models are used in conventional health systems and apps and those models need to be upgraded and organized to a common standard which is a complex task. DApps need to provide at least structural interoperability and in ideal circumstances semantic interoperability which allows the interexchange of clinical information and the interpretation of received data when similar data models have been implemented. For standardization popular healthcare standards, e.g. HL7 FHIR, DICOM, etc. should be used (Zhang et al. 2017 ). Healthcare is a ubiquitous good everybody needs sooner or later. The healthcare systems worldwide have many customers and DApps need to provide their services to millions of users and have to comply with scalablity. It is important to assess a DApp's feasibility by analyzing how it manages high amounts of traffic on the DLT/blockchain, e.g. How much information can be stored on the ledger of the blockchain until the blockchain platform terminates operation from the app to prevent it from being a malicious attack. Another example is how a DApp will track and route operations to the right party within a high number of users? In that case interoperability of the blockchain should be enabled by the DApp and the same service quality should be provided when users or components of the DApp scale up (Zhang et al. 2017) . Scalability for a blockchain environment is still a concern, because when there is a high number of participants in the DLT the system also has an increase in the need for computational power for the whole blockchain ecosystem (Roehrs et al. 2017; McGhin et al. 2019) . Sensors or smart devices make the challenge of scaling even greater, because the computer power of the devices is smaller than that of the average computer, to circumvent this problem resources can be offloaded to edge devices of the cloud (Hou 2017; McGhin et al. 2019 ). In the DLT/blockchain network the network nodes who are managed by operators are rewarded cryptocurrency as an incentive for their contribution to sustain the decentralized system with the necessary data integrity and agreement mediated by the fault-tolerant consensus mechanism. DLT/blockchain users have to pay the price for the operator's incentive with respect to storing data and performing computations. How high will be the costs to pay for the services provided by the decentralized ledger for a healthcare DApp? Can those costs compete with existing centralized systems? This cost estimation gets important when the services of a DApp are provided to a high number of patients/health provider populations. Is a healthcare system with DLT and improved interoperability with a patientcentered model more cost-effective that current centralized solutions? What will be the costs for network maintenance and for upgrades to new technology implementations and new versions of the system? What impact will the implemented DLT/blockchain have when operational costs are directly related to the native cryptocurrency of the employed blockchain? Will fluctuations in price affect cost estimations? Will special tokens be tailored to fit these needs with a token economy approach (Zhang et al. 2017 )? The on-going acceptance of a patient-centered care model could help to switch from a centralized healthcare system to a decentralized DLT-based healthcare system where the patients get health care data access, health care data control, and can share their health care data for treatment, for research, in patient support groups, in training groups, etc. The change from centralized health care systems to decentralized health care systems allows many questions to be asked: How do we efficiently change the centralized system to a patient-centered decentralized system? Do we need to bridge the introduction of decentralized systems with a centralized/decentralized solution? How can we store health care information on the cloud securely with the help of new decentralized cloud technologies? In the end we have to decide whether DApps with smart contracts on the digital ledger can overcome the conventional centralized systems with the introduction of patient-oriented features (Zhang et al. 2017 ). In a patient-centric health care system all stakeholders, like patients, doctors, researchers, insurers, clinics will benefit from a DLT system with smart contracts (Carson et al. 2018; Kuo et al. 2017; Khatoon 2020; Skiba 2017) . The decentralization of health data would enable full interoperability: First between health stakeholders at a national level and later at a global level. Borders between different healthcare systems could become blurred and payment between different systems could be leveraged by standardization of payment methods and the use of smart contracts. Health data exchange could be possible worldwide and security will be provided by the DLT. To solve the problem of scalability faster telecommunications, i.e. the 5G standard which will be introduced soon could provide the necessary coverage around the world and speeds up to 10 gigabits per second will be possible. As a consequence a faster deployment of decentralized networks could happen (Li 2019) . The storage of data in decentralized cloud systems could move centralized data silos to the cloud. The distribution of data and the way data is stored in those systems have to be adapted. Current decentralized cloud technologies divide data in small data chunks which is called sharding. In the next step these chunks are distributed over the decentralized network which is called swarming. This allows to store data in a decentralized "torrent" architecture. A problem which has to be solved is that health data cannot be openly distributed in a public blockchain. A partly decentralized and partly centralized approach could solve the step towards decentralization in the beginning: Encrypted meta data could be stored in the DLT and the health data itself in centralized data silos until better solutions are developed (Siacoin et al. 2020) . DLT would benefit research, preventive medicine, personalized medicine, and artificial intelligence, because the health data would be stored structured in a decentralized health data ecosystem and could easily be analyzed. Personalized data could be tracked in real time and patients would give the permission to access their data (Randall et al. 2017) . The access of health data from a decentralized health data network where patients have to give their permission by smart contracts as a starter could change research. It could be advertised by multi-center-studies by generating a smart contract for the specific study. The EHR could recommend potential studies from the study trial register and list them for suitable patients in their health record. The patient could give his authorization by simply signing the smart contract of the study. The researchers then get access to the clinical data, radiological data, etc. A foundational change could happen for study population acquisition, because a global decentralized health data ecosystem also would include patients from small-and middle-income countries. Non-university hospitals would also be able to have an incentive to participate in multicenter studies nationally and globally, because a decentralized EHR provides the infrastructure. The smart contract system manages all study relevant management tasks predetermined by the study protocol. Studies could be adapted to race, religion, and society requirements (Brennan 2017; Radanovic and Likic 2018) . The management of studies by smart contracts could also lead to new ways of research funding. Participating centers could be given study tailored research grants by the appropriate multi-center-study backed by a research foundation with their own side chain, like the German Research Foundation, the NIH, etc. Research money spending could be reduced, because smart contracts do not need any third parties. A more open policy in research could lead to critical voices around study protocols. Another application in healthcare is pharmacovigilance for the pharmaceutic industry. Smart contracts can write the different produced medication batches into a blockchain. Medications of patients can be identified via the connected side chain from the pharmaceutic company to the EHR and all batches are personalized to the treated patients which is mediated by a smart contract. When the batch cannot be verified in the pharmacovigilance blockchain, then it is sure that a fraud batch was sold to the drugstore and must be stopped from distribution. A fraud solving smart contract could help to solve this problem by informing the patient and the logistics distributor. All are connected by a DLT sidechain and communication is mediated by the appropriate smart contract. The logistics partner could then be stopped automatically to distribute the batch of this fraud medication. The patient is informed that he has a wrong batch, asked to dispose it and the smart contract also orders a new batch of the medication. Patients could also directly report side effects of a medication by their HER in a patient reported outcome. All pharmaceutical companies must be connected by side chains to the health care DLT framework. Then a special smart contract could report of side-effect to the vendor, producer, and the scientists and improve drug surveillance. Global health data exchange could accelerate the future of healthcare and personalized medicine. This allows the treatment of patients based on their personal imprinting influenced by their own genetics, epigenetic, life habits and environment. (Kshetri 2018) . The decentralization of data will prevent patient's data loss, because everything is written in the same archive and a chronological life time record is generated (Dimitrov 2019) . The decentralization of data management for patient records will offer accessible infrastructure which allows low-and middle-income countries to connect without having to establish a cost intensive own infrastructure. A lot of data of this under-served and often underestimated group is just waiting to be added (Boulos et al. 2018) . Interoperable structures could also allow doctors to fill out more flexible roles from home by telemedicine or from different locations around the world, because a decentralized system can establish new opportunities which still have to be developed further by experience and try out scenarios. The increasing connectivity and standardization in healthcare could lead to new economic possibilities which can easily be managed by smart contracts and integrated into the decentralized ecosystem by side chains. Another important integration is the direct connection of wearable data to the patient's record which are already collected by step counters and devices for blood glucose management and blood pressure management. The future will create a new type of smart health care stakeholder powered by a smart contract blockchain environment which will thrive new possibilities to work together interdisciplinary and puts aside grudge. Currently we are not prepared to go the step beyond our current system. I am curious to follow the next step and some examples I depicted are chosen to be provocative, but I just try to encourage people to start thinking over one's horizon. Hierarchies prevent our system from thriving beyond the point where we only try to tailor our research after grant proposals (Kuo and Oncho-Machado 2018; Greenberger 2019) . A patient-centric approach could even more strengthen the patient's position and further will give the doctor the opportunity to build up cooperative relationships, provide extensive information about diagnosis and treatment (Stawicki et al. 2018 ). Decentralized future DLT frameworks with high transparency, immutability, implemented DLT side chains, and smart contracts could provide the structural IT backbone for a future global health ecosystem and be the key requirement for the realization of healthcare interoperability. Future developments will implement additional layers to the ledgers that allow data storage on decentralized cloud solutions directly connected to the DLT framework with given privacy and security. Future technology with decentralized cloud solutions, better cryptography tailored by quantum computing, and the 5G communication protocol could start the future health care economy by providing scalability for DApps. Currently the number of DLT and smart contract developers is rising, because decentralized ledger technology is implemented in every industry besides healthcare. More books are published by pioneer programmers to guide interested programmers towards DApp development on the blockchain and also about smart contract development. New micro-and macroeconomic solutions could arise by integrating DLT with current healthcare protocols and the usage of smart contracts as a support could solve healthcare's interoperability problem, get a decentralized EHR which can be used from all stakeholders and future smart contracts could automate healthcare payments, enhance patient admission with home preparation of the hospital stay, automated quality management on structured EHR data, data structuring in a decentralized EHR, national and global comparison of hospitals, structured data in the EHR for artificial intelligence analysis, and the support of clinical-decisionsupport-systems, multi-center-studies with tailored, automated patient acquisition through the blockchain. Mastering Ethereum: Building Smart Contracts and DApps Some unintended consequences of information technology in health care: The nature of patient care information system-related errors Geospatial blockchain: Promises, challenges, and scenarios in health and healthcare Blockchain HIE overview: A framework for healthcare interoperability Blockchain beyond the hype: What is the strategic business value Blockchain applications for healthcare data management IEEE standard computer dictionary: Compilation of IEEE standard computer glossaries Block what? The unrealized potential of blockchain in healthcare The application of blockchain technology in E-government in China The general theory of decentralized applications, dApps A blockchain-based smart contract system for healthcare management Blockchain and electronic healthcare records Blockchain distributed ledger technologies for biomedical and health care applications Modelchain: Decentralized privacy-preserving healthcare predictive modeling framework on private blockchain networks 5G and intelligence medicine-how the next generation of wireless technology will reconstruct healthcare? Data breaches of protected health information in the United States Blockchain in healthcare applications: Research challenges and opportunities Ethereum for architects and developers: With case studies and code samples in solidity Bitcoin: A peer-to-peer electronic cash system The impact of patient-centered care on outcomes Opportunities for use of blockchain technology in medicine. Applied Health Economics and Health Policy Blockchain applications and use cases in health information technology Patient-centered care OmniPHR: A distributed architecture model to integrate personal health records The potential of blockchain in education and health care What's new in academic medicine? Blockchain technology in health-care: Bigger, better, fairer, faster, and leaner Smart contracts Blockchain and crypt currency Metrics for assessing blockchainbased healthcare decentralized apps