microsoft / fhir-server

A service that implements the FHIR standard
MIT License
1.19k stars 514 forks source link

Some search parameters support not indicated in CapabilityStatement #4672

Open tswelsh opened 2 weeks ago

tswelsh commented 2 weeks ago

Describe the bug A consumer of our FHIR server refuses to use the _summary search result parameter, as they (reasonably) determine whether they can use it based on its presence in the server's CapabilityStatement. The only items in CapabilityStatement.rest.searchParam are _type and _count (this is on release 4.0.198):

[
    {
        "name": "_type",
        "definition": "http://hl7.org/fhir/SearchParameter/type",
        "type": "token"
    },
    {
        "name": "_count",
        "type": "number"
    }
]

The server does accept a _summary=count and returns a Bundle in the expected form, e.g.

{
    "resourceType": "Bundle",
    "id": "1328b006-3cc2-4935-a832-a6034c8d3806",
    "type": "searchset",
    "total": 121
}

So it seems reasonable that this should be reflected in the CapabilityStatement, probably along with all other supported parameters. See e.g. the lists of Common search parameters and Search result parameters.

FHIR Version? Stu3

Data provider? SQL Server

To Reproduce Steps to reproduce the behavior:

  1. Query the server's capability statement at the /metadata endpoint.

Expected behavior All supported search/search result parameters will be returned in the CapabilityStatement.

Actual behavior Not all supported search parameters were returned; in particular _summary is missing.

tswelsh commented 2 weeks ago

The global search parameters appear to be added at https://github.com/microsoft/fhir-server/blob/main/src/Microsoft.Health.Fhir.Core/Features/Conformance/CapabilityStatementBuilder.cs#L172 - explicitly just the 2 parameters mentioned above.

EXPEkesheth commented 1 week ago

Thanks for reporting the issue and we will take a look. AB130950