norsyss_download_aggregated_diagnoses: Download NorSySS aggregated diagnoses

Description Usage Arguments Examples

Description

A function to extract NorSySS diagnoses, aggregated by day and municipality.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
norsyss_download_aggregated_diagnoses(
  date_from = "2020-01-01",
  date_to = lubridate::today(),
  folder = getwd(),
  file_name = glue::glue("norsyss_{lubridate::today()}.txt"),
  diags = list(influensa = c("R80"), gastro = c("D11", "D70", "D73"), respiratory =
    c("R05", "R74", "R78", "R83"), respiratoryexternal = c("R05", "R74", "R78", "R83"),
    respiratoryinternal = c("R05", "R74", "R83"), lungebetennelse = c("R81"), bronkitt =
    c("R78"), skabb = c("S72"), emerg1 = c("R80"), emerg2 = c("R80"), emerg3 = c("R80"),
    emerg4 = c("R80"), emerg5 = c("R80")),
  overwrite_file = FALSE,
  ...
)

Arguments

date_from

Start date for extracting data

date_to

End date for extracting data

folder

Folder the data file will end up in

file_name

File name of the data file

diags

Diagnosis codes to download

overwrite_file

Do you want to overwrite the file if it already exists?

...

Not used

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
norsyss_download_aggregated_diagnoses(
  date_from = "2020-01-01",
  date_to = lubridate::today(),
  folder = getwd(),
  diags = list("influenza" = c("R80"))
)

## End(Not run)

folkehelseinstituttet/spulsconnect documentation built on Feb. 8, 2021, 6:23 a.m.