## 4 Technical Implementation of the Healthcare Hygiene Quality System
### Chaincode Implementation
The RoutineCleaning function was selected due to its relevance to hygiene traceability and its straightforward data model, making it ideal for illustrating how cleaning actions are recorded and queried within the distributed ledger. Upon successful execution of this function, a new cleaning record is immutably written to the world state database, which is backed by CouchDB in this implementation. Each cleaning entry is uniquely identified using a composite key formed by the concatenation of the room identifier and the specified date. This design ensures both uniqueness and temporal traceability. Figure 6 illustrates an actual cleaning event document stored in the CouchDB database. In this example, the event was recorded by a staff member named [PERSON] for Room R101 on 14 May 2025. The chaincode appends a system-generated timestamp at the moment of execution, thereby enabling verifiable chronological ordering of cleaning events. ### Performance Evaluation

To assess the performance of the proposed blockchain-based hygiene monitoring system, a set of benchmarking tests were conducted using Hyperledger Caliper on the deployed multi-organization Hyperledger Fabric network. The RoutineCleaning smart contract function was invoked under controlled conditions with a target of 1500 successful transactions submitted at a rate of approximately 178.8 transactions per second (TPS). The performance metrics obtained from the benchmark are summarized in Table 3, which presents throughput, latency, and transaction success rates. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Metric** & **Value** & **Description** \\ \hline Successful & 1500 & Total number of transactions successfully committed to the ledger. \\ \hline Failed Transactions & 0 & Number of transactions that failed during submission or endorsement. \\ \hline Submission Rate & 178.8 TPS & Transactions submitted per second. \\ \hline Maximum Latency & 7.80 s & Highest delay observed in processing a transaction. \\ \hline Minimum Latency & 1.67 s & Lowest delay observed in processing a transaction. \\ \hline Average Latency & 5.55 s & Mean delay across all transactions. \\ \hline Throughput & 114.27 TPS & Number of transactions successfully processed per second. \\ \hline Latency/TPS Ratio & \(\sim\)0.0486 s/TPS & Efficiency indicator combining latency and throughput. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of key performance metrics recorded during benchmark execution using Hyperledger Caliper. Figure 6: A sample cleaning event document stored in CouchDB after executing the Routine Cleaning chaincode function. All 1500 transactions were successfully processed, with no recorded failures. The network achieved a maximum throughput of 114.27 TPS, indicating the system's capacity to sustain high transaction volumes under optimal conditions. Latency measurements ranged from a minimum of 1.67 s to a maximum of 7.80 s, with an average latency of 5.55 s per transaction. These results indicate a balanced system capable of handling routine events with reasonable responsiveness and without overload. In addition to performance outcomes, detailed system-level resource utilization data was collected to analyze the impact of various components on the network's behavior. Table 4 shows the resource utilization details of key Hyperledger Fabric components during benchmarking, highlighting performance bottlenecks. Notably, /peer0.org1.example.com exhibited the highest CPU load (8.10%) and memory consumption (174 MB), confirming its role as the primary endorser during the test. Similarly, /couchdb0--used as the world state database for Orgl--recorded the highest CPU usage (13.02%) among CouchDB containers, reflecting intense read/write operations during transaction commits. Ordering nodes also showed moderate but consistent disk writes, particularly /orderer2.example.com, which recorded 11.5 MB of disk write, indicating its active participation in block generation and propagation.