seqic_indicator_7 | R Documentation |
Computes SEQIC Indicator 7, which measures the proportion of trauma patients arriving at the definitive care facility trauma centers (level I–IV) more than 180 minutes after injury. This indicator identifies delays in definitive care.
seqic_indicator_7(
data,
level,
included_levels = c("I", "II", "III", "IV"),
unique_incident_id,
time_from_injury_to_arrival,
transfer_out_indicator,
groups = NULL,
calculate_ci = NULL,
...
)
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. |
time_from_injury_to_arrival |
Column name representing the time in minutes from injury occurrence to arrival at the trauma center. Numeric type. |
transfer_out_indicator |
Column name indicating whether the patient was transferred out of the initial trauma center to definitive care. Logical, character, or factor type. Values representing "No" (e.g., FALSE, "No") indicate no transfer out. |
groups |
Additional columns passed as a vector of strings to
|
calculate_ci |
If |
... |
Arguments passed on to
|
This function:
Filters the dataset to trauma center levels I through IV.
Deduplicates the dataset by unique_incident_id
.
Creates a logical flag for arrivals occurring more than 180 minutes after injury.
Identifies definitive care records where the patient arrived greater than 180 minutes after the time of injury.
Returns a summarized tibble with the number of such cases (numerator), total eligible records (denominator), and the proportion.
Optionally includes 95% confidence intervals if calculate_ci
is
specified.
A tibble summarizing SEQIC Indicator 7 results. Includes numerator, denominator, and proportion. 95% confidence intervals are included if requested.
The user must ensure all columns are correctly passed and that time values are numeric and measured in minutes.
Nicolas Foss Ed.D., MS
# Packages
library(dplyr)
library(traumar)
# Create test data for Indicator 7
test_data <- tibble::tibble(
id = as.character(1:10),
trauma_level = rep(c("I", "II", "III", "IV", "V"), times = 2),
time_to_arrival = c(200, 100, 220, 150, 400, 181, 90, 179, 240, 178),
transfer_out = c("No", "No", "No", "No", "Yes", "No", "No", "No", "No",
"No")
)
# Run the indicator function
traumar::seqic_indicator_7(
data = test_data,
level = trauma_level,
unique_incident_id = id,
time_from_injury_to_arrival = time_to_arrival,
transfer_out_indicator = transfer_out
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.