This PR aims to enhance the handling of deleted resources during the submit changes process. Currently, when a resource is deleted, only a status code is returned from the API without providing any details regarding the deleted resource. This PR addresses this limitation by introducing improvements in two key scenarios:
Handling Individual Resource Deletion:
Before submitting changes, the list of deleted resources is fetched in getRemovedResourcesObject method in FHIRModel.js
Upon successful deletion, it is ensured that the details of the deleted resources are returned along with the response.
Handling Partial Deletion:
In cases where multiple resources are being deleted and only partial deletion is successful, the details of the resource(s) for which deletion was successful iS gathered through newly introduced method getsIdFromOperationOutcome located in FHIRUtility.js.
Only the details of the successfully deleted resource(s) are returned as part of oError.resources.
coverage: 95.68% (-0.07%) from 95.745%
when pulling 37693114bdbd4ac8338e1fb2038acf0e0d3d2b26 on kanikasharma97:task/returnDltdResources
into 707b026a80a7234b34fd3d5075fa4d9058eb3d49 on SAP:master.
This PR aims to enhance the handling of deleted resources during the submit changes process. Currently, when a resource is deleted, only a status code is returned from the API without providing any details regarding the deleted resource. This PR addresses this limitation by introducing improvements in two key scenarios:
Handling Individual Resource Deletion:
getRemovedResourcesObject
method inFHIRModel.js
Handling Partial Deletion:
getsIdFromOperationOutcome
located inFHIRUtility.js
.oError.resources
.