process_sih: Prepare SIH hospital-admission microdata

View source: R/process_sih.R

process_sihR Documentation

Prepare SIH hospital-admission microdata

Description

Recodes supported fields from reduced hospital-admission records ("SIH-RD") into descriptive values and normalizes escaped Unicode text.

Usage

process_sih(data, information_system = "SIH-RD", municipality_data = TRUE)

Arguments

data

A data frame returned by fetch_datasus() with information_system = "SIH-RD", or a compatible layout.

information_system

A single character string. Currently only "SIH-RD" is supported.

municipality_data

Logical scalar. If TRUE, add municipality names and available territorial attributes for supported municipality-code columns.

Details

Columns not explicitly recoded are retained, but Unicode normalization is applied to every column and consequently the returned tibble contains character columns. Other SIH layouts downloadable with fetch_datasus() are not currently supported by this processing function.

Value

A tibble with character columns. Supported codes are replaced with descriptions, and municipality fields are added when requested and available.

References

Saldanha, R. F. (2026). SIH – Sistema de Informações Hospitalares do SUS.

See Also

fetch_datasus()

Examples

process_sih(sih_rd_sample)


microdatasus documentation built on July 29, 2026, 5:08 p.m.