# Security, Privacy, and Reliability in Digital Healthcare Systems Using Blockchain
## 3 Proposed Methodology  
In this section, we explain our proposed scheme. We propose and design a patient query sub-module that consists of a private blockchain sub-module, a healthcare smart contract sub-module, and a healthcare database sub-module. In our proposed framework, the patient sub-module plays a very important role and provides assistance to users for accessing patient privacy copyright records. Moreover, it serves functions for querying and linking various systems. The blockchain subsystem includes a private blockchain for doctors and healthcare systems with patient privacy. Figure 1 shows the sub-module of the the proposed healthcare module. In Figure 1, we describe the detailed structure of the sub-module of the system, which operates according to the following steps. **Step 1. ** In our proposed framework, the user first logs into the system through a blockchain application programming interface (API), and then requests the desired patient health record. **Step 2. ** In this step, the smart contract is triggered for the privacy check. This smart contract will check for the security and access control rights. If the applicant making the request has authorized user rights, then they are provided with access to a specific \(PHR\); otherwise, access is denied. **Step 3. ** In this step, the contract confirms that the users have eligible privacy and access control rights, and the \(PHR\) is provided to the user. **Step 4. ** In this step, the authorization level is checked according to the access control policy for each participant. This depends upon the users' access control rights; a user can read, write, delete, add, or update. **Step 5. ** In this step, the smart contract monitors the behavior of a patient and records the session and interaction. Figure 2 shows the return process of the sub-module of the framework. In the following, we explain it step by step. **Step 1. ** In this step, the participant first logs into our proposed system and then searches for the desired patient privacy record. **Step 2. ** In this step, the smart contract is triggered in order to check the privacy and access rights. The smart contract checks if the session is overdue; if it is overdue, then it is returned to the return sub-module for privacy updates. **Step 3. ** In this step, the smart contract updates the \(PHR\) and modifies it. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Benchmark Models** & **Access Control** & **Performance** \\ \hline Medrec [49] & NO & Medium \\ Medblock [50] & NO & Low \\ Medchain [51] & NO & Low \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Analysis of the benchmark models. **Step 4. ** Then, the returning smart contract performs recalculations, updates the latest status for the \(PHR\), and maintains its privacy. Next, we explain the reading sub-module of our proposed system. The reading process is shown in Figure 3, and it acts according to the following steps. **Step 1. ** Participants first log into our proposed framework and then search for their desired \(PHR\). **Step 2. ** When the smart contract for reading is triggered, it checks the privacy. **Step 3. ** Our proposed smart contract verifies the reading platform for privacy purposes. Then, after checking the privacy and access control rights, participants are informed that they can read the information. **Step 4. ** In this step, the smart contract will regularly check whether or not the usage period is still valid. Figure 1: Data flow of the proposed healthcare application subsystem. Figure 2: Proposed privacy check using the cross-domain module. In the next sub-module, the participant checks the privacy record during the loan period. The participant can try to connect to the healthcare reading platform at any time to read the requested documents. The reading processes are explained in Figure 3, and they use the following steps. **Step 1. ** Users first try to log into the system and search for the desired health records. **Step 2.