From 69a47b81a34c8477aaa87e34286fa3fe15277083 Mon Sep 17 00:00:00 2001 From: rvandewater Date: Fri, 16 Aug 2024 11:02:38 +0200 Subject: [PATCH 01/14] added new file --- .../mortality/in_icu/first_24h_aumc.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml diff --git a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml new file mode 100644 index 0000000..3f521e4 --- /dev/null +++ b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml @@ -0,0 +1,52 @@ +# metadata: +# name: 24h ICU Mortality +# version: ... +# author: ... +# tags: +# - mortality_prediction +# - critical_care +# - post_admission_prediction +# description: ... + +description: >- + This file specifies the base configuration for the prediction of in ICU mortality, leveraging only the first + 24 hours of data after ICU admission, with a 24 hour gap between the input window and the target window. + Patients who die or are discharged from the ICU in the gap window are excluded. Patients who die in the same + hospital stay but in a subsequent ICU stay are **not** positive labels for this task. + Note that this task is in-**ICU** mortality, not in-**hospital** mortality or **30-day** mortality, which + are different tasks. + Note that this task is predicting the outcome for a patient's entire ICU admission, not just the first 24 + hours or the subsequent 24 hours after the trigger event. Imminent mortality (on various time-scales) are + different tasks. + +predicates: + icu_admission: ??? + icu_discharge: ??? + hospital_discharge: ??? + death: ??? + discharge_or_death: + expr: or(icu_discharge, death, hospital_discharge) + +trigger: icu_admission + +windows: + input: + start: null + end: trigger + 24h + start_inclusive: True + end_inclusive: True + index_timestamp: end + gap: + start: trigger + end: start + 48h + start_inclusive: False + end_inclusive: True + has: + icu_admission: (None, 0) + discharge_or_death: (0, None) + target: + start: gap.end + end: start -> discharge_or_death + start_inclusive: False + end_inclusive: True + label: death From b0b6cbd3c7315b711acb1727bc67b02ca9ad1b30 Mon Sep 17 00:00:00 2001 From: rvandewater Date: Fri, 16 Aug 2024 11:12:51 +0200 Subject: [PATCH 02/14] attempt to get working sample --- .../criteria/mortality/in_icu/first_24h_aumc.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml index 3f521e4..df3d803 100644 --- a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml +++ b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml @@ -20,13 +20,13 @@ description: >- different tasks. predicates: - icu_admission: ??? - icu_discharge: ??? - hospital_discharge: ??? - death: ??? + icu_admission: ICU_ADMISSION + icu_discharge: ICU_DISCHARGE + # hospital_discharge: ??? + # death: ??? discharge_or_death: - expr: or(icu_discharge, death, hospital_discharge) - + expr: icu_discharge #or(icu_discharge, death, hospital_discharge) + trigger: icu_admission windows: From 7ea6591c4b7a1fbd48d8f9d08002e9faac477240 Mon Sep 17 00:00:00 2001 From: prockenschaub Date: Sat, 17 Aug 2024 11:10:19 +0200 Subject: [PATCH 03/14] create first working example for icu-mortality --- .../mortality/in_icu/first_24h_aumc.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml index df3d803..1bd431b 100644 --- a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml +++ b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml @@ -20,12 +20,16 @@ description: >- different tasks. predicates: - icu_admission: ICU_ADMISSION - icu_discharge: ICU_DISCHARGE - # hospital_discharge: ??? - # death: ??? + icu_admission: + code: + regex: "^ICU_ADMISSION" + icu_discharge: + code: + regex: "^ICU_DISCHARGE" + death: + code: DEATH discharge_or_death: - expr: icu_discharge #or(icu_discharge, death, hospital_discharge) + expr: or(icu_discharge, death) trigger: icu_admission @@ -43,7 +47,8 @@ windows: end_inclusive: True has: icu_admission: (None, 0) - discharge_or_death: (0, None) + icu_discharge: (None, 0) + death: (None, 0) target: start: gap.end end: start -> discharge_or_death From 1c960366b434324ce289904133c191a41ff28574 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Thu, 24 Oct 2024 17:58:20 +0200 Subject: [PATCH 04/14] AUMCdb dataset folder --- src/MEDS_DEV/datasets/AUMCdb/README.md | 8 ++++++++ src/MEDS_DEV/datasets/AUMCdb/predicates.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/MEDS_DEV/datasets/AUMCdb/README.md create mode 100644 src/MEDS_DEV/datasets/AUMCdb/predicates.yaml diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md new file mode 100644 index 0000000..04290fd --- /dev/null +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -0,0 +1,8 @@ +# AUMCdb +The first freely accessible intensive care database from within the European Union containing de-identified health data related to tens of thousands of European intensive care unit admissions, including demographics, vital signs, laboratory tests and medications. + + +## URLs + +1. [AUMCdb dataset](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) +2. [AUMCdb Research Paper](https://journals.lww.com/ccmjournal/fulltext/2021/06000/sharing_icu_patient_data_responsibly_under_the.16.aspx) \ No newline at end of file diff --git a/src/MEDS_DEV/datasets/AUMCdb/predicates.yaml b/src/MEDS_DEV/datasets/AUMCdb/predicates.yaml new file mode 100644 index 0000000..e3cf8e8 --- /dev/null +++ b/src/MEDS_DEV/datasets/AUMCdb/predicates.yaml @@ -0,0 +1,8 @@ +predicates: + icu_admission: + code: { regex: "^ICU_ADMISSION//.*" } + icu_discharge: + code: { regex: "^ICU_DISCHARGE//.*" } + + death: + code: MEDS_DEATH From 55a91389c742d0366109d3074133d8d0f5788e9b Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Thu, 24 Oct 2024 18:02:13 +0200 Subject: [PATCH 05/14] Delete files --- .../mortality/in_icu/first_24h_aumc.yaml | 57 ------------------- src/MEDS_DEV/datasets/README.md | 3 +- 2 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml diff --git a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml b/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml deleted file mode 100644 index 1bd431b..0000000 --- a/src/MEDS-DEV/tasks/criteria/mortality/in_icu/first_24h_aumc.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# metadata: -# name: 24h ICU Mortality -# version: ... -# author: ... -# tags: -# - mortality_prediction -# - critical_care -# - post_admission_prediction -# description: ... - -description: >- - This file specifies the base configuration for the prediction of in ICU mortality, leveraging only the first - 24 hours of data after ICU admission, with a 24 hour gap between the input window and the target window. - Patients who die or are discharged from the ICU in the gap window are excluded. Patients who die in the same - hospital stay but in a subsequent ICU stay are **not** positive labels for this task. - Note that this task is in-**ICU** mortality, not in-**hospital** mortality or **30-day** mortality, which - are different tasks. - Note that this task is predicting the outcome for a patient's entire ICU admission, not just the first 24 - hours or the subsequent 24 hours after the trigger event. Imminent mortality (on various time-scales) are - different tasks. - -predicates: - icu_admission: - code: - regex: "^ICU_ADMISSION" - icu_discharge: - code: - regex: "^ICU_DISCHARGE" - death: - code: DEATH - discharge_or_death: - expr: or(icu_discharge, death) - -trigger: icu_admission - -windows: - input: - start: null - end: trigger + 24h - start_inclusive: True - end_inclusive: True - index_timestamp: end - gap: - start: trigger - end: start + 48h - start_inclusive: False - end_inclusive: True - has: - icu_admission: (None, 0) - icu_discharge: (None, 0) - death: (None, 0) - target: - start: gap.end - end: start -> discharge_or_death - start_inclusive: False - end_inclusive: True - label: death diff --git a/src/MEDS_DEV/datasets/README.md b/src/MEDS_DEV/datasets/README.md index 6825939..4adbb01 100644 --- a/src/MEDS_DEV/datasets/README.md +++ b/src/MEDS_DEV/datasets/README.md @@ -7,7 +7,8 @@ To contribute a new dataset: 1. Fork this repository 2. Add your dataset predicates file in its respective folder (see `MIMIC-IV/predicates.yaml` for an example of predicate structure) 3. Test locally to ensure your dataset works correctly -4. Create a pull request with your changes +4. Specify the dataset information in a README.md file in the dataset's folder and define the supported tasks. +5. Create a pull request with your changes ## Notes From 410710cc22277ee5108feb11a1d1a83366da83f8 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Thu, 24 Oct 2024 18:06:33 +0200 Subject: [PATCH 06/14] supported tasks --- src/MEDS_DEV/datasets/AUMCdb/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md index 04290fd..ab270b5 100644 --- a/src/MEDS_DEV/datasets/AUMCdb/README.md +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -1,6 +1,8 @@ # AUMCdb The first freely accessible intensive care database from within the European Union containing de-identified health data related to tens of thousands of European intensive care unit admissions, including demographics, vital signs, laboratory tests and medications. +## Supported Tasks +- `tasks/mortality/in_icu/first_24h.yaml` ## URLs From 4c82e5a7c71937f736ba11d1469bbce1df0eed6b Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 10:46:38 +0200 Subject: [PATCH 07/14] Template --- src/MEDS_DEV/datasets/template/README.md | 24 +++++++++++++++++++ .../datasets/template/predicates.yaml | 19 +++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/MEDS_DEV/datasets/template/README.md create mode 100644 src/MEDS_DEV/datasets/template/predicates.yaml diff --git a/src/MEDS_DEV/datasets/template/README.md b/src/MEDS_DEV/datasets/template/README.md new file mode 100644 index 0000000..6ef3e7a --- /dev/null +++ b/src/MEDS_DEV/datasets/template/README.md @@ -0,0 +1,24 @@ +# New Dataset Template +This is a template for creating a new dataset in MEDS-DEV. The dataset should be stored in a directory named after the dataset in the `src/MEDS-DEV/datasets` directory. + +## Description +Describe the dataset in a few sentences. A link to the dataset's homepage and/or repository or a research paper is recommended. + +## Access Requirements +Describe any access requirements for the dataset (e.g, human species research). If the dataset is publicly available, state that here. If the dataset is not publicly available, describe the process for obtaining access. We recommend the following topics be covered: +- **Access Policy**: Describe the access policy for the dataset, including any restrictions or permissions required. +- **License (for files)**: Specify the license under which the dataset files are distributed. +- **Data Use Agreement**: Specify any data use agreement that must be signed to access the dataset. +- **Required training**: Specify any training or certification required to access the dataset. + +## Supported Tasks +Describe the existing tasks already present in MEDS-DEV that are covered. If there are new tasks that can be added, describe them here. Also note the `predicates.yaml` file that specifies the dataset's predicates. + +## MEDS-transformation +Shortly specify the process of transforming this dataset to the MEDS format. If the dataset is already in the MEDS format when downloaded, specify that here. + +## Sources + +Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. +1. https://link-to-dataset.org + diff --git a/src/MEDS_DEV/datasets/template/predicates.yaml b/src/MEDS_DEV/datasets/template/predicates.yaml new file mode 100644 index 0000000..395347b --- /dev/null +++ b/src/MEDS_DEV/datasets/template/predicates.yaml @@ -0,0 +1,19 @@ +# This where the predicates need to be to be able to use them in the task definition. +predicates: + hospital_admission: + code: { regex: "^HOSPITAL_ADMISSION//.*" } + hospital_discharge: + code: { regex: "^HOSPITAL_DISCHARGE//.*" } + + ED_registration: + code: { regex: "^ED_REGISTRATION//.*" } + ED_discharge: + code: { regex: "^ED_OUT//.*" } + + icu_admission: + code: { regex: "^ICU_ADMISSION//.*" } + icu_discharge: + code: { regex: "^ICU_DISCHARGE//.*" } + + death: + code: MEDS_DEATH From 3613d2b94629c1e8549c7fd9c58bf63514b6edb6 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 12:35:25 +0200 Subject: [PATCH 08/14] Some logging for the extract_task script --- src/MEDS_DEV/helpers/extract_task.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/MEDS_DEV/helpers/extract_task.sh b/src/MEDS_DEV/helpers/extract_task.sh index be1ff9c..bbf83c0 100755 --- a/src/MEDS_DEV/helpers/extract_task.sh +++ b/src/MEDS_DEV/helpers/extract_task.sh @@ -1,4 +1,27 @@ #!/bin/bash +print_help() { + echo "Usage: $(basename "$0") [additional parameters]" + echo + echo "Arguments:" + echo " MEDS_ROOT_DIR The root directory of the MEDS dataset to be used." + echo " MEDS_DATASET_NAME The name of the dataset to be used." + echo " MEDS_TASK_NAME The name of the task to be executed." + echo + echo "Additional parameters can be passed to the aces-cli command." + echo + echo "Example:" + echo " $(basename "$0") /path/to/meds/root dataset_name task_name --some-parameter=value" +} + +if [[ "$1" == "--help" || "$1" == "-h" ]]; then + print_help + exit 0 +fi + +if [[ $# -lt 3 ]]; then + echo "Error: Missing required arguments. See --help for usage." + exit 1 +fi export MEDS_ROOT_DIR=$1 export MEDS_DATASET_NAME=$2 @@ -11,5 +34,7 @@ export MEDS_DEV_REPO_DIR SHARDS=$(expand_shards "$MEDS_ROOT_DIR"/data) +echo "Running task $MEDS_TASK_NAME on dataset $MEDS_DATASET_NAME with MEDS_ROOT_DIR=$MEDS_ROOT_DIR and SHARDS=$SHARDS" + aces-cli --config-path="$MEDS_DEV_REPO_DIR"/configs --config-name="_ACES_MD" \ "hydra.searchpath=[pkg://aces.configs]" "data.shard=$SHARDS" -m "$@" From 2b6fc34dd25873ad8de2dfd47d63fdc45f6e2280 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 12:35:39 +0200 Subject: [PATCH 09/14] readme changes --- src/MEDS_DEV/datasets/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MEDS_DEV/datasets/README.md b/src/MEDS_DEV/datasets/README.md index 4adbb01..a390304 100644 --- a/src/MEDS_DEV/datasets/README.md +++ b/src/MEDS_DEV/datasets/README.md @@ -6,8 +6,8 @@ To contribute a new dataset: 1. Fork this repository 2. Add your dataset predicates file in its respective folder (see `MIMIC-IV/predicates.yaml` for an example of predicate structure) -3. Test locally to ensure your dataset works correctly -4. Specify the dataset information in a README.md file in the dataset's folder and define the supported tasks. +3. Test locally to ensure your dataset works correctly. Ideally specify the used packages and versions in the dataset information. +4. Specify the dataset information (including supported and custom tasks) in the template README.md file in the dataset's folder. 5. Create a pull request with your changes ## Notes From e6a8946912b600dd048c55c941e32ac8c8d71590 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 12:47:19 +0200 Subject: [PATCH 10/14] Readme update --- src/MEDS_DEV/datasets/AUMCdb/README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md index ab270b5..a4bb189 100644 --- a/src/MEDS_DEV/datasets/AUMCdb/README.md +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -1,10 +1,29 @@ # AUMCdb + +## Description The first freely accessible intensive care database from within the European Union containing de-identified health data related to tens of thousands of European intensive care unit admissions, including demographics, vital signs, laboratory tests and medications. +## Access Requirements +Taken from [official website](https://amsterdammedicaldatascience.nl/amsterdamumcdb/#requesting-access): +- **Access Policy**: Fill out and sign the combined Access and End User License form. +- **License (for files)**: Specify the license under which the dataset files are distributed. +- **Data Use Agreement**: Agreement found [here](https://amsterdammedicaldatascience.nl/content/uploads/sites/2/2022/12/arfeula_v1.6.pdf). +- **Required training**: Valid training courses include the Data or Specimens Only Research (DSOR) course from CITI, the Basic Course for Clinical Investigators (BROK) from NFU or an equivalent course. The DSOR course may be taken free of charge and is also needed to gain access to the MIMIC and eICU intensive care databases from the USA. + ## Supported Tasks - `tasks/mortality/in_icu/first_24h.yaml` -## URLs +## MEDS-transformation +(MEDS_transforms)[https://github.com/mmcdermott/MEDS_transforms] now includes the AUMCdb example. Please refer to the (guide)[https://github.com/mmcdermott/MEDS_transforms/tree/main/AUMC_Example]. +## Sources + +Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. 1. [AUMCdb dataset](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) -2. [AUMCdb Research Paper](https://journals.lww.com/ccmjournal/fulltext/2021/06000/sharing_icu_patient_data_responsibly_under_the.16.aspx) \ No newline at end of file +2. [AUMCdb Research Paper](https://journals.lww.com/ccmjournal/fulltext/2021/06000/sharing_icu_patient_data_responsibly_under_the.16.aspx) +3. [AUMCdb Data Use Agreement](https://amsterdammedicaldatascience.nl/content/uploads/sites/2/2022/12/arfeula_v1.6.pdf) +4. [Data Repository](https://easy.dans.knaw.nl/ui/home) +5. [Code Repository](https://github.com/AmsterdamUMC/AmsterdamUMCdb) + +## Disclaimer +Please refer to the data owners and the most up-to-date information when using this dataset in your research. \ No newline at end of file From 22258f0574ba9b16a792be98befa2718e2ca2fc2 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 12:53:53 +0200 Subject: [PATCH 11/14] Readme fixes and moving the readme to template --- src/MEDS_DEV/datasets/AUMCdb/README.md | 2 +- src/MEDS_DEV/datasets/template/README.md | 24 ------------------- .../datasets/template/predicates.yaml | 19 --------------- src/MEDS_DEV/templates/dataset.md | 23 ++++++++++++++++++ 4 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 src/MEDS_DEV/datasets/template/README.md delete mode 100644 src/MEDS_DEV/datasets/template/predicates.yaml diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md index a4bb189..a9059af 100644 --- a/src/MEDS_DEV/datasets/AUMCdb/README.md +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -14,7 +14,7 @@ Taken from [official website](https://amsterdammedicaldatascience.nl/amsterdamum - `tasks/mortality/in_icu/first_24h.yaml` ## MEDS-transformation -(MEDS_transforms)[https://github.com/mmcdermott/MEDS_transforms] now includes the AUMCdb example. Please refer to the (guide)[https://github.com/mmcdermott/MEDS_transforms/tree/main/AUMC_Example]. +[MEDS_transforms](https://github.com/mmcdermott/MEDS_transforms) now includes the AUMCdb example. Please refer to the [guide](https://github.com/mmcdermott/MEDS_transforms/tree/main/AUMC_Example). ## Sources diff --git a/src/MEDS_DEV/datasets/template/README.md b/src/MEDS_DEV/datasets/template/README.md deleted file mode 100644 index 6ef3e7a..0000000 --- a/src/MEDS_DEV/datasets/template/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# New Dataset Template -This is a template for creating a new dataset in MEDS-DEV. The dataset should be stored in a directory named after the dataset in the `src/MEDS-DEV/datasets` directory. - -## Description -Describe the dataset in a few sentences. A link to the dataset's homepage and/or repository or a research paper is recommended. - -## Access Requirements -Describe any access requirements for the dataset (e.g, human species research). If the dataset is publicly available, state that here. If the dataset is not publicly available, describe the process for obtaining access. We recommend the following topics be covered: -- **Access Policy**: Describe the access policy for the dataset, including any restrictions or permissions required. -- **License (for files)**: Specify the license under which the dataset files are distributed. -- **Data Use Agreement**: Specify any data use agreement that must be signed to access the dataset. -- **Required training**: Specify any training or certification required to access the dataset. - -## Supported Tasks -Describe the existing tasks already present in MEDS-DEV that are covered. If there are new tasks that can be added, describe them here. Also note the `predicates.yaml` file that specifies the dataset's predicates. - -## MEDS-transformation -Shortly specify the process of transforming this dataset to the MEDS format. If the dataset is already in the MEDS format when downloaded, specify that here. - -## Sources - -Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. -1. https://link-to-dataset.org - diff --git a/src/MEDS_DEV/datasets/template/predicates.yaml b/src/MEDS_DEV/datasets/template/predicates.yaml deleted file mode 100644 index 395347b..0000000 --- a/src/MEDS_DEV/datasets/template/predicates.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# This where the predicates need to be to be able to use them in the task definition. -predicates: - hospital_admission: - code: { regex: "^HOSPITAL_ADMISSION//.*" } - hospital_discharge: - code: { regex: "^HOSPITAL_DISCHARGE//.*" } - - ED_registration: - code: { regex: "^ED_REGISTRATION//.*" } - ED_discharge: - code: { regex: "^ED_OUT//.*" } - - icu_admission: - code: { regex: "^ICU_ADMISSION//.*" } - icu_discharge: - code: { regex: "^ICU_DISCHARGE//.*" } - - death: - code: MEDS_DEATH diff --git a/src/MEDS_DEV/templates/dataset.md b/src/MEDS_DEV/templates/dataset.md index e69de29..e10435d 100644 --- a/src/MEDS_DEV/templates/dataset.md +++ b/src/MEDS_DEV/templates/dataset.md @@ -0,0 +1,23 @@ +# New Dataset Template +This is a template for creating a new dataset in MEDS-DEV. The dataset should be stored in a directory named after the dataset in the `src/MEDS-DEV/datasets` directory. + +## Description +Describe the dataset in a few sentences. A link to the dataset's homepage and/or repository or a research paper is recommended. + +## Access Requirements +Describe any access requirements for the dataset (e.g, human species research). If the dataset is publicly available, state that here. If the dataset is not publicly available, describe the process for obtaining access. We recommend the following topics be covered: +- **Access Policy**: Describe the access policy for the dataset, including any restrictions or permissions required. +- **License (for files)**: Specify the license under which the dataset files are distributed. +- **Data Use Agreement**: Specify any data use agreement that must be signed to access the dataset. +- **Required training**: Specify any training or certification required to access the dataset. + +## Supported Tasks +Describe the existing tasks already present in MEDS-DEV that are covered. If there are new tasks that can be added, describe them here. Also note the `predicates.yaml` file that specifies the dataset's predicates. + +## MEDS-transformation +Shortly specify the process of transforming this dataset to the MEDS format. If the dataset is already in the MEDS format when downloaded, specify that here. + +## Sources + +Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. +1. https://link-to-dataset.org From 9823daf234a06d2d181e5da96c88b8adc1dfa931 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Fri, 25 Oct 2024 12:54:54 +0200 Subject: [PATCH 12/14] remove template line --- src/MEDS_DEV/datasets/AUMCdb/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md index a9059af..2433833 100644 --- a/src/MEDS_DEV/datasets/AUMCdb/README.md +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -17,8 +17,6 @@ Taken from [official website](https://amsterdammedicaldatascience.nl/amsterdamum [MEDS_transforms](https://github.com/mmcdermott/MEDS_transforms) now includes the AUMCdb example. Please refer to the [guide](https://github.com/mmcdermott/MEDS_transforms/tree/main/AUMC_Example). ## Sources - -Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. 1. [AUMCdb dataset](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) 2. [AUMCdb Research Paper](https://journals.lww.com/ccmjournal/fulltext/2021/06000/sharing_icu_patient_data_responsibly_under_the.16.aspx) 3. [AUMCdb Data Use Agreement](https://amsterdammedicaldatascience.nl/content/uploads/sites/2/2022/12/arfeula_v1.6.pdf) From 54cd7c68656319f2f7f88ffd818c948a9efd3ed4 Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Sun, 27 Oct 2024 13:31:15 +0100 Subject: [PATCH 13/14] pre-commit linting --- src/MEDS_DEV/datasets/AUMCdb/README.md | 9 ++++++++- src/MEDS_DEV/templates/dataset.md | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/MEDS_DEV/datasets/AUMCdb/README.md b/src/MEDS_DEV/datasets/AUMCdb/README.md index 2433833..5ca15a5 100644 --- a/src/MEDS_DEV/datasets/AUMCdb/README.md +++ b/src/MEDS_DEV/datasets/AUMCdb/README.md @@ -1,22 +1,28 @@ # AUMCdb ## Description + The first freely accessible intensive care database from within the European Union containing de-identified health data related to tens of thousands of European intensive care unit admissions, including demographics, vital signs, laboratory tests and medications. ## Access Requirements + Taken from [official website](https://amsterdammedicaldatascience.nl/amsterdamumcdb/#requesting-access): + - **Access Policy**: Fill out and sign the combined Access and End User License form. - **License (for files)**: Specify the license under which the dataset files are distributed. - **Data Use Agreement**: Agreement found [here](https://amsterdammedicaldatascience.nl/content/uploads/sites/2/2022/12/arfeula_v1.6.pdf). - **Required training**: Valid training courses include the Data or Specimens Only Research (DSOR) course from CITI, the Basic Course for Clinical Investigators (BROK) from NFU or an equivalent course. The DSOR course may be taken free of charge and is also needed to gain access to the MIMIC and eICU intensive care databases from the USA. ## Supported Tasks + - `tasks/mortality/in_icu/first_24h.yaml` ## MEDS-transformation + [MEDS_transforms](https://github.com/mmcdermott/MEDS_transforms) now includes the AUMCdb example. Please refer to the [guide](https://github.com/mmcdermott/MEDS_transforms/tree/main/AUMC_Example). ## Sources + 1. [AUMCdb dataset](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) 2. [AUMCdb Research Paper](https://journals.lww.com/ccmjournal/fulltext/2021/06000/sharing_icu_patient_data_responsibly_under_the.16.aspx) 3. [AUMCdb Data Use Agreement](https://amsterdammedicaldatascience.nl/content/uploads/sites/2/2022/12/arfeula_v1.6.pdf) @@ -24,4 +30,5 @@ Taken from [official website](https://amsterdammedicaldatascience.nl/amsterdamum 5. [Code Repository](https://github.com/AmsterdamUMC/AmsterdamUMCdb) ## Disclaimer -Please refer to the data owners and the most up-to-date information when using this dataset in your research. \ No newline at end of file + +Please refer to the data owners and the most up-to-date information when using this dataset in your research. diff --git a/src/MEDS_DEV/templates/dataset.md b/src/MEDS_DEV/templates/dataset.md index e10435d..a86b44e 100644 --- a/src/MEDS_DEV/templates/dataset.md +++ b/src/MEDS_DEV/templates/dataset.md @@ -1,23 +1,30 @@ # New Dataset Template + This is a template for creating a new dataset in MEDS-DEV. The dataset should be stored in a directory named after the dataset in the `src/MEDS-DEV/datasets` directory. ## Description + Describe the dataset in a few sentences. A link to the dataset's homepage and/or repository or a research paper is recommended. ## Access Requirements + Describe any access requirements for the dataset (e.g, human species research). If the dataset is publicly available, state that here. If the dataset is not publicly available, describe the process for obtaining access. We recommend the following topics be covered: + - **Access Policy**: Describe the access policy for the dataset, including any restrictions or permissions required. - **License (for files)**: Specify the license under which the dataset files are distributed. - **Data Use Agreement**: Specify any data use agreement that must be signed to access the dataset. - **Required training**: Specify any training or certification required to access the dataset. ## Supported Tasks + Describe the existing tasks already present in MEDS-DEV that are covered. If there are new tasks that can be added, describe them here. Also note the `predicates.yaml` file that specifies the dataset's predicates. ## MEDS-transformation + Shortly specify the process of transforming this dataset to the MEDS format. If the dataset is already in the MEDS format when downloaded, specify that here. ## Sources Summarize the sources of the dataset. If the dataset is a combination of multiple sources, list them here. + 1. https://link-to-dataset.org From 65c6c27f7f10aebe833d4086e66ca9b164340fee Mon Sep 17 00:00:00 2001 From: Robin van de Water Date: Mon, 28 Oct 2024 09:43:25 +0100 Subject: [PATCH 14/14] Removed hospital_discharge from first_24h task --- src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml b/src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml index f45df0b..00254c7 100644 --- a/src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml +++ b/src/MEDS_DEV/tasks/criteria/mortality/in_icu/first_24h.yaml @@ -22,10 +22,9 @@ description: >- predicates: icu_admission: ??? icu_discharge: ??? - hospital_discharge: ??? death: ??? discharge_or_death: - expr: or(icu_discharge, death, hospital_discharge) + expr: or(icu_discharge, death) trigger: icu_admission