fix(clinical_report): only flag aact studies based on intervention intention#144
Merged
Conversation
Contributor
Author
|
The fix is successful. We gain back all the evidence from AACT: gain a lot of precedence for existing associations + 5k new associations that we were missing. Clinical Report Metrics after fix
Evidence Metrics after fix
|
DSuveges
approved these changes
Jun 22, 2026
DSuveges
left a comment
Contributor
There was a problem hiding this comment.
All changes makes perfect sense. Haven't seen anything dealbreaker.
95bfe54 to
b680a82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem:
ClinicalReport.flag_indirect_primary_purposewas flagging all clinical reports wheredrug_intent == null.This is correct for AACT trials, but the function is called on the full set of reports, meaning that all other sources will be flagged as they are not covered by the LLM extraction.
The fix: the flag in
flag_indirect_primary_purposeis the same, with the additional condition that only AACT reports are checked.The consequences can be seen downstream in the evidence set:
Note: even though only
PHASE_4andAPPROVALare the only stages where the difference is negative, this bug is affecting all stages: we are basically only building indications/evidence based on AACT trials that pass the criteria. Once the fix is in place, we should see more evidence over the board.I will put exact numbers once I run it locally.
Changelog
flag_indirect_primary_purposetest_flag_indirect_primary_purpose_non_aact_not_flagged