Progressive Web App: Why?

SimTIVA is a progressive web app (PWA). For those unfamiliar with this term, PWA's are are web apps built and enhanced with modern APIs to deliver enhanced capabilities, reliability, and installability while reaching anyone, anywhere, on any device, all with a single codebase (from web.dev).

Why progressive web app and not just an ordinary app?

Users are often confused by this question, why isn't SimTIVA put on App Stores (Google Play, Apple App Store) like many other apps? In fact, modern web browser technology has become so mature in recent years that a "web app" can function within the browser window very much like an app you install from App Store on your smartphones. The trend is quite remarkable. If you have experienced using some of these progressive web app products, such as Google News, or Spotify Web Player, the web app looks and works like an app you install from the App Store. The major advantages of having SimTIVA as a web app are:
  1. No restrictions imposed by App Store owners e.g. Apple, Google:
    The tech giants have a rigorous vetting process especially on products involving drug information
  2. Simple programming and deployment process:
    As an app developer, I do not need to code for a specific platform (Android, vs iOS) to ensure that the app works for a specific device. Developing a "web app" is no different from writing a webpage - using existing web technologies such as HTML, CSS, and javascript - making app development fast and simple
  3. Good functionality for most purposes:
    The basic functionality of SimTIVA is app-guided TIVA. The most important function is letting the user input the patient data, dosing information (CP/CE target, or bolus/infusion dose), and output the dynamic time-dependent information (CP, CE, infusion rate, current elapsed time, volume infused, and a real-time chart) on the screen. For this basic functionality, we do not need an App Store installable app to do this, as a normal webpage will suffice. Additional features such as device notification, screen wake-lock, sound; these are enabled through the technology (APIs) that power the progressive web app. The support for these additional features vary from device to device; Apple has been quite reluctant to support many of such features.

What are the components of this SimTIVA web app?

As mentioned before, the programming is done with HTML, CSS and Javascript. There are no complex CSS or Javascript frameworks used. The components of the SimTIVA web app are:
  • TCI functions from STANPUMP
    STANPUMP was coded in C, by Dr. Shafer, and available freely from opentci.org. An analysis of the mathematical solutions to TCI was described in Bailey and Shafer 1991. SimTIVA uses extensively the code in STANPUMP to do the mathematical calculations. Without STANPUMP, it would not be possible to have CP/CE targeting, or CP/CE prediction in manual mode. A lot of these functions (in C) are transcribed to similar functions in Javascript.
  • Pharmacokinetic and pharmacodynamic datasets
    The PK data (compartments, rate constants) and PD data (ke0) are from published literature. You can find the references from "Documentation", or the journal articles listed under "Model Parameters".
  • Charting function
    A chart showing CP/CE over time is an essential part of the display to the user, as graphical representation of the time course of TCI simulation would be highly useful. The charting engine is ChartJS. A major upgrade from ChartJS v2 to v3 was done in early 2022 and this broke backwards compatibility and the corresponding SimTIVA charting function has to be re-written. I also wrote customized code to enable zoom-in-zoom-out, event marker display, tooltip showing CP/CE/drug data as you drag across the chart. I find the chart very useful as it predicts the time course and trajectory of current infusion schemes.
  • Native Javascript APIs enable a rich feature set
    Screen wakelock - Wakelock API is used to keep screen awake on Android and some desktop devices e.g. MacBook
    Notifications - Notification API sends system notification to smartphones
    Canvas - Javascript Canvas API is used by ChartJS for chart graphics generation; and this API has convenient function to convert to image, as used by the "Download Image" in "Share/Save" module
    Web share - Web share API is for sharing the web-link on smartphones
    Local Storage - the SimFiles are automatically saved as a key-value pair inside LocalStorage, via the native LocalStorage API which is available on all major modern browsers
  • Various programming and design resources
    LZString - for string compression for share/save module
    Font Awesome - Icons are provided by Font-Awesome 5.
    Font - Source Sans, a free font from Adobe.
  • Other resources
    WHO Growth Standards - the reference for data validation for a child's weight/height

Comments

  1. Hi. Another advantage is that you can open two simulations simultaneously, for example, propofol and remifentanil

    ReplyDelete
  2. Thank you for your kind words. We are now developing a two-drug regimen, or a drug interaction module that not only allows you to run propofol+remifentanil infusions at the same time, but also visualize their PD interactions. Stay tuned!

    ReplyDelete

Post a Comment

Popular posts from this blog

Origin

Major Update