NobodyForNothing / blood-pressure-monitor-fl

A cross platform app to save blood pressure values with export function
MIT License
61 stars 10 forks source link

Add checksum to stored measurements #438

Open pimlie opened 4 days ago

pimlie commented 4 days ago

What you want:

Whenever adding a measurement, calculate a checksum of the input values and store that together with the measurement.

Why you want it:

This might be considered to be a bit presumptuous, but f.e. in clinical trials validity of data is a strong requirement. Adding a checksum to database records for measurements would ensure that when reading the data we can check it's still the same as it was when writing the data. In other words, there is always a tiny but non-zero chance a bit flip could occur ;)

We might not always have to check the checksum (fe to show statistics), just have the ability somewhere to verify the data.

NobodyForNothing commented 4 days ago

I think this is already done for each page by sqlite: https://www.sqlite.org/cksumvfs.html

Regardless I think that computing this for every entry is still a bit over the top for 99% of users. Especially since the chance of pressing the wrong button during input is far higher.

If someone wanted to use my app as part of a larger clinical study that has these strict requirements I would prefer a more specialized fork of the app.