#rag#llm #umls#dicom #fhir#pgvector #ios#swift #postgresql#clinical-informatics
Raidho logo

Raidho

Retrieval-Augmented Generation ecosystem built on adaptive LLM and embedding of terminology sets from vocabulary provider backends including NIH UMLS and DICOM Concept Groups and Templates (DCMR)

PlatformiOS · macOS · Ubuntu backend
LanguageSwift · Python · TypeScript
DatabasePostgreSQL + pgvector (HNSW)
StandardsDICOM (Part 16, DCMR) · HL7 FHIR (Diagnostic Module, Report)
EmbeddingBAAI/bge-base-en-v1.5 · 768-dim
LLM BackendClaude API (Anthropic) · Qwen (ollama)
SourceClosed Source, Unpublished Work
User Interface
Query Code

Query Code

Select Code

Select Code

Edit Report

Edit Report

Configure Corpus

Settings


Abstract

Raidho is an application system for generating clinical seed reports aligned with the HL7 FHIR Diagnostic Module, grounded by a Retrieval-Augmented Generation backend that fetches and embeds medical vocabularies from authoritative reference sources.

The primary use case is terminology and concept lookup — resolving natural language clinical terms to standard codes (ICD-10-CM, SNOMED CT, RxNorm, LOINC, CPT), exploring concept hierarchies, and augmenting LLM-generated clinical text with citable, source-attributed medical codes.

The name Raidho is based on the Norse Runic character R, carrying meanings of Ride, Movement, Growth, Search — pronounced "Radio" in the context of this project.

Corpus Architecture

One PostgreSQL database with two dedicated schemas: a primary raidho_substrate for NIH UMLS concepts and a secondary antenna_rag sharding DICOM DCMR code concepts and templates. Both share the same 768-dimensional vector space enabling cross-schema similarity queries.

   ______            ______
  /      \          /      \
 /        \        /        \
/   NIH    \______/   DICOM  \
\   UMLS          \   DCMR   /
 \                 \        /
  \______   corpus  \______/
         \          /
          \        /
           \______/

Embedding Model

BAAI/bge-base-en-v1.5 — BERT-base encoder (Beijing Academy of AI General Embeddings), 768-dimensional output. Cosine similarity distance metric; normalize_embeddings=True so vectors are unit-length and cosine reduces to a dot product, compatible with pgvector's HNSW <=> operator. Appears as BertModel LOAD REPORT from: BAAI/bge-base-en-v1.5 in server output on first request; subsequent requests reuse the in-process singleton.

Query Latency

ModeLatencyNotes
Local Corpus, KNN onlyLess than a second per termHNSW lookup once model warm; first-request cold-start ~1–2 s on M3 Pro
UMLS via backend60–100 seconds per termUMLS REST API called once per search hit for atoms, relations — synchronous. Best for deliberate seeding, not live search

Backend Component Node: RAG Corpus

The user can configure the system to query the NIH UMLS directly and only - as per screens above. Alternatively, a RAG Corpus can be built up, sourced from coding scheme results passed through embedding and saved in a PostgreSQL database. The blueprint is illustrated below.

                        ┌─────────────────────────────────────────┐
┌──────────────────────▷│          RAIDHO SUBSTRATE API           │
│                       └─────────────────────────────────────────┘
│                              │                  │              │
│                              ▼                  ▼              ▼
│              ┌───────────────────┐  ┌─────────────────┐    ┌───────────────┐
│       ┌──────│ UMLS Concept      │  │  RAG Pipeline   ├─┐  │ Refine Engine │
│       │      │ Resolver          │  └─────────────────┘ │  └───────────────┘
│       ▼      └───────────────────┘        │             ▼                │
│  ┌──────────────┐                         ▼    ┌─────────────────┐       │
│  │ UMLS API     │        ┌──────────────────┐  │ Context Builder │       │
│  │ Client       │        │ Provenance Mapper│  └─────────────────┘       │
│  └──────────────┘        └──────────────────┘              │             │
│        │                          │                        ▼             │
│        ▼                          │             ┌──────────────────┐     │
│  ┌──────────────┐                 │             │ LLM Backend      │     │
│  │ NIH UMLS     │                 │             │ (Claude / Qwen)  │     │
│  │ REST API     │                 ▼             └──────────────────┘     │
│  └──────────────┘   ┌──────────────────────────────────────────────┐     │
│                     │              Embedding Layer                 │◁────┘
│                     └──────────────────────────────────────────────┘
│                                   │
│                                   ▼
└──────────────────▶ ┌──────────────────────────┐
                     │      Session Layer       │
                     └──────────────────────────┘
                                   │
                                   ▼
                     ┌──────────────────────────┐
                     │    Data Persistence      │
                     │ [PostgreSQL + pgvector]  │
                     └──────────────────────────┘
The LLM Backend node is pluggable — supports Claude API (Anthropic) or Qwen via ollama.

Vocabulary Coverage

SourceAbbreviationURI
SNOMED CT (US)SNOMEDCT_UShttp://snomed.info/sct
ICD-10-CMICD10CMhttp://hl7.org/fhir/sid/icd-10-cm
LOINCLNChttp://loinc.org
RxNormRXNORMhttp://www.nlm.nih.gov/research/umls/rxnorm
MeSHMSHhttp://www.nlm.nih.gov/mesh

DICOM DCMR Coverage

There was a selective chunk, ingest and embed cycle based on DICOM Standard parts PS3.3, PS3.4, PS3.5, PS3.6, and PS3.16 (DCMR). Content was parsed via BeautifulSoup from structured HTML/CHTML — not PDF. DCMR Context Groups serve as starter sets, enabling bridged queries against NIH UMLS fetched results.


Torro: Data Radiator: HL7 Generator and FHIR Receiver

The Torro Data Radiator is a medical informatics test fixture with both HL7 and FHIR workflow features, native macOS but coordinates Python nodes for the heavy lifting.

On the leading edges of the workflow, the radiator coordinates the generation of HL7 messages such as ADT, ORM, ORU, etc. - driving an external Python utility.

For the trailing edge of the workflow, coordination is done with a backend FHIR endpoint component node that can receive and save FHIR resource instances such as Diagnostic Report. The endpoint can also return resource instances when queried. The Python endpoint for the FHIR receiver is the data sink that receives report instances generated by the Raidho reporting vertical iOS mobile application.

The data flow path and steps for the trailing edge of the workflow are illustrated below. Note that the Raidhoreporting vertical mobile application could extend to source Service Requestsas products of upstream ADT and ORM/ORU messages to set Encounter contexts.

Raidho → FHIR Diagnostic Report → FHIR Receiver → Torro Data Radiator (HL7 V2.5.1 OR FHIR R4)


HL7 | FHIR Backend
Torro

NOTE: The origin of the name Torro is from the Latin word for roast, toast or burn - a riff on FHIR terminology.


References