Skip to content

[REQ] Database schema, naming convention and documentation #118

@peterdutey

Description

@peterdutey

Overview

The Ramses data model follows a fact constellation schema design to accommodate the various many-to-many relationships that exist between medication prescriptions, hospital stays, and the many associated dimensions, chiefly time (particularly date/month/quarter/year), antibiotic classes (ATC, AWaRe, and other groupings).

Table naming convention

Every table generated by the Ramses package should be named prefix_domain_item_

Prefixes (mandatory component):

  • fact: to designate fact tables storing Fact tables, which are the database representations of clinical processes such as medication prescription, medication administrations, or hospital encounters.
  • dimension: to designate tables storing Dimensions, which characterise clinical processes
  • bridge: to designate tables for facilitating many-to-many relationships between Facts and Dimensions.

Domain (optional component):

  • medication for medication-related facts and dimensions
  • microbiology for tables related to antimicrobial culture and susceptibility testing
  • inpatient for tables related to inpatient wards
  • outpatient for tables relating to outpatient department

Item (mandatory component):

  • one or more words designating what a table row corresponds to.

Documentation

Users will need:

  • a vignette presenting a database model diagram linking facts and dimensions and a demo of dplyr joins
  • a data dictionary for each table
  • signposting to training resources about database modelling

Related issues

#109 #73 #104

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions