## 3 Materials and Methods
The augmentation content includes interaction descriptions (_?interactionDescription_), names (_?targetDrugName_), and codes (_?targetDrugCode_) of the interacting drugs. Figure 4 shows both the query and the query graph for this example. The query graph consists of the DrugBank dataset (i.e., the target dataset) plus the EOI binding triple resulting from the example in section B. At runtime, the EOI binding triple sets the value of_?sourceDrugCode_ as _DB0009_ (_Filgrastim_). Then, the triples in the _SERVICE_ clause query the DrugBank dataset to obtain descriptions of drug-drug interactions related to _Filgrastim_, in addition to the names and codes of the interacting drugs. The execution of this SPARQL query provides the drug-drug interactions for _Filgrastim_. Figure 5 shows the results formatted according to the W3C schema for query results. Note that the variables in the _SELECT_ clause of the SPARQL query (Figure 4) appear in the augmentation content (Figure 5). (D) Transforming the augmentation content into a normalized EHR extract. This section focuses on addressing the sixth step of Figure 2, which encompasses two tasks: (i) modeling the augmentation archetype, which must contain at least an element for each data item in the augmentation content (i.e., for each variable in the _SELECT_ clause of the SPARQL query in section C), and (ii) defining mapping specifications between the W3C schema for query results and the augmentation archetype (i.e., data exchange 1 at schema level in Figure 1). The modeling of the augmented archetype can be automated by generating an archetype whose root is a cluster, and adding an element for each variable included in the augmented content. In addition, the mapping specification could also  
Figure 3: The SPARQL query and the query graph to obtain the augmentation content. The query graph is formed by the EOI binding triples plus the target dataset. The EOI binding triples are injected at runtime in the query graph as parameters, whereas the target dataset is included through a service (i.e., using the _SERVICE_ clause of federated SPARQL queries). Although the source remains outside the query graph, it is possible to identify the augmentation content in the _WHERE_ clause, using the EOI binding triples as a filter. Finally, the _SELECT_ clause establishes which subset of the target dataset constitutes the augmented content. be automated by following a similar procedure. However, to ensure that the involved concepts preserve their original meaning, it is advisable to perform these steps manually. The LinkEHR platform provides the specification of mappings between the W3C schema for query results and the augmentation archetype. LinkEHR provides a set of tools to manually model EHR archetypes. Moreover, the mapping capabilities of LinkEHR allow the definition of high-level declarative mappings relating a set of data schemas. The mapping language basically specifies how to compute a value for an atomic attribute of the target schema by using a set of atomic elements from the source schema. These value correspondences are defined by a set of pairs, consisting of a transformation function and a filter. The simplest kind of transformation function is the identity function, which copies a source value into a target atomic attribute. In cases in which it is necessary to transform source atomic values, a wide range of transformation functions is supported. Once mapping specifications are defined, LinkEHR compiles them into a XQuery script able to transform instances of the source schema to instances of the target schema. LinkEHR can be used to model the augmentation archetype, and to define mapping specifications between the W3C schema for query results and the augmentation archetype. Compiling these mapping specifications results in a XQuery script, whose execution transforms the augmentation content into a normalized EHR extract according to the augmentation archetype (i.e., data exchange 1 at data level in Figure 1).