Skip to contents

get_cervical_treated() retrieves cervical cancer precancerous treatment data for a specified period from the KHIS API server.

Usage

get_cervical_treated(
  start_date,
  end_date = NULL,
  level = c("country", "county", "subcounty", "ward", "facility"),
  organisations = NULL,
  ...
)

Arguments

start_date

The start date to retrieve data. It is required and in the format YYYY-MM-dd.

end_date

The ending date for data retrieval (default is the current date).

level

The desired data granularity: "country" (the default), "county", "subcounty", "ward", or "facility".

organisations

A list of organization units ids to be filtered.

...

Other options that can be passed onto KHIS API.

Value

A tibble containing cervical cancer precancerous treatment data with the following columns:

  • country - Name of the country.

  • county - Name of the county. Optional if the level is county, subcounty, ward or facility.

  • subcounty - Name of the subcounty. Optional if the level is subcounty, ward or facility.

  • ward - Name of the ward. Optional if the level is ward or facility.

  • facility - Name of the health facility. Optional if the level facility.

  • period - The month and year of the data.

  • fiscal_year- The financial year of the report(July-June Cycle).

  • year - The calendar year of the report.

  • month - The month name of the report.

  • category - The age group category of the report (<25, 25-49, 50+).

  • category2 - Additional category if available.

  • element - The data element (HPV, VIA or Pap Smear).

  • source - The source report (MOH 711 or MOH 745).

  • value - The number reported.

Examples

# Download data from February 2023 to current date
treated <- get_cervical_treated(start_date = '2023-02-01')
treated
#> # A tibble: 458 × 11
#>    value country element     category period     month  year quarter fiscal_year
#>    <dbl> <chr>   <fct>       <fct>    <date>     <ord> <dbl> <fct>   <fct>      
#>  1     1 Kenya   LEEP        Routine… 2023-06-01 June   2023 Q4      2022/2023  
#>  2     3 Kenya   LEEP        Routine… 2023-07-01 July   2023 Q1      2023/2024  
#>  3     5 Kenya   Thermoabla… Initial… 2023-10-01 Octo…  2023 Q2      2023/2024  
#>  4     5 Kenya   Cryotherapy Initial… 2023-11-01 Nove…  2023 Q2      2023/2024  
#>  5     1 Kenya   LEEP        Routine… 2023-02-01 Febr…  2023 Q3      2022/2023  
#>  6     1 Kenya   Cryotherapy Initial… 2023-10-01 Octo…  2023 Q2      2023/2024  
#>  7    17 Kenya   Other       Routine… 2024-04-01 April  2024 Q4      2023/2024  
#>  8     5 Kenya   Other       Routine… 2024-05-01 May    2024 Q4      2023/2024  
#>  9     9 Kenya   Other       Post-tr… 2023-02-01 Febr…  2023 Q3      2022/2023  
#> 10     1 Kenya   Cryotherapy Initial… 2024-02-01 Febr…  2024 Q3      2023/2024  
#> # ℹ 448 more rows
#> # ℹ 2 more variables: age_group <fct>, source <fct>