<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "journalpublishing.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="2.0" xml:lang="en" article-type="research-article"><front><journal-meta><journal-id journal-id-type="nlm-ta">JMIR Med Inform</journal-id><journal-id journal-id-type="publisher-id">medinform</journal-id><journal-id journal-id-type="index">7</journal-id><journal-title>JMIR Medical Informatics</journal-title><abbrev-journal-title>JMIR Med Inform</abbrev-journal-title><issn pub-type="epub">2291-9694</issn><publisher><publisher-name>JMIR Publications</publisher-name><publisher-loc>Toronto, Canada</publisher-loc></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">v14i1e100368</article-id><article-id pub-id-type="doi">10.2196/100368</article-id><article-categories><subj-group subj-group-type="heading"><subject>Original Paper</subject></subj-group></article-categories><title-group><article-title>Evaluating Large Language Models for Standardizing Clinical Data Using Health Level Seven Fast Healthcare Interoperability Resources: Development and Evaluation Study</article-title></title-group><contrib-group><contrib contrib-type="author"><name name-style="western"><surname>Riquelme-Tornel</surname><given-names>&#x00C1;lvaro</given-names></name><degrees>MSc</degrees><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Costa del Amo</surname><given-names>Pedro Luis</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="aff3">3</xref></contrib><contrib contrib-type="author" corresp="yes"><name name-style="western"><surname>Mart&#x00ED;nez-Costa</surname><given-names>Catalina</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref></contrib></contrib-group><aff id="aff1"><institution>Department of Informatics and Systems, Faculty of Computer Science, Universidad de Murcia</institution><addr-line>Campus de Espinardo</addr-line><addr-line>Murcia</addr-line><country>Spain</country></aff><aff id="aff2"><institution>Instituto Murciano de Investigaci&#x00F3;n Biosanitaria</institution><addr-line>Murcia</addr-line><country>Spain</country></aff><aff id="aff3"><institution>Latency Data</institution><addr-line>Madrid</addr-line><country>Spain</country></aff><contrib-group><contrib contrib-type="editor"><name name-style="western"><surname>Steenstra</surname><given-names>Ivan</given-names></name></contrib></contrib-group><contrib-group><contrib contrib-type="reviewer"><name name-style="western"><surname>Piho</surname><given-names>Gunnar</given-names></name></contrib><contrib contrib-type="reviewer"><name name-style="western"><surname>Zakaria</surname><given-names>Wael</given-names></name></contrib><contrib contrib-type="reviewer"><name name-style="western"><surname>Wang</surname><given-names>Yiqing</given-names></name></contrib></contrib-group><author-notes><corresp>Correspondence to Catalina Mart&#x00ED;nez-Costa, PhD, Department of Informatics and Systems, Faculty of Computer Science, Universidad de Murcia, Campus de Espinardo, Murcia, 30100, Spain; <email>cmartinezcosta@um.es</email></corresp></author-notes><pub-date pub-type="collection"><year>2026</year></pub-date><pub-date pub-type="epub"><day>13</day><month>11</month><year>2026</year></pub-date><volume>14</volume><elocation-id>e100368</elocation-id><history><date date-type="received"><day>05</day><month>05</month><year>2026</year></date><date date-type="rev-recd"><day>25</day><month>09</month><year>2026</year></date><date date-type="accepted"><day>25</day><month>09</month><year>2026</year></date></history><copyright-statement>&#x00A9; &#x00C1;lvaro Riquelme-Tornel, Pedro Luis Costa del Amo, Catalina Martinez-Costa. Originally published in JMIR Medical Informatics (<ext-link ext-link-type="uri" xlink:href="https://medinform.jmir.org">https://medinform.jmir.org</ext-link>), 13.11.2026. </copyright-statement><copyright-year>2026</copyright-year><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link>), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Medical Informatics, is properly cited. The complete bibliographic information, a link to the original publication on <ext-link ext-link-type="uri" xlink:href="https://medinform.jmir.org/">https://medinform.jmir.org/</ext-link>, as well as this copyright and license information must be included.</p></license><self-uri xlink:type="simple" xlink:href="https://medinform.jmir.org/2026/1/e100368"/><abstract><sec><title>Background</title><p>One of the barriers to the wider adoption of clinical information modeling standards is the high cost associated with the time and effort required to model and map data from legacy systems, as well as the need for specialized modeling experts. Meanwhile, large language models (LLMs) are becoming powerful tools for data transformation and semantic processing.</p></sec><sec><title>Objective</title><p>The aim of this study was to evaluate the capability of LLMs to support the mapping of structured clinical data to Health Level Seven (HL7) Fast Healthcare Interoperability Resources (FHIR) resources and attributes.</p></sec><sec sec-type="methods"><title>Methods</title><p>Using data from the MIMIC-IV (Medical Information Mart for Intensive Care IV) database, a data pipeline integrating clustering techniques, retrieval-augmented resource grounding, and schema-guided prompting was implemented to support the FHIR mapping of structured clinical data. The pipeline was evaluated under 2 scenarios with different levels of complexity. In the first scenario, used as a baseline, the input data were well described and contextually rich. In the second scenario, designed as a controlled test under substantially reduced context, the original table structure and table-level descriptions were removed, while data element names and LLM-enriched descriptions were retained.</p></sec><sec sec-type="results"><title>Results</title><p>Using 65 data elements, top 2 resource identification accuracy reached 100% in the baseline scenario. The highest mean attribute-level mapping accuracy was 80.61% (SD 2.06) for GPT-4o and 69.54% (SD 5.15) for Llama 3.3 70B. In the low-context scenario, clustering-based context recovery increased top 5 resource identification accuracy to 94%. Across temperature settings, GPT-4o achieved mean attribute-level mapping accuracies ranging from 73.23% (SD 2.92) to 76.77% (SD 1.14), whereas Llama 3.3 70B ranged from 54.31% (SD 4.17) to 58.31% (SD 2.23). Error analysis showed that the main remaining failures were associated with resource-level confusion and terminal-attribute semantic ambiguity, whereas other error categories were comparatively infrequent.</p></sec><sec sec-type="conclusions"><title>Conclusions</title><p>LLMs can support structured clinical data mapping to HL7 FHIR, but fine-grained semantic disambiguation remains the principal limitation. In context-rich settings, the main errors occurred when selecting the appropriate terminal FHIR attribute. Under reduced context, accurate candidate-resource retrieval became increasingly important, and clustering-based context recovery substantially improved resource identification. These findings support the use of LLMs as assistive components within human-supervised interoperability workflows, with particular attention to candidate-resource selection and ambiguity-sensitive attribute mappings.</p></sec></abstract><kwd-group><kwd>clinical data interoperability</kwd><kwd>large language models</kwd><kwd>retrieval-augmented generation</kwd><kwd>clustering</kwd><kwd>HL7 FHIR</kwd><kwd>Health Level Seven</kwd><kwd>Fast Healthcare Interoperability Resources</kwd></kwd-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><sec id="s1-1"><title>Background</title><p>The potential of health data to advance health care delivery and biomedical research is widely recognized [<xref ref-type="bibr" rid="ref1">1</xref>]. However, despite the availability of mature technologies, interoperability standards, and implementation frameworks, their adoption across health systems remains limited [<xref ref-type="bibr" rid="ref2">2</xref>]. In the context of the European Health Data Space (EHDS), the implementation of common digital health standards and interoperability frameworks [<xref ref-type="bibr" rid="ref3">3</xref>] is one of the challenges to achieving a fully integrated ecosystem. A recent EHDS-related survey provided a good estimation of current health data scenarios in Europe, including the use of standardization [<xref ref-type="bibr" rid="ref4">4</xref>]. The survey revealed that most European Union (EU) countries have not yet fully implemented open infrastructures for health data sharing, a situation attributed in part to the low adoption of health data standards in these countries.</p><p>For decades, semantic interoperability standards have been proposed to enable accurate, meaningful, and consistent exchange of health care data across different systems and organizations. Terminologies such as the Systematized Nomenclature of Medicine Clinical Terms (SNOMED CT) [<xref ref-type="bibr" rid="ref5">5</xref>], International Classification of Diseases (ICD) [<xref ref-type="bibr" rid="ref6">6</xref>], and Logical Observation Identifiers Names and Codes (LOINC) [<xref ref-type="bibr" rid="ref7">7</xref>] provide standardized codes for representing medical concepts. Clinical information modeling standards and specifications such as Health Level Seven (HL7) Fast Healthcare Interoperability Resources (FHIR) [<xref ref-type="bibr" rid="ref8">8</xref>], Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) [<xref ref-type="bibr" rid="ref9">9</xref>], and openEHR [<xref ref-type="bibr" rid="ref10">10</xref>] reuse these terminologies and define how clinical data should be structured, represented, and exchanged.</p><p>Although several standards coexist, and their selection may depend on specific needs or use cases [<xref ref-type="bibr" rid="ref11">11</xref>], they share a common implementation challenge: modeling data according to these standards remains a labor-intensive and expert-dependent task. New data sources often require custom data pipelines, extensive manual mapping, and continuous maintenance. Focusing on HL7 FHIR, Marfoglia et al [<xref ref-type="bibr" rid="ref12">12</xref>] proposed a modular conversion framework based on the use of templates to formalize mappings. However, the framework still required manual mapping and refinement. Similarly, Carbonaro et al [<xref ref-type="bibr" rid="ref13">13</xref>] implemented a pipeline that involved extensive manual extraction, cleaning, and restructuring of local data. Their findings emphasized that extract, transform, and load (ETL) logic often remains tightly coupled to specific institutional databases, limiting scalability and requiring close collaboration between clinical experts, data engineers, and ontologists.</p><p>Implementation-oriented tools and FHIR harmonization pipelines have been proposed to support ETL workflows and facilitate the transformation of heterogeneous clinical data into standardized representations. Ignifyr [<xref ref-type="bibr" rid="ref14">14</xref>], for example, provides a FHIR-first ETL environment for converting data from diverse source systems into HL7 FHIR resources. Its workflow supports connectivity with multiple data sources, the specification of FHIR resource templates, the use of FHIRPath expressions, and the testing, validation, execution, and persistence of generated FHIR resources. However, despite facilitating the operational implementation of FHIR transformation pipelines, such tools still require users to explicitly define, configure, test, and validate the underlying mapping logic. Similar limitations have been reported in previous FHIR harmonization initiatives. Williams et al [<xref ref-type="bibr" rid="ref15">15</xref>] highlighted that the success of electronic health record (EHR)&#x2013;to-FHIR harmonization pipelines largely depends on the availability and quality of local database documentation, while Zong et al [<xref ref-type="bibr" rid="ref16">16</xref>] and Bennett et al [<xref ref-type="bibr" rid="ref17">17</xref>] relied on manually created mappings to construct FHIR-based data profiles. Although these initiatives have successfully produced standardized data repositories, such as the MIMIC-IV on FHIR (Medical Information Mart for Intensive Care IV on FHIR) dataset, they also reveal a persistent bottleneck in the adoption of FHIR and interoperability standards more broadly: the heavy reliance on manual, expert-driven mapping between local data structures and standardized representations. This dependence increases implementation time and cost, constrains scalability and maintainability, and limits the transformation of heterogeneous legacy data into reusable standardized formats.</p><p>The rapid advancement of large language models (LLMs), such as GPT-4o (OpenAI), Gemini (Google LLC), and Llama 3 (Meta Platforms, Inc.), has expanded their applicability across numerous domains. In health care, LLMs offer a promising solution for facilitating interoperability and data reuse [<xref ref-type="bibr" rid="ref18">18</xref>]. Their ability to interpret natural language, extract relevant information, classify concepts, and generate structured outputs has motivated their use in clinical data standardization workflows.</p><p>Building on these capabilities, several studies have investigated the integration of LLMs with interoperability frameworks such as HL7 FHIR. One line of work has examined the LLM-based conversion of unstructured clinical narratives into FHIR bundles, systematically comparing prompting strategies such as basic prompting, chain-of-thought, and 2-step decomposition approaches, alongside few-shot examples, temperature settings, and model selection [<xref ref-type="bibr" rid="ref19">19</xref>]. Complementary efforts have addressed schema alignment between medical intake forms and FHIR resources or elements, comparing embedding-based similarity methods with LLM-based classification within constrained mapping spaces [<xref ref-type="bibr" rid="ref20">20</xref>]. Other studies have focused on the direct generation of specific FHIR resources from free text. For example, FHIR-GPT [<xref ref-type="bibr" rid="ref21">21</xref>] proposed a template-driven, few-shot approach for converting discharge summary medication snippets into FHIR MedicationStatement resources. Related work has also evaluated the effectiveness of LLMs in converting clinical data to FHIR representations [<xref ref-type="bibr" rid="ref22">22</xref>]. LLMs have also been explored as upstream normalization layers for clinical notes, including abbreviation expansion, spelling and grammar correction, and terminology normalization [<xref ref-type="bibr" rid="ref23">23</xref>]. In parallel, patient-facing systems have leveraged existing FHIR APIs, combining prompt engineering with function-calling mechanisms to retrieve resources and generate lay explanations, while also revealing challenges related to response variability, omissions, filtering sensitivity, and reproducibility [<xref ref-type="bibr" rid="ref24">24</xref>].</p><p>Collectively, these studies demonstrate the potential of LLMs for supporting clinical data standardization and interoperability. However, most existing approaches focus on unstructured clinical narratives, constrained form-field mappings, single-resource generation, note normalization, or patient-facing interaction with preexisting FHIR data. Less attention has been paid to structured clinical datasets that require systematic identification, validation, and transformation across a broader range of FHIR resources. This gap is particularly relevant in real-world interoperability scenarios, where clinical data are often stored in heterogeneous structured formats and must be mapped to appropriate FHIR resources through robust, traceable, and scalable procedures.</p><p>To address this gap, this study proposes a multistage prompt-chaining pipeline for mapping structured clinical inputs to HL7 FHIR. Unlike single-step generation approaches or studies focused on narrow mapping spaces, the proposed workflow separates resource identification, validation, and mapping refinement into distinct stages. This design aims to improve robustness, consistency, and interpretability in the transformation process, while expanding coverage to a broader set of FHIR resources, more representative of real-world interoperability requirements. In contrast to prior work centered mainly on unstructured narratives, intake-form schema matching, or the generation of isolated FHIR resources, our approach focuses on structured clinical data and explores how LLMs can support expert-driven interoperability workflows without fully replacing the need for human validation.</p><p>Despite these advances, the deployment of LLMs in clinical data standardization remains constrained by significant challenges. Beyond scalability, it is critical to ensure the reliability, consistency, and clinical safety of model outputs. A key barrier lies in the model&#x2019;s ability to accurately interpret complex, domain-specific medical contexts without introducing errors or unsupported mappings. To address these limitations, recent studies have emphasized approaches such as fine-tuning, on-premises deployment, retrieval-based methods, and human-in-the-loop validation to improve contextual grounding, data privacy, and trustworthiness in clinical environments [<xref ref-type="bibr" rid="ref24">24</xref>].</p></sec><sec id="s1-2"><title>Study Objective and Research Questions</title><p>The objective of this work was to evaluate the capability of LLMs to support the mapping of structured clinical attributes to HL7 FHIR resources and attributes. While most existing studies addressed narrow data domains such as diagnoses or medications, they often did not consider more complex and realistic mapping scenarios requiring multiple candidate FHIR resources and explicit attribute-level disambiguation.</p><p>Using data from MIMIC-IV, a pipeline integrating clustering-based context recovery, retrieval, and schema-guided prompting was evaluated under 2 scenarios with differing contextual richness. Because the goal was to assess LLM behavior in structured-data mapping, only structured data were used, and entity identification from free text was intentionally excluded.</p><p>Specifically, this study addressed the following research questions (RQs):</p><p>RQ1: How accurately can GPT-4o and Llama 3.3 70B map structured clinical data elements to HL7 FHIR resources and attributes when rich structural and descriptive metadata are available, and how does prompting strategy affect this performance?</p><p>RQ2: When the original table-level structure and descriptions are unavailable, to what extent can clustering-based context recovery improve FHIR resource retrieval and downstream attribute-level mapping?</p><p>RQ3: How stable are the resulting mappings across decoding temperatures, and which error types constitute the main remaining sources of mapping failure?</p></sec></sec><sec id="s2" sec-type="methods"><title>Methods</title><sec id="s2-1"><title>Experimental Design</title><p>A controlled experimental design was used to evaluate clinical data mapping to FHIR under variations in 3 factors: contextual metadata availability, resource-retrieval strategy, and prompting configuration. All experiments used the same MIMIC-IV&#x2013;derived evaluation set, the same HL7 FHIR reference corpus, and the same evaluation criteria. Performance was assessed at 2 levels: resource identification and data element&#x2013;to-attribute path mapping. A total of 2 scenarios were defined: a baseline scenario with richer metadata and preserved table structure, and a low-context scenario with reduced metadata and weaker contextual grounding.</p></sec><sec id="s2-2"><title>Data Sources</title><p>The MIMIC-IV database [<xref ref-type="bibr" rid="ref25">25</xref>] was used in this study, which contains deidentified intensive care unit (ICU) patient data from Beth Israel Deaconess Medical Center between 2008 and 2019. The database is organized into 3 source-based modules: hosp, icu, and note. We used the hosp and icu modules and excluded the note module, which contains free-text clinical narratives. The hosp module includes 22 tables derived from the hospital-wide EHR, covering demographics, admissions, laboratory and microbiology results, medication administrations, and billed diagnoses. The icu module comprises 9 tables with ICU clinical data, including intravenous medications, ventilator settings, and other routinely charted variables.</p><p>More specifically, the MIMIC-IV on FHIR representation was used as the gold standard for evaluating the mappings [<xref ref-type="bibr" rid="ref17">17</xref>]. MIMIC-IV on FHIR was originally implemented in HL7 FHIR Release 4 (R4), whereas this study targets Release 5 (R5). We therefore adapted the reference mappings to R5 resource structures and attributes wherever they differed from R4, and used these adapted mappings as the gold standard for scoring model predictions. Both the FHIR reference corpus given to the models and the evaluation mappings were thus represented in R5. The adaptations are detailed in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>. Tables from the hosp and icu modules were selected based on two criteria: (1) inclusion of clinically relevant patient-care data and (2) availability of a direct HL7 FHIR mapping. Applying these criteria, the following 17 tables were included. From the hosp module: patients, admissions, procedures_icd, diagnoses_icd, hcpcsevents, microbiologyevents, prescriptions, transfers, pharmacy, services, and emar. From the icu module: d_items, datetimeevents, icustays, inputevents, outputevents, and procedureevents. <xref ref-type="fig" rid="figure1">Figure 1</xref> depicts the correspondence between the selected MIMIC tables and the FHIR resources. The 17 tables contain 119 data elements, of which 65 were retained for evaluation. We excluded elements with no reference mapping in MIMIC-IV on FHIR, and those whose source-to-FHIR mapping pattern was already covered by a retained element, to avoid duplicate evaluation of equivalent patterns (not on the basis of clinical importance). The full list of the 65 included elements and their reference mappings are provided in <xref ref-type="supplementary-material" rid="app2">Multimedia Appendix 2</xref>.</p><fig position="float" id="figure1"><label>Figure 1.</label><caption><p>Correspondence between the selected tables from MIMIC (Medical Information Mart for Intensive Care IV) and Health Level Seven (HL7) Fast Healthcare Interoperability Resources (FHIR).</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig01.png"/></fig><p><xref ref-type="fig" rid="figure2">Figure 2</xref> summarizes the data elements and sample values from the icustays table and their correspondence in FHIR. Example values (left) illustrate each icustays data element (center), and dotted arrows indicate the reference correspondence to the target FHIR fields (right). Specifically, subject_id maps to Encounter.subject (patient identifier/reference), first_careunit maps to Encounter.location (the first care-unit location where the patient was treated), intime maps to Encounter.location.period.start (admission time to that care unit), and outtime maps to Encounter.location.period.end (discharge time from that care unit). Detailed attribute definitions were available on the official MIMIC-IV website [<xref ref-type="bibr" rid="ref25">25</xref>]. Each selected table is accompanied by a brief description of its intended use and detailed definitions of its data elements and permissible values. All tables were downloaded in CSV format and contained only data element values.</p><fig position="float" id="figure2"><label>Figure 2.</label><caption><p>Ground-truth mapping used for evaluation between data elements in the MIMIC-IV (Medical Information Mart for Intensive Care IV) icustays table and their corresponding attributes in the Health Level Seven (HL7) Fast Healthcare Interoperability Resources (FHIR) Encounter resource.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig02.png"/></fig><p>In addition, a corpus describing the HL7 FHIR standard was developed. It will be referred to as the FHIR reference standard corpus hereafter, covering 45 HL7 FHIR resources. For each resource, the corpus included a brief description of its purpose and JSON-formatted definitions of all associated attributes. This corpus was used to provide contextual grounding for the LLMs.</p></sec><sec id="s2-3"><title>Ethical Considerations</title><p>This study involved secondary methodological analysis of previously deidentified data from the MIMIC-IV database, accessed under PhysioNet credentialed access requirements. No participants were recruited, no new patient data or biological samples were collected, and no reidentification was attempted. The University of Murcia Institutional Research Ethics self-assessment indicated that formal review by the University Research Ethics Committee was not required [<xref ref-type="bibr" rid="ref26">26</xref>].</p><p>Only structured data from the MIMIC-IV hosp and icu modules were used; the note module containing free-text clinical narratives was excluded. Patient-level values were used only in embedding-based preprocessing, indexing, context recovery, and clustering and were never included in prompts sent to external LLM services. GPT-4o (Azure OpenAI) and Llama 3.3 70B (Together AI) received only schema-level metadata and FHIR reference information, thereby minimizing privacy risks associated with third-party inference services. Azure OpenAI was used in accordance with PhysioNet recommendations for responsible use of MIMIC data [<xref ref-type="bibr" rid="ref27">27</xref>].</p></sec><sec id="s2-4"><title>Task and Evaluation Metrics</title><p>The task involved mapping selected structured clinical data elements from MIMIC-IV tables to HL7 FHIR resources and attribute paths. For each data instance corresponding to a MIMIC-IV data element (table column), the model was required to identify the most appropriate target HL7 FHIR resource and 3 attribute paths, producing a structured mapping output. For example, given the intime column from the icustays table, the reference mapping corresponds to the FHIR Encounter resource and the Encounter.location.period.start attribute path.</p><p>Model inputs included MIMIC-IV table and column names, descriptions when available, and contextual information retrieved from the FHIR reference corpus. Performance was evaluated by comparing model outputs against the R5-adapted MIMIC-IV on FHIR reference mappings [<xref ref-type="bibr" rid="ref17">17</xref>].</p><p>Two evaluation scenarios were considered: (1) a baseline scenario with context-rich, well-documented data (17 tables and well-separated data elements) and (2) a low-context scenario with reduced structural and contextual information, in which the original table organization and table-level descriptions were removed, while data element descriptions were retained and all data elements were presented in a single unified table with randomized ordering.</p><p>Performance was evaluated at two levels: (1) resource identification and (2) data element&#x2013;to-FHIR mapping. Resource identification performance was evaluated as top-k accuracy at the data element level. For each of the 65 data elements, retrieval was considered successful if at least one of its accepted reference FHIR resources appeared among its assigned top-k candidates. In the low-context condition without clustering, candidates were retrieved independently for each data element. In the clustering condition, candidates were retrieved for each recovered cluster, and the resulting list was assigned to every data element in that cluster. Thus, both low-context conditions were evaluated over the same 65 data elements, regardless of how the candidate lists were generated. Top-k accuracy was calculated as the number of data elements with an accepted resource in their assigned top-k list divided by 65.</p><p>Data element&#x2013;to-FHIR mapping performance was evaluated using attribute-level mapping accuracy. Each of the 65 evaluated data elements was assigned a binary correct or incorrect outcome by comparing the predicted FHIR attribute path or paths with the corresponding reference mapping. A data element was considered correctly mapped when at least one predicted path matched one of the accepted reference paths according to the predefined matching rules.</p><p>For example, for the intime data element from the icustays table, a prediction of Encounter.location.period.start was considered correct because it matched the reference mapping, whereas a prediction such as Encounter.location.period.end was considered incorrect.</p><p>A predicted path was accepted when it exactly matched a reference path or represented a valid specialization of that path. For example, if the reference mapping was defined as Observation.value, a prediction such as Observation.valueQuantity was considered correct because it preserved the reference path while specifying the concrete value type. In contrast, if the reference mapping was Observation.valueQuantity, a prediction of the more general Observation.value was considered incorrect because it did not reach the required level of specificity. Empty outputs and predefined no-mapping placeholders were also considered incorrect when a reference mapping was available.</p><p>For data elements with multiple accepted reference mappings, matching any one of the valid alternatives was sufficient for the data element to be classified as correct. Additional predicted paths were not independently counted as false positives, since evaluation was performed at the data element level rather than at the individual path level. Consequently, the metric evaluates whether the model identified at least one acceptable mapping for each data element, rather than the precision of the complete set of paths generated for that element.</p><p>Resource-identification performance (top-k accuracy) was calculated as:</p><disp-formula id="equWL1"><mml:math id="eqn1"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mtext>data elements with at least one accepted reference resource in their assigned Top-</mml:mtext><mml:mi>k</mml:mi><mml:mtext>&#x00A0;list</mml:mtext></mml:mrow></mml:msub><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mtext>data elements evaluated</mml:mtext></mml:mrow></mml:msub></mml:mfrac></mml:mstyle></mml:mrow></mml:mstyle></mml:math></disp-formula><p>Resource identification accuracy was evaluated at the data-element level in all conditions (n=65). In the baseline scenario, the top-2 candidate list retrieved for each MIMIC-IV table was assigned to its constituent data elements. In the low-context scenario with clustering, the top-5 list retrieved for each recovered cluster was assigned to its constituent data elements. Without clustering, a top-5 list was retrieved independently for each data element. Each element was counted as correct when at least one of its accepted reference resources appeared in its assigned candidate list.</p><p>Data element&#x2013;to-FHIR mapping accuracy was calculated as:</p><disp-formula id="equWL2"><mml:math id="eqn2"><mml:mtext/><mml:mtext> </mml:mtext><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mtext>N</mml:mtext></mml:mrow><mml:mrow><mml:mtext>correct</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mtext>N</mml:mtext></mml:mrow><mml:mrow><mml:mtext>evaluated</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mtext/></mml:math></disp-formula><p>where N<sub>correct</sub> represents the number of correctly mapped data elements and N<sub>evaluated</sub>=65 represents the total number of evaluated elements.</p><p>Incorrect mappings were additionally categorized using a deterministic rule-based evaluator. Error categories were mutually exclusive and were assigned sequentially according to a predefined precedence order: NoMap, ResourceConfusion, ExtensionOveruse, Specificity, and TerminalAttributeConfusion (TAConfusion). Because the categorization was performed automatically using these rules, no manual adjudication or interrater disagreement resolution was required.</p><p>NoMap was assigned when no mapping was returned or when all predicted outputs corresponded to predefined no-mapping placeholders. ResourceConfusion was assigned when the FHIR resource or resources predicted by the model did not overlap with any of the accepted reference resources, indicating that the model selected an inappropriate clinical domain despite producing a plausible attribute path. ExtensionOveruse was assigned when the prediction used an FHIR extension, although the reference mapping could be represented using a standard FHIR element. Specificity was assigned when the predicted path terminated at a more general parent element than the reference mapping, indicating that the model identified the correct structural region but did not reach the required level of granularity. TAConfusion was assigned to remaining incorrect mappings after the preceding rules had been evaluated, typically representing cases in which the model identified the correct resource or structural neighborhood but selected an incorrect terminal FHIR attribute.</p><p>To assess run-to-run stability, baseline prompting configurations were run 5 times, and low-context temperature experiments 10 times per model and temperature setting. Repetitions were kept even at temperature 0, since identical decoding parameters do not guarantee identical outputs in hosted LLM inference. For each configuration, we report the mean attribute-level mapping accuracy and, for each error category, the mean number of errors and sample SD across runs. Corresponding 95% CIs were estimated using the Student <italic>t</italic> distribution:</p><disp-formula id="equWL3"><mml:math id="eqn3"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mi>C</mml:mi><mml:msub><mml:mi>I</mml:mi><mml:mrow><mml:mn>95</mml:mn><mml:mi mathvariant="normal">%</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mo>&#x00B1;</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mn>0.975</mml:mn><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mfrac><mml:mi>s</mml:mi><mml:msqrt><mml:mi>n</mml:mi></mml:msqrt></mml:mfrac></mml:mstyle></mml:mrow></mml:mstyle></mml:math></disp-formula><p>where <inline-formula><mml:math id="ieqn1"><mml:mstyle><mml:mrow><mml:mstyle displaystyle="false"><mml:mover><mml:mtext>A</mml:mtext><mml:mrow><mml:mo>&#x2212;</mml:mo></mml:mrow></mml:mover></mml:mstyle></mml:mrow></mml:mstyle></mml:math></inline-formula> is the mean attribute-level mapping accuracy across repeated runs, S is the sample SD, and n is the number of repetitions. The Student <italic>t</italic> distribution was used only to construct 2-tailed 95% CIs, rather than for hypothesis testing. The corresponding degrees of freedom were 4 for the baseline experiments (n=5) and 9 for the low-context experiments (n=10). Because the baseline analysis included 5 repetitions per configuration, the resulting CIs were interpreted as descriptive estimates of uncertainty rather than as formal evidence of statistically significant differences between prompting strategies.</p></sec><sec id="s2-5"><title>Common Pipeline</title><p>Across both scenarios, the same four-stage workflow was applied: (1) data preprocessing, (2) indexing, (3) retrieval, and (4) LLM-based mapping. These stages incorporated multiple techniques, including data enrichment, data format transformation, text embeddings, clustering methods, and interaction with the LLM (<xref ref-type="fig" rid="figure3">Figure 3</xref>).</p><fig position="float" id="figure3"><label>Figure 3.</label><caption><p>General pipeline defined for each scenario. FHIR: Fast Healthcare Interoperability Resources; HL7: Health Level Seven; LLM: large language model; MIMIC-IV: Medical Information Mart for Intensive Care IV.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig03.png"/></fig></sec><sec id="s2-6"><title>Experimental Scenarios</title><p>The baseline and low-context scenarios differed in 4 aspects: metadata availability, the use of clustering for context recovery, the retrieval configuration, and the number of candidate HL7 FHIR resources provided to the LLM (top-k).</p><p><xref ref-type="table" rid="table1">Table 1</xref> summarizes both the fixed components and the scenario-specific variations.</p><p>Because the 2 scenarios differ in several components at once (metadata availability, input organization, context recovery, retrieval configuration, and number of candidate resources), the baseline versus low-context comparison evaluates the complete pipelines, not the isolated effect of individual components. Accordingly, the top-2 and top-5 resource identification results should not be interpreted as directly comparable retrieval metrics, because the value of k was part of the scenario-specific pipeline configuration. In the following, the 4-stage workflow is described.</p><table-wrap id="t1" position="float"><label>Table 1.</label><caption><p>Comparison of the baseline and low-context experimental scenarios.</p></caption><table id="table1" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Process</td><td align="left" valign="bottom">Baseline scenario</td><td align="left" valign="bottom">Low-context scenario</td></tr></thead><tbody><tr><td align="left" valign="top">Number of evaluated data elements</td><td align="left" valign="top">65 data elements</td><td align="left" valign="top">65 data elements</td></tr><tr><td align="left" valign="top">Column or data element name</td><td align="left" valign="top">Available</td><td align="left" valign="top">Available</td></tr><tr><td align="left" valign="top">Data element description</td><td align="left" valign="top">Available</td><td align="left" valign="top">Available</td></tr><tr><td align="left" valign="top">Table description</td><td align="left" valign="top">Available</td><td align="left" valign="top">Removed</td></tr><tr><td align="left" valign="top">Data element organization</td><td align="left" valign="top">Original table grouping</td><td align="left" valign="top">All elements pooled and randomly ordered</td></tr><tr><td align="left" valign="top">Context recovery</td><td align="left" valign="top">Not required</td><td align="left" valign="top">Unsupervised semantic clustering</td></tr><tr><td align="left" valign="top">Retrieval unit</td><td align="left" valign="top">MIMIC-IV<sup><xref ref-type="table-fn" rid="table1fn1">a</xref></sup> table</td><td align="left" valign="top">Recovered cluster+data element signals</td></tr><tr><td align="left" valign="top">HL7<sup><xref ref-type="table-fn" rid="table1fn2">b</xref></sup> FHIR<sup><xref ref-type="table-fn" rid="table1fn3">c</xref></sup> resource candidates (top-k)</td><td align="left" valign="top">k=2</td><td align="left" valign="top">k=5</td></tr><tr><td align="left" valign="top">HL7 FHIR resource description</td><td align="left" valign="top">Available</td><td align="left" valign="top">Available</td></tr><tr><td align="left" valign="top">HL7 FHIR resource attribute descriptions</td><td align="left" valign="top">Available</td><td align="left" valign="top">Available</td></tr><tr><td align="left" valign="top">Prompting strategy</td><td align="left" valign="top">Four strategies, temperature= 0</td><td align="left" valign="top">Selected strategy across temperature=0, 0.5, and 1</td></tr><tr><td align="left" valign="top">Evaluation gold standard</td><td align="left" valign="top">65 R5<sup><xref ref-type="table-fn" rid="table1fn4">d</xref></sup>-adapted mappings</td><td align="left" valign="top">65 R5-adapted mappings</td></tr></tbody></table><table-wrap-foot><fn id="table1fn1"><p><sup>a</sup>MIMIC-IV: Medical Information Mart for Intensive Care IV.</p></fn><fn id="table1fn2"><p><sup>b</sup>HL7: Health Level Seven.</p></fn><fn id="table1fn3"><p><sup>c</sup>FHIR: Fast Healthcare Interoperability Resources.</p></fn><fn id="table1fn4"><p><sup>d</sup>R5: Release 5.</p></fn></table-wrap-foot></table-wrap></sec><sec id="s2-7"><title>Stage 1: Data Preprocessing</title><sec id="s2-7-1"><title>Overview</title><p>This stage aimed to improve data quality through two steps: (1) enrichment of attribute descriptions and (2) adoption of a common data format.</p><p>The original MIMIC-IV documentation provided limited descriptions for many tables and columns. Semantic enrichment is particularly important when using embeddings with LLMs, as richer and more precise descriptions generally enable the models to produce more accurate and meaningful outputs. By using LLMs, these descriptions were enriched for each of the table data elements or columns <xref ref-type="supplementary-material" rid="app3">Multimedia Appendix 3</xref>.</p><p>Previous studies showed how data presented to the model had a substantial impact on its performance [<xref ref-type="bibr" rid="ref28">28</xref>]. Using JSON format for representing tabular information improves model interpretability and comprehension, leading to improved task performance. Accordingly, JSON was adopted as the standard data format in this study.</p><p>To quantify the contribution of description enrichment, an additional ablation analysis was conducted in the low-context scenario using the original MIMIC-IV data element descriptions while keeping the clustering, retrieval, model, and prompting configurations unchanged.</p></sec><sec id="s2-7-2"><title>Stage 1a: Context Recovery via Clustering (Low-Context Scenario)</title><p>In the low-context scenario, input data were presented as a unified table, in which columns were randomly distributed and lacked table-level context. Under these conditions, single&#x2013;data element retrieval offered insufficient context for reliable FHIR resource identification. Preliminary experiments that retrieved candidate resources independently per data element using only column names and/or descriptions produced unstable and frequently implausible results, reflecting the limited semantic information available at the data element level in sparse-metadata settings.</p><p>To mitigate this limitation, unsupervised semantic clustering was used to recover context by grouping related data elements before retrieval. These clusters then served as input units for subsequent retrieval and LLM-based mapping. Several biomedical embedding models were screened for context recovery and retrieval in the low-context scenario, including MiniLM-L12, all-mpnet-base-v2, MedEmbed-large, PubMedBERT, BioBERT, Gemma, and ModernPubMedBERT [<xref ref-type="bibr" rid="ref29">29</xref>-<xref ref-type="bibr" rid="ref34">34</xref>]. In addition, several clustering methods were evaluated, including K-Means, agglomerative clustering, Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Balanced Iterative Reducing and Clustering using Hierarchies (BIRCH), Ordering Points To Identify the Clustering Structure (OPTICS), and spectral clustering [<xref ref-type="bibr" rid="ref35">35</xref>-<xref ref-type="bibr" rid="ref40">40</xref>]. The best-performing configurations were selected using standard internal validity criteria [<xref ref-type="bibr" rid="ref41">41</xref>-<xref ref-type="bibr" rid="ref43">43</xref>]. Following this comparative evaluation, all-mpnet-base-v2 was selected as the embedding model, and agglomerative clustering was selected as the clustering approach, using complete linkage, cosine distance, and 21 clusters. <xref ref-type="fig" rid="figure4">Figure 4</xref> summarizes this context-recovery workflow.</p><fig position="float" id="figure4"><label>Figure 4.</label><caption><p>Clustering workflow for the unified MIMIC-IV (Medical Information Mart for Intensive Care IV) table. BERT: bidirectional encoder representations from transformers.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig04.png"/></fig></sec></sec><sec id="s2-8"><title>Stage 2: Indexing</title><p>In this stage, retrievable vector representations were created for both the HL7 FHIR reference corpus and the MIMIC-IV input data to be mapped. For MIMIC-IV, the indexed unit corresponded to the original table in the baseline scenario and to the recovered cluster in the low-context scenario, together with the available descriptive metadata and data element&#x2013;level information. For the HL7 FHIR reference corpus, representations were built from resource-level purpose statements and element descriptions.</p><p>Indexing was adapted to the characteristics of each scenario. In the baseline scenario, retrieval relied on a simpler combination of lexical and semantic representations [<xref ref-type="bibr" rid="ref44">44</xref>-<xref ref-type="bibr" rid="ref47">47</xref>]. In the low-context scenario, the all-mpnet-base-v2 representation selected during the context-recovery comparison was reused for indexing and downstream retrieval to maintain representational consistency. <xref ref-type="fig" rid="figure5">Figure 5</xref> summarizes the indexing process.</p><fig position="float" id="figure5"><label>Figure 5.</label><caption><p>High-level overview of embedding-space construction. FHIR: Fast Healthcare Interoperability Resources; HL7: Health Level Seven; MIMIC-IV: Medical Information Mart for Intensive Care IV.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig05.png"/></fig></sec><sec id="s2-9"><title>Stage 3: Retrieval</title><p>Once vector representations had been created for both the MIMIC-IV input data and the HL7 FHIR reference corpus, similarity-based retrieval [<xref ref-type="bibr" rid="ref48">48</xref>] was used to identify candidate FHIR resources for each input unit. In the baseline scenario (<xref ref-type="fig" rid="figure6">Figure 6</xref>, left side), each MIMIC-IV table was matched directly against the HL7 FHIR resource corpus using a simpler retrieval configuration, and the top 2 candidate resources were provided as context for downstream mapping.</p><p>In the low-context scenario (<xref ref-type="fig" rid="figure6">Figure 6</xref>, right side), retrieval followed a more robust multistage configuration to compensate for sparse and heterogeneous metadata. Candidate resources were identified using both cluster-level and data element&#x2013;level signals, and the resulting rankings were combined before selecting the top 5 resources for the LLM-based mapping stage. This design aimed to improve contextual grounding when resource identification could not be reliably resolved from isolated column descriptions alone.</p><fig position="float" id="figure6"><label>Figure 6.</label><caption><p>Illustration of the embedding-based similarity comparison in the embedding space and the subsequent extraction of the most similar Health Level Seven Fast Healthcare Interoperability Resources after applying reciprocal rank fusion [<xref ref-type="bibr" rid="ref49">49</xref>]. Enc: Encounter resource; Pat: Patient resource; Obs: Observation resource; Con: Condition resource. FHIR: Fast Healthcare Interoperability Resources; HL7: Health Level Seven; MIMIC-IV: Medical Information Mart for Intensive Care IV; RRF: reciprocal rank fusion.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig06.png"/></fig></sec><sec id="s2-10"><title>Stage 4: Data Element&#x2013;to-FHIR Mapping</title><p>Once candidate resources had been selected in the previous stage, they were provided to the LLM as contextual information to generate the corresponding data element&#x2013;to-FHIR mapping predictions. Based on the experiments performed (Results section), the top 2 candidate resources were provided in the baseline scenario, whereas the top 5 candidate resources were used in the low-context scenario. Explicit output constraints were also applied to guide the model&#x2019;s responses.</p><p>For each data entity to be mapped (table or cluster data element or column), the prompt included: (1) the input entity to be mapped, including the available table or cluster-level context and column descriptions; (2) the candidate HL7 FHIR resources identified during the retrieval stage; and (3) supporting context derived from the reference resources, such as resource and attribute descriptions.</p><p><xref ref-type="table" rid="table2">Table 2</xref> presents an illustrative example of data element&#x2013;to-FHIR mappings produced for the MIMIC-IV icustays table when paired with the HL7 FHIR Encounter resource.</p><table-wrap id="t2" position="float"><label>Table 2.</label><caption><p>Illustrative example of data element&#x2013;to-FHIR<sup><xref ref-type="table-fn" rid="table2fn1">a</xref></sup> mapping output.</p></caption><table id="table2" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">icustays data elements or columns</td><td align="left" valign="bottom">FHIR<sup><xref ref-type="table-fn" rid="table2fn1">a</xref></sup> attribute paths</td></tr></thead><tbody><tr><td align="left" valign="top">subject_id</td><td align="left" valign="top">Encounter.subject</td></tr><tr><td align="left" valign="top">first_careunit</td><td align="left" valign="top">Encounter.location</td></tr><tr><td align="left" valign="top">intime</td><td align="left" valign="top">Encounter.location.period.start</td></tr><tr><td align="left" valign="top">outtime</td><td align="left" valign="top">Encounter.location.period.end</td></tr></tbody></table><table-wrap-foot><fn id="table2fn1"><p><sup>a</sup>FHIR: Fast Healthcare Interoperability Resources.</p></fn></table-wrap-foot></table-wrap></sec><sec id="s2-11"><title>Models and Prompt Strategies</title><p>GPT-4o [<xref ref-type="bibr" rid="ref50">50</xref>] and Llama 3.3 70B [<xref ref-type="bibr" rid="ref51">51</xref>] were selected as the 2 general-purpose LLMs, representing proprietary and open-source approaches, respectively. Due to the high cost of fine-tuning, both models were evaluated in their original, non&#x2013;fine-tuned form. GPT-4o was accessed through Microsoft Azure OpenAI using API version 2025-01-01-preview, whereas Llama 3.3 70B Instruct was accessed through the Together AI API. Additional implementation details, including generation parameters, embedding and clustering configurations, retrieval settings, and software specifications, are provided in <xref ref-type="supplementary-material" rid="app4">Multimedia Appendix 4</xref>. The 65 data elements included in the final evaluation set, their reference mappings, and their evaluation outcomes were not used to design or optimize the prompting strategies. Prompt design was performed independently of the final evaluation procedure. Model performance was assessed in terms of mapping accuracy and behavioral consistency across prompt and decoding configurations. A total of 4 prompting strategies were compared to evaluate the effect of prompt structure on data element&#x2013;to-FHIR mapping performance. The first is self-reflexive prompting, in which an initial response was generated and then revised through self-review to reduce errors. The second is mixture of prompts (MoP), a prompting strategy that started from the same initial mapping template as the other configurations but applied several alternative reflection prompts during review. Each prompt independently reassessed the initial mapping under a different review instruction, keeping the template, input data, retrieved FHIR context, and output structure unchanged. A synthesis judge then reconciled the resulting mappings into the final one, following predefined schema- and semantic-priority rules. The third is 5-Serial-Schema, a 5-step prompting approach in which outputs were iteratively refined using a predefined JSON schema and contextual guidance to improve mapping accuracy and reduce formatting errors. The fourth is 5-Serial-NoSchema, a 5-step prompting approach without a predefined schema, designed to test whether iterative prompting alone was sufficient to preserve output structure and formatting.</p><p>Prompting was treated as an experimental factor rather than as a fixed component of the pipeline. In the baseline scenario, all prompting strategies were evaluated under deterministic decoding (T=0) to isolate the effect of prompt structure. In the low-context scenario, self-reflexive prompting was retained as a common prompting configuration for both models and evaluated across multiple temperature settings (T&#x2208;{0, 0.5, 1.0}).</p><p>The common prompt structure used across experiments is shown in <xref ref-type="other" rid="box1">Textbox 1</xref>. It assigned the LLM the role of a mapping assistant and provided explicit instructions to map attribute semantics based on names, descriptions, and retrieved FHIR context, without providing raw or example patient data values to the model.</p><boxed-text id="box1"><title> High-level structure of the common mapping prompt used across experiments.</title><p>Different prompting strategies were applied to this shared prompt skeleton. Complete prompting templates are provided in <xref ref-type="supplementary-material" rid="app5">Multimedia Appendices 5</xref><xref ref-type="supplementary-material" rid="app6"/><xref ref-type="supplementary-material" rid="app7"/><xref ref-type="supplementary-material" rid="app8"/>-<xref ref-type="supplementary-material" rid="app9">9</xref>. FHIR R5: Fast Healthcare Interoperability Resources Release 5.</p><p>##################### CONTEXT ####################You are a domain expert assistant specializing in mapping clinical tabular data to FHIR resources (FHIR R5).(...)The documents you have to consider to answer the query is: &#x003C;context&#x003E;##################### TASK ####################Based on the provided table attribute information and standard FHIR attribute definitions, determine the top 3 most specific FHIR attributes that correspond to each table attribute, listed in order of relevance (most specific first).##################### OUTPUT FORMAT ####################&#x003C;Output format&#x003E;Each key corresponds to the table attribute name, and its value is an array of exactly three strings. If fewer than three matches are found, use "No additional attribute found" to fill the empty slots.##################### EXAMPLE ####################&#x003C;FHIR example&#x003E;##################### ADDITIONAL INSTRUCTIONS ####################- Consider the attribute name and descriptions when determining the best FHIR attributes.- Return only the final JSON object without additional commentary.- Use the FHIR R5 specification as the reference (https://www.hl7.org/fhir/).- Double-check your mappings before returning the final result.- You must use the provided functions to format your response.- Ensure the JSON is well-formed and adheres to the specified structure.</p></boxed-text></sec></sec><sec id="s3" sec-type="results"><title>Results</title><sec id="s3-1"><title>Baseline Scenario: Prompting Strategy and Mapping Performance</title><p>In the baseline scenario, resource identification was trivial under context-rich metadata: the correct HL7 FHIR resource was retrieved for all MIMIC-IV tables considered (top 2 accuracy=100%). This result indicates that when input data are well described, the retrieval stage does not represent the main bottleneck. Instead, performance differences across configurations were primarily driven by the data element&#x2013;to-FHIR mapping of the standardization stage, which requires finer-grained semantic alignment. <xref ref-type="table" rid="table3">Table 3</xref> reports mean attribute-level mapping accuracy and sample SD across 5 repeated runs.</p><table-wrap id="t3" position="float"><label>Table 3.</label><caption><p>Mean (SD) attribute-level mapping accuracy for each prompting strategy evaluated with GPT-4o and Llama 3.3 70B in the baseline scenario.<sup><xref ref-type="table-fn" rid="table3fn1">a</xref></sup></p></caption><table id="table3" frame="hsides" rules="groups"><thead><tr><td align="left" valign="top">Prompts</td><td align="left" valign="top">GPT-4o, %, mean (SD)</td><td align="left" valign="top">Llama 3.3, %, mean (SD)</td></tr></thead><tbody><tr><td align="left" valign="top">Self<italic>-</italic>reflexive</td><td align="left" valign="top">80.61 (2.06)</td><td align="left" valign="top">65.85 (1.69)</td></tr><tr><td align="left" valign="top">MoP<sup><xref ref-type="table-fn" rid="table3fn2">b</xref></sup></td><td align="left" valign="top">62.46 (5.61)</td><td align="left" valign="top">69.54 (5.15)</td></tr><tr><td align="left" valign="top">5-Serial-Schema</td><td align="left" valign="top">70.77 (2.88)</td><td align="left" valign="top">67.69 (3.77)</td></tr><tr><td align="left" valign="top">5-Serial-NoSchema</td><td align="left" valign="top">72.31 (1.54)</td><td align="left" valign="top">59.38 (3.54)</td></tr></tbody></table><table-wrap-foot><fn id="table3fn1"><p><sup>a</sup>95% CIs for the best-performing configuration of each model are reported in the text.</p></fn><fn id="table3fn2"><p><sup>b</sup>MoP: mixture of prompts. </p></fn></table-wrap-foot></table-wrap><p>Performance patterns differed between models (<xref ref-type="table" rid="table3">Table 3</xref>). GPT-4o achieved the highest mean attribute-level mapping accuracy with self-reflexive prompting (80.61%, 95% CI 78.05&#x2010;83.18), whereas Llama 3.3 performed best with MoP (69.54%, 95% CI 63.15&#x2010;75.93). Thus, a single self-review step was most effective for GPT-4o in the context-rich baseline setting, whereas Llama 3.3 benefited more from prompt diversification, indicating that prompting effectiveness was model-dependent.</p><p>To better understand model behavior, a detailed error analysis was conducted across all configurations. <xref ref-type="fig" rid="figure7">Figure 7</xref> presents a heatmap summarizing the mean distribution of error types for each model and prompting strategy.</p><fig position="float" id="figure7"><label>Figure 7.</label><caption><p>Heatmap of mean errors grouped by techniques and models. MoP: mixture of prompts; TAConfusion: TerminalAttributeConfusion.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig07.png"/></fig><p>In the baseline scenario (<xref ref-type="table" rid="table4">Table 4</xref> and <xref ref-type="fig" rid="figure7">Figure 7</xref>), TerminalAttributeConfusion was the predominant error class across models and prompting strategies, indicating that mappings often reached the correct conceptual and structural neighborhood but failed to select the most appropriate terminal FHIR attribute.</p><p>ResourceConfusion was a secondary, strategy-sensitive failure mode, whereas Specificity errors and ExtensionOveruse were comparatively infrequent. Overall, the main limitation under context-rich conditions was fine-grained terminal-attribute disambiguation rather than structural mapping failure.</p><table-wrap id="t4" position="float"><label>Table 4.</label><caption><p>Mean (SD) number of errors for each error category and prompting strategy in the baseline scenario across 5 repeated runs (n=5).</p></caption><table id="table4" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Error category</td><td align="left" valign="bottom" colspan="2">5-Serial-NoSchema</td><td align="left" valign="bottom" colspan="2">5-Serial-Schema</td><td align="left" valign="bottom" colspan="2">MoP<sup><xref ref-type="table-fn" rid="table4fn1">a</xref></sup></td><td align="left" valign="bottom" colspan="2">Self-reflexive</td></tr><tr><td align="left" valign="bottom"/><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="top">Llama 3.3, mean (SD)</td><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="top">Llama 3.3, mean (SD)</td><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="top">Llama 3.3, mean (SD)</td><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="top">Llama 3.3, mean (SD)</td></tr></thead><tbody><tr><td align="left" valign="top">TAConfusion<sup><xref ref-type="table-fn" rid="table4fn2">b</xref></sup></td><td align="left" valign="top">14.6 (1.67)</td><td align="left" valign="top">17.6 (2.07)</td><td align="left" valign="top">13.80 (1.30)</td><td align="left" valign="top">16 (1.87)</td><td align="left" valign="top">16.4 (2.30)</td><td align="left" valign="top">15.6 (2.61)</td><td align="left" valign="top">11.8 (1.48)</td><td align="left" valign="top">12.8 (2.49)</td></tr><tr><td align="left" valign="top">ResourceConfusion</td><td align="left" valign="top">3.2 (1.1)</td><td align="left" valign="top">6.6 (1.82)</td><td align="left" valign="top">5.20 (0.84)</td><td align="left" valign="top">4 (1.22)</td><td align="left" valign="top">7.6 (1.95)</td><td align="left" valign="top">2 (0.71)</td><td align="left" valign="top">0.6 (1.34)</td><td align="left" valign="top">7.6 (3.13)</td></tr><tr><td align="left" valign="top">Specificity</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">1.0 (0.0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">1 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">2.2 (0.45)</td><td align="left" valign="top">0.2 (0.45)</td><td align="left" valign="top">1.8 (0.45)</td></tr><tr><td align="left" valign="top">ExtensionOveruse</td><td align="left" valign="top">0.2 (0.45)</td><td align="left" valign="top">1.2 (1.10)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0.2 (0.45)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td></tr><tr><td align="left" valign="top">NoMap</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0.2 (0.45)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td></tr></tbody></table><table-wrap-foot><fn id="table4fn1"><p><sup>a</sup>MoP: mixture of prompts.</p></fn><fn id="table4fn2"><p><sup>b</sup>TAConfusion: TerminalAttributeConfusion.</p></fn></table-wrap-foot></table-wrap></sec><sec id="s3-2"><title>Low-Context Scenario</title><p>Self-reflexive prompting was selected as a common configuration to enable a controlled comparison of model behavior and temperature effects under identical prompting conditions. Although MoP achieved the highest baseline performance for Llama 3.3, using a common prompting strategy avoided confounding model and temperature effects with model-specific prompt optimization.</p><sec id="s3-2-1"><title>Effect of Description Enrichment</title><p>To quantify the contribution of LLM-based description enrichment, an additional ablation experiment was conducted in the low-context scenario. GPT-4o was evaluated using self-reflexive prompting and the same clustering-based context recovery and retrieval configuration, but replacing the enriched data element descriptions with the original MIMIC-IV descriptions. This analysis was designed to isolate the effect of semantic enrichment on downstream attribute-level mapping performance while keeping the remaining pipeline components unchanged. The results across the 3 temperature settings are summarized in <xref ref-type="table" rid="table5">Table 5</xref>.</p><p>Description enrichment consistently improved attribute-level mapping accuracy across all temperature settings, with absolute gains of 8.15&#x2010;12.02 percentage points and a mean improvement of 10.67 (SD 2.19) percentage points (<xref ref-type="table" rid="table5">Table 5</xref>). This indicates that richer semantic descriptions provided additional grounding even when clustering-based context recovery and retrieval are kept unchanged.</p><table-wrap id="t5" position="float"><label>Table 5.</label><caption><p>Effect of LLM<sup><xref ref-type="table-fn" rid="table5fn1">a</xref></sup>-based data-element description enrichment on GPT-4o attribute-level mapping accuracy in the low-context scenario.<sup><xref ref-type="table-fn" rid="table5fn2">b</xref></sup></p></caption><table id="table5" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Temperature</td><td align="left" valign="bottom">Original descriptions (n=10), %, mean (SD)</td><td align="left" valign="bottom">LLM-enriched descriptions (n=10), %, mean (SD)</td><td align="left" valign="bottom">Absolute difference</td></tr></thead><tbody><tr><td align="left" valign="top">T=0</td><td align="left" valign="top">64.44 (1.43)</td><td align="left" valign="top">76.46 (2.41)</td><td align="char" char="." valign="top">+12.02 pp<sup><xref ref-type="table-fn" rid="table5fn3">c</xref></sup></td></tr><tr><td align="left" valign="top">T=0.5</td><td align="left" valign="top">65.08 (1.27)</td><td align="left" valign="top">73.23 (2.92)</td><td align="char" char="." valign="top">+8.15 pp</td></tr><tr><td align="left" valign="top">T=1</td><td align="left" valign="top">64.92 (2.27)</td><td align="left" valign="top">76.77 (1.14)</td><td align="char" char="." valign="top">+11.85 pp</td></tr></tbody></table><table-wrap-foot><fn id="table5fn1"><p><sup>a</sup>LLM: large language model.</p></fn><fn id="table5fn2"><p><sup>b</sup>Results are reported across 3 temperature settings using self-reflexive prompting and the same clustering-based context recovery and retrieval configuration. The absolute difference is expressed in percentage points between the enriched and original-description conditions. Each configuration was evaluated across 10 repeated runs.</p></fn><fn id="table5fn3"><p><sup>c</sup>pp: percentage points.</p></fn></table-wrap-foot></table-wrap></sec><sec id="s3-2-2"><title>Context Recovery and Retrieval Performance</title><p>A controlled comparison was conducted to assess the effect of clustering-based context recovery under otherwise identical experimental conditions. Clustering increased top 5 resource-identification accuracy from 50% to 94% and mean attribute-level mapping accuracy from 54.87% (SD 1.88%) to 76.77% (SD 1.14%; <xref ref-type="table" rid="table6">Table 6</xref>). These results show that, under limited contextual information, improved candidate-resource retrieval substantially benefits downstream mapping performance.</p><table-wrap id="t6" position="float"><label>Table 6.</label><caption><p>Controlled comparison of resource-identification and downstream attribute-level mapping performance with and without clustering-based context recovery in the low-context scenario.<sup><xref ref-type="table-fn" rid="table6fn1">a</xref></sup></p></caption><table id="table6" frame="hsides" rules="groups"><thead><tr><td align="left" valign="top">Low-context retrieval setting</td><td align="left" valign="top">Resource identification (top 5), n/N (%)</td><td align="left" valign="top">Attribute-level mapping accuracy (%), mean (SD)</td><td align="left" valign="top">Best observed attribute-level mapping accuracy (%)</td></tr></thead><tbody><tr><td align="left" valign="top">No clustering (attribute-level queries)</td><td align="left" valign="top">33/65 (50)</td><td align="left" valign="top">54.87 (1.88)</td><td align="left" valign="top">56.32</td></tr><tr><td align="left" valign="top">Clustering (cluster-level queries)</td><td align="left" valign="top">61/65 (94)</td><td align="left" valign="top">76.77 (1.14)</td><td align="left" valign="top">78.19</td></tr></tbody></table><table-wrap-foot><fn id="table6fn1"><p><sup>a</sup>Both conditions were evaluated using GPT-4o with self-reflexive prompting at temperature=1 under otherwise identical experimental settings (n=10 repeated runs per condition). Attribute-level mapping performance is reported as mean accuracy (SD), together with the best observed accuracy across runs. Retrieval queries were constructed per data element without clustering and per recovered cluster with clustering; top-5 accuracy was evaluated per data element in both conditions (n=65).</p></fn></table-wrap-foot></table-wrap></sec><sec id="s3-2-3"><title>Temperature Robustness and Error Analysis</title><p>Once the low-context scenario configuration was established, both models were evaluated using the self-reflexive prompting strategy across different temperature settings (<xref ref-type="table" rid="table7">Table 7</xref>). Self-reflexive was selected as the common configuration to preserve comparability between models; therefore, the low-context Llama 3.3 results should be interpreted as performance under this shared prompting configuration rather than as the model-specific optimum.</p><table-wrap id="t7" position="float"><label>Table 7.</label><caption><p>Low-context mean (SD) attribute-level mapping accuracy for GPT-4o and Llama 3.3 70B across temperature settings in the low-context scenario (n=10 runs per configuration).</p></caption><table id="table7" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Temperature</td><td align="left" valign="bottom">GPT-4o (%), mean (SD)</td><td align="left" valign="bottom">Llama 3.3 (%), mean (SD)</td></tr></thead><tbody><tr><td align="left" valign="top">0</td><td align="left" valign="top">76.46 (2.41)</td><td align="left" valign="top">58.31 (2.23)</td></tr><tr><td align="left" valign="top">0.5</td><td align="left" valign="top">73.23 (2.92)</td><td align="left" valign="top">56.31 (1.81)</td></tr><tr><td align="left" valign="top">1</td><td align="left" valign="top">76.77 (1.14<bold>)</bold></td><td align="left" valign="top">54.31 (4.17)</td></tr></tbody></table></table-wrap><p>GPT-4o consistently outperformed Llama 3.3 across temperature settings and remained comparatively stable with mean attribute-level mapping accuracy ranging from 73.23% (SD 2.92) to 76.77% (SD 1.14 ; <xref ref-type="table" rid="table7">Table 7</xref>). Llama 3.3 showed a monotonic decrease in mean accuracy as temperature increased, from 58.31% (SD 2.23) at temperature<italic>=</italic>0 to 54.31% (SD 4.17) at temperature=1, together with greater run-to-run variability. These results were interpreted descriptively; no inferential hypothesis test was performed to compare temperatures.</p><p>Error profiles differed between models (<xref ref-type="fig" rid="figure8">Figure 8</xref> and <xref ref-type="table" rid="table8">Table 8</xref>). For GPT-4o, ResourceConfusion was consistently the dominant error category across temperatures, whereas TerminalAttributeConfusion remained substantially less frequent. Llama 3.3 showed substantial contributions from both error types, with the overall error burden increasing as temperature increased. ExtensionOveruse, Specificity, and NoMap remained comparatively infrequent for both models. Overall, GPT-4o was predominantly limited by resource-level ambiguity, whereas Llama 3.3 was affected by both resource-level and terminal-attribute disambiguation errors.</p><fig position="float" id="figure8"><label>Figure 8.</label><caption><p>Heatmap of mean errors grouped by techniques and models in low-context scenario. TAConfusion: TerminalAttributeConfusion.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v14i1e100368_fig08.png"/></fig><table-wrap id="t8" position="float"><label>Table 8.</label><caption><p>Mean number of errors and corresponding SD for each error category across 10 repeated runs at each temperature setting in the low-context scenario.<sup><xref ref-type="table-fn" rid="table8fn1">a</xref></sup></p></caption><table id="table8" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Low-context scenario error type</td><td align="left" valign="bottom" colspan="2">Temperature=0</td><td align="left" valign="bottom" colspan="2">Temperature=0.5</td><td align="left" valign="bottom" colspan="2">Temperature=1</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="bottom">Llama 3.3, mean (SD)</td><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="bottom">Llama 3.3, mean (SD)</td><td align="left" valign="top">GPT-4o, mean (SD)</td><td align="left" valign="bottom">Llama 3.3, mean (SD)</td></tr></thead><tbody><tr><td align="left" valign="top">ExtensionOveruse</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0.2 (0.63)</td></tr><tr><td align="left" valign="top">Specificity</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">1.8 (0.79)</td><td align="left" valign="top">0.8 (1.69)</td><td align="left" valign="top">1.7 (0.95)</td><td align="left" valign="top">0.0 (0)</td><td align="left" valign="top">1.6 (1.26)</td></tr><tr><td align="left" valign="top">NoMap</td><td align="left" valign="top">0.1 (0.52)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0.3 (0.48)</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">0.5 (0.53)</td><td align="left" valign="top">0.7 (1.89)</td></tr><tr><td align="left" valign="top">ResourceConfusion</td><td align="left" valign="top">11.3 (0.67)</td><td align="left" valign="top">12.2 (1.03)</td><td align="left" valign="top">11.5 (0.97)</td><td align="left" valign="top">13.2 (1.14)</td><td align="left" valign="top">11 (0)</td><td align="left" valign="top">14.4 (2.01)</td></tr><tr><td align="left" valign="top">TAConfusion<sup><xref ref-type="table-fn" rid="table8fn2">b</xref></sup></td><td align="left" valign="top">3.90 (1.29)</td><td align="left" valign="top">13.1 (1.29)</td><td align="left" valign="top">4.8 (1.23)</td><td align="left" valign="top">13.5 (0.97)</td><td align="left" valign="top">3.6 (0.7)</td><td align="left" valign="top">12.8 (1.48)</td></tr></tbody></table><table-wrap-foot><fn id="table8fn1"><p><sup>a</sup>Error categories were mutually exclusive; therefore, the sum of the category means corresponds to the mean number of incorrectly mapped data elements per run.</p></fn><fn id="table8fn2"><p><sup>b</sup>TAConfusion: TerminalAttributeConfusion.</p></fn></table-wrap-foot></table-wrap></sec></sec></sec><sec id="s4" sec-type="discussion"><title>Discussion</title><sec id="s4-1"><title>Principal Findings</title><p>This study evaluated the ability of LLMs to support the mapping of structured clinical data to HL7 FHIR under different levels of contextual information. Across both scenarios, the main unresolved challenge was fine-grained semantic disambiguation: distinguishing between semantically adjacent FHIR resources and selecting the most appropriate terminal element path within the correct structural context.</p><p>In the baseline scenario, where table structure and descriptive metadata were available, resource identification was not a limiting factor; instead, performance depended primarily on attribute-level disambiguation and prompt design. Prompting effects were model dependent: GPT-4o benefited most from self-reflexive prompting, whereas Llama 3.3 performed best with MoP (<xref ref-type="table" rid="table3">Tables 3</xref> and <xref ref-type="table" rid="table4">4</xref>).</p><p>In the low-context scenario, removal of table-level information shifted the main bottleneck toward candidate resource identification. Clustering-based context recovery substantially improved resource retrieval and downstream mapping (<xref ref-type="table" rid="table6">Table 6</xref>), demonstrating the importance of reconstructing contextual information when source metadata are limited.</p><p>Temperature affected the models differently: GPT-4o remained comparatively stable, whereas Llama 3.3 showed decreasing accuracy, and greater variability as temperature increased (<xref ref-type="table" rid="table7">Tables 7</xref> and <xref ref-type="table" rid="table8">8</xref>). However, low-context experiments used self-reflexive prompting as a common configuration for both models rather than each model&#x2019;s optimal baseline strategy. Because MoP performed best for Llama 3.3 in the baseline scenario, its low-context results may underestimate performance achievable with model-specific prompt optimization.</p><p>Across both scenarios, residual errors were dominated by ResourceConfusion and TerminalAttributeConfusion, indicating that fine-grained semantic disambiguation remained the central challenge. Schema-guided prompting, metadata enrichment, context recovery, and retrieval therefore appear primarily as enabling mechanisms that constrain the mapping space and provide the grounding needed to resolve this ambiguity.</p><p>Previous studies have demonstrated the potential of LLMs for FHIR-related transformation tasks, including schema matching between medical forms and FHIR elements and the generation of FHIR resources or bundles from unstructured clinical text [<xref ref-type="bibr" rid="ref19">19</xref>-<xref ref-type="bibr" rid="ref22">22</xref>]. In contrast, our study evaluates structured clinical data across multiple candidate FHIR resources and explicitly separates resource identification from attribute-level mapping. Our findings extend previous observations on the importance of FHIR schema complexity and prompt formulation [<xref ref-type="bibr" rid="ref20">20</xref>-<xref ref-type="bibr" rid="ref22">22</xref>] by showing that candidate-resource retrieval becomes a major determinant of downstream mapping when source-schema context is reduced. Direct quantitative comparison with previously reported non-LLM mapping approaches is not straightforward because existing systems differ substantially in task definition, target data, FHIR resources, degree of manual configuration, and evaluation criteria. Prior FHIR harmonization pipelines generally rely on manually specified mappings, templates, or transformation rules rather than automated data element&#x2013;to-FHIR attribute-path prediction over a common benchmark. Therefore, this study does not aim to establish superiority over non-LLM approaches, but rather to characterize the capabilities and limitations of LLMs for supporting this mapping task under controlled experimental conditions.</p><p>The results support the use of LLMs as decision support tools for data element&#x2013;to-FHIR mapping rather than as fully autonomous standardization systems. Intended users include clinical informatics, interoperability, and data engineering professionals with sufficient FHIR expertise to validate ambiguous mappings. Human supervision is particularly relevant at 2 stages: candidate resource selection, where retrieval errors may propagate downstream, and attribute-level disambiguation, where closely related FHIR elements or local implementation conventions often require expert judgment. In operational use, source elements with insufficient documentation or ambiguous retrieval results should be flagged for expert review rather than automatically mapped.</p><p>Several limitations should be acknowledged. First, the experiments were conducted on a limited subset of tables and attributes from MIMIC-IV using a single reference mapping, limiting generalizability to other institutions, schema designs, and documentation practices. Second, the evaluation focused on resource identification and data element&#x2013;to-attribute mapping rather than complete ETL workflows, FHIR resource instantiation, terminology coding, or clinical validation. Third, the overall pipeline remains sensitive to retrieval quality, since downstream mapping remained dependent on the candidate-resource retrieval, allowing retrieval errors to propagate through the pipeline.</p><p>Future work should extend the pipeline beyond structural matching toward full resource instantiation, semantic validation, and integration into broader ETL workflows. Particular attention should be given to improving candidate-resource retrieval and fine-grained attribute disambiguation through stronger grounding in FHIR definitions, implementation guides, and controlled terminologies. External evaluation across datasets, institutions, and schema designs should assess generalizability and the contribution of individual pipeline components, including clustering, retrieval, schema-guided prompting, temperature, and model-specific prompting strategies. Controlled comparisons with rule-based, embedding-based, and manually configured mapping approaches using the same benchmark and evaluation criteria are also needed.</p><p>Future studies should additionally investigate confidence or consistency measures derived from repeated LLM responses to identify ambiguous mappings requiring expert review. Finally, the applicability of context recovery to other clinical information models and common data models, including OMOP CDM and openEHR, should be investigated.</p></sec><sec id="s4-2"><title>Conclusions</title><p>This study showed that LLMs can support the mapping of structured clinical data to HL7 FHIR, although performance depends on the contextual information available to the model. Under context-rich conditions, prompt design influenced attribute-level mapping performance, with the optimal strategy differing between GPT-4o and Llama 3.3 70B. Under reduced context, clustering-based context recovery substantially improved candidate-resource retrieval and downstream mapping.</p><p>Across both scenarios, ResourceConfusion and TerminalAttributeConfusion remained the dominant errors, indicating that fine-grained semantic disambiguation is the principal remaining challenge. These findings support the use of LLMs as assistive components within human-supervised FHIR mapping workflows rather than as fully autonomous mapping systems.</p></sec></sec></body><back><notes><sec><title>Generative AI Use</title><p>The authors declare the use of generative AI in the research and writing process. According to the GAIDeT taxonomy (2025), the following tasks were delegated to GenAI tools under full human supervision: literature search and systematization, code generation, code optimization, text generation, proofreading and editing, summarizing text, formulation of conclusions, reformatting, quality assessment, identification of limitations, recommendations, and publication support. The GenAI tool used was: ChatGPT (OpenAI), GPT-5.6 Sol. Responsibility for the final manuscript lies entirely with the authors. For GenAI tools, authors do not bear responsibility for the final outcomes.</p></sec><sec><title>Funding</title><p>This work was supported by MCIN/AEI/10.13039/501100011033 under grant RYC2020-030190-I, in part by the Horizon Europe HORIZON-HLTH-2021-TOOL-06-03 under grant 101057603 and in part by Horizon-HLTH-2022-Tool-12-Two-Stage under grant 101080875. The funders had no role in the study design, data analysis, interpretation of the results, preparation of the manuscript, or decision to submit the work for publication.</p></sec><sec><title>Data Availability</title><p>The MIMIC-IV (Medical Information Mart for Intensive Care IV) dataset used in this study is available through PhysioNet under credentialed access requirements, which include completion of the required training and acceptance of the applicable data-use conditions. A publicly available demonstration dataset can be accessed for reference and experimentation purposes [<xref ref-type="bibr" rid="ref52">52</xref>]. The various prompts and complete results of the data transformations are available on GitHub [<xref ref-type="bibr" rid="ref53">53</xref>]. The version of the code corresponding to the experiments reported in this study is identified by commit 398555133b969c97a9b82e4c891a026692d46143.</p></sec></notes><fn-group><fn fn-type="con"><p>Conceptualization: AR-T, CMC, PCDA</p><p>Data curation: AR-T</p><p>Formal analysis: AR-T, CMC</p><p>Funding acquisition: CMC</p><p>Investigation: AR-T, CMC, PCDA</p><p>Methodology: AR-T, CMC, PCDA</p><p>Software: AR-T</p><p>Supervision: CMC, PCDA</p><p>Writing &#x2013; original draft: AR-T, CMC</p><p>Writing &#x2013; review &#x0026; editing: PCDA</p></fn><fn fn-type="conflict"><p>None declared.</p></fn></fn-group><glossary><title>Abbreviations</title><def-list><def-item><term id="abb1">BIRCH</term><def><p>Balanced Iterative Reducing and Clustering using Hierarchies</p></def></def-item><def-item><term id="abb2">CDM</term><def><p>common data model</p></def></def-item><def-item><term id="abb3">DBSCAN</term><def><p>Density-Based Spatial Clustering of Applications with Noise</p></def></def-item><def-item><term id="abb4">EHDS</term><def><p>European Health Data Space</p></def></def-item><def-item><term id="abb5">EHR</term><def><p>electronic health record</p></def></def-item><def-item><term id="abb6">ETL</term><def><p>extract, transform, and load</p></def></def-item><def-item><term id="abb7">EU</term><def><p>European Union</p></def></def-item><def-item><term id="abb8">FHIR</term><def><p>Fast Healthcare Interoperability Resources</p></def></def-item><def-item><term id="abb9">HL7</term><def><p>Health Level Seven</p></def></def-item><def-item><term id="abb10">ICD</term><def><p>International Classification of Diseases</p></def></def-item><def-item><term id="abb11">ICU</term><def><p>intensive care unit</p></def></def-item><def-item><term id="abb12">LLM</term><def><p>large language model</p></def></def-item><def-item><term id="abb13">LOINC</term><def><p>Logical Observation Identifiers Names and Codes</p></def></def-item><def-item><term id="abb14">MIMIC-IV</term><def><p>Medical Information Mart for Intensive Care IV</p></def></def-item><def-item><term id="abb15">MoP</term><def><p>mixture of prompts</p></def></def-item><def-item><term id="abb16">OMOP</term><def><p>Observational Medical Outcomes Partnership</p></def></def-item><def-item><term id="abb17">OPTICS</term><def><p>Ordering Points To Identify the Clustering Structure</p></def></def-item><def-item><term id="abb18">RQ</term><def><p>research question</p></def></def-item><def-item><term id="abb19">SNOMED CT</term><def><p>Systematized Nomenclature of Medicine Clinical Terms</p></def></def-item></def-list></glossary><ref-list><title>References</title><ref id="ref1"><label>1</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Vayena</surname><given-names>E</given-names> </name></person-group><article-title>Value from health data: European opportunity to catalyse progress in digital health</article-title><source>Lancet</source><year>2021</year><month>02</month><day>20</day><volume>397</volume><issue>10275</issue><fpage>652</fpage><lpage>653</lpage><pub-id pub-id-type="doi">10.1016/S0140-6736(21)00203-8</pub-id><pub-id pub-id-type="medline">33571452</pub-id></nlm-citation></ref><ref id="ref2"><label>2</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Horgan</surname><given-names>D</given-names> </name><name name-style="western"><surname>Hackett</surname><given-names>J</given-names> </name><name name-style="western"><surname>Westphalen</surname><given-names>CB</given-names> </name><etal/></person-group><article-title>Digitalisation and COVID-19: the perfect storm</article-title><source>Biomed Hub</source><year>2020</year><volume>5</volume><issue>3</issue><fpage>1341</fpage><lpage>1363</lpage><pub-id pub-id-type="doi">10.1159/000511232</pub-id><pub-id pub-id-type="medline">33564668</pub-id></nlm-citation></ref><ref id="ref3"><label>3</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Iacob</surname><given-names>N</given-names> </name><name name-style="western"><surname>Simonelli</surname><given-names>F</given-names> </name></person-group><article-title>Towards a European health data ecosystem</article-title><source>Eur J risk regul</source><year>2020</year><month>12</month><volume>11</volume><issue>4</issue><fpage>884</fpage><lpage>893</lpage><pub-id pub-id-type="doi">10.1017/err.2020.88</pub-id></nlm-citation></ref><ref id="ref4"><label>4</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Hussein</surname><given-names>R</given-names> </name><name name-style="western"><surname>Scherdel</surname><given-names>L</given-names> </name><name name-style="western"><surname>Nicolet</surname><given-names>F</given-names> </name><name name-style="western"><surname>Martin-Sanchez</surname><given-names>F</given-names> </name></person-group><article-title>Towards the European Health Data Space (EHDS) ecosystem: a survey research on future health data scenarios</article-title><source>Int J Med Inform</source><year>2023</year><month>02</month><volume>170</volume><fpage>104949</fpage><pub-id pub-id-type="doi">10.1016/j.ijmedinf.2022.104949</pub-id><pub-id pub-id-type="medline">36521422</pub-id></nlm-citation></ref><ref id="ref5"><label>5</label><nlm-citation citation-type="web"><source>SNOMED International</source><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://www.snomed.org">https://www.snomed.org</ext-link></comment></nlm-citation></ref><ref id="ref6"><label>6</label><nlm-citation citation-type="web"><article-title>ICD-11: International Classification of Diseases 11th Revision</article-title><source>World Health Organization</source><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://icd.who.int">https://icd.who.int</ext-link></comment></nlm-citation></ref><ref id="ref7"><label>7</label><nlm-citation citation-type="web"><source>LOINC</source><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://loinc.org">https://loinc.org</ext-link></comment></nlm-citation></ref><ref id="ref8"><label>8</label><nlm-citation citation-type="book"><person-group person-group-type="author"><name name-style="western"><surname>Bender</surname><given-names>D</given-names> </name><name name-style="western"><surname>Sartipi</surname><given-names>K</given-names> </name></person-group><article-title>HL7 FHIR: an agile and restful approach to healthcare information exchange</article-title><source>Proceedings of the 26th IEEE International Symposium on Computer-Based Medical Systems</source><year>2013</year><fpage>326</fpage><lpage>331</lpage><pub-id pub-id-type="doi">10.1109/CBMS.2013.6627810</pub-id><pub-id pub-id-type="other">978-1-4799-1053-3</pub-id></nlm-citation></ref><ref id="ref9"><label>9</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Ahmadi</surname><given-names>N</given-names> </name><name name-style="western"><surname>Peng</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Wolfien</surname><given-names>M</given-names> </name><name name-style="western"><surname>Zoch</surname><given-names>M</given-names> </name><name name-style="western"><surname>Sedlmayr</surname><given-names>M</given-names> </name></person-group><article-title>OMOP CDM can facilitate data-driven studies for cancer prediction: a systematic review</article-title><source>Int J Mol Sci</source><year>2022</year><month>10</month><day>5</day><volume>23</volume><issue>19</issue><fpage>11834</fpage><pub-id pub-id-type="doi">10.3390/ijms231911834</pub-id><pub-id pub-id-type="medline">36233137</pub-id></nlm-citation></ref><ref id="ref10"><label>10</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Kalra</surname><given-names>D</given-names> </name><name name-style="western"><surname>Beale</surname><given-names>T</given-names> </name><name name-style="western"><surname>Heard</surname><given-names>S</given-names> </name></person-group><article-title>The openEHR Foundation</article-title><source>Stud Health Technol Inform</source><year>2005</year><volume>115</volume><fpage>153</fpage><lpage>173</lpage><pub-id pub-id-type="medline">16160223</pub-id></nlm-citation></ref><ref id="ref11"><label>11</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Pedrera-Jim&#x00E9;nez</surname><given-names>M</given-names> </name><name name-style="western"><surname>Garc&#x00ED;a-Barrio</surname><given-names>N</given-names> </name><name name-style="western"><surname>Frid</surname><given-names>S</given-names> </name><etal/></person-group><article-title>Can OpenEHR, ISO 13606, and HL7 FHIR work together? An agnostic approach for the selection and application of electronic health record standards to the next-generation health data spaces</article-title><source>J Med Internet Res</source><year>2023</year><month>12</month><day>28</day><volume>25</volume><fpage>e48702</fpage><pub-id pub-id-type="doi">10.2196/48702</pub-id><pub-id pub-id-type="medline">38153779</pub-id></nlm-citation></ref><ref id="ref12"><label>12</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Marfoglia</surname><given-names>A</given-names> </name><name name-style="western"><surname>Nardini</surname><given-names>F</given-names> </name><name name-style="western"><surname>Arcobelli</surname><given-names>VA</given-names> </name><name name-style="western"><surname>Moscato</surname><given-names>S</given-names> </name><name name-style="western"><surname>Mellone</surname><given-names>S</given-names> </name><name name-style="western"><surname>Carbonaro</surname><given-names>A</given-names> </name></person-group><article-title>Towards real-world clinical data standardization: a modular FHIR-driven transformation pipeline to enhance semantic interoperability in healthcare</article-title><source>Comput Biol Med</source><year>2025</year><month>03</month><volume>187</volume><fpage>109745</fpage><pub-id pub-id-type="doi">10.1016/j.compbiomed.2025.109745</pub-id><pub-id pub-id-type="medline">39904102</pub-id></nlm-citation></ref><ref id="ref13"><label>13</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Carbonaro</surname><given-names>A</given-names> </name><name name-style="western"><surname>Giorgetti</surname><given-names>L</given-names> </name><name name-style="western"><surname>Ridolfi</surname><given-names>L</given-names> </name><etal/></person-group><article-title>From raw data to research-ready: a FHIR-based transformation pipeline in a real-world oncology setting</article-title><source>Comput Biol Med</source><year>2025</year><month>10</month><volume>197</volume><issue>Pt B</issue><fpage>111051</fpage><pub-id pub-id-type="doi">10.1016/j.compbiomed.2025.111051</pub-id><pub-id pub-id-type="medline">40945218</pub-id></nlm-citation></ref><ref id="ref14"><label>14</label><nlm-citation citation-type="web"><person-group person-group-type="author"><collab>Pontegra software technologies BV</collab></person-group><source>Ignifyr</source><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://ignifyr.io">https://ignifyr.io</ext-link></comment></nlm-citation></ref><ref id="ref15"><label>15</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Williams</surname><given-names>E</given-names> </name><name name-style="western"><surname>Kienast</surname><given-names>M</given-names> </name><name name-style="western"><surname>Medawar</surname><given-names>E</given-names> </name><etal/></person-group><article-title>A standardized clinical data harmonization pipeline for scalable AI application deployment (FHIR-DHP): validation and usability study</article-title><source>JMIR Med Inform</source><year>2023</year><month>03</month><day>21</day><volume>11</volume><fpage>e43847</fpage><pub-id pub-id-type="doi">10.2196/43847</pub-id><pub-id pub-id-type="medline">36943344</pub-id></nlm-citation></ref><ref id="ref16"><label>16</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Zong</surname><given-names>N</given-names> </name><name name-style="western"><surname>Stone</surname><given-names>DJ</given-names> </name><name name-style="western"><surname>Sharma</surname><given-names>DK</given-names> </name><etal/></person-group><article-title>Modeling cancer clinical trials using HL7 FHIR to support downstream applications: a case study with colorectal cancer data</article-title><source>Int J Med Inform</source><year>2021</year><month>01</month><volume>145</volume><fpage>104308</fpage><pub-id pub-id-type="doi">10.1016/j.ijmedinf.2020.104308</pub-id><pub-id pub-id-type="medline">33160272</pub-id></nlm-citation></ref><ref id="ref17"><label>17</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Bennett</surname><given-names>AM</given-names> </name><name name-style="western"><surname>Ulrich</surname><given-names>H</given-names> </name><name name-style="western"><surname>van Damme</surname><given-names>P</given-names> </name><name name-style="western"><surname>Wiedekopf</surname><given-names>J</given-names> </name><name name-style="western"><surname>Johnson</surname><given-names>AEW</given-names> </name></person-group><article-title>MIMIC-IV on FHIR: converting a decade of in-patient data into an exchangeable, interoperable format</article-title><source>J Am Med Inform Assoc</source><year>2023</year><month>03</month><day>16</day><volume>30</volume><issue>4</issue><fpage>718</fpage><lpage>725</lpage><pub-id pub-id-type="doi">10.1093/jamia/ocad002</pub-id><pub-id pub-id-type="medline">36688534</pub-id></nlm-citation></ref><ref id="ref18"><label>18</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Stuhlmiller</surname><given-names>TJ</given-names> </name><name name-style="western"><surname>Rabe</surname><given-names>AJ</given-names> </name><name name-style="western"><surname>Rapp</surname><given-names>J</given-names> </name><etal/></person-group><article-title>A scalable method for validated data extraction from electronic health records with large language models</article-title><source>medRxiv</source><comment>Preprint posted online on  Feb 26, 2025</comment><pub-id pub-id-type="doi">10.1101/2025.02.25.25322898</pub-id></nlm-citation></ref><ref id="ref19"><label>19</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Yoon</surname><given-names>D</given-names> </name><name name-style="western"><surname>Han</surname><given-names>C</given-names> </name><name name-style="western"><surname>Kim</surname><given-names>DW</given-names> </name><etal/></person-group><article-title>Redefining health care data interoperability: empirical exploration of large language models in information exchange</article-title><source>J Med Internet Res</source><year>2024</year><month>05</month><day>31</day><volume>26</volume><fpage>e56614</fpage><pub-id pub-id-type="doi">10.2196/56614</pub-id><pub-id pub-id-type="medline">38819879</pub-id></nlm-citation></ref><ref id="ref20"><label>20</label><nlm-citation citation-type="thesis"><person-group person-group-type="author"><name name-style="western"><surname>Pipalia</surname><given-names>A</given-names> </name></person-group><article-title>Comparative analysis of NLP techniques for automated matching of medical intake forms to the FHIR data schema: embedding similarity and language models [Master&#x2019;s thesis]</article-title><year>2024</year><publisher-name>Oregon Health &#x0026; Science University</publisher-name><pub-id pub-id-type="doi">10.6083/bpxhc43715</pub-id></nlm-citation></ref><ref id="ref21"><label>21</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Li</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Wang</surname><given-names>H</given-names> </name><name name-style="western"><surname>Yerebakan</surname><given-names>HZ</given-names> </name><name name-style="western"><surname>Shinagawa</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Luo</surname><given-names>Y</given-names> </name></person-group><article-title>FHIR-GPT enhances health interoperability with large language models</article-title><source>NEJM AI</source><year>2024</year><month>08</month><volume>1</volume><issue>8</issue><pub-id pub-id-type="doi">10.1056/aics2300301</pub-id><pub-id pub-id-type="medline">40746832</pub-id></nlm-citation></ref><ref id="ref22"><label>22</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Delaunay</surname><given-names>J</given-names> </name><name name-style="western"><surname>Girbes</surname><given-names>D</given-names> </name><name name-style="western"><surname>Cusido</surname><given-names>J</given-names> </name></person-group><article-title>Evaluating the effectiveness of large language models in converting clinical data to FHIR format</article-title><source>Appl Sci</source><year>2025</year><volume>15</volume><issue>6</issue><fpage>3379</fpage><pub-id pub-id-type="doi">10.3390/app15063379</pub-id></nlm-citation></ref><ref id="ref23"><label>23</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Hier</surname><given-names>DB</given-names> </name><name name-style="western"><surname>Carrithers</surname><given-names>MA</given-names> </name><name name-style="western"><surname>Platt</surname><given-names>SK</given-names> </name><name name-style="western"><surname>Nguyen</surname><given-names>A</given-names> </name><name name-style="western"><surname>Giannopoulos</surname><given-names>I</given-names> </name><name name-style="western"><surname>Obafemi-Ajayi</surname><given-names>T</given-names> </name></person-group><article-title>Preprocessing of physician notes by LLMs improves clinical concept extraction without information loss</article-title><source>Information</source><year>2025</year><volume>16</volume><issue>6</issue><fpage>446</fpage><pub-id pub-id-type="doi">10.3390/info16060446</pub-id></nlm-citation></ref><ref id="ref24"><label>24</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Schmiedmayer</surname><given-names>P</given-names> </name><name name-style="western"><surname>Rao</surname><given-names>A</given-names> </name><name name-style="western"><surname>Zagar</surname><given-names>P</given-names> </name><etal/></person-group><article-title>LLMonFHIR: a physician-validated, large language model-based mobile application for querying patient electronic health data</article-title><source>JACC Adv</source><year>2025</year><month>06</month><volume>4</volume><issue>6 Pt 1</issue><fpage>101780</fpage><pub-id pub-id-type="doi">10.1016/j.jacadv.2025.101780</pub-id><pub-id pub-id-type="medline">40373519</pub-id></nlm-citation></ref><ref id="ref25"><label>25</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Johnson</surname><given-names>AEW</given-names> </name><name name-style="western"><surname>Bulgarelli</surname><given-names>L</given-names> </name><name name-style="western"><surname>Shen</surname><given-names>L</given-names> </name><etal/></person-group><article-title>MIMIC-IV, a freely accessible electronic health record dataset</article-title><source>Sci Data</source><year>2023</year><month>01</month><day>3</day><volume>10</volume><issue>1</issue><fpage>1</fpage><pub-id pub-id-type="doi">10.1038/s41597-022-01899-x</pub-id><pub-id pub-id-type="medline">36596836</pub-id></nlm-citation></ref><ref id="ref26"><label>26</label><nlm-citation citation-type="web"><article-title>Research ethics committee [Webpage in Spanish]</article-title><source>University of Murcia</source><access-date>2026-09-16</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://www.um.es/web/comision-etica-investigacion/comision-etica/ceic/formularios">https://www.um.es/web/comision-etica-investigacion/comision-etica/ceic/formularios</ext-link></comment></nlm-citation></ref><ref id="ref27"><label>27</label><nlm-citation citation-type="web"><article-title>Responsible use of MIMIC data with online services like GPT</article-title><source>PhysioNet</source><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://physionet.org/news/post/gpt-responsible-use">https://physionet.org/news/post/gpt-responsible-use</ext-link></comment></nlm-citation></ref><ref id="ref28"><label>28</label><nlm-citation citation-type="web"><person-group person-group-type="author"><name name-style="western"><surname>Singha</surname><given-names>A</given-names> </name><name name-style="western"><surname>Cambronero</surname><given-names>J</given-names> </name><name name-style="western"><surname>Gulwani</surname><given-names>S</given-names> </name><name name-style="western"><surname>Le</surname><given-names>V</given-names> </name><name name-style="western"><surname>Parnin</surname><given-names>C</given-names> </name></person-group><article-title>Tabular representation, noisy operators, and impacts on table structure understanding tasks in LLms</article-title><source>NeurIPS</source><access-date>2026-10-08</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://neurips.cc/virtual/2023/81303">https://neurips.cc/virtual/2023/81303</ext-link></comment></nlm-citation></ref><ref id="ref29"><label>29</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Reimers</surname><given-names>N</given-names> </name><name name-style="western"><surname>Gurevych</surname><given-names>I</given-names> </name></person-group><article-title>Sentence-BERT: sentence embeddings using siamese BERT-networks</article-title><source>Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)</source><year>2019</year><access-date>2026-10-08</access-date><fpage>3982</fpage><lpage>3992</lpage><comment><ext-link ext-link-type="uri" xlink:href="https://www.aclweb.org/anthology/D19-1">https://www.aclweb.org/anthology/D19-1</ext-link></comment><pub-id pub-id-type="doi">10.18653/v1/D19-1410</pub-id></nlm-citation></ref><ref id="ref30"><label>30</label><nlm-citation citation-type="web"><person-group person-group-type="author"><name name-style="western"><surname>Balachandran</surname><given-names>A</given-names> </name></person-group><article-title>abhinand/MedEmbed-large-v0.1</article-title><source>Hugging Face</source><year>2024</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://huggingface.co/abhinand/MedEmbed-large-v0.1">https://huggingface.co/abhinand/MedEmbed-large-v0.1</ext-link></comment></nlm-citation></ref><ref id="ref31"><label>31</label><nlm-citation citation-type="web"><article-title>NeuML/pubmedbert-base-embeddings</article-title><source>Hugging Face</source><year>2023</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://huggingface.co/NeuML/pubmedbert-base-embeddings">https://huggingface.co/NeuML/pubmedbert-base-embeddings</ext-link></comment></nlm-citation></ref><ref id="ref32"><label>32</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Lee</surname><given-names>J</given-names> </name><name name-style="western"><surname>Yoon</surname><given-names>W</given-names> </name><name name-style="western"><surname>Kim</surname><given-names>S</given-names> </name><etal/></person-group><article-title>BioBERT: a pre-trained biomedical language representation model for biomedical text mining</article-title><source>Bioinformatics</source><year>2020</year><month>02</month><day>15</day><volume>36</volume><issue>4</issue><fpage>1234</fpage><lpage>1240</lpage><pub-id pub-id-type="doi">10.1093/bioinformatics/btz682</pub-id><pub-id pub-id-type="medline">31501885</pub-id></nlm-citation></ref><ref id="ref33"><label>33</label><nlm-citation citation-type="web"><article-title>EmbeddingGemma model card</article-title><source>Google AI for Developers</source><year>2025</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://ai.google.dev/gemma/docs/embeddinggemma/model_card">https://ai.google.dev/gemma/docs/embeddinggemma/model_card</ext-link></comment></nlm-citation></ref><ref id="ref34"><label>34</label><nlm-citation citation-type="web"><article-title>Lokeshch19/modernpubmedbert</article-title><source>Hugging Face</source><year>2025</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://huggingface.co/lokeshch19/ModernPubMedBERT">https://huggingface.co/lokeshch19/ModernPubMedBERT</ext-link></comment></nlm-citation></ref><ref id="ref35"><label>35</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Chong</surname><given-names>B</given-names> </name></person-group><article-title>K-means clustering algorithm: a brief review</article-title><source>Acad J Comput Inf Sci</source><year>2021</year><volume>4</volume><issue>5</issue><fpage>37</fpage><lpage>40</lpage><pub-id pub-id-type="doi">10.25236/AJCIS.2021.040506</pub-id></nlm-citation></ref><ref id="ref36"><label>36</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>M&#x00FC;llner</surname><given-names>D</given-names> </name></person-group><article-title>Fastcluster: fast hierarchical, agglomerative clustering routines for R and python</article-title><source>J Stat Softw</source><year>2013</year><volume>53</volume><issue>9</issue><fpage>1</fpage><lpage>18</lpage><pub-id pub-id-type="doi">10.18637/jss.v053.i09</pub-id></nlm-citation></ref><ref id="ref37"><label>37</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Ester</surname><given-names>M</given-names> </name><name name-style="western"><surname>Kriegel</surname><given-names>HP</given-names> </name><name name-style="western"><surname>Sander</surname><given-names>J</given-names> </name><name name-style="western"><surname>Xu</surname><given-names>X</given-names> </name></person-group><article-title>A density-based algorithm for discovering clusters in large spatial databases with noise</article-title><source>KDD&#x2019;96: Proceedings of the Second International Conference on Knowledge Discovery and Data Mining</source><year>1996</year><fpage>226</fpage><lpage>231</lpage><pub-id pub-id-type="doi">10.5555/3001460.3001507</pub-id></nlm-citation></ref><ref id="ref38"><label>38</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Zhang</surname><given-names>T</given-names> </name><name name-style="western"><surname>Ramakrishnan</surname><given-names>R</given-names> </name><name name-style="western"><surname>Livny</surname><given-names>M</given-names> </name></person-group><article-title>BIRCH: an efficient data clustering method for very large databases</article-title><source>ACM SIGMOD Rec</source><year>1996</year><volume>25</volume><issue>2</issue><fpage>103</fpage><lpage>114</lpage><pub-id pub-id-type="doi">10.1145/235968.233324</pub-id></nlm-citation></ref><ref id="ref39"><label>39</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Ankerst</surname><given-names>M</given-names> </name><name name-style="western"><surname>Breunig</surname><given-names>MM</given-names> </name><name name-style="western"><surname>Kriegel</surname><given-names>HP</given-names> </name><name name-style="western"><surname>Sander</surname><given-names>J</given-names> </name></person-group><article-title>OPTICS: ordering points to identify the clustering structure</article-title><source>ACM SIGMOD Record</source><volume>28</volume><issue>2</issue><fpage>49</fpage><lpage>60</lpage><pub-id pub-id-type="doi">10.1145/304182.304187</pub-id></nlm-citation></ref><ref id="ref40"><label>40</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>von Luxburg</surname><given-names>U</given-names> </name></person-group><article-title>A tutorial on spectral clustering</article-title><source>Stat Comput</source><year>2007</year><month>12</month><volume>17</volume><issue>4</issue><fpage>395</fpage><lpage>416</lpage><pub-id pub-id-type="doi">10.1007/s11222-007-9033-z</pub-id></nlm-citation></ref><ref id="ref41"><label>41</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Rousseeuw</surname><given-names>PJ</given-names> </name></person-group><article-title>Silhouettes: a graphical aid to the interpretation and validation of cluster analysis</article-title><source>J Comput Appl Math</source><year>1987</year><month>11</month><volume>20</volume><fpage>53</fpage><lpage>65</lpage><pub-id pub-id-type="doi">10.1016/0377-0427(87)90125-7</pub-id></nlm-citation></ref><ref id="ref42"><label>42</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Cali&#x0144;ski</surname><given-names>T</given-names> </name><name name-style="western"><surname>Harabasz</surname><given-names>J</given-names> </name></person-group><article-title>A dendrite method for cluster analysis</article-title><source>Communications in Statistics</source><year>1974</year><month>01</month><volume>3</volume><issue>1</issue><fpage>1</fpage><lpage>27</lpage><pub-id pub-id-type="doi">10.1080/03610927408827101</pub-id></nlm-citation></ref><ref id="ref43"><label>43</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Davies</surname><given-names>DL</given-names> </name><name name-style="western"><surname>Bouldin</surname><given-names>DW</given-names> </name></person-group><article-title>A cluster separation measure</article-title><source>IEEE Trans Pattern Anal Mach Intell</source><year>1979</year><month>02</month><volume>1</volume><issue>2</issue><fpage>224</fpage><lpage>227</lpage><pub-id pub-id-type="doi">10.1109/TPAMI.1979.4766909</pub-id><pub-id pub-id-type="medline">21868852</pub-id></nlm-citation></ref><ref id="ref44"><label>44</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Salton</surname><given-names>G</given-names> </name><name name-style="western"><surname>Buckley</surname><given-names>C</given-names> </name></person-group><article-title>Term-weighting approaches in automatic text retrieval</article-title><source>Inf Process Manag</source><year>1988</year><month>01</month><volume>24</volume><issue>5</issue><fpage>513</fpage><lpage>523</lpage><pub-id pub-id-type="doi">10.1016/0306-4573(88)90021-0</pub-id></nlm-citation></ref><ref id="ref45"><label>45</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Robertson</surname><given-names>S</given-names> </name><name name-style="western"><surname>Zaragoza</surname><given-names>H</given-names> </name></person-group><article-title>The probabilistic relevance framework: BM25 and beyond</article-title><source>Found Trends Inf Retr</source><year>2009</year><month>09</month><day>17</day><volume>4</volume><issue>1-2</issue><fpage>1</fpage><lpage>174</lpage><pub-id pub-id-type="doi">10.1561/1500000019</pub-id></nlm-citation></ref><ref id="ref46"><label>46</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Cer</surname><given-names>D</given-names> </name><name name-style="western"><surname>Yang</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Kong</surname><given-names>SY</given-names> </name></person-group><article-title>Universal sentence encoder for English</article-title><source>Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations</source><year>2018</year><access-date>2026-10-08</access-date><fpage>169</fpage><lpage>174</lpage><comment><ext-link ext-link-type="uri" xlink:href="http://aclweb.org/anthology/D18-2">http://aclweb.org/anthology/D18-2</ext-link></comment><pub-id pub-id-type="doi">10.18653/v1/D18-2029</pub-id></nlm-citation></ref><ref id="ref47"><label>47</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Mikolov</surname><given-names>T</given-names> </name><name name-style="western"><surname>Sutskever</surname><given-names>I</given-names> </name><name name-style="western"><surname>Chen</surname><given-names>K</given-names> </name><name name-style="western"><surname>Corrado</surname><given-names>GS</given-names> </name><name name-style="western"><surname>Dean</surname><given-names>J</given-names> </name></person-group><article-title>Distributed representations of words and phrases and their compositionality</article-title><source>Adv Neural Inf Process Syst</source><year>2013</year><volume>26</volume><fpage>3111</fpage><lpage>3119</lpage></nlm-citation></ref><ref id="ref48"><label>48</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Gunawan</surname><given-names>D</given-names> </name><name name-style="western"><surname>Sembiring</surname><given-names>CA</given-names> </name><name name-style="western"><surname>Budiman</surname><given-names>MA</given-names> </name></person-group><article-title>The implementation of cosine similarity to calculate text relevance between two documents</article-title><source>J Phys: Conf Ser</source><year>2018</year><month>03</month><day>1</day><volume>978</volume><issue>1</issue><fpage>012120</fpage><pub-id pub-id-type="doi">10.1088/1742-6596/978/1/012120</pub-id></nlm-citation></ref><ref id="ref49"><label>49</label><nlm-citation citation-type="book"><person-group person-group-type="author"><name name-style="western"><surname>Cormack</surname><given-names>GV</given-names> </name><name name-style="western"><surname>Clarke</surname><given-names>CLA</given-names> </name><name name-style="western"><surname>Buettcher</surname><given-names>S</given-names> </name></person-group><article-title>Reciprocal rank fusion outperforms condorcet and individual rank learning methods</article-title><source>SIGIR &#x2019;09: The 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval</source><year>2009</year><fpage>758</fpage><lpage>759</lpage><pub-id pub-id-type="doi">10.1145/1571941.1572114</pub-id><pub-id pub-id-type="other">978-1-60558-483-6</pub-id></nlm-citation></ref><ref id="ref50"><label>50</label><nlm-citation citation-type="web"><article-title>GPT-4o system card</article-title><source>OpenAI</source><year>2024</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://openai.com/index/gpt-4o-system-card">https://openai.com/index/gpt-4o-system-card</ext-link></comment></nlm-citation></ref><ref id="ref51"><label>51</label><nlm-citation citation-type="web"><article-title>meta-llama/Llama-3.3-70B-Instruct</article-title><source>Hugging Face</source><year>2024</year><access-date>2026-09-14</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct">https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct</ext-link></comment></nlm-citation></ref><ref id="ref52"><label>52</label><nlm-citation citation-type="web"><person-group person-group-type="author"><name name-style="western"><surname>Johnson</surname><given-names>AEW</given-names> </name><name name-style="western"><surname>Bulgarelli</surname><given-names>L</given-names> </name><name name-style="western"><surname>Pollard</surname><given-names>TJ</given-names> </name><name name-style="western"><surname>Horng</surname><given-names>S</given-names> </name><name name-style="western"><surname>Celi</surname><given-names>LA</given-names> </name><name name-style="western"><surname>Demo</surname><given-names>M</given-names> </name></person-group><article-title>MIMIC-IV clinical database demo. version 2.2</article-title><source>PhysioNet</source><year>2023</year><access-date>2026-10-08</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://physionet.org/content/mimic-iv-demo/2.2">https://physionet.org/content/mimic-iv-demo/2.2</ext-link></comment></nlm-citation></ref><ref id="ref53"><label>53</label><nlm-citation citation-type="web"><article-title>alvumu / InteroperabilityFHRIAPI</article-title><source>GitHub</source><access-date>2026-09-22</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://github.com/alvumu/InteroperabilityFHIRAPI">https://github.com/alvumu/InteroperabilityFHIRAPI</ext-link></comment></nlm-citation></ref></ref-list><app-group><supplementary-material id="app1"><label>Multimedia Appendix 1</label><p>Release 4 to Release 5 adaptations affecting the reference mappings included in the evaluation.</p><media xlink:href="medinform_v14i1e100368_app1.docx" xlink:title="DOCX File, 29 KB"/></supplementary-material><supplementary-material id="app2"><label>Multimedia Appendix 2</label><p>Initial 119 MIMIC-IV data elements and rationale for selection in the final FHIR mapping evaluation set.</p><media xlink:href="medinform_v14i1e100368_app2.docx" xlink:title="DOCX File, 46 KB"/></supplementary-material><supplementary-material id="app3"><label>Multimedia Appendix 3 </label><p>Original MIMIC-IV descriptions vs LLM-enriched descriptions.</p><media xlink:href="medinform_v14i1e100368_app3.docx" xlink:title="DOCX File, 43 KB"/></supplementary-material><supplementary-material id="app4"><label>Multimedia Appendix 4 </label><p>Experiment configurations.</p><media xlink:href="medinform_v14i1e100368_app4.docx" xlink:title="DOCX File, 30 KB"/></supplementary-material><supplementary-material id="app5"><label>Multimedia Appendix 5 </label><p>Prompting template.</p><media xlink:href="medinform_v14i1e100368_app5.docx" xlink:title="DOCX File, 28 KB"/></supplementary-material><supplementary-material id="app6"><label>Multimedia Appendix 6 </label><p>User-input template.</p><media xlink:href="medinform_v14i1e100368_app6.docx" xlink:title="DOCX File, 27 KB"/></supplementary-material><supplementary-material id="app7"><label>Multimedia Appendix 7 </label><p>Self-reflection prompt.</p><media xlink:href="medinform_v14i1e100368_app7.docx" xlink:title="DOCX File, 27 KB"/></supplementary-material><supplementary-material id="app8"><label>Multimedia Appendix 8 </label><p>MoP: Mixture of prompts.</p><media xlink:href="medinform_v14i1e100368_app8.docx" xlink:title="DOCX File, 30 KB"/></supplementary-material><supplementary-material id="app9"><label>Multimedia Appendix 9 </label><p>Serial prompting configurations.</p><media xlink:href="medinform_v14i1e100368_app9.docx" xlink:title="DOCX File, 28 KB"/></supplementary-material></app-group></back></article>