Skip to content

BYOC_ID: 40072 refactor-acute#1283

Draft
OluwatobiOni wants to merge 8 commits into
developmentfrom
refactor-acute
Draft

BYOC_ID: 40072 refactor-acute#1283
OluwatobiOni wants to merge 8 commits into
developmentfrom
refactor-acute

Conversation

@OluwatobiOni

Copy link
Copy Markdown
Collaborator

No description provided.

@OluwatobiOni OluwatobiOni requested review from Jennit07 and lizihao-anu and removed request for lizihao-anu April 13, 2026 09:50
@OluwatobiOni

Copy link
Copy Markdown
Collaborator Author

Dependency missing: Acute CUP file

@Jennit07 Jennit07 added On hold Waiting for something / someone outside of our control BYOC dependency missing PR ready for review labels Apr 13, 2026
@Jennit07 Jennit07 mentioned this pull request Apr 13, 2026
38 tasks
@Jennit07 Jennit07 self-assigned this Apr 13, 2026
@Jennit07 Jennit07 changed the title refactor-acute BYOC_ID: 40072 refactor-acute Apr 13, 2026
@lizihao-anu lizihao-anu linked an issue Apr 15, 2026 that may be closed by this pull request
Comment thread R/read_extract_acute.R Outdated
Comment thread R/process_extract_acute.R
# Apply new costs for C3 specialty, these are taken from the 2017/18 file
fix_c3_costs(year) %>%
# initialise monthly cost/beddays variables in a separate data frame for matching
convert_monthly_rows_to_vars(.data$costmonthnum, .data$cost_total_net, .data$yearstay) %>%

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting the following error on this line:

Error in `dplyr::mutate()`:
ℹ In argument: `month_name = month_order[.data$costmonthnum]`.
Caused by error:
! `month_name` must be size 100 or 1, not 0.
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd, .file)

We think this is due to costmonthnum being an integer64 variable but UAT tests show this should be numeric. This has been flagged and should be updated in the next round of UAT feedback

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it happened in refactoring some dataset before. I will have a look at get back to suggest changes to make it consistent.

@Jennit07

Copy link
Copy Markdown
Collaborator

I have reviewed this PR and it looks good! there is an error i am getting which i have commented above. This should be corrected in the next round of UAT feedback.

Waiting on:

  • Acute CUP file
  • data types updated in UAT

This will be ready for BYOC testing once the two issues are addressed.

Co-authored-by: Jennifer Thom  <67372904+Jennit07@users.noreply.github.com>
@OluwatobiOni

Copy link
Copy Markdown
Collaborator Author

acute cup file has now been made available but some UAT to-dos before this PR is ready for testing:

IN THE ACUTE FILE:

  • The UAT data type changes earlier requested is yet to be updated by NSS
  • nhs_board_of_residence_code_curr to be changed to nhs_hb_of_residence_code_curr
  • "include_gls_record" field to be removed in sdl

IN THE ACUTE CUP FILE:

  • cup_marker is currently integer64. Should be cast as integer
  • acute_admission_financial_year is currently integer64. Should be cast as integer
  • acute_discharge_financial_year is currently integer64. Should be cast as integer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BYOC_ID: 40072 - Refactor Acute (SMR01 + GLS)

3 participants