OHDSI Home | Forums | Wiki | Github

Treatment Pathways Study - SQL Query

Hi!

I am trying to replicate OhdsiStudy2 (Treatment Pathways) and I used this SQL code available on Github (SQL Code HERE) to query the data needed for the TxPath study. The description says that it is an SQL Server code, but it does not look like it (the first line generates a syntax error). Has anyone run this query on SQL server before? What is the variable @sourcename supposed to be? The CDMDatabase?

I would appreciate your assistance. Thank you and have a great weekend :slight_smile:

Hi @Haroun_Chahed!

That SQL is part of an R package, which uses another package called SqlRender to fill in the parameters you see. I would recommend you use the R package instead of the SQL.

SqlRender actually comes with a Shiny app. You can copy-paste the SQL into this app and see how it is translated to the various SQL dialects, once you fill in the parameters. sourceName appears to be some name used to create unique table names.

I know that there are several groups in OHDSI now working on building new treatment pathway applications, but Iā€™m not sure who exactly. Anyone?

1 Like
t