FHIR Chat · JPA Server - Cascade Delete with Expunge · hapi

Stream: hapi

Topic: JPA Server - Cascade Delete with Expunge


view this post on Zulip Johannes Oehm (Mar 18 2021 at 14:44):

Hello everyone,

I'm trying to delete all resources like Encounters, Observations,... associated with a specific patient on my HAPI JPA server.
In theory, simply calling DELETE Patient/IMI-12345678?_cascade=delete&_expunge=trueshould do the job (expunge and cascading deletes are enabled, I also increased the MaximumDeleteConflictQueryCount of the DaoConfig to 500).

The operation takes some time and the OperationOutcome reports success, however, when I invoke GET Patient/IMI-12345678/_historythe patient still appears. The same applies for all resources that should have been deleted.

Is there anything else I have to enable? Or are the _cascade and _expunge parameters not meant to be used together?

I would be glad to get some advice! Thanks in advance!

view this post on Zulip Patrick Werner (Mar 25 2021 at 11:10):

I think this is a bug, i couldn't get cascade delete to work in the current version. Created a Issue linked here: https://chat.fhir.org/#narrow/stream/179167-hapi/topic/_cascade.3Ddelete.20isn't.20working

view this post on Zulip Jame Dang (Apr 10 2021 at 18:27):

@Patrick Werner : I asked you for the search parameter but now I can handle my problem now (sorry for your inconvenience )


Last updated: Apr 12 2022 at 19:14 UTC