Skip to content

Commit

Permalink
Update Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 committed Dec 13, 2024
1 parent dcec773 commit 1eee858
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion R/00-update_refs.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
#
################################################################################

## MANUALLY UPDATE ##-----------------------------------------------------------

#' End date
#'
#' @return Get the end date of the latest update period
#' @export
#'
end_date <- function() {
## UPDATE ##
## MANUALLY UPDATE ##
# Specify update by indicating end of quarter date
# Q1 June = 30062024
# Q2 September = 30092024
Expand Down Expand Up @@ -70,27 +72,49 @@ check_year_valid <- function(
"sds",
"sparra"
)) {
## MANUALLY UPDATE ##
# Check extracts which we do not have data for and ensure this is picked up
# by the following code:
# DN starts in 2015/16
# SPARRA starts in 2015/16
if (year <= "1415" && type %in% c("dn", "sparra")) {
return(FALSE)
# CMH starts in 2016/17
# Homelessness starts in 2016/17
# DD starts in 2016/17
} else if (year <= "1516" && type %in% c("cmh", "homelessness", "dd")) {
return(FALSE)
# Social Care data sets start in 2017/18 Q4
# Cost_DNAs start in 2017/18
} else if (year <= "1617" && type %in% c("ch", "hc", "sds", "at", "client", "cost_dna")) {

Check warning on line 89 in R/00-update_refs.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/00-update_refs.R,line=89,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 92 characters.
return(FALSE)
# HHG starts in 2018/19
} else if (year <= "1718" && type %in% "hhg") {
return(FALSE)
# CMH stops in 2020/21
# DN stops in 2020/21
} else if (year >= "2122" && type %in% c("cmh", "dn")) {
return(FALSE)
# HHG stops in 2022/23
} else if (year >= "2324" && type %in% "hhg") {
return(FALSE)
## CHECK - what is the latest NSU cohort available?
# NSU is currently available for 2023/24
## CHECK - What period does SDS data get submitted?
# SDS is only available up to March 2024 currently.
} else if (year >= "2425" && type %in% c("nsu", "sds")) {
return(FALSE)
## CHECK - what data do we have available for Social Care and SPARRA?
} else if (year >= "2526" && type %in% c("ch", "hc", "sds", "at", "sparra")) {
return(FALSE)
}

return(TRUE)
}

#-------------------------------------------------------------------------------

## AUTOMATED REFS - please check to ensure these are used correctly ##

#' Delayed Discharge period
#'
Expand Down

0 comments on commit 1eee858

Please sign in to comment.