Title: | Read Data from Health Information Systems |
---|---|
Description: | Data import from several health information systems ('HIS'). The current version of the package covers 'HIS' such as 'MS SQL', 'MySQL', and 'PostGRESQL' servers, 'REDCap', 'DHIS2' and 'Fingertips'. |
Authors: | Karim Mané [aut, cre, cph] , Bubacarr Bah [ctb] , Bankolé Ahadzie [ctb], Nuredin Mohammed [ctb], Abdoelnaser Degoot [ctb], Hugo Gruson [rev] , Pratik Gupte [rev] , Andree Valle-Campos [rev] , London School of Hygiene and Tropical Medicine, LSHTM [cph], data.org [fnd] |
Maintainer: | Karim Mané <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-12-08 05:04:15 UTC |
Source: | https://github.com/epiverse-trace/readepi |
Get the target DHIS2 attribute identifiers and names
dhis2_get_attributes(base_url, user_name, password, which = "dataSets")
dhis2_get_attributes(base_url, user_name, password, which = "dataSets")
base_url |
the base URL of the DHIS2 server |
user_name |
the user name |
password |
the user's password |
which |
the target DHIS2 attribute name. |
an object of type data.frame
with details about the DHIS2
attributes of interest.
## Not run: datasets <- dhis2_get_attributes( base_url = "https://play.dhis2.org/demo/", user_name = "admin", password = "district", which = "dataSets" ) ## End(Not run)
## Not run: datasets <- dhis2_get_attributes( base_url = "https://play.dhis2.org/demo/", user_name = "admin", password = "district", which = "dataSets" ) ## End(Not run)
the function allows import of data from Health Information Systems (HIS), files, and folders.The HIS consist of database management systems (DBMS) and website of public data collection.
readepi( data_source = NULL, records = NULL, fields = NULL, id_position = NULL, id_col_name = NULL, ... )
readepi( data_source = NULL, records = NULL, fields = NULL, id_position = NULL, id_col_name = NULL, ... )
data_source |
the URL of the HIS |
records |
a vector or a comma-separated string of subject IDs. When specified, only these records will be imported. |
fields |
a vector or a comma-separated string of column names. If provided, only those columns will be imported. |
id_position |
the column position of the variable that unique identifies
the subjects. When the name of the column with the subject IDs is known,
this can be provided using the |
id_col_name |
the column name with the subject IDs. |
... |
additional arguments passed to the |
a list
of 1 or several object(s) of type data frame
.
a list
of 2 or more object(s) of type data frame
.
# reading from a MySQL server ## Not run: data <- readepi( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), driver_name = "", from = "author" ) ## End(Not run)
# reading from a MySQL server ## Not run: data <- readepi( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), driver_name = "", from = "author" ) ## End(Not run)
Display the structure of the credentials file
show_example_file()
show_example_file()
Displays the content of the template credential file.
show_example_file()
show_example_file()
Display the list of tables in a database
show_tables(data_source, driver_name, credentials_file = NULL)
show_tables(data_source, driver_name, credentials_file = NULL)
data_source |
the URL of the server of interest |
driver_name |
the name of the MS driver. use |
credentials_file |
the path to the file with the user-specific
credential details for the projects of interest. See the help of
the |
a character
that contains the list of all tables found
in the specified database.
## Not run: show_tables( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), driver_name = "" ) ## End(Not run)
## Not run: show_tables( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), driver_name = "" ) ## End(Not run)
Visualize the first 5 rows of the data from a table
visualise_table(data_source, credentials_file, from, driver_name)
visualise_table(data_source, credentials_file, from, driver_name)
data_source |
the the URL of the HIS |
credentials_file |
the path to the file with the user-specific credential details for the projects of interest |
from |
the table name |
driver_name |
the name of the MS driver |
prints the first 5 rows of the specified table.
## Not run: result <- visualise_table( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), from = "author", driver_name = "" ) ## End(Not run)
## Not run: result <- visualise_table( data_source = "mysql-rfam-public.ebi.ac.uk", credentials_file = system.file("extdata", "test.ini", package = "readepi"), from = "author", driver_name = "" ) ## End(Not run)