<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "http://dtd.nlm.nih.gov/publishing/2.0/journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.0" xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">JFR</journal-id>
      <journal-id journal-id-type="nlm-ta">JMIR Form Res</journal-id>
      <journal-title>JMIR Formative Research</journal-title>
      <issn pub-type="epub">2561-326X</issn>
      <publisher>
        <publisher-name>JMIR Publications</publisher-name>
        <publisher-loc>Toronto, Canada</publisher-loc>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="publisher-id">v8i1e51013</article-id>
      <article-id pub-id-type="pmid">38776539</article-id>
      <article-id pub-id-type="doi">10.2196/51013</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Tutorial</subject>
        </subj-group>
        <subj-group subj-group-type="article-type">
          <subject>Tutorial</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Using a Semiautomated Procedure (CleanADHdata.R Script) to Clean Electronic Adherence Monitoring Data: Tutorial</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="editor">
          <name>
            <surname>Mavragani</surname>
            <given-names>Amaryllis</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Bartlett</surname>
            <given-names>Rebecca</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Burnier</surname>
            <given-names>Michel</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib id="contrib1" contrib-type="author" equal-contrib="yes">
          <name name-style="western">
            <surname>Bandiera</surname>
            <given-names>Carole</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <xref rid="aff2" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-9996-3100</ext-link>
        </contrib>
        <contrib id="contrib2" contrib-type="author" equal-contrib="yes">
          <name name-style="western">
            <surname>Pasquier</surname>
            <given-names>Jérôme</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff3" ref-type="aff">3</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-5554-2988</ext-link>
        </contrib>
        <contrib id="contrib3" contrib-type="author">
          <name name-style="western">
            <surname>Locatelli</surname>
            <given-names>Isabella</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff3" ref-type="aff">3</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-0870-1461</ext-link>
        </contrib>
        <contrib id="contrib4" contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Schneider</surname>
            <given-names>Marie P</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <address>
            <institution>School of Pharmaceutical Sciences</institution>
            <institution>University of Geneva</institution>
            <addr-line>Rue Michel-Servet 1</addr-line>
            <addr-line>Geneva, 1205</addr-line>
            <country>Switzerland</country>
            <phone>41 223795316</phone>
            <email>marie.schneider@unige.ch</email>
          </address>
          <xref rid="aff2" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-7557-9278</ext-link>
        </contrib>
      </contrib-group>
      <aff id="aff1">
        <label>1</label>
        <institution>School of Pharmaceutical Sciences</institution>
        <institution>University of Geneva</institution>
        <addr-line>Geneva</addr-line>
        <country>Switzerland</country>
      </aff>
      <aff id="aff2">
        <label>2</label>
        <institution>Institute of Pharmaceutical Sciences of Western Switzerland</institution>
        <institution>University of Geneva</institution>
        <addr-line>Geneva</addr-line>
        <country>Switzerland</country>
      </aff>
      <aff id="aff3">
        <label>3</label>
        <institution>Center for Primary Care and Public Health</institution>
        <institution>University of Lausanne</institution>
        <addr-line>Lausanne</addr-line>
        <country>Switzerland</country>
      </aff>
      <author-notes>
        <corresp>Corresponding Author: Marie P Schneider <email>marie.schneider@unige.ch</email></corresp>
      </author-notes>
      <pub-date pub-type="collection">
        <year>2024</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>22</day>
        <month>5</month>
        <year>2024</year>
      </pub-date>
      <volume>8</volume>
      <elocation-id>e51013</elocation-id>
      <history>
        <date date-type="received">
          <day>19</day>
          <month>7</month>
          <year>2023</year>
        </date>
        <date date-type="rev-request">
          <day>28</day>
          <month>12</month>
          <year>2023</year>
        </date>
        <date date-type="rev-recd">
          <day>15</day>
          <month>1</month>
          <year>2024</year>
        </date>
        <date date-type="accepted">
          <day>5</day>
          <month>2</month>
          <year>2024</year>
        </date>
      </history>
      <copyright-statement>©Carole Bandiera, Jérôme Pasquier, Isabella Locatelli, Marie P Schneider. Originally published in JMIR Formative Research (https://formative.jmir.org), 22.05.2024.</copyright-statement>
      <copyright-year>2024</copyright-year>
      <license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/">
        <p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Formative Research, is properly cited. The complete bibliographic information, a link to the original publication on https://formative.jmir.org, as well as this copyright and license information must be included.</p>
      </license>
      <self-uri xlink:href="https://formative.jmir.org/2024/1/e51013" xlink:type="simple"/>
      <abstract>
        <sec sec-type="background">
          <title>Background</title>
          <p>Patient adherence to medications can be assessed using interactive digital health technologies such as electronic monitors (EMs). Changes in treatment regimens and deviations from EM use over time must be characterized to establish the actual level of medication adherence.</p>
        </sec>
        <sec sec-type="objective">
          <title>Objective</title>
          <p>We developed the computer script CleanADHdata.R to clean raw EM adherence data, and this tutorial is a guide for users.</p>
        </sec>
        <sec sec-type="methods">
          <title>Methods</title>
          <p>In addition to raw EM data, we collected adherence start and stop monitoring dates and identified the prescribed regimens, the expected number of EM openings per day based on the prescribed regimen, EM use deviations, and patients’ demographic data. The script formats the data longitudinally and calculates each day’s medication implementation.</p>
        </sec>
        <sec sec-type="results">
          <title>Results</title>
          <p>We provided a simulated data set for 10 patients, for which 15 EMs were used over a median period of 187 (IQR 135-342) days. The median patient implementation before and after EM raw data cleaning was 83.3% (IQR 71.5%-93.9%) and 97.3% (IQR 95.8%-97.6%), respectively (Δ+14%). This difference is substantial enough to consider EM data cleaning to be capable of avoiding data misinterpretation and providing a cleaned data set for the adherence analysis in terms of implementation and persistence.</p>
        </sec>
        <sec sec-type="conclusions">
          <title>Conclusions</title>
          <p>The CleanADHdata.R script is a semiautomated procedure that increases standardization and reproducibility. This script has broader applicability within the realm of digital health, as it can be used to clean adherence data collected with diverse digital technologies.</p>
        </sec>
      </abstract>
      <kwd-group>
        <kwd>medication adherence</kwd>
        <kwd>digital technology</kwd>
        <kwd>digital pharmacy</kwd>
        <kwd>electronic adherence monitoring</kwd>
        <kwd>data management</kwd>
        <kwd>data cleaning</kwd>
        <kwd>research methodology</kwd>
        <kwd>algorithms</kwd>
        <kwd>R</kwd>
        <kwd>semiautomated</kwd>
        <kwd>code</kwd>
        <kwd>coding</kwd>
        <kwd>computer science</kwd>
        <kwd>computer programming</kwd>
        <kwd>medications</kwd>
        <kwd>computer script</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec sec-type="introduction">
      <title>Introduction</title>
      <p>Patient adherence to medication may be suboptimal, as it is estimated that only 50% to 70% of patients take their medications regularly as prescribed [<xref ref-type="bibr" rid="ref1">1</xref>]. Medication nonadherence leads to poor clinical outcomes [<xref ref-type="bibr" rid="ref1">1</xref>-<xref ref-type="bibr" rid="ref3">3</xref>], additional hospitalizations [<xref ref-type="bibr" rid="ref4">4</xref>], and increased health care costs [<xref ref-type="bibr" rid="ref1">1</xref>]. Medication adherence is defined as the extent to which a patient takes the medication as prescribed by the provider, ideally based on a shared decision-making process. It is characterized by the initiation (ie, the patient takes the first dose), implementation (ie, the extent to which the patient takes the prescribed regimen according to the recommended dose, timing, and regimen), and discontinuation (ie, the patient stops taking the treatment earlier than planned with the prescriber) of the medication [<xref ref-type="bibr" rid="ref5">5</xref>]. Treatment persistence is characterized by the time elapsed between initiation and discontinuation. Medication adherence can be assessed through measurement methods that are subjective (ie, patient self-report questionnaires) or objective (ie, medication refill and interactive digital technology such as electronic monitors [EMs]) [<xref ref-type="bibr" rid="ref6">6</xref>,<xref ref-type="bibr" rid="ref7">7</xref>].</p>
      <p>The EM is an interactive digital health technology, considered a gold standard for measuring medication implementation [<xref ref-type="bibr" rid="ref8">8</xref>,<xref ref-type="bibr" rid="ref9">9</xref>]. The medication event monitoring system (MEMS; MEMS and MEMS Adherence Software, AARDEX Group) is an example of an EM. It is a pill bottle with a chip located in the EM cap, registering the date and time of each EM opening, which is considered a proxy for the date and time of each consecutive medication intake. A MEMS pill bottle contains medication, and a patient can use one or several MEMS at a time. Despite the advantages of using EM (ie, providing longitudinal patterns of adherence over time and providing electronic adherence feedback to the patient in interventions aimed at improving adherence [<xref ref-type="bibr" rid="ref10">10</xref>]), some methodological challenges must be considered when analyzing EM data. Indeed, EM can be misused (ie, the patient can open the EM without swallowing the drug, known as curiosity checks, and the patient can take the drug without opening the EM, known as pocket doses), or the patient may not use the EM during specific periods (eg, during holidays or hospitalizations). In addition, the patient’s treatment regimen can be modified during the monitoring period, leading to changes in the dose or regimen; temporary interruptions of the treatment and alternative medication may be prescribed [<xref ref-type="bibr" rid="ref11">11</xref>]. If these events are not rigorously collected and reported in EM raw data sets before analysis, patients’ actual level of adherence tends to be underestimated [<xref ref-type="bibr" rid="ref12">12</xref>]. Thus, data cleaning improves the accuracy of the EM raw data set before analysis and decreases data misinterpretation.</p>
      <p>In the past decade, digital technologies—such as mobile apps, EMs, ingestible sensors, weekly electronic pillboxes, blister pack technologies, electronic patient self-report diaries, or insurance claim databases [<xref ref-type="bibr" rid="ref13">13</xref>]—have been increasingly used to measure real-time components of adherence (ie, initiation, implementation, and persistence [<xref ref-type="bibr" rid="ref5">5</xref>]). Digital health innovations and technologies can be used to contribute and facilitate interventions aiming at supporting medication adherence [<xref ref-type="bibr" rid="ref14">14</xref>]. In parallel, the quality of adherence data analysis has increased due to guidelines on operational adherence definitions [<xref ref-type="bibr" rid="ref15">15</xref>], advanced statistical analysis [<xref ref-type="bibr" rid="ref16">16</xref>,<xref ref-type="bibr" rid="ref17">17</xref>], and semiautomated procedures to analyze adherence in health care databases (eg, the <italic>Adhere-R</italic> package [<xref ref-type="bibr" rid="ref18">18</xref>]). However, to date, the research community lacks guidance on the methodology to collect, manage, clean, and analyze adherence electronic monitoring database, whereas it is known that heterogeneous data management impacts adherence outcomes [<xref ref-type="bibr" rid="ref19">19</xref>].</p>
      <p>Some authors have attempted to provide guidelines to manually clean EM adherence data sets, such as inserting pocket doses, deleting excessive EM openings, and censoring the EM data in periods during which the patient did not use the EM [<xref ref-type="bibr" rid="ref19">19</xref>-<xref ref-type="bibr" rid="ref21">21</xref>]. Rotzinger et al [<xref ref-type="bibr" rid="ref22">22</xref>] presented a step-by-step procedure to manually clean EM adherence data sets based on pill-count data when available and proposed to manually add pocket doses and nonmonitored periods if they were validated. However, manual EM data cleaning is prone to errors, lacks reliability, and is time-consuming. In addition, enriching the EM data set with relevant covariables (eg, demographic, clinical, or medication adherence–related data) would allow in-depth adherence analysis. To date, no semiautomated or automated procedure exists in the literature to rigorously clean and enrich EM adherence data sets prior to analysis.</p>
      <p>We present an open-source script developed in the statistical software R (R Foundation for Statistical Computing), named CleanADHdata.R and available at GitHub [<xref ref-type="bibr" rid="ref23">23</xref>], to clean and enrich EM raw data sets before implementation and persistence analysis. The CleanADHdata.R script was developed to clean and enrich EM adherence raw data for cyclic or continuous regimens prescribed for solid cancers, collected as part of the optimizing targeted anticancer therapies (OpTAT) study [<xref ref-type="bibr" rid="ref24">24</xref>]. As this script is intended to be used by researchers to clean and enrich EM adherence data from other studies, this tutorial aims to guide the script users.</p>
    </sec>
    <sec sec-type="methods">
      <title>Methods</title>
      <sec>
        <title>Ethical Considerations</title>
        <p>The OpTAT study was approved by the local ethics committee “Commission cantonale d’éthique de la recherche sur l’être humain” in 2015 (ID 65/15) and was conducted in accordance with the Declaration of Helsinki principles. All patients signed an informed and written consent form prior to participation for their data to be used in this research [<xref ref-type="bibr" rid="ref24">24</xref>]. The prospective EM adherence data collection as part of the OpTAT study started in July 2015 and lasted until May 2022 [<xref ref-type="bibr" rid="ref24">24</xref>]. We developed this tutorial with fully fictitious EM data, blurred with the procedure detailed in the paper, that is, without any information that could identify individual participants.</p>
      </sec>
      <sec>
        <title>EM Raw Data Extraction in the Required Format to Use CleanADHdata.R</title>
        <p>To prepare the EM adherence data set for cleaning and enrichment, patient EM raw data were extracted into a text as a CSV or Microsoft Excel (Microsoft Corp) file using dedicated software (MEMS Adherence Software). Three columns entitled <italic>PatientCode</italic>, <italic>Monitor</italic>, and <italic>Date</italic> were indicated in the first row in the required format to be read by the CleanADHdata.R script. The data in columns <italic>PatientCode</italic> and <italic>Monitor</italic> must be in an alphanumeric format, and the data in column <italic>Date</italic> must be in a date-time format or a well-formatted date character string. The filenames of patients’ EM raw data must contain the “eventslist” character string, and the files are to be registered all together in the same file folder (1 EM raw data file can contain the EM data of several patients). The “dailyadherence” format (ie, number of EM openings at each day) is accepted, but an additional column entitled <italic>RecordedOpenings</italic> needs to be added. To allow users to practice using the script, we provided blurred EM raw data sets for 10 patients, available on the web at GitHub [<xref ref-type="bibr" rid="ref23">23</xref>].</p>
      </sec>
      <sec>
        <title>Choosing the Relevant Variables to Collect for Cleaning and Enriching EM Raw Data</title>
        <p>The level of accuracy of the EM data cleaning and enrichment must be adapted to the sample size of each study, its design, and the treatment monitored. It may not be relevant to insert pocket doses if their occurrence represents less than 5% of all doses in a monitored period or if the sample size is very large, that is, &gt;500 patients (estimation), as their impact on adherence outcomes is limited.</p>
        <p>Investigators need to choose in advance which relevant variables to collect to clean and enrich the EM data set (eg, regimen changes, hospitalization dates, periods of EM nonuse, and pocket doses), depending on the operational definition of adherence [<xref ref-type="bibr" rid="ref15">15</xref>], the planned statistical analysis, and the information sources available (eg, patient-reported outcomes or experiences and medical, pharmaceutical, and administrative databases). Whenever possible, 2 different sources should be consulted to confirm the medication regimen and obtain the best possible medication history [<xref ref-type="bibr" rid="ref25">25</xref>]. In case of discordant information between different sources, investigators must establish a procedure and document the information in a reproducible and reliable way.</p>
        <p>In the OpTAT study, the variables chosen were the dates of treatment interruption due to side effects, toxicity, and hospitalization dates. We also collected the side effects and their grades at each medical visit, the changes in the oral anticancer treatment (OAT) regimen and doses, and the discrepancies in EM use reported by patients (eg, periods of EM nonuse during holidays, nonmonitored periods in case of hospitalization, when the patient did not use the EM for any documented reason, or taking pocket doses).</p>
        <p>“Timing pocket dosing” is defined as when the patient takes one or several doses out of the EM in advance to be swallowed later the same day (ie, day <italic>x</italic>). Timing pocket dosing matters only if timing adherence is considered in the analysis. When 1 or several doses are prepared in advance to be taken on the day after (ie, day <italic>x</italic>+1 and 24 hours later), we consider the days without any EM openings as a period of EM nonuse, for example, a nonmonitored period. Extra EM openings (eg, by a physician, pharmacist, or patient to check the number of pills left) could also be reported whenever necessary. To insert pocket doses, delete extra EM openings, or set a nonmonitored period, the EM deviations must be carefully documented and reported by the patient before showing him or her the electronic monitoring adherence feedback and must be validated by pill count.</p>
      </sec>
      <sec>
        <title>Gathering the Relevant Variables Into a Predefined Excel File Format</title>
        <p>The collected variables described earlier must be gathered into an Excel file called Auxiliary Data using a predefined format. This Excel file is composed of 7 different sheets: <italic>EMInfo</italic> and <italic>Regimen</italic> are sheets to be filled to run the script (<xref ref-type="table" rid="table1">Table 1</xref>), whereas <italic>PatientCovariables</italic>, <italic>EMCovariables</italic>, <italic>AddedOpenings</italic>, <italic>NonMonitoredPeriods</italic>, and <italic>AdverseEvents</italic> are optional sheets (<xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>).</p>
        <p>In each sheet, the first row contains predefined variable names (eg, <italic>PatientCode</italic>, <italic>Monitor</italic>, and <italic>ExpectedOpenings</italic>; <xref ref-type="table" rid="table1">Table 1</xref> and <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). Except for the sheets <italic>PatientCovariables</italic> and <italic>EMCovariables</italic>, if other variables are inserted, they will be ignored by the R script (eg, the column <italic>Comments</italic> can be added in the different sheets to help the investigator during data preparation in the Auxiliary Data file). To note, all variable names are case-sensitive.</p>
        <p>An example of an Auxiliary Data Excel file is available on the web at GitHub [<xref ref-type="bibr" rid="ref23">23</xref>]; the variables inserted will allow cleaning and enriching the blurred EM raw data set.</p>
        <table-wrap position="float" id="table1">
          <label>Table 1</label>
          <caption>
            <p>Description of the mandatory sheets to be filled in the Auxiliary Data Excel file.</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="200"/>
            <col width="280"/>
            <col width="520"/>
            <thead>
              <tr valign="top">
                <td>Sheets</td>
                <td colspan="2">Mandatory variables in the Excel file, each of them filled in separate sheets</td>
              </tr>
              <tr valign="top">
                <td>
                  <break/>
                </td>
                <td>EMInfo</td>
                <td>Regimen</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td>Description of each variable as a header of a row to be filled in the required format</td>
                <td>
                  <list list-type="bullet">
                    <list-item>
                      <p>PatientCode is the identifier of the patient.</p>
                    </list-item>
                    <list-item>
                      <p>Monitor is the identifier of each EM<sup>a</sup> used by the patient (1 EM per line).</p>
                    </list-item>
                    <list-item>
                      <p>StartDate: For each EM, start date of use.</p>
                    </list-item>
                    <list-item>
                      <p>EndDate: For each EM, end date of use.</p>
                    </list-item>
                  </list>
                </td>
                <td>
                  <list list-type="bullet">
                    <list-item>
                      <p>PatientCode is the patient’s identifier.</p>
                    </list-item>
                    <list-item>
                      <p>Monitor is the identifier of each EM used by the patient (1 EM per line).</p>
                    </list-item>
                    <list-item>
                      <p>ExpectedOpenings (nonnegative integer) is the number of expected EM openings per day based on the prescribed treatment regimen in the period specified between StartDate and EndDate. For each regimen change, a new line is created, associated with the period for which the regimen applies.</p>
                    </list-item>
                    <list-item>
                      <p>StartDate: Start date of the period for which the number of daily expected opening applies.</p>
                    </list-item>
                    <list-item>
                      <p>EndDate: End date of the period for which the number of daily expected opening applies.</p>
                    </list-item>
                    <list-item>
                      <p>On (positive integer): In case of a cyclic regimen, the number of days during the On phase in which at least 1 EM opening is to be expected. This variable must be left blank in case of a continuous regimen.</p>
                    </list-item>
                    <list-item>
                      <p>Off (positive integer): In case of a cyclic regimen, the number of days during the Off phase in which the treatment is paused. This variable must be left blank in case of a continuous regimen.</p>
                    </list-item>
                  </list>
                </td>
              </tr>
              <tr valign="top">
                <td>Comments</td>
                <td>
                  <list list-type="bullet">
                    <list-item>
                      <p>The cleaned data set is truncated by the start and end date of each EM use.</p>
                    </list-item>
                  </list>
                </td>
                <td>
                  <list list-type="bullet">
                    <list-item>
                      <p>On and Off variables: The cycle begins with the number of expected openings during the consecutive days of the On variable and is followed by 0 expected openings during the number of days of the Off variable. If both columns On and Off are empty, the R script will consider a continuous daily regimen. The R script will report an error if only one of the variables is filled.</p>
                    </list-item>
                  </list>
                </td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn id="table1fn1">
              <p><sup>a</sup>EM: electronic monitor.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
      </sec>
      <sec>
        <title>Using the CleanADHdata.R Script</title>
        <p>Once the raw data have been extracted and the Auxiliary Data Excel file has been completed, the CleanADHdata.R script can be executed. The CleanADHdata.R script is available on the web at GitHub [<xref ref-type="bibr" rid="ref23">23</xref>].</p>
        <p>When the script is executed in the statistical software R, a window allows the selection of the Auxiliary Data Excel file. Once the latter has been selected, a second window opens to select the EM raw data folder. After processing, the R script generates the cleaned and enriched EM data set, called implementation.xlsx, with 2 log files located in the same file folder as the Auxiliary Data Excel file.</p>
        <p>The log file entitled errors.log will show critical errors that will lead to a wrong implementation calculation (eg, dates inserted with the wrong format or missing data in the Auxiliary Data Excel file). The log file entitled warnings.log indicates certain inconsistencies in the Auxiliary Data file. They do not necessarily imply miscalculation of the implementation but should be reviewed by the investigator (eg, no data were found for a patient who appears in the Auxiliary Data file). Based on the errors and warnings listed, the investigator can correct the content of the Auxiliary Data file or EM raw data file. After all errors and warnings are resolved, the cleaned and enriched EM data set presented in implementation.xlsx is ready for analysis.</p>
        <p>The implementation file was divided into 4 sheets: by monitor, by patient, summary by monitor, and summary by patient. See GitHub [<xref ref-type="bibr" rid="ref23">23</xref>] for the presentation of the cleaned and enriched EM data set (ie, implementation.xlsx file) obtained using CleanADHdata.R. <xref ref-type="supplementary-material" rid="app2">Multimedia Appendix 2</xref> provides the codebook of the Excel implementation file.</p>
      </sec>
      <sec>
        <title>Operational Definition of Implementation</title>
        <p>The operational calculation for medication implementation can be found in the <italic>Implementation Calculation</italic> section in the script CleanADHdata.R. On the first sheet by monitor, the medication implementation for the monitor is considered optimal (1) on each day if the number of corrected EM openings is at least equal to the number of expected EM openings. Otherwise, the implementation is suboptimal (0). In the case of a nonmonitored period on day <italic>x</italic>, implementation is not calculated on day <italic>x</italic> (ie, depicted with an empty cell), as recommended in the literature [<xref ref-type="bibr" rid="ref9">9</xref>].</p>
        <p>In the second sheet by patient, the medication implementation for the patient was calculated each day by the product of the implementation outcome of each patient’s EM. In the case of suboptimal implementation (0) at a given day <italic>x</italic> for at least 1 EM monitored, the patient implementation on that day <italic>x</italic> will be suboptimal (0). In the case of a nonmonitored period at a given day <italic>x</italic> for at least 1 EM monitored, the patient implementation on that day <italic>x</italic> will not be calculated and will be considered a nonmonitored day (ie, depicted with an empty cell).</p>
        <p>In the third and fourth sheets, medication implementation was presented as a summary by monitor and a summary by patient. In the summary by monitor, the implementation rate is calculated based on the number of days with an optimal implementation (1) for the EM over the number of monitored days for each EM (ie, nonmonitored periods are excluded). In the summary by patient, the implementation rate is calculated based on the number of days with an optimal implementation for all EM used by the patient (1) over the number of monitored days (ie, nonmonitored periods are excluded). <xref ref-type="supplementary-material" rid="app3">Multimedia Appendix 3</xref> summarizes the methodology to use the script through a presentation given at the Adherence Data Analysis workshop during the International Conference for Medication Adherence (ESPACOMP) in November 2022.</p>
      </sec>
    </sec>
    <sec sec-type="results">
      <title>Results</title>
      <p>We used CleanADHdata.R to clean the blurred EM raw data of 10 patients according to variables collected in the Auxiliary Data file to obtain the cleaned and enriched EM data set entitled implementation.xlsx. The EM raw data of 10 patients included in OpTAT were made fictitious by the following blurring method: (1) the implementation.xlsx file was scrambled with an R script (ie, age, gender, side effects, length of monitoring periods, and implementation outcomes were mixed up), generating implementation2.xlsx; (2) an Auxiliary Data file was built based on implementation2.xlsx, and variables were randomly modified (eg, periods of monitoring, date of EM openings, dates of nonmonitored periods, number of added openings, regimens, side effects, patient identifier, and EM number were all blurred); and (3) based on this auxiliary data file, the CleanADHdata.R script was executed to generate implementation3.xlsx. The EM raw data were built based on implementation3.xlsx.</p>
      <p>Fictitious patient characteristics were inserted in the <italic>PatientCovariables</italic> sheet of the Auxiliary Data file; the median age was 63 (IQR 50-68) years, 4 (40%) patients were women, and 1 (10%) patient discontinued the treatment.</p>
      <p>The OAT International Nonproprietary Names and the type of regimen (ie, continuous or cyclic) were introduced in the <italic>EMCovariables</italic> sheet. A total of 8 OATs (pazopanib, trametinib, dabrafenib, palbociclib, everolimus, alectinib, imatinib, and erlotinib) were prescribed. Among them, palbociclib was prescribed with a cyclic regimen scheme (ie, 21 days of treatment followed by a treatment interruption of 7 days), and imatinib was prescribed with an alternate off-label cyclic regimen (ie, 2 different imatinib dosage strengths delivered in 2 EM are prescribed alternatively, 1 day over 2). Patients B, C, H, I, and J used 2 EMs. In total, 15 different EMs were used over a median period of 187 (IQR 135-342) days. Fatigue was the most reported adverse event, mostly reported as grade 1.</p>
      <p>Median patient implementation using the blurred EM raw data set before and after cleaning with CleanADHdata.R was 83.3% (IQR 71.5%-93.9%) and 97.3% (IQR 95.8%-97.6%), respectively (Δ+14%). Implementation was &lt;90% for 1 (7%) of 15 EM monitored, and 1 (10%) of 10 patients had an implementation of &lt;90% over the monitored period.</p>
    </sec>
    <sec sec-type="discussion">
      <title>Discussion</title>
      <sec>
        <title>Main Results</title>
        <p>This tutorial presents a semiautomated procedure to clean and enrich raw EM adherence data by using the open-source CleanADHdata.R script to provide a data set ready for analysis along with an initial overview of implementation results at both the EM and patient levels. First, EM raw data were extracted in a predefined format. Then, an Excel sheet was filled in the predefined format to clean and enrich the EM data set with the following mandatory variables: start and end dates of each EM used by each patient and the expected number of daily EM openings during the monitored periods. The investigators then need to define relevant variables that will allow cleaning and enrichment of the EM data set according to the study aims and procedures. These variables were collected from several reliable sources and inserted in the optional Excel sheet in the predefined format. The R script uses both raw data and the Excel file completed with the variables to provide the cleaned and enriched EM data set, entitled implementation.xlsx file. The difference in absolute implementation (Δ+14%) between the raw and cleaned EM data sets is sufficient to consider systematic EM data cleaning in all studies planning to monitor adherence with EM to avoid data misinterpretation.</p>
      </sec>
      <sec>
        <title>Future Developments of a R Script to Analyze EM Data</title>
        <p>Automated procedures to prepare and analyze large data sets are increasing and made accessible to the research community, particularly through the interdisciplinary collaborations of health care researchers, statisticians, and computer scientists. Seeking EM adherence data cleaning, we developed an R script to standardize the EM data analysis. Based on the cleaned adherence data set, developing a new R script will allow using the Kaplan-Meier curves for persistence analysis and the generalized estimated equation model for implementation and adherence analysis. The possibility of analyzing adherence in the presence of censoring times to avoid biased results has been recently developed and will be included in the future script [<xref ref-type="bibr" rid="ref16">16</xref>].</p>
      </sec>
      <sec>
        <title>Strengths, Challenges, and Limitations</title>
        <p>Using CleanADHdata.R allows researchers to achieve reliable and reproducible raw EM data cleaning. Standardizing and describing the procedures for EM data set preparation are necessary for adherence research to allow comparison of results using a homogeneous method across studies. The script CleanADHdata.R can be used to clean adherence data collected with the EM and other digital technologies and can be adapted according to the study aims and designs (eg, the calculation of treatment implementation can be revised in the dedicated coding section). Providing blurred data sets, we allow users to practice using CleanADHdata.R. Moreover, users can improve the script by providing feedback directly on the GitHub platform so it can be updated upon needs.</p>
        <p>When using CleanADHdata.R, the investigator needs to carefully fill the variables in an Excel file in a predefined format, which requires time and resources. We recommend collecting these data and filling the Excel file progressively at each patient interview, new prescription, and notification in the medical record. Defining patients’ daily expected EM openings based on drug regimen information from several sources (eg, providers, patients, caregivers, and electronic medical and pharmaceutical files) can be challenging, as discrepancies can occur across sources. The investigator needs to define the most reliable information to be collected according to the medication adherence components definition. To ensure consistency across adherence studies, these decisions need to be documented and depicted in the methodology of the publications.</p>
        <p>Our blurred data set provides EM data for a limited number of patients (n=10), a small sample size that only estimates the difference between implementation according to raw and clean data sets. However, using real data from 58 EMs used by 40 patients included in the OpTAT study, a significant difference in implementation was confirmed using the raw and clean data sets (69% vs 92%, +Δ23%) [<xref ref-type="bibr" rid="ref26">26</xref>]. More studies with larger sample sizes are needed to explore the differences in implementation outcomes between raw and clean data sets.</p>
      </sec>
      <sec>
        <title>Conclusions</title>
        <p>Developing a semiautomated procedure to clean and enrich EM adherence data sets saves time, decreases data-handling errors, and increases reproducibility. Investigators and statisticians worked together to develop the open-source CleanADHdata.R script and described its use in this tutorial to guide future users. Consistent use of this script across research teams will increase the quality and standardization of EM data set management and comparability of results across studies monitoring medication adherence with EM. The CleanADHdata.R script has broad applicability in digital health, as it can be used to clean adherence data collected through various digital technologies.</p>
      </sec>
    </sec>
  </body>
  <back>
    <app-group>
      <supplementary-material id="app1">
        <label>Multimedia Appendix 1</label>
        <p>Description of the optional sheets to be filled in the Auxiliary Data Excel file.</p>
        <media xlink:href="formative_v8i1e51013_app1.docx" xlink:title="DOCX File , 17 KB"/>
      </supplementary-material>
      <supplementary-material id="app2">
        <label>Multimedia Appendix 2</label>
        <p>Codebook of the cleaned electronic monitor data set “implementation.xlsx”.</p>
        <media xlink:href="formative_v8i1e51013_app2.docx" xlink:title="DOCX File , 22 KB"/>
      </supplementary-material>
      <supplementary-material id="app3">
        <label>Multimedia Appendix 3</label>
        <p>Tutorial of the CleanADHdata.R script presented during the International Conference for Medication Adherence (ESPACOMP) in November 2022.</p>
        <media xlink:href="formative_v8i1e51013_app3.pdf" xlink:title="PDF File  (Adobe PDF File), 646 KB"/>
      </supplementary-material>
    </app-group>
    <glossary>
      <title>Abbreviations</title>
      <def-list>
        <def-item>
          <term id="abb1">EM</term>
          <def>
            <p>electronic monitor</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb2">ESPACOMP</term>
          <def>
            <p>International Conference for Medication Adherence</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb3">MEMS</term>
          <def>
            <p>medication event monitoring system</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb4">OAT</term>
          <def>
            <p>oral anticancer treatment</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb5">OpTAT</term>
          <def>
            <p>optimizing targeted anticancer therapies</p>
          </def>
        </def-item>
      </def-list>
    </glossary>
    <ack>
      <p>The authors would like to thank the Department of Oncology at the Lausanne University Hospital and collaborators of the Interprofessional Medication Adherence Program at the community pharmacy of the Center for Primary Care and Public Health Unisanté for their contribution to the recruitment of patients in the optimizing targeted anticancer therapies study, which allowed to provide sufficient electronic monitor data to develop the script, as well as the ESPACOMP researchers community for their feedback on the use of CleanADHdata.R, especially Dr Alexandra L Dima, Prof Bernard Vrijens, and Prof Samuel S Allemann. The optimizing targeted anticancer therapies study was funded by the Swiss Cancer Research Foundation (grant HSR-4077-11-2016 to MPS). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.</p>
    </ack>
    <notes>
      <sec>
        <title>Data Availability</title>
        <p>The data sets generated and analyzed during this study are available at GitHub [<xref ref-type="bibr" rid="ref23">23</xref>].</p>
      </sec>
    </notes>
    <fn-group>
      <fn fn-type="con">
        <p>JP developed the CleanADHdata.R script according to feedback regarding electronic monitor adherence data monitoring and analysis from CB. CB, JP, IL, and MPS conceptualized the methodology; CB and JP analyzed the data; CB and JP wrote the original draft, which was reviewed and edited by IL and MPS. MPS acquired funding. All authors reviewed the final manuscript.</p>
      </fn>
      <fn fn-type="conflict">
        <p>None declared.</p>
      </fn>
    </fn-group>
    <ref-list>
      <ref id="ref1">
        <label>1</label>
        <nlm-citation citation-type="web">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Khan</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Socha-Dietrich</surname>
              <given-names>K</given-names>
            </name>
          </person-group>
          <article-title>Investing in medication adherence improves health outcomes and health system efficiency: adherence to medicines for diabetes, hypertension, and hyperlipidaemia</article-title>
          <source>OECD Health Working Papers</source>
          <year>2018</year>
          <access-date>2024-05-02</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://tinyurl.com/34dbbwu4">https://tinyurl.com/34dbbwu4</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref2">
        <label>2</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>DiMatteo</surname>
              <given-names>MR</given-names>
            </name>
            <name name-style="western">
              <surname>Giordani</surname>
              <given-names>PJ</given-names>
            </name>
            <name name-style="western">
              <surname>Lepper</surname>
              <given-names>HS</given-names>
            </name>
            <name name-style="western">
              <surname>Croghan</surname>
              <given-names>TW</given-names>
            </name>
          </person-group>
          <article-title>Patient adherence and medical treatment outcomes: a meta-analysis</article-title>
          <source>Med Care</source>
          <year>2002</year>
          <volume>40</volume>
          <issue>9</issue>
          <fpage>794</fpage>
          <lpage>811</lpage>
          <pub-id pub-id-type="doi">10.1097/00005650-200209000-00009</pub-id>
          <pub-id pub-id-type="medline">12218770</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref3">
        <label>3</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Ibrahim</surname>
              <given-names>AR</given-names>
            </name>
            <name name-style="western">
              <surname>Eliasson</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Apperley</surname>
              <given-names>JF</given-names>
            </name>
            <name name-style="western">
              <surname>Milojkovic</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Bua</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Szydlo</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Mahon</surname>
              <given-names>FX</given-names>
            </name>
            <name name-style="western">
              <surname>Kozlowski</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Paliompeis</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Foroni</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Khorashad</surname>
              <given-names>JS</given-names>
            </name>
            <name name-style="western">
              <surname>Bazeos</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Molimard</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Reid</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Rezvani</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Gerrard</surname>
              <given-names>G</given-names>
            </name>
            <name name-style="western">
              <surname>Goldman</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Marin</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <article-title>Poor adherence is the main reason for loss of CCyR and imatinib failure for chronic myeloid leukemia patients on long-term therapy</article-title>
          <source>Blood</source>
          <year>2011</year>
          <volume>117</volume>
          <issue>14</issue>
          <fpage>3733</fpage>
          <lpage>3736</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://linkinghub.elsevier.com/retrieve/pii/S0006-4971(20)45298-X"/>
          </comment>
          <pub-id pub-id-type="doi">10.1182/blood-2010-10-309807</pub-id>
          <pub-id pub-id-type="medline">21346253</pub-id>
          <pub-id pub-id-type="pii">S0006-4971(20)45298-X</pub-id>
          <pub-id pub-id-type="pmcid">PMC6143152</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref4">
        <label>4</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Riegel</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Knafl</surname>
              <given-names>GJ</given-names>
            </name>
          </person-group>
          <article-title>Electronically monitored medication adherence predicts hospitalization in heart failure patients</article-title>
          <source>Patient Prefer Adherence</source>
          <year>2013</year>
          <volume>8</volume>
          <fpage>1</fpage>
          <lpage>13</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/24353407"/>
          </comment>
          <pub-id pub-id-type="doi">10.2147/PPA.S54520</pub-id>
          <pub-id pub-id-type="medline">24353407</pub-id>
          <pub-id pub-id-type="pii">ppa-8-001</pub-id>
          <pub-id pub-id-type="pmcid">PMC3862652</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref5">
        <label>5</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Vrijens</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>De Geest</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Hughes</surname>
              <given-names>DA</given-names>
            </name>
            <name name-style="western">
              <surname>Przemyslaw</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Demonceau</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Ruppar</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Dobbels</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Fargher</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Morrison</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Lewek</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Matyjaszczyk</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Mshelia</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Clyne</surname>
              <given-names>W</given-names>
            </name>
            <name name-style="western">
              <surname>Aronson</surname>
              <given-names>JK</given-names>
            </name>
            <name name-style="western">
              <surname>Urquhart</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>A new taxonomy for describing and defining adherence to medications</article-title>
          <source>Br J Clin Pharmacol</source>
          <year>2012</year>
          <volume>73</volume>
          <issue>5</issue>
          <fpage>691</fpage>
          <lpage>705</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://hdl.handle.net/2268/305261"/>
          </comment>
          <pub-id pub-id-type="doi">10.1111/j.1365-2125.2012.04167.x</pub-id>
          <pub-id pub-id-type="medline">22486599</pub-id>
          <pub-id pub-id-type="pmcid">PMC3403197</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref6">
        <label>6</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Anghel</surname>
              <given-names>LA</given-names>
            </name>
            <name name-style="western">
              <surname>Farcas</surname>
              <given-names>AM</given-names>
            </name>
            <name name-style="western">
              <surname>Oprean</surname>
              <given-names>RN</given-names>
            </name>
          </person-group>
          <article-title>An overview of the common methods used to measure treatment adherence</article-title>
          <source>Med Pharm Rep</source>
          <year>2019</year>
          <volume>92</volume>
          <issue>2</issue>
          <fpage>117</fpage>
          <lpage>122</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/31086837"/>
          </comment>
          <pub-id pub-id-type="doi">10.15386/mpr-1201</pub-id>
          <pub-id pub-id-type="medline">31086837</pub-id>
          <pub-id pub-id-type="pii">cm-92-117</pub-id>
          <pub-id pub-id-type="pmcid">PMC6510353</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref7">
        <label>7</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Williams</surname>
              <given-names>AB</given-names>
            </name>
            <name name-style="western">
              <surname>Amico</surname>
              <given-names>KR</given-names>
            </name>
            <name name-style="western">
              <surname>Bova</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Womack</surname>
              <given-names>JA</given-names>
            </name>
          </person-group>
          <article-title>A proposal for quality standards for measuring medication adherence in research</article-title>
          <source>AIDS Behav</source>
          <year>2013</year>
          <volume>17</volume>
          <issue>1</issue>
          <fpage>284</fpage>
          <lpage>297</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/22407465"/>
          </comment>
          <pub-id pub-id-type="doi">10.1007/s10461-012-0172-7</pub-id>
          <pub-id pub-id-type="medline">22407465</pub-id>
          <pub-id pub-id-type="pmcid">PMC3434290</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref8">
        <label>8</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>El Alili</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Vrijens</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Demonceau</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Evers</surname>
              <given-names>SM</given-names>
            </name>
            <name name-style="western">
              <surname>Hiligsmann</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>A scoping review of studies comparing the medication event monitoring system (MEMS) with alternative methods for measuring medication adherence</article-title>
          <source>Br J Clin Pharmacol</source>
          <year>2016</year>
          <volume>82</volume>
          <issue>1</issue>
          <fpage>268</fpage>
          <lpage>279</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/27005306"/>
          </comment>
          <pub-id pub-id-type="doi">10.1111/bcp.12942</pub-id>
          <pub-id pub-id-type="medline">27005306</pub-id>
          <pub-id pub-id-type="pmcid">PMC4917812</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref9">
        <label>9</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Vrijens</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Urquhart</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Methods for measuring, enhancing, and accounting for medication adherence in clinical trials</article-title>
          <source>Clin Pharmacol Ther</source>
          <year>2014</year>
          <volume>95</volume>
          <issue>6</issue>
          <fpage>617</fpage>
          <lpage>626</lpage>
          <pub-id pub-id-type="doi">10.1038/clpt.2014.59</pub-id>
          <pub-id pub-id-type="medline">24739446</pub-id>
          <pub-id pub-id-type="pii">clpt201459</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref10">
        <label>10</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Chan</surname>
              <given-names>AHY</given-names>
            </name>
            <name name-style="western">
              <surname>Foot</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Pearce</surname>
              <given-names>CJ</given-names>
            </name>
            <name name-style="western">
              <surname>Horne</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Foster</surname>
              <given-names>JM</given-names>
            </name>
            <name name-style="western">
              <surname>Harrison</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Effect of electronic adherence monitoring on adherence and outcomes in chronic conditions: a systematic review and meta-analysis</article-title>
          <source>PLoS One</source>
          <year>2022</year>
          <volume>17</volume>
          <issue>3</issue>
          <fpage>e0265715</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0265715"/>
          </comment>
          <pub-id pub-id-type="doi">10.1371/journal.pone.0265715</pub-id>
          <pub-id pub-id-type="medline">35312704</pub-id>
          <pub-id pub-id-type="pii">PONE-D-21-08615</pub-id>
          <pub-id pub-id-type="pmcid">PMC8936478</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref11">
        <label>11</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Djebbari</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Stoner</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Lavender</surname>
              <given-names>VT</given-names>
            </name>
          </person-group>
          <article-title>A systematic review of non-standard dosing of oral anticancer therapies</article-title>
          <source>BMC Cancer</source>
          <year>2018</year>
          <volume>18</volume>
          <issue>1</issue>
          <fpage>1154</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://bmccancer.biomedcentral.com/articles/10.1186/s12885-018-5066-2"/>
          </comment>
          <pub-id pub-id-type="doi">10.1186/s12885-018-5066-2</pub-id>
          <pub-id pub-id-type="medline">30466406</pub-id>
          <pub-id pub-id-type="pii">10.1186/s12885-018-5066-2</pub-id>
          <pub-id pub-id-type="pmcid">PMC6249819</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref12">
        <label>12</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bova</surname>
              <given-names>CA</given-names>
            </name>
            <name name-style="western">
              <surname>Fennie</surname>
              <given-names>KP</given-names>
            </name>
            <name name-style="western">
              <surname>Knafl</surname>
              <given-names>GJ</given-names>
            </name>
            <name name-style="western">
              <surname>Dieckhaus</surname>
              <given-names>KD</given-names>
            </name>
            <name name-style="western">
              <surname>Watrous</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Williams</surname>
              <given-names>AB</given-names>
            </name>
          </person-group>
          <article-title>Use of electronic monitoring devices to measure antiretroviral adherence: practical considerations</article-title>
          <source>AIDS Behav</source>
          <year>2005</year>
          <volume>9</volume>
          <issue>1</issue>
          <fpage>103</fpage>
          <lpage>110</lpage>
          <pub-id pub-id-type="doi">10.1007/s10461-005-1685-0</pub-id>
          <pub-id pub-id-type="medline">15812617</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref13">
        <label>13</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Mason</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Cho</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Rayo</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Gong</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Harris</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Jiang</surname>
              <given-names>Y</given-names>
            </name>
          </person-group>
          <article-title>Technologies for medication adherence monitoring and technology assessment criteria: narrative review</article-title>
          <source>JMIR Mhealth Uhealth</source>
          <year>2022</year>
          <volume>10</volume>
          <issue>3</issue>
          <fpage>e35157</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://mhealth.jmir.org/2022/3/e35157/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/35157</pub-id>
          <pub-id pub-id-type="medline">35266873</pub-id>
          <pub-id pub-id-type="pii">v10i3e35157</pub-id>
          <pub-id pub-id-type="pmcid">PMC8949687</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref14">
        <label>14</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bandiera</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Ribaut</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Dima</surname>
              <given-names>AL</given-names>
            </name>
            <name name-style="western">
              <surname>Allemann</surname>
              <given-names>SS</given-names>
            </name>
            <name name-style="western">
              <surname>Molesworth</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Kalumiya</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Käser</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Olson</surname>
              <given-names>MS</given-names>
            </name>
            <name name-style="western">
              <surname>Burnier</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>van Boven</surname>
              <given-names>JFM</given-names>
            </name>
            <name name-style="western">
              <surname>Szucs</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Albrecht</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Wilson</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>De Geest</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>Swiss priority setting on implementing medication adherence interventions as part of the European ENABLE COST Action</article-title>
          <source>Int J Public Health</source>
          <year>2022</year>
          <volume>67</volume>
          <fpage>1605204</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/36032275"/>
          </comment>
          <pub-id pub-id-type="doi">10.3389/ijph.2022.1605204</pub-id>
          <pub-id pub-id-type="medline">36032275</pub-id>
          <pub-id pub-id-type="pii">1605204</pub-id>
          <pub-id pub-id-type="pmcid">PMC9411421</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref15">
        <label>15</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Dima</surname>
              <given-names>AL</given-names>
            </name>
            <name name-style="western">
              <surname>Allemann</surname>
              <given-names>SS</given-names>
            </name>
            <name name-style="western">
              <surname>Dunbar-Jacob</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Hughes</surname>
              <given-names>DA</given-names>
            </name>
            <name name-style="western">
              <surname>Vrijens</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Wilson</surname>
              <given-names>IB</given-names>
            </name>
          </person-group>
          <article-title>TEOS: a framework for constructing operational definitions of medication adherence based on Timelines-Events-Objectives-Sources</article-title>
          <source>Br J Clin Pharmacol</source>
          <year>2021</year>
          <volume>87</volume>
          <issue>6</issue>
          <fpage>2521</fpage>
          <lpage>2533</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://doi.org/10.1111/bcp.14659"/>
          </comment>
          <pub-id pub-id-type="doi">10.1111/bcp.14659</pub-id>
          <pub-id pub-id-type="medline">33220097</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref16">
        <label>16</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Pasquier</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
            <name name-style="western">
              <surname>Locatelli</surname>
              <given-names>I</given-names>
            </name>
          </person-group>
          <article-title>Estimation of adherence to medication treatment in presence of censoring</article-title>
          <source>Br J Clin Pharmacol</source>
          <year>2023</year>
          <volume>89</volume>
          <issue>7</issue>
          <fpage>1928</fpage>
          <lpage>1937</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://bpspubs.onlinelibrary.wiley.com/doi/10.1111/bcp.15452"/>
          </comment>
          <pub-id pub-id-type="doi">10.1111/bcp.15452</pub-id>
          <pub-id pub-id-type="medline">35776776</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref17">
        <label>17</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
            <name name-style="western">
              <surname>Jeanneret</surname>
              <given-names>LA</given-names>
            </name>
            <name name-style="western">
              <surname>Chevaux</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Backes</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Wagner</surname>
              <given-names>AD</given-names>
            </name>
            <name name-style="western">
              <surname>Bugnon</surname>
              <given-names>O</given-names>
            </name>
            <name name-style="western">
              <surname>Luthi</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Locatelli</surname>
              <given-names>I</given-names>
            </name>
          </person-group>
          <article-title>A novel approach to better characterize medication adherence in oral anticancer treatments</article-title>
          <source>Front Pharmacol</source>
          <year>2018</year>
          <volume>9</volume>
          <fpage>1567</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/30761009"/>
          </comment>
          <pub-id pub-id-type="doi">10.3389/fphar.2018.01567</pub-id>
          <pub-id pub-id-type="medline">30761009</pub-id>
          <pub-id pub-id-type="pmcid">PMC6361826</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref18">
        <label>18</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Dima</surname>
              <given-names>AL</given-names>
            </name>
            <name name-style="western">
              <surname>Dediu</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <article-title>Computation of adherence to medication and visualization of medication histories in R with AdhereR: towards transparent and reproducible use of electronic healthcare data</article-title>
          <source>PLoS One</source>
          <year>2017</year>
          <volume>12</volume>
          <issue>4</issue>
          <fpage>e0174426</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0174426"/>
          </comment>
          <pub-id pub-id-type="doi">10.1371/journal.pone.0174426</pub-id>
          <pub-id pub-id-type="medline">28445530</pub-id>
          <pub-id pub-id-type="pii">PONE-D-16-48957</pub-id>
          <pub-id pub-id-type="pmcid">PMC5405929</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref19">
        <label>19</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Fennie</surname>
              <given-names>KP</given-names>
            </name>
            <name name-style="western">
              <surname>Bova</surname>
              <given-names>CA</given-names>
            </name>
            <name name-style="western">
              <surname>Williams</surname>
              <given-names>AB</given-names>
            </name>
          </person-group>
          <article-title>Adjusting and censoring electronic monitoring device data. Implications for study outcomes</article-title>
          <source>J Acquir Immune Defic Syndr</source>
          <year>2006</year>
          <volume>43</volume>
          <issue>Suppl 1</issue>
          <fpage>S88</fpage>
          <lpage>S95</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://journals.lww.com/jaids/fulltext/2006/12011/adjusting_and_censoring_electronic_monitoring.12.aspx"/>
          </comment>
          <pub-id pub-id-type="doi">10.1097/01.qai.0000248336.97814.2f</pub-id>
          <pub-id pub-id-type="medline">17133208</pub-id>
          <pub-id pub-id-type="pii">00126334-200612011-00012</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref20">
        <label>20</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>McGrady</surname>
              <given-names>ME</given-names>
            </name>
            <name name-style="western">
              <surname>Ramsey</surname>
              <given-names>RR</given-names>
            </name>
          </person-group>
          <article-title>Using electronic monitoring devices to assess medication adherence: a research methods framework</article-title>
          <source>J Gen Intern Med</source>
          <year>2020</year>
          <volume>35</volume>
          <issue>9</issue>
          <fpage>2707</fpage>
          <lpage>2714</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://europepmc.org/abstract/MED/32440997"/>
          </comment>
          <pub-id pub-id-type="doi">10.1007/s11606-020-05905-z</pub-id>
          <pub-id pub-id-type="medline">32440997</pub-id>
          <pub-id pub-id-type="pii">10.1007/s11606-020-05905-z</pub-id>
          <pub-id pub-id-type="pmcid">PMC7459024</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref21">
        <label>21</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Krummenacher</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Cavassini</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Bugnon</surname>
              <given-names>O</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>An interdisciplinary HIV-adherence program combining motivational interviewing and electronic antiretroviral drug monitoring</article-title>
          <source>AIDS Care</source>
          <year>2011</year>
          <volume>23</volume>
          <issue>5</issue>
          <fpage>550</fpage>
          <lpage>561</lpage>
          <pub-id pub-id-type="doi">10.1080/09540121.2010.525613</pub-id>
          <pub-id pub-id-type="medline">21271406</pub-id>
          <pub-id pub-id-type="pii">932782275</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref22">
        <label>22</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Rotzinger</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Cavassini</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Bugnon</surname>
              <given-names>O</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>Development of an algorithm for analysing the electronic measurement of medication adherence in routine HIV care</article-title>
          <source>Int J Clin Pharm</source>
          <year>2016</year>
          <volume>38</volume>
          <issue>5</issue>
          <fpage>1210</fpage>
          <lpage>1218</lpage>
          <pub-id pub-id-type="doi">10.1007/s11096-016-0354-x</pub-id>
          <pub-id pub-id-type="medline">27473709</pub-id>
          <pub-id pub-id-type="pii">10.1007/s11096-016-0354-x</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref23">
        <label>23</label>
        <nlm-citation citation-type="web">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Pasquier</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Bandiera</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Locatelli</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>CleanADHdata.R script</article-title>
          <source>GitHub</source>
          <year>2022</year>
          <access-date>2023-07-19</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://github.com/jpasquier/CleanADHdata">https://github.com/jpasquier/CleanADHdata</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref24">
        <label>24</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bandiera</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Cardoso</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Locatelli</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Digklia</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Zaman</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Diciolla</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Cristina</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Stravodimou</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Veronica</surname>
              <given-names>AL</given-names>
            </name>
            <name name-style="western">
              <surname>Dolcan</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Sarivalasis</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Liapi</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Bouchaab</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Orcurto</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Dotta-Celio</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Peters</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Decosterd</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Widmer</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Wagner</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Csajka</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>Optimizing oral targeted anticancer therapies study for patients with solid cancer: protocol for a randomized controlled medication adherence program along with systematic collection and modeling of pharmacokinetic and pharmacodynamic data</article-title>
          <source>JMIR Res Protoc</source>
          <year>2021</year>
          <volume>10</volume>
          <issue>6</issue>
          <fpage>e30090</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.researchprotocols.org/2021/6/e30090/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/30090</pub-id>
          <pub-id pub-id-type="medline">34185020</pub-id>
          <pub-id pub-id-type="pii">v10i6e30090</pub-id>
          <pub-id pub-id-type="pmcid">PMC8278299</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref25">
        <label>25</label>
        <nlm-citation citation-type="web">
          <article-title>Best possible medication history</article-title>
          <source>New South Wales Clinical Excellence Commission</source>
          <access-date>2023-01-10</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://tinyurl.com/3tetve82">https://tinyurl.com/3tetve82</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref26">
        <label>26</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bandiera</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Pasquier</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Locatelli</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Schneider</surname>
              <given-names>MP</given-names>
            </name>
          </person-group>
          <article-title>How to clean adherence electronic monitoring data using a semi-automated procedure? Abstracts of the 25th Annual Meeting of ESPACOMP, the International Society for Medication Adherence, 08-19 November 2021</article-title>
          <source>Int J Clin Pharm</source>
          <year>2022</year>
          <volume>44</volume>
          <issue>1</issue>
          <fpage>289</fpage>
          <lpage>290</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://link.springer.com/article/10.1007/s11096-021-01373-5"/>
          </comment>
          <pub-id pub-id-type="doi">10.1007/s11096-021-01373-5</pub-id>
        </nlm-citation>
      </ref>
    </ref-list>
  </back>
</article>
