rcpch / national-paediatric-diabetes-audit

A django application to audit the care of children and young people with diabetes in England and Wales.
0 stars 1 forks source link

Unit-level event log of file uploads #267

Open AmaniKrayemRCPCH opened 1 week ago

AmaniKrayemRCPCH commented 1 week ago

Even if we don't keep old files, can we keep a log of upload dates. Maybe a unit-level event log?

We're getting units stating that they did upload some data before the Q1 deadline, but we can't confirm this as we only have the dates of the most recent upload.

Does this make sense? Happy to discuss on Friday.

mbarton commented 1 week ago

Would update logs for people who enter directly on to the platform also be useful? It would be easy to add more per-unit logs once we build the infrastructure for it

AmaniKrayemRCPCH commented 1 week ago

It would be helpful! Thanks!

eatyourpeas commented 2 hours ago

Just to say I have dones some work on this in PR #275. The Submission model tracks all CSV uploads for a given PDU and overwrites previous data if a new CSV is uploaded during the current audit period. See illustration:

image

(currently RCPCH is treated like a PDU but obvs that will never happen) Only for the currently active submission is the .csv stored - all previously uploaded csvs as well as associated patient data are deleted or overwritten. CSVs are retained for all active submissions in previous audit years (one for each PDU only).

In addition to this, an audit trail of user logs is retained - when people log in/out or reset their password, set up 2FA or fail to login. We also track if a person uploads a csv. See example here image

I can also track if someone touches a patient record (ie updates or creates a patient or a visit) but this will make those logs possibly quite noisy for people who are using the platform questionnaire rather than the csv upload. Are we sure this is what we want?