IMPORTANT: This repository does not contain the synthetic data. You can request the synthetic dataset from here (iknl.nl). Make sure to add OMOP synthetic dataset
in the description of the request.
- Request the synthetic data from here and mention
OMOP synthetic dataset
in the form. - Docker installed
- Clone this repository
- Place the
.csv
file you obtained from iknl inside the./data
folder. There is aREADME.txt
in that directory telling you the same. - Obtain the necessary vocabulary files from Athena, see the
README.txt
in the./init/vocab
folder for more information. - Verify that the name of your
.csv
file is identical to the name in thedocker-compose.yaml
file. If not, change it to the correct name. - Navigate to the directory containing the
docker-compose.yaml
file. - Run
docker compose up
(ordocker compose up -d
to detach the process from your terminal). - Wait for a long time until you see
database system is ready to accept connections
. - Now you have a working OMOP database.
Note: in case you want to have multiple databases running on your machine you can uncomment the db2
section in the docker-compose.yaml
file and change the csv
path /data/alternative.csv
to the correct path. In this case pgadmin is only connected to the first instance. You can manually add this instance to the pgadmin by logging in to the pgadmin interface and adding a new server with the credentials given in the docker-compose.yaml
file.
-
You can stop the database at any time using
✅ Changes are persistentdocker compose down
or CRTL+C in case you did not use the-d
flag when you started the database.The database is persistently stored on your machine in the
pgadmin-data
and thepostgres-data
. So any changes you made in a session are kept. -
You can start the database any time again using the
docker compose up -d
command. -
In case you want to start fresh:
- Stop the database:
docker compose down
- Remove the database files by deleting the
pgadmin-data
andpostgres-data
folders - Remove the containers:
docker compose rm
(when prompted enter yes)
- Stop the database:
In order to explore the database in a visual way the pgadmin container is started along with the omop database. If the database is up and running you can access the pgadmin interface through browsing to: http://127.0.0.1:5050 and login with the credentials:
- username:
[email protected]
- password:
root
The container binds the internal 5432
to the localhost by default. It is also possible to connect from another Docker container if they are in the same Docker network.
url: 127.0.0.1
from the Docker host or omop
if you connect from another container that is the same Docker network
port: 5432
user: postgres
password: password
Some details to the OMOP CDM:
dbms: postgresql
cdm_database: omopcdm_synthetic
cdm_schema: omopcdm_synthetic
results_schema: results_synthetic
All the .sql files in this folder are executed on initialization in numerical order.
- It first builds the OMOP CDM (creating all schema's, tables) [files:
0xx-*.sql
] - then it loads a syntetic dataset [files:
1xx-*.sql
] - it loads the synthetic dataset into the OMOP CDM [files:
2xx-*.sql
]
This file makes sure the pgadmin already has the omop database server attached.
Mount for the pgadmin-data container. This allows for persistent storage even when the container is stopped. Deleting these folders will remove all settings and data from the containers.
container configuration file for the postgres and pgadmin instance