Delete All Medical Records

This feature will remove all patient data, all episode data, and all client data from the system.

This is intended to remove potentially sensitive information from the live database, since students will be using the data in their class.

The script currently being used for this process is located in the Google Drive:

https://drive.google.com/file/d/1vY6ZJgBitKvULe7sO4nmUzB47OqIiold/view?usp=sharing

This button should replicate that script, including the order in which the transactional data is deleted.

 

 

Because this process is irreversible, it will need a second warning.

As the process can take a long time (it is deleting potentially millions of rows from the tables) they should get a spinner warning.

Error State

Although the SQL query should able to cleanly delete the data, there is always the possibility of an error state.

If there is an error, halt the process, display the error if at all possible, and collect a stack trace.

Users can try again after the error is resolved.

Success Message

Conversely, if the process completes without running into any errors, display a success message.