Skip to main content
. 2024 Feb 29;24(5):1582. doi: 10.3390/s24051582
Algorithm 1 EHR Generation
  • Require: 

    Collected Health Information HI

  • Ensure: 

    Electronic Health Record EHR and Blockchain EHR Block BlockEHR

  •   1:

    EHR

  •   2:

    BlockEHR{Header,Body}

  •   3:

    Header{Hashprev,Timestamp,MerkleRoot(EHR)}

  •   4:

    Body

  •   5:

    for  HIiHI  do

  •   6:

        EHREHR{HIi}

  •   7:

    end for

  •   8:

    for  (attribute,value)EHR  do

  •   9:

        attributehashHash(attribute)

  • 10:

        valuehashHash(value)

  • 11:

        hashpairHash(attributehash,valuehash)

  • 12:

        signatureSign(hashpair,SKuser)

  • 13:

        BodyBody{(hashpair,signature)}

  • 14:

    end for

  • 15:

    BlockEHR{Header,Body}

  • 16:

    Broadcast BlockEHR to Blockchain Network

  • 17:

    Store EHR in Personal Storage