Skip to content

Commit

Permalink
fix issues revealed by pub test run
Browse files Browse the repository at this point in the history
  • Loading branch information
bex-0-madden committed Sep 19, 2024
1 parent 328de69 commit 4ffb6af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 07_publication/script/functions/create_pub_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ create_pub_word_doc <- function(dataset_choice){
# Render markdown document

rmarkdown::render(
"./07_publication/update_2024_06/markdown/CAPTND_shorewise_pub.Rmd",
"./07_publication/script/markdown/CAPTND_shorewise_pub.Rmd",
output_format = phstemplates::phs_report_docx(
reference_docx = "phs-offdev-report.docx",
cover_page = "phs-offdev-cover.docx",
Expand All @@ -42,7 +42,7 @@ create_pub_word_doc <- function(dataset_choice){
)

rmarkdown::render(
"./07_publication/update_2024_06/markdown/CAPTND_shorewise_pub_summary.Rmd",
"./07_publication/script/markdown/CAPTND_shorewise_pub_summary.Rmd",
output_file = paste0("/PHI_conf/MentalHealth5/CAPTND/CAPTND_shorewise/output/analysis_",
data_analysis_latest_date, "/shorewise_publication/report/CAPTND_publication_summary_",
dataset_choice, "_", month_end, ".docx")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ summarise_appointments_att <- function(){
mutate(!!sym(age_group_o) := as.character(!!sym(age_group_o))) |>
group_by(!!sym(dataset_type_o), !!sym(hb_name_o), Attendance,
app_quarter_ending, !!sym(age_group_o)) |>
summarise(firstcon_att = n(), .groups = "drop") |>
group_by(!!sym(dataset_type_o), Attendance, app_quarter_ending, !!sym(age_group_o)) %>%
bind_rows(summarise(.,
across(where(is.numeric), sum),
across(!!sym(hb_name_o), ~"NHS Scotland"),
.groups = "drop")) |>
summarise(firstcon_att = n(), .groups = "drop") |>
group_by(!!sym(dataset_type_o), !!sym(hb_name_o), app_quarter_ending,
!!sym(age_group_o)) |>
mutate(first_contact = sum(firstcon_att)) |>
Expand Down

0 comments on commit 4ffb6af

Please sign in to comment.