process_sia: Process SIA variables from DataSUS

View source: R/process_sia.R

process_siaR Documentation

Process SIA variables from DataSUS

Description

process_sia processes SIA variables retrieved by fetch_datasus().

Usage

process_sia(
  data,
  information_system = "SIA-PA",
  nome_proced = TRUE,
  nome_ocupacao = TRUE,
  nome_equipe = TRUE,
  municipality_data = TRUE
)

Arguments

data

data.frame created by fetch_datasus().

information_system

string. The abbreviation of the health information system. See Details.

nome_proced

optional logical. TRUE by default, add PA_PROCED_NOME to the dataset. This setting will start to download a file from DataSUS to retrive the updates list of procesures (SIGTAB).

nome_ocupacao

optional logical. TRUE by default, add OCUPACAO name to the dataset.

nome_equipe

optional logical. TRUE by default, add EQUIPE name to the dataset.

municipality_data

optional logical. TRUE by default, creates new variables in the dataset informing the full name and other details about the municipality of residence.

Details

This function processes SIA variables retrieved by fetch_datasus(), informing labels for categoric variables including NA values.

Currently, only "SIA-PA" is supported.

Examples

## Not run: 
df <- fetch_datasus(year_start = 2010, month_start = 1,
                    year_end = 2010, month_end = 1,
                    uf = "RJ",
                    information_system = "SIA-PA")
df_a <- process_sia(df)
df_b <- process_sia(df, municipality_data = FALSE)

## End(Not run)

rfsaldanha/microdatasus documentation built on April 13, 2024, 2:25 p.m.