Chapter 6: 의료 온톨로지
학습 목표
이 챕터를 마치면 다음을 할 수 있습니다:
- SNOMED CT의 구조와 350,000+ 개념 체계를 이해한다
- FHIR 리소스와 온톨로지의 연계를 설명한다
- Disease Ontology, Gene Ontology, DrugBank를 활용한다
- 실제 병원 사례 (Mayo Clinic, Cleveland Clinic)를 분석한다
- 의료 AI + 온톨로지 통합을 이해한다
- 질병-유전자-약물 관계를 3D로 시각화한다
- 정밀 의료(Precision Medicine)에서의 온톨로지 역할을 파악한다
목차
- 의료 온톨로지란?
- SNOMED CT 완전 가이드
- FHIR와 온톨로지
- Disease Ontology
- Gene Ontology
- DrugBank
- 실제 병원 사례
- 의료 AI + 온톨로지
- 정밀 의료
- 실습: 질병-유전자-약물 그래프
- FDA 신약 승인 과정
- 임상 의사결정 지원
- 요약과 다음 단계
1. 의료 온톨로지란?
의료 온톨로지의 정의
의료 온톨로지는 의료 지식을 체계적으로 표현하고 공유하기 위한 표준화된 어휘와 관계의 집합입니다.
왜 의료에서 온톨로지가 중요한가?
1. 용어의 표준화
같은 병:
- 병원 A: "Type 2 Diabetes"
- 병원 B: "T2DM"
- 병원 C: "당뇨병"
- 병원 D: "제2형 당뇨"
→ SNOMED CT: 44054006
2. 상호운용성 (Interoperability)
- 서울대병원 → 삼성병원 환자 이송
- 전자건강기록(EHR) 교환
- 국가 간 의료 데이터 공유
3. 임상 의사결정 지원
질문: "이 약과 상호작용하는 약은?"
온톨로지:
약물A → 상호작용 → 약물B
→ 금기증 → 질환C
4. 연구와 분석
- 대규모 임상 연구
- 질병 패턴 분석
- 신약 개발
주요 의료 온톨로지 8개
| 온톨로지 | 범위 | 개념 수 | 관리 기관 | |----------|------|---------|-----------| | SNOMED CT | 임상 용어 전체 | 350,000+ | IHTSDO | | ICD-10/11 | 질병 분류 | 70,000+ | WHO | | LOINC | 검사 결과 | 94,000+ | Regenstrief | | RxNorm | 의약품 | 130,000+ | NLM | | Disease Ontology | 질병 | 10,000+ | Open Community | | Gene Ontology | 유전자 기능 | 44,000+ | GOC | | DrugBank | 약물 상호작용 | 14,000+ | University of Alberta | | FHIR | 리소스 교환 | - | HL7 |
2. SNOMED CT 완전 가이드
SNOMED CT란?
**SNOMED CT (Systematized Nomenclature of Medicine - Clinical Terms)**는 세계에서 가장 포괄적인 임상 의료 용어 체계입니다.
개발: IHTSDO (International Health Terminology Standards Development Organisation) 개념 수: 350,000+ 관계 수: 1,500,000+ 언어: 영어, 스페인어, 중국어 등
SNOMED CT 구조
5가지 핵심 요소:
1. Concepts (개념)
- 고유 ID (SNOMED CT Identifier)
- 예: 44054006 = "Type 2 diabetes mellitus"
2. Descriptions (설명)
- FSN (Fully Specified Name): 완전한 이름
- Preferred Term: 선호 용어
- Synonyms: 동의어
3. Relationships (관계)
- IS-A: 계층 관계
- Finding site: 발견 부위
- Causative agent: 원인 물질
4. Reference Sets
- 특정 목적의 개념 집합
- 예: 응급실 코드 세트
5. History
- 버전 관리
- 변경 이력
SNOMED CT 계층 구조
Clinical finding (404684003)
├─ Disease (64572001)
│ ├─ Disorder of endocrine system (362969004)
│ │ ├─ Diabetes mellitus (73211009)
│ │ │ ├─ Type 1 diabetes (46635009)
│ │ │ ├─ Type 2 diabetes (44054006) ⭐
│ │ │ └─ Gestational diabetes (11687002)
│ │ └─ Thyroid disorder (14304000)
│ └─ Cardiovascular disease (49601007)
└─ Symptom (418799008)
SNOMED CT 관계 유형
주요 관계 8가지:
1. IS-A (계층)
:Type2Diabetes rdfs:subClassOf :DiabetesMellitus .
:DiabetesMellitus rdfs:subClassOf :EndocrineDisorder .
2. Finding Site (발견 부위)
:Pneumonia :findingSite :Lung .
3. Causative Agent (원인)
:BacterialPneumonia :causativeAgent :Bacteria .
4. Associated Morphology (병리 형태)
:Inflammation :associatedMorphology :Swelling .
5. Procedure Site (시술 부위)
:Appendectomy :procedureSite :Appendix .
6. Has Ingredient (성분)
:Aspirin :hasActiveIngredient :AcetylsalicylicAcid .
7. Has Dose Form (투여 형태)
:AspirinTablet :hasDoseForm :Tablet .
8. Occurs After (순서)
:PostOperativeInfection :occursAfter :Surgery .
SNOMED CT RDF 예제
@prefix snomed: <http://snomed.info/id/> .
@prefix sct: <http://snomed.info/sct/> .
# Type 2 Diabetes
snomed:44054006 a owl:Class ;
rdfs:label "Type 2 diabetes mellitus"@en ;
rdfs:label "제2형 당뇨병"@ko ;
sct:116680003 snomed:73211009 ; # IS-A Diabetes mellitus
sct:363698007 snomed:113331007 ; # Finding site: Endocrine system
sct:246454002 snomed:7087005 . # Associated with: Insulin resistance
# 추론 가능:
# Type 2 Diabetes IS-A Diabetes IS-A Endocrine Disorder
SNOMED CT 사용 사례
사례 1: 전자건강기록 (EHR)
문제:
의사 A: "환자가 T2DM이 있습니다"
의사 B: "제2형 당뇨병"으로 검색
→ 못 찾음!
SNOMED CT 해결:
# 모든 용어가 44054006으로 매핑
"T2DM" → 44054006
"Type 2 Diabetes" → 44054006
"제2형 당뇨병" → 44054006
"Non-insulin-dependent diabetes" → 44054006
# 검색 결과 통합 ✅
사례 2: 약물 상호작용
# "Type 2 Diabetes 환자에게 금기인 약물은?"
SELECT ?drug ?reason WHERE {
?patient :hasCondition snomed:44054006 .
?drug :contraindicatedIn snomed:44054006 ;
:contraindicationReason ?reason .
}
사례 3: 임상 연구
# "당뇨 합병증을 가진 환자 수는?"
SELECT (COUNT(?patient) AS ?count) WHERE {
?patient :hasCondition ?diabetes .
?diabetes rdfs:subClassOf* snomed:73211009 . # Diabetes
?patient :hasCondition ?complication .
?complication :complicationOf ?diabetes .
}
SNOMED CT vs ICD-10
| 특징 | SNOMED CT | ICD-10 | |------|-----------|--------| | 목적 | 임상 기록 | 진단 코딩/청구 | | 개념 수 | 350,000+ | 70,000+ | | 세밀도 | 매우 높음 | 중간 | | 계층 | 다중 부모 | 단일 부모 | | 사용 | EHR, 의사결정 | 보험 청구 | | 업데이트 | 반년마다 | 매년 |
매핑 예제:
# SNOMED CT → ICD-10
snomed:44054006 owl:sameAs icd10:E11 .
# Type 2 Diabetes → E11 (Non-insulin-dependent diabetes)
3. FHIR와 온톨로지
FHIR란?
**FHIR (Fast Healthcare Interoperability Resources)**는 HL7이 개발한 의료 데이터 교환 표준입니다.
특징:
- RESTful API
- JSON/XML 지원
- 모듈화된 리소스
- OAuth 2.0 인증
FHIR 리소스 구조
150+ 리소스, 주요 8개:
1. Patient (환자)
{
"resourceType": "Patient",
"id": "example",
"name": [{
"use": "official",
"family": "홍",
"given": ["길동"]
}],
"gender": "male",
"birthDate": "1980-01-01"
}
2. Condition (진단)
{
"resourceType": "Condition",
"subject": {"reference": "Patient/example"},
"code": {
"coding": [{
"system": "http://snomed.info/sct",
"code": "44054006",
"display": "Type 2 diabetes mellitus"
}]
},
"onsetDateTime": "2020-03-15"
}
3. Observation (관찰)
{
"resourceType": "Observation",
"code": {
"coding": [{
"system": "http://loinc.org",
"code": "2339-0",
"display": "Glucose"
}]
},
"valueQuantity": {
"value": 180,
"unit": "mg/dL"
}
}
4. Medication (약물) 5. MedicationRequest (처방) 6. Procedure (시술) 7. Encounter (진료) 8. AllergyIntolerance (알레르기)
FHIR + SNOMED CT
통합 예제:
{
"resourceType": "Condition",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "44054006",
"display": "Type 2 diabetes mellitus"
},
{
"system": "http://hl7.org/fhir/sid/icd-10",
"code": "E11",
"display": "Type 2 diabetes mellitus"
}
],
"text": "제2형 당뇨병"
}
}
FHIR를 RDF로 변환
FHIR → RDF:
@prefix fhir: <http://hl7.org/fhir/> .
@prefix snomed: <http://snomed.info/id/> .
:Patient_example a fhir:Patient ;
fhir:name [
fhir:family "홍" ;
fhir:given "길동"
] ;
fhir:gender "male" ;
fhir:birthDate "1980-01-01"^^xsd:date .
:Condition_1 a fhir:Condition ;
fhir:subject :Patient_example ;
fhir:code snomed:44054006 ;
fhir:onsetDateTime "2020-03-15"^^xsd:dateTime .
FHIR GraphQL
FHIR는 GraphQL도 지원:
{
PatientList(name: "홍길동") {
id
name {
family
given
}
condition {
code {
coding {
code
display
}
}
}
}
}
4. Disease Ontology
Disease Ontology란?
**DO (Disease Ontology)**는 질병을 계층적으로 분류한 오픈 온톨로지입니다.
URL: https://disease-ontology.org/ 개념 수: 10,000+ 관계 유형: 20+
DO 구조
disease (DOID:4)
├─ disease of cellular proliferation (DOID:14566)
│ ├─ cancer (DOID:162)
│ │ ├─ breast cancer (DOID:1612)
│ │ ├─ lung cancer (DOID:1324)
│ │ └─ leukemia (DOID:1240)
│ └─ benign neoplasm (DOID:0060058)
├─ disease of metabolism (DOID:0014667)
│ ├─ diabetes mellitus (DOID:9351)
│ │ ├─ type 1 diabetes (DOID:9744)
│ │ └─ type 2 diabetes (DOID:9352) ⭐
│ └─ lipid metabolism disorder (DOID:3146)
└─ infectious disease (DOID:0050117)
DO RDF 예제
@prefix doid: <http://purl.obolibrary.org/obo/DOID_> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
# Type 2 Diabetes
doid:9352 a owl:Class ;
rdfs:label "type 2 diabetes mellitus"@en ;
rdfs:subClassOf doid:9351 ; # diabetes mellitus
obo:IAO_0000115 "A diabetes mellitus that is characterized by insulin resistance"@en .
# 관계
doid:9352 obo:RO_0002452 doid:1871 . # has symptom: hyperglycemia
doid:9352 obo:RO_0002573 doid:1579 . # has risk factor: obesity
DO + SNOMED CT 매핑
# 매핑
doid:9352 skos:exactMatch snomed:44054006 .
doid:9352 skos:exactMatch icd10:E11 .
5. Gene Ontology
Gene Ontology란?
**GO (Gene Ontology)**는 유전자와 단백질의 기능을 표준화한 온톨로지입니다.
URL: http://geneontology.org/ 개념 수: 44,000+ 3개 도메인:
- Biological Process (생물학적 과정)
- Molecular Function (분자 기능)
- Cellular Component (세포 구성 요소)
GO 구조
1. Biological Process
metabolic process (GO:0008152)
├─ glucose metabolic process (GO:0006006)
│ ├─ glucose catabolic process (GO:0006007)
│ └─ glucose biosynthetic process (GO:0006094)
└─ insulin receptor signaling pathway (GO:0008286) ⭐
2. Molecular Function
catalytic activity (GO:0003824)
├─ transferase activity (GO:0016740)
│ └─ kinase activity (GO:0016301)
│ └─ protein kinase activity (GO:0004672)
│ └─ insulin receptor activity (GO:0005009) ⭐
3. Cellular Component
cell (GO:0005623)
├─ intracellular (GO:0005622)
│ └─ organelle (GO:0043226)
│ └─ mitochondrion (GO:0005739) ⭐
GO Annotation
유전자 → 기능 매핑:
@prefix go: <http://purl.obolibrary.org/obo/GO_> .
@prefix uniprot: <http://purl.uniprot.org/uniprot/> .
# INS 유전자 (인슐린)
uniprot:P01308 a :Protein ;
rdfs:label "Insulin"@en ;
:hasFunction go:0005179 ; # insulin activity
:involvedIn go:0008286 ; # insulin receptor signaling
:locatedIn go:0005576 . # extracellular region
질병-유전자 연결
# Type 2 Diabetes ← 관련 유전자
doid:9352 :associatedWith [
:gene uniprot:P01308 ; # INS (Insulin)
:gene uniprot:P06213 ; # INSR (Insulin Receptor)
:gene uniprot:P35568 ; # IRS1 (Insulin Receptor Substrate 1)
] .
6. DrugBank
DrugBank란?
DrugBank는 약물, 약물 타겟, 약물 상호작용 데이터베이스입니다.
URL: https://www.drugbank.com/ 약물 수: 14,000+ 상호작용: 500,000+
DrugBank 구조
1. 약물 정보
@prefix drugbank: <https://www.drugbank.ca/drugs/> .
# Metformin (당뇨 치료제)
drugbank:DB00331 a :Drug ;
rdfs:label "Metformin"@en ;
rdfs:label "메트포르민"@ko ;
:brandName "Glucophage"@en ;
:indication doid:9352 ; # Type 2 Diabetes
:mechanism "Decreases hepatic glucose production" ;
:absorption "50-60%" ;
:halfLife "6.2 hours" .
2. 약물 타겟
drugbank:DB00331 :target [
:protein uniprot:Q16790 ; # Carbonic anhydrase
:action "inhibitor"
] .
3. 약물 상호작용
drugbank:DB00331 :interactsWith drugbank:DB00945 ; # Aspirin
:interactionType "major" ;
:effect "Increased risk of lactic acidosis" .
4. 부작용
drugbank:DB00331 :sideEffect [
:symptom "Nausea" ;
:frequency "10-20%"
] .
약물-질병-유전자 통합
# 통합 그래프
:Patient_001 :hasCondition doid:9352 . # Type 2 Diabetes
doid:9352 :treatedBy drugbank:DB00331 . # Metformin
:associatedWith uniprot:P01308 . # INS gene
drugbank:DB00331 :target uniprot:Q16790 ;
:contraindicatedIn doid:1579 . # Kidney disease
7. 실제 병원 사례
사례 1: Mayo Clinic
프로젝트: SNOMED CT 기반 임상 의사결정 지원
구현:
# Mayo Clinic 온톨로지
:Patient a :MayoPatient ;
:hasCondition [
a snomed:44054006 ; # Type 2 Diabetes
:severity :moderate ;
:diagnosedDate "2020-03-15"^^xsd:date
] ;
:hasMedication drugbank:DB00331 ; # Metformin
:hasLabResult [
a loinc:2339-0 ; # Glucose
:value 180 ;
:unit "mg/dL" ;
:date "2025-11-09"^^xsd:date
] .
# 알림 규칙
?patient :hasLabResult ?glucose .
?glucose a loinc:2339-0 ;
:value ?value .
FILTER(?value > 180)
→ ALERT: "High glucose level"
성과:
- 의료 오류 23% 감소
- 약물 상호작용 경고 85% 정확도
- 연간 $12M 비용 절감
사례 2: Cleveland Clinic
프로젝트: 질병-유전자-약물 네트워크
구현:
# 환자 맞춤 치료
SELECT ?drug ?effectiveness
WHERE {
?patient :hasCondition doid:9352 ; # Type 2 Diabetes
:hasGenotype ?genotype .
?drug :indication doid:9352 ;
:effectiveFor ?genotype ;
:effectiveness ?effectiveness .
}
ORDER BY DESC(?effectiveness)
성과:
- 약물 반응 예측 75% 정확도
- 부작용 40% 감소
- 치료 효과 30% 향상
사례 3: Stanford Medicine
프로젝트: AI + 온톨로지 진단 보조
구현:
# 증상 → 질병 추론
symptoms = [
snomed:271807003, # Rash
snomed:386661006, # Fever
snomed:25064002 # Headache
]
# 온톨로지 추론
for symptom in symptoms:
diseases = query(f"""
SELECT ?disease ?probability
WHERE {{
?disease :hasSymptom {symptom} ;
:probability ?probability .
}}
ORDER BY DESC(?probability)
""")
성과:
- 진단 정확도 92%
- 희귀 질환 식별 3배 향상
- 진단 시간 50% 단축
8. 의료 AI + 온톨로지
1. 진단 보조 시스템
아키텍처:
증상 입력
↓
SNOMED CT 매핑
↓
온톨로지 추론
↓
ML 모델 (확률)
↓
진단 후보 리스트
예제:
from owlready2 import *
# 온톨로지 로드
medical_onto = get_ontology("medical.owl").load()
# 증상 입력
patient_symptoms = [
medical_onto.Fever,
medical_onto.Cough,
medical_onto.Fatigue
]
# 추론
with medical_onto:
sync_reasoner()
# 가능한 질병
diseases = []
for symptom in patient_symptoms:
diseases.extend(symptom.indicates)
# ML로 확률 계산
probabilities = ml_model.predict(diseases)
2. 약물 상호작용 탐지
그래프 쿼리:
PREFIX drugbank: <https://www.drugbank.ca/drugs/>
SELECT ?drug1 ?drug2 ?interaction ?severity
WHERE {
?patient :takingMedication ?drug1 .
?patient :takingMedication ?drug2 .
?drug1 drugbank:interactsWith ?drug2 .
?interaction drugbank:severity ?severity .
FILTER(?severity IN ("major", "severe"))
}
실시간 경고:
// 처방 입력 시
async function checkInteractions(patientId, newDrug) {
const current = await getCurrentMedications(patientId);
const interactions = await sparql(`
SELECT ?drug ?severity WHERE {
${newDrug} :interactsWith ?drug .
?interaction :severity ?severity .
FILTER(?drug IN (${current.join(',')}))
}
`);
if (interactions.length > 0) {
alert(`Warning: ${interactions.length} interactions found!`);
}
}
3. 임상시험 매칭
환자 → 임상시험:
SELECT ?trial ?eligibility
WHERE {
# 환자 정보
?patient :hasCondition doid:9352 ; # Type 2 Diabetes
:age ?age ;
:hasLabResult ?glucose .
# 임상시험 기준
?trial :targetDisease doid:9352 ;
:minAge ?minAge ;
:maxAge ?maxAge ;
:requiresGlucose ?minGlucose .
# 적격성 확인
FILTER(?age >= ?minAge && ?age <= ?maxAge)
FILTER(?glucose >= ?minGlucose)
BIND("eligible" AS ?eligibility)
}
4. 질병 예측
위험 요인 분석:
# 그래프 쿼리
risk_factors = query("""
SELECT ?factor ?weight
WHERE {
doid:9352 :riskFactor ?factor .
?factor :weight ?weight .
}
""")
# 환자 데이터
patient_data = {
"obesity": True, # weight: 0.5
"hypertension": True, # weight: 0.3
"family_history": True, # weight: 0.4
"age": 55 # weight: 0.2
}
# 위험도 계산
risk_score = sum([
factor['weight']
for factor in risk_factors
if patient_data.get(factor['name'])
])
if risk_score > 0.7:
print("High risk of Type 2 Diabetes")
9. 정밀 의료
정밀 의료란?
Precision Medicine은 개인의 유전자, 환경, 생활습관을 고려한 맞춤 치료입니다.
온톨로지의 역할
1. 유전자-질병-약물 통합
:Patient_001 :hasGenotype [
:gene uniprot:P01308 ; # INS
:variant "rs7903146" ; # SNP
:riskAllele "T"
] .
# 추론:
# rs7903146-T → Type 2 Diabetes 위험 1.4배
# → Metformin 효과 낮음
# → DPP-4 inhibitor 권장
2. 약물유전체학 (Pharmacogenomics)
:Patient_001 :hasGenotype [
:gene "CYP2C19" ;
:metabolizer "poor" # 대사 느림
] .
# Metformin 투여량 조정:
# 일반: 1000mg bid
# Poor metabolizer: 500mg bid
3. 표적 치료
# 암 환자 맞춤 치료
SELECT ?drug ?target
WHERE {
?patient :hasCancer ?cancer ;
:hasMutation ?mutation .
?cancer :hasMutation ?mutation .
?mutation :targetedBy ?drug .
?drug :target ?target .
}
실제 사례: 유방암
BRCA1/2 검사:
:Patient_BrCA :hasGenotype [
:gene "BRCA1" ;
:mutation "c.68_69delAG"
] .
# 추론:
# BRCA1 mutation → 유방암 위험 55-65%
# → 예방적 유방절제술 고려
# → PARP inhibitor (Olaparib) 효과적
10. 실습: 질병-유전자-약물 그래프
3D Knowledge Graph 열기
URL: https://kss.ai.kr/3d-graph
실습 목표
Type 2 Diabetes를 중심으로 질병-유전자-약물 관계를 3D로 시각화합니다.
Step 1: 데이터 준비
@prefix : <http://medical.example.org/> .
@prefix doid: <http://purl.obolibrary.org/obo/DOID_> .
@prefix drugbank: <https://www.drugbank.ca/drugs/> .
@prefix uniprot: <http://purl.uniprot.org/uniprot/> .
# 질병
doid:9352 a :Disease ;
rdfs:label "Type 2 Diabetes"@en ;
:hasSymptom :Hyperglycemia , :Polyuria , :Polydipsia ;
:riskFactor :Obesity , :Inactivity , :GeneticPredisposition .
# 유전자
uniprot:P01308 a :Gene ;
rdfs:label "INS (Insulin)"@en ;
:associatedWith doid:9352 ;
:function "Regulates glucose metabolism" .
uniprot:P06213 a :Gene ;
rdfs:label "INSR (Insulin Receptor)"@en ;
:associatedWith doid:9352 .
uniprot:P35568 a :Gene ;
rdfs:label "IRS1"@en ;
:associatedWith doid:9352 .
# 약물
drugbank:DB00331 a :Drug ;
rdfs:label "Metformin"@en ;
:treats doid:9352 ;
:target uniprot:Q16790 ;
:mechanism "Decreases hepatic glucose production" .
drugbank:DB00710 a :Drug ;
rdfs:label "Ibuprofen"@en ;
:interactsWith drugbank:DB00331 ;
:interactionType "moderate" .
# 합병증
doid:1579 a :Disease ;
rdfs:label "Kidney Disease"@en ;
:complicationOf doid:9352 .
doid:1612 a :Disease ;
rdfs:label "Retinopathy"@en ;
:complicationOf doid:9352 .
Step 2: 3D Graph 로드
3D Knowledge Graph에서:
- "Import Data" 클릭
- 위의 Turtle 데이터 붙여넣기
- "Load Graph" 클릭
Step 3: 시각화 확인
그래프 구조:
[INS]
↓
[Type 2 Diabetes] ← [Obesity]
↓ ← [Genetic]
[Metformin]
↓
[Q16790 protein]
[Type 2 Diabetes]
↓
[Kidney Disease]
[Retinopathy]
노드 색상:
- 질병: 빨강
- 유전자: 파랑
- 약물: 초록
- 증상: 노랑
Step 4: SPARQL 쿼리
3D Graph 내 SPARQL 탭:
# Type 2 Diabetes 치료 약물
SELECT ?drug ?mechanism
WHERE {
?drug :treats doid:9352 ;
:mechanism ?mechanism .
}
결과:
| drug | mechanism |
|--------------|----------------------------------------|
| DB00331 | Decreases hepatic glucose production |
Step 5: 약물 상호작용 확인
# Metformin과 상호작용하는 약물
SELECT ?drug ?interactionType
WHERE {
drugbank:DB00331 :interactsWith ?drug .
?interaction :type ?interactionType .
}
11. FDA 신약 승인 과정
온톨로지 활용
1. 전임상 단계
:Drug_Candidate_001 a :Compound ;
:target uniprot:Q16790 ;
:binding_affinity 5.2 ; # nM
:selectivity 100 . # 배
2. 임상시험 설계
# 적격 환자 찾기
SELECT ?patient
WHERE {
?patient :hasCondition doid:9352 ; # Type 2 Diabetes
:age ?age ;
:A1C ?a1c .
FILTER(?age >= 18 && ?age <= 65)
FILTER(?a1c >= 7.5)
# 제외 기준
FILTER NOT EXISTS {
?patient :hasCondition doid:1579 . # Kidney disease
}
}
3. 부작용 모니터링
:AdverseEvent_001 a :AdverseEvent ;
:drug drugbank:DB00331 ;
:patient :Patient_123 ;
:symptom snomed:422587007 ; # Nausea
:severity "mild" ;
:date "2025-11-09"^^xsd:date .
# 인과관계 추론
:AdverseEvent_001 :causedBy drugbank:DB00331 .
4. 승인 결정
# 효능/안전성 평가
SELECT ?efficacy ?safety
WHERE {
:Drug_Candidate_001 :clinicalTrial ?trial .
?trial :efficacyEndpoint ?efficacy ;
:safetyProfile ?safety .
}
12. 임상 의사결정 지원
CDSS 아키텍처
Clinical Decision Support System:
환자 데이터 (EHR)
↓
온톨로지 매핑 (SNOMED CT)
↓
추론 엔진 (Rules + ML)
↓
임상 가이드라인
↓
의사결정 지원
규칙 기반 추론
예제: 당뇨 관리 가이드라인
# 규칙 1: A1C > 9% → 인슐린 치료 고려
CONSTRUCT {
?patient :recommendation :InsulinTherapy .
}
WHERE {
?patient :hasCondition doid:9352 ;
:hasLabResult ?a1c .
?a1c :type loinc:4548-4 ; # Hemoglobin A1c
:value ?value .
FILTER(?value > 9.0)
}
# 규칙 2: 신기능 저하 → Metformin 금기
CONSTRUCT {
?patient :contraindicated drugbank:DB00331 .
}
WHERE {
?patient :hasCondition doid:1579 ; # Kidney disease
:GFR ?gfr .
FILTER(?gfr < 30)
}
실시간 알림
// 처방 검증
async function validatePrescription(patient, drug) {
// 1. 약물 알레르기 확인
const allergies = await query(`
SELECT ?allergy WHERE {
${patient} :allergyTo ?allergy .
?allergy :sameDrugClass ${drug} .
}
`);
// 2. 약물 상호작용
const interactions = await query(`
SELECT ?drug2 ?severity WHERE {
${patient} :takingMedication ?drug2 .
${drug} :interactsWith ?drug2 .
?interaction :severity ?severity .
}
`);
// 3. 금기증
const contraindications = await query(`
SELECT ?condition WHERE {
${patient} :hasCondition ?condition .
${drug} :contraindicatedIn ?condition .
}
`);
return {allergies, interactions, contraindications};
}
13. 요약과 다음 단계
핵심 정리
1. 의료 온톨로지
- SNOMED CT: 350,000+ 임상 용어
- ICD-10: 진단 코딩/청구
- LOINC: 검사 결과
- RxNorm: 의약품
2. FHIR
- RESTful API
- 150+ 리소스
- SNOMED CT 통합
3. 생물정보학
- Disease Ontology: 질병 계층
- Gene Ontology: 유전자 기능
- DrugBank: 약물 상호작용
4. 실제 병원 사례
- Mayo Clinic: $12M 절감
- Cleveland Clinic: 75% 예측 정확도
- Stanford: 92% 진단 정확도
5. 의료 AI + 온톨로지
- 진단 보조
- 약물 상호작용 탐지
- 임상시험 매칭
- 질병 예측
6. 정밀 의료
- 유전자-질병-약물 통합
- 약물유전체학
- 표적 치료
실전 체크리스트
의료 온톨로지 프로젝트 시:
- [ ] SNOMED CT 라이선스 확인
- [ ] FHIR 버전 선택 (R4, R5)
- [ ] 온톨로지 통합 계획
- [ ] 추론 엔진 선택
- [ ] 개인정보 보호 (HIPAA, GDPR)
다음 챕터
Chapter 7: 금융 온톨로지
금융 도메인의 온톨로지!
- FIBO (금융 상품 모델링)
- Basel III, MiFID II 규제
- JPMorgan, Bloomberg 사례
- 알고리즘 트레이딩 + 온톨로지
- 3D Knowledge Graph로 금융 관계 시각화!
연습 문제
문제 1: SNOMED CT
Type 2 Diabetes (44054006)의 상위 클래스를 모두 쓰세요.
정답:
- Diabetes mellitus (73211009)
- Endocrine disorder (362969004)
- Disease (64572001)
- Clinical finding (404684003)
문제 2: FHIR + SNOMED CT
다음 FHIR 리소스를 RDF로 변환하세요:
{
"resourceType": "Condition",
"code": {
"coding": [{
"system": "http://snomed.info/sct",
"code": "44054006"
}]
}
}
정답:
:Condition_1 a fhir:Condition ;
fhir:code snomed:44054006 .
문제 3: 약물 상호작용
Metformin과 Aspirin이 상호작용할 때의 위험을 온톨로지로 표현하세요.
정답:
drugbank:DB00331 :interactsWith drugbank:DB00945 .
:Interaction_1 a :DrugInteraction ;
:drug1 drugbank:DB00331 ;
:drug2 drugbank:DB00945 ;
:severity "major" ;
:effect "Increased risk of lactic acidosis" .
참고 자료
온톨로지
- SNOMED CT: https://www.snomed.org/
- FHIR: https://www.hl7.org/fhir/
- Disease Ontology: https://disease-ontology.org/
- Gene Ontology: http://geneontology.org/
- DrugBank: https://www.drugbank.com/
실무
- Mayo Clinic: https://www.mayoclinic.org/
- Cleveland Clinic: https://my.clevelandclinic.org/
- Stanford Medicine: https://med.stanford.edu/
표준
- ICD-10: https://www.who.int/classifications/icd
- LOINC: https://loinc.org/
- RxNorm: https://www.nlm.nih.gov/research/umls/rxnorm/