MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

Health Data Service FHIR Server - Unable to Bulk Delete Against specific resource with search parameter per documentation #118498

Open deltamaze opened 10 months ago

deltamaze commented 10 months ago

I am trying to perform this bulk delete operation according to this documentation.

Request I am sending DELETE {{FHIRURL}}/Patient/$bulkDelete?change-date-tag=lt2020-09-14 *change-date-tag is a custom search parameter we created on the Patient resource.

I've included the Accept and Prefer Header as shown in the documentation.

And my Azure FHIR Server responds with 400 Bad Request. "diagnostics": "Id must be any combination of upper or lower case ASCII letters ('A'..'Z', and 'a'..'z'), numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters. (This might be an integer, an un-prefixed OID, UUID, or any other identifier pattern that meets these constraints.)",

My server appears to believe that the $bulkDelete is an ID?

Let me know if this is an issue on my end, or with the service. Perhaps example calls can be added to this documentation.

Thanks

Full Response

{
    "resourceType": "OperationOutcome",
    "id": "23076b6dd226d17c6bf5ef8376804a27",
    "meta": {
        "lastUpdated": "2024-01-03T15:40:34.7479282+00:00"
    },
    "issue": [
        {
            "severity": "error",
            "code": "invalid",
            "diagnostics": "Id must be any combination of upper or lower case ASCII letters ('A'..'Z', and 'a'..'z'), numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters. (This might be an integer, an un-prefixed OID, UUID, or any other identifier pattern that meets these constraints.)",
            "location": [
                "ResourceKey.Id // OperationOutcome.Location is deprecated, please use OperationOutcome.Expression"
            ],
            "expression": [
                "ResourceKey.Id"
            ]
        }
    ]
}

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

AjayBathini-MSFT commented 10 months ago

@deltamaze Thanks for your feedback! We will investigate and update as appropriate.

shaktisingh-msft commented 10 months ago

Hi @EXPEkesheth,

Could you please look into this, thanks.

Machet commented 8 months ago

I had exactly the same issue. I've examined github code to find how the url is binding to the action and it turns out that documentation is wrong. Correct route is $bulk-delete.

https://github.com/microsoft/fhir-server/blob/40cceb30cf9d69f94ffbc75ec719e4e4a0b9ccb8/src/Microsoft.Health.Fhir.Api/Features/Routing/KnownRoutes.cs

EXPEkesheth commented 5 months ago

Documentation is updated. Thanks for pointing the issue. This issue can be closed

EXPEkesheth commented 5 months ago

@shaktisingh-msft and @AjayBathini-MSFT - this issue can be closed