-
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
UCLA DATA Predicates file #23
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
999e209
anemia.yaml UCLA dataset
Simonlee711 08a191a
TODO
Simonlee711 b612691
Merge branch 'refs/heads/main' into ucla-data
kamilest c85f8c1
Update .gitignore with OS- and IDE-specific files
kamilest 15fcf4a
Run pre-commit
kamilest 065b20b
UCLA 24 HR ICU Morality Task
Simonlee711 fcd76e5
README
Simonlee711 d75ad72
code rabbit fixes
Simonlee711 f0b3af5
code rabbit fixes
Simonlee711 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# UCLA Datasets | ||
|
||
This folder contains details for datasets currently included in the MEDS-DEV effort. | ||
|
||
TODO: More details. | ||
|
||
Tasks TODO: | ||
|
||
- Long Admission | ||
- ICU Mortality | ||
- Hypotension | ||
- Elevated Creatine | ||
- Hyponatremia | ||
- Metabolic Acidosis | ||
- Leukocytosis | ||
- Thrombocytopenia |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
description: >- | ||
This task predicts whether the patient will have abnormal _hemoglobin_ values within a 24-hour window for a given patient. | ||
To be included, patients must have at least one measurement for hemoglobin within a given 24-hour period in the labs table | ||
at UCLA. | ||
|
||
predicates: | ||
labs: | ||
code: { regex: "^LABS//.*" } | ||
|
||
# Plain predicates for hemoglobin | ||
hemoglobin_1: | ||
code: LAB//220228//g/dl | ||
hemoglobin_2: | ||
code: LAB//50811//g/dL | ||
|
||
abnormal_hemoglobin_1: | ||
code: LAB//220228//g/dl | ||
value_min: null | ||
value_max: 13 | ||
value_max_inclusive: False | ||
abnormal_hemoglobin_2: | ||
code: LAB//50811//g/dL | ||
value_min: null | ||
value_max: 13 | ||
value_max_inclusive: False | ||
|
||
# Combining the hemoglobin predicates | ||
hemoglobin: | ||
expr: or(hemoglobin_1, hemoglobin_2) | ||
abnormal_hemoglobin: | ||
expr: or(abnormal_hemoglobin_1, abnormal_hemoglobin_2) | ||
|
||
trigger: lab_start | ||
|
||
windows: | ||
input: | ||
start: trigger | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
has: | ||
hemoglobin: (1, None) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hemoglobin: (1, None) | ||
label: abnormal_hemoglobin |
Oops, something went wrong.
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.
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.
🛠️ Refactor suggestion
Consider using YAML anchors to reduce predicate duplication.
The abnormal hemoglobin predicates share identical configuration except for the code. Consider using YAML anchors to reduce duplication and maintain consistency.
📝 Committable suggestion