Before starting, download and install docker (machine).
- Checkout OMOP CDM v5.2.2:
git clone -b v5.2.2 [email protected]:OHDSI/CommonDataModel.git db/cdm
or v6.0.0:
git clone -b v6.0.0 [email protected]:OHDSI/CommonDataModel.git db/cdm
- Vocabulary
-
CDM v5.2.2: Download vocabulary from Athena into a folder called
db/vocabulary
. Minimum codesets: SNOMED, ICD9CM, ICD9Proc, CPT4, HCPCS, RxNorm, NDC, Gender, Race, CMS Place of Service, Ethnicity, Currency and RxNorm. Ensure all instructions in the downloaded Athena folder are followed. -
CDM v6.0.0: Repeat as above, but downloading vocabulary to
etl/vocabulary
.
- Initially run the
broadsea-webtools
service, and obtain a DDL to define the tables of adb/results
schema.
docker-compose up -d broadsea-webtools
curl "http://localhost:8080/WebAPI/ddl/results?dialect=postgresql&vocabSchema=cdm" >> db/results.sql
docker-compose down
- Data
-
CDM v5.2.2: Download the SynPUF 1000 person dataset from ltscomputingllc into a folder called
db/data
. -
CDM v6.0.0: Clone the Synthea patient dataset generator into
etl/data
and follow the instructions within the repository to generate a suitable dataset.
- Build the services (target v6 compose file with
-f docker-compose.v6.yml
for CDM v6.0.0, for this and subsequent docker commands).
docker-compose build
- Run the services, to initialise the database, tracking progress. NB. this is an intensive task, which may require a reset (either indirectly via a restart, or directly by (carefully) removing resources using
docker system prune -a
) before proceeding:
docker-compose up -d db
docker logs -f ohdsi_db_1
- Start the (remaining) broadsea containers, prompting the webtools container to run its migrations against the (now initialised) database:
docker-compose up -d
- Enter the
db
container, and execute the post-migration OHDSI script:
docker exec -it ohdsi_db_1 /bin/bash
psql omop --user user -f ohdsi.sql
- Restart the broadsea containers, so they can leverage the information provided by the post-migration script.
docker restart ohdsi_broadsea-webtools_1
docker restart ohdsi_broadsea-methods-library_1
- Open RStudio at
http://localhost:8787
and login with the username 'rstudio' and the password 'mypass'. Execute the following commands to create the remainder of the tables required by ATLAS and the API:
library(Achilles)
connectionDetails <- createConnectionDetails(dbms = "postgresql",
server = "<DB container IP>/omop",
user = "user",
password = "password")
achilles(connectionDetails = connectionDetails,
cdmDatabaseSchema = "cdm",
resultsDatabaseSchema = "results",
vocabDatabaseSchema = "cdm",
sourceName = "OHDSI-CDMV5",
cdmVersion = "5.2.2",
numThreads = 1,
runHeel = FALSE)
- Confirm cohorts can be successfully generated at
http://localhost:8080/atlas/#/cohortdefinitions
.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details.