기본 URL: https://api-wialive.smilestory.ai/consciousness/v1 인증: - Bearer Token (JWT) - API Key (X-WIA-API-Key 헤더)
/measure
새 의식 측정 세션 시작
요청:
{
"subject_id": "uuid",
"method": "TMS-EEG",
"parameters": {
"tms_intensity": 80,
"pulse_count": 200
}
}
응답:
{
"measurement_id": "uuid",
"status": "initiated",
"estimated_duration": 1200
}
/pci/{subject_id}
피험자의 PCI 측정값 조회
응답:
{
"subject_id": "uuid",
"pci": {
"value": 0.48,
"classification": "MCS_plus",
"threshold_status": "above"
}
}
/phi/{subject_id}
통합정보(Φ) 추정값 조회
응답:
{
"phi_estimate": {
"value": 2.5,
"unit": "bits",
"method": "approximation"
}
}
/ai/assess
AI 시스템의 의식 지표 평가
요청:
{
"system_id": "gpt-4",
"system_type": "LLM"
}
응답:
{
"indicators": { ... },
"overall_assessment": {
"consciousness_likelihood": "uncertain"
}
}
WebSocket: wss://api-wialive.smilestory.ai/consciousness/v1/monitor/{subject_id}
구독 메시지:
{
"action": "subscribe",
"metrics": ["pci", "phi", "state"]
}
업데이트 이벤트:
{
"timestamp": "2025-01-15T10:30:00Z",
"pci": 0.45,
"phi_estimate": 2.3,
"state": "MCS_plus"
}
WIA-CONSCIOUSNESS API는 한국의 주요 의료기관에서 빠르게 채택되고 있으며, 전자의무기록(EMR) 시스템과의 통합을 통해 임상 워크플로우를 개선하고 있습니다.
| 의료기관 | EMR 시스템 | API 통합 상태 | 월간 API 호출 | 주요 사용 사례 |
|---|---|---|---|---|
| 서울대병원 | BESTCare 2.0 | 완전 통합 (2024.03) | ~45,000회 | 중환자실 의식 모니터링 |
| 연세 세브란스 | ECARE | 완전 통합 (2024.05) | ~38,000회 | 신경과 외래 평가 |
| 삼성서울병원 | Darwin-C | 파일럿 (2024.09) | ~12,000회 | 마취 깊이 모니터링 |
| 서울아산병원 | AMIS | 통합 중 (2025.01) | ~8,000회 | 뇌손상 환자 예후 예측 |
| 고려대 안암병원 | K-EMRS | 계획 단계 | - | 의식장애 진단 표준화 |
총 API 사용량 (2024년):
환자 데이터 보안을 위해 WIA-CONSCIOUSNESS API는 다층 인증 체계를 구현합니다:
| 인증 방식 | 사용 시나리오 | 보안 수준 | 만료 시간 |
|---|---|---|---|
| JWT Bearer Token | 웹 애플리케이션 | 높음 | 1시간 |
| API Key | 서버 간 통신 | 매우 높음 | 무기한 (회전 권장) |
| OAuth 2.0 | 제3자 앱 | 높음 | 토큰별 상이 |
| mTLS | 의료기관 전용 | 최고 | 인증서 기간 |
// KISA (한국인터넷진흥원) 의료정보 암호화 준수
{
"encryption": {
"at_rest": "AES-256-GCM",
"in_transit": "TLS 1.3",
"key_management": "AWS KMS (Seoul Region)"
},
"compliance": {
"standards": ["PIMS-P", "ISMS-P", "의료법 21조"],
"audit_log": true,
"data_residency": "한국 내 저장",
"retention_policy": "10년 (의료법 준수)"
},
"privacy": {
"anonymization": "k-익명성 (k=5)",
"consent_tracking": true,
"right_to_delete": "30일 이내 처리"
}
}
공정한 사용과 시스템 안정성을 위해 API 호출 제한을 적용합니다:
| 플랜 | 분당 요청 | 일일 요청 | 동시 측정 | 월 비용 |
|---|---|---|---|---|
| 연구용 (무료) | 10 | 1,000 | 2 | ₩0 |
| 클리닉 | 60 | 10,000 | 10 | ₩350,000 |
| 병원 | 300 | 100,000 | 50 | ₩1,800,000 |
| 대학병원 | 1,000 | 무제한 | 200 | ₩5,500,000 |
| 엔터프라이즈 | 맞춤형 | 무제한 | 무제한 | 협의 |
// Rate limit 헤더 응답 예시
HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1640000000
// 제한 초과 시
HTTP/1.1 429 Too Many Requests
Retry-After: 60
{
"error": "rate_limit_exceeded",
"message": "분당 요청 한도 초과",
"retry_after": 60
}
WIA-CONSCIOUSNESS API는 표준화된 오류 응답을 제공합니다:
| 오류 코드 | HTTP 상태 | 의미 | 해결 방법 |
|---|---|---|---|
| INVALID_METHOD | 400 | 지원하지 않는 측정 방법 | method 파라미터 확인 |
| MEASUREMENT_FAILED | 422 | 측정 중 기술적 오류 | 장비 연결 및 설정 확인 |
| SUBJECT_NOT_FOUND | 404 | 피험자 ID 없음 | subject_id 재확인 |
| AUTH_EXPIRED | 401 | 인증 토큰 만료 | 토큰 갱신 |
| INSUFFICIENT_DATA | 422 | Φ 계산에 데이터 부족 | 더 긴 EEG 기록 필요 |
import { ConsciousnessClient } from '@wia/consciousness';
const client = new ConsciousnessClient({
apiKey: 'your-api-key',
region: 'kr-seoul' // 한국 리전 사용
});
// 의식 측정 시작
const measurement = await client.measure({
subject_id: 'patient-001',
method: 'TMS-EEG',
parameters: {
tms_intensity: 80,
pulse_count: 200,
eeg_channels: 64
},
metadata: {
hospital: '서울대병원',
department: '신경과',
attending_physician: 'dr-kim-001'
}
});
console.log(`측정 ID: ${measurement.id}`);
// PCI 조회
const pci = await client.getPCI(measurement.subject_id);
console.log(`PCI: ${pci.value}`);
console.log(`분류: ${pci.classification}`);
if (pci.value > 0.31) {
console.log('✓ 의식 있음 (MCS+ 또는 정상)');
} else {
console.log('✗ 의식 불명확 (UWS 또는 MCS-)');
}
from wia_consciousness import ConsciousnessClient
client = ConsciousnessClient(
api_key='your-api-key',
region='kr-seoul'
)
# 실시간 모니터링 시작
async with client.monitor('patient-001') as stream:
async for event in stream:
print(f"PCI: {event.pci}, Φ: {event.phi_estimate}")
if event.pci < 0.25:
# 경고: 의식 수준 급격히 감소
await client.alert(
subject_id='patient-001',
alert_type='consciousness_drop',
recipients=['icu-team@hospital.kr']
)
서울대병원의 BESTCare 통합 사례를 소개합니다:
// BESTCare 2.0 통합 어댑터
class BestCareAdapter {
constructor(private wiaClient: ConsciousnessClient) {}
async syncPatientMeasurement(patientChartNo: string) {
// 1. BESTCare에서 환자 정보 조회
const patient = await this.bestcare.getPatient(patientChartNo);
// 2. WIA API로 의식 측정
const measurement = await this.wiaClient.measure({
subject_id: patient.uuid,
method: 'TMS-EEG',
metadata: {
chart_no: patientChartNo,
admission_date: patient.admission_date,
diagnosis: patient.primary_diagnosis
}
});
// 3. 결과를 BESTCare에 기록
await this.bestcare.addVitalSign({
chart_no: patientChartNo,
vital_type: 'CONSCIOUSNESS_PCI',
value: measurement.pci.value,
timestamp: measurement.timestamp,
source: 'WIA-CONSCIOUSNESS-API'
});
return measurement;
}
}
// 사용 예시
const adapter = new BestCareAdapter(wiaClient);
const result = await adapter.syncPatientMeasurement('12345678');
핵심 요점:
6장에서는 3단계: 프로토콜을 다룹니다. TMS-EEG 측정 프로토콜의 기술적 세부사항, 실시간 데이터 스트리밍, 그리고 한국 병원에서 실제 사용되는 측정 절차를 살펴봅니다. 서울대병원 신경과의 표준 TMS-EEG 프로토콜과 연세대 세브란스의 마취 깊이 모니터링 프로토콜을 구체적으로 소개할 예정입니다.
5장 완료 | 예상 페이지: 18쪽