FHIR Chat · Conditional delete · hapi

Stream: hapi

Topic: Conditional delete


view this post on Zulip Dexter (Mar 12 2021 at 10:00):

I'm trying to delete a Practitioner and PractitionerRole, but only if there's no CareTeam referring to said Practitioner resource. How do I achieve this?

view this post on Zulip Lin Zhang (Mar 12 2021 at 14:01):

See http://hl7.org/fhir/search.html#include

view this post on Zulip Dexter (Mar 16 2021 at 08:53):

Also, how do I deal with practitioner being deleted? There could be a few 100 care teams that this practitioner might be a part of, so how sending a massive request to cleanup (remove just the reference) the careteams could be problematic. What's the best / suggested way to deal with this?

view this post on Zulip René Spronk (Mar 16 2021 at 09:01):

Why would you want to delete any data at all?

view this post on Zulip Dexter (Mar 16 2021 at 09:05):

Why would you want to delete any data at all?

We have a fairly small application, so in the app, we display all practitioners and manage them there. When a practitioner leaves, I assumed a DELETE was the way to remove that corresponding resource from the server

view this post on Zulip René Spronk (Mar 16 2021 at 09:08):

Have you considered using Practitioner.active and/or PractitionerRole.active (set to false for those that are no longer active) ?

view this post on Zulip Dexter (Mar 16 2021 at 09:11):

Ahh yes! That makes a lot of sense! Thank you!


Last updated: Apr 12 2022 at 19:14 UTC