OHDSI Home | Forums | Wiki | Github

Trouble with CIRCE/WebAPI in OLYMPUS

Hi All,

I running released OLYMPUS (version 1.2.0) with this configuration

and I got some troubles with CIRCE

when I tried to select any concept, there is nothing in the select box
and I got this message

so, I thought ‘there is some trouble with WebAPI’
but, I didn’t know what should I do…

Could you give me some advice?

  1. Are you able to search concepts from Hermes?

  2. We are shifting to a docker based environment for the WebAPI launcher.
    It will have the latest web apps so represents an update from the OLYMPUS
    functionality.

Another possiblity:
the SJ_AUSOM_sample05 is the database, but not the schema. For MSSqlServer, you can include the database and schema in the field ‘CDM Database Name / Schema’. Try entering ‘SJ_AUSOM_sample05.dbo’ if the database is SJ_AUSOM_sample05 and you have your tables populated in the dbo schema.

-Chris

I think WebAPI has configured because this message occurs

and I can get a data about cohortdefinition.

but, can not seach any concepts from HERMES

When I enter this address,
http://localhost:20000/WebAPI/vocabulary/concept/0

similar message occurs;

When I tried to enter ‘SJ_AUSOM_sample05.dbo’ in the field ‘CDM Database Name / Schema’ and launch it,

This error message occurs.

so, I thought ‘SJ_AUSOM_sample05’ would be right.

Hi,
Yes the Java exception there from the webAPI startup is hard to determine the root cause, but the rest call you made is very clear: The object ‘SJ_AUSOM_sample05.CONCEPT’ does not exist.

Could you pull up SQL management studio to take a look at how the database is structured, specifically where you find the ‘Source’ table (which is a WebAPI created table) vs. your cdm’s CONCEPT table. I just would like to understand which database and which schema these tables exist in. I’m thinking that the WebAPI initlaized tables under one schema but the config is trying to point it at another schema.

Also, i’m not sure if Olympus is configured to run off of our ‘Multi-homed’ release. @jon_duke, can you confirm if the SOURCE table and DAEMON tables need to be configured for the OLYMPUS setup?

-Chris

Are you running CDM v4 or v5?

Chris you are correct, Olympus is not configured for multi homed but all
the included applications should risk with the embedded WebAPI.

Thanks, @jon_duke.

@zai:
The tables that WebAPI create are tables like BATCH_ and feas_study_ (for starters). Let me know which schema those are in, as well as the schema your CDM tables are in.

-Chris

‘SJ_AUSOM_sample05’ is CDM v5

The origin data was CDM v4.
I made up ‘SJ_AUSOM_sample05’ using CDM v4 to CDM v5 conversion query.

This is the DDL query what I have done
https://github.com/OHDSI/CommonDataModel/blob/master/Sql%20Server/OMOP%20CDM%20ddl%20-%20SQL%20Server.sql

And, This is conversion from CDM v4 to CDM v5 query.
https://github.com/OHDSI/CommonDataModel/blob/master/Version4%20To%20Version5%20Conversion/Sql%20Server/OMOP%20CDMv4%20to%20CDMv5%20-%20SQL%20Server.sql

Right before I launch the OLYMPUS, I deleted ‘cohort’ and ‘cohort_definition’ table
follow this comments

This link is output of generated scripts for database objects

This is captured screenshot. you can see what tables(like BATCH_ and feas_study_) are in

Ok, @zai, Thanks for the info. I think I know what you need to do:

There is an issue putting the CDM schema and the WebAPI schema (call it the ohdsi result schema) in the same schema: The cohort and cohort_defintion collide. Do you think that you could set up a separate database (call it SJ_AUSOM_OHDSI) and in the OLYMPUS setup, put SJ_AUSOM_sample05.dbo as the cdm database/schema and put SJ_AUSOM_OHDSI.dbo as the Results Database/schema. The Cohort Database/Schema can also be set to SJ_AUSOM_OHDSI.dbo.

Setting this should create the WebAPI tables in the OHDSI result database, which will be separate from the CDM tables. If you want, you can clean up the ODHSI tables from the SJ_AUSOM_Sample05 database dbo schema:
Batch_*
feasibility_study_*
heracles_*

That should set it up exactly how we have our own environment set up (where we have the ohdsi tables in a separate database vs. the CDM tables, but within each database, they are both in the dbo shema). Could you give this a try and let us know the result?

-Chris

As you commented, I have tried launch OLYMPUS with this configuration.

but, the error occurs again.

also, there is nothing in the Results Database table list

I tried again after delete with this query and occurs same errors.

DROP TABLE BATCH_JOB_EXECUTION
DROP TABLE BATCH_JOB_EXECUTION_CONTEXT
DROP TABLE BATCH_JOB_EXECUTION_PARAMS
DROP TABLE BATCH_JOB_EXECUTION_SEQ
DROP TABLE BATCH_JOB_INSTANCE
DROP TABLE BATCH_JOB_SEQ
DROP TABLE BATCH_STEP_EXECUTION
DROP TABLE BATCH_STEP_EXECUTION_CONTEXT
DROP TABLE BATCH_STEP_EXECUTION_SEQ
DROP TABLE FEAS_STUDY_GENERATION_INFO
DROP TABLE FEAS_STUDY_INCLUSION_STATS
DROP TABLE FEAS_STUDY_INDEX_STATS
DROP TABLE FEAS_STUDY_RESULT
DROP TABLE FEASIBILITY_INCLUSION
DROP TABLE FEASIBILITY_STUDY
DROP TABLE HERACLES_ANALYSIS
DROP TABLE HERACLES_HEEL_RESULTS
DROP TABLE HERACLES_RESULTS
DROP TABLE HERACLES_RESULTS_DIST

Ok, I’m very sorry for the troubles, but it seems my understanding of what Olympus is doing to install is not correct. Here’s what I expected to happen:

  1. Entering the hostIP will connect you to the server. I’m not sure what the SID/ServiceName does for MSSql, so i’m assuming it’s not used here.
  2. Using the information in the Results Database Name / Schema, the database that the connection will connect to will be SJ_AUSOM_OHDSI. This does not appear to be happening, it looks like it is using the SJ_AUSOM_sample05 as the default database becuase that’s where the WebAPI tables are being created.
    3 After all the configuration information is saved, a JVM process is started, and using the _OHDSI database connection, the WebAPI database tables should be created in that database (but that is not happening here).

@jon_duke, could you fill in the gaps, or maybe @alfranke?

Alternative idea: how comfortable are you with using EclipseIDE or Netbeans? We have another party installing the WebAPI on MSSQL server but directly deploying the java application into tomcat instead of through Olympus. Would this option be a possibility for you?

-Chris

Thank you for your mentions.

I have tried the alternative way follow this step. and have another question.

  1. Deploy the latest WebAPI (clone from Github)
  2. Insert values related with my MSSQL server and database schema into ‘source’ and ‘source_daimon’ table
  3. Run the latest CIRCE App. (clone from Github)
  4. create and save a new cohort definition for the test purpose (filter only Visit after 2010-01-01)
  5. Run the latest HERACLES App. (clone from Github)
  6. Search the cohort definition and click that name

But the summary shows total 1877 patients and ‘No data’ on the Gender Distribution.
and also, there is nothing in the filter list. so, I can not check any filter.

I have reviewing the CIRCE and HERACLES source code.
I guess the major output of the CIRCE is ‘cohort_definition’, ‘cohort_definition_details’ and ‘cohort_generation_info’ table in the CDM Database.
But, I can not convince myself exactly what is the output of the CIRCE and HERACLES respectively.

Could you share the major steps what the OHDSI Apps.(WebAPI, CIRCE, HERACLES) create and use in the database?

Hi, @zai,
Looks like you’re doing pretty well if you are able to generate cohorts and see some results! Fantastic!

To answer your question:
CIRCE populates cohort_definition, cohort_definition_details, and cohort_generation_info in the WebAPI database. (The webAPI database has separate tables from the CDM database, and I just want to be sure that we are clear on this point, because the cohort and cohort_definition table from the CDM database is not the same as the cohort and cohort_definition tables created when installing WebAPI).

When you click ‘generate’, data is populated in the ohdsi_schema.cohort table. You can select * from ohdsi_schema.cohort table where cohort_definition_id = {your cohort ID}.

If you have records in that table, then CIRCE is working for you.

Next: Heracles: I’m hoping @jon_duke can give more details, but there’s a ‘runner’ mode and a ‘view’ mode in Heracles. In the ‘runner’ mode, you search for the cohort, then pick the list of analysis you need to run (you should pick them all since some sub-reports depend on others, and it is not clear which depends on which). Once you select all the reports to run and click run, you then have to wait for the reports to generate, Once complete, you should be able to pull up the ‘viewer’ and search for your cohort again, and view the results.

The reason why I think you are only getting the summary counts is that without running the specific Heracles analyses, all the heracles reports show is select count(*) from ohdsi_schema.cohort, which is just a simple member count. The number of men/women and other statistics requires the Heracles analysis to run.

To answer your second question, I’llt ry to give a broad overview:

WebAPI: in is our service layer that responds to HTTP requests and reads/writes data to the OHDSI database. The sub-services within WebAPI are broken down into: cohort_definition (used by CIRCE), Vocabulary query (used by HERMES), cohort analysis (used by Heracles), study feasiblity (used by CALYPSO).

Web appilcations CIRCE/CALYPSO/HERACLES/HERMES: These are just simple html applications which use HTTP to communicate to WebAPI to fetch data from the OHDSI database. The data that is generated from each application (such as new cohort defintiions, or cohort analysis results) is invoked from these web applications, but the work is performed by the back-end service layer: WebAPI. So you won’t be able to go into any of the client applications and figure out where the database is being written to. All you’ll find is the HTTP requests made to WebAPI. WebAPI does all the database access.

Let me know if you need any more detail.

-Chris

Thanks, @Chris_Knoll

and I have another wondering.
I inserted values into ‘source’ and ‘source_daimon’ tables follow this comment.

In here, how can I connect the ‘daimon_type’ in the ‘source_daimon’ table?
I understand daimon_type has 0 to 3 and I connected like this.

0: CDM -> CDM Database (ex. SJ_AUSOM_sample05)
1: Vocabulary -> CDM Database (ex. SJ_AUSOM_sample05)
2: Results -> OHDSI Database (ex. SJ_AUSOM_OHDSI)
3: Evidence -> ?

but yet I don’t know what means the Evidence is.
Can you tell me what is the Evidence? and which one is the relevant one? (CDM Database? or OHDSI Database?)

Evidence is related to another OHDSI appliaction called LAERTES. @rkboyce is the lead on that and can direct you to applications that depend on this Daimon.

For CIRCE, HERACLES, HERMES, The only Daimons you’ll need to worry about are 0 (CDM), 1 (vocab) 2(results). in the CDM row of source_daimon, the field ‘table_qualifier’ should be your shema that your CDM tables are stored in. Note on SqlServer this could be Database.schema depending on the connection string of the datasource. The Results daimon should have the table qualifier for the schema (or database.schema) of the results table. This setup can get more complicated if you have multiple datasources, so let’s just focus on your specific setup (single CDM):

You should create one source record which has the connection string to your CDM database. For this example, let’s assume that your CDM database and the OHDSI webAPI database re on the same physical server, so you’ll set the source_connection to the jdbc url of our SQL server. We will need 3 daimons configured for this source: a CDM, a Vocabulary, and a Results.

Each row inserted into the source_daimon table is to specify how tables should be qualfied to query the server to get to the tables. In the CDM row, you’ll put a table qualifier of {your CDM database.dbo}. For the Vocabulary, you can reuse- the same information in your CDM daimon because the vocabulary tables are contained int eh CDM. There are advanced use cases where you might want to specify a number of vocabulary daimons.

Finally, the Results one is going to be special. We’re going to use the tables that the WebAPI created for you during installation of WebAPI. So, we’ll put in the table_qualifier of the Results daimon {WebAPI database.dbo}. This saves you the work of having to copy the tables from web API into a special database to store results. This will work for you in the single-cdm case that you have, but if you want to do multiple CDMs later, we’ll have to revisit this and show you how to initialize a results daimon in a separate database. But know this: you can only have one results database per cdm. you can’t share a single results database across different cdms because they will overwrite each other, and you don’t want that.

Let me know if anything is unclear, i know this can be a bit confusing if you never really dug into the details about why these decisions were made, but feel free to ask about any specific details that you have about the configuration.

-Chris

Hi @zai, The tables for “Evidence” (LAERTES) are OHDSI but currently only available on the default public “demo” database. This is because data from the project is still very experimental and undergoing revisions and further validation. If you are doing a local installation and interested in playing with the data, I can prepare a download for you. It would be loaded into your local OHDSI schema and the the webapi calls and client programs (currently, “Evidence” tab in Hermes" and “KnowledgeBaseWeb” https://github.com/OHDSI/KnowledgeBaseWeb).

best regards,
@rkboyce

t