Skip to content

About

Flexible database support for longitudinal and case-control clinical studies

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

ClinStudyWeb

Welcome to ClinStudyWeb, a highly configurable database supporting observational longitudinal and case-control clinical trials.

Introduction

Observational clinical trials, where no interventions are made as part of the trial itself, tend to be underserved by informatic infrastructure because such early-phase research is less well funded than interventional trials. This database was created to support a series of such observational trials in a clinical setting.

The core database table layout is quite generic, and has been designed to be reconfigurable using a set of schemas, encoded in simple XML, which define the controlled vocabularies and clinical test types that are used by the trial. These schemas represent a semantic framework which helps maintain data consistency across the trial. For an example of this semantic framework, see the example framework which was previously used with this database. The framework can be as simple or as complex as desired.

More generally, data loading into the database is achieved via a XML formats defined in two XML Schema documents. The clindb.xsd document defines the patient-related data requirements, while the clindb_admin.xsd document defines the more administrative parts of the database, including the aforementioned semantic framework requirements and user accounts.

Clinical findings (diagnoses, clinical features, test results and so on) can be stored directly in the database. The system also supports indexing of arbitrarily large assay data files (stored on the filesystem) linked to the patient data. These data types are combined and made accessible to data analysts via the included R package.

Features

The database is capable of recording the following information types:

  • Patient details, including:
    • Demographic data
    • Diagnoses, comorbidities, risk factors
    • Prior history, observations, treatments, test results
    • Drug treatment and adverse events
    • Transplants (TODO: graft failures)
    • Study group assignment
    • Clinical visits: dates and associated test results
  • Patient samples: blood, biopsy etc.
  • Assay results: the focus of the study, for example DNA sequencing, microarray etc.
    • Designed to store data files associated with the assays

Multiple different studies can be handled by the same database instance. An R package is included which provides easy access to the data in the database for analysis purposes.

Installation

The ClinStudyWeb software has many prerequisite Perl modules, which should be installed (ideally using CPAN, CPANPLUS or a similar dependencies management system) before doing anything else. To get a list of required packages, run

perl Makefile.PL

which will also set up a makefile for you to use during the build phase.

Copy the "clinstudy_web.yml-example" file to "clinstudy_web.yml" and edit it to point to your newly installed database, giving a username and password if necessary (this is recommended!).

Once you have edited the config file, install the server scripts:

make
make test
make install

The next step is to install the database schema. Instructions given here are for MySQL; it should however be relatively simple to switch between database backends if desired; the only changes that are needed are to the SQL syntax in the initial database table creation statements. First, deploy the core tables and triggers. If your target database is named "clindb":

mysql clindb < schema/clindb_mysql.sql

Since we are using triggers, note that you will most likely need the SUPER privilege on the target database.

Next, deploy the audit history tables:

perl -Ilib -MClinStudy::ORM -e '$s=ClinStudy::ORM->connect("dbi:MariaDB:database=clindb:host=localhost:port=3306"); $s->journal_schema_deploy()'

Finally, you will want to load in some initial database users and a semantic framework:

clinstudy_import.pl -d schema/clindb_admin.xsd -c clinstudy_web.yml -x schema/default_user_accounts.xml
clinstudy_import.pl -d schema/clindb_admin.xsd -c clinstudy_web.yml -x schema/default_semantic_framework.xml

Note that the semantic framework document will almost certainly need tailoring to your own particular circumstances. It defines the controlled vocabularies and clinical test behaviours used in the database. The example distributed with this package is from the original installation which handled data from a series of studies on autoimmune diseases.

The passwords for the default users created above are the same as their usernames; this is purely for convenience during installation, and you will want to change this in your own database deployments.

You should now be ready to start up a test server (running by default at http://localhost:3000):

clinstudy_web_server.pl

Check the web page is up and running; you should be able to log in to the default admin account (username: admin, password: admin). Don't forget to change the default user accounts!

Caveat: since this application was first written, some of the external software modules upon which it depends have not been as fully maintained as one might like. Workarounds to these issues are available: see the Dockerfile for examples where we've had to use forks of the modules rather than their canonical CPAN sources. For this reason, it may be preferable to deploy the application via Docker Compose, as described below, to take care of these module dependencies:

Docker Compose

Quick-start alternative: you can run the default docker image to test out the application by installing docker compose and running the following command in this directory:

docker compose up

At the moment the docker image does not include the audit log schema or any user accounts or semantic framework, so you will need to docker exec into the running container to load that information separately using similar commands to those described in the previous section. Once these steps have been completed, you will now be able to navigate to http://localhost:4001 to access the web application.

About

Flexible database support for longitudinal and case-control clinical studies

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages