An Internet of Things app for monitor unit calculation in superficial and orthovoltage skin therapy

Purpose: We developed an app for Internet of Things (IoT) device such as smartphone or tablet to calculate the monitor unit in superficial and orthovoltage skin therapy. The app can run both on the Windows and Android operation system. Methods: The IoT app was created based on the formula to calculate the monitor unit in skin therapy using kV photon beams. The calculation was based on databases of dose variables such as relative exposure factor and backscatter factor. The calculation also considered the stand-off and stand-in correction according to the inverse-square and inverse-cube law. Verification of the app was carried out by comparing the monitor unit results with those from hand calculations. Results: The frontend window of the app provided a user-friendly interface to the user for inputting prescription dose, beam and treatment setup variables. The user could save the calculation record electronically, generate a printout or send it to other radiation staff using the IoT. Verification of the app showing that deviation between the monitor units calculated by the app and by hand is insignificant. Conclusion: The verified IoT app can effectively calculate the monitor unit in superficial and orthovoltage skin therapy. The app takes advantages of all innate features of IoT such as real time communication, Internet access, data transfer and sharing.


Introduction
Superficial (50-150 kVp) and orthovoltage (150-500 kVp) x-ray are popular to treat nonmelanoma skin cancers such as basal cell carcinoma and squamous cell carcinoma [1]. The high surface dose with almost no buildup region and the large gradient in the depth dose curve of kV photon beams make them suitable to treat skin lesion and tumour. In skin therapy, these kV photon beams are generated by a treatment unit including an x-ray tube to generate the beam, filter to modify the beam quality and cone/applicator for beam conformation [2]. Generally, radiation dose is prescribed at the patient's surface, and monitor unit is calculated based on the dose prescription and calibration data from the treatment unit.
In skin therapy, the patient setup, beam setup, dose prescription and monitor unit calculation are usually finished in a single day. The radiation oncologist and radiotherapists will set up the patient on the couch. The radiation oncologist will decide the beam variables such as the beam energy, cone size, use of accessory such as bolus or shielding and dose prescription. The radiotherapists and medical physicist will calculate the monitor unit as per the beam and treatment setup variables based on a formula from a protocol [2]. Usually, a treatment monitor unit calculation form will be used. The radiation staff only need to fill in those variables to the formula printed on the form, and a hand calculation can be performed. To automate the treatment process, graphical user interface was developed to determine the monitor unit using a computer [3,4]. The interface was written by computer code such as Visual Basic or C++ [5]. However, this type of monitor unit calculator can only work on an operation system for computer such as Microsoft Windows [6]. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
In a modern cancer centre equipped with broadband Internet/Wi-Fi, Internet of Things (IoT) refers to devices connected to the network and could exchange data for communication [7][8][9]. IoT app refers to a program which working on the IoT hardware such as smartphone, tablet, laptop or desktop computer [10]. For example, with an app running on a smartphone for a radiation staff in the cancer centre, he/she can use the app anytime and anywhere in the centre. Data in the app can be saved or shared with other staff within the treatment group [11]. Communication between staff anywhere in the cancer centre to discuss the result is anytime possible remotely using mobile devices. Moreover, data and communication are protected by the network security system ensuring a safe transfer and exchange of information. The aim of this note is to suggest a new method calculating the monitor unit in skin therapy using an IoT app.

Monitor unit calculation
The monitor unit calculation is based on the following equation [2]: In equation (1), BSF and REF are the backscatter factor and relative exposure factor, respectively. AF, PDD and SOC are the attenuation factor, percentage depth dose and stand-off correction, respectively. The REF is a dose factor measured specific to a specific circumstance. For example, each applicator/cone on an orthovoltage x-ray unit will have its own REF for each source-to-surface distance (SSD), beam energy, and cone size. The REF can be modified by an attenuator (AF), which can change the dose [2]. Attenuators alter the dose received in an area by absorbing some of the radiation. Each one is specific to an area, SSD, and energy level, like REF. BSF is needed to account for the photon scatters in the patient. Backscattering values vary for field size, as well as depend on the initial dose rate measured without backscattering [12]. The factor can be calculated via Monte Carlo methods, or they can be measured directly [13,14]. In this note, the REF and BSF were measured using water tank, solid water phantom and ionization chambers. The data can be found in the commissioning report of the treatment unit. Like REF and AF, BSF is usually tabulated in each cancer centre for each treatment unit. BSF is tabulated based on equivalent areas, in a square or circular field. As cut-outs for skin cancers may vary in size, the area of each field of the cut-out is calculated, then compared to the tabulated areas. When the skin lesion is depressed or protrudes, the delivered dose needs to be corrected. This is done by measuring the depression or protrusion as the stand-off. A stand-off correction factor (SOC) is then calculated using the SSD and stand-off measured with the inverse square law or inverse cube law [15], depending on how large the stand-off is.

App workflow and verification
The app uses equation (1) to perform monitor unit calculation. When the app starts, it loads the available beam energies for use. Once an energy is selected, the app will load the available applicators or cones that are compatible with the selected energy level. The user can then select one of the available cones. The user also needs to put in the prescribed dose and number of fraction in the treatment. The app will calculate the daily given dose (DGD) which is the treatment dose per fraction.
Once a cone is selected, the app loads the database of values for the BSF and REF tables for that particular cone and energy. The BSF and REF database are prepared and preloaded to the app before calculation. The database is specific for the treatment unit in the user's cancer centre. On the other hand, the database is password protected to avoid incorrect calculation due to the unwanted modification of the data accidentally. For the REF, the app will select the list of available diameters based on the field size to the user. Once the user selects a diameter, the appropriate REF will be found from the database and loaded. The BSF can only be calculated once the user puts in information about the cut-out. The user must put in the dimensions of the cut-out, which allows the app to calculate the equivalent diameter of the field. The app will look in the BSF database for a matching equivalent diameter. Once the app has all these values, monitor unit will automatically be calculated and displayed. Changing values will change the monitor unit as soon as the values are entered or changed. AF and SOC can be added as well, and the monitor unit will be updated immediately. Figure 1 summaries the workflow of how the app loads the different databases and finds values from them. The beam energies are selected first, followed by the cones. After the cones are defined, only one REF and BSF table are in use.
The Windows version of the app was written in C# using Microsoft Visual Studio Professional and it is designed to run on Windows 7 and above. The Android version was written in C# on Microsoft Visual Studio Professional, but with the Xamarin add-on for functionality on Android devices [16]. Both versions of the app had a similar, simple back-end and can conceivably be ported to other platforms. For verification, monitor units with different beam and treatment setup variables were calculated and compared between the app (Windows and Android version) and hand calculation (long-hand).

Results and discussion
App interface and functionality Figures 2 and 3 show the visualizations of the app interfaces in the Windows and Android version with different frontend windows for information updated by the user.
Both the Windows and Android version of monitor unit calculator loaded and produced the same results. However, they have different user interfaces due to space limitations on the Android, as well as different fundamental user interfaces. Upon loading, the Windows version (figures 2(a)-(c)) has a tabbed window, while the Android version has an expandable list. The subsections of these are Prescription, Cut-out details, Set-up, and Calculation factors. The Windows version also has an Import/Export tab, as it has import framework for different cones with different REF/BSF tables, as well as the ability to export a printout as report in PDF format. The Android version (figures 3(a)-(c)) has a General heading for information pertaining to the patient. This information is put in outside of the tab on the Windows version, as the Windows version has more free viewable room displaying on a computer monitor instead of a small screen from a smartphone. Also, the Android loads the same layout in a landscape view. Figures 2(a) and 3(a) show the frontend window of the app for prescription input. Once the prescription dose and number of fraction are given (e.g. 122 cGy and 3 fractions), the DGD is automatically calculated. Moreover, beam energy is also selected there. Figures 4(a) and (b) show the frontend windows of the cut-out details. The user input the shape of the cut-out there. Once the shape is selected and the axes are entered, the equivalent length or diameter is automatically calculated. This value is used to find the BSF. It should be noted that only the Windows version can draw the shape as it would appear, but the Android version lacks screen real estate.  In the Set-up tabs as shown in figures 2(b) and 3(b), a cone that is usable with the selected energy can be selected. Selecting a cone automatically sets SSD with that specific cone's SSD. With all this data given, there is sufficient data to calculate the monitor unit. The app will assume the stand-off is zero and the AF is one if they are not defined and automatically complete the monitor unit calculation. The data does not necessarily have to be entered in the order that it has been in the report. It can be filled in any order, and the monitor unit will automatically be calculated when it has sufficient data to do so. Likewise, it will automatically be updated and re-calculated when inputs are changed (e.g. SOC=1.21 and AF=0.9 in figures 2(c) and 3(c)). Finally, the calculation factors header as shown in figures 2(c) and 3(c) simply show all the factors as the app calculated them. It can be used to review all the values found.     The values in table 1 for the diameter were selected to be one defined value, one value expressed in the expanded interpolated list, and one in-between values on the list. This way, the app's ability to perform look-ups and interpolation can be tested. The cone sizes were selected to see a range of REF values to insure the REF table was being used properly. As the other values do not use up a look-up table, they were kept constant. It is seen that the deviation between the monitor units calculated by the app (Windows and Android version) and the longhand is insignificant. This demonstrated that the app is accurate and precise to perform monitor unit calculation for skin therapy using kV photon beams.
The ability to easily calculate monitor unit with IoT such as mobile device used by radiation staff in the skin therapy group may be very useful, as it means the radiation oncologist can update what he/she thinks is the appropriate dose and have input from the medical physicist almost immediately. This can potentially allow procedures to be more tailored to each patient, and make the patient waiting periods shorter and easier to manage. The app can also be used by the public as a research tool to study the monitor unit calculation and photon beam dosimetry for superficial and orthovoltage skin therapy.

Conclusions
In conclusion, both the apps of Windows and Android version performed the monitor unit calculations properly. Both apps were capable of looking up the appropriate REF and BSF values from large tables, and interpolating data when necessary. They also both easily and quickly calculate the daily given dose, equivalent length or diameter, and the stand-off correction when needed. The apps are both significantly faster and slightly more accurate than doing the calculation long-hand. The apps' ease of use should mean there is less of a chance of making simple mistakes or propagating human error.

Data availability statement
The data that support the findings of this study are available upon request from the authors.