Add concept map Postgres load scripts for MIMIC-IV and NW. #2000
Open
danamouk wants to merge 5 commits intoMIT-LCP:mainfrom
Open
Add concept map Postgres load scripts for MIMIC-IV and NW. #2000danamouk wants to merge 5 commits intoMIT-LCP:mainfrom
danamouk wants to merge 5 commits intoMIT-LCP:mainfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds PostgreSQL scripts for loading concept map data into both MIMIC-IV and NW databases.
For each database (
mimic-iv/concepts_postgres/concept_map/andnw/concepts_postgres/concept_map/), it adds 5 SQL scripts and a README:create.sql — Creates the
mimiciv_concept_map/nw_concept_mapschema with 8 tables:labevents_to_loinc,labevents_to_omop,prescriptions_to_rxnorm,prescriptions_to_omop,chartevents_to_loinc,chartevents_to_omop,procedureevents_to_snomed,procedureevents_to_omopload.sql — Loads mapping CSVs from
concepts/concept_map/hosp/andicu/into the tablesconstraint.sql — Adds primary keys on
subject_idto enforce uniqueness and ensure data integrity.Prescriptions tables are excluded because different drug names share the same NDC code, so
subject_idis not unique.index.sql — Creates indexes on
subject_idandobject_idto speed up lookups and joins against the mapping tablesvalidate.sql — Checks row counts against expected values
README.md — Quickstart and step-by-step setup guide
These concept maps provide mappings from local hospital codes to standard terminologies (LOINC, OMOP, RxNorm, SNOMED) using the SSSOM format.