Open mbarton opened 2 weeks ago
This would potentially give us space to implement https://github.com/rcpch/national-paediatric-diabetes-audit/issues/334 too
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.
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