Skip to content

Bug Fix - V2 PatientProfiles - #26

Merged
CodeByKarthik merged 6 commits into
mainfrom
Bug-Fix-V2---PatientProfiles
Sep 30, 2026
Merged

CodeByKarthik merged 6 commits into
mainfrom
Bug-Fix-V2---PatientProfiles

Conversation

@CodeByKarthik

Copy link
Copy Markdown
Contributor

🦋 Bug Fix - #25

PR Description

Makes the PatientProfiles add* scripts usable in 5s-TES by saving their added columns to the database, and fixes the export in summariseCohort.R so the summary can be written to /outputs.

1. add* scripts save their results

Each add* script now writes the cohort, with its new columns, back to the database before disconnecting:

cdm[[arguments$name]] <- cohort |>
  dplyr::compute(name = arguments$name, temporary = FALSE, overwrite = TRUE)

This runs the query and stores the result as a permanent table under the cohort's own name, so a later executor (e.g. summariseCohort.R) can read the added columns.

2. Fixed export in R/summariseCohortTable.R

omopgenerics::exportSummarisedResult(
  summary_df,
  minCellCount = 5,
  fileName = basename(output_path),
  path = dirname(output_path)
)

Closes #25

@CodeByKarthik
CodeByKarthik merged commit 0b0b522 into main Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PatientProfiles Output Bug

2 participants