MIMIC Code Repository: Code shared by the research community for the MIMIC family of databases
This report summarizes scanner evidence for MIT-LCP/mimic-code, a Jupyter Notebook project with 3,428 GitHub stars. SynthScan examined 110,537 lines of code across 787 source files, recording 154 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 1.6 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 121 finding(s).
Are imports declared and package/API names verified? 18 finding(s).
Are wrappers, guards, and repeated structures necessary? 44 finding(s).
Which changes need focused human review? 154 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 154 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | requirements-lock.txt | 1 | # | COMMENT |
| LOW | requirements-lock.txt | 21 | iniconfig==2.1.0 | COMMENT |
| LOW | requirements-lock.txt | 41 | pluggy==1.6.0 | COMMENT |
| LOW | requirements-lock.txt | 61 | regex==2026.6.28 | COMMENT |
| LOW | mimic-iv/buildmimic/download_data.sh | 1 | #!/bin/bash | COMMENT |
| LOW | mimic-iv/buildmimic/sqlite/import.sh | 1 | #!/bin/sh | COMMENT |
| LOW | mimic-iv/buildmimic/postgres/build_mimic.sh | 1 | #!/bin/bash | COMMENT |
| LOW | mimic-iv/buildmimic/duckdb/build_mimic.sh | 1 | #!/bin/bash | COMMENT |
| LOW | mimic-iii/buildmimic/mimic-iii.yaml | 281 | - column: | COMMENT |
| LOW | mimic-iii/buildmimic/mimic-iii.yaml | 301 | # -- CREATE CHARTEVENTS TRIGGER | COMMENT |
| LOW | mimic-iii/buildmimic/mimic-iii.yaml | 321 | # END IF; | COMMENT |
| LOW | mimic-iii/buildmimic/sqlite/import.sh | 1 | #!/bin/sh | COMMENT |
| LOW | mimic-iii/buildmimic/duckdb/import_duckdb.sh | 1 | #!/bin/sh | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 101 | user = "mimicuser", | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 221 | ## # Database: postgres 10.5.0 [mimicuser@localhost:5432/mimic] | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 281 | ## # Source: lazy query [?? x 5] | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 341 | inner_join(mi_admissions, by = c("subject_id", "hadm_id")) %>% | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 401 | right_join(study_admissions, by = c("subject_id", "hadm_id")) %>% | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 501 | )) %>% | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 561 | ## 6 21741 WHITE | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 581 | ## 4 30273 F WHITE | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 641 | COMMENT | |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 681 | ## 3 53 UNKNOWN | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 721 | print() -> study_admissions | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 761 | ## ctype en_US.UTF-8 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.md | 781 | ## knitr 1.20 2018-02-20 [1] CRAN (R 3.4.3) | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 181 | ## [4] "caregivers" "chartevents_1" "chartevents_2" | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 221 | <pre class="r"><code>tbl_mimic <- function(table) { | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 261 | ## 4 23872 120477 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 281 | ## 4 4338 41010 AMI anterior wal… Acute myocardial infarction of othe… | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 301 | ## 5 6630 571 193189 1 41001 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 321 | ## 2 28 162569 412 4 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 341 | ## 3 53 155385 41021 1 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 361 | ## <int> <int> <chr> <lgl> | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 381 | ## # Database: postgres 10.5.0 [mimicuser@localhost:5432/mimic] | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 441 | 0 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 481 | ## 7 12175 BLACK/AFRICAN AMERICAN | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 501 | ## 7 19393 M WHITE | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 541 | TRUE ~ NA_character_ | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 581 | ## 6 123 HISPANIC | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 601 | ## 8 158 M WHITE | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 621 | ## 9 160 161672 49 NA 1 41041 TRUE | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 641 | ## date 2019-01-20 | COMMENT |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 661 | ## pillar 1.3.0 2018-07-14 [1] CRAN (R 3.4.4) | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 141 | <p>Now, we build a logistic regression, using all the features, to predict the need for an arterial line catheter from p | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 161 | ## - hr_first 1 2940.8 3052.8 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 181 | ## - map_first 1 2950.6 3062.6 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 201 | ## - afib_flag 1 2978.1 3044.1 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 221 | ## - sodium_first 1 3000.7 3066.7 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 241 | ## - spo2_first 1 2984.8 3038.8 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 261 | ## - wbc_first 1 3013.2 3067.2 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 281 | ## - gender 1 2985.1 3037.1 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 301 | ## - service_surg 1 3041.1 3093.1 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 321 | ## - respfail_flag 1 2985.5 3035.5 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 341 | ## chf_flag + renal_flag + liver_flag + copd_flag + cad_flag + | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 361 | ## - weight_first 1 2987.6 3035.6 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 381 | ## | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 401 | ## - sodium_first 1 3008.8 3054.8 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 421 | ## - cad_flag 1 2986.0 3030.0 | COMMENT |
| LOW | mimic-iii/notebooks/aline/aline_propensity_score.html | 441 | ## aline_flag ~ gender + weight_first + sofa_first + service_surg + | COMMENT |
| 16 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | mimic-iii/tests/test_postgres_build.py | 112 | # -------------------------------------------------- | STRING |
| MEDIUM⚡ | mimic-iii/tests/test_postgres_build.py | 115 | # -------------------------------------------------- | STRING |
| MEDIUM | mimic-iii/tutorials/dplyr-frontend/intro.md | 753 | ## ─ Session info ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mimic-iii/tutorials/dplyr-frontend/intro.md | 765 | ## ─ Packages ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mimic-iii/tutorials/dplyr-frontend/intro.html | 643 | ## ─ Packages ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mimic-iii/tutorials/dplyr-frontend/intro.html | 631 | <pre><code>## ─ Session info ────────────────────────────────────────────────────────── | CODE |
| MEDIUM | tests/test_transpile.py | 167 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_transpile.py | 169 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_transpile.py | 207 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_transpile.py | 209 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | src/mimic_utils/sqlglot_dialects/postgres.py | 19 | # ------------------------- | COMMENT |
| MEDIUM | src/mimic_utils/sqlglot_dialects/postgres.py | 52 | # --------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mimic-iv/tests/test_first_day.py | 4 | def test_gcs_first_day_calculated_correctly(dataset, project_id): | CODE |
| LOW | mimic-iv/tests/test_measurement.py | 5 | def test_d_labitems_itemid_for_bg(dataset, project_id): | CODE |
| LOW | mimic-iv/tests/test_measurement.py | 74 | def test_gcs_score_calculated_correctly(dataset, project_id): | STRING |
| LOW | mimic-iv/tests/test_score.py | 5 | def test_sofa_one_row_per_hour(dataset, project_id): | CODE |
| LOW | mimic-iii/tests/test_postgres_build.py | 99 | def test_select_min_subject_id(mimic_con, mimic_schema): | CODE |
| LOW⚡ | mimic-iii/tests/test_postgres_build.py | 116 | def test_itemids_in_inputevents_cv_are_shifted(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 129 | def test_itemids_in_inputevents_mv_are_shifted(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 142 | def test_itemids_in_outputevents_are_shifted(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 155 | def test_itemids_in_inputevents_cv_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 168 | def test_itemids_in_outputevents_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 181 | def test_itemids_in_chartevents_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 194 | def test_itemids_in_procedureevents_mv_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 207 | def test_itemids_in_labevents_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/tests/test_postgres_build.py | 220 | def test_itemids_in_microbiologyevents_are_in_range(mimic_con, mimic_schema): | STRING |
| LOW | mimic-iii/concepts/diagnosis/README.md | 31 | def remove_surrounding_apostrophes(x): | CODE |
| LOW | mimic-iii/tutorials/dplyr-frontend/intro.html | 700 | function bootstrapStylePandocTables() { | CODE |
| LOW | …i/notebooks/rmd_consort_diag/plot_consort_diagram.html | 135 | function bootstrapStylePandocTables() { | CODE |
| LOW | tests/test_compare_concepts.py | 8 | def test_compare_table_treats_same_wall_time_as_equal_across_timezones(): | CODE |
| LOW | tests/test_compare_concepts.py | 15 | def test_compare_table_flags_different_wall_times_even_if_instants_match(): | CODE |
| LOW | tests/test_sqlfluff.py | 53 | def test_concept_passes_sqlfluff(sql_file, lint_results): | CODE |
| LOW⚡ | tests/test_transpile.py | 121 | def test_cases_with_expected_output(name, bq, dialect, expected): | CODE |
| LOW⚡ | tests/test_transpile.py | 125 | def test_unnest_alias_preserved(): | CODE |
| LOW⚡ | tests/test_transpile.py | 132 | def test_duckdb_comments_stripped(): | CODE |
| LOW⚡ | tests/test_transpile.py | 146 | def test_timestamp_outputs_stay_timezone_naive(bq): | CODE |
| LOW⚡ | tests/test_transpile.py | 151 | def test_unsupported_dialect_raises(): | CODE |
| LOW⚡ | tests/test_transpile.py | 156 | def test_schema_map_renames_dataset(): | CODE |
| LOW | tests/test_transpile.py | 183 | def test_concept_transpiles_and_reparses(sql_file, dialect): | CODE |
| LOW | tests/test_transpile.py | 195 | def test_mimic_iii_concept_transpiles_and_reparses(sql_file, dialect): | CODE |
| LOW | tests/test_transpile.py | 226 | def test_datetime_diff_semantics_duckdb(end, start, unit, expected): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mimic-iv/tests/test_first_day.py | 1 | CODE | |
| LOW | mimic-iv/tests/conftest.py | 2 | CODE | |
| LOW | mimic-iv/tests/conftest.py | 6 | CODE | |
| LOW | mimic-iv/tests/test_all_tables.py | 1 | CODE | |
| LOW | mimic-iv/tests/test_medication.py | 1 | CODE | |
| LOW | mimic-iv/tests/test_score.py | 1 | CODE | |
| LOW | mimic-iv/tests/test_sepsis.py | 1 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 7 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 8 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 9 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 12 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 13 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 14 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 15 | CODE | |
| LOW | …c-iii/buildmimic/aws-athena/mimictoparquet_glue_job.py | 16 | CODE | |
| LOW | mimic-iii/buildmimic/oracle/add_oracle_rowdelimiter.py | 1 | CODE | |
| LOW | mimic-iv-cxr/dcm/export_metadata.py | 10 | CODE | |
| LOW | .github/scripts/check_sql_syntax.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mimic-iv/buildmimic/sqlite/README.md | 20 | ## Step 1: Download the CSV or CSV.GZ files. | COMMENT |
| LOW | mimic-iv/buildmimic/sqlite/README.md | 41 | ## Step 2: Generate the SQLite file | COMMENT |
| LOW | mimic-iii/buildmimic/sqlite/README.md | 23 | ## Step 1: Download the CSV or CSV.GZ files. | COMMENT |
| LOW | mimic-iii/buildmimic/sqlite/README.md | 28 | ## Step 2: Edit the script if needed. | COMMENT |
| LOW | mimic-iii/buildmimic/sqlite/README.md | 39 | ## Step 3: Generate the SQLite file | COMMENT |
| LOW | mimic-iii/buildmimic/mysql/README.md | 6 | ## Step 1: Enable LOAD DATA LOCAL | COMMENT |
| LOW | mimic-iii/buildmimic/mysql/README.md | 15 | ## Step 2: Import CSV | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mimic-iv-cxr/txt/create_section_files.py | 135 | # write distinct files to facilitate modular processing | COMMENT |
| MEDIUM | .github/workflows/mysql.yml | 24 | # Using find keeps this robust to how deeply the files are nested. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/mimic_utils/sqlglot_dialects/duckdb.py | 31 | except re.error: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mimic-iv/buildmimic/sqlite/import.py | 60 | CODE | |
| LOW | mimic-iii/buildmimic/oracle/add_oracle_rowdelimiter.py | 21 | CODE | |
| LOW | mimic-iv-cxr/dcm/export_metadata.py | 35 | CODE | |
| LOW | mimic-iv-cxr/txt/create_section_files.py | 31 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mimic-iv/buildmimic/postgres/build_mimic.sh | 5 | # Usage: | COMMENT |
| LOW | mimic-iv/buildmimic/duckdb/build_mimic.sh | 5 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mimic-iii/buildmimic/oracle/build_mimic_oracle.sh | 9 | # Create the tables | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/mimic_utils/transpile.py | 16 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/mimic_utils/compare_concepts.py | 195 | except Exception as e: # noqa: BLE001 - report and continue | CODE |