Agent skill

Querying Terminology Service

by maziyarpanahi in maziyarpanahi/openmed

Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC…

Apache-2.0Auto-check passedResearch & Science

Install Querying Terminology Service

skills CLI
$ npx skills add maziyarpanahi/openmed --skill querying-terminology-service -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install maziyarpanahi/openmed querying-terminology-service --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/querying-terminology-service .claude/skills/querying-terminology-service && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
querying-terminology-service
GitHub stars
5.5k
Token cost
~1.9k tokens
SKILL.md length
499 words
Files
1
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC…

  • Mentions terminology server
  • SKILL.md covers When to use, Bring your own server, The four operations and A thin client used by the…, plus 3 more sections
  • Calls curl; reaches hl7.org and snomed.info
  • SNOMED/RxNorm/LOINC lookups

What it does

Querying Terminology Service is an agent skill from maziyarpanahi/openmed. Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC, ICD-10) into OpenMed. Covers a thin local client, ValueSet $expand with filters/ECL, CodeSystem $lookup, ConceptMap $translate, and pointing at Ontoserver / HAPI / tx.fhir.org. Use as the grounding step for OpenMed coding skills — turn an OpenMed entity span into a validated coded CodeableConcept — when the user mentions…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Clinical and healthcare research. The repository describes itself as: Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android… The licence is Apache-2.0.

When your agent uses it

  • Mentions terminology server
  • SNOMED/RxNorm/LOINC lookups
  • Code validation

Example prompts

  • “/querying-terminology-service”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • hl7.org
    • snomed.info

    Also links to:

    • confluence.ihtsdotools.org
    • ontoserver.csiro.au

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Querying Terminology Service loads about 1.9k tokens when it runs. Until then it costs about 168 tokens; SKILL.md has 499 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~168
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 499 words, ~1,933 tokens.

Download SKILL.mdSave it as .claude/skills/querying-terminology-service/SKILL.md (or your agent's skills folder).
name
querying-terminology-service
description
Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC, ICD-10) into OpenMed. Covers a thin local client, ValueSet $expand with filters/ECL, CodeSystem $lookup, ConceptMap $translate, and pointing at Ontoserver / HAPI / tx.fhir.org. Use as the grounding step for OpenMed coding skills — turn an OpenMed entity span into a validated coded CodeableConcept — when the user mentions terminology server, $validate-code, $expand, ValueSet, ECL, SNOMED/RxNorm/LOINC lookups, or code validation. Pairs adjacent.
license
Apache-2.0
metadata.project
OpenMed
metadata.category
fhir-interop
metadata.pairs
adjacent
metadata.version
1.0

Querying a Terminology Service

OpenMed deliberately bundles no restricted vocabulary — no SNOMED CT, RxNorm, LOINC, ICD-10, UMLS. So when an OpenMed entity span needs a validated code (the grounding step exporting-to-fhir references), you call a FHIR terminology server the user already operates, with their own license. This skill is the thin client the coding skills lean on.

When to use

Use it whenever a span must become a coded CodeableConcept, when you need to confirm a code is valid in a system, expand a ValueSet for a picklist, look up a display, or map between vocabularies. Triggers: "terminology server", "$validate-code", "$expand", "ValueSet", "ECL", "is this a valid SNOMED/LOINC/ RxNorm code", "translate ICD-10 to SNOMED". It sits between OpenMed NER and exporting-to-fhir.

Bring your own server

The four operations are standard FHIR; point the client at whichever server the user is licensed for:

  • Ontoserver (CSIRO) — production SNOMED CT/LOINC, full ECL.
  • HAPI FHIR terminology module — self-hosted.
  • tx.fhir.org — HL7 public server (open content only; not for licensed SNOMED/full LOINC, and not for PHI).

OpenMed never ships or proxies these — the credentials and content are the user's.

The four operations

POST [tx]/CodeSystem/$validate-code   -> is this code valid in this system?
POST [tx]/ValueSet/$expand            -> enumerate the codes in a value set
POST [tx]/CodeSystem/$lookup          -> display + properties for a code
POST [tx]/ConceptMap/$translate       -> map a code from one system to another
$validate-code — confirm before you emit
bash
curl -s -X POST 'https://tx.example/fhir/CodeSystem/$validate-code' \
  -H 'Content-Type: application/fhir+json' -d '{
    "resourceType": "Parameters",
    "parameter": [
      {"name": "url",  "valueUri":  "http://snomed.info/sct"},
      {"name": "code", "valueCode": "44054006"},
      {"name": "display", "valueString": "Diabetes mellitus type 2"}
    ]}'
# -> Parameters: { result: true, display: "Diabetes mellitus type 2" }
$expand — enumerate a ValueSet (with ECL for SNOMED)
bash
# Expand "disorders of the lung" via an implicit SNOMED ECL value set
curl -s -X POST 'https://tx.example/fhir/ValueSet/$expand' \
  -H 'Content-Type: application/fhir+json' -d '{
    "resourceType": "Parameters",
    "parameter": [
      {"name": "url", "valueUri":
        "http://snomed.info/sct?fhir_vs=ecl/<<19829001"},
      {"name": "filter", "valueString": "pneumonia"},
      {"name": "count", "valueInteger": 20}
    ]}'

<<19829001 is ECL for "19829001 (Disorder of lung) or any subtype". Use $expand + filter to power autocomplete and to constrain which codes a span may map to.

$lookup and $translate
bash
# Display + properties for a LOINC code
POST [tx]/CodeSystem/$lookup  { url=http://loinc.org, code=4548-4 }

# Map an ICD-10-CM code to SNOMED via a ConceptMap
POST [tx]/ConceptMap/$translate {
  url=<conceptmap-url>, system=http://hl7.org/fhir/sid/icd-10-cm,
  code=E11.9, targetsystem=http://snomed.info/sct }

A thin client used by the coding skills

python
import requests

class TxClient:
    def __init__(self, base, token=None):
        self.base = base.rstrip("/")
        self.h = {"Content-Type": "application/fhir+json"}
        if token:
            self.h["Authorization"] = f"Bearer {token}"

    def _params(self, **kv):
        return {"resourceType": "Parameters",
                "parameter": [{"name": k, **v} for k, v in kv.items()]}

    def validate_code(self, system, code, display=None):
        body = self._params(url={"valueUri": system}, code={"valueCode": code},
                            **({"display": {"valueString": display}} if display else {}))
        out = requests.post(f"{self.base}/CodeSystem/$validate-code",
                            json=body, headers=self.h, timeout=15).json()
        params = {p["name"]: p for p in out.get("parameter", [])}
        return bool(params.get("result", {}).get("valueBoolean"))

# Ground an OpenMed span only if the code validates:
tx = TxClient("https://tx.example/fhir", token="...")
if tx.validate_code("http://snomed.info/sct", "44054006", "Diabetes mellitus type 2"):
    from openmed.clinical.exporters.codeable_concept_simple import coding, codeable_concept
    cc = codeable_concept([coding("snomed", "44054006",
                                  "Diabetes mellitus type 2")], text=span.text)

The system URIs here line up with OpenMed's system_uri (snomed/loinc/rxnorm/icd-10-cm/hpo/mesh), so a validated code drops straight into coding(...).

Hand-off to / from OpenMed

  • From OpenMed: an EntityPrediction.text (the span surface form) plus your candidate code(s) are the input to $validate-code/$translate.
  • To OpenMed: a validated (system, code, display) tuple → coding(...) → codeable_concept(...) (exporting-to-fhir). If a span fails validation, emit CodeableConcept with only text and flag it via OperationOutcomeIssue(severity="warning", code="code-invalid", ...).
  • No PHI to the server. You send codes and concept text, not patient notes. Never POST a clinical note or identifier to a terminology server.
Show full SKILL.md (171 more words)Show less

Edge cases & gotchas

  • Out-of-process by design. OpenMed does not call the server for you; this thin client runs alongside, with the user's credentials. Keep it that way.
  • Licensing is the user's. SNOMED CT / full LOINC / RxNorm require the right affiliate/license; tx.fhir.org only serves open content. Do not route licensed lookups through a public server.
  • $expand can be enormous. Always pass count (paginate with offset) and filter; an unfiltered expand of a large hierarchy can time out.
  • ECL is SNOMED-specific. Use it via the implicit value set http://snomed.info/sct?fhir_vs=ecl/<expression>; other systems use $expand with filter/property.
  • Cache validated codes. The mapping from a normalised span to a validated code is stable; cache it to cut latency and server load — cache the code, never the source note.
  • version matters. SNOMED/LOINC editions change; pin the version parameter for reproducible validation in CI.
  • No PHI to tx.fhir.org. It is a public service — only synthetic/coded data.

Standards & references

© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/querying-terminology-service of maziyarpanahi/openmed.

Open the folder on GitHubat commit 34d7b8c

Compare with similar skills

Querying Terminology Service next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Querying Terminology Service compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Querying Terminology Service this skillmaziyarpanahi/openmed5.5k—~1.9kAutomated safety check: PassApache-2.0
Clinical Trials Databasegoogle-deepmind/science-skills3.2k2 repos~3.2kAutomated safety check: PassApache-2.0
CHARLS Paper Reproduction Guidexjtulyc/MedgeClaw6171 repos~1.8kAutomated safety check: PassNone
Biomedical Analysis Dispatchxjtulyc/MedgeClaw6171 repos~2kAutomated safety check: PassNone
Research Paperluwill/research-skills862—~1.9kAutomated safety check: PassNone
Research Proposalluwill/research-skills862—~4.5kAutomated safety check: NotesNone

Similar skills

  • Clinical Trials Database

    google-deepmind/science-skills

    Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.

    3.2k GitHub starsUsed in 2 repos~3.2k tokens
    Research & ScienceAuto-check passed
  • Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.

    617 GitHub starsUsed in 1 repo~1.8k tokens
    Research & ScienceAuto-check passed
  • Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.

    617 GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Research Paper

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft an ORIGINAL RESEARCH ARTICLE — IMRaD paper, conference paper, short/workshop paper, 研究论文/期刊论文/会议论文 — reporting their own completed…

    862 GitHub stars~1.9k tokensUpdated today
    Research & ScienceAuto-check passed
  • Research Proposal

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft a PhD / doctoral research proposal, research plan, 研究计划书, or 开题报告 — a forward-looking plan of background, gap, research questions…

    862 GitHub stars~4.5k tokensUpdated today
    Research & ScienceAuto-check: notes
  • Medical Imaging Review

    LeonChaoX/qinyan-academic-skills

    Write comprehensive literature reviews for medical imaging AI research.

    944 GitHub starsUsed in 3 repos~1.1k tokens
    Research & ScienceAuto-check: notes

More from maziyarpanahi/openmed

All 74 skills in this repo
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • OpenMed Model Card Writer

    maziyarpanahi/openmed

    Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.

    5.5k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • ICD-10 Coding Assistant

    maziyarpanahi/openmed

    Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • OpenMed ETL to OMOP CDM

    maziyarpanahi/openmed

    Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Extracting SDOH and Z-Codes

    maziyarpanahi/openmed

    Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Querying Terminology Service

What does Querying Terminology Service do?

Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC…. Querying Terminology Service is an agent skill from maziyarpanahi/openmed. Call a user-supplied FHIR terminology server ($validate-code, $expand, $lookup, $translate) to validate and expand clinical codes without bundling restricted vocabulary (SNOMED CT, RxNorm, LOINC, ICD-10) into OpenMed.

When should I use Querying Terminology Service?

Querying Terminology Service fits situations like: mentions terminology server; SNOMED/RxNorm/LOINC lookups; code validation.

How do I install Querying Terminology Service in Claude Code?

Run `npx skills add maziyarpanahi/openmed --skill querying-terminology-service -a claude-code`. Or copy the skill folder (skills/querying-terminology-service in maziyarpanahi/openmed) into .claude/skills/querying-terminology-service in your project. Claude Code loads it when a task matches its description.

How do I install Querying Terminology Service in Codex?

Run `npx skills add maziyarpanahi/openmed --skill querying-terminology-service -a codex`. Or copy the skill folder (skills/querying-terminology-service in maziyarpanahi/openmed) into .agents/skills/querying-terminology-service in your project. Codex loads it when a task matches its description.

Can I use Querying Terminology Service in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill querying-terminology-service -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/querying-terminology-service, .gemini/skills/querying-terminology-service, .github/skills/querying-terminology-service and .opencode/skills/querying-terminology-service in your project.

What does Querying Terminology Service need to run?

Going by SKILL.md and its folder, Querying Terminology Service needs the command-line tools its instructions call (curl). Our summary lists: Python 3.

Does Querying Terminology Service access the network?

SKILL.md names 4 domains. In commands or code: hl7.org and snomed.info; the agent is likely to contact these when it follows the instructions. As links in the text: confluence.ihtsdotools.org and ontoserver.csiro.au. This is read from the text; nothing was executed.

Is Querying Terminology Service safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Querying Terminology Service use?

Querying Terminology Service is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Querying Terminology Service use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Querying Terminology Service?

Skills that share tags, products or a category with Querying Terminology Service: Clinical Trials Database (google-deepmind/science-skills, 3.2k stars), CHARLS Paper Reproduction Guide (xjtulyc/MedgeClaw, 617 stars), Biomedical Analysis Dispatch (xjtulyc/MedgeClaw, 617 stars) and Research Paper (luwill/research-skills, 862 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Querying Terminology Service?

maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.