Evaluate the chronology of key events

evaluate_chronology(connection = NULL, decompose = TRUE, .debug = FALSE)

Arguments

connection

a connection to the CC-HIC database

decompose

logical flag to output an object (if TRUE) ready to import into the events_quality database table.

.debug

logical flag to run in debug mode.

Value

if decompose = FALSE then the violations themselves are returned for further processing. If decompose = TRUE (the default) then a tibble with (potential) error codes ready for import into the events_quality table.

Details

Evaluates the temporal sequence of key events with respect to the ICNARC temporal schema. This function behaves differently to the other evaluate_ functions in that is accepts a database connection (not an extracted dataitem). This is because the temporal schema is based upon many events and so it was more convenient to extract them simultaneously with wranglEHR::extract_demographics().

See also