Skip to contents

Contact records reuse a case EPID with a trailing contact marker (C, CC, HC, or C followed by digits). This splits the marker off so contacts collapse onto their parent case for matching.

Usage

epid_strip_contact(epid)

Arguments

epid

Character vector of EPID strings.

Value

A tibble with epid_base (marker removed) and contact_code (the extracted marker, NA when absent).

Examples

epid_strip_contact(c("NIE-BOS-XYZ-24-001", "NIE-BOS-XYZ-24-001CC"))
#> # A tibble: 2 × 2
#>   epid_base          contact_code
#>   <chr>              <chr>       
#> 1 NIE-BOS-XYZ-24-001 NA          
#> 2 NIE-BOS-XYZ-24-001 CC