Skip to content

[under development] Redoing Jenna and Christophe's prediction of conversion from major depression to bipolar with and without NLP-derived definitions of depression and bipolar

Notifications You must be signed in to change notification settings

ohdsi-studies/NLP-Psychiatry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Study Title: NLP-Psychiatry

Study Status: Started

  • Analytics use case(s): Patient-Level Prediction
  • Study type: Clinical Application
  • Tags: Psychiatry, NLP, Bipolar Disorder, Depression, OHDSI, Strategus
  • Study lead: *Ming Huang
  • Study lead forums tag:
  • Study start date:
  • Study end date:
  • Protocol: Protocol
  • Publications: -
  • Results explorer: -

This repository contains a multi-component psychiatric prediction study framework using the OHDSI Strategus platform. The study currently includes validation of a bipolar misclassification prediction model and is designed to be extensible for additional psychiatric prediction components.

Background

This study framework addresses the critical need for improved psychiatric diagnosis prediction using electronic health records. The initial component focuses on bipolar disorder misclassification - a significant clinical problem where patients with Bipolar Disorder are frequently misdiagnosed as having Major Depressive Disorder (MDD), leading to delayed proper treatment.

Current Study Components

  1. Bipolar Misclassification Validation: Validates a predictive model that identifies patients initially diagnosed with MDD who are likely to be rediagnosed with Bipolar Disorder within 1 year.

Future Planned Components

The framework is designed to accommodate additional psychiatric prediction modules, such as:

  • Suicide risk prediction
  • Treatment response prediction
  • Psychiatric comorbidity identification
  • NLP-based symptom extraction and prediction

Technical Architecture

This study uses the OHDSI Strategus framework for coordinated multi-database execution. The architecture includes:

  • Strategus Study Protocol: JSON-based analysis specification for multi-component execution
  • Custom Modules: Psychiatric prediction modules that integrate with the Strategus ecosystem
  • Extensible Design: Framework supports adding new prediction components without disrupting existing functionality
  • OMOP CDM Compatibility: Works with standardized healthcare databases across the OHDSI network

Quick Start

1. Install OHDSI Packages (Required)

# Option 1: Use the installation script
source("InstallOhdsiPackages.R")

# Option 2: Use the built-in function
installOhdsiPackages()

# Option 3: Manual installation
remotes::install_github("OHDSI/CohortDiagnostics")
# ... install other packages as needed

2. Test Migration (Verify Setup)

source("TestMigration.R")

3. Create Analysis Specification

source("CreateAnalysisSpecification.R")

4. Configure Database Connection

Edit StrategusCodeToRun.R with your database details:

# Database connection details
connectionDetails <- DatabaseConnector::createConnectionDetails(
  dbms = "postgresql",                    # Your database type
  server = "your_server",                 # Your database server
  user = "your_username",                 # Your database username
  password = "your_password"              # Your database password
)

# Database schema settings
cdmDatabaseSchema <- "your_cdm_schema"           # Schema containing OMOP CDM data (read-only)
workDatabaseSchema <- "your_work_schema"         # Schema for temporary tables (must have write access)
resultsDatabaseSchema <- "your_results_schema"   # Schema for storing results (must have write access)

Important: The workDatabaseSchema and resultsDatabaseSchema must exist in your database, or your user must have permissions to create schemas. For PostgreSQL, you can create them manually:

-- Connect to your database and run:
CREATE SCHEMA IF NOT EXISTS your_work_schema;
CREATE SCHEMA IF NOT EXISTS your_results_schema;

-- Grant permissions to your user
GRANT ALL PRIVILEGES ON SCHEMA your_work_schema TO your_username;
GRANT ALL PRIVILEGES ON SCHEMA your_results_schema TO your_username;

The script will attempt to create schemas automatically for PostgreSQL, but manual creation is recommended for production environments.

5. Execute Study

source("StrategusCodeToRun.R")

Note: If you get errors about missing packages like CohortDiagnostics or CirceR, run the installation script first: source("InstallOhdsiPackages.R")

Documentation

Study Status

Choose one of the following options:

Badge Description
Study Status: Repo Created The study repository has just been created. Work has not yet commenced.
Study Status: Started A first commit was made (to something else than the README file). Work has commenced.
Study Status: Design Finalized The protocol and study code have been finalized.
Study Status: Results Available The study results are publicly available, for example in a paper or results explorer app.
Study Status: Complete The study is complete, no further dissemination planned.
Study Status: Suspended The study has been suspended, and may or may not be continued at a later point in time.

Copy the relevant markdown code from this page, and paste it in your README file, just below the study title.

Analytics Use Cases

Choose one or more options from:

  • Characterization
  • Population-Level Estimation, or
  • Patient-Level Prediction

See the Data Analytics Use Cases chapter for more details.

Study types

Can be either:

  • Methods Research if the study explores a methodological question, for example an evaluation of various propensity score approaches.
  • Clinical Application if the study aims to answer a clinically relevant question, for example 'Does drug A cause outcome B?'.

About

[under development] Redoing Jenna and Christophe's prediction of conversion from major depression to bipolar with and without NLP-derived definitions of depression and bipolar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages