OHDSI Home | Forums | Wiki | Github

Tip: Achilles RC/PC/DRC/DPC counts in Atlas

Hello Atlas implementers,

I didn’t realize this until today that we had this officially available: if you are using Atlas 2.11.0 or greater, you can populate the results table “achilles_result_concept_count” for showing record count / person count / desc RC / desc PC in concept results using this endpoint:

/WebAPI/ddl/achilles
(demo site: https://atlas-demo.ohdsi.org/WebAPI/ddl/achilles)

This was originally going to be in Achilles package, but now is simply a script that you can grab and run.

Thank you @Sergey and @Anton_Abushkevich for adding this!

Thanks,
Ajit

4 Likes

if atlas ver is under 2.11 , can not execute scirpt that you make?

Great work! Can Achilles also still be used to calculate and show the RC/DRC? Or do we have to use the new achilles_result_concept_count table?

Achilles computes RC/DRC if optimizeAtlasCache = TRUE. But then this endpoint drops it and recreates it with PC/DPC.

I think we may want to drop optimizeAtlasCache from Achilles altogether in favor of this WebAPI endpoint to avoid overlap.

1 Like

I believe only in 2.11.0 and beyond.

@Ajit_Londhe

We have Atlas/WebAPI 2.11.1, but the endpoint /WebAPI/ddl/achilles doesn’t work. However, the endpoint /WebAPI/info returns expected values.

Any idea where the issue might be?

Thanks
Jack

Do you have security enabled? If so, it is not directly accessible from the browser, you’d need to authenticate with a security token. This is fixed in the new 2.12.1 release (https://github.com/OHDSI/WebAPI/issues/2183).

@Ajit_Londhe Thanks, it explains. I will keep an eye on it when the new upgrades are in place.

My workaround is to use the Atlas Demo site. Here’s my R code:

 achillesTablesUrl <- sprintf("%s/ddl/achilles?dialect=%s&schema=%s&vocabSchema=%s",
                            "https://atlas-demo.ohdsi.org/WebAPI",
                            connectionDetails$dbms,
                            resultsDatabaseSchema,
                            cdmDatabaseSchema)


response <- httr::GET(url = achillesTablesUrl)
achillesRcSql <- httr::content(response)

However, even this needs a workaround if you’re on Redshift. This SQL includes some casting to varchar that then don’t play nice with the inserts: https://github.com/OHDSI/WebAPI/issues/2194.

Changing the final insert to cast the concept ids back to ints avoids cast errors.

t