Skip to main content
. 2023 Jan 4;23(2):565. doi: 10.3390/s23020565
Algorithm 2: Blockchain-based network for the healthcare metaverse
Input: Patient P, Doctor D, Consultation query Cq, Caregiver Cg; and Prediction output O(XAI)
Output: Initiate treatment in metaverse IDVEnv (Virtual Environment) and activate patient environment
1. Procedure: Blockchain_metahealth()
2. For Cq by P do
Response←Fetch_suitable(D)
If (IDP∈BCP) then
Assign Caregiver (BCCg)
Else
Display (“Patient does not exist, please register”)
End If
End for
3. Execute_Contract (IDP, tnp, Sig(P))
Execute_Contract (IDCg, tncg, Sig (Cg))
4. If Dk←Sig (D) then
Execute−Contract (IDD, tnd)
Setup VEnv←(IDP, IDD, IDCg, IDVEnv)
Execute−Contract (IDVEnv)
Main BC←O(XAI)
Order Tn on Main BC (IDp, tnp, T, Sig(P)←Verify (Sig (D), Tn, D)
Order Tn on Main BC (IDp, tnp, T, Sig(P)←Verify (Sig (cg), Tn, Cg)
End If
5. End.
Note: IDP denotes Id of patient, BCP: blockchain of patient, BCCg: blockchain of caregiver, IDCg: Id of caregiver, tncg: transaction pay load of caregiver, IDD: Id of doctor, IDVEnv: Id of virtual environment.