Closed rvandewater closed 1 month ago
This pull request includes multiple updates across several files related to the MEDS_DEV project. Key changes involve enhancements to the README.md files for the AUMCdb dataset and general dataset contributions, the introduction of new predicates in the predicates.yaml file, modifications to the extract_task.sh script for improved usability, and the addition of a new dataset template in dataset.md. These changes collectively aim to improve documentation, streamline dataset contributions, and clarify access requirements and task definitions.
File Path | Change Summary |
---|---|
src/MEDS_DEV/datasets/AUMCdb/README.md |
Updated to provide detailed dataset description, access requirements, supported tasks, and links. |
src/MEDS_DEV/datasets/AUMCdb/predicates.yaml |
Added predicates for ICU admission, discharge, and death with specific regex patterns and codes. |
src/MEDS_DEV/datasets/README.md |
Refined contribution instructions, including specifying packages, dataset information, and PR creation. |
src/MEDS_DEV/helpers/extract_task.sh |
Added help function, argument validation, and execution logging to enhance script usability. |
src/MEDS_DEV/templates/dataset.md |
Introduced a new dataset template outlining structure and components for dataset creation. |
src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml |
Clarified task description, removed hospital discharge predicate, and updated discharge_or_death logic. |
π° In the meadow, changes sprout,
With README updates, there's no doubt.
Predicates added, templates anew,
For datasets bright, a clearer view.
Hop along, letβs document right,
In the world of MEDS, we take flight! πΌ
src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml (2)
Line range hint `1-56`: **Verify predicate definitions are provided.** The configuration uses several undefined predicates (marked with `???`). Please ensure that the following predicates are properly defined: - `icu_admission` - `icu_discharge` - `death` Let's check for the predicate definitions: ```shell #!/bin/bash # Description: Verify that the required predicates are defined somewhere in the codebase # Search for predicate definitions rg -A 5 "predicates:.*(?:icu_admission|icu_discharge|death):" "src/MEDS_DEV/" ``` --- `27-27`: **LGTM! The simplified predicate aligns with the task description.** The removal of `hospital_discharge` from the `discharge_or_death` predicate correctly focuses the task on ICU-specific mortality rather than hospital mortality. Let's verify that this change is consistent across related mortality prediction tasks:β Verification successful
**The simplified predicate is correctly implemented and isolated to ICU mortality** The verification confirms: - `first_24h.yaml` is the only mortality prediction configuration in the codebase - The `hospital_discharge` predicate is only used in readmission tasks and MIMIC-IV dataset definitions - The `discharge_or_death` predicate correctly uses only ICU-specific predicates (`icu_discharge` and `death`) This change maintains a clean separation between ICU-specific and hospital-wide tasks, with no inconsistencies found in related configurations.π Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for any inconsistencies in mortality prediction configurations # that might still reference hospital_discharge in their predicates # Search for other mortality prediction YAML files that might reference hospital_discharge rg -l "hospital_discharge" "src/MEDS_DEV/tasks/criteria/mortality/" # Check the predicate definitions in related mortality tasks rg "discharge_or_death:\s+expr:" "src/MEDS_DEV/tasks/criteria/mortality/" ``` Length of output: 331 --- Script: ```shell #!/bin/bash # Let's try a different approach to find mortality prediction configurations # Search for YAML files in the mortality directory fd -e yaml . src/MEDS_DEV/tasks/criteria/mortality/ # Then let's examine the predicates section in these files rg -A 10 "predicates:" src/MEDS_DEV/tasks/criteria/mortality/ # Also search for any occurrence of hospital_discharge in the entire MEDS_DEV directory rg "hospital_discharge" src/MEDS_DEV/ ``` Length of output: 1291
@mmcdermott Tested and ready for merge with the caveat at #28. Let us know how to deal with that.
Though we'll want to fix the PR issues before merging.
Executed the pre-commit linting. Hope that everything works now.
Summary by CodeRabbit
Release Notes
New Features
Documentation