Skip to content

fbrewster/mrl-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MRL Timer

This app is a simple webapp built on NiceGUI for timing MR-Linac workflows. It collects some basic demographic data on the patient as well as some information on the treatment session that might influence timings.

The app is intended for:

  • Identification and quantification of efficiency improvements.
  • Auditing of fraction times.
  • Reseach on the effects of various parameters on workflow efficiency.

Usage

Screenshot The app is inteded to be used during treatment fractions at the follwing stages:

  1. START - patient enters room.
  2. IMAGING - image acquisition begins.
  3. CONTOURING - match is complete and cntour review and editing begins.
  4. PLANNING - contours are finished and plan adaptation begins.
  5. CHECKING - plan optimisation is complete and plan QA/verification image review begins.
  6. BEAM ON - plan is approved and delivery begins.
  7. BEAM OFF - delivery completes.

Demographics information can be entered at any point. The gas timer can be used to time an additional step but is not recorded. For example, time since carbogen gas supply started. When the record button is pressed, the data is dumped to a csv file and the timer is reset.

Widget Details

Demographic/Details Verfication

Patient ID

The patient ID is validated against a regular expression. By default, 9 numeric characters.

Fraction Number

Must be a whole number and greater than 0.

Site

Selectable drop-down and searchable from available options.

Contourer

Selectable drop-down and searchable from available options.

Comments

The any comments box has no limits on length and new lines are preserved in the csv file. This will cause the file to appear strangely if viewed in a text editor that can’t interpret the quotes.

Timer

The main timer is built on NiceGUI’s timer object. On pressing the START button, the start time is logged from the system clock. The timer then updates the timer label at 1s intervals with the difference in time between the system clock and the start time. Each intermediate button logs the current system clock time. The BEAM OFF button deactivates the timer and logs the time stamp. All recorded times are based on the timestamps, the elapsed time is for user purposes only.

Configuration

There are some configuration options that are editable only via the app server-side storage. NiceGUI uses a JSON file to keep storage between server restarts. This file can be edited manually by stopped the server, editing and restarting.

Drop-down Options

Both the site and contourer dropdowns are configured to accept new values. These can be added by typing and pressing enter. The app is built to use server-side storage for dropdown options. When adding a new value, the event is handled by a custom handler that adds the new value to storage as well as the dropdown object itself. For the contouers, the value is also forced to uppercase Items can be removed via the admin menu. Any changes to options need to emit the settings_update event to reset the dropdown options from storage.

Patient ID Regex

The regex used to verify the validity of the patient ID (intended to be the MRN).

CSV Path

The path to the csv file where data will be recorded.

Development Notes

Recording Variables

Data recording has been designed flexibly to allow for changes in future versions. To be recorded in the csv file there are 2 requirements to be met:

  1. Variable has an entry in client-side storage dict, app.storage.client.
  2. The key in the storage dict exactly matches a header in the csv file.

The recording is designed to ignore missing data in both directions; keys in the storage not in the csv won’t be written and headers in the csv not in storage will be left blank. No formatting is done on record, the csv writer converts using str().

Multiple Session Behaviour

Timers and variable are all run and stored client-side, meaning multiple sessions can run independently of each other. This also means that the data is lost if the tab is accidentally closed.

About

Simple webapp for timing online adaptive MR-Linac workflows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages