querying-terminology-service
Skill này làm gì
Skill này dạy agent cách hỏi máy chủ mã y khoa xem một mã có hợp lệ không và nó có nghĩa gì. Dành cho các nhóm tự vận hành dịch vụ thuật ngữ theo giấy phép của riêng mình.
Khi nào nên dùng
- ✓Khi một nhóm cần xác nhận một mã y khoa thuộc một chuẩn như SNOMED CT hoặc LOINC.
- ✓Khi người dùng cần danh sách mã được phép cho menu thả xuống từ một value set.
- ✓Khi người dùng cần ánh xạ một mã từ một hệ thống y khoa sang hệ khác, như ICD-10 sang SNOMED.
Liên kết skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/querying-terminology-service/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể kiểm tra xem mã chẩn đoán này có hợp lệ trong SNOMED CT trên máy chủ thuật ngữ của chúng tôi không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent gửi yêu cầu chuẩn tới máy chủ thuật ngữ FHIR để xác thực, mở rộng value set, tra cứu hoặc dịch mã. Máy chủ và giấy phép do người dùng cung cấp.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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)
Câu hỏi thường gặp
Skill có kèm danh sách mã y khoa không?
Không. Skill nói rằng nó không đi kèm từ vựng bị hạn chế và dùng máy chủ mà người dùng đã có.
Nó có thể dùng những máy chủ nào?
Skill nêu tên Ontoserver, HAPI FHIR và tx.fhir.org, và nói rằng tx.fhir.org không dành cho nội dung có giấy phép hay dữ liệu bệnh nhân.
Bốn thao tác là gì?
Đó là xác thực mã, mở rộng value set, tra cứu mã và dịch giữa các hệ mã.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14722
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
annotating-variants
5.8kGiúp agent dự đoán tác động của biến thể di truyền, đổi tên HGVS sang vị trí bộ gen và gắn tần suất quần thể bằng công cụ chú giải miễn phí.
ask-openmed
5.8kGiúp agent chọn đúng quy trình OpenMed cho yêu cầu về văn bản lâm sàng, luôn kiểm tra quyền riêng tư trước khi có thể có dữ liệu bệnh nhân.
assembling-fhir-bundles
5.8kGói nhiều bản ghi y tế FHIR thành một Bundle giao dịch để gửi tới EHR, với các tham chiếu nội bộ được liên kết đúng.
auditing-deid-leakage
5.8kQuét văn bản lâm sàng đã khử nhận dạng để tìm định danh còn sót như SSN, số thẻ, email và ngày tháng, và chặn phát hành nếu còn sót.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.