OHDSI Home | Forums | Wiki | Github

Error in achilles execution

Hello

I have a trouble in execution of Achilles in my CDM database.
My CDM db was build up with CDM 5.3. However, when Achilles runs in R, there are errors showing "Invalid column name ‘effective_drug_dose’. and no drug_cost table.
CDM 5.3 have no drug_cost table and effective_drug_dose in drug_exposure table. What I find is that there are still mentions of “effective_drug_dose” and “drug_cost” in https://github.com/OHDSI/Achilles/blob/master/inst/sql/sql_server/Achilles_v5.sql. -> Can it be a reason?

My system are sql server, cdm 5.3 and achilles ver 1.5.

Thank you

Yeesuk

I don’t think Achilles has been updated to support CDM 5.3. You are right, that is probably the issue.

so any changes has been made to Achilles to support CDM 5.3? If yes, please share the location where it exists.
Thank you.

@Ajit_Londhe and @t_abdul_basser are the primary maintainers of that repository.

Hi @ambuj, it supports 5.3, you just need to install the latest version from https://github.com/OHDSI/Achilles, and specify your cdmVersion is 5.3. That way, the singular cost table will be used instead of the deprecated drug_cost and procedure_cost tables.

1 Like

you can also instruct Achilles to skip cost analysis and avoid the error. Post your current installed Achilles version.

Hello Everyone,

I encountered an error while running Achilles using R code given here

I was running the below R in multithread mode as given below. Note the error happens only for multithread mode

  library(Achilles)
  achilles(connectionDetails, 
  cdmDatabaseSchema = "cdm", 
  resultsDatabaseSchema = "results",
  scratchDatabaseSchema = "scratch",
  vocabDatabaseSchema = "vocab",
  numThreads = 3,
  sourceName = "mysource",  # this is my cdm_source_name field from cdm_source table
  cdmVersion = "5.3.1",
  runHeel = TRUE,
  runCostAnalysis = FALSE)

However this resulted in an error as shown below

Error in $<-.data.frame(*tmp*, “runTime”, value = NA) :
replacement has 1 row, data has 0

Anyway I am sharing the full execution messages that was generated in R console

> achilles(connectionDetails, cdmDatabaseSchema = "cdm", 
> +          resultsDatabaseSchema = "results",scratchDatabaseSchema = "scratch",
> +          vocabDatabaseSchema = "vocab",numThreads = 3,sourceName = "mysource", 
> +          cdmVersion = "5.3.1",runHeel = TRUE,runCostAnalysis = FALSE)
> Connecting using PostgreSQL driver
> Beginning multi-threaded execution
> Connecting using PostgreSQL driver
>   |=================================================================================================================| 100%
> Executing SQL took 0.212 secs
> Dropping scratch Achilles tables from schema scratch
>   |=================================================================================================================| 100%
> Temporary Achilles tables removed from schema scratch
> Executing multiple queries. This could take a while
>   |=================================================================================================================| 100%
> Error in `$<-.data.frame`(`*tmp*`, "runTime", value = NA) : 
>   replacement has 1 row, data has 0

Can someone help me with this error?

Hi @Akshay – I replied in the Git issue here:

t