Team:Concordia-Montreal/Description

Project Description

Project Description and Inspiration






Prototype
Quantifen wearable biosensor prototype design V.2.0

Contents:

1. Project Overview and Inspiration
2. Biosensor and plasmids
3. Electrochemistry (includes Hydrogels and Redox)
4. Electrical Device
5. Mobile Application


1. Project Overview and Inspiration

“Many times the consumption of fentanyl is involuntary” - Relais Methadone Addiction Center worker with 10 years of experience.

Being shown the Canadian federal statistics on drug overdoses and seeing that 93% of all opioid-related deaths were unintentional in 2019 encouraged us to decrease accidental overdoses. Currently, while some resources exist in specific locations to discourage accidental fentanyl ingestion and potential overdoses before drug consumption, few resources, if any, exist to alert a user to seek medical attention before it is too late.

In regards to the biological aspect of our project, we were inspired by the works of Dr. David Baker, a biochemist currently working on protein engineering. His manuscripts have given us tremendous insight on constructing biosensors in yeast cells (Feng et al. 2015), (Feng et al. 2015), and another of his published works have provided us with a sequence for an entirely synthetic, highly sensitive fentanyl receptor (Bick et al., 2017). The design of our entire project was also inspired by recent work from the Wang and Mercier labs (University of California) who showed that monitoring of sweat and interstitial fluid in humans is possible with biosensors (Kim et al., 2018). With recent advances and increased awareness in wearable biosensors, our team was inspired to design and create a wearable biosensor device integrating the latest research outcomes to tackle current world-wide issues.

To achieve our goal of decreasing accidental fentanyl overdoses, we have designed a wearable biosensor device for monitoring of small molecules in the wearer’s sweat and interstitial fluid. The biosensor uses a two-plasmid design (see hyperlink the Biosensor), enclosed within a hydrogel (see hyperlink Electrochemistry), and is connected via electrodes to a small printed circuit board. The latter can send wireless signals to a mobile app to alert users of fentanyl consumption. The output of the biosensor can be either a color change on the surface of the wearable device, or an electrical signal via exchange of electrons. The idea is that upon binding of the target molecule, such as fentanyl, from the wearer’s sweat or interstitial fluid, the reporter gene (output) will be activated and will send a signal on the mobile app to alert the user to seek immediate medical attention and reverse the effects of fentanyl.

Synthetic biology is a field that makes use of engineering properties to confer new capabilities to designed organisms. We think that our two-plasmid biosensor, in a single yeast cell, that can detect a variety of small molecules is a perfect embodiment of synthetic biology. It showcases the potential for organisms to be designed in unique ways impossible in nature. We believe that to utilize this technology to save lives and create potential advances in medicine is the most useful application of synthetic biology to solve world-wide issues.

Overview of System
Figure A. Overview of System, more detail below

2. Biosensor

The biosensor we designed is a two-plasmid system wherein the first one transcribes a fusion protein - our transcription factor - composed of a ligand-binding domain (LBD) linked to the GAL4-VP16 activator. This fusion protein activates transcription of the reporter gene on the second plasmid via the GAL1 DNA binding domain. This system is conditionally stable, as binding of the ligand stabilizes the fusion protein, but absence of ligand results in its degradation by the proteasome system due to ubiquitin sites (Feng et al., 2015).

Plasmid One (P1): Encodes Transcription Factor

The first plasmid (P1) encodes the transcription factor fusion protein which is regulated under a strong constitutive TDH3 promoter (see figure 1). The transcribed gene, a fusion transcription factor, encodes the potent GAL4-VP16 activator linked to the desired LBD or receptor (GAL4-LBD-VP16) via protein linkers (5’-GGGGGGAGTGGGGGCTCAGGAGGT-3’). Because any LBD can be utilized as long as it can stably be fused to the activator, this makes our system extremely modular: in theory it could be modified for the detection of any molecule with known receptor whether natural or synthetic. In order to bind fentanyl we have chosen two entirely synthetic receptors, FEN21 and FEN49, with already optimized binding affinities (Bick et al., 2017). Both were designed by the Baker Lab at the University of Washington, Seattle. However, due to safety reasons, we have decided to change the fentanyl receptor for a glucocorticoid receptor (amino acids 524-794;(uniprot.org)) . The entire system design remains the same and all activity should also be unchanged.

Plasmid Two (P2): Reporter Gene (GOx, amilCP or fluorescence)

The second plasmid encodes an inducible GAL1 promoter, a reporter gene of choice, and a terminator (see fig. 1). The promoter is induced by binding of GAL4 from the transcription factor GAL4-LBD-VP16. Upon activation, transcription of one out of two possible proteins occurs: a chromoprotein, amilCP, derived from Acropora millepora or an oxido-reductase, glucose oxidase (GOx), derived from Aspergillus niger. The chromoprotein produces a deep purple color with a maximum absorbance at 588nm whereas GOx catalyzes the oxidation of glucose to D-glucono-delta-lactone and hydrogen peroxide. A subsequent electrochemical reaction with hydrogen peroxide and screen-printed inks creates current, which is detected by the printed circuit board (PCB) connected to the biological and electrochemical systems (see Electrochemistry and PCB for more information).

Upon ligand binding, the transcription factor is stabilized and binds the GAL1 promoter region to activate transcription of the reporter gene. In our design, the output can be one of two proteins. Therefore, the final outcome is either a visible color change or an electrical signal detected by the printed circuit board. The visible color change to purple can be analyzed via pixels through the camera function in our app, whereas the current is analyzed directly through the PCB.

Both plasmids are to be transformed in a single Saccharomyces cerevisiae cell where constitutive transcription of GAL4-LBD-VP16 occurs. In the absence of ligand, the fusion transcription factor is destroyed. Upon ligand binding, the complex is stabilized and induces transcription of the reporter gene. Therefore, in the presence of fentanyl, a color could appear or a signal would alert the user (from the electrical data processed by our app) that they have consumed fentanyl.

The modularity of the transcription factor allows our fentanyl receptor to be changed for other ligand binding domains (LBDs), and therefore give the same output (color or current) regardless of the ligand-LBD pair. For safety reasons, testing of our project will be done with a rat glucocorticoid receptor so that nobody comes in proximity with fentanyl. The new ligand, hydrocortisone, is a substrate of GCR.

Two Plasmid System
Figure 1. Genetic construct of the biosensor with a two-plasmid design. Here, a first plasmid (P1) encodes a transcription factor (GAL4-FEN-VP16 or GAL4-GCR-VP16) which activates the inducible GAL1 promoter on the second plasmid (P2) upon ligand binding. The latter transcribes the reporter gene, either the enzyme glucose oxidase (GOx) or the chromoprotein amilCP to give a signal processable by our Quantifen app.
In Yeast
Figure 2. Complete overview of the biosensor, post-transformation into Saccharomyces cerevisiae. Shown above is a single yeast cell transformed with both plasmids so that constitutive transcription of P1 induces transcription of the reporter gene on P2 when ligand (such as fentanyl or other small molecule with its respective receptor) binds the LBD.


2. Electrochemistry

The hydrogel layers function as housing for the cellular material and, upon absorption of fluid, swell to uptake sweat and interstitial fluid (ISF) for small molecule sampling. As a whole, the system includes a cryogel containing pilocarpine for sweat-induction, a chitosan hydrogel containing engineered yeast cells for fentanyl detection, and an agarose hydrogel containing buffer. Each gel has different absorptivities, charged surfaces, porosities and characteristics chosen for their function. The details of which can be consulted in the experiments section.

Hydrogel Layers
Fig.1 Hydrogel layers with electrosmotic flow and uptake of small molecules

Our electrochemical reaction is a series of electron transfers resulting in electrons being pulled from the conductive inks, generating a measurable current. Imagine flipping a switch to turn on a light bulb. Here we our enzyme 'turns on' when it interacts with glucose, producing hydrogen peroxide. The hydrogen peroxide then reacts in a series of electron transfers until the printed circuit board (PCB) is activated.

Redox Reaction
Fig. 2 Reactions

When fentanyl is bound, the enzyme glucose oxidase (GOx) is expressed. GOx interacts with glucose already present in the chitosan layer, consuming oxygen in the process and producing hydrogen peroxide (H2O2). Prussian Blue (PB) screen-printed ink, or ferrocyanide, acts as an electro catalyst to reduce H2O2, through electron donation as the PB ink itself is oxidized- the oxidized chemical species loses electrons while the reduced species gains electrons. In the next electron transfer, PB (oxidized) is reduced as electrons are lost by the conductive silver/ silver chloride ink (Ag/AgCl). Like dominoes, the chain of electron transfer is transmitted along the Ag/AgCl ink to the PCB where the signal is processed and transmitted to the mobile app.

Reduction Oxidation
Fig.3 GOx binding to glucose and subsequent electron transfers.




Electronic Device

Github repository: Electronic Device

Functional Description

The electronic device subsystem is used as an interface between the electrochemistry and biosensor subsystems and the mobile application subsystem.

The electronic device subsystem performs various functions. Its functions can be divided into three primary functions and five secondary functions.

The primary functions are critical functions which are required by the project.

  • Performing the amperometric measurements.
  • Providing the iontophoresis current.
  • Transmitting data to the mobile application.
  • The secondary functions are non-critical, but useful functions to enhance the user experience and facilitate data analysis.

  • Performing temperature measurements.
  • Monitoring battery level.
  • Receiving commands from the mobile application.
  • Processing sensor data.
  • Providing battery charging capability.
  • Design of the Electronic Device

    Overview of the Electronic Device

    The objective of the electronics is to provide the user with a device which can monitor fentanyl concentration in the user’s sweat automatically. The electronics subsystem is designed to be adapted to an almost endless variety of amperometric sensors due to its biosensor interface port. It is designed to be of high accuracy due to the use of a high resolution analog-to-digital converter and the use of a high sensitivity potentiostat. User friendliness is an important aspect of the design which is realized through rechargeability, reusability, redundancy in its safety measures and appearance.

    Electronic Device Architecture

    Electronic Device Subsystem Diagram

    To achieve its objective and its requirements, the electronic device subsystem is subdivided into four modules: the primary power module, the secondary power module, the command and data module, and the sensor module as shown in Figure 5.

    Electronic Subsystem Diagram
    Figure 5:Electronic Device Subsystem Diagram
    Two-Board Design

    The electronic device subsystem is physically separated into two electronic circuit boards. The circuit boards are stacked one above the other and connected to each other through a set of connectors as shown in Figure 6. The connectors also serve as structural support for the electronic device.

    Two Board Design Diagram
    Figure 6:Two Board Design Diagram

    The two boards are connected through a 2.85V connector, a ground connector and a data connector. The 2.85V connector provides the primary supply voltage to the bottom board. The ground connector propagates the reference point of the electronic device to the bottom board. The data connector establishes the connection between the command and data module and the bottom board. The data connector includes a serial data line, a serial clock line, a voltage biasing line and a battery monitoring line.

    The two-board design presents several advantages over a single-board design. First, the two-board design reduces the surface area of each board which removes the constraint on flexibility and makes the electronic device less cumbersome to the user. Second, the two-board design simplifies troubleshooting and testing as it physically separates the command and data module from the sensor module. Third, the two-board design makes the electronic device more modular and more upgradeable. In other words, the sensor module can integrate additional sensors in the future such as inertial measurement units, contact sensors or light sensors by only modifying the bottom board. The same reasoning applies to the top board containing the command and data module, and the primary power module. If modifications to the top board, such as a new controller unit or a new charging system, were to be made, the bottom board will not be affected.

    Sensor Module

    The first module of the electronic device subsystem is the sensor module. This module could be considered as the most critical module of the electronic device subsystem. Its importance is explained by reviewing the primary functions of the electronic device subsystem. The first function is to perform the amperometric measurement, the second function is to provide the iontophoresis current and the third function is to transmit the data to the mobile application. The sensor module fulfills two out of three of these functions and the third function depends on the presence of sensor data. As a result, developing the sensor module requires additional care to ensure project success.

    The sensor module is subdivided into three units: the amperometric unit, the temperature unit and the iontophoresis unit. This subdivision reflects the diverse functions of the sensor module and the structure of the software in the microcontroller regarding the sensor interface.

    The amperometric unit is composed of a potentiostat and an analog-to-digital converter. Its purpose is to perform the amperometric measurement. The potentiostat used is Texas Instruments’ LMP91000. It enables the electronic device to perform the amperometric measurement with high accuracy through the counter, reference and working electrodes of the biosensor patch. The analog-to-digital converter used is a 16-bit single channel converter. Such a high precision converter is required to translate faithfully the analog data produced by the potentiostat.

    Figure 7: The amperometric unit with, from left to right, (a) the potentiostat LMP91000, and (b) the analog-to-digital converter ADS1100.

    The temperature unit is composed of multiple temperature sensors embedded within multiple integrated circuits such as the potentiostat and the microcontroller. Its purpose is to enable a constant monitoring of the temperatures at the contact point with the user’s skin and of the electronic device in general. Monitoring the contact point with the user’s skin provides useful insight into the user’s body temperature while monitoring the electronic device’s temperature ensures user comfort through temperature control of the electronic device.

    The iontophoresis unit is composed of a current source. The current source used is Texas Instruments’ LM334. It provides the 0.8 mA iontophoresis current to the biosensor patch through the iontophoresis electrodes.

    Figure 8: The iontophoresis unit current source LM334.

    The sensor module serves as the interface between the electronic device subsystem and the biosensor patch. It connects to the five electrodes of the biosensor patch through a five-pin male header. The electrodes of the biosensor patch are themselves attaches a five-pin female connector which enables the biosensor patch to be easily replaceable and hence, allows the reusability of the electronic device.

    Command and Data Module

    The second module of the electronic device subsystem is the command and data module. The module fulfills the third critical function of the electronic device subsystem which is to transmit data to the mobile application subsystem. The command and data module incorporates both a hardware and software component as it houses the controller unit.

    The command and data module is subdivided into two units: the controller unit and the communication unit. This subdivision reflects a division in the software component of the module rather than its hardware component. The command and data module comprises a single component which is a Texas Instruments’ CC2640R2F Bluetooth Low Energy microcontroller module. This commercial-off-the-shelf module includes the CC2640R2F integrated circuit as well as the antenna circuit.

    Figure 9: The command and data module.

    The controller unit houses the software of the electronic device and acts as its central computer. It collects the data from the sensor module and processes it. It also sets the configuration of the different components in the electronic device which require a certain configuration in the context of the electronic device requirements. It tracks the battery status and provides the voltage bias for the iontophoresis unit in the sensor module. The choice for the controller unit is based on its low power consumption and built-in Bluetooth Low Energy Interface.

    The communication unit transmits the data processed by the controller unit to the mobile application. The communication unit uses the Bluetooth Low Energy protocol due to its low power consumption and transmission range.

    Primary Power Module

    The third module of the electronic device subsystem is the primary power module. The module supplies a regulated 2.85V direct-current voltage source to the electronic device. The primary power module is required to make the electronic module wireless and operational.

    The primary power module is subdivided into two units: the main regulation unit and the battery unit. The subdivision reflects a hardware division based on the functions of the different units. Decoupling the two units reflects a simplification of the design process where the sole dependency between the two units is the electronic device’s required supply voltage.

    The main regulation unit provides low-noise regulated 2.85V supply voltage to the electronic device. It uses Microchip’s TC1014 voltage regulator to perform this task. The choice for the particular supply voltage is based on the voltage requirement of the various components in the electronic device. The lower bound for the required voltage is 2.7V which is set by the potentiostat and the upper bound is set to 3.0V due to the type of battery used.

    Figure 10: The main regulation unit voltage regulator TC1014.

    The battery unit supplies the power source for the electronic device. It comprises the battery and its charging system. Currently, the battery used is a non-rechargeable coin cell battery due to its simplicity and hence, reducing the complexity of the electronic device for testing purposes. However, to make the electronic device fully practical, the electronic device requires rechargeability. Therefore, the battery unit is designed to be adapted to a great variety of battery unit and charging system which makes the electronic device highly modular in that regard. The modularity is achieved through a battery connector located on the top board which allows the battery to be easily removed from or connected to the electronic device.

    Figure 11: Shown in blue is the battery connector.
    Secondary Power Module

    The fourth module of the electronic device is the secondary power module. This module provides the reference voltage input for the potentiostat. The reference voltage is used by the potentiostat to compare with the desired bias voltage and adjust the counter electrode voltage accordingly.

    The secondary power module currently comprises of a single unit which is its regulation unit. The regulation unit’s purpose is to convert the 2.85V supply voltage of the electronic device into the 1.8V reference voltage input required by the potentiostat. The regulation unit uses Texas Instruments’ TPS797 voltage regulator.

    Figure 12: The regulation unit of the secondary power module voltage regulator TPS797.

    Printed Circuit Board Schematics and Layout

    To make a complex electronic board, a blueprint is required. This blueprint is the printed circuit board layout. However, before the printed circuit board layout is drawn, a circuit schematic showing the connections between every component of the circuit is required. The software application used to perform both of these tasks is KiCAD.

    The design process of the circuit schematics requires several external tools. First, a fair understanding of each integrated circuit component is needed and can be obtained through the integrated circuits datasheet. Datasheets usually provide typical application schematics and equations related to the configuration of the integrated circuits external circuits which allows the designer to determine the values of the passive components such as resistors and capacitors in the circuit. Second, a breadboard setup of the circuit provides the possibility to verify the circuit’s viability before implementing it on a printed circuit board. Additional knowledge are required to develop a low noise, low power and low cost electronic device such as proper biasing of the circuit, noise reducing filters and the minimization of circuit components.

    Once the schematics of the electronic device is completed, a printed circuit board layout can be created. The printed circuit board layout design is regarded by many electrical engineers as a form of art. Multiple factors come into play when designing the layout.

    First, the dimensions of the board or boards need to be determined. Determining dimensions is a primordial step since the whole layout design depends on the dimensions. In the context of this project, the constraints on the dimensions are the width of a forearm and the visual appeal of the electronic device. The forearm width constraint limits the length of the electronic device to about 40mm if the width is taken at the wrist. The visual appeal constraint demands that the ratio between the width and the length of the electronic device to be less than a 1:1 ratio. To ensure that the dimensions of the electronic device be well within the bounds set by the constraints while containing comfortably every circuit component, the electronic device is divided into two boards stacked atop of each other and having dimensions of 36mm by 18mm.

    Second, since the electronic device has a two-board design, the circuit components need to be placed on the appropriate board. While placing the components, the location of some components are fixed such as the connectors. Therefore, the remaining components will need to be placed while respecting these constraints.

    Third, the location of certain components relative to other components is also to be considered. For instance, ideally, bypass capacitors should be close to the voltage output and input pins in order to better filter the noise. Also, the potentiostat needs to be as close to the electrodes as possible to yield better results.

    Fourth, the number and the length of traces (copper tracks that act as wires between components) and the number of vias (copper plated holes in the printed circuit board) should be minimized to reduce the complexity of the board and to increase usable area.

    Once the printed circuit board layout is completed and ready for manufacturing, a set of Gerber files are generated for the manufacturer to use on the circuit board printing machine. These files are generated directly through KiCAD.

    Figure 13: The printed circuit board layout of the product prototype.




    Mobile Application

    Github repository: Mobile Application

    Functional Description

    The mobile application subsystem is used as an interface between the user and the rest of the system. It performs a large set of functions which includes:

  • Communicating with the electronics.
  • Analyzing the color expression of the biosensor.
  • Displaying processed data.
  • Contacting overdose response services in case of emergency.
  • Managing user information.
  • Situating nearby help centers.
  • Educating the user on risks, prevention and protection.
  • These functions are implemented in the form of features and activities in the mobile application.

    Design of the Mobile Application

    Overview of the Mobile Application

    The objective of the mobile application subsystem is to provide the user with a user-friendly, intuitive and rapid interface between the user and the electronic device, biosensor and electrochemistry subsystems. The mobile application subsystem is designed to be simple and intuitive for the user to navigate. It is designed to protect and inform the user.

    Mobile Application Architecture

    Mobile Application Subsystem Diagram

    To achieve its objective and its requirements, the mobile application subsystem is subdivided into five features: the user status feature, the image processing feature, the data management feature, the user account feature and the help platform feature shown in Figure 3.

    Mobile Application Subsystem Diagram
    Figure 14: Mobile Application Subsystem Diagram
    User Status Feature

    The first feature of the mobile application subsystem is the user status feature. This feature is most critical feature in the mobile application subsystem. It is the feature that interface directly with the electronic device subsystem through Bluetooth Low Energy. It uses the processed data to update the user status in real-time. It uses this data to notify the user of their current condition as well contacting emergency services in the case of an overdose. Hence, the user status feature performs the most important tasks related to the user’s well being. As a result, the user status feature need to be constantly tested and improved to ensure the safety of the user.

    The user status feature is subdivided into four subfeatures: the Bluetooth socket subfeature, the data input subfeature, the notification subfeature and the emergency alert subfeature. The subdivision of the user status feature reflects the grouping of tasks and methods in the user status feature.

    The Bluetooth socket subfeature establishes the communication channel between the electronic device subsystem and the mobile application subsystem. It uses the Bluetooth Low Energy protocol to establish this connection. It scans for devices, pairs to the electronic device, connects to and receives data from it. It performs these tasks through the BluetoothLeService class and the BluetoothActivity activity. Everytime, the user logs into the mobile application, they will be prompted to enable Bluetooth on their mobile phone. This process guarantees that the user does not forget to establish a connection between the phone and the electronic device. However, keeping Bluetooth activated increases power consumption in the mobile phone. Beta testing of the mobile application will thus be required to find an equally safe, but less power hungry solution.

    The data input subfeature deciphers the byte data obtained from the bluetooth socket into ASCII characters which can be understood by humans. This subfeature also takes the processed data and transfers it to the other components of the user status feature such as the notifications and the emergency alert subfeatures. If no data is received, the data input subfeature will tell the system that there is no data. It performs its tasks through the BluetoothLeService class and the MainActivity activity.

    The notifications subfeature handles all notifications to the user. The notifications include electronic device battery status warnings, fentanyl level warnings, contacting emergency service message, software update reminder. The notifications subfeature performs its tasks through the Notifications class and is called by multiple activities. The notifications are aimed at user protection and user-friendliness.

    The emergency alert subfeature enables the user to contact emergency services rapidly. The contact can be made manually or automatically. The user will need to enable the automatic contact first since by default the contact needs to be performed manually. Automatic contact is done if the fentanyl level reaches the overdose threshold. The manual contact can be accessed through the EmergencyActivity activity which has two buttons: Call Overdose Response Services (or the local emergency phone number), Call Emergency Contact. The Call Overdose Response Services button depends on the location of the user. The Call Emergency Contact will contact the emergency contact number which was filled in by the user. This contact number can be that of a relative, a friend, a spouse, a guardian or someone who can be of assistance to the user.

    Status Activity Emergency Activity
    Figure 15: Screens of the user status feature, from left to right, (a) the Status activity screen, and (b) the Emergency activity screen.

    Image Processing Feature

    The second feature in the mobile application subsystem is the image processing feature. This feature is quite critical as it can be used by multiple stakeholders such as the user, first responders and surrounding people to determine the risk exposure of the user. This image processing feature is based on the expression of a chromoprotein in the biosensor patch.

    The image processing feature is subdivided into four subfeatures: the gallery access subfeature, the camera capture subfeature, the image analysis subfeature and the patch detection subfeature. This subdivision reflects the unique function of each subfeature and helps visualize the dependencies between each of them.

    The gallery access subfeature allows the user to find a picture from the photo gallery in their mobile phone. Upon selection this picture will need to be cropped by the user to increase image analysis accuracy. Once the picture has been cropped, the picture will be sent to the image analysis subfeature. The gallery access subfeature performs its tasks from the CameraMenu and CropActivity activities and uses the ImageCroppingView class.

    The camera capture subfeature allows the user to take a picture through the mobile application. The user is then prompted to crop the picture taken through the CropActivity activity. Once the picture has been cropped, the picture will be sent to the image analysis subfeature. The camera capture subfeature is accessed from the CameraMenu activity.

    The image analysis subfeature analyzes, pixel by pixel, the color of the patch and provides a percentage of pixels which corresponds to the expected color change if fentanyl were detected and chromoproteins were expressed. The algorithm of the image analysis subfeature takes the red-green-blue values of each pixel and compares them to an expected color range, if they match the color, then the pixel is considered as valid and is counted. Then, the algorithm computes the ratio of valid pixels over the total number of pixels. This ratio is then sent to the data management subfeature for comparison to threshold values. The image analysis subfeature performs its tasks through the PictureAnalysisActivity activity.

    The patch detection subfeature recognizes the biosensor patch through a picture and automatically crops the picture. This subfeature is, however, still in development. The algorithm for the subfeature involves recognizing a specific pattern which can be either the pattern formed by the electrodes or a unique set of points added to the patch. The algorithm will then use a set of points to determine Euclidean distances in the picture. Based on these distances, the algorithm will automatically adjust the cropping of the image so as to have the entire patch within the bounds of the crop, but keeping out as much of non-patch area as possible. The patch detection subfeature is implemented in the PatchDetection class.

    Camera Menu Activity Crop Activity Picture Analysis Activity
    Figure 16: Screens of the image processing feature, from left to right, (a) the Camera Menu activity screen, (b) the Crop activity screen, and (c) the Picture Analysis activity screen.
    Data Management Feature

    The third feature in the mobile application subsystem is the data management feature. The data management feature is a central feature of the mobile application as it stores, processes and displays the data collected from the user status, image processing and user account features. The centralization of this feature enables the software developer to easily update the mobile application when new algorithms are developed. It also reduces the need to create multiple databases.

    The data management feature is subdivided into three subfeatures: the database subfeature, the data display subfeature and the data processing subfeature. This subdivision reflects the uniqueness in function of each subfeature.

    The database subfeature stores the user account data, user status data and image processing data. It uses the SQLite library to implement the database. The database is implemented in the AccountDBHandler class. All data is user- specific, therefore if a different user logs into the mobile application, they will not be able to access data from the other user accounts. Furthermore, all data is currently stored in the mobile phone.

    The data display subfeature displays the results from the data processing subfeature in the MainActivity activity. Data is displayed through numerical values and through a color scheme. The color scheme is based on threshold values for fentanyl and will also apply to other sensor data in the future. The data display subfeature is meant to inform the user quantitatively and qualitatively of their current condition with respect to fentanyl levels in their sweat.

    The data processing subfeature converts the data from the image processing feature and the user status feature into meaningful quantities and qualities. The algorithm which processes the image processing feature data uses the ratio of valid pixels over the total number of pixels and compares it to threshold values. These threshold values provide a gradient which can provide an estimate on the seriousness of the user’s condition. The gradient will be expressed in a qualitative fashion through a color scheme which will be displayed through the data display subfeature. The algorithm which processes the user status data converts the data received from the data input subfeatures into concentrations and temperatures, which are then compared to threshold values. These threshold values are then used to determine a gradient expressed in a color scheme. The output of this algorithm is both quantitative and qualitative. Both types of output are displayed through the data display subfeature.

    User Account Feature

    The fourth feature in the mobile application is the user account feature. This feature individualizes the mobile application experiences. It gives the user a personalized and secure environment. The user account feature is important for reaching out to the user, protecting the user and ensuring that they will not hesitate to use the mobile application whenever needed.

    The user account feature is subdivided into three subfeatures: the registration subfeature, the account access subfeature and the account update subfeature. This subdivision reflects the different functions and tasks performed by each subfeature.

    The registration subfeature handles the first use of the mobile application by a user. It asks for a diverse range of user information which includes email address, name, date of birth, sex, height, weight and emergency contact information. The user is also prompted to create a password which will be associated to the email address. The registration subfeature is handled by the LogJoinActivity, SignUpActivity and AboutYouActivity activities. All the user information is stored in a database in the data management feature and display in the Account Activity.

    The account access subfeature handles the subsequent accesses to the mobile application by a user. Everytime the user closes the mobile application, the user is prompted to enter their email address and the corresponding password to access the content of the mobile application. The account access feature is handled by the LogInActivity activity.

    The account update subfeature enables the user to update their information. The update is performed in the Account activity by clicking on the information to be updated. When the information is clicked, a dialog appears with an input text field where the user can input their new information. The information is then updated in the database.

    Sign Up Activity About You Activity Log In Activity Account Activity
    Figure 17: Screens of the user account feature, from left to right, (a) the Sign Up activity screen, (b) the About You activity screen, (c) the Log In activity screen, and (d) the Account activity screen.
    Help Platform Feature

    The fifth feature of the mobile application is the help platform feature. This feature’s purpose is to educate the user on the risks related to fentanyl and how to prevent and protect from it. The help platform also incorporates a help center map and a link to learn more about IGEM and IGEM Concordia.

    The help platform feature is subdivided into three subfeatures: the help center map subfeature, the user education subfeature and the about IGEM subfeature. This subdivision reflects the difference in tasks and function between the subfeatures.

    The help center map subfeature displays rehabilitation centers and injection sites location on a Google Maps interface. This subfeature is quite important in assisting the user in finding help and finding a safe place for taking their drugs. The location of the rehabilitation centers are currently only in the vicinity of Montreal and are stored within the MapsActivity activity which is accessed from the LearnMenu activity. The help center map subfeature displays the rehabilitation centers and injection sites into two different colors to distinguish them. The help center map also offers the possibility of getting directions by integrating a link to Google Maps.

    The user education subfeature informs the user on the risks, protection and prevention measures regarding fentanyl. The subfeature can expand to accommodate a broader educational platform which can include information about drugs, medications and treatments with the help of medical professionals. The user education subfeature is designed to be intuitive in its navigation and user-friendly. The subfeature is accessed through the LearnMenu activity as a set of buttons which lead to a diverse set of educational activities.

    The about IGEM subfeature provides insight to the user about IGEM and IGEM Concordia. This subfeature could be integrated into a future Settings feature. However, for the moment, it will be located in the LearnMenu activity under the help platform feature. The subfeature is accessed through the LearnMenu activity via a About IGEM button. This button leads to a descriptive of IGEM and IGEM Concordia as well as links to their respective website.

    Learn Menu Activity Help Center Map Activity
    Figure 18: Screens of the user account feature, from left to right, (a) the Learn Menu activity screen, and (b) the Maps activity screen.

    Prototyping using JustInMind

    Before developing the mobile application, it is important to develop the ideas for the application. These ideas include the features to be implemented, the overall theme of the mobile application and the structure of the mobile application. To help in this process of developing ideas, a prototype of the mobile application which does not require any programming can be created using JustInMind.

    Prototyping the application is an important aspect of the design. It provides a clear way to visualize the mobile application and decide on how to navigate through different activities, assign functions to each button and also allows the team to have meaningful discussion about the mobile application prior to the development process.






    References Overview:

    Algren D, Monteilh C, Rubin C, et al. Fentanyl-associated fatalities among illicit drug users in Wayne County, Michigan (July 2005-May 2006). Journal Of Medical Toxicology: Official Journal of the American College Of Medical Toxicology [serial online]. March 2013; 9(1):106-115.

    Government of Canada, Health Canada. (2018, June 22). Health Canada reminds Canadians of the limitations of fentanyl test strips being used to check street drugs before consumption. Retrieved from http://www.healthycanadians.gc.ca/recall-alert-rappel-avis/hc-sc/2018/67106a-eng.php.

    National Center for Biotechnology Information. PubChem Database. Carfentanil, CID=62156, https://pubchem.ncbi.nlm.nih.gov/compound/Carfentanil (accessed on Oct. 10, 2019)

    National Center for Biotechnology Information. PubChem Database. Fentanyl, CID=3345, https://pubchem.ncbi.nlm.nih.gov/compound/Fentanyl (accessed on Oct. 10, 2019)

    O’Donnell, J. K., Halpin, J., Mattson, C. L., Goldberger, B. A., & Gladden, R. M. (2017). Deaths involving fentanyl, fentanyl analogs, and U-47700—10 states, July–December 2016. MMWR. Morbidity and mortality weekly report, 66(43), 1197.

    National Safety Council. Retrieved September 3, 2019, from https://www.nsc.org/road-safety/safety-topics/fatality-estimates. https://www.nsc.org/road-safety/safety-topics/fatality-estimates

    Scholl L, Seth P, Kariisa M, Wilson N, Baldwin G. Drug and Opioid-Involved Overdose Deaths — United States, 2013–2017. MMWR Morb Mortal Wkly Rep 2019;67:1419–1427. DOI: http://dx.doi.org/10.15585/mmwr.mm675152e1

    Sanger-Katz, M. (2018, August 15). Bleak New Estimates in Drug Epidemic: A Record 72,000 Overdose Deaths in 2017. Retrieved from https://www.nytimes.com/2018/08/15/upshot/opioids-overdose-deaths-rising-fentanyl.html.

    Special Advisory Committee on the Epidemic of Opioid Overdoses. National report: Apparent opioid-related deaths in Canada (January 2016 to March 2019). Web Based Report. Ottawa: Public Health Agency of Canada; September 2019. https://health-infobase.canada.ca/datalab/national-surveillance-opioid-mortality.html



    References Description:

    Bick, M. J., Greisen, P. J., Morey, K. J., Antunes, M. S., La, D., Sankaran, B., … Baker, D. (2017). Computational design of environmental sensors for the potent opioid fentanyl. ELife, 6. https://doi.org/10.7554/eLife.28909

    Feng, J., Jester, B. W., Tinberg, C. E., Mandell, D. J., Antunes, M. S., Chari, R., … Baker, D. (2015). A general strategy to construct small molecule biosensors in eukaryotes. ELife, 4. https://doi.org/10.7554/eLife.10606

    Kim, J., Sempionatto, J. R., Imani, S., Hartel, M. C., Barfidokht, A., Tang, G., … Wang, J. (2018). Simultaneous Monitoring of Sweat and Interstitial Fluid Using a Single Wearable Biosensor Platform. Advanced Science, 5(10). https://doi.org/10.1002/ADVS.201800880