Skip to content

Commit d83765f

Browse files
committed
Updated pre-commit and reworded README sections per Tom's feedback.
1 parent fc74fd7 commit d83765f

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222

2323
# python code formatting, linting, and import sorting using ruff
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.11.5
25+
rev: v0.11.7
2626
hooks:
2727
# Run the formatter
2828
- id: ruff-format

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ compatible tools see the website: https://medical-event-data-standard.github.io/
3535

3636
## Philosophy
3737

38-
At the heart of MEDS is a simple yet powerful idea: nearly all EHR data can be modeled as a minimal tuple. We
39-
believe that the essence of a clinical event or measurement can be effectively described using three core
40-
components:
38+
At the heart of MEDS is a simple yet powerful idea: nearly all EHR data can be modeled as a minimal tuple:
4139

4240
1. _subject_: The primary entity for which care observations are recorded. Typically, this is an individual
4341
with a complete sequence of observations. In some datasets (e.g., eICU), a subject may refer to a single
@@ -47,8 +45,9 @@ components:
4745

4846
3. _code_: The descriptor of what measurement is being observed.
4947

50-
This minimalist representation captures the essence of EHR data while providing a consistent foundation for
51-
further analysis and enrichment.
48+
> [!NOTE]
49+
> MEDS also tracks optional "value" modalities that can be observed with any measurement in this tuple, such
50+
> as a `numeric_value` or `text_value` in addition to the _subject_, _time_, and _code_ elements.
5251
5352
> [!NOTE]
5453
> In this documentation, we will primarily use the term "measurement" to refer to a single observation about a
@@ -57,7 +56,7 @@ further analysis and enrichment.
5756
5857
## The Schemas
5958

60-
Building on this philosophy, MEDS defines five primary schema components:
59+
MEDS defines five primary schema components:
6160

6261
| **Component** | **Description** | **Implementation** |
6362
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
@@ -81,13 +80,13 @@ Below, each schema is introduced in detail. Usage examples and a practical demon
8180

8281
The `Data` schema describes a structure for the underlying medical data. It contains the following columns:
8382

84-
| **Column Name** | **Conceptual Description** | **Type** | **Required** | **Nullable** |
85-
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------ | ------------------------------------------------------ |
86-
| `subject_id` | The ID of the subject this measurement is about. | `pa.int64()` | Yes | No |
87-
| `time` | The time of the measurement. | `pa.timestamp('us')` | Yes | Yes, for static measurements |
88-
| `code` | The primary categorical descriptor of what is being measured. E.g., the laboratory test being measured or diagnosis being recorded. | `pa.string()` | Yes | No |
89-
| `numeric_value` | Any numeric value associated with this measurement (e.g., the laboratory test result). | `pa.float32()` | No | Yes, for measurements that do no have a numeric value. |
90-
| `text_value` | Any text value associated with this measurement (e.g., the result of a text-based test, a clinical note). | `pa.large_string()` | No | Yes, for measurements that do not have a text value. |
83+
| **Column Name** | **Conceptual Description** | **Type** | **Required** | **Nullable** |
84+
| --------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------ | ------------------------------------------------------ |
85+
| `subject_id` | The ID of the subject (typically the patient). | `pa.int64()` | Yes | No |
86+
| `time` | The time of the measurement. | `pa.timestamp('us')` | Yes | Yes, for static measurements |
87+
| `code` | The primary categorical descriptor of the measurement (e.g., the performed laboratory test or recorded diagnosis). | `pa.string()` | Yes | No |
88+
| `numeric_value` | Any numeric value associated with this measurement (e.g., the laboratory test result). | `pa.float32()` | No | Yes, for measurements that do no have a numeric value. |
89+
| `text_value` | Any text value associated with this measurement (e.g., the result of a text-based test, a clinical note). | `pa.large_string()` | No | Yes, for measurements that do not have a text value. |
9190

9291
In addition, the `Data` schema is _open_, meaning it can contain any number of custom columns to further
9392
enrich observations. Examples of such columns include further ID columns such as `hadm_id` or `icustay_id` to

0 commit comments

Comments
 (0)