Algorithm 2: Monitoring patient body vital parameters |
Input: patientID, doctorID Output: patient_body_parameters pragma solidity ^0.5.12; mapping(address => address) authorizedDoctor; if( isDoctorAuthorized(patientID)) { Read the patient body parameters; transaction is recorded in the blockchain; } else Revert the transaction; function public isDoctorAuthorized(address patientID) public view return (bool display) { if(msg.sender == authorizedDoctor(patientID)) return true; else return false; } |