microsoft / microsoft/fhir-server

_include search parameter with source type not matching the domain resource type should be ignored

Open
#1,267 2 comments 0 reactions 0 assignees View on GitHub
Area-Search Bug VSTS-Backlog
Dominant language
TSQL
Stars
1.4k
Forks
592
Avg merge
2d 7h
Merged PRs (30d)
41

Description

**Describe the bug**
When including a resource type now matching the domain resource type, the include search parameter should be ignored.

**To Reproduce**
Steps to reproduce the behavior:
1. run query: [base]/MedicationRequest?_include:MedicationDispense:patient
2. You will get in return Patient resources which are referenced by MedicationDispense

**Expected behavior**
Search parameter should be ignored and results should be similar to running [base]/MedicationRequest?

**Actual behavior**
Patient resources referenced by MedicationDispense resources are returned

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the MedicationRequest?_include:MedicationDispense:patient query and compare its results with MedicationRequest?. Trace the include-parameter validation and handling for a source type that does not match the requested resource type. Done means the mismatched include is ignored and no Patient resources from MedicationDispense references are returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.