Origin

Welcome to SimTIVA blog. 

SimTIVA is a program which simulates the behaviour of a target-controlled infusion pump. It is similar to other existing programs, such as TIVA trainer on PC's, and iTIVA on smartphones. But the major differences are: SimTIVA is completely free; and also it can be run on any browser, on computers and smartphones.

Origin of the project

The idea started in October 2020, almost one year ago. At that time, I have already developed a paediatric calculator app, which has branched off into anaesthetist's and paediatric intensivist's versions (you can read more about the paediatric calculator project here). I wanted to use the experience for something else, something more. 

The clinical question is like this. If you give propofol, after a bolus, it enters the bloodstream and will eventually reach the brain (the effect site) and exert its anaesthetic effect. The plasma concentration and the effect site concentration are expressed as CP and CE respectively. As an anaesthetist, we use our experience to "guesstimate" how much to give for the desired effect; for example, in an old frail patient we expect the dose required would be less and the drug effect would be slower. But how, in terms of mathematics, do I predict the CP (plasma concentration) and the CE (effect site concentration) at a certain time? There are target controlled infusion pumps (TCI pumps) available for use, which will give you the answer to these questions. But what if we do not have access to these pumps, and what if you prefer manually bolusing and infusing propofol? Also, with the new advances in pharmacological models, such as the general model by Eleveld, commercially available TCI pumps could not keep up with trends in modern and perhaps better models.

The idea for the app is like this. I named the app SimTIVA. It simulates the behaviour of a TCI pump. In CP or CE targeting mode, you set the desired concentration (like on a pump) and the app will deliver that for you. The app does not have a physical connection to a syringe driver - so all that it can do is "simulation" - it simulates what happens if you enter a certain CP or CE target in a pump. What's more, there is a "manual" mode in which you can enter your desired bolus and infusion rate and the app will calculate the CP and CE (across time) for you.

App development process

App development can be thought of in this way: 

IDEA → CODING → USER INTERFACE → APP 

Just programming is not sufficient, I have to make the app as user friendly as possible. A good user interface and user experience is key - the user has the power to control the elements of the app, interact with it, and only then the app can become useful. The programming (for anaesthetic related drug calculators) is therefore as important as the user interface - the data must be displayed in a comfortable and clear manner. 

All my programming is self-taught using free online resources. I am not an expert coder, I am only a hobbyist. But from what I read, coding is also full of personal flavours and there is no strict right or wrong answer to a programming question. What still intrigues me is to combine my programming knowledge with my anaesthetic knowledge and put them together in a useful app.

Brief explanation of TCI and its mathematics

The fundamentals of TCI is not difficult. For example in CP targeting, a bolus is given to fill the central compartment, and a decremental infusion scheme is used to achieve and maintain a desired target concentration in the plasma. The infusion scheme (a set of infusion rates) is accounts for drug clearance (irreversible elimination from the body) and inter-compartmental transfer (to other tissues away from the bloodstream) and because inter-compartmental transfer will decrease over time, the infusion scheme is also decremental.

But the mathematics behind are not so easy. The equations and the calculations have been described elsewhere and I will not attempt to summarize it here. Basically, the data set collected from patients are used to form mathematical models, and these models in term can have multiple applications, one of which is to allow TCI. 

DATA → MODELS → APPLICATION

Scientists collect many data from subjects regarding drug concentrations after drug administration, and then describe the pharmacokinetics and pharmacodynamics of these behaviours in a mathematical model. The model often involves sizes of different compartments of the body and the rate of transfer across these compartments. What TCI is, basically is to put the model into a clinical application, that is to administer the drug in an accurate manner to achieve and maintain a desired concentration (CP or CE).

Free for all

SimTIVA is completely free and will remain free. I am truly inspired by projects like openTCI, where I have found the source code to STANPUMP. This program was written by Dr. Steven Shafer many years ago and its pharmacological formulas and equations were used to power SimTIVA (more on this part later). It is my wish to share SimTIVA to whoever finds it useful. I am also motivated by free software projects, including the idea of Free Software Foundation, which defined free software as having the freedom to run, study, redistribute, and improve on the program. This is a truly wonderful idea - good things to be shared with the world for free!

After all, the pharmacological models for TCI (such as Marsh, Schinder) are freely available, and the programming of the mathematics to drive the infusion is also freely available (see openTCI), it is only logical that someone should write a free app to package all these together to deliver TCI. With the popularity of smartphones and advances in computing power of the mobile browser, it is nowadays practical to package this software as a web app.

Start of a journey

This blog will chronicle the ideas and processes of developing SimTIVA and other interesting observations while testing and running this app. The project is not complete. 

You are welcome to share your thoughts and feedback on the feedback page or fill in a contact form if you wish to contact the author.

Comments

Post a Comment

Popular posts from this blog

Major Update

Progressive Web App: Why?