OHDSI Home | Forums | Wiki | Github

Achilles Condition Report not generated

Hi all,

I ran Achilles on our dataset and exported the statistics to JSON files. When I try to view the reports on OLYMPUS, I can see the statistics for the person table and procedure table. However, for the condition table, it says that there is no data in the table when there are about 3 million entries in the table.

I checked the /AchillesWeb-master/data/SAMPLE/conditions folder and that is empty as well.
At first, I thought that it might be because the data was outside the valid observation period recorded for a patient so I modified the observation table to have a wide valid date range (from 1900-2100) but no reports are created even then.

I’m not sure what went wrong here. Any help on this matter would be greatly appreciated!

Best,
Aarti

So definitely this is an export problem since the folder is empty. Have you tried doing an export of just the conditions?

exportConditionToJson(connectionDetails,"{cdm_schema}","{results_schema}","/{target folder}")

Also, have you populated just the condition_occurrence table, or also the era table?

Hi Jon,

Thank you for responding! I apologize for not getting back to you earlier. I tried exporting just the conditions and the folder conditions is still empty.

I have populated just the condition_occurrence table.

Best,
Aarti

Hi. I’ll need some additional information in order to debug this.

  1. What RDBMS are you using (oracle, sqlserver, postgres)

  2. Can you runt he following query on your env:
    select count() from Achilles_results where analysis_id between 400 and 420;
    select count(
    ) from Achilles_results_dist where analysis_id between 400 and 420;

  3. Export requires analysis_id = 1 has been run (to get the prevalence counts). Can you count the results where analysis_id = 1?

  4. Do you have vocabulary tables (concept/concept_ancestor, etc) populated. This is required to get the concept hierarchy and concept names.

  5. For the prevalence by month reports (for all reports, not just condition) analysis 117 is required which has the active people in a gvein month in your cdn.

Many of these reports require other tables than condition_occurrence to be populated. Observation period is important to determine prevalence. Achilles works best when you have the core tables populated (person, observation period, visit_occurrence, condition_occurrence, procedure_occurrence, drug_exposure). The cost tables aren’t that critical, and the eras don’t need to be built to get these other reports generated. But observation period is a fairly critical one as it serves as providing the denominator in many of our reports.

-Chris

Hi,

  1. We’re using a postgres database.
  2. The following counts are returned-
    68693
    4892
  3. There is 1 entry in achilles_results where analysis_id = 1.
  4. The vocabulary tables have been populated.

I have populated person, location, provider, care_site, observation_period, visit_occurrence, condition_occurrence, procedure_occurrence, measurement, drug_exposure and death tables.

The weird part is that exporting to JSON files works for procedure occurrence but not condition occurrence.

Thank you so much for your help! :smile:

-Aarti

Ok, so the next step is to understand why the folder is empty. At the very least we should get a treemap file, which is handled by this query:
https://github.com/OHDSI/Achilles/blob/master/inst/sql/sql_server/export_v5/condition/sqlConditionTreemap.sql

Can you go to that URL, copy that query over, and replace the tokens with your specific schema for your CDM, and you might need to do a little postgresql tweak to get it to run (but these queries are very ansi compliant, so it shouldn’t be hard). If you don’t get rows from this query, then that would explain why you get no files at all.

-Chris

t