Far more commits here than necessary and that is because it went through multiple experiments before settling on this.
This introduces a new model class, AuditCohort, which has a many to many relationship with Patient. There is an instance per upload, though there can only be one valid record per audit year and cohort.
The cohorts are quarterly within each year.
Code changes
Please describe the changes you made here.
Documentation changes (done or required as a result of this PR)
settings.py corrects the secret key to prevent multiple logins
patient.py refactor PatientListView to reflect filter against current audit year and cohort
home.py: introduce a summary page on upload of csv that counts unique patients cohort_for_date: new function for cohort calculation audit_cohorts`: new list view for AuditCohorts. Allows post request to delete instances from the table. This deletes associated patients and updates the most recent to be valid. Only the valid field in the table can be viewed in the patients list. In future it will hold historical submitted cohorts.
templates
new audit_cohort_list template and its table partial.
some updating and restyling to existing templates as well as updating fields to match new model
caddy/postgres
refactor names in docker compose to allow other rcpch dockerised instances to run in parallel
Thanks @dc2007git that is great. Feel free to make any edits/changes as you see sensible and merge. You are right about the redundant button - needs implementing: perhaps warrants a separate issue.
Overview
Far more commits here than necessary and that is because it went through multiple experiments before settling on this.
This introduces a new model class, AuditCohort, which has a many to many relationship with Patient. There is an instance per upload, though there can only be one valid record per audit year and cohort. The cohorts are quarterly within each year.
Code changes
Please describe the changes you made here.
Documentation changes (done or required as a result of this PR)
settings.py
corrects the secret key to prevent multiple loginspatient.py
refactor PatientListView to reflect filter against current audit year and cohorthome.py: introduce a summary page on upload of csv that counts unique patients
cohort_for_date: new function for cohort calculation
audit_cohorts`: new list view for AuditCohorts. Allows post request to delete instances from the table. This deletes associated patients and updates the most recent to be valid. Only the valid field in the table can be viewed in the patients list. In future it will hold historical submitted cohorts.templates new
audit_cohort_list
template and its table partial. some updating and restyling to existing templates as well as updating fields to match new modelcaddy/postgres refactor names in docker compose to allow other rcpch dockerised instances to run in parallel
Related Issues
closes #97