mapping-to-snomed
What it does
This skill maps clinical findings, procedures and body sites to SNOMED CT concepts, a detailed clinical terminology. It uses a terminology server that you supply and are licensed to use, since SNOMED CT is restricted. It is for teams needing precise clinical codes.
When to use it
- βWhen you need detailed SNOMED CT codes for findings, disorders, procedures or body sites.
- βWhen an existing code such as ICD-10 must be translated to SNOMED CT.
- βWhen you need hierarchy-aware queries across clinical concepts.
Skill link
https://github.com/maziyarpanahi/openmed/blob/master/skills/mapping-to-snomed/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βMap the findings in this note to SNOMED CT codes using our hospital's terminology server.β
5 new skills a week. 1 minute to read.
How it works
The agent sends each span to your own terminology server, selects the matching concept with its identifier, and returns only the codes for your records.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Mapping OpenMed spans to SNOMED CT
Ground clinical concept spans that OpenMed extracts β disorders, findings, procedures, body structures, substances β to SNOMED CT, the comprehensive clinical reference terminology. The atom is the SCTID (a SNOMED CT concept identifier), organized into a description-logic hierarchy you can query with ECL (Expression Constraint Language).
Hard licensing boundary β read first. SNOMED CT is license-restricted. OpenMed and this skill never bundle, ship, cache, or redistribute any SNOMED CT content. All mapping happens out-of-process against a terminology server the user supplies and is licensed for β their own Ontoserver, Snowstorm, the NLM's UTS/UMLS FHIR endpoint, or a national release server. SNOMED International requires an Affiliate License (free in member territories like the US via the NLM; check your country). Your code receives a base URL + credentials from the user; it must work with any compliant FHIR terminology server and store nothing but the returned codes.
When to use
- You need rich, hierarchy-aware clinical codes (more granular than ICD-10) for problems, procedures, or body sites.
- You want to translate an existing code (ICD-10-CM, local code) to SNOMED CT
via a
ConceptMap/$translate. - You need subsumption/ECL queries ("is this a descendant of Diabetes mellitus?") for cohorting or decision support.
For billing codes use coding-icd10; for drugs normalizing-rxnorm; for labs
mapping-loinc. SNOMED CT is the clinical-meaning layer.
Quick start (user-supplied FHIR terminology server)
Configuration is injected, never hardcoded. The operations are standard FHIR R4.
import os, requests
# Provided by the USER β their licensed server. Nothing bundled.
TX = os.environ["FHIR_TX_URL"] # e.g. https://snowstorm.example.org/fhir
TOKEN = os.environ.get("FHIR_TX_TOKEN") # if the server requires auth
SNOMED = "http://snomed.info/sct"
HDRS = {"Accept": "application/fhir+json"}
if TOKEN:
HDRS["Authorization"] = f"Bearer {TOKEN}"
def lookup(code: str) -> dict:
"""$lookup: fully specified name + properties for an SCTID."""
r = requests.get(f"{TX}/CodeSystem/$lookup",
params={"system": SNOMED, "code": code},
headers=HDRS, timeout=15)
r.raise_for_status()
return r.json()
def find_concepts(text: str, ecl: str = "<<404684003", count: int = 10):
"""Text search constrained by ECL (default: descendants of Clinical finding)."""
vs = f"{SNOMED}?fhir_vs=ecl/{ecl}"
r = requests.get(f"{TX}/ValueSet/$expand",
params={"url": vs, "filter": text, "count": count},
headers=HDRS, timeout=20)
r.raise_for_status()
return r.json().get("expansion", {}).get("contains", [])
def translate(code: str, source_system: str, conceptmap_url: str):
"""$translate an existing code to SNOMED CT via a ConceptMap."""
r = requests.get(f"{TX}/ConceptMap/$translate",
params={"url": conceptmap_url, "system": source_system,
"code": code, "targetsystem": SNOMED},
headers=HDRS, timeout=20)
r.raise_for_status()
return r.json()
# ECL examples: 64572001=disease, 71388002=procedure, 123037004=body structure
print(find_concepts("type 2 diabetes", ecl="<<64572001"))
Workflow
- Extract spans with OpenMed (Disease, Anatomy, Pharmaceutical models).
- Pick a semantic constraint (ECL) from the OpenMed label so you search the
right hierarchy: disorder span β
<<64572001; anatomy span β<<123037004; substance/drug β<<105590001; procedure β<<71388002. - Search with
ValueSet/$expand?filter=<span>under that ECL. - Rank & disambiguate by display match and confidence; prefer the most specific concept whose meaning is fully entailed by the text (do not over-code).
- Validate with
$validate-code;$lookupto capture the FSN and any needed properties. - Translate instead of searching when you already hold an ICD-10/local code
and the user's server has the relevant
ConceptMap. - Emit
{system: "http://snomed.info/sct", code, display}β the SCTID plus the OpenMed source offsets for traceability.
Hand-off from OpenMed
openmed.analyze_text(..., output_format="dict") returns entities, each a dict
with text, label, confidence, `sta
FAQ
Does the skill include SNOMED CT content?
No. It never bundles or stores SNOMED CT, so you connect your own licensed server.
What kinds of servers work?
Any compliant FHIR terminology server you can access, such as Ontoserver or Snowstorm.
Can it run hierarchy queries?
Yes. It covers ECL queries and checks of parent and child concepts.
Details
Original description by the author
Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL query, translate via a ConceptMap, or resolve a span to a concept id with FHIR $lookup/$translate/$validate-code. Trigger keywords: SNOMED CT, SNOMED concept id, ECL, ConceptMap, $translate, $lookup, Ontoserver, Snowstorm, SCTID, post-coordination, terminology server. Pairs after Ope
repo: maziyarpanahi/openmed
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14712
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
annotating-variants
5.8kHelps your agent predict what a genetic variant does, convert HGVS names to genome positions and attach population frequencies, using free public annotators.
ask-openmed
5.8kHelps your agent pick the right OpenMed workflow for a clinical text request, starting with a privacy check whenever patient data may be present.
assembling-fhir-bundles
5.8kPackages several FHIR health records into one transaction Bundle ready to send to an EHR, with the internal references linked correctly.
auditing-deid-leakage
5.8kScans de-identified clinical text for leftover identifiers such as SSNs, card numbers, emails and dates, and blocks release if any remain.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.