Learn R Programming

rEHR (version 1.0)

flat_files: Exports flat files from the database. One file per practice

Description

Exports flat files from the database. One file per practice

Usage

flat_files(db, table = "Consultation", practice_table = "Practice", out_dir, file_type = c("txt", "csv", "rda", "dta"), ...)

Arguments

db
a database connection
table
character the table to be exported
practice_table
the table that the practice definitions can be found
out_dir
a directory to output to. This will be created if it does not already exist
file_type
the type of file to be saved. This can be one of "txt", "csv", "rda", "dta".
...
arguments to be passed to export_fn Defaults to exporting consultation tables for use by match_on_index(). the full path to out_dir will be created if it does not already exist.

See Also

match_on_index export_fn