Skip to content

Commit 14bed76

Browse files
authored
Merge pull request #2125 from MIT-LCP/alistair/typos
fix typos and dead links
2 parents 674e14b + 1ff69ec commit 14bed76

62 files changed

Lines changed: 152 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ mimic-iv/docker-postgres/.env
99

1010
# data
1111
*.csv.gz
12+
# reference data distributed with the repository
13+
!mimic-iii/concepts/diagnosis/ccs_multi_dx.csv.gz
1214

1315
# credentials
1416
key.json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can read more about the code repository in the following open access paper:
66

77
## Cloud access to datasets
88

9-
The various MIMIC databases are available on Google Cloud Platform (GCP) and Amazon Web Services (AWS). To access the data on the cloud, simply add the relevant cloud identifier to your PhysioNet profile. Then request access to the dataset for the particular cloud platform via the PhysioNet project page. Further instructions are available on [the MIMIC website](https://mimic.mit.edu/iv/access/cloud/).
9+
The various MIMIC databases are available on Google Cloud Platform (GCP) and Amazon Web Services (AWS). To access the data on the cloud, simply add the relevant cloud identifier to your PhysioNet profile. Then request access to the dataset for the particular cloud platform via the PhysioNet project page. Further instructions are available on [the MIMIC website](https://mimic.mit.edu/docs/gettingstarted/cloud/).
1010

1111
## Navigating this repository
1212

@@ -71,7 +71,7 @@ pytest tests/
7171

7272
## Other useful tools
7373

74-
* [Bloatectomy](https://github.com/MIT-LCP/bloatectomy) ([paper](https://github.com/MIT-LCP/bloatectomy/blob/master/paper/paper.md)) - A python based package for removing duplicate text in clinical notes
74+
* [Bloatectomy](https://github.com/MIT-LCP/bloatectomy) ([paper](https://github.com/MIT-LCP/bloatectomy/blob/master/paper/bloatectomy_paper.md)) - A python based package for removing duplicate text in clinical notes
7575
* [Medication categories](https://github.com/mghassem/medicationCategories) - Python script for extracting medications from free-text notes
7676
* [MIMIC Extract](https://github.com/MLforHealth/MIMIC_Extract) ([paper](https://doi.org/10.1145/3368555.3384469)) - A python based package for transforming MIMIC-III data into a machine learning friendly format
7777
* [FIDDLE](https://github.com/MLD3/FIDDLE) ([paper](https://doi.org/10.1093/jamia/ocaa139)) - A python based package for a FlexIble Data-Driven pipeLinE (FIDDLE), transforming structured EHR data into a machine learning friendly format

mimic-iii/Makefile.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ Starting from a fresh system which has GNU Make installed, PostgreSQL installed,
77

88
```sh
99
export datadir="/path/to/data"
10+
make create-user
1011
make mimic-download physionetuser=<PHYSIONETWORKS_USERNAME> datadir=$datadir
1112
make mimic-gz datadir=$datadir
1213
```
1314

15+
The `create-user` step creates the database, schema, and user (by default the database is named `mimic` and the user is `postgres`); skip it if these already exist.
16+
1417
Note that if you have already downloaded the data, you can skip the `make mimic-download`, just be sure to set `datadir` appropriately. If you have already decompressed the data into `.csv` files, call `make mimic` instead of `make mimic-gz`, e.g. `make mimic datadir=/path/to/data`.
1518

1619
Optionally, additional contributed materialized views can be created afterward by running:
@@ -19,7 +22,7 @@ Optionally, additional contributed materialized views can be created afterward b
1922
make concepts
2023
```
2124

22-
Note that you may want to modify parameters at the top of the Makefile - e.g. the username (see below "non-standard username or database name").
25+
Note that you may want to modify parameters at the top of `buildmimic/postgres/Makefile` - e.g. the username (see below "non-standard username or database name").
2326

2427
### Authentication
2528
In order to avoid the prompts for your database password each time, you may create a file in your home directory called .pgpass containing the following:
@@ -33,12 +36,12 @@ Replace ```mimic``` with your username and ```password``` with your password. No
3336
Alternatively you can configure the database to use operating system level authentication. See the Postgres manual for more detail (in particular, the section(s) on "Peer Authentication"): https://www.postgresql.org/docs/9.6/static/auth-methods.html
3437

3538
### Non-standard username or database name
36-
If you need to use a username or database name other than ```mimic```, then you will need to specify this by modifying the top-level Makefile:
39+
If you need to use a database name other than ```mimic``` or a username other than ```postgres```, then you will need to specify this by modifying the defaults at the top of `buildmimic/postgres/Makefile`:
3740

3841
```
39-
DBNAME=mimic
40-
DBUSER=mimic
42+
DBNAME := mimic
43+
DBUSER := postgres
4144
```
4245

4346
## Contributing
44-
If you would like to contribute code to create a materialized view to the `concepts` folder, simply add a command which calls the script to the `concepts/make-concepts.sql` file. The format is fairly straightforward: e.g. adding the `\i sepsis/angus.sql` line informs the script to call the `concepts/sepsis/angus.sql` file.
47+
If you would like to contribute a new concept, add the script (written in the BigQuery dialect) to the [concepts](/mimic-iii/concepts) folder and add a corresponding line to [concepts/make-concepts.sh](/mimic-iii/concepts/make-concepts.sh). The PostgreSQL and DuckDB versions in [concepts_postgres](/mimic-iii/concepts_postgres) and [concepts_duckdb](/mimic-iii/concepts_duckdb) are then regenerated by transpilation, and the new script should be added to `concepts_postgres/postgres-make-concepts.sql` and `concepts_duckdb/duckdb.sql`. See the [concepts README](/mimic-iii/concepts/README.md) for details.

mimic-iii/benchmark/postgres-benchmark-4.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
STOPPED VARCHAR(50)
1919
) ;
2020

21-
-- PARTITIONNING
21+
-- PARTITIONING
2222
-- CREATE CHARTEVENTS_PARTITIONED TABLE
2323
CREATE TABLE CHARTEVENTS_PARTITIONED_0 ( CHECK ( itemid in (211, 220045, 51, 442, 455, 6701, 220179, 220050, 8368, 8440, 8441, 8555, 220180, 220051, 456, 52, 6702, 443, 220052, 220181, 225312, 618, 615, 220210, 224690, 646, 220277, 223762, 676, 223761, 678 )
2424
)) INHERITS (CHARTEVENTS_PARTITIONED);

mimic-iii/buildmimic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building the MIMIC database
22

3-
This directory contains scripts that can be used to create a new instance of the MIMIC Critical Care Database. Tutorials for building a local PostgreSQL database using these scripts are available on the MIMIC website, under the "Tutorials" item in the menu: http://mimic.physionet.org/about/mimic/
3+
This directory contains scripts that can be used to create a new instance of the MIMIC Critical Care Database. Tutorials for building a local PostgreSQL database using these scripts are available on the MIMIC website, under the "Tutorials" item in the menu: https://mimic.mit.edu/docs/III/about/
44

55
## Automated tests (PostgreSQL scripts only)
66

mimic-iii/buildmimic/apache-drill/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ In DBeaver, connect and copy/paste:
6666

6767
1. drill_create_data.sql
6868
1. create alias for all csv in temp (dfs.tmp = /tmp on linux) ln -s /path/to/mimic/csv/\* /tmp
69-
1. create table one by one. Otherwize, it crashes when multi query are made in one run
69+
1. create table one by one. Otherwise, it crashes when multi query are made in one run
7070

7171
## Notes
7272

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Study MIMIC-III data using AWS Athena
2-
The MIMIC-III dataset is available in the AWS cloud through our [Open Data on AWS program](https://registry.opendata.aws/). This allows researchers to use the MIMIC-III dataset without having to download it, make a copy of it, or pay to store it. They can simply analyze MIMIC-III using AWS services like Amazon EC2, Amazon Athena, AWS Lambda, or Amazon EMR by pointing to its address in the AWS cloud. This makes it faster and less expensive to perform research studies. In order to gain access, please login to the [MIMIC PhysioNet website](https://mimic.physionet.org/), [input your AWS account number](https://physionet.org/settings/cloud/), and [request access to the MIMIC-III Clinical Database on AWS](https://physionet.org/projects/mimiciii/1.4/request_access/2).
2+
The MIMIC-III dataset is available in the AWS cloud through our [Open Data on AWS program](https://registry.opendata.aws/). This allows researchers to use the MIMIC-III dataset without having to download it, make a copy of it, or pay to store it. They can simply analyze MIMIC-III using AWS services like Amazon EC2, Amazon Athena, AWS Lambda, or Amazon EMR by pointing to its address in the AWS cloud. This makes it faster and less expensive to perform research studies. In order to gain access, please login to the [MIMIC PhysioNet website](https://mimic.mit.edu/), [input your AWS account number](https://physionet.org/settings/cloud/), and [request access to the MIMIC-III Clinical Database on AWS](https://physionet.org/projects/mimiciii/1.4/request_access/2).
33

44
Found here is some useful code to help you understand how to access the MIMIC-III dataset on AWS.
55

66
### mimic-iii-athena.yaml
7-
This is an [AWS CloudFormation Template](https://aws.amazon.com/cloudformation/) that will deploy a database in the [AWS Glue](https://aws.amazon.com/glue/) Data Catalog that contains all of the MIMIC-III tables. It also deploys a Jupyter Notebook instance in [Amazon SageMaker](https://aws.amazon.com/sagemaker/) that contains the content of this [mimic-code](https://github.com/MIT-LCP/mimic-code/) GitHub repository and is set up to access the MIMIC-III data through AWS Glue. This repository contains a version of the [Aline Study](https://github.com/JamesSWiggins/mimic-code/tree/master/notebooks/aline/awsathena) that is configured to run it's SQL queries against the MIMIC-III data in AWS using [AWS Athena](https://aws.amazon.com/athena/).
7+
This is an [AWS CloudFormation Template](https://aws.amazon.com/cloudformation/) that will deploy a database in the [AWS Glue](https://aws.amazon.com/glue/) Data Catalog that contains all of the MIMIC-III tables. It also deploys a Jupyter Notebook instance in [Amazon SageMaker](https://aws.amazon.com/sagemaker/) that contains the content of this [mimic-code](https://github.com/MIT-LCP/mimic-code/) GitHub repository and is set up to access the MIMIC-III data through AWS Glue. This repository contains a version of the [Aline Study](/mimic-iii/notebooks/aline-aws) that is configured to run it's SQL queries against the MIMIC-III data in AWS using [AWS Athena](https://aws.amazon.com/athena/).
88

99
Use the below Launch Stack button to deploy this AWS CloudFormation template into your AWS account. On the first screen, the template link has already been specified, so just click next. On the second screen, provide a Stack name (letters and numbers) and click next, on the third screen, just click next. On the forth screen, at the bottom, there is a box that says **I acknowledge that AWS CloudFormation might create IAM resources.**. Check that box, and then click **Create**. Once the Stack has complete deploying, look at the **Outputs** tab of the AWS CloudFormation console for links to your Juypter Notebooks instance.
1010

1111
[![cloudformation-launch-stack](cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=MIMIC&templateURL=https://aws-bigdata-blog.s3.amazonaws.com/artifacts/biomedical-informatics-studies/mimic-iii-athena.yaml)
1212

1313
### mimictoparquet_glue_job.py
14-
The MIMIC-III dataset is offered on AWS in both the original gzipped CSV format as well as the Apache Parquet format. This Python script is run by the MIMIC team as an AWS Glue job to convert the CSV.gz files to Apache Parquet format. It uses Apache Spark to help conver the files. You don't need to use this script yourself to use the MIMIC-III data in Parquet format, but it is provided as a template that could be used to convert other data sets from CSV to Parquet. The benefits of querying this data in Parquet format are outlined in this blog post:
14+
The MIMIC-III dataset is offered on AWS in both the original gzipped CSV format as well as the Apache Parquet format. This Python script is run by the MIMIC team as an AWS Glue job to convert the CSV.gz files to Apache Parquet format. It uses Apache Spark to help convert the files. You don't need to use this script yourself to use the MIMIC-III data in Parquet format, but it is provided as a template that could be used to convert other data sets from CSV to Parquet. The benefits of querying this data in Parquet format are outlined in this blog post:
1515

1616
### mimic-aws-athena-ddl.sql
1717
This is a SQL script that can be run directly within AWS Athena to define each of the MIMIC-III dataset tables from the Apache Parquet files provide in the AWS OpenData program. You do not need to execute these if you use the above ```mimic-iii-athena.yaml``` CloudFormation template. The table spaces are defined for you by that automation. However, if you wanted to define the tables yourself within your account, you can use these SQL statements.

mimic-iii/buildmimic/bigquery/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Following are the steps to create the MIMIC-III dataset on BigQuery and load the source files (.csv.gz) downloaded from Physionet.
44

5-
**IMPORTANT**: Only users with approved Physionet Data Use Agreement (DUA) should have access to the MIMIC dataset via BigQuery or Cloud Storage. If you don't have access to MIMIC, follow the instructions [here](https://mimic.physionet.org/gettingstarted/access/) to request access.
5+
**IMPORTANT**: Only users with approved Physionet Data Use Agreement (DUA) should have access to the MIMIC dataset via BigQuery or Cloud Storage. If you don't have access to MIMIC, follow the instructions [here](https://mimic.mit.edu/docs/gettingstarted/) to request access.
66

77
---
88

@@ -12,7 +12,7 @@ Following are the steps to create the MIMIC-III dataset on BigQuery and load the
1212
1313
For this tutorial, we will proceed using the compressed files (.csv.gz) stored in a Google Cloud Storage (GCS) bucket.
1414
In order to use these files, you must have a Google account with access permission granted via PhysioNet.
15-
You can read about being provisioned access to MIMIC-III on Google [on the cloud tutorial page](https://mimic.physionet.org/gettingstarted/cloud/).
15+
You can read about being provisioned access to MIMIC-III on Google [on the cloud tutorial page](https://mimic.mit.edu/docs/gettingstarted/cloud/).
1616

1717
Once you have configured your account on PhysioNet, go to the [MIMIC-III page on PhysioNet](https://physionet.org/content/mimiciii/) and scroll down to the Files section.
1818

@@ -139,12 +139,12 @@ BigQuery schemas are defined by JSON files. These files are an array of dictiona
139139
The information about the columns are compiled from several sources:
140140

141141
1. [The PostgreSQL build scripts](https://github.com/MIT-LCP/mimic-code/tree/main/mimic-iii/buildmimic/postgres)
142-
2. [The MIMIC-III online documentation](https://mimic.physionet.org/about/mimic/)
142+
2. [The MIMIC-III online documentation](https://mimic.mit.edu/docs/III/about/)
143143
3. [A schematic of the MIMIC-III database](https://mit-lcp.github.io/mimic-schema-spy/)
144144

145145
Currently all columns are set as NULLABLE as the tables will be used for searching/querying only and users with Viewer role should not be able to modify the tables (ex: insert/delete/update data). However, depending on your environment, you may need to set the mode REQUIRED for the appropriate columns.
146146

147-
We selected the type DATETIME for all columns with dates and times. However, you could also use TIMESTAMP. As [discussed in the MIMIC-III documentation](https://mimic.physionet.org/mimicdata/time), columns with suffix DATE (ex: CHARTDATE) "will always have 00:00:00 as the hour, minute, and second values. This does not mean it was recorded at midnight: it indicates that we do not have the exact time, only the date". This is also true for other columns such DOB and DOD (patients table).
147+
We selected the type DATETIME for all columns with dates and times. However, you could also use TIMESTAMP. As [discussed in the MIMIC-III documentation](https://mimic.mit.edu/docs/III/about/time.html), columns with suffix DATE (ex: CHARTDATE) "will always have 00:00:00 as the hour, minute, and second values. This does not mean it was recorded at midnight: it indicates that we do not have the exact time, only the date". This is also true for other columns such DOB and DOD (patients table).
148148

149149
---
150150

mimic-iii/buildmimic/duckdb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ $
8585
Here's an example invocation that will make the database in the default "mimic3.db":
8686

8787
```sh
88-
$ ./import_duckdb.sh physionet.org/files/mimiciii/1.4
88+
$ ./import_duckdb.sh mimiciii/1.4
8989

9090
... output removed
9191
Successfully finished loading data into mimic3.db.

mimic-iii/buildmimic/duckdb/import_duckdb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ usage () {
2929
die "
3030
USAGE: ./import_duckdb.sh mimic_data_dir [output_db]
3131
WHERE:
32-
mimic_data_dir directory that contains csv.tar.gz or csv files
32+
mimic_data_dir directory that contains csv.gz or csv files
3333
output_db: optional filename for duckdb file (default: mimic3.db)\
3434
"
3535
}

0 commit comments

Comments
 (0)