Source profileQuality 93/100

maziyarpanahi/openmed/skills/mapping-to-snomed/SKILL.md

mapping-to-snomed

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, $tran

Source repository stars
4,847
Declared platforms
0
Static risk flags
1
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

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 hierarc…

Best for

  • You need rich, hierarchy-aware clinical codes (more granular than ICD-10) for
  • You want to translate an existing code (ICD-10-CM, local code) to SNOMED CT
  • You need subsumption/ECL queries ("is this a descendant of Diabetes

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/maziyarpanahi/openmed --skill "skills/mapping-to-snomed"
Safe inspection promptEditorial

Inspect the Agent Skill "mapping-to-snomed" from https://github.com/maziyarpanahi/openmed/blob/e412ae8f3b04ae79b13663d34a422efc22109a3a/skills/mapping-to-snomed/SKILL.md at commit e412ae8f3b04ae79b13663d34a422efc22109a3a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Quick start (user-supplied FHIR terminology server)

    Configuration is injected, never hardcoded. The operations are standard FHIR R4.

    Configuration is injected, never hardcoded. The operations are standard FHIR R4.python import os, requests
  2. 02

    ECL examples: 64572001=disease, 71388002=procedure, 123037004=body structure

    print(findconcepts("type 2 diabetes", ecl="<<64572001")) python import openmed

    Never bundle SNOMED CT. Do not vendor a release, embed an export, or cacheAffiliate licensing. Confirm the user holds (or their territory grants) aPre- vs post-coordination. Some clinical meanings need a post-coordinated
  3. 03

    Workflow

    1. Extract spans with OpenMed (Disease, Anatomy, Pharmaceutical models). 2. Pick a semantic constraint (ECL) from the OpenMed label so you search the right hierarchy: disorder span → under that ECL. 4. Rank & disambiguate by display match and confidence; prefer the most specific…

    Extract spans with OpenMed (Disease, Anatomy, Pharmaceutical models).Pick a semantic constraint (ECL) from the OpenMed label so you search theSearch with ValueSet/$expand?filter= under that ECL.
  4. 04

    When to use

    For billing codes use coding-icd10; for drugs normalizing-rxnorm; for labs mapping-loinc. SNOMED CT is the clinical-meaning layer.

    You need rich, hierarchy-aware clinical codes (more granular than ICD-10) forYou want to translate an existing code (ICD-10-CM, local code) to SNOMED CTYou need subsumption/ECL queries ("is this a descendant of Diabetes
  5. 05

    Provided by the USER — their licensed server. Nothing bundled.

    TX = os.environ["FHIRTXURL"] e.g. https://snowstorm.example.org/fhir TOKEN = os.environ.get("FHIRTXTOKEN") if the server requires auth SNOMED = "http://snomed.info/sct" HDRS = {"Accept": "application/fhir+json"} if TOKEN: HDRS["Authorization"] = f"Bearer {TOKEN}"

    TX = os.environ["FHIRTXURL"] e.g. https://snowstorm.example.org/fhir TOKEN = os.environ.get("FHIRTXTOKEN") if the server requires auth SNOMED = "http://snomed.info/sct" HDRS = {"Accept": "application/fhir+json"} if TOKE…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.raiseforstat…def findconcepts(text: str, ecl: str = "<<404684003", count: int = 10): """Text search constrained by ECL (default: descendants of Clinical finding).""" vs = f"{SNOMED}?fhirvs=ecl/{ecl}" r = requests.get(f"{TX}/ValueSet…

Permission review

Static risk signals and limitations

Network access

medium · line 40

The documentation includes network, browsing, or remote request actions.

TX = os.environ["FHIR_TX_URL"] # e.g. https://snowstorm.example.org/fhir

Network access

medium · line 42

The documentation includes network, browsing, or remote request actions.

SNOMED = "http://snomed.info/sct"

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars4,847SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
maziyarpanahi/openmed
Skill path
skills/mapping-to-snomed/SKILL.md
Commit
e412ae8f3b04ae79b13663d34a422efc22109a3a
License
Apache-2.0
Collected
2026-08-04
Default branch
master
View the original SKILL.md

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

  1. Extract spans with OpenMed (Disease, Anatomy, Pharmaceutical models).
  2. 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.
  3. Search with ValueSet/$expand?filter=<span> under that ECL.
  4. Rank & disambiguate by display match and confidence; prefer the most specific concept whose meaning is fully entailed by the text (do not over-code).
  5. Validate with $validate-code; $lookup to capture the FSN and any needed properties.
  6. Translate instead of searching when you already hold an ICD-10/local code and the user's server has the relevant ConceptMap.
  7. 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, start, end. Route each label to an ECL hierarchy and map out-of-process:

import openmed

note = "Assessment: type 2 diabetes mellitus with diabetic nephropathy."
result = openmed.analyze_text(
    note,
    model_name="disease_detection_superclinical",   # Disease category
    output_format="dict",
)

ECL_FOR_LABEL = {
    "DISEASE":   "<<64572001",     # | Disease |
    "CONDITION": "<<64572001",
    "PATHOLOGY": "<<64572001",
    "ANATOMY":   "<<123037004",    # | Body structure |
    "ORGAN":     "<<123037004",
}

for ent in result["entities"]:
    ecl = ECL_FOR_LABEL.get(ent["label"], "<<404684003")  # fallback: Clinical finding
    candidates = find_concepts(ent["text"], ecl=ecl, count=5)
    print(ent["text"], ent["start"], ent["end"], "->",
          [(c["code"], c["display"]) for c in candidates[:3]])

Carry OpenMed's start/end offsets next to each SCTID so every code is auditable back to its span. Persist codes and offsets only — never the raw note, and never a local copy of SNOMED content.

Edge cases & gotchas

  • Never bundle SNOMED CT. Do not vendor a release, embed an export, or cache descriptions to disk for reuse. If you find yourself shipping SNOMED data, stop — the design must call the user's licensed server live, out-of-process.
  • Affiliate licensing. Confirm the user holds (or their territory grants) a SNOMED International Affiliate License. In the US it is free via the NLM/UMLS; elsewhere it varies. Surface this requirement; do not assume entitlement.
  • Pre- vs post-coordination. Some clinical meanings need a post-coordinated expression (e.g. finding + body site + severity). Prefer a single pre-coordinated concept when one exists; only post-coordinate when your server and downstream systems support SNOMED CT expressions.
  • Edition/version drift. SCTIDs are stable but content differs across editions (International vs US vs UK) and monthly releases. Record the edition the server reports; do not mix codes across editions silently.
  • Negation/uncertainty stays in OpenMed. A span "no evidence of pneumonia" must not be coded as present pneumonia. Resolve assertion/negation with OpenMed's clinical-context layer before mapping.
  • Don't over-specify. Map to the concept actually supported by the text; inventing severity or laterality the note never stated is a coding error.
  • Local-first. OpenMed NER runs on-device; only de-identified concept strings reach the terminology server. No PHI over the wire.

Standards & references

Alternatives

Compare before choosing

Computed 9438,473

wshobson/agents

brand-landingpage

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens —

Computed 9482

aAAaqwq/AGI-Super-Team

figma-implement-design

Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "implement design", "generate code", "implement component", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.

Computed 936

mgiovani/cc-arsenal

ci-local

Run the checks a GitHub Actions workflow would run, locally, when Actions is unavailable or out of quota. Parses .github/workflows/*.yml, extracts the jobs/steps that gate merges (lint, typecheck, test, build), translates them to local commands respecting the workflow's pinned node/python versions and env, executes them sequentially, and reports a parity table of what passed locally vs. what can't be replicated (service containers, secrets, matrix dimensions) and why. Activates on "CI quota", "A

Computed 8747,525

prisma/prisma

record-upgrade-instructions

Record upgrade instructions alongside a Prisma Next breaking-change PR, so downstream consumers (users of `@internal/*` and authors of Prisma Next extensions) can apply the matching code translation automatically via the published upgrade skills. Use when you have refactored framework code and the test suite went red in `examples/` or `packages/3-extensions/`, when you fixed those red tests by editing the substrate, when you are told to "record upgrade instructions for this PR", or when you made