Closed eatyourpeas closed 2 weeks ago
Currently csv_upload overwrites existing Patient records, but does not remove the attached visits, leading to orphan records.
To fix this: On csv_upload, if a Patient instance is being updated, rather than created, the associated visits should be removed first
Currently csv_upload overwrites existing Patient records, but does not remove the attached visits, leading to orphan records.
To fix this: On csv_upload, if a Patient instance is being updated, rather than created, the associated visits should be removed first