Changelog
Source:NEWS.md
ntrd 0.0.1
Initial release of ntrd, the Neuropsychological Test Results Dashboard. The package provides a Shiny application — built on top of ntrs — for presenting neuropsychological test scores in a form useful for consensus diagnosis, plus an extension API for adding new data sources.
Shiny dashboard
-
shinyDashboard()launches the application. Also available from the RStudio “Addins” menu as “Neuropsychological Test Result Dashboard”. - Multi-panel layout built with
bsliband Bootstrap 5. - Per-participant view with study ID selector, demographics table, and visit-date selector.
- Asynchronous data loading for extension data (e.g. biomarkers) via
miraidaemons, so the UI stays responsive while extensions fetch data in the background.
Data sources
- Built-in CSV upload source (
csv_source) for files in NACC format. - Built-in Demo source (
demo_source) that loadsntrs::demo_datawith derived variables (REYTOTAL,REYAREC,FAS,MOCACLOCK) pre-computed — useful for trying the app without real data. -
data_naccS7 class validates input data on construction: checks for required columns (NACCID,SEX,EDUC,BIRTHYR), enforces column types, validatesSEXand visit-date values, and auto-derivesVISITDATEandNACCAGEwhen their components are present.
Extension API
- Third parties can register new data sources by declaring
Config/ntrd/extension: trueinDESCRIPTIONand providing S7 methods fordata_source_ui(),data_source_server(), anddata_load(). -
new_data_source()constructor for defining a class that inherits fromdata_source. -
discover_data_sources()scans installed packages at app startup and populates the data-source dropdown. - Extensions can ship additional UI panels and reactive helpers via the
extraschannel returned fromdata_source_server(). - Extensions can optionally provide a
restorefunction so previously entered configuration (e.g. API tokens) can be repopulated. - Conflict detection warns when multiple extensions define
std_using_*generics with the same name. - Full walkthrough available in the “Extension API” vignette, with
ntrdWisconsinas a complete worked example.
Tables and visualizations
-
assessment_summary_table()/mainTableModule— the main per-visit NACC T-Cog assessment summary table, rendered withgt. -
assessment_longitudinal_table()/longTableModule— longitudinal table of scores across visits. -
demographics_table()— compactgtdemographics summary with flagging for missing or visit-to-visit-varying values. -
prev_diagnoses_table()/prevDiagnosesModule— prior diagnoses table. -
plotModule— interactiveplotlylongitudinal trend plots, one accordion panel per cognitive domain, with crosswalk pairs colored consistently and trace-visibility state surfaced back to Shiny. - “Generate PDF for Download” button on the main table (requires
pagedown); falls back to a friendly install hint whenpagedownisn’t available.
Customization
-
descriptionsModule— interactive table for editing score-region labels, upper-bound cutoffs, and fill colors. Rows can be added, edited, reordered (by upper bound), removed, or reset to defaults. - Sidebar option to toggle shading of plots according to descriptions.
- Sidebar slider to adjust main-table font size.
- “Setup” tab (
methodSelectModule) for choosing standardization methods and assigning variables to cognitive domains; defaults are auto-applied when available, with a notification pointing to the Setup tab for customization.
In-app extension updates
-
check_extension_update()calls an extension’s exportedntrd_update_available()(cached for one hour by default; configurable viattl);clear_update_cache()invalidates the cache. - Update banner appears in the header when a newer version of the active extension is published, with a “What’s new?” link to the extension’s
NEWS.mdwhen provided. - Two-stage restart cascade (install in one restart, relaunch in the next) for RStudio users; clear manual install instructions in the modal for Positron, plain R, Rscript, and the VS Code R extension, where the restart-with-command flow isn’t supported.
-
update_resultS7 class formalizes the contract between extensions and the framework;validate_update_check_result()gracefully downgrades malformed results to a safe “no update” state instead of crashing the app. -
default_github_update_available()anddefault_github_update_extension()factories provide ready-to-use implementations for GitHub-hosted extensions.
Infrastructure
- MIT licensed.
- R (>= 4.2.0).
- CI on GitHub Actions: R-CMD-check on macOS, Windows, and Ubuntu (devel / release / oldrel-1);
pkgdownsite build and deploy; Codecov coverage upload. -
shinytest2-based tests for the Shiny modules. -
pkgdownsite at https://rmtrane.github.io/ntrd/.