load_rdt | R Documentation |
Loads radiology procedures information into the R environment.
load_rdt(
file,
merge_id = "EMPI",
sep = ":",
id_length = "standard",
perc = 0.6,
na = TRUE,
identical = TRUE,
nThread = parallel::detectCores() - 1,
mrn_type = FALSE
)
file |
string, full file path to Rdt.txt. |
merge_id |
string, column name to use to create ID_MERGE column used to merge different datasets. Defaults to EPIC_PMRN, as it is the preferred MRN in the RPDR system. |
sep |
string, divider between hospital ID and MRN. Defaults to :. |
id_length |
string, indicating whether to modify MRN length based-on required values id_length = standard, or to keep lengths as is id_length = asis. If id_length = standard then in case of MGH, BWH, MCL, EMPI and PMRN the length of the MRNs are corrected accordingly by adding zeros, or removing numeral from the beginning. In other cases the lengths are unchanged. Defaults to standard. |
perc |
numeric, a number between 0-1 indicating which parsed ID columns to keep. Data present in perc x 100% of patients are kept. |
na |
boolean, whether to remove columns with only NA values. Defaults to TRUE. |
identical |
boolean, whether to remove columns with identical values. Defaults to TRUE. |
nThread |
integer, number of threads to use to load data. |
mrn_type |
boolean, should data in MRN_Type and MRN be parsed. Defaults to FALSE, as it is not advised to parse these for all data sources as it takes considerable time. |
data table, with radiological exam information.
numeric, defined IDs by merge_id, used for merging later.
string, Unique Partners-wide identifier assigned to the patient used to consolidate patient information from rdt datasource, corresponds to EMPI in RPDR. Data is formatted using pretty_mrn().
string, Epic medical record number. This value is unique across Epic instances within the Partners network from rdt datasource, corresponds to EPIC_PMRN in RPDR. Data is formatted using pretty_mrn().
string, if mrn_type == TRUE, then the data in MRN_Type and MRN are parsed into IDs corresponding to locations (loc). Data is formatted using pretty_mrn().
POSIXct, Date of the radiology exam, corresponds to Date in RPDR. Converted to POSIXct format.
string, Modality of the exam, corresponds to Mode in RPDR.
string, Higher-level grouping concept used to consolidate similar procedures across hospitals, corresponds to Group in RPDR.
string, Internal identifier for the procedure used by the source system, corresponds to Test_Code in RPDR.
string, Full name of the exam/study performed, corresponds to Test_Description in RPDR.
string, Identifier assigned to the report or procedure for Radiology tracking purposes, corresponds to Accession_Number in RPDR.
string, Ordering or authorizing provider for the study, corresponds to Provider in RPDR.
string, Specific department/location where the procedure was ordered or performed, corresponds to Clinic in RPDR.
string, Facility where the order was entered, corresponds to Hospital in RPDR.
string, Classifies the type of encounter where the procedure was performed, corresponds to Inpatient_Outpatient in RPDR.
## Not run:
#Using defaults
d_rdt <- load_rdt(file = "test_Rdt.txt")
#Use sequential processing
d_rdt <- load_rdt(file = "test_Rdt.txt", nThread = 1)
#Use parallel processing and parse data in MRN_Type and MRN columns and keep all IDs
d_rdt <- load_rdt(file = "test_Rdt.txt", nThread = 20, mrn_type = TRUE, perc = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.