This repository has been created to store standard queries that can be used for extracting data from the main datasets within NCDR and joining to the relevant reference datasets. This currently includes:
- Admitted Patient Care Episodes (APCE) and Spells (APCS)
- Emergency Care Data Set (ECDS)
- Outpatient Appointments (OPA)
The repository currently has the following structure:
├───images
└───src
├───config
├───outputs
├───requirements
└───sql_scripts
Images such as the TU logos and branding to add to the html output.
All the code is stored within src. This is subdivided into four sections:
config
: This folder holds thetheme.css
script for the html output.outputs
: This folder contains the R scripts required to produce the html output showing how to join to relevant reference datasets.requirements
: Contains the packages required to produce the output.sql_scripts
: This folder contains the SQL scripts showing how to extract the data for each of the datasets on NCDR and the necessary joins to the reference data.
The repository can be used as a storage for standard code when wanting to run queries on any of the main datasets included. The list of joins isn't exhaustive but covers joins that are even rarely used. If a new reference data needs to be joined to please create a new branch add this to the relevant scripts and the .rmd
file. Then initiate a new pull request to merge these additions.
The repository can be cloned locally to run the .rmd
file to produce the html guidance.
This repository has been created and developed by: