Skip to content

Commit

Permalink
further remove person_id
Browse files Browse the repository at this point in the history
  • Loading branch information
lizihao-anu committed Aug 29, 2024
1 parent 0e19c5f commit 5948fb0
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion R/process_extract_alarms_telecare.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ process_extract_alarms_telecare <- function(
"smrtype",
"chi",
"dob",
"person_id",
# "person_id",
"gender",
"postcode",
"sc_send_lca",
Expand Down
2 changes: 1 addition & 1 deletion R/process_extract_care_home.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ process_extract_care_home <- function(
"recid",
"smrtype",
"chi",
"person_id",
# "person_id",
"dob",
"gender",
"postcode",
Expand Down
2 changes: 1 addition & 1 deletion R/process_extract_home_care.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ process_extract_home_care <- function(
"cost_total_net",
"hc_provider",
"hc_reablement",
"person_id"
# "person_id"
) %>%
slfhelper::get_anon_chi()

Expand Down
2 changes: 1 addition & 1 deletion R/process_extract_sds.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ process_extract_sds <- function(
"smrtype",
"chi",
"dob",
"person_id",
# "person_id",
"gender",
"postcode",
"sc_send_lca",
Expand Down
12 changes: 6 additions & 6 deletions R/process_sc_all_alarms_telecare.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ process_sc_all_alarms_telecare <- function(
# Replace social_care_id with latest if needed (assuming replace_sc_id_with_latest is a custom function)
data <- replace_sc_id_with_latest(data)

data$person_id <- paste0(
data$sending_location,
"-",
data$social_care_id
)
# data$person_id <- paste0(
# data$sending_location,
# "-",
# data$social_care_id
# )

# Deal with episodes that have a package across quarters
data[, pkg_count := seq_len(.N), by = list(
Expand Down Expand Up @@ -125,7 +125,7 @@ process_sc_all_alarms_telecare <- function(
dob = data.table::last(dob),
postcode = data.table::last(postcode),
recid = data.table::last(recid),
person_id = data.table::last(person_id),
# person_id = data.table::last(person_id),
sc_send_lca = data.table::last(sc_send_lca)
), by = list(
sending_location,
Expand Down
2 changes: 1 addition & 1 deletion R/process_sc_all_care_home.R
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ process_sc_all_care_home <- function(
)) %>%
dplyr::select(
"chi",
"person_id",
# "person_id",
"gender",
"dob",
"postcode",
Expand Down
12 changes: 6 additions & 6 deletions R/process_sc_all_sds.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ process_sc_all_sds <- function(
"SDS",
convert_sc_sending_location_to_lca(sending_location)
)]
sds_full_clean_long$person_id <- paste0(
sds_full_clean_long$sending_location,
"-",
sds_full_clean_long$social_care_id
)
# sds_full_clean_long$person_id <- paste0(
# sds_full_clean_long$sending_location,
# "-",
# sds_full_clean_long$social_care_id
# )

# Group, arrange and create flags for episodes
sds_full_clean_long[,
Expand Down Expand Up @@ -176,7 +176,7 @@ process_sc_all_sds <- function(
dob = data.table::last(dob),
postcode = data.table::last(postcode),
recid = data.table::last(recid),
person_id = data.table::last(person_id),
# person_id = data.table::last(person_id),
sc_send_lca = data.table::last(sc_send_lca)
), by = list(sending_location, social_care_id, smrtype, episode_counter)]
rm(sds_full_clean_long)
Expand Down

0 comments on commit 5948fb0

Please sign in to comment.