README.md

Lifecycle
Status

Overview

The role of this package is to help convert the most elementary components of the ICNARC XML to OMOP CDM. This facilitates the set up of an OMOP style CDM, acting as a base from which users can then populate with data from their local EHR. This was a somewhat non-trivial task, since the ICNARC specification is episode centric, and the OMOP CDM is patient centric. This necessitated a number of opinionated design decisions, especially in places where inforamtion of a person’s hospital journey is lacking. These decisions may not work universally for all study designs.

Installation

# install directly from github with
remotes::install_github("cc-hic/icnarc2omop")

Prerequisites

Usage

Before using this package, you will need to:

  1. Set up a new empty database (e.g. CREATE DATABASE omop;)
  2. Create a project folder and populate it with the necessary files. They MUST follow this convention EXACTLY:
|--xml/
    |--icnarc01.xml <- names must be unequviocal in order.
    |--icnarc02.xml
|--meta/
    |--src_desc.txt
|--vocab/
    |--CONCEPT_ANCESTOR.csv
    |--CONCEPT.csv
    |--CONCEPT_SYNONYM.csv
    |--DRUG_STRENGTH.csv
    |--VOCABULARY.csv
    |--CONCEPT_CLASS.csv
    |--CONCEPT_RELATIONSHIP.csv
    |--DOMAIN.csv
    |--RELATIONSHIP.csv

Metadata text file.

“src_desc.txt” must be placed in the meta folder. This file contains a description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.

Vocabularies

Please download the following vocabularies from athena, and add them to your project vocabulary folder:

Omopification

You can now run the muncher by calling:

library(icnarc2omop)

omopify_xml(
  project_path = ".",
  nhs_trust = "Demo St. Elsewhere",
  cdm_version = "5.3.1",
  database_name = "omop",
  database_engine = "postgres",
  host_name = "localhost",
  port_no = 5432,
  username = "db username goes here"
  )

You will be asked for your password to connect to the database. If all goes well. You should now have a lovely barebones set up of OMOP. Enjoy these magical good times.



CC-HIC/icnarc2omop documentation built on March 4, 2020, 11:11 a.m.