The E12 would like to be able to edit records which are disabled as are in a historical cohort (eg 5). This used to happen in error when users put in a first paediatric assessment date that was wrong, but now the minimum date for users to select is the start of the currently submitting cohort.
In the course of investigating this it was discovered that the Django admin Registration, KPI and AuditProgress would not render if there were orphan records. This PR therefore also fixes:
cascade case deletions to include AuditProgress and KPI related records
Admin template rendering if orphan records present
Code changes
Update to documentation to clarify first paediatric assessment date minimum values for users
Fix AuditProgress and KPI and Registration models to return sensible string even if orphan records
Fix case_views.py to cascade deletes to to KPI and AuditProgress related records
Update case_table partial to allow RCPCH users access to disabled records
Documentation changes (done or required as a result of this PR)
Please describe any changes to documentation here.
Related Issues
List any issues related to this PR here.
Mentions
@mentions of the person or team responsible for reviewing proposed changes.
Overview
The E12 would like to be able to edit records which are disabled as are in a historical cohort (eg 5). This used to happen in error when users put in a first paediatric assessment date that was wrong, but now the minimum date for users to select is the start of the currently submitting cohort.
In the course of investigating this it was discovered that the Django admin Registration, KPI and AuditProgress would not render if there were orphan records. This PR therefore also fixes:
Code changes
Update to documentation to clarify first paediatric assessment date minimum values for users
Fix AuditProgress and KPI and Registration models to return sensible string even if orphan records
Fix
case_views.py
to cascade deletes to to KPI and AuditProgress related recordsUpdate
case_table
partial to allow RCPCH users access to disabled recordsDocumentation changes (done or required as a result of this PR)
Please describe any changes to documentation here.
Related Issues
List any issues related to this PR here.
Mentions
@mentions of the person or team responsible for reviewing proposed changes.