You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This program is free software: you can redistribute it and/or modify
5
+
# it under the terms of the GNU General Public License as published by
6
+
# the Free Software Foundation, either version 3 of the License, or
7
+
# (at your option) any later version.
8
+
#
9
+
# This program is distributed in the hope that it will be useful,
10
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+
# GNU General Public License for more details.
13
+
#
14
+
# You should have received a copy of the GNU General Public License
15
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+
#' Provides Access to the Beds Dataset from the National Register of Health Establishments (CNES).
18
+
#'
19
+
#' \code{cnes.lt} returns a data.frame with a subset of the Beds (LT) dataset
20
+
#'
21
+
#' @details
22
+
#' This system contains data divided in the following categories:
23
+
#'
24
+
#' \itemize{
25
+
#' \item LT: Beds (from Oct 2005)
26
+
#' \item ST: Establishments (from Aug 2005)
27
+
#' \item DC: Complimentary Data (from Aug 2005)
28
+
#' \item EQ: Equipments (from Aug 2005)
29
+
#' \item SR: Specialized Services (from Aug 2005)
30
+
#' \item HB: License (from Mar 2007)
31
+
#' \item PF: Practitioner (from Ago 2005)
32
+
#' \item EP: Teams (from Apr 2007)
33
+
#' \item RC: Contractual Rules (from Mar 2007)
34
+
#' \item IN: Incentives (from Nov 2007)
35
+
#' \item EE: Teaching Establishments (from Mar 2007)
36
+
#' \item EF: Philanthropic Establishment (from Mar 2007)
37
+
#' \item GM: Management and Goals (from Jun 2007)
38
+
#' }
39
+
#'
40
+
#' The \code{cnes.*} functions are provided for each available subsystem, for example, \code{cnes.lt}, \code{cnes.gm} and so on.
41
+
#'
42
+
#' @note
43
+
#' DATASUS is the name of the Department of Informatics of the Brazilian Unified Health System (SUS) and is resposible for publishing public healthcare data. Besides the DATASUS, the Brazilian National Agency for Supplementary Health (ANS) also uses this file format for its public data. The name DATASUS is also often used to represent the public datasets they provide.
44
+
#'
45
+
#' Neither this project, nor its author, has any association with the brazilian government.
46
+
#' @param years numeric; one or more years to select the target data to be read
47
+
#' @param months numeric; one or more months to select the target data to be read
48
+
#' @param states character; one or more state (UF) representing the location of the data to be read, or 'ALL' if you want to read data from all states (UFs) at the same time.
49
+
#' @param language character; column names in Portuguese ("pt") or English ("en"). Default is "en".
50
+
#' @return a data.frame with Brazil's health establishment data
Copy file name to clipboardExpand all lines: R/datasus.R
+101-11
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@
16
16
17
17
#' Initialize DATASUS environment
18
18
#'
19
-
#' This function initializes the environment that contains the DATASUS package control variables, like the locations for the DATASUS ftp and the local working directory.
19
+
#' \code{datasus.init} initializes the environment that contains the DATASUS package control variables, like the locations for the DATASUS ftp and the local working directory.
20
+
#'
20
21
#' @details
21
22
#' This function prepares the \code{datasus.env} environment. You can specify the DATASUS working directory with the parameter \code{workdir} to set the local directory where to store the downloaded DATASUS files.
#' Returns datasus' Package Default Language Setup
152
+
#'
153
+
#' \code{datasus.lang} returns the current selected language as a two character code.
154
+
#'
155
+
#' @details
156
+
#' The value returned by this function is set internally by a previous call to \code{\link{datasus.init}}. This value is used as a default language for every data access function of this package to define the language of the dataset column headers.
157
+
#'
158
+
#' To provide more flexibility, every data access function has a parameter called \code{language} that can be used to override the initial language setting at runtime.
159
+
#'
160
+
#' Current supported languages are "pt" (Brazilian Portuguese) and "en" (English).
161
+
#'
162
+
#' @note
163
+
#' DATASUS is the name of the Department of Informatics of the Brazilian Unified Health System (SUS) and is resposible for publishing public healthcare data. Besides the DATASUS, the Brazilian National Agency for Supplementary Health (ANS) also uses this file format for its public data. The name DATASUS is also often used to represent the public datasets they provide.
164
+
#'
165
+
#' Neither this project, nor its author, has any association with the brazilian government.
166
+
#' @return The default language code as set by a previous call to \code{\link{datasus.init}}
# This program is free software: you can redistribute it and/or modify
5
+
# it under the terms of the GNU General Public License as published by
6
+
# the Free Software Foundation, either version 3 of the License, or
7
+
# (at your option) any later version.
8
+
#
9
+
# This program is distributed in the hope that it will be useful,
10
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+
# GNU General Public License for more details.
13
+
#
14
+
# You should have received a copy of the GNU General Public License
15
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+
#' Provides Access to the Declarations of Death Dataset from the Mortality Information System (SIM).
18
+
#'
19
+
#' \code{sim.do} returns a data.frame with a subset of the Declarations of Death (DO) dataset
20
+
#'
21
+
#' @details
22
+
#' The Mortality Information System (SIM) offers health managers, researchers and institutions highly relevant information for defining priorities for disease prevention and control programmes, based on death statement information collected by the State Health Departments. The national Database generated from this information is administered by the Health Surveillance Secretariat in cooperation with DATASUS.
23
+
#'
24
+
#' The system works through the filling in and collection of a standard document, the Death Statement (Declaration of Death), which is entered onto the system in the states and municipalities. The data collected is of great importance for health surveillance and epidemiological analysis, as well as health and demographical statistics.
25
+
#'
26
+
#' This system contains data divided in the following categories:
27
+
#'
28
+
#' \itemize{
29
+
#' \item DO: Declarations of death (sometimes referenced as DORES)
30
+
#' \item DOFET: Declarations of death (Fetal)
31
+
#' \item DOEXT: Declarations of death (External Causes)
32
+
#' \item DOINF: Declarations of death (Children)
33
+
#' \item DOMAT: Declarations of death (Maternal)
34
+
#' }
35
+
#'
36
+
#' The \code{sim.*} functions are provided for each available subsystem, for example, \code{sim.dofet}, \code{sim.doext} and so on.
37
+
#'
38
+
#' @note
39
+
#' DATASUS is the name of the Department of Informatics of the Brazilian Unified Health System (SUS) and is resposible for publishing public healthcare data. Besides the DATASUS, the Brazilian National Agency for Supplementary Health (ANS) also uses this file format for its public data. The name DATASUS is also often used to represent the public datasets they provide.
40
+
#'
41
+
#' Neither this project, nor its author, has any association with the brazilian government.
42
+
#' @param years numeric; one or more years representing the data to be read
43
+
#' @param states character; one or more state (UF) representing the location of the data to be read, or 'ALL' if you want to read data from all states (UFs) at the same time.
44
+
#' @param language character; column names in Portuguese ("pt") or English ("en"). Default is "en".
45
+
#' @return a data.frame with Brazil's mortality data
0 commit comments