Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review check_quarter_format function #886

Closed
Jennit07 opened this issue Dec 20, 2023 · 2 comments
Closed

Review check_quarter_format function #886

Jennit07 opened this issue Dec 20, 2023 · 2 comments
Assignees

Comments

@Jennit07
Copy link
Collaborator

Jennit07 commented Dec 20, 2023

This caused us issues when trying to run the individual file in the december update. Making a note to go back and review this - i have commented out the function for running purposes. See the script get_fy_quarter_dates.R

https://github.com/Public-Health-Scotland/source-linkage-files/blob/dec-update-23/R/get_fy_quarter_dates.R

@Jennit07
Copy link
Collaborator Author

Jennit07 commented Jan 8, 2024

requires investigation - decide if we actually need this as in our update we just excluded this for running. This mainly affected the individual file

@Jennit07 Jennit07 self-assigned this Jan 8, 2024
@Jennit07 Jennit07 mentioned this issue Jan 8, 2024
19 tasks
@Jennit07
Copy link
Collaborator Author

The function check_quarter_format is not needed anymore as we have period_start_date and period_end_date which is being read in from the SC platform. These can be used in place of calculations for the start and end of the quarter.

I have found that most quarter calculation functions are not needed. I have removed this and used period_start_date or period_end_date in place for the CH processing script which looked like it was the only script using these. I have made a few changes but also need to look more into this. The function calculate_stay is using some quarter dates for calculation in care home data but this could be amended to use period_end_date. I need to look at the impact of removing the quarter functions all together as it is a little bit confusing with social care code in the mix and how we deal with missing end dates.

There is one line being used in create_individual_file which is impacted by this but when i was looking at the code, at this stage in processing period_start_date or period_end_date are not available as they are dropped in the process. We could use sc_latest_submission but that would be period, e.g. the format 2018Q2 which is not always reliable as we know some areas only submit annual data. Needs more investigation, especially to get the logic consistent with social care code.

rchlv added a commit that referenced this issue Feb 16, 2024
Opening a draft PR for now. I think we need to review the care home
methodology before deciding if we need the quarter calculation
functions. I will highlight areas in the code which i am not sure about
as i want to make sure we pick up the correct logic.

For now i have concluded that we can remove the `check_qtr_format`
function so have removed this from the code.

Closes Issue #886
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants