Open
Description
Describe the bug
When getting Citation resource from the deployed or local running R5 fhir server, the common search parameters like "_lastUpdated" is not supported.
FHIR Version?
R5
Data provider?
CosmosDB
To Reproduce
Steps to reproduce the behavior:
- Deploy or locally run a R5 fhir server.
- Send the http request like
https://localhost:44348/Citation?_lastUpdated=ge1970-01-01&_sort=_lastUpdated
Expected behavior
The Citation resources.
Actual behavior
The fhir server response indicates that "_lastUpdated" is not supported, but this parameters is common basic search parameters according to fhir definition.
"issue": [
{
"severity": "warning",
"code": "not-supported",
"diagnostics": "The search parameter '_lastUpdated' is not supported for resource type 'Citation'."
},
{
"severity": "warning",
"code": "not-supported",
"diagnostics": "Sort parameter value '_lastUpdated' is invalid, must be a subset of valid search parameters for resource type 'Citation'."
}
]
Other
From the codes, seems VersionSpecificModelInfoProvider
deliberately removed Citation from supported resources in line 54 when building search parameters definition for resources.
public IReadOnlyCollection<string> GetResourceTypeNames()
{
List<string> supportedResources = ModelInfo.SupportedResources;
if (Version == FhirSpecification.R5)
{
supportedResources = supportedResources.Where(x => x != "CanonicalResource" && x != "MetadataResource" && x != "Citation").ToList();
}
return supportedResources;
}