Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyCarePlanner 2.4.2 - delete-expunge - handle 409 Conflict responses on DELETE operations #483

Open
mattStorer opened this issue Oct 3, 2024 · 0 comments
Assignees

Comments

@mattStorer
Copy link

In MyCarePlanner, when performing a DELETE operation against the SDS, the DELETE may return either 200 OK or 409 Conflict.

When the DELETE operation returns 409 Conflict, it means that there are more resources in the SDS that should be marked deleted, but which haven't been so marked.

This is easy to resolve, by following the following logic:

HttpResponse response = null;
while (response == null OR response.code == 409) {
    response = execute_delete_operation_for_patient;
}

Since the DELETE operation won't process previously-deleted resources, each execution of the DELETE operation against a particular Patient will cause more of the Patient's resources to be marked deleted, until, eventually, with enough successive executions of the request, they will all be marked deleted. At that time, the SDS will return 200 OK.

@swmuir swmuir self-assigned this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants