|
|
@@ -1,36 +0,0 @@ |
|
|
|
% Generated by roxygen2: do not edit by hand |
|
|
|
% Please edit documentation in R/import.R |
|
|
|
\name{import_data} |
|
|
|
\alias{import_data} |
|
|
|
\title{Import data into i2b2} |
|
|
|
\usage{ |
|
|
|
import_data(data, project, host = "", admin = "", pass = "") |
|
|
|
} |
|
|
|
\arguments{ |
|
|
|
\item{data}{A dataframe of observation facts} |
|
|
|
|
|
|
|
\item{project}{The project to which to add the patients and their data} |
|
|
|
|
|
|
|
\item{host}{The host to connect to} |
|
|
|
|
|
|
|
\item{admin}{The admin account for the PostgreSQL database} |
|
|
|
|
|
|
|
\item{pass}{The password for the admin account} |
|
|
|
} |
|
|
|
\description{ |
|
|
|
Import data from a data frame into i2b2 |
|
|
|
} |
|
|
|
\details{ |
|
|
|
The data dataframe must contain the following columns: |
|
|
|
- encounter_ide: the original encounter ID |
|
|
|
- patient_ide: the original patient ID |
|
|
|
- start_date: the start date of the encounter, as Date object |
|
|
|
- concept_cd: the concept to insert |
|
|
|
- provider_id: the provider |
|
|
|
- modifier_cd: optionnal modifier for the concept |
|
|
|
Other observation fact columns can optionnaly be included, |
|
|
|
such as end_date, valtype_cd, tval_char, nval_num, valueflag_cd, units_cd, etc. |
|
|
|
|
|
|
|
The function creates and updates the corresponding patients and encounters, |
|
|
|
inserts the new observations, and finally rebuilds the indexes in the database. |
|
|
|
} |