## 3 Materials and Methods  
This section describes the methodology and tools used to design an augmented archetype. For the sake of clarity, some of the steps in Figure 2 are merged in the explanation. A step-by-step example is also included for a better understanding of the methodology. The example shows how to build the augmented medication archetype starting from the medication archetype, and adding information about drug-drug interactions as augmentation content. As mentioned previously, the starting point is an EHR archetype. (A) Identifying the augmentation content for a given EHR archetype. Designing an augmented archetype requires (i) identifying EOIs in the EHR archetype, (ii) identifying potentially interesting external information sources, and (iii) finding equivalent concepts between them (steps 1, 2, and 3 in Figure 2). Usually, EOIs are coded values (e.g., diagnostics, procedures, and medications), that can be bound to external information sources to enrich the initial EHR extract with additional information or knowledge. Semantic Web datasets are used for this work as external information sources. Therefore, potentially interesting Semantic Web datasets should be identified to complement the information provided by the EOIs. In addition, a terminology mapping service allows identification  
Figure 2: Methodology to define the augmentation archetype (steps 2 to 6) and the whole process to obtain the augmented archetype (steps 1 to 7). of equivalencies between coded values from different terminologies. This can be used to obtain local codes from the target terminology (i.e., the terminology used in the Semantic Web dataset) equivalent to the EOI codes in the source terminology (i.e., the terminology used in the initial EHR archetype). Finally, VoID descriptors allow identification of public LOD datasets exploitable through SPARQL queries. Example: As a starting point, the initial EHR archetype is the medication EHR archetype published by the Spanish NHS [23] (_CEN-EN13606-ENTRY.Medicacion.v1_). The selected EOIs are the data elements containing the active medication (located within the archetype at/items[archetype.id=\"at0005\"]/parts[archetype.id=\"at0010\"]/value_) To build the augmented medication archetype, the EOIs are augmented with additional information about drug-drug interactions (i.e., the augmentation content). In this case, the EOIs are defined as 'CD' data type, which are coded values that may contain SNOMED-CT [24] codes. To identify data items equivalent to SNOMED-CT drug codes in different terminologies/ontologies, a random subset of SNOMED-CT drug codes is used as a sample to query the BioPortal [25,26] terminology mapping service. For each data item in the sample subset, the service returns a list of equivalent terms from other sources, combined with URLs of these sources (e.g., the source URL for an item of the DrugBank database:  
_[[http://www.drugbank.ca/drugs/DB00099_](http://www.drugbank.ca/drugs/DB00099_)]([http://www.drugbank.ca/drugs/DB00099_](http://www.drugbank.ca/drugs/DB00099_))). Usually, source URLs point to the organization that created the terminology, which often does not provide a public LOD dataset to exploit the terminology through a query language. In this situation, description mechanisms available in the LOD cloud, such as VoID descriptors and/or RDFS properties, are useful for finding LOD datasets containing the required terminology. In this example, an SPARQL query using VoID descriptors serves to identify the DrugBank database as a LOD dataset in the LOD cloud (e.g., the source URL for an item of the DrugBank LOD dataset:  
_[http://bio2 rdf.org/drugbank:DB00099_](http://bio2 rdf.org/drugbank:DB00099_)). (B) Transforming EOI into a semantic representation. A formal relationship is defined between EOIs and their equivalent data items in the target dataset. This relationship is expressed through the EOI binding triples, which are RDF triples composed of the EOI coded values as subjects and the equivalent data items as objects (step 4 in Figure 2).