Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete old submission (including patients) after CSV upload successful #336

Open
mbarton opened this issue Oct 29, 2024 · 0 comments
Open

Comments

@mbarton
Copy link
Member

mbarton commented Oct 29, 2024

Now we can have multiple patients with the same NHS number (#324) we can be a bit safer in how we handle CSV uploads.

If we move the code to delete the old submission to after we have fully validated the CSV and written all the data, an unhandled error during the process would lead to the new submission being inactive but with the old one preserved. With the behaviour as it stands you'll end up with only the potentially half uploaded new submission.

I wonder if for full safety we want to delete the old submission after a given period of time rather than straight away? This is potentially easier said than done given we don't have a periodic scheduled task system set up yet.

We certainly want to retain the last but one CSV upload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant