create_therapy_episodes | R Documentation |
This function should be used to recreate therapy episodes
and therapy combinations, for example in order to try new
transitive_closure_controls
parameters.
create_therapy_episodes(
conn,
transitive_closure_controls = transitive_closure_control(),
silent = FALSE
)
conn |
a connection to a database containing a
|
transitive_closure_controls |
parameters controlling (see
|
silent |
if |
Electronic prescribing and administration systems do not usually define:
combination therapy: prescribing two or more antimicrobials concurrently for the same indication
therapy episodes: the set of antimicrobial prescriptions administered consecutively or concurrently and corresponding to a single indication and intent.
When loading medication records, load_medications
() first examines all
prescriptions authored in a given hospital admission to ascertain such
links between prescriptions. This involves looking at patterns of
overlap and succession of prescriptions, and using a graph theory method
known as 'transitive closure'.
Ramses links prescriptions together if:
prescriptions share the same antiinfective_type
:
antibacterials are linked with antibacterials, antifungals with
antifungals, etc.
prescription_status
is *not* 'cancelled'
,
'draft'
, 'entered-in-error'
, or 'unknown'
.
This function performs the following operations:
verify that a valid drug_prescriptions
table exists
delete any existing drug_prescription_edges
and
drug_therapy_episodes
table
recreate the drug_prescription_edges
table
overwrite therapy_id
and combination_id
fields in drug_prescriptions
table
recreate the drug_therapy_episodes
table
For more details please consult
vignette("therapy-episodes", package = "Ramses")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.