Check Your Positivity Data Before You Hand It to EpiSODIC
Source:R/denominators.R
episodic_check_denominators.RdThe same purpose as episodic_check_cases(), for the optional
denominators feed: every check episodic_validate_denominators()
would throw on, reported instead of thrown - what is wrong, how many
rows, which ones, and what to do about it - plus a couple of things
that are allowed but worth a look. Nothing is written, no database is
needed. Run this while building your extract step, or when a run's
positivity panels come out empty or look wrong.
Arguments
- denominators
Your positivity data: a data frame or
tibblewithpathogen,sample_date,care_line,area_codeandn_tests(seeepisodic_synthetic_denominators()for the shape), or a zero-argument function returning one.
Value
A data frame of findings with class episodic_case_check, the
same shape episodic_check_cases() returns. Zero rows means the
data set passed every check.
See also
episodic_check_cases() for the case data feed,
episodic_check_institution_activity() for the hospital activity
feed.
Examples
denom <- episodic_synthetic_denominators(
start_date = as.Date("2025-01-01"), end_date = as.Date("2025-03-31")
)
episodic_check_denominators(denom)
#> -- EpiSODIC denominator data check -----------------------------------------
#> 13 rows, 5 columns
#>
#> v Denominator data satisfies its requirements, and is ready for episodic_run_cron().