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

Retain errors saving patient or visit after CSV upload #347

Open mbarton opened 2 weeks ago

mbarton commented 2 weeks ago
  1. Remove NHS number from a row in dummy_sheet.csv
  2. Upload the CSV file

At the moment, you see an error flashed up in messages but once you reload the page you have no idea the upload failed.

I think we should retain such errors as an errors field on the submission itself. We can then show a summary of all errors on the front page of the submission, combining those errors saving the CSV row at all with validation errors on the Patients and Visits from rows we have managed to save

mbarton commented 2 weeks ago

This would potentially give us space to implement https://github.com/rcpch/national-paediatric-diabetes-audit/issues/334 too

eatyourpeas commented 5 days ago

I think both of these items are now implemented - there is a toast message that appears if there are typing errors that fail import into the dataframe and the CSV is rejected For all other errors, there is toast message on redirect to the submission page to say submission made but there are errors to fix, and these are gathered up and posted in a table in the submission page. There is a separate issue to put these as a separate sheet in the excel or csv.

This feature does not handle the no NHS number issue - I am not clear if we should reject these CSVs outright, or retain them. My feeling is probably we should reject the whole csv and signpost which numbers are missing.