I am trying to delete a person using API. This is a DELETE request.
I have double-checked and that ID really exists. The request is getting failed and this is the reason I’m getting from the logs:
Cannot delete or update a parent row: a foreign key constraint fails (
encounter_patientFOREIGN KEY (
patient_id) ON UPDATE CASCADE)
Here’s the full log. delete_error - Pastebin.com
How can I fix it?