- 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.
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.
- 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.
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
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
# 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
source("TestMigration.R")
source("CreateAnalysisSpecification.R")
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.
source("StrategusCodeToRun.R")
Note: If you get errors about missing packages like CohortDiagnostics
or CirceR
, run the installation script first: source("InstallOhdsiPackages.R")
- Migration Guide: Comprehensive migration documentation
- Migration Complete: Summary of completed migration
- Module Documentation: BipolarMisclassificationModule details
Choose one of the following options:
Copy the relevant markdown code from this page, and paste it in your README file, just below the study title.
Choose one or more options from:
Characterization
Population-Level Estimation
, orPatient-Level Prediction
See the Data Analytics Use Cases chapter for more details.
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?'.