## 5 Experimental Environment
### Experimental Results and Discussion
#### 5.2.2 Chain Code Performance Comparison  
This section analyzed the network for chain code operations (Update Patient, Query Patient, Create Patient). We examined the success rate, failure rate, send rate, latency, and throughput associated with each operation. Figure 7 illustrates a comparative analysis of chain codes for transaction load 1000 TPS. Figure 7a shows that the average latency for Create Patient transactions is 92.13 ms, significantly higher than that of the Update and Query Patients transactions. The high latency of the Create Patient operation is due to several factors involving more complex transaction logic and resource-intensive processes compared to Query Patient and Update Patient operations. Creating a new patient record requires more computational resources, NFT creation, database writes, and validation steps, contributing to longer transaction processing times and potentially higher resource consumption.  
Similarly, Figure 7b compares the throughput of different chain code operations within the blockchain network. Query Patient transactions exhibit a higher throughput of 26.8 transactions per second (TPS) compared to Update Patient transactions. However, Create Patients with high latency experience the lowest throughput. This highlights the impact of latency on transaction processing efficiency, emphasizing the importance of optimizing latency for improved network performance. Subsequently, Create Patient shows a lower success rate than both the chain codes (which exhibit a 100% success rate), as depicted in Figure 7c. The Create Patient success rate is 45.1% due to the 549 failed transactions; see Figure 7d. Creating a new patient record typically involves multiple data fields, creating NFTs, and more validation steps compared to updating or querying. This increases the chances of failure during the process due to incorrect or incomplete data submissions.  
Next, we analyzed the Query Patient operation to retrieve a patient's record in Hospital 1. We compared the patient record retrieval performances of Hospital 1 and Hospital 2, and Figure 8 presents a comparative analysis of the results. The study revealed a minor increase  
Figure 6: Total execution time.  
in the throughput of Hospital 2 compared to Hospital 1; however, this difference is relatively small because the simulation was conducted within the same system environment. The factors that influence the performance variations include variations in the number and distribution of peer nodes across organizations, the configuration and deployment of chain codes within each hospital's blockchain network, differences in the network bandwidth availability and utilization, the time taken for a patient to authorize access to their NFT, and delays in communication and data transfer between the network participants. These factors collectively impact transaction processing, network efficiency, validation times, data transfer speeds, transaction latency, throughput, and overall system responsiveness.  
Figure 8: Patient record retrieval from Hospital 1 and Hospital 2.  
Figure 7: Comparing Create Patient, Update Patient, and Query Patient chain codes. (**a**) Latency comparison, (**b**) throughput comparison, (**c**) fail count comparison and (**d**) success rate comparison.