{'fraction_non_alphanumeric': 0.0349302476478858, 'fraction_numerical': 0.0058397318049097004, 'mean_word_length': 4.73697270471464, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Digital Phenotypes for Personalized Medicine

. In this paper we propose a new definition of digital phenotype to enrich the formulation with information stored in the Electronic Health Records (EHR) plus data obtained using wearables. On this basis, we describe how to use this formalism to represent the health state of a patient in a given moment (retrospective, present, or future) and how can it be applied for personalized medicine to find out the mutations that should be introduced at present to reach a better health status in the future.


Introduction
Personalized medicine ( [10]) arises from the differences between the results of treatments on distinct patients, depending on their performance at molecular level, which is conditioned by the patient's genotype. In this sense, the presence or not of a concrete gen can make a patient more or less receptive to one treatment or another ( [11]). The application of this principle is giving promising results, but so far it is limited to a small number of samples and very concrete diseases, because of the high cost of genetic sequencing ( [3]).
In parallel, there is an increasing interest on storing phenotype related data ( [15]), but usually considering the classic focus of the observation based-medicine for diagnosis, so only symptoms are stored. As an example, in the literature we can find some recent researches using mobile devices with sensor (wearables) ( [2]) for medical purposes. Most of them design especial devices to detect concrete pathologies (e.g. heart attack, [12], stress [19] [23]). Other approaches look for patterns in patient behavior (e.g. in the care of elder people [21], scoliosis patients [8]). All these proposals are for concrete cases providing ad-hoc solutions, but do not consider high level concepts (like life habits).
Recently, the data records from the interaction of patients with mobile devices has been used in Psychology ( [9]) to obtain three patients' characteristics: the behaviour, the conscience and the mood. This approach has proven to be useful for identifying some mental disorders ( [20]). In this proposal, only a very limited piece of information is considered and it could be quite enriched by incorporating the great data source that is the patient's Electronic Health Record (EHR). In the previous presented Psychology approach ([9]) the authors use these high level concepts (e.g the patient mood) but do not integrate with EHR data.
On the other hand, the data stored in the EHR has been used in combination with data mining methods, mainly oriented to diagnosis purposes ( [22]). Among these methods, there are some interesting proposals considering simple temporal relations ([4] [7]). These approaches find temporal relations by means of rules (looking for temporal relations between the antecedent and consequent) or by performing predictions with a fixed future window (e.g. one month). To our best knowledge, there are no proposals that take into account the complex temporal relations between elements in the EHR like sequences of facts with non lineal relations, different intervals depending on the patients, parallel evolutions of pathologies, interactions between drugs in multipathologies patients, etc.
The integration of both health information sources (wearables and EHR) is currently under study ( [6]), mainly from the point of view of data integration than with the focus on patient care solutions; since to achieve this goal the first step is the integration of data from different sources. Solutions as the Electronic Health Records Aggregators (EHR agg , [17]) and the European Health Data Space ( [5]) are the perfect starting points to solve this issue.
In this paper we redefine the concept of digital phenotype to incorporate information from EHR and wearables, to find out complex relations that opens another way to personalize treatments, parallel to the current genetic via. Our proposal thus is framed into the Smart Data area ( [18]) because it aims to deal not only with the volume of the Big Data but also with the correct representation of the information to be able to model and learn more complex relations.

Methods
In this section we present our proposal to define the enriched basic concepts related to digital phenotypes.

Definition 1.
A Digital Nucleotide (dn) is each one of the elements stored in the EHR (a diagnosis, a treatment, an analysis result, a surgical intervention, a symptom, etc.) or from wearables devices (activity, sleep habits, mood, diet data, etc.).
In Figure 1, we have some examples of dn. Some are from the patient's EHR (e.g. a diagnosis like ankle sprain, symptoms like chronic low back pain or knee pain, and different treatments). Other dn are high level concepts defined over the data from wearables like decreasing activity, increasing of weight or bad sleep routines.

Definition 2.
A Digital Fen (df) is a set of nucleotides that includes dn's from the EHR, wearables, or both; and a relation < t that establishes the temporal ordering between them.

)
(1) To exemplify, as shown in Figure 1, we may define a Digital Fen df modelling lumbar facet syndrome as the digital nucleotides dn 1 ={chronic low back pain}, dn 2 ={Anti-inflammatory}, and dn 3 ={physiotherapy}, with the relation < t defined as: (2) meaning that the dn 1 appears before dn 2 and dn 3 , but there is no order between these two later nucleotides; so they can be applied before, after or concurrently but always after dn 1 appears.
These digital fens are the result of applying specific data mining methods over the data from the EHR databases and the wearable records, so these hidden relations could be discovered.
With these definitions, we are able to present the concept of Digital Phenotype.

Definition 3.
The Digital Phenotype ( ) of a patient X at a specific time t is the set of digital fens that the patient presents:

Results
According to this definition above, a patient has different DPs evolving from one to another over time. For example, Figure 1 However the idea behind the DP's is not only to be able to model in a better way the patient's health and predict his/her evolution, but to be able to identify what we should be done to redirect the patient's health towards a Desirable Digital Phenotype (DP desirable )} ( Figure 2). To follow the genome simile we want to find which mutations (changes in the Digital Phenotype) must be applied to achieve the DP desirable .
Our proposal, to find the mutations is to identify which df's should be modified (added or removed) in the patient's DP present . To be able to do it, we need to learn how the DP changes depending on the digital fens considered: This task can be achieved by means of machine learning methods capable to work with the presented structure. By learning these transformation functions ( ), we can predict how a patient's health status can change and identify the df's to induce a better health evolution.

Discussion
Once we have the basic concepts, we define the stages of the process that complete the framework, indicating the methods that should be developed at each step: x Identification stage. This step identifies the dn's from the EHR and wearable records. We are currently developing data mining methods capable of working over multi-source data. As shown in [13], it is essential that these methods take into account the reliability and quality of the data. x Evolution stage. This step learns the mechanisms though which the $DP$ evolves; i.e. which mutations results in which health state. Techniques in this step must be explainable, so medical staff and patients can understand the evolution process and results. This is the case of methods such as temporal association rules [1] or gradual dependencies [14] able to deal with imprecision and interpretable to the user (e.g [16]). x Prediction stage. At this phase, the knowledge discovered in previous steps is used to estimate the future health state. Here estimation and prediction methods should be applied to figure out the DP Predicted . x Mutation stage. Methods in this final step will be able not only to predict the evolution but also to identify the changes to introduce in patient's treatments or life habits, so the DPDesriable can be achieved. This process will involve data mining methods to learn these changes and their effects in the $DP$'s.

Conclusions
We have proposed and enriched concept of Digital phenotype as a data model able to represent not only the data from the patient's wearable records but also the data from his/her EHR and their complex temporal relations. This framework, represents a step into the real SmartData modelling to give an holistic view of the patient. With the digital phenotypes we can model the patients evolution, learn hidden patterns and relations.
We are working on the definition of methods to automatically identify the relations between df, not only frequent, but also those existing in rare diseases (less frequent). They can help in early diagnosis and in the improvement of the expected evolution of patients.
The integration of the digital phenotypes with patients' genetic information will be another step to improve the personalized medicine as a global concept.