querying-terminology-service
하는 일
이 스킬은 의료 코드 서버에 코드가 유효한지, 그 코드가 무엇을 뜻하는지 묻는 방법을 에이전트에게 가르칩니다. 자체 라이선스로 용어 서비스를 운영하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓의료 코드가 SNOMED CT나 LOINC 같은 표준에 속하는지 확인해야 할 때.
- ✓값 집합에서 드롭다운 메뉴에 쓸 허용 코드 목록이 필요할 때.
- ✓ICD-10을 SNOMED처럼 한 의료 체계의 코드를 다른 체계로 매핑해야 할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/querying-terminology-service/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 용어 서버를 사용해 이 진단 코드가 SNOMED CT에서 유효한지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 FHIR 용어 서버에 표준 요청을 보내 코드를 검증하고, 값 집합을 펼치고, 코드를 조회하며, 코드 체계 간에 변환합니다. 서버와 라이선스는 사용자가 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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)
자주 묻는 질문
의료 코드 목록이 함께 제공되나요?
아니요. 스킬은 제한된 어휘를 함께 제공하지 않으며, 사용자가 이미 가진 서버를 사용한다고 설명합니다.
어떤 서버를 쓸 수 있나요?
Ontoserver, HAPI FHIR, tx.fhir.org를 언급하며, tx.fhir.org는 라이선스가 있는 콘텐츠나 환자 데이터에 쓰면 안 된다고 설명합니다.
네 가지 작업은 무엇인가요?
코드 검증, 값 집합 펼치기, 코드 조회, 코드 체계 간 변환입니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 5.8k
- 순위
- #14722
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.