HealthRecordCommunity
FHIRSNOMED CTLOINC🌏 InternationalπŸ› InterSystemsEnriched

FHIR SQL Agent: Natural Language Querying for Clinical Cohorts

fhirsqlAgent - InterSystems Open Exchange

November 2, 2026InterSystems

Summary

The FHIR SQL Agent, built on InterSystems IRIS for Health, enables users to ask clinical questions in natural language. By integrating vector search and explicit terminology resolution, the agent solves the problem of unreliable code recall and achieves accurate clinical data extraction.

Details

This agent is based on a FHIR R4 repository and accepts clinical questions in English. To solve the problem where traditional models fail to recall codes, terminology resolution is integrated as an explicit and traceable pipeline stage. The pipeline features a multi-stage structure: LLM extraction, SapBERT embedding, vector search (HNSW/VECTOR_COSINE), reranking, and final SQL execution via SqlGuard. This design prevents models from inventing codes. This precision is critical for clinical quality indicators; for example, the accurate resolution of cohorts can move a reported quality indicator from 65.6% to 52.8%. The architecture leverages IRIS to provide a FHIR R4 repository, a flat SQL target, and a durable, traceable 'Interoperability production' for every step.

πŸ“°
Read Original Article
openexchange.intersystems.com
β†’

Original content copyright by respective publishers