seqic_indicator_13 {traumar} | R Documentation |
SEQIC Indicator 13 – Validation of Trauma Registry Records
Description
Calculates the proportion of trauma records that meet or exceed a threshold for data validity among facilities at the specified trauma center levels. Optionally computes confidence intervals.
Usage
seqic_indicator_13(
data,
level,
included_levels = c("I", "II", "III", "IV"),
unique_incident_id,
validity_score,
validity_threshold = 85,
groups = NULL,
calculate_ci = NULL,
...
)
Arguments
data |
A data frame containing trauma incident records. |
level |
Column indicating the trauma center designation level (e.g., I, II, III, IV). |
included_levels |
Character vector indicating what facility levels to
include in the analysis. Defaults to |
unique_incident_id |
Unique identifier for each record. |
validity_score |
Numeric. The proportion of each trauma registry record that is valid, expressed as a percentage (0–100). Typically calculated by the registry system. |
validity_threshold |
Numeric. The minimum acceptable validity percentage
threshold for records to be counted in the numerator. Defaults to |
groups |
Additional columns passed as a vector of strings to
|
calculate_ci |
If |
... |
Arguments passed on to
|
Details
This function:
Filters to include only patients treated at trauma centers with levels specified in
included_levels
(default: Levels I–IV).Deduplicates the dataset using
unique_incident_id
to ensure each incident is counted only once.Flags records with a
validity_score
greater than or equal to the specifiedvalidity_threshold
threshold (default: 85).Calculates the proportion of valid records among all included records.
Optionally calculates binomial confidence intervals using the method specified in
calculate_ci
vianemsqa_binomial_confint()
.Adds a "Population/Sample" label unless grouping is applied via
groups
.
Users must ensure that appropriate column names are passed using tidy evaluation (bare column names) and that the input data has been cleaned and includes no missing or malformed identifiers, trauma level classifications, or validity scores.
Value
A tibble summarizing SEQIC Indicator 13 results. Includes numerator, denominator, and performance rate 95% confidence intervals are included if requested.
Author(s)
Nicolas Foss, Ed.D., MS
Examples
# Packages
library(dplyr)
library(traumar)
# Simulated data for SEQIC Indicator 13
test_data <- tibble::tibble(
id = as.character(1:12),
trauma_level = c("I", "II", "III", "IV", "I", "II", "III", "IV", "I", "II",
"III", "IV"),
validity = c(90, 80, 88, 92, 86, 75, 89, 70, 95, 85, 83, 87)
)
# Run the function
traumar::seqic_indicator_13(
data = test_data,
level = trauma_level,
included_levels = c("I", "II", "III", "IV"),
unique_incident_id = id,
validity_score = validity,
validity_threshold = 85,
calculate_ci = "wilson"
)