<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Smarterization of Medical Device using a CPS approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fábio Januário</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Lopes</string-name>
          <email>ca@uninova.pt</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vasco Delgado-Gomes</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Agostinho</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria Marques</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre of Technology and Systems</institution>
          ,
          <addr-line>UNINOVA, 2829-516 Caparica</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>NOVA School of Science &amp; Technology</institution>
          ,
          <addr-line>2829-516 Caparica</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The integration of health information in a clear and structured way, made available to the citizen who is the true owner of the data, is a crucial reality in Europe. Several digital health solutions contribute to this direction, with a diverse range of medical devices increasing their communication capability and gaining the ability to export data in a structured way and in accordance with health standards. The EU Smart4Health project aims to develop, test, and validate a platform for the citizen-centred health record with integrated abilities for aggregation of data, for data sharing and for data provision/donorship to the scientific community. Activities include upgrade of an existing medical device, a physiotherapy device, with real-time measurements and connectivity capabilities, meeting new medical device regulations. For this purpose, the B-Health IoT Box device was developed, which is responsible for collecting data from the sensors, processing this data, manage the trainings executed on the physiotherapy device and export the results in FHIR standard format.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Smart4Health</kwd>
        <kwd>digital health</kwd>
        <kwd>smart devices</kwd>
        <kwd>IoT</kwd>
        <kwd>data collection</kwd>
        <kwd>data integration</kwd>
        <kwd>interoperability</kwd>
        <kwd>FHIR</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        When it comes to health and health care, European Union identifies a key objective: empowering
citizens and building a healthier society through digital health relying in three main pillars: allow
citizens’ secure access to and sharing of health data across borders, better data to advance research,
disease prevention and personalised health and care, and promote digital tools for citizen
empowerment and person-centred care [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. To allow information exchange, integration and
digitalization of health and wellbeing data must comply to standards. Health standards such as
Continua Design Guidelines [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and HL7 FHIR [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] are a key. In this perspective, the medical devices
and the so-called personal health devices must follow these standards and ensure communication
capabilities with the electronic health records systems.
      </p>
      <p>
        Smart4Health project aims to develop, test, and validate a platform for the citizen-centred health
record with integrated abilities for aggregation of data, for data sharing and for data
provision/donorship to the scientific community [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. With the integration of data sources as one of the
objectives of the project, the smarterization of medical devices allows it conversion and adaptation in
order to fulfil the minimum interoperability requirements according to the standards used in the
project.
      </p>
      <p>This paper describes the smarterization of a medical device for health data collection. The medical
device is a physiotherapy device that will be equipped with a variety of sensors, correctly positioned
on the device to collect the required information. The IoT architecture that collects, manages, and
exports the training data from the physiotherapy device is presented as well as details on the
implementation of the B-Health IoT Box.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Motivation</title>
      <p>
        The most common cause of back pain is the weakness of the deep layer of lumbar muscles, a fact
proven by clinical studies that show that 70% of citizens have a weakness of this muscle [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. A
physiotherapy device can be used to train their deeper muscles, reinforcing them, and helping to
decrease the level of backpain. The training and the treatment consist of active strengthening and
stabilization of the entire spinal musculature through targeted and isolated exercises.
      </p>
      <p>The physiotherapy device used in Smart4Health is a MedX device (class II medical device), and it
is shown in Figure 1. This device has as main characteristics: correct fixation for the legs and pelvis,
isolation of the lumbar extensors, balance of upper body weight in gravity with the help of a
counterweight, and force and angle sensors.</p>
      <p>The training movement that the citizen should execute is between the maximum extension position
0º and the maximum flexed position 72º. The angle values and the force executed by the citizen when
the training is executed are the two required measurements. The treatment/prevention protocol used
consists of a weekly basis for 18 weeks to carry out the necessary exercises. This periodicity and the
lack of feedback throughout the treatment/prevention to show the citizen’s progress leads to the
dropout of several patients, around 40% [7].</p>
      <p>To contribute to the reduction of these values, in the Smart4Health project the smarterization of
this physiotherapy device was carried out, including sensorization, data acquisition and processing,
data export and user interface. The user interface allows citizen to follow all the processes, including
their range of motion, the strength of their lumbar musculature and their exercises in a simple and
intuitive way. In addition, the results obtained are compared with the expected reference values and
sent to the Smart4Health platform, made automatically available to the citizen.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Physiotherapy device smarterization</title>
      <p>
        The physiotherapy device smarterization follows a cyber-physical system approach divided by
layers as shown in Figure 2. In physical layer are all the sensors included in the physiotherapy device,
one sensor that measures the angle, another that measures the force in the back, and final a switch that
allows control commands. In addition to these sensors, were added additional sensors to update the
machine and provide additional information. Data collection layer has the B-Health IoT Box that is
responsible for data acquisition and processing, training management, and data upload. In this layer is
also the Health View software that provides a user interface dedicated to the citizen. Finally, in the
cloud layer are the Smart4Health platform and the HealthMonitor software. This software provides a
user interface to Smart4Health therapist, including patient management and visualization of training
results. HealthMonitor is also responsible for uploading the results of the training carried out by the
citizen for their Smart4Health account, using the Smart4Health connector. In this article we present
the UNINOVA developments shown in Figure 2. The remaining elements were developed by other
project partners [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>Approach for device sensorization</title>
      <p>The MedX physiotherapy device is delivered already with the angle sensor, force sensor and
switch. For update the device and provide useful and relevant information to the citizen and the
therapist were added additional sensors that provide feedback about the position of the citizen on the
machine. These additional sensors are placed on the level of head, back, hands, legs, and feet, as
shown in Figure 3 in green.</p>
      <p>Regarding the angle sensor, it is a potentiometer coupled to the machine. The switch is a simple
switch with to states, on or off. Regarding the force sensor, it is a load cell that measures the force in
the back. For the head, back and hands were added pressure sensors that are a type of tape that
changes its resistance with pressure. These sensors are used to inform if the citizen is putting some
pressure on these areas or not. In order to help the therapist in correctly adjust the citizen on the
machine, for the legs and feet were added load cells that provide a real value of force.</p>
      <p>
        From a general point of view, the B-Health IoT Box follows the Personal Connected Health
Alliance Continua Design Guidelines (CDG). The CDG provide a set of clearly defined interfaces that
enable the secure exchange of medical-grade data among sensors, gateways, and end services,
containing additional implementation guidelines that further clarify these standards and specifications
by reducing options in the underlying standard or specification or by adding features missing in the
underlying standard or specification [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>The B-Health IoT Box primarily acts as a gateway in CDG architecture by aggregating the data
from the sensors and transforming it into machine exercise information, exporting this information in
FHIR format. In addition, in the case of the physiotherapy medical device, the B-Health IoT Box also
acts as a Personal Health Device in this architecture. This is due to the fact that the sensors in the
machine are analog, and it is the B-Health IoT Box that provides the communication capabilities.</p>
    </sec>
    <sec id="sec-5">
      <title>4. Implementation</title>
      <p>In Figure 4 is shown an image of the B-Health IoT Box that was designed and printed on a 3D
printer taking into account all the physical interfaces necessary for the connection of the sensors. The
RS232 connection allows the connection of the sensors delivered with the machine (angle, force, and
switch), the RJ45 connection allows the network connection, the USB connection for power supply,
two 8-pin connectors for connecting leg and foot force sensors, and three 4-pin connectors for
connecting head, back and hand pressure sensors.</p>
    </sec>
    <sec id="sec-6">
      <title>Sensors selection and positioning</title>
      <p>The sensors used in the sensorization of the physiotherapy device are shown in Figure 5.
Regarding the angle sensor, it is a potentiometer coupled to the machine. Depending on the angle at
which the machine is, the potentiometer will have a certain resistance value. Powered the
potentiometer with a known voltage, the voltage at the output will be proportional to the resistance
value and angle value. The switch is a simple switch with to states, on or off. Regarding the force
sensor, it is a load cell that measures the force in the back. This sensor is powered at 5V and returns a
small voltage directly proportional to the applied force. When we use this type of sensors, we need an
amplifier to put the output signal in a voltage range that can be read.</p>
      <p>Regarding the additional sensors, are used two types of sensors. For the head, back and hands we
chose pressure sensors. These sensors are a type of tape that changes its resistance with pressure. To
collect this information, we use a voltage divider that will give a voltage proportional to the pressure,
however, this is not a linear behaviour. Thus, it is difficult to model this behaviour and have a real
force value. These sensors are used to inform if the citizen is putting some pressure on these areas or
not. To have a real value of force in the legs and feet, here we choose load cells. These sensors have a
different encapsulation but have the same operating mode as the force sensor. We chose these sensors
for the legs and feet to help the therapist in adjust the citizen to the machine.</p>
      <p>All sensors must be correctly placed on the physiotherapy device and connected to the B-Health
IoT Box, as shown in Figure 6. The pressure sensors are placed under the covers that cover the
machine parts. Regarding the leg sensors, they are fitted with a piece designed and printed in a 3D
printer. The foot sensors were placed in a hole drilled in the wood of the foot support.</p>
      <p>In order to transform the electrical voltages acquired from the sensors into useful information, it is
necessary to calibrate these sensors. In the case of the angle sensor, the machine is adjusted in three
predefined angle values (0º, 36º and 72º) in order to carry out a linear regression between the
potentiometer value and the corresponding angle value. In the case of load cells and pressure sensors,
the calibration process removes the offset to normalize the collected values.</p>
    </sec>
    <sec id="sec-7">
      <title>Software components</title>
      <p>IoT capabilities are achieved through the development of a set of software components deployed
in and running on B-Health IoT Box (see Figure 7). In the physical layer we have the machine sensors
already presented. The Health Gateway Collect developed in Java is responsible for these sensor data
acquisition, data processing and device manager. The Health Gateway Core developed in NodeJS is
responsible for services manager and data storage. This software manages all the exercises performed
on the physiotherapy device. As applications there is the Health Gateway Viewer developed in
nodeJS and the GamifyPhisio developed in react. The Health Gateway Viewer is responsible for
citizen and calibration interfaces. The GamifyPhisio, developed by a partner of Smart4Health, is
responsible for exercise interface, follow up exercise and exercise score. As interoperability
mechanism there is a REST API in Health Gateway Core that allows the communication with
HealthMonitor software. There is also the Health View that is a software developed in electron and
provides the user interface with the citizen during the exercises performed on the machine. This
software is provided by the web servers on Health Gateway Viewer and GamifyPhisio. Finally, the
BHealth IoT Box also have the capability of export the training results to other platforms in FHIR
structure. Regarding the communications between all the components, it is handled using a MQTT
instance, in this case the mosquito, which is widely used in IoT architectures.</p>
      <p>All training management performed on the physiotherapy device is carry out by sate machines
(Figure 8) in the Health Gateway Core as its main function. The movement test allows the calculation
of the citizen's range of motion with three main states: extension, flexion and zero position. The
counterweight test allows the calculation of the counterweight that is necessary to compensate the
weight of the citizen. In this test is necessary lock the counterweight on zero position and adjust it in
extension position to have zero force. The force test allows the measurement of back strength at
available angles, providing a check-up. For this, the citizen must stay locked in these angles and make
maximum force. Finally, the exercise allows the strengthening of the lumbar muscles by performing a
movement between the angle of extension and flexion during a certain time interval and with a certain
associated weight.</p>
    </sec>
    <sec id="sec-8">
      <title>5. Test and validation</title>
    </sec>
    <sec id="sec-9">
      <title>6. Conclusions and future work</title>
      <p>In this paper we share all the steps carried out in the smarterization of a physiotherapy machine,
from the choice of sensors to the data acquisition system and the interoperability with cloud
platforms. The main contribution is the B-Health IoT Box that is currently used in the context of the
Smart4Health project on 11 physiotherapy devices. All the functions described in this paper are
implemented and functional, providing training data to the citizens through the Smart4Health
platform. Despite the specificity related to the physiotherapy device in Smart4Health, the B-Health
IoT Box was designed and developed following an IoT approach that allows it to be easily adapted to
other environments and projects. In fact, we use the box in other projects, continuing to enable the
acquisition of sensor data, its processing, and its export.</p>
    </sec>
    <sec id="sec-10">
      <title>7. Acknowledgements</title>
      <p>This work has been developed in the context of Smart4Health project. This project has received
funding from the European Union’s Horizon 2020 research and innovation programme under grant
agreement No 826117.</p>
    </sec>
    <sec id="sec-11">
      <title>8. References</title>
      <p>[7] T. Sahar, M. J. Cohen, V. Neeman, L. Kandel, D. O. Odebiyi, I. Lev, M. Brezis, A. Lahad,
Insoles for prevention and treatment of back pain, Cochrane Database System Review 4 (2007)
CD005275. doi: 10.1002/14651858.CD005275.pub2.
[8] Smart Bear Project, SMART-BEAR: Smart Big Data Platform to Offer Evidence-based
Personalised Support for Healthy and Independent Living at Home, 2021, URL:
https://www.smart-bear.eu/.
[9] HL7 FHIR, Resource DiagnosticReport - Content, 2022. URL: https://www.hl7.org/fhir/
diagnosticreport.html/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Digital</given-names>
            <surname>Health</surname>
          </string-name>
          <string-name>
            <surname>Europe</surname>
          </string-name>
          ,
          <source>DigitalHealthEurope recommendations on the European Health Data Space</source>
          ,
          <year>2022</year>
          . URL: https://digitalhealtheurope.eu/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Personal</given-names>
            <surname>Connected Health Alliance</surname>
          </string-name>
          ,
          <source>Fundamentals of Medical-Grade Data Exchange</source>
          ,
          <year>2018</year>
          . URL: https://www.pchalliance.org/sites/pchalliance/files/Fundamentals_MedicalGrade_Data_Exchange_Sep2018.pdf
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>HL7</surname>
            <given-names>FHIR</given-names>
          </string-name>
          , Welcome to FHIR,
          <year>2022</year>
          . URL: https://www.hl7.org/fhir/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <issue>Smart4Health</issue>
          ,
          <article-title>Citizen-centred EU-EHR exchange for personalized health</article-title>
          ,
          <year>2021</year>
          . URL: https://www.smart4health.eu/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Delgado-Gomes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Januário</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Vilhena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Marques</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Jardim-Goncalves</surname>
          </string-name>
          ,
          <article-title>Sensor network integration for a medical device using CDG</article-title>
          ,
          <source>in: IEEE International Symposium on Measurements &amp; Networking</source>
          ,
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          , New York,
          <year>2019</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          . doi:
          <volume>10</volume>
          .1109/IWMN.
          <year>2019</year>
          .
          <volume>8805010</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>MedX</given-names>
            <surname>Medical</surname>
          </string-name>
          <string-name>
            <surname>Machine</surname>
          </string-name>
          ,
          <source>Theory and Operation</source>
          ,
          <year>2017</year>
          . URL: https://www.medxonline.de/wpcontent/uploads/2017/03/01_theory_oper.pdf.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>