Achilles is a R package available [here](https://github.com/OHDSI/Achilles).
Achilles is a R package available at https://github.com/OHDSI/Achilles.
To install Achilles package, you need to use `devtools::install_github()` function.
The repository was cloned and the package was installed manually in Rstudio.
The modifications we made are available at https://github.com/scossin/Achilles/commits/cdw_bordeaux and discussed below.
```r
## Oracle issues
devtools::install_github("OHDSI/Achilles")
There are currently 2 open issues with Oracle database:
```
## SQL results tables
The output table of the Achilles statistic computation need to be created before run Achilles analysis:
- https://github.com/OHDSI/Achilles/issues/598: Achilles create table doesn't work. [Our fix](https://github.com/scossin/Achilles/commit/f918ba5fb58dbea0e2e19cb6a279ce1d3dc41022) was to replace '' as by cast('' as varchar(255)) in the table creation queries.
- ACHILLES_RESULTS
- https://github.com/OHDSI/Achilles/issues/600: query 109 fails because SUBSTRING doesn't exist in Oracle. [Our fix](https://github.com/scossin/Achilles/commit/75008f4a6326a8f1a3db92dc260df8c037496573) was to replace substring by substr
- ACHILLES_HEEL
- ACHILLES_RESULTS_CONCEPT_COUNT
- ACHILLES_RESULTS_DIST
The scripts are available bellow. They must be run in the OMOP result scheme.
## Package execution
The script we executed to run Achilles is available here: https://github.com/scossin/Achilles/blob/cdw_bordeaux/codeToRun.R
```sql
The script ""./getConnectionDetails.R" (not in the repository). returns a connectionDetails object to connect to the database.
CREATETABLEACHILLES_RESULTS
The password is stored and encrypted by the [keyring](https://cran.r-project.org/web/packages/keyring/index.html) package.
(
ANALYSIS_IDNUMBER(38)
,STRATUM_1VARCHAR2(255)
,STRATUM_2VARCHAR2(255)
,STRATUM_3VARCHAR2(255)
,STRATUM_4VARCHAR2(255)
,STRATUM_5VARCHAR2(255)
,COUNT_VALUENUMBER(38)
);
```
```sql
**All the default analysis run successfully**.
CREATETABLEACHILLES_HEEL
(
ANALYSIS_IDNUMBER(38)
,ACHILLES_HEEL_WARNINGVARCHAR2(255)
,RULE_IDNUMBER(38)
,RECORD_COUNTNUMBER(38)
);
```
```sql
We have a ORA-01652 error (unable to extend temp segment in tablespace) when running Achilles analysis id 424, 624, 724, 1824: the Oracle database run out of memory with 256 go avaivable in our TEMP tablespace.
CREATETABLEACHILLES_RESULTS_CONCEPT_COUNT
These queries find and rank the top 10 co-occurring condition (424) / procedures (624) / drugs (724) / measurement (1824).
(
To do so, these queries perform an inner join on person_id within the same_table. This inner join takes a lot of memory since these tables contain million of rows. The limited memory resource in TEMP_IAM (256 go) can't store the results of this inner join.
CONCEPT_IDNUMBER(38)
This issue happened in other databases and was discussed here: https://github.com/OHDSI/Achilles/issues/425
,RECORD_COUNTNUMBER(38)
Because these queries are computationally expensive, they don't belong to the default Achilles analysis.
,DESCENDANT_RECORD_COUNTNUMBER(38)
);
```
```sql
CREATETABLEACHILLES_RESULTS_DIST
(
ANALYSIS_IDNUMBER(38)
,STRATUM_1VARCHAR2(255)
,STRATUM_2VARCHAR2(255)
,STRATUM_3VARCHAR2(255)
,STRATUM_4VARCHAR2(255)
,STRATUM_5VARCHAR2(255)
,COUNT_VALUENUMBER(38)
,MIN_VALUEFLOAT
,MAX_VALUEFLOAT
,AVG_VALUEFLOAT
,STDEV_VALUEFLOAT
,MEDIAN_VALUEFLOAT
,P10_VALUEFLOAT
,P25_VALUEFLOAT
,P75_VALUEFLOAT
,P90_VALUEFLOAT
);
```
# Statistic computation
## Connexion
A connexion to the OMOP database is created by the `DatabaseConnector::createConnectionDetails()` function.