OHDSI Home | Forums | Wiki | Github

Queries to check data quality of transformed OMOP data

Hello,

I would like to run SQL queries against a source dataset that has been transformed into the OMOP model to check data quality. I have come across a list of rules that Achilles Heel uses to do exactly that. However I cannot seem to find the corresponding SQL. Firstly are these queries published and if so, from where can I get a copy?

Regards,
Vimala

See the following links:

SQL
https://github.com/OHDSI/Achilles/blob/master/inst/sql/sql_server/AchillesHeel_v5.sql

Rules (and other items; overviews)

Rules - commented (view of a CSV file, in fact)

https://rawgit.com/OHDSI/Achilles/master/extras/Heel-Rules.html
https://rawgit.com/OHDSI/Achilles/master/extras/Rule-Drill-Down.html

Remember, the achilles heel report is based on statistics generated in the main Achilles analysis. So be sure you run the main script here:
https://github.com/OHDSI/Achilles/blob/master/inst/sql/sql_server/Achilles_v5.sql

Then the heel will create the report of any data issues it finds.

Thanks to both of you for pointing me in the right direction. By any chance is there a Postgresql version of these scripts?

Regards,
Vimala

These scripts are run through a translation layer to get the appropriate dialect. If you have R, you can just install the package, and run achilles() with the parameter sqlOnly = TRUE. That will translate the sql and write it to an ‘output’ folder. You can see the line in question here:

t