-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated configs for abnormal lab prediction tasks
- Loading branch information
Showing
13 changed files
with
386 additions
and
295 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
src/MEDS_DEV/tasks/criteria/abnormal_lab/blood_chemistry/elevated_creatinine/first_24h.yaml
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,61 @@ | ||
description: >- | ||
This task predicts whether the patient will have elevated _creatinine_ values within the next 24 | ||
hours, given the first 24 hours of their admission to the _hospital_. To be included, 1) patients | ||
must have at least one measurement for _creatinine_ within the next 24 hours after their | ||
admission to the hospital, 2) patients must not have shown elevated _creatinine_ values | ||
previously, and 3) their length of stay in the hospital must be at least 48 hours. | ||
predicates: | ||
hospital_admission: ??? | ||
hospital_discharge: ??? | ||
birth: ??? | ||
death: ??? | ||
discharge_or_death: | ||
expr: or(death, hospital_discharge) | ||
|
||
# Plain predicates | ||
creatinine: | ||
code: ??? | ||
abnormally_high_creatinine: | ||
code: ??? | ||
value_min: 1.3 # mg/dL | ||
value_min_inclusive: False | ||
value_max: null | ||
|
||
trigger: hospital_admission | ||
|
||
windows: | ||
input: | ||
start: null | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
# do not allow to have shown elevated creatinine values previously | ||
has: | ||
abnormally_high_creatinine: (None, 0) | ||
# do not allow hospital discharge to happen within the input + target window | ||
no_discharge: | ||
start: trigger | ||
end: start + 48h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hospital_admission: (None, 0) | ||
discharge_or_death: (None, 0) | ||
# do not allow to include children (age <= 18) patients | ||
no_children: | ||
start: end - 6570d # 18 years = 365 * 18 days | ||
end: trigger | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
birth: (None, 0) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
creatinine: (1, None) | ||
label: abnormally_high_creatinine |
61 changes: 61 additions & 0 deletions
61
src/MEDS_DEV/tasks/criteria/abnormal_lab/blood_chemistry/hyponatremia/first_24h.yaml
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,61 @@ | ||
description: >- | ||
This task predicts whether the patient will have low _sodium_ values (hyponatremia) within the | ||
next 24 hours, given the first 24 hours of their admission to the _hospital_. To be included, | ||
1) patients must have at least one measurement for _sodium_ within the next 24 hours after their | ||
admission to the hospital, 2) patients must not have shown low _sodium_ values previously, and | ||
3) their length of stay in the hospital must be at least 48 hours. | ||
predicates: | ||
hospital_admission: ??? | ||
hospital_discharge: ??? | ||
birth: ??? | ||
death: ??? | ||
discharge_or_death: | ||
expr: or(death, hospital_discharge) | ||
|
||
# Plain predicates | ||
sodium: | ||
code: ??? | ||
abnormally_low_sodium: | ||
code: ??? | ||
value_min: null | ||
value_max: 135 # mEq/L | ||
value_max_inclusive: False | ||
|
||
trigger: hospital_admission | ||
|
||
windows: | ||
input: | ||
start: null | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
# do not allow to have shown low sodium values previously | ||
has: | ||
abnormally_low_sodium: (None, 0) | ||
# do not allow hospital discharge to happen within the input + target window | ||
no_discharge: | ||
start: trigger | ||
end: start + 48h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hospital_admission: (None, 0) | ||
discharge_or_death: (None, 0) | ||
# do not allow to include children (age <= 18) patients | ||
no_children: | ||
start: end - 6570d # 18 years = 365 * 18 days | ||
end: trigger | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
birth: (None, 0) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
sodium: (1, None) | ||
label: abnormally_low_sodium |
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
61 changes: 61 additions & 0 deletions
61
src/MEDS_DEV/tasks/criteria/abnormal_lab/cbc/anemia/first_24h.yaml
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,61 @@ | ||
description: >- | ||
This task predicts whether the patient will have low _hemoglobin_ values (anemia) within the next | ||
24 hours, given the first 24 hours of their admission to the _hospital_. To be included, | ||
1) patients must have at least one measurement for _hemoglobin_ within the next 24 hours after | ||
their admission to the hospital, 2) patients must not have shown low _hemoglobin_ values | ||
previously, and 3) their length of stay in the hospital must be at least 48 hours. | ||
predicates: | ||
hospital_admission: ??? | ||
hospital_discharge: ??? | ||
birth: ??? | ||
death: ??? | ||
discharge_or_death: | ||
expr: or(death, hospital_discharge) | ||
|
||
# Plain predicates | ||
hemoglobin: | ||
code: ??? | ||
abnormally_low_hemoglobin: | ||
code: ??? | ||
value_min: null | ||
value_max: 13 # g/dL | ||
value_max_inclusive: False | ||
|
||
trigger: hospital_admission | ||
|
||
windows: | ||
input: | ||
start: null | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
# do not allow to have shown low hemoglobin values previously | ||
has: | ||
abnormally_low_hemoglobin: (None, 0) | ||
# do not allow hospital discharge to happen within the input + target window | ||
no_discharge: | ||
start: trigger | ||
end: start + 48h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hospital_admission: (None, 0) | ||
discharge_or_death: (None, 0) | ||
# do not allow to include children (age <= 18) patients | ||
no_children: | ||
start: end - 6570d # 18 years = 365 * 18 days | ||
end: trigger | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
birth: (None, 0) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hemoglobin: (1, None) | ||
label: abnormally_low_hemoglobin |
61 changes: 61 additions & 0 deletions
61
src/MEDS_DEV/tasks/criteria/abnormal_lab/cbc/leukocytosis/first_24h.yaml
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,61 @@ | ||
description: >- | ||
This task predicts whether the patient will have high _WBC_ values (leukocytosis) within the next | ||
24 hours, given the first 24 hours of their admission to the _hospital_. To be included, | ||
1) patients must have at least one measurement for _WBC_ within the next 24 hours after their | ||
admission to the hospital, 2) patients must not have shown high _WBC_ values previously, and | ||
3) their length of stay in the hospital must be at least 48 hours. | ||
predicates: | ||
hospital_admission: ??? | ||
hospital_discharge: ??? | ||
birth: ??? | ||
death: ??? | ||
discharge_or_death: | ||
expr: or(death, hospital_discharge) | ||
|
||
# Plain predicates | ||
wbc: | ||
code: ??? | ||
abnormally_high_wbc: | ||
code: ??? | ||
value_min: 11 # K/uL | ||
value_min_inclusive: False | ||
value_max: null | ||
|
||
trigger: hospital_admission | ||
|
||
windows: | ||
input: | ||
start: null | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
# do not allow to have shown high WBC values previously | ||
has: | ||
abnormally_high_wbc: (None, 0) | ||
# do not allow hospital discharge to happen within the input + target window | ||
no_discharge: | ||
start: trigger | ||
end: start + 48h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hospital_admission: (None, 0) | ||
discharge_or_death: (None, 0) | ||
# do not allow to include children (age <= 18) patients | ||
no_children: | ||
start: end - 6570d # 18 years = 365 * 18 days | ||
end: trigger | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
birth: (None, 0) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
wbc: (1, None) | ||
label: abnormally_high_wbc |
61 changes: 61 additions & 0 deletions
61
src/MEDS_DEV/tasks/criteria/abnormal_lab/cbc/thrombocytopenia/first_24h.yaml
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,61 @@ | ||
description: >- | ||
This task predicts whether the patient will have low _platelets_ values (thrombocytopenia) within | ||
the next 24 hours, given the first 24 hours of their admission to the hospital. To be included, | ||
1) patients must have at least one measurement for _platelets_ within the next 24 hours after | ||
their admission to the hospital, 2) patients must not have shown low _platelets_ values | ||
previously, and 3) their length of stay in the hospital must be at least 48 hours. | ||
predicates: | ||
hospital_admission: ??? | ||
hospital_discharge: ??? | ||
birth: ??? | ||
death: ??? | ||
discharge_or_death: | ||
expr: or(death, hospital_discharge) | ||
|
||
# Plain predicates | ||
platelets: | ||
code: ??? | ||
abnormally_low_platelets: | ||
code: ??? | ||
value_min: null | ||
value_max: 150 # K/uL | ||
value_max_inclusive: False | ||
|
||
trigger: hospital_admission | ||
|
||
windows: | ||
input: | ||
start: null | ||
end: trigger + 24h | ||
start_inclusive: True | ||
end_inclusive: True | ||
index_timestamp: end | ||
# do not allow to have shown low platelets values previously | ||
has: | ||
abnormally_low_platelets: (None, 0) | ||
# do not allow hospital discharge to happen within the input + target window | ||
no_discharge: | ||
start: trigger | ||
end: start + 48h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
hospital_admission: (None, 0) | ||
discharge_or_death: (None, 0) | ||
# do not allow to include children (age <= 18) patients | ||
no_children: | ||
start: end - 6570d # 18 years = 365 * 18 days | ||
end: trigger | ||
start_inclusive: True | ||
end_inclusive: True | ||
has: | ||
birth: (None, 0) | ||
target: | ||
start: input.end | ||
end: start + 24h | ||
start_inclusive: False | ||
end_inclusive: True | ||
has: | ||
platelets: (1, None) | ||
label: abnormally_low_platelets |
Oops, something went wrong.