SICdb_MEDS ETL
The SICdb dataset offers insights into over 27 thousand intensive care admissions, including therapies and data on preceding surgeries. Data were collected between 2013 and 2021 from four different intensive care units at the University Hospital Salzburg, having more than 3 thousand intensive care admissions per year on 41 beds. The dataset is deidentified and contains, amongst others, case information, vital signs, laboratory results and medication data. SICdb provides both aggregated once-per-hour and highly granular once-per-minute data, making it suitable for computational and machine learning-based research. (source: https://www.sicdb.com/Documentation/Main_Page)
Usage
pip install SICdb_MEDS
export DATASET_DOWNLOAD_USERNAME=$PHYSIONET_USERNAME
export DATASET_DOWNLOAD_PASSWORD=$PHYSIONET_PASSWORD
meds-extract-run spec=SICdb output_dir=$MEDS_COHORT_DIR
# or, if the release is already on disk
meds-extract-run spec=SICdb output_dir=$MEDS_COHORT_DIR do_download=false input_dir=$RAW_INPUT_DIR
Waveform extraction is not currently supported; see #1.
Configuration
The entire ETL is described by one file, src/SICdb_MEDS/messy.yaml — a
MESSY config carrying three sections:
sources:— where the raw data lives.meds-extract-downloadstages it, with SHA-256 verification and resumable transfers. This replaces the old hand-rolleddownload.py.etl:— the dataset name plus curated stage options (n_subjects_per_shard).- the event tables — what to extract, written in dftly expressions.
Because the config is registered under the MEDS_extract.pipelines entry-point group, the
extraction half is runnable directly, without this package's CLI wrapper:
# Stage the raw data only:
meds-extract-download spec=SICdb output_dir=$RAW_INPUT_DIR
# Run the canonical 8-stage pipeline over already-pre-MEDS'd data:
meds-extract-run spec=SICdb output_dir=$MEDS_COHORT_DIR download_key=null input_dir=$PRE_MEDS_DIR
There is no wrapper CLI and no pre-MEDS step. Both are gone: the archive is unpacked by the
download layer, and offsets are resolved to absolute pseudo-timestamps in _table.cols. The
package ships no Python at all -- the whole ETL is src/SICdb_MEDS/messy.yaml.
Code metadata
metadata/codes.parquet describes every code in the data. Every description is defined in
messy.yaml and comes from SICdb's own tables or its
documentation:
- Codes that carry a
d_referencesid (ADMISSION//…,DISCHARGE//…,LAB//…,MEDICATION//…,CASE_ATTR//…,DEVICE//…,VITAL//…and the othercasesreference columns): thed_referencesentry, through a_metadatablock keyed on the id. Lab codes also get the unit and the LOINC long name. DIAGNOSIS//ICD10GM//…:cases.ICD10MainText.- Every other code (
MEDS_BIRTH,MEDS_DEATH,SEX//…,ADMISSION_YEAR//…,ICU_ADMISSION,WEIGHT,SAPS3,HEART_SURGERY_…, …): a_selfblock whose description names the source column.
MEDS-Extract 0.8 rejects a _self block on a bare literal code (code: ICU_ADMISSION). The literal
codes are therefore read from constant columns of cases._table.cols
(_code_icu_admission: '"ICU_ADMISSION"'), and the emitted codes are unchanged. The next MEDS-Extract
release accepts _self on a literal code
(MEDS_extract#315).
The ETL writes the vocabulary parents that SICdb records itself:
ICD10GM/{ICD10Main}for a diagnosis with a canonical ICD-10-GM code.LOINC/{LOINC_code}for a lab whosed_references.LOINC_codeis a well-formed LOINC code.
Enriching code metadata with suMEDS
suMEDS adds names and ancestors to those parents from its
versioned ontology data. It uses the LOINC pack for LOINC/…. It has no ICD-10-GM pack, so for
ICD10GM/… it needs an OHDSI Athena download with the vocabulary (--athena-csv). This package
also ships a rules file for what SICdb does not record,
src/SICdb_MEDS/sumeds_rules.yaml (package data, format
sumeds-rules/0.1). After the ETL, run:
uvx --from "sumeds>=0.4" suMEDS-enrich \
$MEDS_COHORT_DIR/metadata/codes.parquet -o codes-enriched.parquet \
--rules "$(python -c 'from importlib.resources import files; print(files("SICdb_MEDS") / "sumeds_rules.yaml")')"
| Rule | Kind | Adds |
|---|---|---|
sicdb-diagnosis-icd10gm-prefix |
hierarchy, mode: prefix, ignore: "." |
the nearest shorter diagnosis code that also occurs in the data (DIAGNOSIS//ICD10GM//S62.60 gets DIAGNOSIS//ICD10GM//S62.6, else DIAGNOSIS//ICD10GM//S62) |
Only canonical ICD-10-GM codes take part, the same shapes the ETL's ICD10GM/ parent accepts.
tests/test_sumeds_rules.py loads the file with suMEDS and runs the rule, offline, on codes that
MEDS-Extract renders from messy.yaml.
MEDS-transforms settings
If you want to convert a large dataset, you can use parallelization with MEDS-transforms (the MEDS-transformation step that takes the longest).
Using local parallelization with the hydra-joblib-launcher package, you can set the number of workers:
pip install hydra-joblib-launcher --upgrade
Then, you can set the number of workers as environment variable:
export N_WORKERS=8
Moreover, you can set the number of subjects per shard to balance the parallelization overhead based on how many subjects you have in your dataset:
export N_SUBJECTS_PER_SHARD=100000
Summary statistics
tests/regression/full_summary_stats.json is a
meds_summary_stats fingerprint of
the MEDS dataset this ETL builds from the full SICdb 1.0.8 release: subject, event and measurement
counts, digests of the code vocabulary, per-subject, value and time distributions, code-metadata
coverage, the splits and the schema. It names no code and reports no cell of fewer than 20 subjects and
no minimum or maximum, which is what makes it safe to publish. Because it is committed next to the ETL,
its diff shows what an ETL change did to the output, and two ETL versions can be compared without
access to the data.
Regenerate it in every pull request that changes the output, from a build of that branch:
# Build the release with this checkout, then summarize it
scripts/summary_stats.sh full --input-dir $RAW_INPUT_DIR
# Or summarize a build of this checkout you already have
scripts/summary_stats.sh full --meds-dir $MEDS_OUTPUT_DIR
Both print how the statistics changed against the committed baseline before overwriting it. Add
--compare to check a build without writing anything; it exits 1 when
tests/regression/policy.yaml flags an error. Rebuilding the same
commit reproduces the baseline exactly, so any finding is a change in the output. CI cannot rebuild the
credentialed release, so the Summary stats workflow only warns
when a pull request changes src/ without regenerating the baseline. A MEDS-Extract or polars upgrade
can also move the output, so check it with --compare.
Development
See DEVELOPMENT.md for setup, tests, running the ETL locally, and the release process.
Citation
If you use this dataset, please cite the original publication below and the ETL (see cite this repository):
@article{rodemundHarnessingBigData2024,
title = {Harnessing {Big} {Data} in {Critical} {Care}: {Exploring} a new {European} {Dataset}},
volume = {11},
copyright = {2024 The Author(s)},
issn = {2052-4463},
shorttitle = {Harnessing {Big} {Data} in {Critical} {Care}},
url = {https://www.nature.com/articles/s41597-024-03164-9},
doi = {10.1038/s41597-024-03164-9},
language = {en},
number = {1},
urldate = {2024-04-04},
journal = {Scientific Data},
author = {Rodemund, Niklas and Wernly, Bernhard and Jung, Christian and Cozowicz, Crispiana and Koköfer, Andreas},
month = mar,
year = {2024},
note = {Publisher: Nature Publishing Group},
keywords = {Clinical trial design, Experimental models of disease},
pages = {320},
}
For the ETL:
@software{van_de_Water_SICdb_MEDS_ETL_2025,
author = {van de Water, Robin P.},
doi = {10.5281/zenodo.14893939},
license = {MIT},
month = feb,
title = {{SICdb\_MEDS ETL}},
url = {https://github.com/rvandewater/SICdb_MEDS},
version = {0.0.1},
year = {2025}
}
Metadata
Release files for SICdb-MEDS 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sicdb_meds-0.1.1.tar.gz | 28.9 kB | With provenance | Details for sicdb_meds-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sicdb_meds-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sicdb_meds-0.1.1-py3-none-any.whl |
Total release size: 49.2 kB
Release files / sicdb_meds-0.1.1.tar.gz
| Download URL | sicdb_meds-0.1.1.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66b7c5bec2eaafa1fcefcffb28a5c219e8cec452b54a74049d9b71f26ff1b9ae
|
|
BLAKE2b-256 checksum How to use checksums |
a444362e51f3e4cd58d1bc29a5c087fbfdc5cdcba13d69d9135d2c436ffaf5df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / sicdb_meds-0.1.1-py3-none-any.whl
| Download URL | sicdb_meds-0.1.1-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
870270cc36f9b77e3d520b95e0b4d2ae6c250e030332ae576d1734556a84b594
|
|
BLAKE2b-256 checksum How to use checksums |
64df3d1142d5cd6106d67a21dd53be34b98bf42dcf806d537996add3d429d693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for SICdb-MEDS 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sicdb_meds-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.