제7장

Phase 4: 시스템 통합

FHIR R5 호환성, 주요 EHR 시스템(Epic, Cerner) 연동, 검사실 정보 시스템(LIS) 통합, 웨어러블 기기 데이터 수집, 그리고 WIA 생태계 내 다른 표준과의 상호운용성을 구현합니다.

1. FHIR R5 호환성

Fast Healthcare Interoperability Resources(FHIR) R5는 의료 데이터 교환의 국제 표준입니다. WIA 알츠하이머 치료 시스템은 FHIR R5 리소스를 활용하여 환자 데이터, 평가 결과, 치료 계획을 구조화된 형식으로 표현합니다.

1.1 핵심 FHIR 리소스 매핑

WIA 데이터 유형 FHIR R5 리소스 주요 프로파일
환자 인구통계 Patient US Core Patient
인지 평가 결과 Observation Cognitive Assessment
NAD+ 측정값 Observation Laboratory Result
혈장 바이오마커 DiagnosticReport Lab Report
치료 계획 CarePlan Alzheimer's Care Plan
약물 투여 MedicationAdministration IV Administration
유전자 검사 Observation (genomics) APOE Genotype
MRI 결과 ImagingStudy ARIA Monitoring

1.2 FHIR Patient 리소스 예제

{ "resourceType": "Patient", "id": "PT-2025-001234", "meta": { "profile": ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"] }, "identifier": [ { "use": "official", "system": "http://hospital.example.org/patients", "value": "PT-2025-001234" } ], "name": [ { "use": "official", "family": "홍", "given": ["길동"] } ], "gender": "male", "birthDate": "1950-03-15", "address": [ { "use": "home", "city": "서울", "state": "서울특별시", "postalCode": "06234", "country": "KR" } ], "extension": [ { "url": "http://wia.org/fhir/StructureDefinition/apoe-genotype", "valueCodeableConcept": { "coding": [ { "system": "http://loinc.org", "code": "LA24361-2", "display": "ε3/ε4" } ] } } ] }

1.3 FHIR Observation 리소스 - NAD+ 측정

{ "resourceType": "Observation", "id": "NAD-2025-001234-001", "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", "display": "Laboratory" } ] } ], "code": { "coding": [ { "system": "http://loinc.org", "code": "95232-1", "display": "NAD in Blood" }, { "system": "http://wia.org/fhir/CodeSystem/biomarkers", "code": "NAD-PLUS-WB", "display": "NAD+ in Whole Blood" } ], "text": "NAD+ 전혈 농도" }, "subject": { "reference": "Patient/PT-2025-001234" }, "effectiveDateTime": "2025-01-15T09:30:00Z", "issued": "2025-01-15T14:22:00Z", "performer": [ { "reference": "Organization/Lab-Seoul-Central" } ], "valueQuantity": { "value": 45.2, "unit": "μM", "system": "http://unitsofmeasure.org", "code": "umol/L" }, "referenceRange": [ { "low": { "value": 50, "unit": "μM" }, "high": { "value": 60, "unit": "μM" }, "text": "정상 범위" } ], "method": { "coding": [ { "system": "http://wia.org/fhir/CodeSystem/measurement-methods", "code": "HPLC-MS-MS", "display": "High-Performance Liquid Chromatography-Mass Spectrometry" } ] } }

1.4 FHIR DiagnosticReport - 바이오마커 패널

{ "resourceType": "DiagnosticReport", "id": "BM-2025-001234-001", "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0074", "code": "LAB", "display": "Laboratory" } ] } ], "code": { "coding": [ { "system": "http://wia.org/fhir/CodeSystem/diagnostic-panels", "code": "AD-BIOMARKER-PANEL", "display": "Alzheimer's Disease Biomarker Panel" } ], "text": "알츠하이머 혈장 바이오마커 패널" }, "subject": { "reference": "Patient/PT-2025-001234" }, "effectiveDateTime": "2025-01-15T09:30:00Z", "issued": "2025-01-15T16:45:00Z", "performer": [ { "reference": "Organization/Lab-Seoul-Central" } ], "result": [ { "reference": "Observation/ABETA42-2025-001234-001", "display": "Plasma Aβ42: 320 pg/mL" }, { "reference": "Observation/ABETA40-2025-001234-001", "display": "Plasma Aβ40: 1850 pg/mL" }, { "reference": "Observation/PTAU181-2025-001234-001", "display": "Plasma p-tau181: 2.8 pg/mL" }, { "reference": "Observation/NFL-2025-001234-001", "display": "Plasma NfL: 18.5 pg/mL" } ], "conclusion": "Aβ42/40 비율 0.173은 아밀로이드 양성 기준(< 0.065) 미달. 추가 아밀로이드 PET 검사 권장.", "conclusionCode": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "113091000119105", "display": "Dementia due to Alzheimer disease (disorder)" } ] } ] }

2. EHR 시스템 통합

미국 의료기관의 80% 이상이 사용하는 Epic과 Cerner EHR 시스템과의 양방향 통합을 지원합니다.

2.1 Epic FHIR API 연동

Epic은 FHIR R4를 기본 지원하며, App Orchard를 통해 타사 애플리케이션과 연동합니다.

# Epic FHIR API 통합 예제 ## 1단계: Epic App Orchard 등록 - https://apporchard.epic.com/ 접속 - WIA Alzheimer's Treatment System 앱 등록 - Production Client ID 발급 받기 ## 2단계: OAuth 2.0 인증 (SMART on FHIR) # Authorization URL GET https://fhir.epic.com/interconnect-fhir-oauth/oauth2/authorize? response_type=code& client_id=YOUR_EPIC_CLIENT_ID& redirect_uri=https://wia-alzheimers.org/callback& scope=patient/Patient.read patient/Observation.read patient/Observation.write& state=RANDOM_STATE& aud=https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4 # Token Exchange POST https://fhir.epic.com/interconnect-fhir-oauth/oauth2/token Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& code=AUTHORIZATION_CODE& client_id=YOUR_EPIC_CLIENT_ID& redirect_uri=https://wia-alzheimers.org/callback ## 3단계: 환자 데이터 조회 GET https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/Patient/eKVU4RbVdh.BvE9kUU0cqiA3 Authorization: Bearer {access_token} Accept: application/fhir+json ## 4단계: NAD+ 측정 결과 전송 POST https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/Observation Authorization: Bearer {access_token} Content-Type: application/fhir+json { "resourceType": "Observation", "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "95232-1", "display": "NAD in Blood" } ] }, "subject": { "reference": "Patient/eKVU4RbVdh.BvE9kUU0cqiA3" }, "effectiveDateTime": "2025-01-15T09:30:00Z", "valueQuantity": { "value": 45.2, "unit": "μM", "system": "http://unitsofmeasure.org", "code": "umol/L" } }

2.2 Cerner HealtheIntent 통합

Cerner HealtheIntent는 인구 건강 관리 플랫폼으로, HL7 v2 메시지와 FHIR API를 모두 지원합니다.

데이터 유형 HL7 v2 메시지 FHIR 리소스 빈도
환자 등록 ADT^A04 (Register Patient) Patient 실시간
검사 오더 ORM^O01 (Order Message) ServiceRequest 실시간
검사 결과 ORU^R01 (Observation Result) Observation 실시간
약물 투여 RAS^O17 (Pharmacy Administration) MedicationAdministration 실시간
임상 문서 MDM^T02 (Document Notification) DocumentReference 배치
# Cerner HL7 v2 메시지 - NAD+ 검사 결과 MSH|^~\&|WIA-LAB|SeoulCentral|CERNER|HospitalA|20250115143000||ORU^R01|MSG20250115001|P|2.5 PID|1||PT-2025-001234||홍^길동||19500315|M|||서울시 강남구||||||||||||||||||| OBR|1|ORD20250115001|SPEC20250115001|95232-1^NAD in Blood^LN|||20250115093000 OBX|1|NM|95232-1^NAD in Blood^LN||45.2|umol/L|50-60|L|||F|||20250115142200|||HPLC-MS/MS NTE|1|L|NAD+ 수치가 정상 범위 하한보다 낮습니다. NR 보충을 고려하세요.

3. 검사실 정보 시스템(LIS) 연동

NAD+ 측정 및 바이오마커 분석 결과를 자동으로 수집하기 위해 주요 LIS와 통합합니다.

3.1 지원 LIS 목록

LIS 제품 제조사 통합 방식 시장 점유율
Beaker LIS Epic Systems FHIR R4, HL7 v2 28%
Sunquest Roper Technologies HL7 v2, API 22%
Cerner Millennium PathNet Oracle Cerner FHIR R4, HL7 v2 18%
Soft Computer LABMS Roper Technologies HL7 v2 12%
Meditech Expanse Meditech FHIR R4, HL7 v2 10%

3.2 LIS 자동 결과 수신 워크플로우

# LIS 통합 워크플로우 ┌─────────────────┐ │ 검사 장비 │ Quanterix Simoa HD-X (p-tau181 분석) │ (Analyzer) │ HPLC-MS/MS (NAD+ 분석) └────────┬────────┘ │ ASTM E1394 또는 HL7 v2 ↓ ┌─────────────────┐ │ LIS │ Beaker LIS / Sunquest │ │ - 결과 검증 │ │ - QC 확인 │ │ - 참고범위 적용 └────────┬────────┘ │ HL7 ORU^R01 또는 FHIR Observation ↓ ┌─────────────────┐ │ Interface │ Mirth Connect / Rhapsody │ Engine │ - 메시지 변환 │ │ - 라우팅 │ │ - 에러 처리 └────────┬────────┘ │ HTTPS POST (JSON) ↓ ┌─────────────────┐ │ WIA API │ https://api.wia-alzheimers.org/v1/observations │ │ - 인증 확인 │ │ - 데이터 검증 │ │ - 데이터베이스 저장 └────────┬────────┘ │ ↓ ┌─────────────────┐ │ 알림 서비스 │ - 의료진에게 이메일/SMS │ │ - 이상 수치 알림 │ │ - 환자 포털 업데이트 └─────────────────┘ # Mirth Connect 채널 설정 예제 (JavaScript) // Source: HL7 v2 Listener (Port 6661) // Destination: WIA API // HL7 메시지 파싱 var pid = msg['PID']; var obx = msg['OBX']; var patientId = pid['PID.3']['PID.3.1'].toString(); var testCode = obx['OBX.3']['OBX.3.1'].toString(); var testValue = parseFloat(obx['OBX.4']['OBX.4.1'].toString()); var testUnit = obx['OBX.6']['OBX.6.1'].toString(); var testDate = obx['OBX.14']['OBX.14.1'].toString(); // WIA API 페이로드 생성 var payload = { "patient_id": patientId, "observation_type": testCode, "value": testValue, "unit": testUnit, "effective_date_time": convertHL7Date(testDate), "status": "final" }; // API 호출 var response = router.routeMessage('WIA_API_Destination', JSON.stringify(payload));

4. 웨어러블 기기 데이터 통합

수면 패턴, 활동량, 심박수 등 웨어러블 기기 데이터는 알츠하이머 환자의 일상 기능을 모니터링하는 중요한 지표입니다. WIA 표준은 주요 웨어러블 플랫폼과 통합합니다.

4.1 지원 웨어러블 기기

기기 API 수집 데이터 동기화 빈도
Apple Watch HealthKit 심박수, 활동량, 수면, 심전도 실시간 (앱 사용 시)
Fitbit Fitbit Web API 걸음 수, 수면 단계, 심박수 변이도 15분마다
Samsung Galaxy Watch Samsung Health SDK 수면, 스트레스, 혈압, 활동량 1시간마다
Garmin Garmin Health API 수면 점수, VO2 max, 스트레스 1시간마다
Oura Ring Oura API v2 수면 단계, HRV, 체온, 활동 1일 1회 (오전)

4.2 Apple HealthKit 통합 예제

// Swift - Apple HealthKit 데이터 수집 import HealthKit class WIAHealthKitManager { let healthStore = HKHealthStore() // 권한 요청 func requestAuthorization(completion: @escaping (Bool) -> Void) { let readTypes: Set = [ HKObjectType.quantityType(forIdentifier: .stepCount)!, HKObjectType.quantityType(forIdentifier: .heartRate)!, HKObjectType.categoryType(forIdentifier: .sleepAnalysis)!, HKObjectType.quantityType(forIdentifier: .heartRateVariabilitySDNN)! ] healthStore.requestAuthorization(toShare: nil, read: readTypes) { success, error in completion(success) } } // 수면 데이터 조회 func fetchSleepData(completion: @escaping ([HKCategorySample]?) -> Void) { let sleepType = HKObjectType.categoryType(forIdentifier: .sleepAnalysis)! let sortDescriptor = NSSortDescriptor(key: HKSampleSortIdentifierEndDate, ascending: false) let query = HKSampleQuery(sampleType: sleepType, predicate: nil, limit: 100, sortDescriptors: [sortDescriptor]) { query, results, error in guard let samples = results as? [HKCategorySample] else { completion(nil) return } completion(samples) } healthStore.execute(query) } // WIA API로 전송 func uploadToWIA(samples: [HKCategorySample], patientId: String) { var observations: [[String: Any]] = [] for sample in samples { let observation: [String: Any] = [ "patient_id": patientId, "observation_type": "sleep", "value": sample.value, // 0: inBed, 1: asleep, 2: awake "start_time": ISO8601DateFormatter().string(from: sample.startDate), "end_time": ISO8601DateFormatter().string(from: sample.endDate), "source": "Apple HealthKit" ] observations.append(observation) } // API 호출 let url = URL(string: "https://api.wia-alzheimers.org/v1/wearable-data")! var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization") request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.httpBody = try? JSONSerialization.data(withJSONObject: observations) URLSession.shared.dataTask(with: request) { data, response, error in // 처리 로직 }.resume() } }

4.3 Fitbit API 통합

# Python - Fitbit Web API 데이터 수집 import requests from datetime import datetime, timedelta class WIAFitbitIntegration: def __init__(self, access_token): self.access_token = access_token self.base_url = "https://api.fitbit.com/1/user/-" def get_sleep_data(self, date): """수면 데이터 조회""" url = f"{self.base_url}/sleep/date/{date}.json" headers = {"Authorization": f"Bearer {self.access_token}"} response = requests.get(url, headers=headers) return response.json() def get_heart_rate_variability(self, date): """심박수 변이도(HRV) 조회""" url = f"{self.base_url}/hrv/date/{date}.json" headers = {"Authorization": f"Bearer {self.access_token}"} response = requests.get(url, headers=headers) return response.json() def upload_to_wia(self, patient_id, date): """WIA API로 데이터 업로드""" # 수면 데이터 sleep_data = self.get_sleep_data(date) hrv_data = self.get_heart_rate_variability(date) wia_payload = { "patient_id": patient_id, "date": date, "wearable_type": "fitbit", "metrics": { "sleep": { "total_minutes": sleep_data["summary"]["totalMinutesAsleep"], "deep_sleep_minutes": sleep_data["summary"]["stages"]["deep"], "rem_sleep_minutes": sleep_data["summary"]["stages"]["rem"], "light_sleep_minutes": sleep_data["summary"]["stages"]["light"], "awake_minutes": sleep_data["summary"]["stages"]["wake"], "sleep_efficiency": sleep_data["summary"]["efficiency"] }, "hrv": { "rmssd": hrv_data["hrv"][0]["value"]["dailyRmssd"], "deep_rmssd": hrv_data["hrv"][0]["value"]["deepRmssd"] } } } # WIA API 호출 response = requests.post( "https://api.wia-alzheimers.org/v1/wearable-data", headers={ "Authorization": f"Bearer {WIA_ACCESS_TOKEN}", "Content-Type": "application/json" }, json=wia_payload ) return response.status_code == 201 # 사용 예제 fitbit = WIAFitbitIntegration(access_token="FITBIT_ACCESS_TOKEN") today = datetime.now().strftime("%Y-%m-%d") fitbit.upload_to_wia(patient_id="PT-2025-001234", date=today)

5. WIA 생태계 통합

WIA 알츠하이머 치료 표준은 다른 WIA 표준들과 연동하여 통합 의료 플랫폼을 구축합니다.

5.1 WIA 표준 간 연동

WIA 표준 연동 목적 데이터 교환
WIA-EHR 전자건강기록 통합 환자 기본 정보, 진료 기록, 약물 이력
WIA-GENOMICS 유전자 검사 결과 APOE 유전자형, 위험 다형성(SNP)
WIA-IMAGING 영상 진단 통합 MRI ARIA 모니터링, PET 아밀로이드 정량
WIA-PHARMACY 약물 관리 레카네맙/도나네맙 조제, NR/NMN 보충제 추적
WIA-CLINICAL-TRIALS 임상시험 등록 적격성 평가, 시험 참여 현황
WIA-AI-DIAGNOSTICS AI 진단 지원 인지 저하 예측, 치료 반응 예측

5.2 WIA 통합 API 게이트웨이

# WIA 통합 API 게이트웨이 아키텍처 ┌──────────────────────────────────────────────────────────────┐ │ WIA API Gateway │ │ https://api.wia.org/gateway │ │ │ │ - 인증/인가 (OAuth 2.0, JWT) │ │ - 요청 라우팅 │ │ - 속도 제한 │ │ - 로깅/모니터링 │ └────────────┬────────────────────────────────────────────────┘ │ ┌────────┴────────┬────────────┬────────────┬──────────────┐ │ │ │ │ │ ↓ ↓ ↓ ↓ ↓ ┌─────────┐ ┌──────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ WIA- │ │ WIA- │ │ WIA- │ │ WIA- │ │ WIA- │ │ ALZH │ │ GENOMICS │ │ IMAGING │ │ EHR │ │ AI │ └─────────┘ └──────────┘ └─────────┘ └─────────┘ └─────────┘ # API 게이트웨이 호출 예제 GET https://api.wia.org/gateway/alzheimers/v1/patients/PT-2025-001234/comprehensive-view Authorization: Bearer {wia_access_token} # 응답: 여러 WIA 서비스에서 데이터 집합 { "patient": { // WIA-EHR "id": "PT-2025-001234", "name": "홍길동", "age": 75 }, "genomics": { // WIA-GENOMICS "apoe_genotype": "ε3/ε4", "ad_risk_score": 0.68 }, "alzheimers": { // WIA-ALZHEIMERS "latest_assessment": { "mmse": 24, "nad_plus": 45.2, "abeta_ratio": 0.173 }, "current_treatments": [ {"agent": "lecanemab", "status": "active"}, {"agent": "NR", "dosage": "1000mg/day"} ] }, "imaging": { // WIA-IMAGING "latest_mri": { "date": "2025-01-12", "aria_e": false, "aria_h": false }, "amyloid_pet": { "date": "2024-12-15", "centiloid": 45 } }, "ai_predictions": { // WIA-AI-DIAGNOSTICS "12_month_decline_risk": 0.34, "treatment_response_probability": 0.72 } }

6. 데이터 교환 포맷 표준화

WIA 생태계 내 모든 시스템은 공통 데이터 교환 포맷을 사용합니다.

포맷 용도 장점 사용 사례
JSON RESTful API 가독성, 범용성 웹/모바일 앱, 실시간 데이터 교환
FHIR JSON 의료 데이터 교환 표준 준수, 상호운용성 EHR 통합, 병원 간 데이터 전송
Protocol Buffers 고성능 API 속도, 크기 효율 실시간 바이오마커 스트리밍
Avro 빅데이터 처리 스키마 진화, 압축 임상시험 대용량 데이터 분석
CSV 데이터 내보내기 범용성, 단순성 연구자 데이터 다운로드

7. 보안 및 프라이버시

모든 데이터 교환은 HIPAA, GDPR 등 국제 의료 데이터 보호 규정을 준수합니다.

보안 요구사항

8. 시스템 통합 체크리스트

# WIA 알츠하이머 시스템 통합 체크리스트 ## FHIR R5 호환성 ☐ Patient 리소스 매핑 완료 ☐ Observation 리소스 (NAD+, 인지 평가) 정의 ☐ DiagnosticReport (바이오마커 패널) 구현 ☐ CarePlan (치료 계획) 생성 자동화 ☐ MedicationAdministration (레카네맙 투여) 기록 ## EHR 통합 ☐ Epic App Orchard 등록 및 Production Client ID 발급 ☐ Cerner Code Console 계정 생성 ☐ SMART on FHIR 인증 플로우 구현 ☐ 환자 매칭 로직 (MRN, 이름, 생년월일) ☐ 양방향 데이터 동기화 테스트 ## LIS 연동 ☐ HL7 v2 인터페이스 엔진 설정 (Mirth/Rhapsody) ☐ ORU^R01 메시지 파싱 로직 구현 ☐ NAD+ LOINC 코드 매핑 (95232-1) ☐ 바이오마커 코드 매핑 (Aβ42, p-tau181, NfL) ☐ 자동 결과 수신 및 검증 ## 웨어러블 통합 ☐ Apple HealthKit 권한 설정 ☐ Fitbit Developer 계정 및 OAuth 설정 ☐ Samsung Health SDK 통합 ☐ 수면/활동 데이터 주기적 동기화 ☐ 이상 패턴 감지 알고리즘 ## WIA 생태계 ☐ WIA API Gateway 등록 ☐ WIA-GENOMICS APOE 데이터 연동 ☐ WIA-IMAGING MRI/PET 결과 연동 ☐ WIA-AI 예측 모델 API 호출 ☐ 통합 대시보드 구현 ## 보안/규정 준수 ☐ TLS 1.3 인증서 설치 ☐ OAuth 2.0 인증 구현 ☐ HIPAA BAA 체결 (클라우드 제공자) ☐ GDPR 데이터 처리 동의서 ☐ 감사 로그 시스템 구축

챕터 요약: 핵심 요점

복습 질문

  1. WIA 알츠하이머 시스템에서 사용하는 8개 FHIR R5 리소스를 나열하고, 각각 어떤 데이터를 표현하는지 설명하세요.
  2. Epic FHIR API와 통합할 때 필요한 OAuth 2.0 인증 플로우의 3단계를 순서대로 설명하고, 각 단계의 URL을 명시하세요.
  3. HL7 v2 ORU^R01 메시지의 구조를 설명하고, NAD+ 검사 결과(45.2 μM)를 전송하는 샘플 메시지의 OBX 세그먼트를 작성하세요.
  4. 웨어러블 기기(Apple Watch, Fitbit, Oura Ring) 중 2개를 선택하여, 수집하는 데이터 유형과 동기화 빈도를 비교하세요.
  5. WIA API Gateway를 통해 환자의 종합 뷰를 조회할 때, 어떤 WIA 서비스들이 호출되며 각각 어떤 데이터를 제공합니까?
  6. 의료 데이터 교환 시 HIPAA 준수를 위해 구현해야 하는 5가지 보안 요구사항을 나열하세요.