🚧 Under construction, please handle with care 🚧
✨ Shiny application that:
- 🥪 reads and digests (i.e. «bakes») batches of Circle CVi42 reports in XML format,
- 👨🏻🍳 puts them into an R data.frame, and
- 🛜 makes the data.frame ready for upload to a RedCAP server.
cviBaker is a Shiny app that processes cardiac magnetic resonance imaging (CMR) reports exported from CVi42 and creates a CSV file suitable for upload to a paired REDCap server. This tutorial will guide you through the steps to use this app.
Before using cviBaker, ensure that you have the following:
- R and RStudio installed on your system.
- The necessary R packages installed (
shiny
,shinyWidgets
,shinyjs
,dplyr
,gt
,gtExtras
,gtsummary
,bslib
, andreadr
). - A compatible REDCap Data Import Template (CSV file) for the project you want to upload data to.
- XML reports exported from CVi 42 for CMR studies you want to process.
- Open RStudio and navigate to the directory where the
app.R
file is located. - Open the
app.R
file and click the "Run App" button in the top-right corner of the script editor pane.
- In the sidebar panel, click the "Browse..." button next to "1. Upload Redcap Data Import Template (csv)" and select the REDCap Data Import Template CSV file.
- Click the "Browse..." button next to "2. Select CMR Reports (xml)" and select one or more XML reports exported from CVi 42.
- After uploading the necessary files, click the "Process" button in the sidebar panel.
- The app will start processing the XML files and display a progress bar.
- Once the processing is complete, a message will be displayed indicating the number of reports that have been uploaded.
- In the "Processing" tab, click the "CSV" button to download the processed data in CSV format.
- The downloaded file will be named
cviData_YYYYMMDD-HHMM.csv
, whereYYYYMMDD-HHMM
represents the current date and time.
- Switch to the "Raw CMR Data" tab to view the raw CMR data in a table format.
- Switch to the "Patient names" tab to view a table containing the record IDs and patient names extracted from the XML files.
- Click the "CSV" button to download the patient names in CSV format.
- Make sure to comply with any local regulations on the use of patient data by properly anonymizing CMR studies on CVi prior to exporting or uploading the XML files.
- The app assumes that the XML files are exported from CVi 42 and follow the expected structure.
- The
process_xml.sh
andxml_handler.R
scripts are required for the app to function correctly. These scripts should be located in the same directory as theapp.R
file.
That's it! You should now be able to use the cviBaker app to process XML reports from CVi 42 and prepare the data for upload to a REDCap server.
This was developed by me (Giandomenico Bisaccia) as part of a PhD project at the University of Chieti-Pescara, Italy and Royal Brompton and Harefield Hospitals, London, UK. To learn more about my work and get in touch, please visit my website.