Rotation Coordinator Report Formatter App

Background

Each month, an individualized email is sent to several dozen Rotation Coordinators for the University of Toronto's Internal Medicine program. Each coordinator is responsible for a different (sub)specialty rotation at a different hospital, and each email contains the names, training levels, and rotation-specific assessment-objectives for the residents attending the rotation that month.

Each email contains anywhere from one to a dozen residents for that block/rotation/hospital grouping, but the source data is only available as an un-grouped list of individual residents.

Previously the work of grouping, filtering, formatting, and merging the data to the relevant Rotation Coordinators and EPA assessments was done by hand, in a process that would take over an hour. I automated the process using an elaborate Excel VBA macro, but it was a pain to update any time the format of the source-data or the filtering/formatting needs would change. Additionally, the use of an Excel macro was unintuitive to most users, and the actual .xlsm file was buried deep in our organization's shared drive. This web-app was made to provide a cleaner, more-accessible, more-informative, and more-intuitive interface to a tool that can now be shared simply with a URL.

Features

The app takes as input 3 CSV files:

  1. Rotations exported from the Online Rotation & Base Hospital Scheduling (ORBS)
  2. A reference table for the Rotation Coordinators of the rotations listed in the rotations file
  3. A reference table for the EPAs to be completed on the rotations listed in the rotations file.

The residents in the first input are grouped by:

  • the rotation
  • the hospital the roation is taking place at
  • the residents' seniority (i.e. Juniors or Seniors)

Four tables are produced:

  1. all of the residents, Rotation Coordinators, and EPAs matched by rotation and hospital
  2. the rotations and sites with exclusively Junior residents
  3. the rotations and sites with exclusively Senior residents
  4. the rotations and sites with both Junior and Senior residents

All of the uploading and data manipulation is done entirely within the browser, and there is no outbound network traffic, so the data uploaded is secure.

For CSV input there is an info panel that explains what headers are required, and specifically missing headers are highlighted for the user upon upload. Subsequent uploads are disallowed until the correct headers are included. A sample table of data is included with each explanation.

Upon completion of the uploads (or at any point in between), the output-tables can be exported as a CSV. The completed tables can then be used directly as input for pre-constructed Mail Merge documents for emailing to the Rotation Coordinators.

Development

React

React

Material UI

Material UI

Rotation Coordinator Report Formatter is designd entirely as a front-end app so that there are no security vulnerabilities associated with transmitting the data to a server for processing.

Front-End

The React front-end utilizes components from MUI v5, a component library implementing Google’s Material Design visual language. Custom styling in keeping withthe University of Toronto's Visual Identity Style Guide is implemented using MUI's emotion CSS-in-JS API.

A React implementation of the Papaparse in-browser CSV parsing library, react-papaparse v3, is used to parse the uploaded CSVs. Data grouping, filtering, and formatting are done with custom functions acting on the data held in React state hooks, which are then fed to components wrapping MUI's DataGrid component.

Animations are accomplished using Framer Motion