microsoft / microsoft/fhir-server
"type" Search Parameter never makes a successful match
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
**Describe the bug**
The "type" search parameter never successfully matches for the given value. This search parameter is not to be confused with "_type"
**FHIR Version?**
R4
**Data provider?**
CosmosDB
**API Version?**
Azure API for FHIR (version 2021-06-01-preview)
**To Reproduce**
Steps to reproduce the behavior:
1. Populate a server with an Organization resource that includes:
`"type": [
{
"coding": [
{
"system": "http://hl7.org/fhir/us/davinci-pdex-plan-net/CodeSystem/OrgTypeCS",
"code": "ntwk",
"display": "Network"
}
],
"text": "A healthcare provider insurance network"
}
],`
2. Ensure that the server is reindexed
3. Perform a search for /Organization?type=ntwk
**Expected behavior**
The newly added organization resource should be returned in the search, because the "code" in the type value matches the provided search parameter "ntwk"
**Actual behavior**
Query returns an empty bundle, as if none of the resources in the server have the code "ntwk" as the type.
Contributor guide
Research direction
Start by reproducing the issue with an Organization containing the shown type coding, reindex the server, and run /Organization?type=ntwk. Trace how the type search parameter is indexed and queried for the CosmosDB-backed Azure API for FHIR. Done means the matching Organization appears in the returned bundle without confusing type with _type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, sql
- Domain
- api, databases, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100