This class is a class that imports various metadata by reading an RDS file containing DICOM information. There are basically functions that import data related to Radiology CDM.

DicomRDS

Arguments

data

Data frame imported from DICOM RDS file

Format

An object of class R6ClassGenerator of length 24.

See also

https://github.com/OHDSI/Radiology-CDM/wiki

Examples

# NOT RUN {
############################# Example Code: Read DICOM RDS File   ###################################

rdsFile <- list.files(path = "~/Radiology/rds_test", pattern = "\\.rds$", full.names = T, recursive = T)

# If single data (only one metadata in dicom file )
dcmRDS <- DicomRDS$new(data[[1]])

# Create Occurrence ID for radiology image
roID <- dcmRDS$createOccurrenceID()

# Get PatientID
patientid <- dcmRDS$getPatientID()
dcmRDS$getDirectoryID()

# This radiology contast or non-contrast
isContrast <- dcmRDS$isPost4BrainCT()

# If Multi data
data <- readRDS(file = rdsFile[5])
for(i in 1:length(data)) {
  dcmRDS <- DicomRDS$new(data[[i]])
  roID <- dcmRDS$createOccurrenceID()
  patientid <- dcmRDS$getDirectoryID()
  isContrast <- dcmRDS$isPost4BrainCT()
  df <- data.frame(roID, patientid, isContrast)
}
df

######################################## Example Code: END ##########################################
# }