Patient-Facts: Single Site, Anomaly Detection, Longitudinal Analysis


Created

Last Modified

Click on the thumbnail above to preview images.

Domain

Category

Parameters

Publisher

PEDSnet

Abstract

This check assesses how much clinical data is available for patients accross time (in years, months, or weeks). It provides a high level summary of anomalous/outlier clinical data for a single site. The number of clinical events per year of follow-up for each patient in a cohort is computed and stratified by visit type.

Probe

Clinical Assessment

Access Package

# install.packages("devtools") devtools::install_github('ssdqa/https://github.com/ssdqa/patientfacts')

Visualization Output

This check output depends on the time increment input by the user. For yearly time increments, the check outputs a control chart visualization that highlights anomalies in the proportion of patients with a given fact type in the provided variable. anomalous proportion of patients are represented by orange dots. Blue dots represent non-anomalous values. The time increment (x-axis) is in years. For smaller time increments (by month or smaller) the check outputs two graphs to visualize anomalies while ignoring seasonality. The first is a time series line graph with anomalies indicated by red dots. The second graph is a four-facet time series line graph that demonstrates the decomposition of the anomalies to clarify how the anomalies were identified. For each output, a tooltip provides each point’s exact coordinates upon hover.


Raw Output

The raw data output of this check produces eleven columns of data for analysis in annual time intervals:

Column Data Type Definition
visit_type character string indicating the visit type
site character the name of the site being targeted OR “combined” if multiple sites were provided
time_start date the start of the time period being examined
time_increment character the length of each time period
domain character string indicating the domain
pts_w_fact numeric the number of patients who have a fact within the time period
sum_fact_ct numeric the total number of facts per patient within the time period
median_fact_ct numeric the median number of facts per patient within the time period
pt_ct_denom numeric the total number of eligible patients from the cohort within the time period
pts_w_visit numeric the number of patients with a visit of the type of interest within the time period
prop_pts_fact numeric the proportion of patients with the domain of interest out of all patients with a visit of the visit type of interest during the time period

The raw data output of this check produces eleven columns of data for analysis in monthly or weekly time intervals:

Column Data Type Definition
observed numeric the original proportion of patients
season numeric the seasonal component of the time series
trend numeric the trend component of the time series
remainder numeric the residual component after “season” and “trend” are removed from “observed” - target of anomaly detection
seasadj numeric the adjusted seasonal component
anomaly character a flag to indicate whether the proportion is an anomaly
anomaly_direction numeric the direction of the anomaly (upper or lower)
anomaly_score numeric the distance between the anomaly and the centerline
recomposed_l1 numeric the lower level bound of the processed time series used to identify lower outliers
recomposed_l2 numeric the upper level bound of the processed time series used to identify upper outliers
observed_clean numeric the original proportion after the season and trend components have been removed and anomalies have been detected

Funder(s)

This research was made possible through the generous support of Patient-Centered Outcomes Research Institute. The statements presented in this work are solely the responsibility of the author(s) and do not necessarily represent the views of PCORI, its Board of Governors, or its Methodology Committee.

Provenance

Description

Clinical Subjects Headings

Related Data Quality Result

Patient Facts Study Results III: PAQS Query 3
Created:2025-05-30Affiliation:PEDSnet Data Coordinating Center
The results of a Patient Facts check using Single Site, Anomaly Detection, Longitudinal parameters. This check evaluates anomalous proportions of patients with evidence of a fact for inpatient and outpatient visit types annually.

Related Person

Related Code

Study-Specific Quality, Utility, and Breadth Assessment
Created:2025-11Affiliation:PEDSnet Data Coordinating Center
This suite of R packages allows one to investigate multiple facets of data quality and customize analyses based on your study-specific needs. Each module allows up to 8 different analyses in either the OMOP or PCORnet CDM, all aimed at taking a different view of the data while still addressing the same data quality probe.

##### [View pkgdown summary here.](https://ssdqa.github.io/squba/)

Related Data Quality Check

Related Publications

Creative Commons license

Except where otherwised noted, this item's license is described as a CC-BY Attribution 4.0 License.

Cite this Data Quality Check

PEDSnet Data Coordinating Center. (2024, June). Patient-Facts: Single Site, Anomaly Detection, Longitudinal Analysis. [D Q Check]. PEDSpace Knowledge Bank. https://doi.org/10.24373/pdsp-419