AZURE FHIR API Patient Record Delete is not working

Neeraj Shrivastava 141 Reputation points
2023-03-10T01:12:19.1533333+00:00

Hi,

I tried to delete a Patient record by providing ID of the patient using the DELETE action

Example: https://<Inernal FHIR Server/Patient/7f19ccfa-8ce1-4bdc-bba8-2d90813a16fe

This action certainly deleted the patient record as I could not find the ID for this patient in my search.

However when I performed a search on Patient records to find patient records updated since today

http://<Inernal FHIR Server/Patient/Patient?_lastUpdated=ge2023-03-09T00:00:00Z

I am seeing the same patient in the API response though with a complete different ID but all other details remains the same. Looks like DELETE process is creating the same patient record again as a backup which I dont understand.

How can we find if a patient record we are looking at was previously deleted, in the API response for the Patient there is no differentiating attribute\tag\flag indicating that this patient record has been deleted earlier.

Please clarify.

Thanks,

Neeraj.

Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
149 questions
0 comments No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,236 Reputation points
    2023-03-13T19:51:45.31+00:00

    Neeraj Shrivastava Thank you for posting your question in Microsoft Q&A. When you delete a specific resource (patient record in this case), the resource is soft deleted (hardDelete as false) and it will no longer be returned in search. This has been described in detail in doc: Delete (Hard + Soft Delete) and if you want to fully delete the resource, then pass parameter ?hardDelete=true. Also, note the historic versions will still be available regardless of hardDelete and you can either recover with PUT/POST operation described in Recovery of deleted files or purge it with $purge-history operation.

    Based on your description, you got completely different patient ID, then it is different resource. It is also possible that POST operation was made to create a new resource with the same information and still be considered as new resource based on ID. You can enable Diagnostic settings in your FHIR service View and enable diagnostic settings in the FHIR service and track the operations for any operations. I hope this helps with your question and let me know if you have any questions.


    If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful