snm / index.html
hunie's picture
치매진단 AI 어드민을 만들고 싶어 추론결과를 관리하는 용도로 - Initial Deployment
b29e90d verified
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>치매진단 AI 관리자 대시보드</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar-collapsed {
width: 70px;
}
.sidebar-expanded {
width: 250px;
}
.main-content {
transition: margin-left 0.3s ease;
}
.notification-badge {
position: absolute;
top: -5px;
right: -5px;
font-size: 10px;
background-color: #ef4444;
color: white;
border-radius: 50%;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
}
.patient-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.dark-mode {
background-color: #1a202c;
color: #f7fafc;
}
.dark-mode .bg-white {
background-color: #2d3748 !important;
color: #f7fafc !important;
}
.dark-mode .text-gray-800 {
color: #f7fafc !important;
}
.dark-mode .border-gray-200 {
border-color: #4a5568 !important;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- 사이드바 -->
<div class="sidebar sidebar-expanded bg-blue-800 text-white flex flex-col">
<div class="p-4 flex items-center justify-between border-b border-blue-700">
<h1 class="text-xl font-bold whitespace-nowrap">치매진단 AI</h1>
<button id="toggleSidebar" class="text-white focus:outline-none">
<i class="fas fa-bars"></i>
</button>
</div>
<div class="p-4 border-b border-blue-700 flex items-center">
<div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center mr-3">
<i class="fas fa-user-md text-white"></i>
</div>
<div class="user-info whitespace-nowrap">
<p class="font-semibold">관리자 님</p>
<p class="text-xs text-blue-200">슈퍼관리자</p>
</div>
</div>
<nav class="flex-1 overflow-y-auto">
<ul class="space-y-2 p-2">
<li>
<a href="#" class="flex items-center p-3 rounded-lg bg-blue-700 text-white">
<i class="fas fa-tachometer-alt mr-3"></i>
<span class="whitespace-nowrap">대시보드</span>
</a>
</li>
<li>
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white">
<i class="fas fa-users mr-3"></i>
<span class="whitespace-nowrap">환자 관리</span>
</a>
</li>
<li>
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white">
<i class="fas fa-brain mr-3"></i>
<span class="whitespace-nowrap">진단 결과</span>
</a>
</li>
<li>
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white">
<i class="fas fa-chart-line mr-3"></i>
<span class="whitespace-nowrap">통계 분석</span>
</a>
</li>
<li>
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white">
<i class="fas fa-cog mr-3"></i>
<span class="whitespace-nowrap">시스템 설정</span>
</a>
</li>
<li>
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white">
<i class="fas fa-user-shield mr-3"></i>
<span class="whitespace-nowrap">권한 관리</span>
</a>
</li>
</ul>
</nav>
<div class="p-4 border-t border-blue-700">
<button id="darkModeToggle" class="flex items-center p-3 rounded-lg hover:bg-blue-700 text-white w-full">
<i class="fas fa-moon mr-3"></i>
<span class="whitespace-nowrap">다크 모드</span>
</button>
</div>
</div>
<!-- 메인 콘텐츠 -->
<div class="main-content flex-1 overflow-auto" style="margin-left: 250px;">
<!-- 헤더 -->
<header class="bg-white shadow-sm p-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">대시보드</h2>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-600 focus:outline-none">
<i class="fas fa-bell text-xl"></i>
<span class="notification-badge">5</span>
</button>
</div>
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2">
<i class="fas fa-user text-blue-600"></i>
</div>
<span class="text-gray-700">관리자</span>
</div>
</div>
</header>
<!-- 메인 콘텐츠 영역 -->
<main class="p-6">
<!-- 요약 카드 -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">총 환자 수</p>
<h3 class="text-2xl font-bold text-gray-800">1,248</h3>
<p class="text-sm text-green-500 flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 12% 증가
</p>
</div>
<div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-users text-blue-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">오늘의 진단</p>
<h3 class="text-2xl font-bold text-gray-800">42</h3>
<p class="text-sm text-red-500 flex items-center">
<i class="fas fa-arrow-down mr-1"></i> 5% 감소
</p>
</div>
<div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center">
<i class="fas fa-brain text-green-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">치매 위험군</p>
<h3 class="text-2xl font-bold text-gray-800">187</h3>
<p class="text-sm text-green-500 flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 8% 증가
</p>
</div>
<div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center">
<i class="fas fa-exclamation-triangle text-yellow-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500">AI 정확도</p>
<h3 class="text-2xl font-bold text-gray-800">92.5%</h3>
<p class="text-sm text-green-500 flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 1.2% 향상
</p>
</div>
<div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center">
<i class="fas fa-robot text-purple-600 text-xl"></i>
</div>
</div>
</div>
</div>
<!-- 차트 영역 -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">주간 진단 추이</h3>
<select class="border border-gray-300 rounded px-3 py-1 text-sm focus:outline-none">
<option>최근 7일</option>
<option>최근 30일</option>
<option>최근 90일</option>
</select>
</div>
<canvas id="diagnosisChart" height="250"></canvas>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">치매 단계 분포</h3>
<select class="border border-gray-300 rounded px-3 py-1 text-sm focus:outline-none">
<option>전체</option>
<option>65세 이상</option>
<option>65세 미만</option>
</select>
</div>
<canvas id="dementiaStageChart" height="250"></canvas>
</div>
</div>
<!-- 최근 진단 결과 -->
<div class="bg-white rounded-lg shadow overflow-hidden mb-6">
<div class="p-6 border-b border-gray-200">
<h3 class="text-lg font-semibold text-gray-800">최근 진단 결과</h3>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">환자 ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">이름</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">나이</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">진단 일시</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">결과</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">확률</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">조치</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PT-10045</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">김철수</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">72</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15 14:30</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">고위험</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">87.3%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PT-10044</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">이영희</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">68</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15 13:15</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">중간위험</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">65.2%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PT-10043</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">박민수</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">75</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15 11:45</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">저위험</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32.1%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PT-10042</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">정순자</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">81</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15 10:20</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">고위험</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">91.5%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PT-10041</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">김영호</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">70</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15 09:30</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">중간위험</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">58.7%</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="px-6 py-4 bg-gray-50 text-right">
<button class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none">
더 보기 <i class="fas fa-chevron-right ml-1"></i>
</button>
</div>
</div>
<!-- 위험군 환자 카드 -->
<div class="mb-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">고위험군 환자 목록</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="patient-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
<div class="bg-red-600 px-4 py-2">
<h4 class="text-white font-semibold">김철수 (72세)</h4>
</div>
<div class="p-4">
<div class="flex justify-between mb-3">
<span class="text-sm text-gray-500">진단일: 2023-06-15</span>
<span class="text-sm font-semibold text-red-600">위험도: 87.3%</span>
</div>
<div class="mb-3">
<p class="text-sm text-gray-700">최근 증상: 기억력 저하, 길 찾기 어려움, 반복적인 질문</p>
</div>
<div class="flex justify-between">
<button class="text-sm text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-file-medical mr-1"></i> 상세 기록
</button>
<button class="text-sm bg-red-600 hover:bg-red-700 text-white px-3 py-1 rounded flex items-center">
<i class="fas fa-bell mr-1"></i> 알림 보내기
</button>
</div>
</div>
</div>
<div class="patient-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
<div class="bg-red-600 px-4 py-2">
<h4 class="text-white font-semibold">정순자 (81세)</h4>
</div>
<div class="p-4">
<div class="flex justify-between mb-3">
<span class="text-sm text-gray-500">진단일: 2023-06-15</span>
<span class="text-sm font-semibold text-red-600">위험도: 91.5%</span>
</div>
<div class="mb-3">
<p class="text-sm text-gray-700">최근 증상: 시간 개념 상실, 가족 인식 불가, 식사 거부</p>
</div>
<div class="flex justify-between">
<button class="text-sm text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-file-medical mr-1"></i> 상세 기록
</button>
<button class="text-sm bg-red-600 hover:bg-red-700 text-white px-3 py-1 rounded flex items-center">
<i class="fas fa-bell mr-1"></i> 알림 보내기
</button>
</div>
</div>
</div>
<div class="patient-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
<div class="bg-orange-500 px-4 py-2">
<h4 class="text-white font-semibold">이영희 (68세)</h4>
</div>
<div class="p-4">
<div class="flex justify-between mb-3">
<span class="text-sm text-gray-500">진단일: 2023-06-15</span>
<span class="text-sm font-semibold text-orange-600">위험도: 65.2%</span>
</div>
<div class="mb-3">
<p class="text-sm text-gray-700">최근 증상: 단기 기억력 저하, 계산 능력 감소, 기분 변화</p>
</div>
<div class="flex justify-between">
<button class="text-sm text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-file-medical mr-1"></i> 상세 기록
</button>
<button class="text-sm bg-orange-500 hover:bg-orange-600 text-white px-3 py-1 rounded flex items-center">
<i class="fas fa-bell mr-1"></i> 알림 보내기
</button>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
// 사이드바 토글 기능
const toggleSidebar = document.getElementById('toggleSidebar');
const sidebar = document.querySelector('.sidebar');
const mainContent = document.querySelector('.main-content');
const userInfo = document.querySelector('.user-info');
toggleSidebar.addEventListener('click', () => {
sidebar.classList.toggle('sidebar-collapsed');
sidebar.classList.toggle('sidebar-expanded');
if (sidebar.classList.contains('sidebar-collapsed')) {
mainContent.style.marginLeft = '70px';
userInfo.style.display = 'none';
} else {
mainContent.style.marginLeft = '250px';
userInfo.style.display = 'block';
}
});
// 다크 모드 토글 기능
const darkModeToggle = document.getElementById('darkModeToggle');
const body = document.body;
darkModeToggle.addEventListener('click', () => {
body.classList.toggle('dark-mode');
if (body.classList.contains('dark-mode')) {
darkModeToggle.innerHTML = '<i class="fas fa-sun mr-3"></i><span class="whitespace-nowrap">라이트 모드</span>';
} else {
darkModeToggle.innerHTML = '<i class="fas fa-moon mr-3"></i><span class="whitespace-nowrap">다크 모드</span>';
}
});
// 차트 초기화
document.addEventListener('DOMContentLoaded', function() {
// 주간 진단 추이 차트
const diagnosisCtx = document.getElementById('diagnosisChart').getContext('2d');
const diagnosisChart = new Chart(diagnosisCtx, {
type: 'line',
data: {
labels: ['6/9', '6/10', '6/11', '6/12', '6/13', '6/14', '6/15'],
datasets: [
{
label: '전체 진단 수',
data: [32, 28, 35, 40, 38, 45, 42],
borderColor: 'rgba(59, 130, 246, 1)',
backgroundColor: 'rgba(59, 130, 246, 0.1)',
tension: 0.3,
fill: true
},
{
label: '치매 위험군',
data: [8, 7, 9, 12, 10, 14, 11],
borderColor: 'rgba(239, 68, 68, 1)',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
mode: 'index',
intersect: false,
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// 치매 단계 분포 차트
const dementiaStageCtx = document.getElementById('dementiaStageChart').getContext('2d');
const dementiaStageChart = new Chart(dementiaStageCtx, {
type: 'doughnut',
data: {
labels: ['정상', '경도인지장애', '초기 치매', '중등도 치매', '중증 치매'],
datasets: [{
data: [650, 320, 187, 65, 26],
backgroundColor: [
'rgba(74, 222, 128, 0.8)',
'rgba(250, 204, 21, 0.8)',
'rgba(249, 115, 22, 0.8)',
'rgba(239, 68, 68, 0.8)',
'rgba(126, 34, 206, 0.8)'
],
borderColor: [
'rgba(74, 222, 128, 1)',
'rgba(250, 204, 21, 1)',
'rgba(249, 115, 22, 1)',
'rgba(239, 68, 68, 1)',
'rgba(126, 34, 206, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
},
tooltip: {
callbacks: {
label: function(context) {
const label = context.label || '';
const value = context.raw || 0;
const total = context.dataset.data.reduce((a, b) => a + b, 0);
const percentage = Math.round((value / total) * 100);
return `${label}: ${value} (${percentage}%)`;
}
}
}
}
}
});
// 다크 모드 변경 시 차트 업데이트
darkModeToggle.addEventListener('click', function() {
// 차트 색상 업데이트 로직 추가 가능
diagnosisChart.update();
dementiaStageChart.update();
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=hunie/snm" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>