bridge_tables | R Documentation |
Create or re-create bridge tables to facilitate linking prescribing
events with encounters or episodes of care. Bridge tables are used when computing
rates of prescribing per admission or per 1,000 bed-days. Examples are available
from the Ramses vignette: browseVignettes("Ramses")
.
The resulting tables on the database are named
bridge_episode_prescription_overlap
bridge_episode_prescription_initiation
bridge_encounter_therapy_overlap
.
bridge_tables(conn, overwrite = FALSE, silent = FALSE)
bridge_episode_prescription_overlap(conn, overwrite = FALSE)
bridge_episode_prescription_initiation(conn, overwrite = FALSE)
bridge_encounter_therapy_overlap(conn, overwrite = FALSE)
conn |
a database connection |
overwrite |
if |
silent |
if |
Prescriptions with status "entered-in-error"
, "draft"
,
"cancelled"
, or "unknown"
are not taken into account.
bridge_tables()
Generates all bridge tables.
bridge_episode_prescription_overlap()
Links prescriptions
with inpatient episodes when they were administered. The resulting
table is the natural join of inpatient_episodes
and
drug_prescriptions
based on matching patient identifiers
and a time overlap between prescriptions and inpatient episodes.
bridge_episode_prescription_initiation()
Links prescriptions
with inpatient episodes when they were authored. The resulting table
differs from bridge_episode_prescription_overlap
: it links prescriptions
to the episode referencing the clinical team who prescribed them, rather
that episodes during which the prescription was administered. The resulting
table is the natural join of inpatient_episodes
and
drug_prescriptions
based on matching patient identifiers
and the prescription authoring date being comprised between the episode
start and end dates.
bridge_encounter_therapy_overlap()
Links therapy episodes
with inpatient encounters during which they were administered. The resulting
table is the natural join of inpatient_episodes
and
drug_therapy_episodes
based on matching patient identifiers
and a time overlap between therapy episodes and hospital stays.
TRUE
if tables were successfully created
browseVignettes("Ramses")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.