<!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>Rapid Prototyping of Mobile Apps for Clinical Research using Semantic Web Technologies ?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Oshani Seneviratne</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>William Van Woensel</string-name>
          <email>william.van.woensel@dal.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Loseto</string-name>
          <email>giuseppe.loseto@poliba.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Floriano Scioscia</string-name>
          <email>floriano.scioscia@poliba.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Evan W. Patton</string-name>
          <email>ewpatton@mit.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lalana Kagal</string-name>
          <email>lkagal@mit.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dalhousie University</institution>
          ,
          <addr-line>Halifax NS B3H 4R2</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Massachusetts Institute of Technology</institution>
          ,
          <addr-line>Cambridge MA 02143</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Polytechnic University of Bari</institution>
          ,
          <addr-line>70126 Bari BA</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Rensselaer Polytechnic Institute</institution>
          ,
          <addr-line>Troy NY 12180</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper provides a demo of the Punya framework, introduced in our resource track paper titled “The Punya Platform: Building Mobile Research Apps with Linked Data and Semantic Features.” In this demo, we focus on using the Punya framework to build clinical research apps with a particular focus on Type 2 diabetes research. We demonstrate how Semantic Web and biomedical researchers can utilize Punya to rapidly prototype mobile semantic apps. Apps developed with Punya can consume Linked Data, thus exploiting the vast biomedical data sources available on the Web; while producing RDF from the app for downstream analysis. Researchers can also write semantic rules to encode clinical guideline recommendations in a visual manner within the Punya framework. Due to the intuitive and visual editing environment, researchers can easily tweak complex decision-logic rules. Submission Type: Demo Link: https://punya.mit.edu/#use-cases</p>
      </abstract>
      <kwd-group>
        <kwd>Mobile App Development</kwd>
        <kwd>Research Apps</kwd>
        <kwd>Clinical Apps</kwd>
        <kwd>Linked Data</kwd>
        <kwd>Semantic Rules</kwd>
        <kwd>Rapid Prototyping</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Punya is a Semantic Web-enabled app development framework built on top of
MIT App Inventor [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The user-friendly, block-based programming paradigm
provided in MIT App Inventor allows even non-programmers to quickly and
easily create Android mobile apps. Specifically, the designer view allows users
to drag-and-drop visual objects to create a user interface, whereas the block
view allows users to “piece” together application logic using control, text, math,
? Copyright ©2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
and other operators as puzzle pieces. Punya adds semantic capabilities to MIT
App Inventor, including reading and writing Linked Data, semantic reasoning,
and connecting to sensors using both low-level Bluetooth APIs and high-level
Linked Data Platform over Constrained Application Protocol (LDP-CoAP) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Advanced capabilities include an embedded semantic rule engine, visual editor
for authoring semantic rules, and integrating GraphQL and SPARQL to access
and query remote graph data. Leveraging Linked Data enables developers to
reuse the thousands of valuable datasets from the Linked Open Data cloud in
their mobile apps; while the generated Linked Data can be analyzed, combined
and integrated with other Linked Data (e.g., generated by other apps).
      </p>
      <p>
        As smartphones have become pervasive, many clinical researchers are
looking to utilize patients’ mobile context to improve the self-management of
diseases and gain behavioral insights. Semantic Web technologies have been widely
adopted in healthcare research to support these efforts [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Moreover, many
ontologies and Semantic Web resources are usable off-the-shelf. Using Punya,
researchers can rapidly prototype mobile semantic apps that consume such
semantic biomedical data, implement local decision logic, and produce RDF data
directly from the app itself. We note that the generated RDF data further
contributes to the Linked Data Cloud and may thus provide an answer to the
perennial chicken-and-egg problem on data generation in the Semantic Web [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
2
      </p>
      <p>Clinical Research Application Development with Punya
As an example use case for Punya in
action, we illustrate how a clinical researcher
working with Type 2 Diabetes (T2D)
patients can quickly prototype a mobile app.</p>
      <p>
        T2D is a health condition affecting a
significant proportion of the world population [
        <xref ref-type="bibr" rid="ref7 ref8">8,7</xref>
        ].
      </p>
      <p>
        The importance of behavior change in
selfmanaging T2D is well recognized, and a
variety of psychological theories may be applied
(e.g., Social Cognitive Theory, Cognitive
Behavioral Therapy). Moreover, context-specific
interventions can be offered on smartphones
in many different ways (e.g., using different
modalities). These factors point towards the
need for rapid prototyping of a variety of
mobile self-management approaches, and
evaluating their effectiveness. Furthermore, given
that there is no one-size-fits-all solution for
behavior modification, many clinical researchers Fig. 2: A semantic rule that
dehave turned to personalized apps, which ef- termines if a given food item is
fectively capture patient data and relay any suitable for a vegan individual
notifications as per the patients’ needs and based on the food’s classification
context. available in FoodOn [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Using nutrition behavior as a focus, we
demonstrate how existing ontologies such as
FoodOn [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] can be used to capture a patient’s daily food intake using a mobile
app developed using Punya as shown in Fig. 1. The screen on the left-hand side
shows the user interface where a user can input the meal name and the serving
size. Once the information is input to the app, the nutritional content is
autopopulated from external sources such as the FoodKG [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The right-hand side
image in Fig. 1 shows the RDF data of the user’s food log that is generated when
the form is submitted. This RDF food log may be saved on the phone or
submitted to an external data endpoint. As can be seen in the figure, Punya allows
querying external data sources: when the user enters “steak,” the app queries
FoodOn and ascertains it is a food type of Animal Origin. By exploring the food
type hierarchy in FoodOn for a given food item, we can identify a substitution
for steak in case the user is sharing the meal with someone who is maintaining
a particular type of diet, such as a vegan diet as they cannot consume a food
type of Animal Origin. Understanding and capturing context this way, with data
augmented by the Linked Data cloud, can provide additional benefits. Extending
the previous idea, Fig. 2 demonstrates a rule set that can be used to determine
whether a vegan user can consume a given food item. The rule could be further
extended to determine a substitution food category for the user.
      </p>
      <p>
        Additionally, as some diabetic patients are required to take insulin, there is
a need to determine the correct insulin dosage based on specific parameters
of the patient, such as blood glucose levels, height, weight, etc. At the same
time, certain foods high in a particular nutrient may have a contraindication
with the drug being taken. For example, if a researcher is studying whether
protein in a diabetic patient has a contraindication with insulin administered,
the researcher could utilize a rule such as the one give given in Fig. 3. The visual
semantic rule could easily be tweaked with the threshold for a specific patient
population studied. By using the food input from Fig. 1, and the auto-populated
protein value from the FoodKG [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the Punya semantic reasoner can provide a
recommendation as to whether this particular food item is suitable or not for the
user. This visual format makes rule authoring much more accessible to clinical
researchers, who may not be well-versed in Semantic Web technologies such as
RDF and OWL. Furthermore, the output from this rule could be wired into the
UI of Fig. 1 to alert the user if needed.
Apple provides a software framework called ResearchKit [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] that lets medical
researchers develop surveys, forms, and activities to gather study data. However,
it is beyond its scope to query online health data sources, implement complex
application logic, or support semantic technologies. In contrast, the Punya
platform provides a convenient drag-and-drop environment for researchers to quickly
prototype their ideas and easily access Linked Data resources. Node-RED [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
provides a browser-based editor to wire up event-based Internet of Things (IoT)
applications quickly, with a similar drag-and-drop interface. However, Node-RED
focuses on setting up data flows, including IoT devices and online services, while
Punya focuses on prototyping mobile (research) apps with a fully-fledged UI and
Semantic Web support.
4
      </p>
    </sec>
    <sec id="sec-2">
      <title>Conclusion</title>
      <p>This paper demonstrates how mobile research apps in the clinical space could
benefit from Punya, with a simple meal input and clinical reasoning example.
Other features in Punya, such as LDP-CoAP, can be used to quantify patient
behaviors (e.g., medication adherence) more objectively by relying on pervasive
sensors (e.g., smart pillbox) rather than inaccurate personal reporting. In
conclusion, Punya provides an easy-to-use framework for developing mobile (research)
apps in many domains. We have included comprehensive documentation with
Punya and have provided sample apps in our online resource. The Punya
framework also includes built-in tutorials to assist anyone who wants to get started
with rapid app development.</p>
    </sec>
    <sec id="sec-3">
      <title>Acknowledgements</title>
      <p>This work is partially supported by IBM Research AI through the AI Horizons
Network, and University of New Brunswick Research Fund Competition 2020
(RF Explore).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Apple</given-names>
            <surname>Inc</surname>
          </string-name>
          .: ResearchKit, http://researchkit.org/
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dooley</surname>
          </string-name>
          et al.:
          <article-title>Foodon: a harmonized food ontology to increase global food traceability, quality control and data integration</article-title>
          .
          <source>NPJ Science of Food</source>
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Haussmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seneviratne</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ne</surname>
            'eman,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Codella</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>C.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaki</surname>
            ,
            <given-names>M.J.:</given-names>
          </string-name>
          <article-title>Foodkg: a semantics-driven knowledge graph for food recommendation</article-title>
          .
          <source>In: International Semantic Web Conference</source>
          . pp.
          <fpage>146</fpage>
          -
          <lpage>162</lpage>
          . Springer (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hogan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The semantic web: Two decades on</article-title>
          .
          <source>Semantic Web</source>
          <volume>11</volume>
          (
          <issue>1</issue>
          ),
          <fpage>169</fpage>
          -
          <lpage>185</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Loseto</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ieva</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gramegna</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruta</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scioscia</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Di Sciascio</surname>
          </string-name>
          , E.:
          <article-title>Linked Data (in low-resource) Platforms: a mapping for Constrained Application Protocol</article-title>
          . In: International Semantic Web Conference. pp.
          <fpage>131</fpage>
          -
          <lpage>139</lpage>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Node-RED community:</surname>
          </string-name>
          Node-RED:
          <article-title>Low-code programming for event-driven applications</article-title>
          , https://nodered.org
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Sharma</surname>
            ,
            <given-names>N.C.</given-names>
          </string-name>
          :
          <article-title>Government survey found 11.8% prevalence of diabetes in india</article-title>
          .
          <source>LiveMint</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>US</surname>
            <given-names>CDC</given-names>
          </string-name>
          :
          <article-title>National diabetes statistics report (</article-title>
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Wolber</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abelson</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Democratizing computing with app inventor</article-title>
          .
          <source>GetMobile: Mobile Computing and Communications</source>
          <volume>18</volume>
          (
          <issue>4</issue>
          ),
          <fpage>53</fpage>
          -
          <lpage>58</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Zenuni</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raufi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ismaili</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ajdari</surname>
          </string-name>
          , J.:
          <article-title>State of the Art of Semantic Web for Healthcare</article-title>
          .
          <source>Procedia-Social and Behavioral Sciences</source>
          <volume>195</volume>
          ,
          <fpage>1990</fpage>
          -
          <lpage>1998</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>