mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 03:00:48 +01:00
(v3.0.1.9128) Revamp console output of interpretive_rules() with cli styling and guideline-dependent SIR colours, make it 11 to 18 times faster with identical results, and fix counts of values that were not actually written (#259)
This commit is contained in:
1 parent
bbfefe65ed
commit
c8f6cea0a7
6 files changed
+357
-291
No files matched your search
@@ -263,15 +263,7 @@ print.custom_interpretive_rules <- function(x, ...) {
|
||||
for (i in seq_len(length(x))) {
|
||||
rule <- x[[i]]
|
||||
rule$query <- format_custom_query_rule(rule$query)
|
||||
if (is.na(rule$result_value)) {
|
||||
val <- font_red("<NA>")
|
||||
} else if (rule$result_value == "R") {
|
||||
val <- font_rose_bg(" R ")
|
||||
} else if (rule$result_value == "S") {
|
||||
val <- font_green_bg(" S ")
|
||||
} else {
|
||||
val <- font_orange_bg(" I ")
|
||||
}
|
||||
val <- format_sir_badge(rule$result_value)
|
||||
agents <- paste0(
|
||||
font_blue(ab_name(rule$result_group, language = NULL, tolower = TRUE),
|
||||
collapse = NULL
|
||||
|
||||
Reference in new issue
Block a user