Title: | Read and manipualte data from Encuesta de morbilidad hospitalaria INE |
---|---|
Description: | Show data from Encuesta de morbilidad hospitalaria |
Authors: | Rafael Menéndez [aut, cre] |
Maintainer: | Rafael Menéndez <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2024-11-04 03:03:49 UTC |
Source: | https://github.com/rOpenSpain/MorbiditySpainR |
Add principal diagnosis following international classification of diseases
AddDiagnosis1(data)
AddDiagnosis1(data)
data |
Morbidity data |
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad, diag1
data <- data_ejemplo %>% AddDiagnosis1()
data <- data_ejemplo %>% AddDiagnosis1()
Add secondary diagnosis following international classification of diseases
AddDiagnosis2(data)
AddDiagnosis2(data)
data |
Morbidity data |
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad, diag2
data <- data_ejemplo %>% AddDiagnosis2()
data <- data_ejemplo %>% AddDiagnosis2()
Add specific diagnosis following international classification of diseases
AddDiagnosis3(data)
AddDiagnosis3(data)
data |
Morbidity data |
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad, diag3
data <- data_ejemplo %>% AddDiagnosis3()
data <- data_ejemplo %>% AddDiagnosis3()
Filter morbidity by principal diagnosis following international classification of diseases
FilterDiagnosis1(data, diagnosis_id)
FilterDiagnosis1(data, diagnosis_id)
data |
Morbidity data |
diagnosis_id |
id of principal diagnosis |
Uses dplyr filter
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- data_ejemplo %>% FilterDiagnosis1(2)
data <- data_ejemplo %>% FilterDiagnosis1(2)
Filter morbidity by secondary diagnosis following international classification of diseases
FilterDiagnosis2(data, diagnosis_id)
FilterDiagnosis2(data, diagnosis_id)
data |
Morbidity data |
diagnosis_id |
id of secondary diagnosis |
Uses dplyr filter
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- data_ejemplo %>% FilterDiagnosis2(20)
data <- data_ejemplo %>% FilterDiagnosis2(20)
Filter morbidity by ER
FilterEmergency(data)
FilterEmergency(data)
data |
Morbidity data |
Uses dplyr filter
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- data_ejemplo %>% FilterEmergency()
data <- data_ejemplo %>% FilterEmergency()
Filter morbidity by provincia using official id of provincias
FilterProvincia(data, provincia)
FilterProvincia(data, provincia)
data |
Morbidity data |
provincia |
ID of provincia |
Uses dplyr filter
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- data_ejemplo %>% FilterProvincia(28)
data <- data_ejemplo %>% FilterProvincia(28)
Download morbidity data from INE ftp and parse it
GetMorbiData(y1 = 2005, y2 = 2015)
GetMorbiData(y1 = 2005, y2 = 2015)
year1 |
Begining year of morbidity data |
year2 |
Ending year of morbidity data |
Uses ReadZip
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- GetMorbiData(y1=2010,y2=2011)
data <- GetMorbiData(y1=2010,y2=2011)
Download morbidity data from INE ftp and parse it
ReadZip(year)
ReadZip(year)
year |
Year of morbidity data |
Uses read.fwf
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- ReadZip(2010)
data <- ReadZip(2010)
Download morbidity data from INE ftp and parse it
ReadZip2015(year)
ReadZip2015(year)
year |
Year of morbidity data |
Uses script provided from INE
data frame with morbidity data prov_hosp, sexo, prov_res, diag_in, diag_ppal, motivo_alta, estancia, fecha_ingreso, edad
data <- ReadZip(2015)
data <- ReadZip(2015)
Reduce morbidity data to temporal serie, including diagnosis, province or sex
ReduceData(data, provincia = TRUE, date = "day", diag = NULL, sex = FALSE)
ReduceData(data, provincia = TRUE, date = "day", diag = NULL, sex = FALSE)
data |
Morbidity data |
date |
day, month or year |
diag |
diag1, daig2, diag3, if NULL not reduced by diagnosis |
sex |
Boolean, reduce by sex |
province |
Boolean, reduce by provicia |
Uses group_by
data frame with data serie of morbidity
data <- data_ejemplo %>% ReduceData(provincia = TRUE,date = "day")
data <- data_ejemplo %>% ReduceData(provincia = TRUE,date = "day")
Calculate prevalence, relative values by total population of preovince
SetPrevalence(data, pop = "total")
SetPrevalence(data, pop = "total")
data |
Morbidity data |
pop |
total, male, females |
Uses poblacion
relative values of prevalence
data <- data_ejemplo %>% ReduceData(provincia = TRUE,date="year") %>% SetPrevalence()
data <- data_ejemplo %>% ReduceData(provincia = TRUE,date="year") %>% SetPrevalence()
Get specific diagnosis following international classification of diseases
TraduceCodigoEspecifico(codigo)
TraduceCodigoEspecifico(codigo)
codigo |
code from morbidity data |
Specific diagnosis
data <- TraduceCodigoEspecifico(3019)
data <- TraduceCodigoEspecifico(3019)