Skip to main content
. 2020 Mar 3;20(5):1389. doi: 10.3390/s20051389
Algorithm 1: Storing patient body vital parameters in the database
Input: patientID, patient_body_parameters
Output: Body parameters are stored in the database and Transaction is recorded.
pragma solidity ^0.5.12;
mapping(address => bool) authorizedPatients;
 if( isPatientAuthorized(patientID))
  store the patient body parameters in corresponding patient’s record;
  transaction is recorded in the blockchain;
  store the transaction hash and block number in the patient record;
 }
 else
  Revert the transaction;
   function public isPatientAuthorized(address patientID) public view return (bool approved)
 {
    return authorizedPatients[patientID];
 }