Multi-model Β· Stage 1 Biomedical NER β†’ Stage 2 SapBERT UMLS Concept Linking

Biomedical NER β†’ SapBERT Clinical Entity Linking

End-to-end zero-server clinical coding in the browser: Stage 1 onnx-community/biomedical-ner-all-ONNX (67.00 MB ONNX / 67.72 MB total q8 WASM, reusing ../../biomedical-ner/worker.js) tags clinical mentions in unstructured notes, then Stage 2 Xenova/SapBERT-from-PubMedBERT-fulltext (110.79 MB q8 WASM) links every extracted mention to canonical UMLS CUIs via 768-d [CLS] embeddings.

1. Load Both Stages (~177.09 MB weights Β· 178.51 MB first visit)

Stage 1 Β· Biomedical NER (67.00 MB ONNX Β· Apache-2.0)

Stage 2 Β· SapBERT-from-PubMedBERT-fulltext (110.79 MB Β· Apache-2.0)

Initialise Stage 1 (Biomedical NER) and Stage 2 (SapBERT) above to extract and link clinical concepts.

2. Extract Clinical Spans (Stage 1) β†’ Link to UMLS CUIs (Stage 2)

Stage 1 Β· Extracted Biomedical NER Spans

Load Stage 1 to extract diseases, symptoms, medications, and procedures.

Run Stage 1 to highlight clinical entity spans inline.

Stage 1 NER vs Stage 2 SapBERT UMLS Confidence

Stage 2 Β· Linked UMLS Concepts Table

Two-stage Biomedical NER extraction and SapBERT UMLS CUI concept linking
ID Extracted Mention NER Type Top-1 UMLS CUI & Term Cosine Margin Verdict
Run both stages above to populate UMLS entity links.

Show the Code

Show the code: Reused Stage 1 Biomedical NER worker (biomedical-ner/worker.js)
Show the code: Span deduplication & UMLS link verdict logic (sapbert-core.mjs)