OMOPCDMDatabaseConnector.jl

Utility package to connect to databases in the OMOP CDM format
Author JuliaHealth
Popularity
1 Star
Updated Last
2 Years Ago
Started In
June 2022

OMOPCDMDatabaseConnector

Code Style: Blue Zulip

Utility package to connect to databases in the OMOP CDM database

NOTE: WORK IN PROGRESS. API HAS NOT BEEN STABILIZED YET. EXPECT BREAKS UNTIL VERSION 1.0.0

Description

This is a work in progress package that provides utilities to connect to an OMOP CDM database. This package works on version 5.4 of the OMOP CDM. While documentation has not yet been set up, all functions are documented.

For questions, feel free to start a discussion, create an issue, or post on Zulip.

Example Usage

This assumes you have access to an OMOP CDM database set-up with PostgreSQL.

  1. Add needed packages to a Julia environment as follows:
] add https://github.com/JuliaHealth/OMOPCDMCohortCreator.jl
] add https://github.com/JuliaHealth/OMOPCDMDatabaseConnector.jl 
] add DBInterface, LibPQ
  1. Use the packages:
using DBInterface
using LibPQ
using OMOPCDMDatabaseConnector 
using OMOPCDMDatabaseConnector
  1. Create a database connection:
conn = DBInterface.connect(LibPQ.Connection, "host=[your host] port=[your port] user=[your user] password=[your password]")
  1. Generate database details:
GenerateDatabaseDetails(
    :postgresql,
    "synpuf5"
)
  1. Generate Julia representation of database tables:
tables = GenerateTables(conn)
  1. As an example, now run the following to get all person_id's from the database:
GetDatabasePersonIDs(conn)

If everything worked and you got a DataFrame of person_id's at the end of these steps, you are set to continue working with and interfacing with the database to build your own network study.

Used By Packages

No packages found.