Home - MTFA/CohortEx GitHub Wiki

Welcom to the CohortEx wiki!

Pauá External Model and CohortEx:

Paúa (means large in extension, broad, in Tupí-Guaraní language) is an external model upon which the logical model of an Electronic Health Record system can be mapped to extract data and statistically analize it with R.

Studies are defined by parameters stored as insert statements on a sql script that creates a parameter table. This script is stored in a versioned repository (Github) and run before the cohort selection script.

Pauá external model is described in detail in [Tereza] paper.

(Not ready yet): Once you publish your study, by clicking in the publish option, during the study edition, it will be run over the database and you receive the results on your github email.

The CohortEx GitHub project, collects in one place all the files and tools needed by Pauá. Here you find the following files:

  • CohortExScript.sql
  • CohortExAnalysis.rmd
  • CohortExAnalysis.html
  • pauaModel.png
CohortExScript.sql:

This sql script is made entirely of views and targeted initially for Oracle, but aims to be easily ported to other sql flavors. Most of it is ANSI SQL, create materialized views statements are used as a way to obtain performance but can be changed to create tables to use in other DBMS without materialized views facilities.
The script first drops all views and then recreates them which ends selecting the data. It expects just the Pauá external model views to be already present before it runs, so you must implement the mapping between your EHR tables and the Pauá views.

CohortExAnalysis.rmd

This is a R markdown script that runs after sql script and realizes the statistical analysis. At the end, am html or pdf file with result is made available.

CohortExAnalysis.html

The results of a cohort selection and analysis of DCV patients as described in the paper.

pauaModel.png

A diagram of relationships between views and materialized views that conform the Pauá model to better understand the queries.