| Server IP : 104.21.73.108 / Your IP : 216.73.216.59 Web Server : Apache/2 System : Linux cat167-197.static.lnwhostname.com 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 User : paphayomho ( 1042) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/paphayomho/domains/paphayomhospital.go.th/private_html/HA2569/ |
Upload File : |
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ผลการตรวจเวชระเบียน โรงพยาบาลป่าพะยอม</title>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Sarabun:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js"></script>
<style>
:root {
--primary: #0A5C7F;
--primary-dark: #064460;
--primary-light: #1A7FAD;
--accent: #00B4A0;
--accent-light: #E0F7F5;
--green: #2E7D32;
--green-light: #E8F5E9;
--amber: #F57C00;
--amber-light: #FFF3E0;
--red: #C62828;
--red-light: #FFEBEE;
--gray-50: #F8FAFC;
--gray-100: #F1F5F9;
--gray-200: #E2E8F0;
--gray-300: #CBD5E1;
--gray-600: #475569;
--gray-700: #334155;
--gray-900: #0F172A;
--white: #FFFFFF;
--sidebar-w: 240px;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
--shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
--shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
--radius: 12px;
--radius-sm: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Noto Sans Thai', 'Sarabun', sans-serif;
background: var(--gray-50);
color: var(--gray-700);
font-size: 14px;
line-height: 1.6;
}
/* ===== SIDEBAR ===== */
.sidebar {
position: fixed;
top: 0; left: 0;
width: var(--sidebar-w);
height: 100vh;
background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
z-index: 100;
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-logo {
padding: 24px 20px 20px;
border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-logo .hosp-name {
color: #fff;
font-size: 13px;
font-weight: 700;
line-height: 1.4;
margin-bottom: 4px;
}
.sidebar-logo .hosp-sub {
color: rgba(255,255,255,0.65);
font-size: 11px;
}
.sidebar-badge {
display: inline-flex;
align-items: center;
background: rgba(255,255,255,0.15);
color: #fff;
font-size: 10px;
font-weight: 600;
padding: 2px 8px;
border-radius: 20px;
margin-top: 6px;
letter-spacing: 0.5px;
}
.sidebar-nav {
flex: 1;
padding: 16px 0;
overflow-y: auto;
}
.nav-section-label {
color: rgba(255,255,255,0.45);
font-size: 10px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
padding: 12px 20px 6px;
}
.nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 20px;
color: rgba(255,255,255,0.75);
cursor: pointer;
transition: all 0.2s;
font-size: 13px;
font-weight: 500;
border-left: 3px solid transparent;
text-decoration: none;
}
.nav-item:hover, .nav-item.active {
background: rgba(255,255,255,0.1);
color: #fff;
border-left-color: var(--accent);
}
.nav-icon { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sidebar-footer {
padding: 16px 20px;
border-top: 1px solid rgba(255,255,255,0.12);
color: rgba(255,255,255,0.5);
font-size: 11px;
}
/* ===== MAIN CONTENT ===== */
.main {
margin-left: var(--sidebar-w);
min-height: 100vh;
}
.topbar {
background: var(--white);
border-bottom: 1px solid var(--gray-200);
padding: 14px 32px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 50;
box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.topbar-sub { font-size: 12px; color: var(--gray-600); margin-top: 1px; }
.btn-print {
display: flex; align-items: center; gap: 7px;
background: var(--primary);
color: #fff;
border: none;
padding: 9px 18px;
border-radius: var(--radius-sm);
font-family: inherit;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.btn-print:hover { background: var(--primary-dark); }
.content {
padding: 28px 32px;
max-width: 1280px;
}
/* ===== SECTIONS ===== */
.section {
margin-bottom: 36px;
scroll-margin-top: 80px;
}
.section-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 18px;
}
.section-icon {
width: 38px; height: 38px;
background: var(--primary);
border-radius: var(--radius-sm);
display: flex; align-items: center; justify-content: center;
color: #fff; font-size: 16px;
flex-shrink: 0;
}
.section-title {
font-size: 18px;
font-weight: 700;
color: var(--primary-dark);
}
.section-desc {
font-size: 12px;
color: var(--gray-600);
margin-top: 1px;
}
/* ===== CARDS ===== */
.card {
background: var(--white);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
border: 1px solid var(--gray-200);
padding: 20px;
}
.card-title {
font-size: 13px;
font-weight: 700;
color: var(--gray-700);
margin-bottom: 14px;
display: flex;
align-items: center;
gap: 8px;
}
/* ===== KPI TILES ===== */
.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 20px;
}
.kpi-tile {
background: var(--white);
border-radius: var(--radius);
padding: 20px;
box-shadow: var(--shadow-sm);
border: 1px solid var(--gray-200);
position: relative;
overflow: hidden;
}
.kpi-tile::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 4px;
}
.kpi-tile.blue::before { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.kpi-tile.green::before { background: linear-gradient(90deg, var(--green), #66BB6A); }
.kpi-tile.amber::before { background: linear-gradient(90deg, var(--amber), #FFB74D); }
.kpi-tile.teal::before { background: linear-gradient(90deg, var(--accent), #26C6DA); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 36px; font-weight: 800; color: var(--primary-dark); line-height: 1.1; margin: 8px 0 4px; }
.kpi-value.green-val { color: var(--green); }
.kpi-value.amber-val { color: var(--amber); }
.kpi-sub { font-size: 11px; color: var(--gray-600); }
.kpi-icon { position: absolute; top: 16px; right: 16px; font-size: 28px; opacity: 0.12; }
/* ===== CHARTS LAYOUT ===== */
.chart-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.chart-container { position: relative; height: 280px; }
.chart-note {
font-size: 11px;
color: var(--amber);
margin-top: 8px;
display: flex;
align-items: center;
gap: 4px;
}
/* ===== PROGRESS BARS ===== */
.progress-list { display: flex; flex-direction: column; gap: 12px; }
.progress-item { }
.progress-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
}
.progress-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.progress-pct {
font-size: 13px;
font-weight: 700;
}
.progress-bar-bg {
height: 10px;
background: var(--gray-100);
border-radius: 99px;
overflow: hidden;
}
.progress-bar-fill {
height: 100%;
border-radius: 99px;
transition: width 1s ease;
}
.bar-excellent { background: linear-gradient(90deg, #2E7D32, #66BB6A); }
.bar-good { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.bar-fair { background: linear-gradient(90deg, #F57C00, #FFB74D); }
.bar-weak { background: linear-gradient(90deg, #C62828, #EF5350); }
.pct-excellent { color: var(--green); }
.pct-good { color: var(--primary); }
.pct-fair { color: var(--amber); }
.pct-weak { color: var(--red); }
/* ===== STRENGTH/WEAK CARDS ===== */
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sw-card {
border-radius: var(--radius);
padding: 16px;
}
.sw-card.strength {
background: var(--green-light);
border: 1px solid #A5D6A7;
}
.sw-card.weakness {
background: var(--red-light);
border: 1px solid #FFCDD2;
}
.sw-card-title {
font-size: 13px;
font-weight: 700;
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 6px;
}
.sw-card.strength .sw-card-title { color: var(--green); }
.sw-card.weakness .sw-card-title { color: var(--red); }
.sw-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 0;
font-size: 12px;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.sw-item:last-child { border-bottom: none; }
.sw-badge {
font-weight: 700;
font-size: 12px;
padding: 2px 8px;
border-radius: 20px;
}
.badge-green { background: #A5D6A7; color: var(--green); }
.badge-red { background: #FFCDD2; color: var(--red); }
.badge-amber { background: #FFE0B2; color: var(--amber); }
/* ===== SCORE BAND ===== */
.score-bands {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 8px;
}
.score-band {
border-radius: var(--radius-sm);
padding: 14px 10px;
text-align: center;
}
.band-score { font-size: 22px; font-weight: 800; }
.band-range { font-size: 11px; font-weight: 600; margin-top: 2px; }
.band-label { font-size: 10px; margin-top: 4px; }
.band-5 { background: #E8F5E9; border: 2px solid #66BB6A; }
.band-5 .band-score, .band-5 .band-range { color: #2E7D32; }
.band-4 { background: #E3F2FD; border: 2px solid #42A5F5; }
.band-4 .band-score, .band-4 .band-range { color: #1565C0; }
.band-3 { background: #E0F7FA; border: 2px solid #26C6DA; }
.band-3 .band-score, .band-3 .band-range { color: #00838F; }
.band-2 { background: #FFF8E1; border: 2px solid #FFCA28; }
.band-2 .band-score, .band-2 .band-range { color: #F57F17; }
.band-1 { background: #FFF3E0; border: 2px solid #FFA726; }
.band-1 .band-score, .band-1 .band-range { color: #E65100; }
.band-0 { background: #FFEBEE; border: 2px solid #EF5350; }
.band-0 .band-score, .band-0 .band-range { color: #B71C1C; }
.current-band-marker {
display: inline-block;
background: var(--primary);
color: #fff;
font-size: 9px;
font-weight: 700;
padding: 2px 6px;
border-radius: 10px;
margin-top: 5px;
}
/* ===== INSIGHT CARDS ===== */
.insight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.insight-card {
border-radius: var(--radius);
padding: 18px;
border-left: 4px solid;
}
.insight-card.strength-c { background: var(--green-light); border-color: var(--green); }
.insight-card.weak-c { background: var(--red-light); border-color: var(--red); }
.insight-card.risk-c { background: var(--amber-light); border-color: var(--amber); }
.insight-card.oppo-c { background: var(--accent-light); border-color: var(--accent); }
.insight-tag {
font-size: 10px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 8px;
}
.insight-card.strength-c .insight-tag { color: var(--green); }
.insight-card.weak-c .insight-tag { color: var(--red); }
.insight-card.risk-c .insight-tag { color: var(--amber); }
.insight-card.oppo-c .insight-tag { color: var(--accent); }
.insight-title { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.insight-bullets { list-style: none; }
.insight-bullets li {
font-size: 12px;
color: var(--gray-700);
padding: 3px 0;
padding-left: 14px;
position: relative;
}
.insight-bullets li::before {
content: '▸';
position: absolute;
left: 0;
color: var(--gray-400, #9CA3AF);
}
/* ===== GAP ANALYSIS ===== */
.gap-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.gap-card {
background: var(--white);
border-radius: var(--radius);
padding: 16px 14px;
border: 1px solid var(--gray-200);
box-shadow: var(--shadow-sm);
text-align: center;
}
.gap-icon { font-size: 28px; margin-bottom: 8px; }
.gap-label { font-size: 12px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.gap-detail { font-size: 11px; color: var(--gray-600); line-height: 1.5; }
/* ===== PDSA ===== */
.pdsa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pdsa-card {
border-radius: var(--radius);
padding: 18px;
position: relative;
}
.pdsa-plan { background: #E3F2FD; border: 1px solid #90CAF9; }
.pdsa-do { background: #E8F5E9; border: 1px solid #A5D6A7; }
.pdsa-study { background: #FFF8E1; border: 1px solid #FFE082; }
.pdsa-act { background: #FCE4EC; border: 1px solid #F48FB1; }
.pdsa-letter {
font-size: 42px;
font-weight: 900;
opacity: 0.12;
position: absolute;
top: 8px;
right: 12px;
line-height: 1;
}
.pdsa-title {
font-size: 14px;
font-weight: 800;
margin-bottom: 10px;
}
.pdsa-plan .pdsa-title { color: #1565C0; }
.pdsa-do .pdsa-title { color: #2E7D32; }
.pdsa-study .pdsa-title { color: #E65100; }
.pdsa-act .pdsa-title { color: #AD1457; }
.pdsa-items { list-style: none; }
.pdsa-items li {
font-size: 12px;
color: var(--gray-700);
padding: 4px 0;
padding-left: 16px;
position: relative;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.pdsa-items li:last-child { border-bottom: none; }
.pdsa-items li::before {
content: '●';
position: absolute;
left: 0;
font-size: 6px;
top: 9px;
color: var(--gray-400, #9CA3AF);
}
/* ===== ACTION PLAN TABLE ===== */
.action-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.action-table th {
background: var(--primary);
color: #fff;
padding: 10px 14px;
text-align: left;
font-size: 12px;
font-weight: 600;
}
.action-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.action-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.action-table td {
padding: 10px 14px;
border-bottom: 1px solid var(--gray-200);
vertical-align: top;
line-height: 1.5;
}
.action-table tr:nth-child(even) td { background: var(--gray-50); }
.action-table tr:last-child td:first-child { border-radius: 0 0 0 var(--radius-sm); }
.action-table tr:last-child td:last-child { border-radius: 0 0 var(--radius-sm) 0; }
.priority-high {
background: var(--red-light);
color: var(--red);
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 20px;
display: inline-block;
}
.priority-med {
background: var(--amber-light);
color: var(--amber);
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 20px;
display: inline-block;
}
/* ===== HA READINESS ===== */
.ha-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ha-card {
background: var(--white);
border-radius: var(--radius);
padding: 18px;
border: 1px solid var(--gray-200);
box-shadow: var(--shadow-sm);
display: flex;
gap: 12px;
}
.ha-check {
width: 32px; height: 32px;
background: var(--green);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
color: #fff;
font-size: 16px;
flex-shrink: 0;
}
.ha-text { font-size: 12px; color: var(--gray-700); line-height: 1.5; }
.ha-text strong { display: block; font-size: 13px; color: var(--primary-dark); font-weight: 700; margin-bottom: 3px; }
/* ===== TREND SUMMARY ROW ===== */
.trend-summary {
background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
border-radius: var(--radius);
padding: 18px 24px;
color: #fff;
display: flex;
align-items: center;
gap: 32px;
margin-bottom: 20px;
}
.ts-item { text-align: center; }
.ts-year { font-size: 11px; opacity: 0.75; }
.ts-ipd { font-size: 22px; font-weight: 800; }
.ts-arrow { font-size: 24px; opacity: 0.5; }
.ts-label { font-size: 11px; opacity: 0.75; margin-top: 2px; }
.ts-trend { font-size: 11px; color: #A5D6A7; display: flex; align-items: center; gap: 3px; }
/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }
/* ===== NOTE BOX ===== */
.note-box {
background: var(--amber-light);
border: 1px solid #FFE0B2;
border-radius: var(--radius-sm);
padding: 10px 14px;
font-size: 12px;
color: #BF360C;
display: flex;
align-items: flex-start;
gap: 8px;
margin-top: 10px;
}
/* ===== PRINT ===== */
@media print {
.sidebar, .topbar, .btn-print { display: none !important; }
.main { margin-left: 0; }
.content { padding: 16px; max-width: 100%; }
.chart-row { grid-template-columns: 1fr; }
.pdsa-grid { grid-template-columns: repeat(2, 1fr); }
.score-bands { grid-template-columns: repeat(3, 1fr); }
.section { page-break-inside: avoid; }
@page { size: A4 landscape; margin: 15mm; }
}
@media (max-width: 900px) {
:root { --sidebar-w: 0px; }
.sidebar { display: none; }
.main { margin-left: 0; }
.content { padding: 16px; }
.chart-row, .pdsa-grid, .gap-grid, .ha-grid, .sw-grid, .insight-grid { grid-template-columns: 1fr; }
.score-bands { grid-template-columns: repeat(3, 1fr); }
}
</style>
</head>
<body>
<!-- SIDEBAR -->
<aside class="sidebar">
<div class="sidebar-logo">
<div class="hosp-name">🏥 โรงพยาบาลป่าพะยอม</div>
<div class="hosp-sub">จังหวัดพัทลุง | HCODE 11422</div>
<span class="sidebar-badge">Audit Chart Report</span>
</div>
<nav class="sidebar-nav">
<div class="nav-section-label">เนื้อหา</div>
<a class="nav-item active" href="#exec-summary" onclick="setActive(this)">
<span class="nav-icon">📊</span> Executive Summary
</a>
<a class="nav-item" href="#trend" onclick="setActive(this)">
<span class="nav-icon">📈</span> Trend Dashboard
</a>
<a class="nav-item" href="#opd" onclick="setActive(this)">
<span class="nav-icon">🔵</span> ผล OPD
</a>
<a class="nav-item" href="#ipd" onclick="setActive(this)">
<span class="nav-icon">🟢</span> ผล IPD
</a>
<a class="nav-item" href="#scoreband" onclick="setActive(this)">
<span class="nav-icon">⭐</span> Score Band
</a>
<a class="nav-item" href="#insight" onclick="setActive(this)">
<span class="nav-icon">💡</span> Quality Insight
</a>
<a class="nav-item" href="#gap" onclick="setActive(this)">
<span class="nav-icon">🔍</span> Gap Analysis
</a>
<a class="nav-item" href="#pdsa" onclick="setActive(this)">
<span class="nav-icon">🔄</span> CQI / PDSA
</a>
<a class="nav-item" href="#action" onclick="setActive(this)">
<span class="nav-icon">📋</span> Action Plan
</a>
<a class="nav-item" href="#ha" onclick="setActive(this)">
<span class="nav-icon">🏆</span> HA Survey Readiness
</a>
</nav>
<div class="sidebar-footer">
ปีงบประมาณ 2565–2568<br>
คณะทำงาน Audit Chart
</div>
</aside>
<!-- MAIN -->
<main class="main">
<div class="topbar">
<div>
<div class="topbar-title">ผลการตรวจเวชระเบียน โรงพยาบาลป่าพะยอม</div>
<div class="topbar-sub">Audit Chart Dashboard | ปีงบประมาณ 2565 – 2568 | เพื่อการพัฒนาคุณภาพ HA / สรพ.</div>
</div>
<button class="btn-print" onclick="window.print()">🖨️ พิมพ์ / Export PDF</button>
</div>
<div class="content">
<!-- 1. EXECUTIVE SUMMARY -->
<section class="section" id="exec-summary">
<div class="section-header">
<div class="section-icon">📊</div>
<div>
<div class="section-title">Executive Summary</div>
<div class="section-desc">ภาพรวมผลการตรวจเวชระเบียน ปีงบประมาณ 2568</div>
</div>
</div>
<div class="kpi-grid">
<div class="kpi-tile blue">
<span class="kpi-icon">📋</span>
<div class="kpi-label">OPD ปี 2568</div>
<div class="kpi-value">90.04%</div>
<div class="kpi-sub">⬇️ ลดลงจากปีก่อน (97.37%)</div>
</div>
<div class="kpi-tile green">
<span class="kpi-icon">🏥</span>
<div class="kpi-label">IPD ปี 2568</div>
<div class="kpi-value green-val">83.00%</div>
<div class="kpi-sub">⬆️ ดีขึ้นต่อเนื่องทุกปี</div>
</div>
<div class="kpi-tile amber">
<span class="kpi-icon">📁</span>
<div class="kpi-label">เวชระเบียน IPD ที่ตรวจ</div>
<div class="kpi-value amber-val">120</div>
<div class="kpi-sub">แฟ้ม | ต.ค. 2567 – มิ.ย. 2568</div>
</div>
<div class="kpi-tile teal">
<span class="kpi-icon">📅</span>
<div class="kpi-label">ระยะเวลา Audit</div>
<div class="kpi-value" style="font-size:22px;color:var(--accent)">4 ปี</div>
<div class="kpi-sub">2565 – 2568 ต่อเนื่อง</div>
</div>
</div>
<div class="card">
<div class="card-title">🎯 บริบทการตรวจเวชระเบียน</div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:20px;font-size:13px;color:var(--gray-700)">
<div>
<p>📌 <strong>วัตถุประสงค์:</strong> ตรวจความสมบูรณ์ของการบันทึกเวชระเบียน OPD และ IPD เพื่อพัฒนาคุณภาพข้อมูล ให้ถูกต้อง ครบถ้วน และสนับสนุนการดูแลผู้ป่วยที่ปลอดภัย</p>
<br>
<p>📌 <strong>ผู้รับผิดชอบ:</strong> คณะทำงาน Audit Chart เวชระเบียน โรงพยาบาลป่าพะยอม ดำเนินการทบทวนและรายงานผลต่อผู้อำนวยการโรงพยาบาลและทีม PCT</p>
</div>
<div>
<p>📌 <strong>ขอบเขต:</strong> ตรวจเวชระเบียนผู้ป่วยนอก (OPD) และผู้ป่วยใน (IPD) ครอบคลุมทุกหน่วยงานที่ให้บริการ</p>
<br>
<p>📌 <strong>การใช้ผล:</strong> นำผลไปพัฒนาระบบบันทึก จัดอบรม ทำ checklist และ feedback รายบุคคล/รายหน่วย เพื่อการพัฒนาคุณภาพอย่างต่อเนื่อง (CQI)</p>
</div>
</div>
</div>
</section>
<!-- 2. TREND DASHBOARD -->
<section class="section" id="trend">
<div class="section-header">
<div class="section-icon">📈</div>
<div>
<div class="section-title">Trend Dashboard</div>
<div class="section-desc">แนวโน้มผลการตรวจเวชระเบียน ปี 2565–2568 พร้อมการวิเคราะห์ปัจจัยที่ส่งผล</div>
</div>
</div>
<!-- Summary strip -->
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px">
<div class="trend-summary" style="flex-direction:column;gap:12px;align-items:flex-start">
<div style="font-size:13px;font-weight:800;color:#A5D6A7">📈 IPD — ดีขึ้นต่อเนื่องทุกปี</div>
<div style="display:flex;align-items:center;gap:14px;flex-wrap:wrap">
<div class="ts-item"><div class="ts-year">2565</div><div class="ts-ipd">73.42%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2566</div><div class="ts-ipd">77.44%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2567</div><div class="ts-ipd">80.70%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2568</div><div class="ts-ipd" style="color:#A5D6A7">83.00%</div></div>
<div style="margin-left:auto"><div style="font-size:11px;opacity:0.75">เพิ่มขึ้นรวม</div><div style="font-size:22px;font-weight:800;color:#A5D6A7">+9.58%</div></div>
</div>
<div style="font-size:11px;opacity:0.75;line-height:1.6">สะท้อนผลจากระบบ Audit feedback และ CQI ที่ต่อเนื่อง</div>
</div>
<div class="trend-summary" style="flex-direction:column;gap:12px;align-items:flex-start;background:linear-gradient(135deg,#5C4033,#8D6E63)">
<div style="font-size:13px;font-weight:800;color:#FFCCBC">📉 OPD — ลดลงปี 2568 (มีปัจจัยอธิบาย)</div>
<div style="display:flex;align-items:center;gap:14px;flex-wrap:wrap">
<div class="ts-item"><div class="ts-year">2565</div><div class="ts-ipd">96.55%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2566</div><div class="ts-ipd">97.37%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2567*</div><div class="ts-ipd">96.57%</div></div>
<div class="ts-arrow">→</div>
<div class="ts-item"><div class="ts-year">2568</div><div class="ts-ipd" style="color:#FFCCBC">90.04%</div></div>
<div style="margin-left:auto"><div style="font-size:11px;opacity:0.75">เปลี่ยนแปลง</div><div style="font-size:22px;font-weight:800;color:#FFCCBC">−7.33%</div></div>
</div>
<div style="font-size:11px;opacity:0.75;line-height:1.6">*ปี 2567: Chronic Case เท่านั้น</div>
</div>
</div>
<!-- Charts row -->
<div class="chart-row" style="margin-bottom:16px">
<div class="card">
<div class="card-title">📉 OPD แนวโน้มรายปี</div>
<div class="chart-container">
<canvas id="chartOPD"></canvas>
</div>
<div class="note-box" style="margin-top:10px">
⚠️ ปี 2567: ขอบเขตข้อมูลเป็น Chronic Case เท่านั้น (นิยามต่างจากปีอื่น)
</div>
</div>
<div class="card">
<div class="card-title">📈 IPD แนวโน้มรายปี</div>
<div class="chart-container">
<canvas id="chartIPD"></canvas>
</div>
<div style="margin-top:10px;background:var(--green-light);border-radius:8px;padding:10px 14px;font-size:12px;color:var(--green)">
✅ IPD ดีขึ้นต่อเนื่องทุกปี สะท้อนผลของการทบทวนและพัฒนาระบบบันทึกเวชระเบียนอย่างจริงจัง
</div>
</div>
</div>
<!-- HIS Change Analysis -->
<div class="card" style="border:2px solid var(--amber);background:linear-gradient(135deg,#FFFDE7,#FFF8E1)">
<div class="card-title" style="color:var(--amber);font-size:15px">🔍 การวิเคราะห์: ทำไม OPD ปี 2568 ลดลง?</div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:20px">
<div>
<div style="font-size:13px;font-weight:700;color:var(--primary-dark);margin-bottom:10px;display:flex;align-items:center;gap:8px">
<span style="background:var(--amber);color:#fff;border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800">1</span>
การเปลี่ยนระบบ HIS
</div>
<div style="font-size:12px;color:var(--gray-700);line-height:1.8;background:#fff;border-radius:8px;padding:12px;border:1px solid #FFE082">
<p>🖥️ โรงพยาบาลมีการ <strong>เปลี่ยนระบบ HIS</strong> ในช่วงปีงบประมาณ 2568 ส่งผลให้รูปแบบ แบบฟอร์ม และเมนูการบันทึกข้อมูลเปลี่ยนไปจากเดิม</p>
<br>
<p>👥 บุคลากรต้องใช้เวลาปรับตัวกับระบบใหม่ บางช่องข้อมูลมีตำแหน่งใหม่หรือโครงสร้างการบันทึกที่ต่างออกไป ทำให้ในช่วงแรกมีการบันทึกไม่ครบในบางหมวด</p>
</div>
</div>
<div>
<div style="font-size:13px;font-weight:700;color:var(--primary-dark);margin-bottom:10px;display:flex;align-items:center;gap:8px">
<span style="background:var(--amber);color:#fff;border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800">2</span>
การนำส่งข้อมูล 100% จากระบบใหม่
</div>
<div style="font-size:12px;color:var(--gray-700);line-height:1.8;background:#fff;border-radius:8px;padding:12px;border:1px solid #FFE082">
<p>📊 ระบบ HIS ใหม่ส่งข้อมูลสู่ระบบ Audit <strong>100% ของทุก encounter</strong> รวมถึงเวชระเบียนที่บันทึกไม่ครบระหว่างช่วงเปลี่ยนผ่าน</p>
<br>
<p>📁 เดิมระบบเก่า <strong>ไม่ได้ส่งข้อมูลทั้งหมด</strong> ทำให้ตัวเลข OPD ในปีก่อนหน้าดูสูงกว่าความเป็นจริง เพราะฐานการคำนวณมีขนาดเล็กกว่า</p>
</div>
</div>
</div>
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px">
<div style="background:#fff;border-radius:8px;padding:14px;border:1px solid #FFE082;text-align:center">
<div style="font-size:11px;font-weight:700;color:var(--amber);margin-bottom:4px">📌 ข้อสรุป</div>
<div style="font-size:12px;color:var(--gray-700);line-height:1.6">การลดลงของ OPD <strong>ไม่ได้สะท้อนคุณภาพการบันทึกที่แย่ลงจริง</strong> แต่เกิดจากฐานข้อมูลที่ครบถ้วนกว่าเดิม และช่วงเปลี่ยนระบบ</div>
</div>
<div style="background:#fff;border-radius:8px;padding:14px;border:1px solid #FFE082;text-align:center">
<div style="font-size:11px;font-weight:700;color:var(--primary);margin-bottom:4px">📈 ความน่าเชื่อถือ</div>
<div style="font-size:12px;color:var(--gray-700);line-height:1.6">ตัวเลขปี 2568 <strong>มีความแม่นยำสูงกว่า</strong> เพราะครอบคลุมข้อมูลจริงทั้งหมด ทำให้เห็นจุดอ่อนที่ต้องพัฒนาได้ชัดขึ้น</div>
</div>
<div style="background:#fff;border-radius:8px;padding:14px;border:1px solid #FFE082;text-align:center">
<div style="font-size:11px;font-weight:700;color:var(--green);margin-bottom:4px">🎯 แนวทางต่อไป</div>
<div style="font-size:12px;color:var(--gray-700);line-height:1.6">ใช้ปี 2568 เป็น <strong>Baseline ใหม่</strong> หลังเปลี่ยนระบบ HIS และตั้งเป้าพัฒนาขึ้นในปี 2569 ด้วยข้อมูลที่ครบถ้วนกว่า</div>
</div>
</div>
</div>
</section>
<!-- 3. OPD -->
<section class="section" id="opd">
<div class="section-header">
<div class="section-icon">🔵</div>
<div>
<div class="section-title">ผลการตรวจเวชระเบียนผู้ป่วยนอก (OPD)</div>
<div class="section-desc">แนวโน้มรายหมวด ปี 2565–2568 | คะแนนรวมปี 2568 = 90.04%</div>
</div>
</div>
<!-- Multi-year trend chart -->
<div class="card" style="margin-bottom:16px">
<div class="card-title">📊 แนวโน้มคะแนน OPD รายหมวด 4 ปี (2565–2568)</div>
<div class="chart-container" style="height:300px">
<canvas id="chartOPDTrend"></canvas>
</div>
<div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:11px">
<span style="color:#666">* ปี 2567: ข้อมูล Chronic Case เท่านั้น (คำนวณ % จาก raw score 0–7)</span>
<span style="color:#666">| ปี 2568: เริ่มนำส่งข้อมูล 100% จากระบบ HIS ใหม่</span>
</div>
</div>
<!-- Per-category trend table -->
<div class="card" style="margin-bottom:16px;padding:0;overflow:hidden">
<div style="padding:14px 20px;background:var(--primary);color:#fff;font-size:13px;font-weight:700">📋 ตารางเปรียบเทียบคะแนน OPD รายหมวดรายปี</div>
<table class="action-table">
<thead>
<tr>
<th>หมวด</th>
<th style="text-align:center">2565</th>
<th style="text-align:center">2566</th>
<th style="text-align:center">2567*</th>
<th style="text-align:center">2568</th>
<th>แนวโน้ม</th>
<th>วิเคราะห์</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Patient Profile</strong></td>
<td style="text-align:center;color:var(--green);font-weight:700">95.38%</td>
<td style="text-align:center;color:var(--green);font-weight:700">100.00%</td>
<td style="text-align:center;color:var(--green);font-weight:700">99.43%</td>
<td style="text-align:center;color:var(--primary);font-weight:700">94.43%</td>
<td><span style="color:var(--amber)">⬇️ ลดลงเล็กน้อย</span></td>
<td style="font-size:11px">ยังอยู่ระดับดีมาก ลดลงจากฐาน HIS ใหม่ที่ครบถ้วนกว่า</td>
</tr>
<tr>
<td><strong>History</strong></td>
<td style="text-align:center;color:var(--green);font-weight:700">94.60%</td>
<td style="text-align:center;color:var(--green);font-weight:700">94.41%</td>
<td style="text-align:center;color:var(--green);font-weight:700">88.57%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">76.54%</td>
<td><span style="color:var(--red)">⬇️⬇️ ลดลงต่อเนื่อง</span></td>
<td style="font-size:11px;color:var(--red)">⚠️ จุดอ่อนสำคัญ ต้องเร่งพัฒนา Chief complaint, Present illness</td>
</tr>
<tr>
<td><strong>Physical Exam / Diagnosis</strong></td>
<td style="text-align:center;color:var(--green);font-weight:700">97.65%</td>
<td style="text-align:center;color:var(--green);font-weight:700">96.67%</td>
<td style="text-align:center;color:var(--green);font-weight:700">94.43%</td>
<td style="text-align:center;color:var(--green);font-weight:700">96.48%</td>
<td><span style="color:var(--green)">➡️ คงที่ดี</span></td>
<td style="font-size:11px">จุดแข็งสม่ำเสมอ ยังอยู่เหนือ 94% ทุกปี</td>
</tr>
<tr>
<td><strong>Treatment / Investigation</strong></td>
<td style="text-align:center;color:var(--green);font-weight:700">99.05%</td>
<td style="text-align:center;color:var(--green);font-weight:700">98.62%</td>
<td style="text-align:center;color:var(--green);font-weight:700">~93%</td>
<td style="text-align:center;color:var(--green);font-weight:700">92.82%</td>
<td><span style="color:var(--amber)">⬇️ ลดลงเล็กน้อย</span></td>
<td style="font-size:11px">ยังอยู่ระดับดีมาก แต่ควรเฝ้าระวัง</td>
</tr>
<tr>
<td><strong>Follow Up</strong></td>
<td style="text-align:center;color:var(--gray-600)">N/A</td>
<td style="text-align:center;color:var(--gray-600)">N/A</td>
<td style="text-align:center;color:var(--gray-600)">N/A</td>
<td style="text-align:center;color:var(--green);font-weight:700">92.68%</td>
<td><span style="color:var(--gray-600)">— ข้อมูลเฉพาะปี 2568</span></td>
<td style="font-size:11px">เริ่มวัดปี 2568 อยู่ระดับดี</td>
</tr>
<tr style="background:var(--primary);color:#fff">
<td><strong>รวม OPD</strong></td>
<td style="text-align:center;font-weight:800">96.55%</td>
<td style="text-align:center;font-weight:800">97.37%</td>
<td style="text-align:center;font-weight:800">96.57%</td>
<td style="text-align:center;font-weight:800">90.04%</td>
<td><span style="color:#FFCCBC">⬇️ ลด (HIS ใหม่)</span></td>
<td style="font-size:11px;color:#fff">เปลี่ยนระบบ + ส่งข้อมูล 100%</td>
</tr>
</tbody>
</table>
</div>
<!-- Year 2568 detail + strength/weakness -->
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px">
<div class="card">
<div class="card-title">📋 ร้อยละความสมบูรณ์ OPD ปี 2568 รายหมวด</div>
<div class="progress-list">
<div class="progress-item">
<div class="progress-header">
<span class="progress-label">Physical Exam / Diagnosis <span style="font-size:10px;color:var(--green)">✅ จุดแข็งสม่ำเสมอ</span></span>
<span class="progress-pct pct-excellent">96.48%</span>
</div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:96.48%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header">
<span class="progress-label">Patient Profile</span>
<span class="progress-pct pct-excellent">94.43%</span>
</div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:94.43%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header">
<span class="progress-label">Treatment / Investigation</span>
<span class="progress-pct pct-excellent">92.82%</span>
</div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:92.82%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header">
<span class="progress-label">Follow Up</span>
<span class="progress-pct pct-excellent">92.68%</span>
</div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:92.68%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header">
<span class="progress-label">⚠️ History <span style="font-size:10px;color:var(--red)">ลดลงต่อเนื่อง 4 ปี</span></span>
<span class="progress-pct pct-fair">76.54%</span>
</div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-fair" style="width:76.54%"></div></div>
</div>
</div>
<div class="chart-container" style="height:200px;margin-top:14px">
<canvas id="chartOPDDetail"></canvas>
</div>
</div>
<div style="display:flex;flex-direction:column;gap:14px">
<div class="sw-card strength" style="flex:1">
<div class="sw-card-title">✅ จุดแข็ง OPD (คงที่สม่ำเสมอ)</div>
<div class="sw-item"><span>Physical Exam / Diagnosis</span><span class="sw-badge badge-green">96.48% ★ดีทุกปี</span></div>
<div class="sw-item"><span>Patient Profile</span><span class="sw-badge badge-green">94.43%</span></div>
<div class="sw-item"><span>Treatment / Investigation</span><span class="sw-badge badge-green">92.82%</span></div>
<div class="sw-item"><span>Follow Up</span><span class="sw-badge badge-green">92.68%</span></div>
</div>
<div class="sw-card weakness" style="flex:1">
<div class="sw-card-title">⚠️ จุดอ่อน OPD (ลดลงต่อเนื่อง)</div>
<div class="sw-item"><span>History ปี 2565</span><span class="sw-badge badge-green">94.60%</span></div>
<div class="sw-item"><span>History ปี 2566</span><span class="sw-badge badge-green">94.41%</span></div>
<div class="sw-item"><span>History ปี 2567*</span><span class="sw-badge badge-amber">88.57%</span></div>
<div class="sw-item"><span>History ปี 2568</span><span class="sw-badge badge-red">76.54% ⬇️</span></div>
<div style="font-size:11px;color:var(--gray-600);margin-top:8px;line-height:1.6">
สาเหตุ: ไม่บันทึก Chief complaint, Present illness, Underlying disease, ประวัติยา/แพ้ยา, ประวัติสารเสพติด, ประจำเดือน
</div>
</div>
</div>
</div>
</section>
<!-- 4. IPD -->
<section class="section" id="ipd">
<div class="section-header">
<div class="section-icon">🟢</div>
<div>
<div class="section-title">ผลการตรวจเวชระเบียนผู้ป่วยใน (IPD)</div>
<div class="section-desc">แนวโน้มรายหมวด ปี 2565–2568 | คะแนนรวมปี 2568 = 83.00% | ตรวจ 120 แฟ้ม</div>
</div>
</div>
<!-- Multi-year trend chart -->
<div class="card" style="margin-bottom:16px">
<div class="card-title">📊 แนวโน้มคะแนน IPD รายหมวด 4 ปี (2565–2568)</div>
<div class="chart-container" style="height:320px">
<canvas id="chartIPDTrend"></canvas>
</div>
<div style="font-size:11px;color:var(--gray-600);margin-top:8px">
* Labour record ปี 2565–2566: ค่าต่ำเพราะนับทุก encounter (ไม่ใช่เฉพาะ case คลอด) | ปี 2568: ตรวจเฉพาะ 20 แฟ้มที่เกี่ยวข้อง = 100%
</div>
</div>
<!-- Per-category trend table -->
<div class="card" style="margin-bottom:16px;padding:0;overflow:hidden">
<div style="padding:14px 20px;background:var(--green);color:#fff;font-size:13px;font-weight:700">📋 ตารางเปรียบเทียบคะแนน IPD รายหมวดรายปี</div>
<table class="action-table">
<thead>
<tr>
<th>หมวด</th>
<th style="text-align:center">2565</th>
<th style="text-align:center">2566</th>
<th style="text-align:center">2567</th>
<th style="text-align:center">2568</th>
<th>แนวโน้ม</th>
<th>วิเคราะห์</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Discharge summary Dx., OP</strong></td>
<td style="text-align:center;color:var(--green);font-weight:700">93.20%</td>
<td style="text-align:center;color:var(--green);font-weight:700">94.34%</td>
<td style="text-align:center;color:var(--green);font-weight:700">93.75%</td>
<td style="text-align:center;color:var(--primary);font-weight:700">85.00%</td>
<td><span style="color:var(--amber)">⬇️ ลดลงปี 2568</span></td>
<td style="font-size:11px">เคยดีต่อเนื่อง ลดลงจากระบบ HIS ใหม่ ยังเหนือ 85%</td>
</tr>
<tr>
<td><strong>Discharge summary Other</strong></td>
<td style="text-align:center;color:var(--primary);font-weight:700">84.66%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">78.79%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">75.80%</td>
<td style="text-align:center;color:var(--green);font-weight:700">88.00%</td>
<td><span style="color:var(--green)">⬆️ ดีขึ้นล่าสุด</span></td>
<td style="font-size:11px;color:var(--green)">ฟื้นตัวดีในปี 2568 หลังลดลง 2 ปีต่อเนื่อง</td>
</tr>
<tr>
<td><strong>Informed consent</strong></td>
<td style="text-align:center;color:var(--amber);font-weight:700">67.08%</td>
<td style="text-align:center;color:var(--green);font-weight:700">89.58%</td>
<td style="text-align:center;color:var(--green);font-weight:700">83.90%</td>
<td style="text-align:center;color:var(--primary);font-weight:700">80.00%</td>
<td><span style="color:var(--amber)">↗️ ดีขึ้นจากปี 2565</span></td>
<td style="font-size:11px">ดีขึ้นมากจากปี 2565 (67% → 80%) แต่ยังต้องพัฒนา</td>
</tr>
<tr>
<td><strong>History</strong></td>
<td style="text-align:center;color:var(--red);font-weight:700">62.55%</td>
<td style="text-align:center;color:var(--green);font-weight:700">89.58%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">72.90%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">74.00%</td>
<td><span style="color:var(--amber)">↗️ ดีขึ้นจาก 2565</span></td>
<td style="font-size:11px;color:var(--amber)">ดีขึ้นจาก 2565 แต่ผันผวน ยังต้องพัฒนาต่อเนื่อง</td>
</tr>
<tr>
<td><strong>Physical exam</strong></td>
<td style="text-align:center;color:var(--amber);font-weight:700">67.90%</td>
<td style="text-align:center;color:var(--green);font-weight:700">93.75%</td>
<td style="text-align:center;color:var(--red);font-weight:700">54.08%</td>
<td style="text-align:center;color:var(--red);font-weight:700">66.00%</td>
<td><span style="color:var(--red)">⚠️ ผันผวนสูง</span></td>
<td style="font-size:11px;color:var(--red)">จุดอ่อนอันดับ 1 ปี 2568 ผันผวนมาก ต้องเร่งแก้ไข</td>
</tr>
<tr>
<td><strong>Progress note</strong></td>
<td style="text-align:center;color:var(--amber);font-weight:700">72.02%</td>
<td style="text-align:center;color:var(--green);font-weight:700">97.74%</td>
<td style="text-align:center;color:var(--green);font-weight:700">93.99%</td>
<td style="text-align:center;color:var(--green);font-weight:700">96.00%</td>
<td><span style="color:var(--green)">⬆️⬆️ ดีขึ้นมาก</span></td>
<td style="font-size:11px;color:var(--green)">จุดแข็งปัจจุบัน ดีขึ้นอย่างชัดเจนตั้งแต่ปี 2566</td>
</tr>
<tr>
<td><strong>Nurses' note helpful</strong></td>
<td style="text-align:center;color:var(--amber);font-weight:700">72.02%</td>
<td style="text-align:center;color:var(--amber);font-weight:700">76.35%</td>
<td style="text-align:center;color:var(--green);font-weight:700">89.12%</td>
<td style="text-align:center;color:var(--green);font-weight:700">92.00%</td>
<td><span style="color:var(--green)">⬆️⬆️ ดีขึ้นต่อเนื่อง</span></td>
<td style="font-size:11px;color:var(--green)">พัฒนาดีขึ้นทุกปี เป็นจุดแข็งที่ชัดเจน</td>
</tr>
<tr style="background:var(--green);color:#fff">
<td><strong>รวม IPD</strong></td>
<td style="text-align:center;font-weight:800">73.42%</td>
<td style="text-align:center;font-weight:800">77.44%</td>
<td style="text-align:center;font-weight:800">80.70%</td>
<td style="text-align:center;font-weight:800">83.00%</td>
<td><span style="color:#A5D6A7">⬆️ ดีขึ้นทุกปี</span></td>
<td style="font-size:11px;color:#fff">+9.58% ใน 4 ปี สะท้อน CQI ที่ได้ผล</td>
</tr>
</tbody>
</table>
</div>
<!-- 2568 detail + strength/weakness -->
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px">
<div class="card">
<div class="card-title">📊 IPD ปี 2568 รายหมวด | 120 แฟ้ม</div>
<div class="progress-list">
<div class="progress-item">
<div class="progress-header"><span class="progress-label">🏆 Labour record <span style="font-size:10px;color:var(--green)">(n=20)</span></span><span class="progress-pct pct-excellent">100%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:100%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">Progress note <span style="font-size:10px;color:var(--green)">↑ จาก 72%→96%</span></span><span class="progress-pct pct-excellent">96%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:96%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">Nurses' note helpful <span style="font-size:10px;color:var(--green)">↑ต่อเนื่อง</span></span><span class="progress-pct pct-excellent">92%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-excellent" style="width:92%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">Discharge summary Other <span style="font-size:10px;color:var(--green)">↑ฟื้นตัว</span></span><span class="progress-pct pct-excellent">88%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-good" style="width:88%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">Discharge summary Dx., OP</span><span class="progress-pct pct-excellent">85%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-good" style="width:85%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">Informed consent</span><span class="progress-pct pct-fair">80%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-fair" style="width:80%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">⚠️ History</span><span class="progress-pct pct-fair">74%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-fair" style="width:74%"></div></div>
</div>
<div class="progress-item">
<div class="progress-header"><span class="progress-label">🔴 Physical exam <span style="font-size:10px;color:var(--red)">ผันผวนสูง</span></span><span class="progress-pct pct-weak">66%</span></div>
<div class="progress-bar-bg"><div class="progress-bar-fill bar-weak" style="width:66%"></div></div>
</div>
</div>
<div style="font-size:11px;color:var(--gray-600);margin-top:8px">* Consultation, Anaesthetic, Operative, Rehabilitation record: ไม่มีข้อมูลในไฟล์ (N/A)</div>
</div>
<div style="display:flex;flex-direction:column;gap:14px">
<div class="card" style="background:var(--green-light);border:1px solid #A5D6A7">
<div class="card-title" style="color:var(--green)">✅ จุดแข็ง IPD — พัฒนาดีขึ้นชัดเจน</div>
<div class="sw-item"><span>Labour record (n=20)</span><span class="sw-badge badge-green">100% ★</span></div>
<div class="sw-item"><span>Progress note (2565: 72% → 2568: 96%)</span><span class="sw-badge badge-green">+24% ⬆️</span></div>
<div class="sw-item"><span>Nurses' note (2565: 72% → 2568: 92%)</span><span class="sw-badge badge-green">+20% ⬆️</span></div>
<div class="sw-item"><span>Informed consent (2565: 67% → 2568: 80%)</span><span class="sw-badge badge-green">+13% ⬆️</span></div>
<div style="margin-top:8px;font-size:11px;color:var(--green);background:#C8E6C9;border-radius:6px;padding:8px">
💡 Progress note และ Nurses' note เป็นความสำเร็จของ CQI ที่เห็นได้ชัด สะท้อนการพัฒนาของทีมการพยาบาล
</div>
</div>
<div class="card" style="background:var(--red-light);border:1px solid #FFCDD2;flex:1">
<div class="card-title" style="color:var(--red)">⚠️ จุดอ่อน IPD — ต้องพัฒนาเร่งด่วน</div>
<div class="sw-item"><span>Physical exam (ผันผวน 54–94%)</span><span class="sw-badge badge-red">66% 🔴</span></div>
<div class="sw-item"><span>History (ผันผวน 63–90%)</span><span class="sw-badge badge-amber">74% ⚠️</span></div>
<div class="sw-item"><span>Informed consent</span><span class="sw-badge badge-amber">80%</span></div>
<div style="margin-top:8px;font-size:11px;color:var(--gray-700);line-height:1.7">
<strong>Physical exam:</strong> ไม่บันทึก PE แรกเข้า ไม่มีชื่อ/ลายเซ็นผู้ตรวจ, Vital signs ไม่ครบ<br>
<strong>History:</strong> ไม่บันทึกอาการ ระยะเวลา ปัญหาที่นำส่ง, ขาด Underlying disease
</div>
</div>
</div>
</div>
</section>
<!-- 5. SCORE BAND -->
<section class="section" id="scoreband">
<div class="section-header">
<div class="section-icon">⭐</div>
<div>
<div class="section-title">Score Band / เกณฑ์การให้คะแนนความสมบูรณ์</div>
<div class="section-desc">ระดับคุณภาพตามเกณฑ์มาตรฐานการบันทึกเวชระเบียน</div>
</div>
</div>
<div class="card">
<div class="score-bands">
<div class="score-band band-5">
<div class="band-score">5</div>
<div class="band-range">> 85%</div>
<div class="band-label">ดีมาก</div>
<div><span class="current-band-marker">OPD 90.04%</span></div>
<div><span class="current-band-marker">IPD 83%→4</span></div>
</div>
<div class="score-band band-4">
<div class="band-score">4</div>
<div class="band-range">>75–84%</div>
<div class="band-label">ดี</div>
<div><span class="current-band-marker" style="background:#1565C0">IPD = 83%</span></div>
</div>
<div class="score-band band-3">
<div class="band-score">3</div>
<div class="band-range">>65–74%</div>
<div class="band-label">พอใช้</div>
<div><span class="current-band-marker" style="background:#00838F">Physical 66%</span></div>
</div>
<div class="score-band band-2">
<div class="band-score">2</div>
<div class="band-range">>55–64%</div>
<div class="band-label">ต้องพัฒนา</div>
</div>
<div class="score-band band-1">
<div class="band-score">1</div>
<div class="band-range">>45–54%</div>
<div class="band-label">ต้องแก้ไข</div>
</div>
<div class="score-band band-0">
<div class="band-score">0</div>
<div class="band-range">≤ 45%</div>
<div class="band-label">วิกฤต</div>
</div>
</div>
<hr class="divider">
<div style="display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:4px">
<div style="text-align:center;padding:12px;border-radius:8px;background:var(--green-light)">
<div style="font-size:11px;font-weight:700;color:var(--green)">OPD รวม</div>
<div style="font-size:24px;font-weight:800;color:var(--green)">90.04%</div>
<div style="font-size:11px;color:var(--green)">⭐⭐⭐⭐⭐ 5 คะแนน</div>
</div>
<div style="text-align:center;padding:12px;border-radius:8px;background:#E3F2FD">
<div style="font-size:11px;font-weight:700;color:#1565C0">IPD รวม</div>
<div style="font-size:24px;font-weight:800;color:#1565C0">83.00%</div>
<div style="font-size:11px;color:#1565C0">⭐⭐⭐⭐ 4 คะแนน</div>
</div>
<div style="text-align:center;padding:12px;border-radius:8px;background:var(--amber-light)">
<div style="font-size:11px;font-weight:700;color:var(--amber)">OPD History</div>
<div style="font-size:24px;font-weight:800;color:var(--amber)">76.54%</div>
<div style="font-size:11px;color:var(--amber)">⭐⭐⭐⭐ 4 คะแนน</div>
</div>
<div style="text-align:center;padding:12px;border-radius:8px;background:var(--red-light)">
<div style="font-size:11px;font-weight:700;color:var(--red)">IPD Physical exam</div>
<div style="font-size:24px;font-weight:800;color:var(--red)">66%</div>
<div style="font-size:11px;color:var(--red)">⭐⭐⭐ 3 คะแนน</div>
</div>
</div>
</div>
</section>
<!-- 6. QUALITY INSIGHT -->
<section class="section" id="insight">
<div class="section-header">
<div class="section-icon">💡</div>
<div>
<div class="section-title">Quality Insight</div>
<div class="section-desc">สรุปเชิงวิเคราะห์ 4 มิติ</div>
</div>
</div>
<div class="insight-grid">
<div class="insight-card strength-c">
<div class="insight-tag">✅ Strength · จุดแข็ง</div>
<div class="insight-title">สิ่งที่โรงพยาบาลทำได้ดี</div>
<ul class="insight-bullets">
<li>IPD ดีขึ้นต่อเนื่อง 4 ปีซ้อน (73% → 83%)</li>
<li>Progress note และ Labour record เด่นมาก (96–100%)</li>
<li>OPD ส่วนใหญ่อยู่เหนือ 90% ทุกหมวด ยกเว้น History</li>
<li>มีระบบ Audit Chart ต่อเนื่องหลายปี</li>
<li>Nurses' note มีคุณภาพดี (92%)</li>
</ul>
</div>
<div class="insight-card weak-c">
<div class="insight-tag">⚠️ Weak Point · จุดอ่อน</div>
<div class="insight-title">สิ่งที่ต้องพัฒนาเร่งด่วน</div>
<ul class="insight-bullets">
<li>IPD Physical exam ต่ำสุด 66% (ต้องพัฒนาเร่งด่วน)</li>
<li>History เป็นจุดอ่อนซ้ำทั้ง IPD (74%) และ OPD (76.54%)</li>
<li>OPD ปี 2568 ลดลงจาก 97.37% → 90.04%</li>
<li>Informed consent IPD เพียง 80%</li>
</ul>
</div>
<div class="insight-card risk-c">
<div class="insight-tag">🔴 Risk · ความเสี่ยง</div>
<div class="insight-title">ผลกระทบหากไม่แก้ไข</div>
<ul class="insight-bullets">
<li>กระทบ Continuity of Care และ Clinical Communication</li>
<li>ส่งผลต่อการ Coding ICD-10 ผิดพลาด</li>
<li>ความเสี่ยง Reimbursement (NHSO Claim)</li>
<li>ปัญหา Medico-Legal หากเกิดข้อพิพาท</li>
<li>กระทบคะแนน HA Survey</li>
</ul>
</div>
<div class="insight-card oppo-c">
<div class="insight-tag">🚀 Opportunity · โอกาสพัฒนา</div>
<div class="insight-title">แนวทางยกระดับคุณภาพ</div>
<ul class="insight-bullets">
<li>ใช้ระบบ PCT เป็น forum แลกเปลี่ยน best practice</li>
<li>Audit Feedback รายเดือน/รายบุคคล</li>
<li>สร้าง Checklist บันทึก History & PE ใน HIS</li>
<li>Peer Review แบบสหวิชาชีพ</li>
<li>Template ช่วยบันทึก Chief Complaint + Present illness</li>
</ul>
</div>
</div>
</section>
<!-- 7. GAP ANALYSIS -->
<section class="section" id="gap">
<div class="section-header">
<div class="section-icon">🔍</div>
<div>
<div class="section-title">Root Cause / Gap Analysis</div>
<div class="section-desc">สาเหตุหลักที่ทำให้คุณภาพการบันทึกเวชระเบียนยังไม่สมบูรณ์</div>
</div>
</div>
<div class="gap-grid">
<div class="gap-card">
<div class="gap-icon">👤</div>
<div class="gap-label">คน (Man)</div>
<div class="gap-detail">ความเข้าใจเกณฑ์การบันทึกไม่เท่ากันในแต่ละบุคคล บางส่วนขาดการอบรมที่ต่อเนื่อง</div>
</div>
<div class="gap-card">
<div class="gap-icon">⚙️</div>
<div class="gap-label">กระบวนการ (Process)</div>
<div class="gap-detail">ไม่มี Checklist บังคับใช้สม่ำเสมอ ไม่มีขั้นตอนตรวจสอบก่อนจำหน่ายผู้ป่วย</div>
</div>
<div class="gap-card">
<div class="gap-icon">💻</div>
<div class="gap-label">ระบบข้อมูล (System)</div>
<div class="gap-detail">แบบฟอร์มและระบบ HIS ยังไม่มีการเตือนช่องสำคัญที่ต้องบันทึก</div>
</div>
<div class="gap-card">
<div class="gap-icon">📊</div>
<div class="gap-label">การติดตาม (Monitoring)</div>
<div class="gap-detail">Feedback รายบุคคลและรายหน่วยงานยังไม่สม่ำเสมอ ต้องเข้มข้นขึ้น</div>
</div>
<div class="gap-card">
<div class="gap-icon">⏰</div>
<div class="gap-label">ภาระงาน (Workload)</div>
<div class="gap-detail">ปริมาณผู้ป่วยสูง เวลาตรวจรักษาน้อย ทำให้บันทึกไม่ครบถ้วนในบางช่วง</div>
</div>
</div>
</section>
<!-- 8. CQI / PDSA -->
<section class="section" id="pdsa">
<div class="section-header">
<div class="section-icon">🔄</div>
<div>
<div class="section-title">CQI / PDSA</div>
<div class="section-desc">แผนพัฒนาคุณภาพการบันทึกเวชระเบียนแบบวงจร PDSA</div>
</div>
</div>
<div class="pdsa-grid">
<div class="pdsa-card pdsa-plan">
<div class="pdsa-letter">P</div>
<div class="pdsa-title">🗓️ Plan — วางแผน</div>
<ul class="pdsa-items">
<li>ทบทวนผล Audit กับทีม PCT และหน่วยงานที่เกี่ยวข้อง</li>
<li>กำหนดประเด็นเร่งด่วน: IPD Physical exam, IPD History, OPD History</li>
<li>ทำ Checklist การบันทึกเวชระเบียนรายหมวด</li>
<li>กำหนดผู้รับผิดชอบรายหน่วยงาน</li>
<li>ตั้งเป้าหมายรายปีและรายไตรมาส</li>
</ul>
</div>
<div class="pdsa-card pdsa-do">
<div class="pdsa-letter">D</div>
<div class="pdsa-title">⚡ Do — ดำเนินการ</div>
<ul class="pdsa-items">
<li>อบรมแพทย์และพยาบาลเรื่องเกณฑ์การบันทึก</li>
<li>ใช้ Checklist ใน Ward และ OPD อย่างสม่ำเสมอ</li>
<li>ส่ง Feedback รายเดือนแก่ทีมและรายบุคคล</li>
<li>ทำ Template ช่วยบันทึก Chief complaint + Present illness</li>
<li>กำหนด super-user ประจำแต่ละหน่วย</li>
</ul>
</div>
<div class="pdsa-card pdsa-study">
<div class="pdsa-letter">S</div>
<div class="pdsa-title">🔬 Study — ประเมินผล</div>
<ul class="pdsa-items">
<li>Audit ซ้ำรายไตรมาสและรายปี</li>
<li>เปรียบเทียบคะแนนรายหมวดก่อน-หลัง</li>
<li>วิเคราะห์แฟ้มที่ไม่ผ่านเกณฑ์ รายบุคคล</li>
<li>ทำรายงาน Trend เพื่อนำเสนอต่อผู้บริหาร</li>
</ul>
</div>
<div class="pdsa-card pdsa-act">
<div class="pdsa-letter">A</div>
<div class="pdsa-title">🎯 Act — ปรับปรุง</div>
<ul class="pdsa-items">
<li>ปรับแบบฟอร์มและระบบเตือนใน HIS</li>
<li>ทำ Peer Review สหวิชาชีพ</li>
<li>ขยายแนวปฏิบัติที่ได้ผลไปทุกหน่วยงาน</li>
<li>ทบทวนและปรับปรุง Checklist รายปี</li>
</ul>
</div>
</div>
</section>
<!-- 9. ACTION PLAN -->
<section class="section" id="action">
<div class="section-header">
<div class="section-icon">📋</div>
<div>
<div class="section-title">Action Plan</div>
<div class="section-desc">แผนพัฒนาเวชระเบียนเร่งด่วน ปีงบประมาณ 2568–2569</div>
</div>
</div>
<div class="card" style="padding:0;overflow:hidden">
<table class="action-table">
<thead>
<tr>
<th style="width:5%">#</th>
<th style="width:22%">ประเด็นพัฒนา</th>
<th style="width:30%">กิจกรรม / มาตรการ</th>
<th style="width:20%">ผู้รับผิดชอบ</th>
<th style="width:13%">ระยะเวลา</th>
<th style="width:10%">ลำดับความสำคัญ</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><strong>IPD Physical Examination</strong><br><small>Physical exam 66% (ต่ำสุด)</small></td>
<td>• แพทย์บันทึก PE แรกเข้าให้ครบถ้วน<br>• มีชื่อและลายเซ็นผู้ตรวจ<br>• ทำ Checklist PE ใน Ward</td>
<td>ฝ่ายการแพทย์, หัวหน้าหอผู้ป่วย</td>
<td>1 ต.ค. 2568 เป็นต้นไป</td>
<td><span class="priority-high">สูง</span></td>
</tr>
<tr>
<td>2</td>
<td><strong>IPD History</strong><br><small>History 74%</small></td>
<td>• Chief complaint ครบ<br>• Present illness (what/when/why/how)<br>• Underlying disease, ประวัติยา/แพ้ยา/สารเสพติด</td>
<td>ฝ่ายการแพทย์, คณะทำงาน MRA</td>
<td>ต.ค. 2568 เป็นต้นไป</td>
<td><span class="priority-high">สูง</span></td>
</tr>
<tr>
<td>3</td>
<td><strong>OPD History</strong><br><small>History OPD 76.54%</small></td>
<td>• เพิ่ม Template ช่วยบันทึกข้อมูลสำคัญใน HIS<br>• กำหนดให้บันทึกประวัติการรักษาเดิม ประวัติประจำเดือน</td>
<td>ฝ่ายการแพทย์, IT, OPD</td>
<td>ไตรมาส 1/2568</td>
<td><span class="priority-high">สูง</span></td>
</tr>
<tr>
<td>4</td>
<td><strong>Informed Consent</strong><br><small>Informed consent IPD 80%</small></td>
<td>• ทบทวนขั้นตอนการขอ Consent ก่อนหัตถการ<br>• ตรวจสอบความครบถ้วนก่อน Admit</td>
<td>หัวหน้าหอผู้ป่วย, พยาบาลวิชาชีพ</td>
<td>ต.ค. 2568 เป็นต้นไป</td>
<td><span class="priority-med">กลาง</span></td>
</tr>
<tr>
<td>5</td>
<td><strong>Feedback รายเดือน</strong></td>
<td>• รายงานผลให้ PCT และทีมเวชระเบียนทุกเดือน<br>• ส่ง Feedback รายบุคคลที่พบปัญหาซ้ำ</td>
<td>คณะทำงาน Audit Chart</td>
<td>ทุกเดือน ต.ค. 2568 เป็นต้นไป</td>
<td><span class="priority-med">กลาง</span></td>
</tr>
<tr>
<td>6</td>
<td><strong>Audit ต่อเนื่อง</strong></td>
<td>• ตรวจซ้ำรายไตรมาส<br>• Audit รายปีเปรียบเทียบแนวโน้ม<br>• รายงานต่อคณะกรรมการโรงพยาบาล</td>
<td>คณะทำงาน Audit Chart</td>
<td>รายไตรมาส + รายปี</td>
<td><span class="priority-med">กลาง</span></td>
</tr>
</tbody>
</table>
</div>
</section>
<!-- 10. HA SURVEY READINESS -->
<section class="section" id="ha">
<div class="section-header">
<div class="section-icon">🏆</div>
<div>
<div class="section-title">HA Survey Readiness</div>
<div class="section-desc">สรุปประเด็นตอบ สรพ. และทีมเยี่ยมสำรวจ HA</div>
</div>
</div>
<div style="background:linear-gradient(135deg,var(--primary-dark),var(--primary-light));border-radius:var(--radius);padding:20px 24px;color:#fff;margin-bottom:18px">
<div style="font-size:16px;font-weight:800;margin-bottom:6px">🏥 โรงพยาบาลป่าพะยอม — ความพร้อมด้านเวชระเบียนสำหรับ HA</div>
<div style="font-size:13px;opacity:0.85">โรงพยาบาลแสดงให้เห็นระบบการทบทวนเวชระเบียนที่ต่อเนื่อง มีการวิเคราะห์และพัฒนาคุณภาพอย่างเป็นระบบ สอดคล้องกับมาตรฐาน HA ด้านการบันทึกทางคลินิก</div>
</div>
<div class="ha-grid">
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>ระบบ Audit Chart ต่อเนื่อง</strong>
มีการตรวจเวชระเบียน OPD และ IPD ต่อเนื่องตั้งแต่ปี 2565–2568 มีหลักฐานเชิงระบบที่ชัดเจน
</div>
</div>
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>ข้อมูลแนวโน้ม OPD/IPD</strong>
มีข้อมูลเปรียบเทียบรายปี ทั้ง OPD และ IPD แสดงพัฒนาการที่ชัดเจนโดยเฉพาะ IPD
</div>
</div>
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>ระบุจุดอ่อนชัดเจน</strong>
ใช้ผลการตรวจระบุจุดอ่อนสำคัญ (Physical exam, History) และวิเคราะห์สาเหตุรากเหง้า
</div>
</div>
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>แผน CQI ชัดเจน</strong>
มีแผน PDSA และ Action Plan ที่กำหนดผู้รับผิดชอบ ระยะเวลา และวิธีวัดผลอย่างชัดเจน
</div>
</div>
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>เชื่อมโยงความปลอดภัยผู้ป่วย</strong>
เชื่อมผลการตรวจเวชระเบียนกับ Patient Safety, Clinical Communication และ Continuity of Care
</div>
</div>
<div class="ha-card">
<div class="ha-check">✓</div>
<div class="ha-text">
<strong>Feedback & Learning</strong>
มีระบบ Feedback รายเดือนและรายบุคคล เชื่อมโยงกับการพัฒนาศักยภาพบุคลากร
</div>
</div>
</div>
<div class="card" style="margin-top:16px;background:var(--accent-light);border:1px solid var(--accent)">
<div style="font-size:13px;font-weight:700;color:var(--accent);margin-bottom:10px">💬 ข้อความสื่อสารต่อทีมเยี่ยมสำรวจ HA</div>
<div style="font-size:13px;color:var(--gray-700);line-height:1.8">
"โรงพยาบาลป่าพะยอมดำเนินการ Audit Chart เวชระเบียนอย่างต่อเนื่องตั้งแต่ปี 2565 โดยมีคณะทำงานเฉพาะ นำผลการตรวจมาวิเคราะห์จุดแข็งและจุดอ่อน แล้วแปลงเป็นแผนพัฒนา CQI ที่มีผู้รับผิดชอบชัดเจน ผลลัพธ์ด้าน IPD ปรับตัวดีขึ้นต่อเนื่องทุกปี สะท้อนว่าระบบทบทวนเวชระเบียนของโรงพยาบาลมีประสิทธิภาพและเชื่อมโยงกับการพัฒนาคุณภาพการดูแลผู้ป่วยอย่างแท้จริง"
</div>
</div>
<div style="margin-top:20px;text-align:center;color:var(--gray-600);font-size:12px;border-top:1px solid var(--gray-200);padding-top:16px">
จัดทำโดย กลุ่มงานประกันสุขภาพ โรงพยาบาลป่าพะยอม อ.ป่าพะยอม จ.พัทลุง | คณะทำงาน Audit Chart เวชระเบียน
</div>
</section>
</div><!-- /content -->
</main><!-- /main -->
<script>
// ===== NAVIGATION =====
function setActive(el) {
document.querySelectorAll('.nav-item').forEach(i => i.classList.remove('active'));
el.classList.add('active');
}
// ===== CHART DEFAULTS =====
Chart.defaults.font.family = "'Noto Sans Thai', 'Sarabun', sans-serif";
Chart.defaults.font.size = 12;
const PRIMARY = '#0A5C7F';
const ACCENT = '#00B4A0';
const GREEN = '#2E7D32';
const AMBER = '#F57C00';
const RED = '#C62828';
const LBLUE = '#42A5F5';
// ===== OPD OVERALL TREND =====
new Chart(document.getElementById('chartOPD'), {
type: 'line',
data: {
labels: ['2565', '2566', '2567*', '2568'],
datasets: [{
label: 'OPD (%)',
data: [96.55, 97.37, 96.57, 90.04],
borderColor: PRIMARY,
backgroundColor: 'rgba(10,92,127,0.08)',
pointBackgroundColor: [PRIMARY, PRIMARY, AMBER, RED],
pointRadius: 8,
pointHoverRadius: 10,
borderWidth: 3,
fill: true,
tension: 0.3
}]
},
options: {
responsive: true, maintainAspectRatio: false,
plugins: {
legend: { display: false },
tooltip: { callbacks: { label: ctx => `${ctx.raw}%` } }
},
scales: {
y: { min: 60, max: 100, ticks: { callback: v => v + '%' }, grid: { color: '#f1f5f9' } },
x: { grid: { display: false } }
}
}
});
// ===== IPD OVERALL TREND =====
new Chart(document.getElementById('chartIPD'), {
type: 'line',
data: {
labels: ['2565', '2566', '2567', '2568'],
datasets: [{
label: 'IPD (%)',
data: [73.42, 77.44, 80.70, 83.00],
borderColor: GREEN,
backgroundColor: 'rgba(46,125,50,0.08)',
pointBackgroundColor: GREEN,
pointRadius: 8,
pointHoverRadius: 10,
borderWidth: 3,
fill: true,
tension: 0.3
}]
},
options: {
responsive: true, maintainAspectRatio: false,
plugins: {
legend: { display: false },
tooltip: { callbacks: { label: ctx => `${ctx.raw}%` } }
},
scales: {
y: { min: 60, max: 100, ticks: { callback: v => v + '%' }, grid: { color: '#f1f5f9' } },
x: { grid: { display: false } }
}
}
});
// ===== OPD MULTI-YEAR TREND (line per category) =====
new Chart(document.getElementById('chartOPDTrend'), {
type: 'line',
data: {
labels: ['2565', '2566', '2567*', '2568'],
datasets: [
{
label: 'Patient Profile',
data: [95.38, 100.00, 99.43, 94.43],
borderColor: '#1565C0', backgroundColor: 'rgba(21,101,192,0.05)',
pointRadius: 5, borderWidth: 2, tension: 0.3
},
{
label: 'History ⚠️',
data: [94.60, 94.41, 88.57, 76.54],
borderColor: RED, backgroundColor: 'rgba(198,40,40,0.06)',
pointRadius: 6, borderWidth: 3, tension: 0.3,
borderDash: [0]
},
{
label: 'Physical Exam/Dx',
data: [97.65, 96.67, 94.43, 96.48],
borderColor: GREEN, backgroundColor: 'rgba(46,125,50,0.05)',
pointRadius: 5, borderWidth: 2, tension: 0.3
},
{
label: 'Treatment/Inv',
data: [99.05, 98.62, 93.00, 92.82],
borderColor: ACCENT, backgroundColor: 'rgba(0,180,160,0.05)',
pointRadius: 5, borderWidth: 2, tension: 0.3
},
{
label: 'Follow Up',
data: [null, null, null, 92.68],
borderColor: '#9C27B0', backgroundColor: 'rgba(156,39,176,0.05)',
pointRadius: 5, borderWidth: 2, tension: 0.3
}
]
},
options: {
responsive: true, maintainAspectRatio: false,
plugins: {
legend: { position: 'bottom', labels: { boxWidth: 12, font: { size: 11 } } },
tooltip: { callbacks: { label: ctx => ctx.raw != null ? `${ctx.dataset.label}: ${ctx.raw}%` : 'N/A' } }
},
scales: {
y: { min: 60, max: 105, ticks: { callback: v => v + '%' }, grid: { color: '#f1f5f9' } },
x: { grid: { display: false } }
}
}
});
// ===== OPD DETAIL RADAR (ปี 2568) =====
new Chart(document.getElementById('chartOPDDetail'), {
type: 'radar',
data: {
labels: ['Patient Profile', 'History', 'Physical Exam/Dx', 'Treatment/Inv', 'Follow Up'],
datasets: [{
label: 'OPD 2568',
data: [94.43, 76.54, 96.48, 92.82, 92.68],
borderColor: PRIMARY,
backgroundColor: 'rgba(10,92,127,0.12)',
pointBackgroundColor: [PRIMARY, RED, GREEN, ACCENT, '#9C27B0'],
pointRadius: 5,
borderWidth: 2
}]
},
options: {
responsive: true, maintainAspectRatio: false,
plugins: { legend: { display: false } },
scales: {
r: {
min: 50, max: 100,
ticks: { display: false },
pointLabels: { font: { size: 10 } },
grid: { color: '#e2e8f0' }
}
}
}
});
// ===== IPD MULTI-YEAR TREND (grouped bar) =====
new Chart(document.getElementById('chartIPDTrend'), {
type: 'bar',
data: {
labels: ['D/C Dx.OP', 'D/C Other', 'Informed Consent', 'History', 'Physical Exam', 'Progress Note', "Nurses' Note"],
datasets: [
{
label: '2565',
data: [93.20, 84.66, 67.08, 62.55, 67.90, 72.02, 72.02],
backgroundColor: 'rgba(21,101,192,0.6)',
borderColor: '#1565C0', borderWidth: 1, borderRadius: 3
},
{
label: '2566',
data: [94.34, 78.79, 89.58, 89.58, 93.75, 97.74, 76.35],
backgroundColor: 'rgba(0,180,160,0.6)',
borderColor: ACCENT, borderWidth: 1, borderRadius: 3
},
{
label: '2567',
data: [93.75, 75.80, 83.90, 72.90, 54.08, 93.99, 89.12],
backgroundColor: 'rgba(245,124,0,0.6)',
borderColor: AMBER, borderWidth: 1, borderRadius: 3
},
{
label: '2568',
data: [85.00, 88.00, 80.00, 74.00, 66.00, 96.00, 92.00],
backgroundColor: 'rgba(46,125,50,0.75)',
borderColor: GREEN, borderWidth: 1, borderRadius: 3
}
]
},
options: {
responsive: true, maintainAspectRatio: false,
plugins: {
legend: { position: 'bottom', labels: { boxWidth: 12, font: { size: 11 } } },
tooltip: { callbacks: { label: ctx => `${ctx.dataset.label}: ${ctx.raw}%` } }
},
scales: {
y: { min: 40, max: 105, ticks: { callback: v => v + '%' }, grid: { color: '#f1f5f9' } },
x: { grid: { display: false }, ticks: { font: { size: 10 } } }
}
}
});
</script>
</body>
</html>