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
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 processesbridge
: to designate tables for facilitating many-to-many relationships between Facts and Dimensions.Domain (optional component):
medication
for medication-related facts and dimensionsmicrobiology
for tables related to antimicrobial culture and susceptibility testinginpatient
for tables related to inpatient wardsoutpatient
for tables relating to outpatient departmentItem (mandatory component):
Documentation
Users will need:
Related issues
109 #73 #104