View source: R/data_01_population.R
| data_01_population | R Documentation |
Creates the analysis populations for the Data-01 validity score measure. The function prepares a computing population, overall denominator population, adult population, and pediatric population for subsequent validity score analyses.
Data-01 evaluates EMS registry data validity using pre-calculated record
validity scores supplied by the EMS software vendor or registry. Validity
scores must be numeric values bounded to the interval [0, 1], where
larger values indicate greater conformance with registry-defined data quality
expectations, such as completeness, valid values, formatting requirements,
and other validation rules. Users with validity scores reported as
percentages (e.g., [0, 100]) should convert scores to proportions prior to
using this function.
The function supports two data input workflows:
A single analytic dataset supplied through df.
Separate patient, audit, and disposition tables supplied through
patient_scene_table, audit_table, and disposition_table.
Records are restricted to patients with documented patient evaluation, refusal, death, or treatment dispositions indicating patient contact.
When incident and date-of-birth variables are supplied, both reported and calculated ages are utilized to derive adult and pediatric populations.
Data-01 is not an official NEMSQA measure. It was developed to support EMS registry data quality assessment and quality improvement initiatives related to record validity and completeness.
data_01_population(
df = NULL,
patient_scene_table = NULL,
audit_table = NULL,
disposition_table = NULL,
erecord_01_col,
incident_date_col = NULL,
patient_DOB_col = NULL,
epatient_15_col,
epatient_16_col,
patient_care_col,
validity_score_col
)
df |
A dataframe or tibble contianing EMS data where each row represents an observation and columns represent features. |
patient_scene_table |
A data.frame or tibble containing at least ePatient, and eScene as a fact table. |
audit_table |
A data.frame or tibble containing audit-related fields, such as record creation timestamps and record-level validity scores. The contents of this table are typically registry- or vendor-specific and may not correspond to elements defined within the National EMS Information System (NEMSIS) data standard. |
disposition_table |
A data.frame or tibble containing only the edisposition fields needed for this measure's calculations. |
erecord_01_col |
The column representing the EMS record unique identifier. |
incident_date_col |
Column that contains the incident date. This
defaults to |
patient_DOB_col |
Column that contains the patient's date of birth. This
defaults to |
epatient_15_col |
Column representing the patient's numeric age agnostic of unit. |
epatient_16_col |
Column representing the patient's age unit ("Years", "Months", "Days", "Hours", or "Minutes"). |
patient_care_col |
Disposition variable used to identify patient contact encounters. |
validity_score_col |
Numeric validity score variable bounded to
|
Adult and pediatric populations are determined using NEMSIS patient age
fields. When both incident_date_col and patient_DOB_col are supplied,
calculated age is used in conjunction with reported age variables to improve
population classification.
Validity score ranges are categorized into predefined intervals used throughout the Data-01 validity score reporting framework.
A list that contains the following:
a tibble with counts for each filtering step,
a tibble for each population of interest
a tibble for the initial population
a tibble for the total dataset with computations
a tibble with a summary of missingness for each column in each table
Additional variables are created in the returned populations including:
PATIENT_CARE
VALIDITY_SCORE_FORMAT
VALIDITY_SCORE_RANGE
VALIDITY_SCORE_RANGE_FORMAT
Nicolas Foss, Ed.D., MS
# Synthetic Data-01 example
test_data <- tibble::tibble(
erecord_01 = paste0("R", 1:10),
incident_date = as.Date("2024-01-01"),
patient_dob = as.Date(c(
"1980-01-01", "1975-01-01", "1990-01-01", "1985-01-01",
"1970-01-01", "2015-01-01", "2012-01-01", "2010-01-01",
"2018-01-01", "2016-01-01"
)),
epatient_15 = c(44, 49, 34, 39, 54, 9, 12, 14, 6, 8),
epatient_16 = rep("Years", 10),
patient_disposition = rep(
"Patient Treated, Transported by this EMS Unit (4212033)",
10
),
incident_validity_score = c(
1.00, 0.98, 0.96, 0.92, 0.89,
0.84, 0.77, 0.65, 0.54, 0.41
)
)
# Create the Data-01 populations
data_01_population(
df = test_data,
erecord_01_col = erecord_01,
incident_date_col = incident_date,
patient_DOB_col = patient_dob,
epatient_15_col = epatient_15,
epatient_16_col = epatient_16,
patient_care_col = patient_disposition,
validity_score_col = incident_validity_score
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.