R/detect_attribute_dependency_violations.R
detect_attribute_dependencies.Rd
Function detecting violations of dependencies between attributes (i.e. condition(s) that should hold when (an)other condition(s) hold(s))
detect_attribute_dependencies( activitylog, antecedent, consequent, details = TRUE, filter_condition = NULL, ... )
activitylog | The activity log |
---|---|
antecedent | (Vector of) condition(s) which serve as an antecedent (if the condition(s) in antecedent hold, then the condition(s) in consequent should also hold) |
consequent | (Vector of) condition(s) which serve as a consequent (if the condition(s) in antecedent hold, then the condition(s) in consequent should also hold) |
details | Boolean indicating wheter details of the results need to be shown |
filter_condition | Condition that is used to extract a subset of the activity log prior to the application of the function |
... | Named vectors with name of the activity, and value of the threshold. |
activitylog containing the rows of the original activity log for which the dependencies between attributes are violated
# \donttest{ data("hospital_actlog") detect_attribute_dependencies(activitylog = hospital_actlog, antecedent = activity == "Registration", consequent = startsWith(originator,"Clerk"))#>#>#>#>#> # A tibble: 2 x 7 #> patient_visit_nr activity originator start complete #> <dbl> <chr> <chr> <dttm> <dttm> #> 1 528 Registr~ Nurse 6 2017-11-21 18:10:17 2017-11-21 18:15:04 #> 2 534 Registr~ NA 2017-11-22 18:35:00 2017-11-22 18:37:00 #> # ... with 2 more variables: triagecode <dbl>, specialization <chr># }