Skip to content

Remove redundant _type filtering#5524

Open
feordin wants to merge 2 commits intomainfrom
users/jaerwin/remove-extra-type
Open

Remove redundant _type filtering#5524
feordin wants to merge 2 commits intomainfrom
users/jaerwin/remove-extra-type

Conversation

@feordin
Copy link
Copy Markdown
Contributor

@feordin feordin commented Apr 27, 2026

Description

When a URL already specifies the Fhir resource, the _type parameter is redundant and causes issues with our SQL query generator. This PR strips the redundant filter.

Related issues

Addresses [issue AB#188372].

Testing

Additional unit tests and E2E tests were created

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@feordin feordin added this to the FY26\Q4\2Wk\2Wk22 milestone Apr 27, 2026
@feordin feordin requested a review from a team as a code owner April 27, 2026 21:18
@feordin feordin added Bug Bug bug bug. Area-Data Area related to data issues Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Schema Version unchanged No-ADR ADR not needed No-PaaS-breaking-change labels Apr 27, 2026
Comment on lines +747 to +749
SearchOptions options = CreateSearchOptions(
resourceType: "Patient",
queryParameters: queryParameters);
Comment on lines +774 to +776
SearchOptions options = CreateSearchOptions(
resourceType: "Patient",
queryParameters: queryParameters);
Comment on lines +444 to +452
{ "gender:missing", "true" },
})),
};
request.Headers.Add(KnownHeaders.Prefer, "respond-async");

using HttpResponseMessage response = await _httpClient.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Assert.Equal(HttpStatusCode.Accepted, response.StatusCode);

Assert.NotNull(operationOutcome);

// Verify it contains an informational issue about _type being ignored
var issue = Assert.Single(operationOutcome.Issue, i =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Data Area related to data issues Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug. No-ADR ADR not needed No-PaaS-breaking-change Schema Version unchanged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants