get_cnes: Get health units data from CNES

Description Usage Arguments Details Value Examples

View source: R/get_cnes.R

Description

This function retrieves health units data from PCDaS ElasticSearch cluster for a specified year.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_cnes(
  conn,
  agr,
  ano_competen = NULL,
  mes_competen = NULL,
  vinc_sus = NULL,
  leitos_hosp = NULL,
  tipo_unidade = NULL,
  esfera_admin = NULL,
  lucene_query = NULL
)

Arguments

conn

Connection object created with pcdas_connect.

ano_competen

numeric. Competence year.

mes_competen

numeric. Competence month.

vinc_sus

numeric. Health units with SUS relationship. 1 for yes and 0 for no.

leitos_hosp

numeric. Health units with hospital, circury and other kinds of beds. 1 for yes and 0 for no.

tipo_unidade

string. Health unit type.

esfera_admin

string. Health unit administration level.

lucene_query

string. A more complex lucene query can be presented here. The string must be informed using sigle quotes. If used, all other filters will be ignored.

agg

string. Aggregation level. 'mun' for municipalities, 'uf' for "unidades federativas" or 'regsaude' for "regiões de saúde".

Details

This function uses raw data from the Cadastro Nacional de Estabelecimentos de Saúde Sistema de Informações de Internações Hospitalares (SIH) available at the PCDaS ElasticSearch cluster. A documentation about this data can be found at https://bigdata-metadados.icict.fiocruz.br/dataset/sistema-de-informacoes-de-mortalidade-sim. The CID-10 codes and name for chapters, group, category and subcategories of basic cause of death can be inspected at the same address above.

Value

A data.frame containing number of health units for the aggregation level.

Examples

1
2
3
4
cnes <- get_cnes(conn = conn, agr = "mun", ano_competen = 2010, mes_competen = 6)
cnes <- get_cnes(conn = conn, agr = "mun", ano_competen = 2010, mes_competen = 6, vinc_sus = 1)
cnes <- get_cnes(conn = conn, agr = "mun", ano_competen = 2010, mes_competen = 6, leitos_hosp = 1)
cnes <- get_cnes(conn = conn, agr = "mun", ano_competen = 2010, mes_competen = 6, tipo_unidade = "HOSPITAL GERAL")

bigdata-icict/pcdasindi documentation built on March 11, 2020, 5:15 p.m.