ohdsi-studies / MentalHealthEquity

Assessing Health Equity in Mental Healthcare Delivery Using a Federated Network Research Model
MIT License
8 stars 1 forks source link

[FEATURE] Create Code to Characterize a Given OMOP CDM Database #9

Open TheCedarPrince opened 3 years ago

TheCedarPrince commented 3 years ago

Is your feature request related to a problem? Please explain.

As we have defined our concept sets in #1 and are in the process of wrapping up the automation of creating these concept sets in #2, we are now well-positioned to start moving forward to characterizations of these populations.

Describe the solution you'd like

As a first pass, let's focus on some very basic characterizations of a given dataset. The tasking can be broken up as follows over a few different population definitions - I also would suggest we do each population definition break down as its own separate PR:

Describe alternatives you've considered

Currently, I looked at the HADES package suite but no luck finding a package that does this sort of characterization. The one that may be useful in the future is this: https://ohdsi.github.io/FeatureExtraction/index.html

TheCedarPrince commented 3 years ago

Note, we have access to a SynPUF database by which we can prototype queries against. OHDSI provides the great package, DatabaseConnector that makes connecting to a DB easy. Here is an example of how to connect to a database using DatabaseConnector:

connectionDetails <- createConnectionDetails(
  pathToDriver = "./R/utils",
  dbms = "postgresql",
  server = "server/host",
  user = "matcha",
  password = "lavendar",
  port = 1234
)

conn <- connect(connectionDetails)

sql <- "
   SELECT PERSON_ID, YEAR_OF_BIRTH, RACE_CONCEPT_ID
   FROM person
   LIMIT 1;
   "

querySql(conn, sql)

disconnect(conn)

That should help with creating prototype scripts and queries.