# Merging Ontologies and Data from Electronic Health Records
## 2 Related Work  
In recent years, the high complexity of clinical documents has been largely recognised [6], and the importance of a correct interpretation of data for an appropriate diagnosis has been also highlighted [7; 8; 9]. Moreover, there exist some gaps in the representation of symptoms and clinical data in the structure of EHR clinical documents, because the most significant descriptions of conditions remain in unprocessed free text [10; 11; 12]. Indeed, the importance of sharing and using EHRs has also been shown [13]. JSON is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa). Many researchers have highlighted that JSON is a notation that is gradually replacing XML due to its relative simplicity, intuitiveness, compactness, and the ability to directly map the native data types of popular programming languages [14; 15]. A first prototype conversion tool of clinical documents to a JSON format was introduced by [PERSON] et al. [16]. The goal of their work was to allow easier access to health data stored in the Austrian information system for EHR (ELGA) and convert CDA documents into Fast Healthcare Interoperability Resources (FHIR) resources, via XML. The limitation of such a proposal is that it implements a basic prototype with limited capabilities for converting from the XML document to an equivalent JSON file. Moreover, they do not interpret or enrich the processed data. [PERSON] et al. [15] aimed at providing a more complete clinical document to facilitate doctors' work by integrating Social Determinants of Health (SDoH) into EHRs,leveraging for this a specific ontology. Specifically, they combine the HL7 standard with the SNOMEDCT ontology ([[https://bioportal.bioontology.org/ontologies/SNOMEDCT](https://bioportal.bioontology.org/ontologies/SNOMEDCT)]([https://bioportal.bioontology.org/ontologies/SNOMEDCT](https://bioportal.bioontology.org/ontologies/SNOMEDCT)), last accessed 10 January 2024), using JSON as a means to better connect data in medical records to external data sources. The limitation of this approach is that it was not designed to allow connecting multiple ontologies like our approach. Indeed, the authors concluded that the research and development teams of health IT and healthcare services strive to make information in existing semantic frameworks more accessible and connected to EHRs. However, they left the integration of data from other ontologies as future work. Ontologies are among the most effective and most widely adopted means to represent knowledge in the medical (or any other) domain [17; 18; 19; 20]. Several authors (i.e., [21]) have been using them to facilitate medical decision-making, e.g., to suggest diagnoses and treatments, also taking advantage of probabilistic algorithms applied to the ontology data. However, successfully processing clinical data to navigate complex ontologies down to a possibly correct diagnosis is not at all an easy task to accomplish, because probabilistic algorithms applied to the rigid complex structure of an ontology can fail when the clinical data are poorly specified or relate to little-known cases. Other authors [22; 23; 24; 25] have been more concerned with expanding the domain of medical knowledge through an accurate review of the related concepts, e.g., the analysis of disease ontology terms or IDs (DOIDs), highlighting the importance of an enriched and complete ontology for the analysis of diseases. However, in our approach, the aim is to automatically create a connection between HL7 and ontologies as, e.g., DOIDs, and not to change ontologies, as they were carefully developed by experts. A further obstacle is the complexity of the HL7 CDA standard itself, whose data format is very widespread but also difficult to manage and to apply in the actual daily routine [16].