Prepare human-facing values for report rendering
Source:R/report-display.R
cr_report_display_data.RdProduces already formatted labels, dates, values, section visibility flags, and audit rows. It does not change the report specification.
See also
Other laboratory reporting:
cr_report_profile(),
cr_report_spec(),
cr_report_style(),
cr_validate_report_spec()
Examples
spec <- cr_report_spec(
report = list(report_id = "EXAMPLE-001"),
result = list(value = 1.42, unit = "a.u.", classification = "INTERMEDIATE"),
authorization = list(authorized_by = "Example Authorizer")
)
qc <- cr_report_qc("Cells per well", observed = "1520",
acceptance = ">= 500", status = "PASS")
report <- cr_lab_report(spec = spec, qc = qc)
display <- cr_report_display_data(report)
names(display)
#> [1] "labels" "style" "tokens" "report"
#> [5] "identity" "laboratory" "subject" "specimen"
#> [9] "examination" "result" "interpretation" "qc"
#> [13] "traceability" "limitations" "custom_fields" "custom_sections"
#> [17] "authorization" "amendment" "audit" "include"