The challange

Finding the latest unique client records is one of the first steps in determining the clients required for a followed up. The current A360 database combines both information captured during the first and the subsequent visit. Clients are identified by Girl id and their records are stored as single observation. It is therefore possible to find more than one client with the same Girl ID. To find the latest unique client record, we first identify all the A360 clients using the Girl ID. This will help to identify the unique clients from the possible duplicates. We then match the possible duplicates by Name of Girl and update the latest file in case there are any missing fields captured in the previous records. Since the girl id and name could be duplicated as well, we use the Phone Number to confirm the uniqueness of the records and return the latest by Date of Service Provision. r knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) r library(a360connect) a360ngdata <- data.table::fread("/Users/isaiahnyabuto/Documents/Packages/a360connect/tests/testthat/test_data/current_program_a360_full_data.csv") latest_events <- find_latest(a360ngdata[1:1000,]) latest_events



psi-mis/a360connect documentation built on Nov. 22, 2022, 12:36 p.m.