Skip to main content
. 2025 Feb 28;11:e2702. doi: 10.7717/peerj-cs.2702

Table 2. Algorithm to update patient details.

Algorithm 1: Update_Patient_details
Input: DOCId, MRNId, newAge, newWeight,
newBMI, newPulserate, newHb, newCycle,
newFollicleNo.L, newFollicleNo.R, newAvg. FsizeL,
newAvg.FsizeR, newEndometrium
Check if MRNId already exists
If no, then
      throw error “MRNId doesn’t exists”
End
Check if DOCId already exists
If no, then
      throw error “DOCId doesn’t exists”
If DOCId have access to MRNId then
      Create Object Patient for particular MRNId
      Patient.Age-> newAge
      Patient.Weight-> newWeight
      Patient.BMI-> newBMI
      Patient.Pulserate-> newPulserate
      Patient.Hb-> newHb
      Patient.Cycle-> newCycle
      Patient. FollicleNo.L-> newFollicleNo.L
      Patient. FollicleNo.R-> newFollicleNo.R
      Patient. FollicleNo.L-> newAvg. FsizeL
      Patient. FollicleNo.R-> newAvg. FsizeR
      Patient.Endomet-> new Endomet
      Patient.changedby-> updatedBy
else
      request access from patientId
      Doctor_requestAccessfromPatient(ctx,
      MRNId, DOCrId)
End
update the changes in ledger
End