OHDSI Home | Forums | Wiki | Github

Achilles update for measurement and specimen

All,

Is there a planned updated to Achilles to support for calculation of statistics for the v5 measurement and specimen tables? I’m working on local enhancements for this and do not want to duplicate work if others are handling this. I’m happy to contribute the code updates.

Bill

Definitely something that needs to be done, but I have no short term plans to address it, so feel free.

@Chris_Knoll

I’ve created the SQL for the new measurements and specimen statistics in Achilles_v5.sql locally and can run these from RStudio.

Next, I think I need to account for new tables in v5 that do not exist in v4 in the R code. This will require a refactor because we can no longer use allReports.rda and analysisDetails.rda to represent the single set of tables. Also, it may be possible to make this more flexible by reading the analyses details directly from the achilles_analysis DB table rather than a file?

First, I’ll be creating independent rda files for v4 and v5 (allReportsV4.rda and allReportsv5.rda) and loading them according to the specified cdmVersion.

Bill

Another option is to add the new reports to the allReports, and within the specific the set of reports that we generate you add an additional CDM version check. For example if specimen report was a cdmv5 only report:

  if ("SPECIMEN" %in% reports)
  {
    if (cdmVersion == 5)
    {
      generateSpecimenTreemap(conn, connectionDetails$dbms, cdmSchema, outputPath, cdmVersion)  
      generateSpecimenReports(conn, connectionDetails$dbms, cdmSchema, outputPath, cdmVersion)
    }
  }

We would still have a challenge of showing the report options in Achilles for the v5 version vs. the v4 version. Or, we always show all reports and if you are on a V4 cdm those pages will return nothing.

-Chris

t