Skip to content

LNK-4704: Added SearchPost query type to FhirQueryModel.Query - #1382

Merged
dvargaslantana merged 1 commit into
devfrom
LNK-4704
Jan 21, 2026
Merged

LNK-4704: Added SearchPost query type to FhirQueryModel.Query#1382
dvargaslantana merged 1 commit into
devfrom
LNK-4704

Conversation

@dvargaslantana

@dvargaslantana dvargaslantana commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

🛠️ Description of Changes

The new SearchPost query type was missing from FhirQueryModel.Query. This mostly affected the Admin UI not showing what the search criteria was for a query done using SearchPost.

🧪 Testing Performed

Generated a report and was able to see the query body show in the UI:
image

🧑‍🔬 Unit Testing

N/A

📓 Documentation Updated

N/A

Summary by CodeRabbit

  • New Features
    • Extended FHIR query capabilities to support POST-based search operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request adds a new case to the Query switch expression in FhirQueryModel.cs to handle the FhirQueryType.SearchPost query type. When this query type is encountered, it formats and returns a query string using the resource type and _search path with comma-joined parameters.

Changes

Cohort / File(s) Summary
SearchPost Query Handling
DotNet/DataAcquisition.Domain/Application/Models/Api/Configuration/FhirQueryModel.cs
Added new case in Query switch expression to format SearchPost queries using ResourceTypes[0] with _search path and comma-separated parameters

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

config-change

Suggested reviewers

  • edward-miller-lcg
  • seanmcilvenna
  • amphillipsLGC

Poem

🐰 A SearchPost case, so small yet bright,
Joins the switch to make queries right,
No more missing strings in the log's detail—
With _search paths and params, we shall not fail! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The PR description covers the required sections with sufficient detail: changes overview, testing performed with visual evidence, and explicit N/A for unit testing and documentation.
Linked Issues check ✅ Passed The code change directly addresses LNK-4704 by implementing the missing SearchPost query type case, enabling query population and visibility in acquisition logs and Admin UI.
Out of Scope Changes check ✅ Passed The single-line addition strictly implements the SearchPost case to FhirQueryModel.Query with no extraneous changes beyond the stated objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately and specifically describes the main change: adding support for the SearchPost query type to FhirQueryModel.Query, which directly addresses the missing functionality identified in the PR objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@DotNet/DataAcquisition.Domain/Application/Models/Api/Configuration/FhirQueryModel.cs`:
- Around line 30-36: The switch composing the FHIR query string uses
user-controlled QueryParameters directly (in FhirQueryModel's QueryType switch),
risking XSS; sanitize each parameter before joining by applying
HtmlInputSanitizer.Sanitize() or SanitizeAndRemove() to items in QueryParameters
(and use the sanitized list in the Search, SearchPost, Read, and BulkDataPoll
branches) so the returned strings are safe for Admin UI rendering.
🧹 Nitpick comments (1)
DotNet/DataAcquisition.Domain/Application/Models/Api/Configuration/FhirQueryModel.cs (1)

30-37: Add XUnit coverage for the new SearchPost branch.

The switch expression was modified; please add XUnit tests covering FhirQueryType.SearchPost (and optionally the empty ResourceTypes guard) to prevent regressions. As per coding guidelines, each branch in a modified switch should have a unit test.

@dvargaslantana dvargaslantana changed the title Added SearchPost query type to FhirQueryModel.Query LNK-4704: Added SearchPost query type to FhirQueryModel.Query Jan 21, 2026
@dvargaslantana
dvargaslantana merged commit a09c832 into dev Jan 21, 2026
19 of 21 checks passed
@dvargaslantana
dvargaslantana deleted the LNK-4704 branch January 21, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants