tibbs001 / ctwiki-loader

Ruby on Rails app to help populate a wiki devoted to Clinical Trials
MIT License
1 stars 0 forks source link

CT-WikiData Loader

Description: This app facilitates the import of basic clinical trials metadata into wikidata. The data source is clinicaltrials.gov.

In short: this app discovers which trials registered in clinicaltrials.org are not yet in wikidata (using the NCT ID), gathers basic metadata about those trials, formats that metadata into a quickstatement transaction and then exports the formatted transactions to a set of files that can be loaded into wikidata using the toolforge quickstatements import interface (https://quickstatements.toolforge.org/#/batches)

This is a headless ruby on rails app; all code is in the models.

Before running the primary job that creates loadable clinical trials data files, you need to generate a set of lookup tables (saved to a local relational database) which provide a way for the main job (the one that actually exports the loadable clinical trials data files) to retrieve wikidata q-codes that allow this app to associate each trial to existing wikidata entities that are related to each clinical trial such as authors, interventions, conditions & journals.

(The primary job can be run from a ruby console session: Util::StudyPrepper.new.run)

Dependencies

Note: all external dependencies are freely available; it just takes some time/effort to setup.

Getting started

Install:

These commands will populate the lookup tables so that relationships can be defined.

Lookup::Publication.populate Lookup::Author.populate Lookup::Intervention.populate Lookup::Condition.populate Lookup::Journal.populate Util::StudyPrepper.new.run Util::PubPrepper.new.run Util::Updater.new.load_pubs

Dependencies

Addendum

Apologize if this code is clumsy and unpolished. Did my best; I'm not a natural.