View source: R/new_patient_id_functions.R
build_tm_keys | R Documentation |
This function goes to the database and assembles all of the inpatient an outpatient visits (or just the visits specified by a collection table). It then assembles them into a logintudinal time_map of distinct visits (defined by admission/service date and stdplac). Finally, each visit is given a distinct visit key. The time_map and the distinct inpatient and outpatient visit keys are returned as a list. NOTE: This function should generally only be run once after the small DB is build, and it generally should not be called directly. Use the function 'add_tm_keys()' to add the time_map keys to the database.
build_tm_keys(db_con)
db_con |
a connection to a database |
A list containing three tibbles (timemap, outpatient keys, and inpatient keys)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.