-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix criteria offsets #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,14 @@ windows: | |
index_timestamp: end | ||
gap: | ||
start: trigger | ||
end: trigger + 1y | ||
end: start + 365D | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
MI: (None, 0) | ||
target: | ||
start: trigger + 1y | ||
end: trigger + 5y | ||
start: trigger + 365D | ||
end: start + 1825D # 5 years | ||
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistency Found in Time Window Definitions The
🔗 Analysis chainApprove the conversion to days, but verify the use of 'start' for the end time The changes align with the PR objective of expressing years in terms of days, which improves precision. The added comment clarifying that 1825D represents 5 years enhances readability. Please confirm if To verify the impact of this change and ensure consistency, you can run the following script: This will help ensure consistency across similar task definitions. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for other occurrences of time windows defined relative to 'trigger' or 'start'
# Search for 'trigger' and 'start' in time window definitions
rg --type yaml 'trigger \+|\bstart \+' src/MEDS_DEV/tasks/criteria/phenotyping/
Length of output: 357 |
||
start_inclusive: False | ||
end_inclusive: True | ||
label: MI | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Inconsistent Time Window Definitions After Conversion
The change from
trigger + 1y
tostart + 365D
insrc/MEDS_DEV/tasks/criteria/phenotyping/outpatient/MI/1y-5y.yaml
results in:start: trigger + 365D
end: start + 365D
(effectivelytrigger + 730D
)end: start + 1825D
(# 5 years)This adjustment shifts the gap window from one year after the trigger to two years, which may deviate from the intended criteria of "within 1 year of their annual physical."
🔗 Analysis chain
Approve the conversion to days, but verify the use of 'start'
The change from
trigger + 1y
tostart + 365D
aligns with the PR objective of expressing years in terms of days, which improves precision. However, usingstart
instead oftrigger
might alter the semantic meaning of the gap window.Please confirm if
start + 365D
is semantically equivalent to the previoustrigger + 1y
. If not, consider usingtrigger + 365D
to maintain consistency with the description that mentions "within 1 year of their annual physical".To verify the impact of this change, you can run the following script:
This will help ensure consistency across similar task definitions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 357
Script:
Length of output: 619
Script:
Length of output: 559