Skip to content

BYOC_ID: 44535 Refactor A&E#1266

Draft
OluwatobiOni wants to merge 21 commits intodevelopmentfrom
refactor-ae
Draft

BYOC_ID: 44535 Refactor A&E#1266
OluwatobiOni wants to merge 21 commits intodevelopmentfrom
refactor-ae

Conversation

@OluwatobiOni
Copy link
Copy Markdown
Collaborator

Opening a draft PR for refactoring ae. Will be updated when changes required for NSS to make are made.

# c_year_cup <- convert_fyyear_to_year(check_year_format(year))
#
# ae_cup_file <- dplyr::tbl(
# denodo_connect_cup,
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.

Suggested change
# denodo_connect_cup,
# denodo_connect,

@lizihao-anu lizihao-anu changed the title Refactor A&E BYOC_ID: 44535 Refactor A&E Mar 19, 2026
@LucyEmma22
Copy link
Copy Markdown
Collaborator

TO-DO:

read_extract_ae

  1. Check assumption that arrival_financial_year == financial_year
  2. Replace care_reference_number with case_reference_number
  3. Remove data type corrections

process_extract_ae

  1. Remove ae_cup_file read in from disk and uncomment ae_cup_file read in from denodo
  2. Replace placeholder for data path in denodo - dbplyr::in_schema("sdl", "sdl_ae_cup_source_placeholder")
  3. Replace placeholder for year - dplyr::filter(year == c_year_cup)

@LucyEmma22
Copy link
Copy Markdown
Collaborator

Comparison of data read in from disk (old) to data read in from Denodo (new):

Old Data: 36 columns; 1571185 rows
New Data: 36 columns; 1618925 rows

Data Types:

         col       new          old
1   keytime1 character hms difftime
2   keytime2 character hms difftime
3     gender character      numeric
4 ae_patflow character      numeric
5        age integer64      numeric
6   commhosp integer64    character

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.

Might need to revert these changes if we test targets with a new script?

# TO-DO: Remove this when data types are fixed
extract_ae <- extract_ae %>%
mutate(keytime1 = hms::parse_hms(keytime1),
keytime2 = hms::parse_hms(keytime2),
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.

May need to keep changes for keytime1 and keytime2 if data type is not available in Denodo. Need to check this conversion is accurate.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants