Skip to content

LNK-4703: Medication resource skipped for Mega Patient - #1370

Merged
smailliwcs merged 5 commits into
devfrom
user/steven.williams/LNK-4703
Jan 14, 2026
Merged

LNK-4703: Medication resource skipped for Mega Patient#1370
smailliwcs merged 5 commits into
devfrom
user/steven.williams/LNK-4703

Conversation

@smailliwcs

@smailliwcs smailliwcs commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

🛠️ Description of Changes

The primary change here is a correction to the ordering of arguments passed to DataAcquisitionLogQueries.GetCountOfNonRefLogsIncompleteAsync.

🧪 Testing Performed

Ran a report locally to confirm deferral of a reference query initiated before all non-reference queries were completed.

🧑‍🔬 Unit Testing

GetCountOfNonRefLogsIncompleteAsync is already tested (with the correct argument ordering).

📓 Documentation Updated

N/A

Summary by CodeRabbit

  • Refactor
    • Simplified the logic for handling incomplete data logs during processing, streamlining the deferral mechanism.
    • Adjusted parameter ordering in log validation checks for consistency.

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

If a reference query is initiated before all non-reference queries have
completed, put the corresponding log back into pending status *without
incrementing its retry attempts*.
@coderabbitai

coderabbitai Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This PR simplifies the incomplete non-reference log handling in PatientDataService.ExecuteLogRequest. When non-reference incomplete logs exist, processing is deferred with a notice appended and log status remains Pending, removing previous retry-attempt incrementing and complex status-update logic. The call to GetCountOfNonRefLogsIncompleteAsync swaps parameter order: ReportTrackingId and CorrelationId positions are exchanged.

Changes

Cohort / File(s) Summary
Simplified non-reference log handling
DotNet/DataAcquisition.Domain/Application/Services/PatientDataService.cs
Modified ExecuteLogRequest method to replace two-step availability check with deferred processing when non-reference logs are incomplete; removed retry-attempt incrementing and max-retry branch; adjusted parameter order in GetCountOfNonRefLogsIncompleteAsync call (swapped ReportTrackingId and CorrelationId).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • LNK-3978: Refactor Ref Handling At Acquisition #941: Both PRs modify PatientDataService.ExecuteLogRequest and GetCountOfNonRefLogsIncompleteAsync call logic, with #941 adding retry/validation logic while this PR removes the retry branch and adjusts parameter order.

Suggested reviewers

  • edward-miller-lcg
  • dvargaslantana

Poem

🐰 A simpler path the data now takes,
No more retries for medication's sake,
Parameters realigned with care so fine,
The Mega Patient's meds shall shine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title references the linked issue (LNK-4703) and identifies the problem domain (Medication resource skipping), which directly aligns with the main bug fix of correcting argument ordering and deferral logic for non-reference logs.
Description check ✅ Passed The PR description follows the repository template with all required sections completed: description of changes, testing performed, unit testing notes, and documentation status.
Linked Issues check ✅ Passed The PR addresses LNK-4703 by fixing argument ordering in GetCountOfNonRefLogsIncompleteAsync and deferring reference queries without failure when non-reference logs are incomplete, which directly relates to preventing medication resource skipping during mega patient reports.
Out of Scope Changes check ✅ Passed All code changes are scoped to fixing the identified issue: correcting argument order and improving deferral logic for non-reference logs, with no extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


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.

@arianamihailescu arianamihailescu 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.

Looks good

@smailliwcs
smailliwcs merged commit aa7e2f8 into dev Jan 14, 2026
17 checks passed
@smailliwcs
smailliwcs deleted the user/steven.williams/LNK-4703 branch January 14, 2026 17:10
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