Skip to content

Latest commit

 

History

History
 
 

postgres

PostgreSQL concepts

This folder contains scripts to generate useful abstractions of raw MIMIC-IV data ("concepts"). The scripts are intended to be run against the MIMIC-IV data in a PostgreSQL database.

Most of these scripts are automatically generated by a shell script in the parent folder. If you would like to contribute a correction, please look at the conversion shell script to ensure you edit the right script!

To generate concepts, change to this directory and run psql. Then within psql, run:

-- NOTE: many scripts *require* you to use mimic_derived as the schema for outputting concepts
-- change the search path at your peril!
set search_path to mimic_derived, mimic_core, mimic_hosp, mimic_icu, mimic_ed;
\i postgres-functions.sql -- only needs to be run once
\i postgres-make-concepts.sql

... or, execute the SQL files in your GUI of choice.