time. These data can be divided into two groups:
streaming and constant. Streaming data require reg-
ular input and include blood glucose, alcohol, carbo-
hydrates, weight, insulin, time and date, place of ad-
ministration, physical activity, stress and illness. The
constant data include such indicators as age, gender,
type of diabetes.
Some of these data can only be obtained by man-
ually entering it by a patient, others can be obtained
automatically. Information about blood glucose can
be obtained in two ways:
• after measuring blood glucose with a glucome-
ter. A patient can either enter data manually or
synchronize data with the system using Bluetooth
technology (if supported by the meter);
• with a continuous glucose monitoring system.
The monitor measures blood sugar every 10 sec-
onds and records the average value every 5 min-
utes.
After measuring the weight, the patient can either
enter the data or synchronize the data with the sys-
tem using Bluetooth technology (if supported by the
scale).
Information about physical activity has a differ-
ent nature of collection, one of which is the synchro-
nization of data from an external device such as a fit-
ness tracker – a gadget that, in most cases, is worn on
the hand and has built-in sensors that monitor activity
during the day, including: number of steps, heart rate,
sleep, calories burned, etc. An analogue of a fitness
tracker is data collection using an application installed
on the user’s smartphone, or the user can simply enter
data about daily activity manually.
If the data is entered manually, also the time and
date are required to be entered. If the data comes from
other devices or applications, it already contains time
and date information.
For developing the mathematical module of the
system metrics and methods for obtaining them were
determined.
Sokol et al. (Sokol et al., 2014) proposed the prin-
ciple of applying mathematical modeling to calculate
optimal insulin therapy. Bhonsle and Saxena (Bhon-
sle and Saxena, 2020) analyze various mathematical
models – despite the large number of mathematical
models, they are all based on one of two original
basic models: the model of the oral glucose toler-
ance test (OGTT) developed by Beaulieu in 1961 and
the model of the intravenous glucose tolerance test
(IGTT) by Bergman-Kobelli (Bergman et al., 1979).
The Beaulieu model is narrow in use, in particular,
it is generally unsuitable for describing the exponen-
tial decline of the glycemic curve of IGTT. The main
disadvantage of the IGTT model, in contrast to the
Beaulieu model, is that insulin is an input variable,
the value of which is determined clinically.
The mathematical model proposed by Shirokova
and Shirokov (Shirokova and Shirokov, 2006) is
based on the ratio of glucose balance and insulin con-
centration in human blood over a certain period of
time and improved by Bolodurina et al. (Bolodurina
et al., 2020).
Therefore, the experimental determination of
glycemic characteristics of insulin is as follows:
knowing the initial level of glucose in the blood, as
well as its integral characteristics, it is possible to
choose the right amount of insulin.
4.2 Design and Developing the
Algorithms of the System
For design and developing the automated diabetes
control system functional requirements were defined:
• User registration and authentication must be pro-
vided in the system;
• Data storage: the system must store information
and allow the user to manage it;
• Keeping a diary of self-control: entering and edit-
ing data of physical activity, medication and food;
• Analytics review: the system should provide the
ability to review analytics for the selected period.
The algorithm of the automated diabetes control
system is presented in figure 1. First, the user gets
to the authorization screen, if he is registered, he can
immediately pass it and get to the main screen. Oth-
erwise, it is necessary to go through the registration
process by filling out a standard form, the entered data
are checked for validity and entered into the appropri-
ate collection in the database.
Once on the home screen, the user can immedi-
ately view the statistics. The user can also go to
the screen with analytics, where the information for
a specified period is displayed. To work with entries,
the diary screen with the functions of viewing, adding,
deleting and editing entries is available. It is possible
to set user settings, medication and glucose level. The
data entered by the user when making changes to the
settings or when working with diary entries are en-
tered into the database.
On the main screen it is possible to add a new di-
ary entry by clicking on the correspondent button. On
the opened modal window with a form current time
and date are passed. After the user enters the data, val-
idation and synchronization with the database are per-
formed and the user is redirected to the home screen
The System of Automated Diabetes Control
43