Langsung ke konten
Skillpedia
Database5.8k Β· #14722

querying-terminology-service

Fungsinya

Skill ini mengajari agent cara meminta server kode medis untuk memeriksa apakah sebuah kode valid dan apa artinya. Skill ini untuk tim yang menjalankan layanan terminologi sendiri dengan lisensi mereka sendiri.

Kapan dipakai

  • βœ“Saat tim perlu memastikan sebuah kode medis termasuk dalam standar seperti SNOMED CT atau LOINC.
  • βœ“Saat pengguna membutuhkan daftar kode yang diizinkan untuk menu pilihan dari sebuah value set.
  • βœ“Saat pengguna perlu memetakan kode dari satu sistem medis ke sistem lain, seperti ICD-10 ke SNOMED.

Link skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/querying-terminology-service/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/maziyarpanahi/openmed/blob/master/skills/querying-terminology-service/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda memeriksa apakah kode diagnosis ini valid di SNOMED CT memakai server terminologi kami?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengirim permintaan standar ke server terminologi FHIR untuk memvalidasi, memperluas value set, mencari, atau menerjemahkan kode. Server dan lisensinya disediakan oleh pengguna.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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

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)

# 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

# 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

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)
Pertanyaan umum

Apakah ini menyertakan daftar kode medis?

Tidak. Skill menyatakan tidak membundel kosakata terbatas dan memakai server yang sudah dimiliki pengguna.

Server apa saja yang bisa dipakai?

Skill menyebut Ontoserver, HAPI FHIR, dan tx.fhir.org, dan menyatakan bahwa tx.fhir.org tidak untuk konten berlisensi atau data pasien.

Apa empat operasinya?

Yaitu memvalidasi kode, memperluas value set, mencari kode, dan menerjemahkan antar sistem kode.

Detail

Deskripsi asli dari pembuat

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 l

repo: maziyarpanahi/openmed

Popularitas

Bintang GitHub
5.8k
Peringkat
#14722
Lisensi
Apache-2.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa