Our approach to AI-driven system mapping HL7 to FHIR data
In the medical field, diverse data formats often present a significant challenge for healthcare organisations. Data from one device may not correspond seamlessly with target instances, leading to a need for data mapping. Usually, this is a manual, time-consuming process. We decided to take on an initiative that automates this job, focusing on mapping data between the HL7 standard and FHIR. This article explores the hypothesis that artificial intelligence (AI) can effectively support the process.
About HL7 and FHIR data standards
HL7, or Health Level Seven, is a set of international standards for exchanging, integrating, sharing, and retrieving electronic health data. It primarily operates at the seventh level of the OSI (Open Systems Interconnection) model, focusing on application-level communication in healthcare systems. HL7 is widely used for clinical and administrative data exchange in information systems such as Electronic Health Records (EHR), hospital management systems, and other tools used by doctors, nurses, and hospital administration to exchange patient information efficiently and securely, ensuring proper patient care.
FHIR (Fast Healthcare Interoperability Resources) is a standard developed by HL7 International. It leverages web technologies and data formats like JSON and XML to facilitate efficient data interchange in the healthcare industry. FHIR is part of the HL7 standards family but differs significantly from its predecessors, such as HL7 versions 2 and 3, in its approach and ease of implementation. FHIR facilitates the integration of different healthcare systems, offering a more accessible and flexible way to exchange patient information between healthcare providers.
The key differences between HL7 and FHIR lie in their data formats, structure, and interoperability challenges due to these differences. Thus, to use data that is in different standards in one system, it is necessary to unify it, and this process is called data mapping.
What is data mapping in healthcare?
Suppose one medical device collects and stores a patient’s data in a database. The patient goes to a hospital, and the staff needs their previous health results. A doctor or a nurse sends a query via an application, but the hospital system operates in the FHIR standard and the medical device from before stores data in the HL7 format. To make use of the results of the examination taken earlier, the data has to be “translated” from one format to another so the hospital system can understand it.
Data mapping leads to medical data interoperability; it’s a process of matching fields from one database or dataset to another, creating a link between the elements. It’s a crucial step in data integration and migration projects, ensuring that data from one format is accurately translated and transferred to the target system.
Usually, data mapping in the healthcare sector is conducted manually, which limits real-time data access possibilities. This method involves domain experts who analyse and align data elements from one standard to the other. This approach, while thorough, significantly slows down the data exchange process and burdens healthcare IT professionals.
Partner with us for advanced healthcare solutions
Find out moreA case study of an AI-driven data mapping system
The healthcare data mapping system we developed responds to the need for automation in the patient data exchange process. By automating data mapping from one system to the other, as an example HL7 to FHIR, the system aims to shorten the time needed to transform the data, thus relieving people involved in the process.
The project has been undertaken as a part of Spyrosoft’s R&D programme, Innovation Lab. Following the market’s need, we decided to implement artificial intelligence as an essential component of a system for mapping healthcare data.
Specialists involved in the initiative
This project brought together a team of experts from three areas:
- Domain expert – a person with in-depth knowledge of medical standards. He was involved to provide guidance to the developers and to make quality checks on the results;
- Software developers who built the application and ensured its effectiveness. They were also responsible for testing and improving the solution to meet the project’s requirements;
- AI specialists who supported the developers in critical areas such as learning and model fine-tuning. They ensured the developers had the necessary assistance to deliver the best possible outcome.
Technology used for healthcare data exchange
The system’s backend is developed using C# in the .NET environment and features an integrated ChatGPT model. We chose to use a commercial AI model rather than build one from scratch because it had already implemented both HL7 and FHIR standards. Using a commercial model complies with medical regulations since our system only processes data structures and schemes, not patient data. The ChatGPT feature is hosted in the cloud, and training was conducted there, too.
Artificial intelligence model training
We chose to work on observational data such as blood test results, blood pressure, or weight. There is also coded information on the type of examination, when the test was taken, and if the data is still valid. Many of those labels differ between the HL7 and FHIR standards.
We generated data that complies with both formats to train the model. While training, we observed that when asked the same question many times, the model generated different answers. At first, programmers were feeding the model all the information in one query, and that was the moment AI specialists came with help, introducing the development team to fine-tuning. Fine-tuning is about building the context and working on the results for longer, pointing out good answers and wrong answers and providing examples of correct responses rather than sending single, complex queries.
Deliver healthcare projects faster with our proven AI framework
Download the ebookData validation
For now, the system generates several data mapping proposals, and the user chooses the one that best meets their expectations. The user checks if the structures seem valid and manually completes the mapping in areas that were too complex for the model to handle.
Future development plans
The next idea is to use AI to validate data that the previous model had come up with. Now, the model gives three or four different results, and a person has to choose one. This model would pass all mapping proposals through a validator, refer them to standards, find errors, correct them, and pass again.
Implementation outcomes up to date
Currently, at about 70% operational level, the system has demonstrated that AI can significantly speed up the medical data mapping process. So far, the model has only been trained on artificial data; feeding it the target information (e.g., client’s medical data) will enable it to learn even better and increase its efficiency level.
For us, the most significant outcome of the initiative is the knowledge and experience we gained. It’s not only limited to mapping data from HL7 to FHIR, as it’s possible to build an AI-powered system that works with other input and output data.
Leverage the power of AI in healthcare
Our experts will advise you on how to apply AI in your specific business case. Learn more about our healthcare and life sciences services or contact us via the form below.
FAQ
Mapping HL7 to FHIR is essential for enabling interoperability between legacy systems and modern digital platforms. It ensures consistent healthcare information exchange, supports regulatory compliance, and helps providers move toward unified patient records and more seamless digital services.
Challenges include handling inconsistent data sources, variations in HL7 implementations, and differences in data structure. These obstacles can impact data quality and make manual mapping slow and error-prone.
Common data mapping tools include integration engines (e.g., Mirth Connect), libraries like HAPI FHIR, and data for AI models that assist in identifying mapping patterns. APIs and interoperability platforms help ensure the converted data is accessible in real time.
AI can automate message parsing, suggest optimal FHIR implementation mappings, and validate converted data. With the help of machine learning models and pattern recognition, this process becomes more accurate and efficient. For example, Spyrosoft uses data and AI to streamline HL7 to FHIR transformations effectively.
Automating the process with AI offers faster deployment, lower costs, and fewer human errors. It also allows organisations to scale mapping solutions across complex environments, improving data quality and system agility when using FHIR.
About the author
Contact us