forked from ctsit/redcapcustodian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_hipaa_disclosure_log_from_ehr_fhir_logs.Rd
48 lines (42 loc) · 1.33 KB
/
get_hipaa_disclosure_log_from_ehr_fhir_logs.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hipaa_disclosure_log_from_ehr_fhir_logs.R
\name{get_hipaa_disclosure_log_from_ehr_fhir_logs}
\alias{get_hipaa_disclosure_log_from_ehr_fhir_logs}
\title{get_hipaa_disclosure_log_from_ehr_fhir_logs}
\usage{
get_hipaa_disclosure_log_from_ehr_fhir_logs(
conn,
ehr_id = NA_real_,
start_date = as.Date(NA),
end_date = as.Date(NA)
)
}
\arguments{
\item{conn}{a DBI connection object to the REDCap database}
\item{ehr_id}{a vector of REDCap EHR_IDs for the EHR(s) of interest (optional)}
\item{start_date}{The first date from which we should return results (optional)}
\item{end_date}{The last date (non-inclusive) from which we should return results (optional)}
}
\value{
A dataframe suitable for generating a HIPAA disclosure log
}
\description{
Read a data needed for a HIPAA disclosure log from a REDCap database
given a DBI connection object to the REDCap database and some optional
parameters to narrow the returned result.
Optionally filter the data with the data range `[start_date, end_date)`.
}
\examples{
\dontrun{
library(tidyverse)
library(lubridate)
library(REDCapR)
library(dotenv)
library(redcapcustodian)
library(DBI)
library(RMariaDB)
init_etl("export_fhir_traffic_log")
conn <- connect_to_redcap_db()
get_hipaa_disclosure_log_from_ehr_fhir_logs(conn)
}
}