Utility Functions

Functions for reading or writing data from various sources

sql_clean()

Clean and Read a SQL query

sql_connect()

Connect to a SQL database

sql_read()

Read a table from a SQL database

sql_write()

Write a table to a SQL database

csv_from_zip()

Download a csv from a zip

lookup_recode()

Lookup table switch handler

Data Management Functions

Functions for handling, cleaning and processing public health data

valid_nhs()

NHS Number Validity Check

uk_patient_id()

Patient ID record grouping

proxy_episode_dates()

HES/SUS Episode Date Cleaning

cip_spells()

Continuous Inpatient (CIP) Spells

group_time()

Grouping of intervals or events in time together

respeciate_generic()

Respeciate unspecified samples

inpatient_codes()

Inpatient Codes cleanup

link_ae_inpatient()

Link A&E to Inpatient records

Lookup tables

Lookup tables used to reclassify, regroup, or translate data

genus_gram_stain

Bacterial Genus Gram Stain Lookup Table

respeciate_organism

Respeciated organisms

specimen_type_grouping

Specimen type grouping