| Server IP : 172.67.189.169 / 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/ |
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>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');
* { font-family: 'Sarabun', sans-serif; }
:root {
--green-main: #16a34a;
--green-light: #dcfce7;
--green-dark: #15803d;
--bg: #f8fafc;
}
body { background: var(--bg); }
.badge-expired { background:#fef2f2; color:#dc2626; border:1px solid #fecaca; }
.badge-critical { background:#fff7ed; color:#ea580c; border:1px solid #fed7aa; }
.badge-urgent { background:#fefce8; color:#ca8a04; border:1px solid #fef08a; }
.badge-high { background:#eff6ff; color:#2563eb; border:1px solid #bfdbfe; }
.badge-watch { background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }
.badge-normal2 { background:#f8fafc; color:#475569; border:1px solid #e2e8f0; }
.badge-ok { background:#f8fafc; color:#94a3b8; border:1px solid #e2e8f0; }
.row-expired { background:#fef2f2 !important; }
.row-critical { background:#fff7ed !important; }
.row-urgent { background:#fefce8 !important; }
.tab-active { background:var(--green-main); color:white; }
.tab-inactive { background:white; color:#374151; }
.modal-bg { background:rgba(0,0,0,0.5); }
input, select { border:1px solid #d1d5db; border-radius:6px; padding:6px 10px; font-size:14px; }
input:focus, select:focus { outline:2px solid var(--green-main); outline-offset:1px; }
.card-hover:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(0,0,0,0.12); transition:all .2s; cursor:pointer; }
.scroll-table { overflow-x:auto; }
tr.data-row:hover { background:#f0fdf4 !important; cursor:pointer; }
.chip { display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; font-weight:600; }
.action-btn { padding:3px 10px; border-radius:4px; font-size:12px; border:none; cursor:pointer; }
.progress-bar { height:8px; border-radius:4px; background:#e2e8f0; }
.progress-fill { height:100%; border-radius:4px; background:var(--green-main); }
</style>
</head>
<body>
<!-- HEADER -->
<header class="sticky top-0 z-50 bg-white border-b border-green-200 shadow-sm">
<div class="max-w-7xl mx-auto px-4 py-2 flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-green-600 flex items-center justify-center text-white font-bold text-lg">ภ</div>
<div>
<div class="font-bold text-green-800 text-base leading-tight">ระบบเฝ้าระวังยาใกล้หมดอายุ</div>
<div class="text-xs text-gray-500">งานเภสัชกรรม โรงพยาบาลป่าพะยอม · Pharmacy Expiry Watch Dashboard</div>
</div>
</div>
<div class="flex items-center gap-2 text-xs text-gray-500">
<span id="reportDate" class="bg-green-50 px-2 py-1 rounded text-green-700 font-medium"></span>
<span id="clock" class="font-mono bg-gray-100 px-2 py-1 rounded"></span>
</div>
</div>
</header>
<!-- TABS -->
<div class="sticky top-[57px] z-40 bg-white border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 flex gap-1 py-2">
<button onclick="showTab('dashboard')" id="tab-dashboard" class="tab-btn px-4 py-1.5 rounded-full text-sm font-medium transition tab-active">📊 ภาพรวม</button>
<button onclick="showTab('search')" id="tab-search" class="tab-btn px-4 py-1.5 rounded-full text-sm font-medium transition tab-inactive">🔍 ค้นหา/รายการ</button>
</div>
</div>
<!-- ========== DASHBOARD TAB ========== -->
<div id="tab-dashboard-content" class="max-w-7xl mx-auto px-4 py-4">
<!-- ALERT BANNER -->
<div id="alertBanner" class="mb-4 p-3 rounded-lg border-l-4 border-red-500 bg-red-50 flex items-start gap-2">
<span class="text-red-500 text-xl">🚨</span>
<div>
<div class="font-semibold text-red-700 text-sm" id="alertText"></div>
<div class="text-xs text-red-500 mt-0.5" id="alertSubText"></div>
</div>
</div>
<!-- PROGRESS BAR -->
<div class="mb-4 bg-white rounded-lg border p-3 flex items-center gap-4">
<div class="flex-1">
<div class="flex justify-between text-xs text-gray-500 mb-1">
<span>ความคืบหน้าการจัดการ</span>
<span id="progressText">0 / 0 รายการ</span>
</div>
<div class="progress-bar"><div class="progress-fill" id="progressFill" style="width:0%"></div></div>
</div>
<button onclick="filterByAction('DONE')" class="text-xs bg-green-600 text-white px-3 py-1.5 rounded-lg hover:bg-green-700">ดูที่จัดการแล้ว</button>
</div>
<!-- SUMMARY CARDS -->
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-4" id="summaryCards"></div>
<!-- CHARTS -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 mb-4">
<div class="bg-white rounded-lg border p-4">
<div class="font-semibold text-gray-700 mb-3 text-sm">สัดส่วนตามระดับความเสี่ยง</div>
<canvas id="donutChart" height="200"></canvas>
</div>
<div class="bg-white rounded-lg border p-4">
<div class="font-semibold text-gray-700 mb-3 text-sm">รายการหมดอายุรายเดือน</div>
<canvas id="monthlyChart" height="200"></canvas>
</div>
<div class="bg-white rounded-lg border p-4">
<div class="font-semibold text-gray-700 mb-3 text-sm">Top 10 ใกล้หมดอายุที่สุด</div>
<canvas id="topChart" height="200"></canvas>
</div>
</div>
<!-- URGENT TABLE -->
<div class="bg-white rounded-lg border">
<div class="flex items-center justify-between p-3 border-b">
<div class="font-semibold text-gray-700 text-sm">🚨 รายการเร่งด่วน (หมดอายุแล้ว + วิกฤติ + ด่วนพิเศษ)</div>
<div class="flex gap-2">
<button onclick="showTab('search');filterByStatus('expired,critical,urgent')" class="text-xs border border-green-600 text-green-700 px-3 py-1 rounded-lg hover:bg-green-50">ดูทั้งหมด</button>
</div>
</div>
<div class="scroll-table">
<table class="w-full text-sm">
<thead><tr class="bg-gray-50 text-xs text-gray-500">
<th class="text-left px-3 py-2">รหัส</th>
<th class="text-left px-3 py-2">ชื่อยา</th>
<th class="text-left px-3 py-2">Lot</th>
<th class="text-center px-3 py-2">วันหมดอายุ</th>
<th class="text-center px-3 py-2">วันเหลือ</th>
<th class="text-right px-3 py-2">คงเหลือ</th>
<th class="text-center px-3 py-2">สถานะ</th>
<th class="text-center px-3 py-2">Action</th>
</tr></thead>
<tbody id="urgentTableBody"></tbody>
</table>
</div>
</div>
</div>
<!-- ========== SEARCH TAB ========== -->
<div id="tab-search-content" class="max-w-7xl mx-auto px-4 py-4 hidden">
<!-- SEARCH BAR -->
<div class="bg-white rounded-lg border p-4 mb-4">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mb-3">
<div class="lg:col-span-2">
<label class="text-xs text-gray-500 mb-1 block">ค้นหา (ชื่อ / รหัส / lot)</label>
<input id="searchInput" type="text" placeholder="พิมพ์ชื่อยา รหัส หรือ lot..." class="w-full" oninput="applyFilters()">
</div>
<div>
<label class="text-xs text-gray-500 mb-1 block">สถานะเฝ้าระวัง</label>
<select id="filterStatus" class="w-full" onchange="applyFilters()">
<option value="">-- ทั้งหมด --</option>
<option value="expired">หมดอายุแล้ว</option>
<option value="critical">วิกฤติ (≤30 วัน)</option>
<option value="urgent">ด่วนพิเศษ (31-90 วัน)</option>
<option value="high">เฝ้าระวังสูง (91-180 วัน)</option>
<option value="watch">เฝ้าระวัง (181-270 วัน)</option>
<option value="normal2">ติดตามปกติ (271-365 วัน)</option>
<option value="ok">ปกติ (>365 วัน)</option>
<option value="nodate">ไม่มีวันหมดอายุ</option>
</select>
</div>
<div>
<label class="text-xs text-gray-500 mb-1 block">Action</label>
<select id="filterAction" class="w-full" onchange="applyFilters()">
<option value="">-- ทุก action --</option>
<option value="PENDING">PENDING</option>
<option value="CHECKED">CHECKED</option>
<option value="USED FIRST">USED FIRST</option>
<option value="MOVED">MOVED</option>
<option value="RETURNED">RETURNED</option>
<option value="DISPOSED">DISPOSED</option>
<option value="DONE">DONE</option>
</select>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3">
<div>
<label class="text-xs text-gray-500 mb-1 block">รูปแบบยา</label>
<select id="filterForm" class="w-full" onchange="applyFilters()"><option value="">-- ทุกรูปแบบ --</option></select>
</div>
<div>
<label class="text-xs text-gray-500 mb-1 block">ตำแหน่งเก็บ</label>
<select id="filterLocation" class="w-full" onchange="applyFilters()"><option value="">-- ทุกตำแหน่ง --</option></select>
</div>
<div>
<label class="text-xs text-gray-500 mb-1 block">เดือนหมดอายุ</label>
<select id="filterMonth" class="w-full" onchange="applyFilters()"><option value="">-- ทุกเดือน --</option></select>
</div>
</div>
<div class="flex gap-2 flex-wrap">
<button onclick="applyFilters('','')" class="text-xs bg-gray-100 text-gray-600 px-3 py-1.5 rounded-lg hover:bg-gray-200">ล้างตัวกรอง</button>
<button onclick="setQuickFilter('expired,critical,urgent')" class="text-xs bg-red-100 text-red-700 px-3 py-1.5 rounded-lg hover:bg-red-200">🚨 เร่งด่วน</button>
<button onclick="setQuickFilter('expired')" class="text-xs bg-red-50 text-red-600 px-3 py-1.5 rounded-lg hover:bg-red-100">หมดอายุแล้ว</button>
<button onclick="setQuickFilter('')" class="text-xs bg-green-50 text-green-700 px-3 py-1.5 rounded-lg hover:bg-green-100">ดูทั้งหมด</button>
<button onclick="exportCSV()" class="text-xs bg-blue-600 text-white px-3 py-1.5 rounded-lg hover:bg-blue-700 ml-auto">📥 Export CSV</button>
</div>
</div>
<!-- RESULT COUNT + TABLE MODE -->
<div class="flex items-center justify-between mb-2">
<div class="text-sm text-gray-600 font-medium" id="resultCount">กำลังโหลด...</div>
<div class="flex gap-1">
<button onclick="setMode('compact')" id="modeCompact" class="text-xs px-3 py-1 rounded border tab-active">Compact</button>
<button onclick="setMode('full')" id="modeFull" class="text-xs px-3 py-1 rounded border tab-inactive">Full</button>
</div>
</div>
<!-- TABLE -->
<div class="bg-white rounded-lg border scroll-table">
<table class="w-full text-sm" id="mainTable">
<thead id="mainTableHead"><tr class="bg-gray-50 text-xs text-gray-500 sticky top-0"></tr></thead>
<tbody id="mainTableBody"></tbody>
</table>
</div>
<!-- PAGINATION -->
<div class="flex items-center justify-between mt-3">
<div class="text-xs text-gray-500" id="pageInfo"></div>
<div class="flex gap-1" id="pagination"></div>
</div>
</div>
<!-- DETAIL MODAL -->
<div id="detailModal" class="fixed inset-0 modal-bg z-[100] flex items-center justify-center hidden" onclick="if(event.target===this)closeModal()">
<div class="bg-white rounded-xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto shadow-2xl">
<div class="flex items-center justify-between p-4 border-b sticky top-0 bg-white">
<div class="font-bold text-green-800">รายละเอียดเวชภัณฑ์</div>
<button onclick="closeModal()" class="text-gray-400 hover:text-gray-700 text-xl">✕</button>
</div>
<div id="modalContent" class="p-4"></div>
</div>
</div>
<script>
// ============== DATA ==============
const SOURCE_REPORT_DATE = '21/04/2026';
const MS_PER_DAY = 86400000;
function startOfToday() {
const now = new Date();
return new Date(now.getFullYear(), now.getMonth(), now.getDate());
}
function parseExpiryDate(expiryDate) {
if (!expiryDate) return null;
const [year, month, day] = expiryDate.split('-').map(Number);
if (!year || !month || !day) return null;
return new Date(year, month - 1, day, 23, 59, 59, 999);
}
function formatReportDate() {
const now = new Date();
return now.toLocaleDateString('th-TH', { day:'numeric', month:'long', year:'numeric' });
}
const RAW_DATA = [{"no":1,"itemCode":"1270720","itemName":"0.45% NSS 1000 ML","dosageForm":"SOLUTION","totalQty":10,"unit":"BOTT","expiryDate":"","lotNo":"","remainQty":10,"location":"","manufacturer":""},{"no":2,"itemCode":"1270740","itemName":"0.9% NSS 100 ML","dosageForm":"SOLUTION","totalQty":1795,"unit":"BOTT","expiryDate":"2027-12-01","lotNo":"B2512603","remainQty":1795,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":3,"itemCode":"1270710","itemName":"0.9% NSS 1000 ML","dosageForm":"SOLUTION","totalQty":99,"unit":"BOTT","expiryDate":"2027-05-29","lotNo":"B2505775","remainQty":99,"location":"1A","manufacturer":"THAI NAKORN PATANA"},{"no":4,"itemCode":"1270730","itemName":"0.9% NSS FOR IRRIGATION 1000 ML.","dosageForm":"SOLUTION","totalQty":209,"unit":"BOTT","expiryDate":"2027-11-12","lotNo":"2511152","remainQty":209,"location":"1A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":5,"itemCode":"1270750","itemName":"0.9% NSS IRRIGATION 500 ML","dosageForm":"SOLUTION","totalQty":489,"unit":"BOTT","expiryDate":"2027-12-03","lotNo":"2512041","remainQty":489,"location":"1A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":6,"itemCode":"3230120","itemName":"3 WAY EXTENSION 12 inch","dosageForm":"EXTENSION","totalQty":12,"unit":"inch","expiryDate":"2027-09-21","lotNo":"20240922","remainQty":450,"location":"","manufacturer":""},{"no":7,"itemCode":"2010210","itemName":"ACETYLCYSTEINE POWDER 200 MG","dosageForm":"POWDER","totalQty":200,"unit":"MG","expiryDate":"2027-10-30","lotNo":"6171965","remainQty":12,"location":"1A","manufacturer":""},{"no":7,"itemCode":"2010210","itemName":"ACETYLCYSTEINE POWDER 200 MG","dosageForm":"POWDER","totalQty":200,"unit":"MG","expiryDate":"2027-01-28","lotNo":"6172043","remainQty":120,"location":"1A","manufacturer":""},{"no":8,"itemCode":"2010220","itemName":"ACTIVATED CHACOAL POWDER 50G","dosageForm":"POWDER","totalQty":0,"unit":"","expiryDate":"2027-12-01","lotNo":"B206-J/122023","remainQty":4,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1140920","itemName":"ACYCLOVIR 200 MG TAB","dosageForm":"TABLET","totalQty":5800,"unit":"TAB","expiryDate":"2027-10-13","lotNo":"J39161","remainQty":8,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":9,"itemCode":"1140920","itemName":"ACYCLOVIR 200 MG TAB","dosageForm":"TABLET","totalQty":5800,"unit":"TAB","expiryDate":"2027-01-20","lotNo":"A40280","remainQty":50,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":0,"itemCode":"1140910","itemName":"ACYCLOVIR CREAM 5%","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-07-17","lotNo":"","remainQty":8,"location":"","manufacturer":""},{"no":0,"itemCode":"1140910","itemName":"ACYCLOVIR CREAM 5%","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-03-13","lotNo":"7150031","remainQty":50,"location":"","manufacturer":""},{"no":2,"itemCode":"1131210","itemName":"ADENOSINE INJ 6 MG/2ML/VIAL","dosageForm":"INJECTION","totalQty":19,"unit":"AMP","expiryDate":"2027-10-30","lotNo":"2F24005","remainQty":19,"location":"","manufacturer":"TROIKAA"},{"no":1,"itemCode":"1071230","itemName":"ALBENDAZOLE 200 MG TAB","dosageForm":"TABLET","totalQty":200,"unit":"TAB","expiryDate":"2027-10-27","lotNo":"A680364","remainQty":2,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1160280","itemName":"ALCOHOL+GLYCERINE (70%+2%) 500ML","dosageForm":"SOLUTION","totalQty":500,"unit":"ML","expiryDate":"2027-12-05","lotNo":"0126","remainQty":144,"location":"","manufacturer":"วิทยาศรม จำกัด"},{"no":5,"itemCode":"1131330","itemName":"ALFUZOSIN HCl 10 MG TAB","dosageForm":"TABLET","totalQty":450,"unit":"TAB","expiryDate":"2027-07-11","lotNo":"PTG3483A","remainQty":15,"location":"1C","manufacturer":"SUN"},{"no":6,"itemCode":"1020210","itemName":"ALLOPURINOL 100 MG TAB","dosageForm":"TABLET","totalQty":9000,"unit":"TAB","expiryDate":"2027-10-30","lotNo":"F681062","remainQty":18,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1180110","itemName":"ALUMINA & MAGNESIA SUSP 240 ML","dosageForm":"SUSPENSI","totalQty":934,"unit":"BOTT","expiryDate":"2027-02-27","lotNo":"B2602034","remainQty":934,"location":"2A","manufacturer":""},{"no":8,"itemCode":"1070310","itemName":"AMIKACIN INJ 500 MG/2ML/VIAL","dosageForm":"INJECTION","totalQty":50,"unit":"VIAL","expiryDate":"2027-07-02","lotNo":"B680060","remainQty":50,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1170410","itemName":"AMILORIDE+HCTZ (5+50) MG TAB","dosageForm":"TABLET","totalQty":800,"unit":"TAB","expiryDate":"2027-07-19","lotNo":"","remainQty":6,"location":"","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":1,"itemCode":"1130810","itemName":"AMIODARONE HCL INJ 150MG/3ML/AMP","dosageForm":"INJECTION","totalQty":40,"unit":"AMP","expiryDate":"2027-06-30","lotNo":"2FD25005","remainQty":40,"location":"1C","manufacturer":"TROIKAA"},{"no":2,"itemCode":"1250110","itemName":"AMITRIPTYLINE 10 MG TAB","dosageForm":"TABLET","totalQty":10700,"unit":"TAB","expiryDate":"2027-02-10","lotNo":"69185","remainQty":7,"location":"1A","manufacturer":"H.K. PHARMACEUTICAL"},{"no":3,"itemCode":"1250120","itemName":"AMITRIPTYLINE 25 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-10-16","lotNo":"L690034","remainQty":4,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1130550","itemName":"AMLODIPINE 10 MG TAB","dosageForm":"TABLET","totalQty":109200,"unit":"TAB","expiryDate":"2027-11-10","lotNo":"F685345","remainQty":277,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1130550","itemName":"AMLODIPINE 10 MG TAB","dosageForm":"TABLET","totalQty":109200,"unit":"TAB","expiryDate":"2027-11-14","lotNo":"F685357","remainQty":815,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1070140","itemName":"AMOXICILLIN+CLAVULANIC ACID 875+125 MG TAB","dosageForm":"TABLET","totalQty":100,"unit":"TAB","expiryDate":"2027-10-14","lotNo":"DFG6848A","remainQty":1,"location":"","manufacturer":"SUN"},{"no":9,"itemCode":"1070110","itemName":"AMOXYCILLIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":2000,"unit":"CAP","expiryDate":"2027-12-12","lotNo":"N680395","remainQty":4,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1070120","itemName":"AMOXYCILLIN 500 MG CAP","dosageForm":"CAPSULE","totalQty":15000,"unit":"CAP","expiryDate":"2027-09-16","lotNo":"N680279","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":1,"itemCode":"1070130","itemName":"AMOXYCILLIN DRY SYR 125MG/5ML","dosageForm":"DRY SYRUP","totalQty":470,"unit":"BOTT","expiryDate":"2027-10-24","lotNo":"","remainQty":70,"location":"","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":1,"itemCode":"1070130","itemName":"AMOXYCILLIN DRY SYR 125MG/5ML","dosageForm":"DRY SYRUP","totalQty":470,"unit":"BOTT","expiryDate":"2027-02-17","lotNo":"8624002","remainQty":400,"location":"","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":2,"itemCode":"1070160","itemName":"AMOXYCILLIN DRY SYR 250MG/5ML","dosageForm":"SUSPENSI","totalQty":271,"unit":"BOTT","expiryDate":"2027-08-20","lotNo":"8608004","remainQty":71,"location":"1A","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":2,"itemCode":"1070160","itemName":"AMOXYCILLIN DRY SYR 250MG/5ML","dosageForm":"SUSPENSI","totalQty":271,"unit":"BOTT","expiryDate":"2027-10-04","lotNo":"8608006","remainQty":200,"location":"1A","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":3,"itemCode":"1070230","itemName":"AMPICILLIN INJ 1 G/VIAL","dosageForm":"INJECTION","totalQty":330,"unit":"VIAL","expiryDate":"2027-10-08","lotNo":"315077","remainQty":130,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":3,"itemCode":"1070230","itemName":"AMPICILLIN INJ 1 G/VIAL","dosageForm":"INJECTION","totalQty":330,"unit":"VIAL","expiryDate":"2027-10-09","lotNo":"315078","remainQty":200,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":8,"itemCode":"1191010","itemName":"ANNA CONTRACEPTIVE 28's","dosageForm":"TABLET","totalQty":315,"unit":"แผง","expiryDate":"2027-09-07","lotNo":"256668","remainQty":315,"location":"2A","manufacturer":""},{"no":9,"itemCode":"1220210","itemName":"ANTAZOLINE+TETRAZOLINE EYE DROP 10 ML","dosageForm":"SOLUTION","totalQty":290,"unit":"BOTT","expiryDate":"2027-10-08","lotNo":"P4006A","remainQty":290,"location":"","manufacturer":"INTERPHARMA PUBLIC"},{"no":4,"itemCode":"1260210","itemName":"AROMATIC AMMONIA SPIRIT 450 ML","dosageForm":"SOLUTION","totalQty":9,"unit":"BOTT","expiryDate":"2027-07-18","lotNo":"125020","remainQty":9,"location":"2A","manufacturer":""},{"no":5,"itemCode":"1020120","itemName":"ASPIRIN 300 MG TAB","dosageForm":"TABLET","totalQty":100,"unit":"TAB","expiryDate":"2027-01-05","lotNo":"","remainQty":100,"location":"","manufacturer":""},{"no":6,"itemCode":"1020140","itemName":"ASPIRIN 81 MG TAB","dosageForm":"TABLET","totalQty":23000,"unit":"TAB","expiryDate":"2027-10-22","lotNo":"25111269","remainQty":23,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1130440","itemName":"ATENOLOL 50 MG TAB","dosageForm":"TABLET","totalQty":19000,"unit":"TAB","expiryDate":"2027-11-19","lotNo":"2503234","remainQty":38,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1130640","itemName":"ATORVASTATIN 40 MG TAB (จัดซื้อ)","dosageForm":"TABLET","totalQty":127400,"unit":"TAB","expiryDate":"2027-10-06","lotNo":"0115-68-136","remainQty":274,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1130640","itemName":"ATORVASTATIN 40 MG TAB (จัดซื้อ)","dosageForm":"TABLET","totalQty":127400,"unit":"TAB","expiryDate":"2027-11-26","lotNo":"0115-68-169","remainQty":1000,"location":"1A","manufacturer":""},{"no":9,"itemCode":"1130641","itemName":"ATORVASTATIN 40 MG TAB (ยาสปสช.)","dosageForm":"TABLET","totalQty":2600,"unit":"TAB","expiryDate":"2027-08-11","lotNo":"6UR2555","remainQty":26,"location":"","manufacturer":""},{"no":0,"itemCode":"1181310","itemName":"ATROPINE SULFATE INJ 0.6 MG/ML","dosageForm":"INJECTION","totalQty":59,"unit":"AMP","expiryDate":"2027-08-23","lotNo":"","remainQty":50,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1181310","itemName":"ATROPINE SULFATE INJ 0.6 MG/ML","dosageForm":"INJECTION","totalQty":59,"unit":"AMP","expiryDate":"2027-06-06","lotNo":"","remainQty":9,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1070850","itemName":"AZITHROMYCIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":600,"unit":"CAP","expiryDate":"2027-05-19","lotNo":"K685128","remainQty":4,"location":"1A","manufacturer":"มิลลิเมด จำกัด"},{"no":3,"itemCode":"1070850","itemName":"AZITHROMYCIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":600,"unit":"CAP","expiryDate":"2027-08-20","lotNo":"AT515","remainQty":6,"location":"1A","manufacturer":"มิลลิเมด จำกัด"},{"no":4,"itemCode":"1210610","itemName":"BACLOFEN 10 MG TAB","dosageForm":"TABLET","totalQty":8000,"unit":"TAB","expiryDate":"2027-09-12","lotNo":"51323","remainQty":16,"location":"1A","manufacturer":""},{"no":5,"itemCode":"1071910","itemName":"BENZATHINE BENZYLPENICILLIN INJ 1.2MU","dosageForm":"INJECTION","totalQty":10,"unit":"VIAL","expiryDate":"2027-10-01","lotNo":"2510512","remainQty":10,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1141010","itemName":"BENZYL BENZOATE EMULSION 25% 60ML","dosageForm":"SOLUTION","totalQty":167,"unit":"BOTT","expiryDate":"2027-10-11","lotNo":"","remainQty":23,"location":"1A","manufacturer":"วิทยาศรม จำกัด"},{"no":8,"itemCode":"1141010","itemName":"BENZYL BENZOATE EMULSION 25% 60ML","dosageForm":"SOLUTION","totalQty":167,"unit":"BOTT","expiryDate":"2027-01-06","lotNo":"000169","remainQty":144,"location":"1A","manufacturer":"วิทยาศรม จำกัด"},{"no":9,"itemCode":"1180540","itemName":"BETAHISTINE 12 MG TAB","dosageForm":"TABLET","totalQty":7000,"unit":"TAB","expiryDate":"2027-10-28","lotNo":"1810987","remainQty":70,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1140110","itemName":"BETAMETHASONE VALPERATE 0.1% CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-10-02","lotNo":"G680182","remainQty":170,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1261310","itemName":"BUDESONIDE MDI 200 MCG 200 DOSE","dosageForm":"INHALER","totalQty":0,"unit":"","expiryDate":"2026-09-02","lotNo":"","remainQty":30,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1261310","itemName":"BUDESONIDE MDI 200 MCG 200 DOSE","dosageForm":"INHALER","totalQty":0,"unit":"","expiryDate":"2027-11-10","lotNo":"71304","remainQty":40,"location":"1A","manufacturer":""},{"no":1,"itemCode":"1261320","itemName":"BUDESONIDE+FORMOTEROL (160+4.5) MCG 120D","dosageForm":"INHALER","totalQty":5,"unit":"กล่อง","expiryDate":"2027-07-31","lotNo":"SPKH","remainQty":5,"location":"","manufacturer":"ASTRAZENECA AB"},{"no":2,"itemCode":"1140210","itemName":"CALAMINE LOTION","dosageForm":"LOTION","totalQty":0,"unit":"","expiryDate":"2027-05-28","lotNo":"R680035","remainQty":85,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1140210","itemName":"CALAMINE LOTION","dosageForm":"LOTION","totalQty":0,"unit":"","expiryDate":"2027-01-04","lotNo":"26040001","remainQty":158,"location":"2A","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1271430","itemName":"CALCIUM CARBONATE 1500 MG TAB","dosageForm":"TABLET","totalQty":16200,"unit":"TAB","expiryDate":"2027-11-14","lotNo":"CP579","remainQty":162,"location":"","manufacturer":"มิลลิเมด จำกัด"},{"no":4,"itemCode":"1271420","itemName":"CALCIUM GLUCONATE INJ. 10%","dosageForm":"INJECTION","totalQty":54,"unit":"AMP","expiryDate":"2027-08-26","lotNo":"","remainQty":4,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1271420","itemName":"CALCIUM GLUCONATE INJ. 10%","dosageForm":"INJECTION","totalQty":54,"unit":"AMP","expiryDate":"2027-10-28","lotNo":"J680407","remainQty":50,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"2130110","itemName":"CAPTOPRIL 25 MG TAB","dosageForm":"TABLET","totalQty":200,"unit":"TAB","expiryDate":"2027-02-03","lotNo":"","remainQty":200,"location":"","manufacturer":"PHARMASANT LABORATORY"},{"no":7,"itemCode":"1100280","itemName":"CARBAMAZEPINE 200 MG TAB","dosageForm":"TABLET","totalQty":1500,"unit":"TAB","expiryDate":"2027-10-22","lotNo":"J39329","remainQty":3,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":8,"itemCode":"2260510","itemName":"CARBOCYSTEINE 100 MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2027-11-24","lotNo":"159366","remainQty":100,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":9,"itemCode":"1180310","itemName":"CARMINATIVE MIXT. 180 ML","dosageForm":"SOLUTION","totalQty":305,"unit":"BOTT","expiryDate":"2027-01-12","lotNo":"M680345","remainQty":305,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1131600","itemName":"CARVEDILOL 12.5 MG TAB","dosageForm":"TABLET","totalQty":900,"unit":"TAB","expiryDate":"2027-02-25","lotNo":"T685002","remainQty":9,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1071100","itemName":"CEFTAZidime INJ 1 G","dosageForm":"INJECTION","totalQty":20,"unit":"VIAL","expiryDate":"2027-08-31","lotNo":"","remainQty":20,"location":"","manufacturer":""},{"no":6,"itemCode":"2070210","itemName":"CEFTRIaxone INJ 1 G","dosageForm":"INJECTION","totalQty":2700,"unit":"VIAL","expiryDate":"2027-06-15","lotNo":"D06550605","remainQty":2700,"location":"","manufacturer":"NCPC HEBEI HUAMIN"},{"no":7,"itemCode":"1070420","itemName":"CEPHALEXIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":0,"unit":"","expiryDate":"2027-09-24","lotNo":"1118697-1","remainQty":4,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1060220","itemName":"CETIRIZINE 10 MG TAB","dosageForm":"TABLET","totalQty":14500,"unit":"TAB","expiryDate":"2027-11-25","lotNo":"VM523A","remainQty":5,"location":"1A","manufacturer":""},{"no":9,"itemCode":"1060221","itemName":"CETIRIZINE 5MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2027-12-01","lotNo":"180143","remainQty":90,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":3,"itemCode":"1220110","itemName":"CHLORAMPHENICOL EYE DROP 0.5% 10ML","dosageForm":"INJECTION","totalQty":141,"unit":"BOTT","expiryDate":"2027-01-30","lotNo":"825385","remainQty":141,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":4,"itemCode":"1220130","itemName":"CHLORAMPHENICOL EYE OINT 1% 5G","dosageForm":"OINTMENT","totalQty":28,"unit":"หลอด","expiryDate":"2027-06-25","lotNo":"","remainQty":28,"location":"","manufacturer":""},{"no":7,"itemCode":"1160180","itemName":"CHLORHEXIDINE ACETATE TULLE GRAS 0.5%","dosageForm":"PATCH","totalQty":190,"unit":"แผ่น","expiryDate":"2027-07-01","lotNo":"202530","remainQty":19,"location":"","manufacturer":""},{"no":8,"itemCode":"1160140","itemName":"CHLORHEXIDINE MOUTH WASH 0.12% 180ML","dosageForm":"SOLUTION","totalQty":59,"unit":"BOTT","expiryDate":"2027-12-26","lotNo":"AG250121","remainQty":59,"location":"","manufacturer":""},{"no":9,"itemCode":"1160190","itemName":"CHLORHEXIDINE SCRUB 4% 45ML","dosageForm":"SOLUTION","totalQty":258,"unit":"BOTT","expiryDate":"2027-11-03","lotNo":"25044103","remainQty":58,"location":"1A","manufacturer":""},{"no":9,"itemCode":"1160190","itemName":"CHLORHEXIDINE SCRUB 4% 45ML","dosageForm":"SOLUTION","totalQty":258,"unit":"BOTT","expiryDate":"2027-01-14","lotNo":"26044007","remainQty":200,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1160200","itemName":"CHLORHEXIDINE SCRUB 4% 450ML","dosageForm":"SOLUTION","totalQty":18,"unit":"BOTT","expiryDate":"2027-05-24","lotNo":"147704","remainQty":18,"location":"","manufacturer":""},{"no":2,"itemCode":"1060120","itemName":"CHLORPHENIRAMINE 2 MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2027-12-15","lotNo":"M680330","remainQty":425,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1060110","itemName":"CHLORPHENIRAMINE 4 MG TAB CPM","dosageForm":"TABLET","totalQty":14000,"unit":"TAB","expiryDate":"2027-10-18","lotNo":"IP523A","remainQty":14,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1060130","itemName":"CHLORPHENIRAMINE INJ 10 MG/1ML","dosageForm":"INJECTION","totalQty":150,"unit":"AMP","expiryDate":"2027-09-04","lotNo":"J680320","remainQty":150,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1100230","itemName":"CHLORPROMAZINE 100 MG TAB","dosageForm":"TABLET","totalQty":4000,"unit":"TAB","expiryDate":"2027-11-17","lotNo":"250250","remainQty":8,"location":"","manufacturer":""},{"no":7,"itemCode":"1250150","itemName":"CHLORPROMAZINE HCL 25 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-10-21","lotNo":"J39315","remainQty":2,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":7,"itemCode":"1250150","itemName":"CHLORPROMAZINE HCL 25 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-01-28","lotNo":"A40374","remainQty":4,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":2,"itemCode":"1131620","itemName":"CILOSTAZOL 100 MG TAB","dosageForm":"TABLET","totalQty":300,"unit":"TAB","expiryDate":"2027-07-12","lotNo":"2501893","remainQty":3,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1072610","itemName":"CLINDAMYCIN 300 MG CAP","dosageForm":"CAPSULE","totalQty":1500,"unit":"CAP","expiryDate":"2027-08-21","lotNo":"K685232","remainQty":15,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1072620","itemName":"CLINDAMYCIN INJ 600 MG/4ML","dosageForm":"INJECTION","totalQty":50,"unit":"VIAL","expiryDate":"2027-09-01","lotNo":"CV2524","remainQty":50,"location":"","manufacturer":"พรอส ฟาร์มา จำกัด"},{"no":0,"itemCode":"1250510","itemName":"CLONAZEPAM 0.5 MG TAB","dosageForm":"TABLET","totalQty":7000,"unit":"TAB","expiryDate":"2027-10-21","lotNo":"51260","remainQty":14,"location":"","manufacturer":""},{"no":1,"itemCode":"1250520","itemName":"CLONAZEPAM 2 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-08-07","lotNo":"51089","remainQty":4,"location":"","manufacturer":""},{"no":2,"itemCode":"1020150","itemName":"CLOPIDOGREL BISULFATE 75 MG TAB","dosageForm":"TABLET","totalQty":1600,"unit":"TAB","expiryDate":"2027-09-07","lotNo":"D680309","remainQty":16,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1140330","itemName":"CLOTRIMAZOLE CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-11-10","lotNo":"0019-68-08","remainQty":230,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1140330","itemName":"CLOTRIMAZOLE CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-01-16","lotNo":"0019-69-01","remainQty":420,"location":"1A","manufacturer":""},{"no":6,"itemCode":"1070640","itemName":"CLOXACILLIN INJ 1 G/VIAL","dosageForm":"INJECTION","totalQty":160,"unit":"VIAL","expiryDate":"2027-03-07","lotNo":"","remainQty":60,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":6,"itemCode":"1070640","itemName":"CLOXACILLIN INJ 1 G/VIAL","dosageForm":"INJECTION","totalQty":160,"unit":"VIAL","expiryDate":"2027-06-13","lotNo":"315056","remainQty":100,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":7,"itemCode":"1100610","itemName":"CLOZAPINE 100 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-10-09","lotNo":"J39115","remainQty":1,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":7,"itemCode":"1100610","itemName":"CLOZAPINE 100 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-10-30","lotNo":"J39473","remainQty":3,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":8,"itemCode":"1100620","itemName":"CLOZAPINE 25 MG TAB","dosageForm":"TABLET","totalQty":1000,"unit":"TAB","expiryDate":"2027-05-22","lotNo":"147595","remainQty":2,"location":"","manufacturer":""},{"no":9,"itemCode":"1200720","itemName":"COBRA ANTIVENIN SERA (เซรุ่มงูเห่า)","dosageForm":"INJECTION","totalQty":20,"unit":"VIAL","expiryDate":"2027-02-09","lotNo":"","remainQty":9,"location":"","manufacturer":""},{"no":9,"itemCode":"1200720","itemName":"COBRA ANTIVENIN SERA (เซรุ่มงูเห่า)","dosageForm":"INJECTION","totalQty":20,"unit":"VIAL","expiryDate":"2027-11-08","lotNo":"NK00324","remainQty":1,"location":"","manufacturer":""},{"no":9,"itemCode":"1200720","itemName":"COBRA ANTIVENIN SERA (เซรุ่มงูเห่า)","dosageForm":"INJECTION","totalQty":20,"unit":"VIAL","expiryDate":"2027-04-22","lotNo":"NK00225","remainQty":10,"location":"","manufacturer":""},{"no":0,"itemCode":"1020310","itemName":"COLCHICINE 0.6 MG TAB","dosageForm":"TABLET","totalQty":8800,"unit":"TAB","expiryDate":"2027-11-18","lotNo":"8156088","remainQty":8,"location":"1A","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":7,"itemCode":"1070520","itemName":"CO-TRIMOXAZOLE (200+40) MG SUSP 60ML","dosageForm":"SUSPENSI","totalQty":48,"unit":"BOTT","expiryDate":"2026-12-04","lotNo":"","remainQty":48,"location":"2A","manufacturer":""},{"no":8,"itemCode":"1070510","itemName":"CO-TRIMOXAZOLE (400+80) MG TAB","dosageForm":"TABLET","totalQty":1500,"unit":"TAB","expiryDate":"2027-08-16","lotNo":"0151-68-02","remainQty":3,"location":"2A","manufacturer":""},{"no":6,"itemCode":"1270310","itemName":"D-5-N/2 1000 ML","dosageForm":"SOLUTION","totalQty":407,"unit":"BOTT","expiryDate":"2027-01-28","lotNo":"","remainQty":407,"location":"","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":9,"itemCode":"1270420","itemName":"D-5-N/3 500 ML","dosageForm":"SOLUTION","totalQty":59,"unit":"BOTT","expiryDate":"2027-08-29","lotNo":"2508355","remainQty":40,"location":"2A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":9,"itemCode":"1270420","itemName":"D-5-N/3 500 ML","dosageForm":"SOLUTION","totalQty":59,"unit":"BOTT","expiryDate":"2026-11-21","lotNo":"","remainQty":19,"location":"","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":3,"itemCode":"1270530","itemName":"D-5-N/5 500 ML","dosageForm":"SOLUTION","totalQty":23,"unit":"BOTT","expiryDate":"2027-10-31","lotNo":"2510418","remainQty":20,"location":"2A","manufacturer":"THAI NAKORN PATANA"},{"no":3,"itemCode":"1270530","itemName":"D-5-N/5 500 ML","dosageForm":"SOLUTION","totalQty":23,"unit":"BOTT","expiryDate":"2027-01-10","lotNo":"","remainQty":3,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":4,"itemCode":"1271510","itemName":"D-5-S 1000 ML","dosageForm":"SOLUTION","totalQty":290,"unit":"BOTT","expiryDate":"2027-01-06","lotNo":"2601016","remainQty":290,"location":"2A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":5,"itemCode":"1270630","itemName":"D-5-W 500 ML","dosageForm":"SOLUTION","totalQty":20,"unit":"BOTT","expiryDate":"2027-12-22","lotNo":"2512276","remainQty":20,"location":"2A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":6,"itemCode":"1270620","itemName":"D-5-W 100 ML","dosageForm":"SOLUTION","totalQty":120,"unit":"BOTT","expiryDate":"2027-10-10","lotNo":"2510127","remainQty":120,"location":"1A","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":7,"itemCode":"1270610","itemName":"D-5-W 1000 ML","dosageForm":"SOLUTION","totalQty":13,"unit":"BOTT","expiryDate":"2027-03-28","lotNo":"","remainQty":10,"location":"","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":7,"itemCode":"1270610","itemName":"D-5-W 1000 ML","dosageForm":"SOLUTION","totalQty":13,"unit":"BOTT","expiryDate":"2027-04-05","lotNo":"","remainQty":3,"location":"","manufacturer":"เยเนอรัล ฮอสปิตัล โปรดัคส์"},{"no":9,"itemCode":"1290810","itemName":"DEFERIPRONE 500 MG TAB","dosageForm":"TABLET","totalQty":1000,"unit":"TAB","expiryDate":"2027-10-08","lotNo":"A680496","remainQty":10,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1190110","itemName":"DEXAMETHASONE INJ 4 MG/1ML","dosageForm":"INJECTION","totalQty":2200,"unit":"AMP","expiryDate":"2027-11-04","lotNo":"425336","remainQty":200,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":0,"itemCode":"1190110","itemName":"DEXAMETHASONE INJ 4 MG/1ML","dosageForm":"INJECTION","totalQty":2200,"unit":"AMP","expiryDate":"2027-11-06","lotNo":"425340","remainQty":2000,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":1,"itemCode":"1220220","itemName":"DEXAMETHASONE+NEOMYCIN EYE/EAR DROP 4ML","dosageForm":"SOLUTION","totalQty":120,"unit":"BOTT","expiryDate":"2027-04-25","lotNo":"","remainQty":120,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":2,"itemCode":"1260410","itemName":"DEXTROMETHORPHAN 15 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-05-23","lotNo":"147625","remainQty":6,"location":"","manufacturer":""},{"no":3,"itemCode":"1250210","itemName":"DIAZEPAM 2 MG TAB","dosageForm":"TABLET","totalQty":6500,"unit":"TAB","expiryDate":"2027-11-22","lotNo":"","remainQty":10,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1250220","itemName":"DIAZEPAM 5 MG TAB","dosageForm":"TABLET","totalQty":5000,"unit":"TAB","expiryDate":"2027-05-20","lotNo":"","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1250230","itemName":"DIAZEPAM INJ 10 MG/2ML","dosageForm":"INJECTION","totalQty":130,"unit":"AMP","expiryDate":"2027-05-21","lotNo":"","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1250230","itemName":"DIAZEPAM INJ 10 MG/2ML","dosageForm":"INJECTION","totalQty":130,"unit":"AMP","expiryDate":"2027-10-24","lotNo":"J680396","remainQty":100,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1020810","itemName":"DICLOFENAC 25 MG TAB","dosageForm":"TABLET","totalQty":9000,"unit":"TAB","expiryDate":"2027-08-15","lotNo":"ID513A","remainQty":9,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1020820","itemName":"DICLOFENAC INJ 75 MG/3ML","dosageForm":"INJECTION","totalQty":220,"unit":"AMP","expiryDate":"2027-10-30","lotNo":"425329","remainQty":220,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":8,"itemCode":"1070650","itemName":"DICLOXACILLIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":20000,"unit":"CAP","expiryDate":"2027-11-11","lotNo":"N680345","remainQty":4,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1070650","itemName":"DICLOXACILLIN 250 MG CAP","dosageForm":"CAPSULE","totalQty":20000,"unit":"CAP","expiryDate":"2027-12-17","lotNo":"N680399","remainQty":36,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1070660","itemName":"DICLOXACILLIN DRY SYR 62.5MG/5ML 60ML","dosageForm":"SUSPENSI","totalQty":196,"unit":"BOTT","expiryDate":"2027-11-20","lotNo":"2525PU3","remainQty":196,"location":"1A","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":1,"itemCode":"1130110","itemName":"DIGOXIN 0.25 MG TAB","dosageForm":"TABLET","totalQty":800,"unit":"TAB","expiryDate":"2026-08-30","lotNo":"","remainQty":800,"location":"","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":2,"itemCode":"1180510","itemName":"DIMENHYDRINATE 50 MG TAB","dosageForm":"TABLET","totalQty":22000,"unit":"TAB","expiryDate":"2027-07-24","lotNo":"G39384","remainQty":2,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":2,"itemCode":"1180510","itemName":"DIMENHYDRINATE 50 MG TAB","dosageForm":"TABLET","totalQty":22000,"unit":"TAB","expiryDate":"2027-10-24","lotNo":"J39366","remainQty":20,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":3,"itemCode":"1180530","itemName":"DIMENHYDRINATE INJ 50 MG/ML","dosageForm":"INJECTION","totalQty":338,"unit":"AMP","expiryDate":"2027-10-31","lotNo":"LK031016","remainQty":338,"location":"1A","manufacturer":""},{"no":5,"itemCode":"1250610","itemName":"DIPOTASSIUM CLORAZEPATE 5 MG CAP","dosageForm":"CAPSULE","totalQty":12000,"unit":"CAP","expiryDate":"2027-12-08","lotNo":"51604","remainQty":18,"location":"","manufacturer":""},{"no":5,"itemCode":"1250610","itemName":"DIPOTASSIUM CLORAZEPATE 5 MG CAP","dosageForm":"CAPSULE","totalQty":12000,"unit":"CAP","expiryDate":"2027-11-21","lotNo":"51603","remainQty":6,"location":"","manufacturer":""},{"no":0,"itemCode":"1530350","itemName":"DOLUTEGRAVIR 50 MG TAB","dosageForm":"TABLET","totalQty":60,"unit":"TAB","expiryDate":"2027-12-16","lotNo":"W680299","remainQty":2,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":1,"itemCode":"1180610","itemName":"DOMPERIDONE 10 MG TAB","dosageForm":"TABLET","totalQty":19000,"unit":"TAB","expiryDate":"2027-07-29","lotNo":"0945-68-02","remainQty":4,"location":"1A","manufacturer":""},{"no":1,"itemCode":"1180610","itemName":"DOMPERIDONE 10 MG TAB","dosageForm":"TABLET","totalQty":19000,"unit":"TAB","expiryDate":"2027-09-08","lotNo":"0945-68-03","remainQty":15,"location":"1A","manufacturer":""},{"no":2,"itemCode":"1180620","itemName":"DOMPERIDONE SUSP 5MG/5ML 30ML","dosageForm":"SUSPENSION","totalQty":30,"unit":"ML","expiryDate":"2027-02-21","lotNo":"602045","remainQty":357,"location":"1A","manufacturer":""},{"no":3,"itemCode":"1130220","itemName":"DOPAMINE INJ 250 MG/10ML","dosageForm":"INJECTION","totalQty":27,"unit":"AMP","expiryDate":"2027-02-06","lotNo":"","remainQty":27,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1131310","itemName":"DOXAZOSIN MESILATE 2 MG TAB","dosageForm":"TABLET","totalQty":25000,"unit":"TAB","expiryDate":"2027-06-20","lotNo":"258622","remainQty":50,"location":"","manufacturer":""},{"no":5,"itemCode":"1070710","itemName":"DOXYCYCLINE 100 MG CAP","dosageForm":"CAPSULE","totalQty":2150,"unit":"CAP","expiryDate":"2027-12-03","lotNo":"3FL1384","remainQty":6,"location":"1A","manufacturer":"เอเชี่ยน ยูเนี่ยน แลบเบอราทอรี่"},{"no":0,"itemCode":"1130710","itemName":"ENALAPRIL 5 MG TAB","dosageForm":"TABLET","totalQty":65000,"unit":"TAB","expiryDate":"2027-01-22","lotNo":"2600206","remainQty":65,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1130730","itemName":"ENALAPRIL 20 MG TAB","dosageForm":"TABLET","totalQty":55000,"unit":"TAB","expiryDate":"2027-12-13","lotNo":"2503443","remainQty":55,"location":"","manufacturer":""},{"no":2,"itemCode":"1260810","itemName":"Epinephrin HCL INJ (ADRENALINE) 1:1000","dosageForm":"INJECTION","totalQty":190,"unit":"AMP","expiryDate":"2027-08-19","lotNo":"IA02C02","remainQty":160,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1260810","itemName":"Epinephrin HCL INJ (ADRENALINE) 1:1000","dosageForm":"INJECTION","totalQty":190,"unit":"AMP","expiryDate":"2027-11-30","lotNo":"253543","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1070820","itemName":"ERYTHROMYCIN DRY SYRUP 125MG/5ML","dosageForm":"DRY SYRUP","totalQty":125,"unit":"MG/5ML","expiryDate":"2027-03-25","lotNo":"","remainQty":111,"location":"1A","manufacturer":"นิวไลฟ์ ฟาร์มา จำกัด"},{"no":5,"itemCode":"1070820","itemName":"ERYTHROMYCIN DRY SYRUP 125MG/5ML","dosageForm":"DRY SYRUP","totalQty":125,"unit":"MG/5ML","expiryDate":"2027-01-20","lotNo":"901100","remainQty":200,"location":"1A","manufacturer":"นิวไลฟ์ ฟาร์มา จำกัด"},{"no":9,"itemCode":"1160210","itemName":"ETHYL ALCOHOL SOLUTION","dosageForm":"SOLUTION","totalQty":0,"unit":"","expiryDate":"2027-11-20","lotNo":"C680154","remainQty":307,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1170280","itemName":"ETHYL ALCOHOL 95%","dosageForm":"SOLUTION","totalQty":0,"unit":"","expiryDate":"2027-10-28","lotNo":"C680140","remainQty":235,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1170280","itemName":"ETHYL ALCOHOL 95%","dosageForm":"SOLUTION","totalQty":0,"unit":"","expiryDate":"2027-10-29","lotNo":"C680141","remainQty":50,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1131410","itemName":"EZETIMIBE 10 MG TAB","dosageForm":"TABLET","totalQty":2160,"unit":"TAB","expiryDate":"2027-09-02","lotNo":"T680307","remainQty":35,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1131410","itemName":"EZETIMIBE 10 MG TAB","dosageForm":"TABLET","totalQty":2160,"unit":"TAB","expiryDate":"2027-10-09","lotNo":"1119215-1","remainQty":2,"location":"1A","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1131410","itemName":"EZETIMIBE 10 MG TAB","dosageForm":"TABLET","totalQty":2160,"unit":"TAB","expiryDate":"2027-03-05","lotNo":"1122471-1","remainQty":35,"location":"1A","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1140970","itemName":"FAVIPIRAVIR 200 MG TAB (COVID-19)","dosageForm":"TABLET","totalQty":4500,"unit":"TAB","expiryDate":"2027-06-13","lotNo":"","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1140970","itemName":"FAVIPIRAVIR 200 MG TAB (COVID-19)","dosageForm":"TABLET","totalQty":4500,"unit":"TAB","expiryDate":"2027-05-29","lotNo":"","remainQty":60,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1110160","itemName":"FERROUS FUMARATE 200 MG TAB","dosageForm":"TABLET","totalQty":50000,"unit":"TAB","expiryDate":"2027-12-25","lotNo":"512202","remainQty":50,"location":"","manufacturer":""},{"no":1,"itemCode":"1110130","itemName":"FERROUS FUMARATE DROP 45MG/0.6ML","dosageForm":"SUSPENSI","totalQty":469,"unit":"ขวด","expiryDate":"2027-03-14","lotNo":"2508018","remainQty":49,"location":"","manufacturer":"OLIC (THAILAND)"},{"no":1,"itemCode":"1110130","itemName":"FERROUS FUMARATE DROP 45MG/0.6ML","dosageForm":"SUSPENSI","totalQty":469,"unit":"ขวด","expiryDate":"2027-05-06","lotNo":"2508033","remainQty":420,"location":"","manufacturer":"OLIC (THAILAND)"},{"no":2,"itemCode":"1131320","itemName":"FINASTERIDE 5 MG TAB","dosageForm":"TABLET","totalQty":1050,"unit":"TAB","expiryDate":"2027-11-01","lotNo":"FN504","remainQty":35,"location":"1A","manufacturer":"มิลลิเมด จำกัด"},{"no":1,"itemCode":"1100320","itemName":"FLUOXETINE 20 MG TAB","dosageForm":"TABLET","totalQty":17000,"unit":"TAB","expiryDate":"2027-09-16","lotNo":"F680969","remainQty":34,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1100291","itemName":"FLUPHENAZINE DECANOATE INJ 50MG/2ML","dosageForm":"INJECTION","totalQty":80,"unit":"AMP","expiryDate":"2027-12-31","lotNo":"263028","remainQty":80,"location":"1A","manufacturer":""},{"no":2,"itemCode":"1290120","itemName":"FOLIC ACID 400 MCG TAB","dosageForm":"TABLET","totalQty":10400,"unit":"TAB","expiryDate":"2026-09-16","lotNo":"","remainQty":52,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1290110","itemName":"FOLIC ACID 5 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-10-02","lotNo":"F681099","remainQty":6,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1170110","itemName":"FUROSEMIDE 40 MG TAB","dosageForm":"TABLET","totalQty":1300,"unit":"TAB","expiryDate":"2027-09-10","lotNo":"F680983","remainQty":6,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1170120","itemName":"FUROSEMIDE INJ 20 MG/2ML","dosageForm":"INJECTION","totalQty":750,"unit":"AMP","expiryDate":"2027-09-20","lotNo":"425292","remainQty":750,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":7,"itemCode":"1100710","itemName":"GABAPENTIN 100 MG CAP","dosageForm":"CAPSULE","totalQty":18200,"unit":"CAP","expiryDate":"2027-11-25","lotNo":"K685356","remainQty":182,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1100720","itemName":"GABAPENTIN 400 MG CAP","dosageForm":"CAPSULE","totalQty":32000,"unit":"CAP","expiryDate":"2027-08-15","lotNo":"6AW2510","remainQty":320,"location":"","manufacturer":""},{"no":6,"itemCode":"1130650","itemName":"GEMFIBROZIL 600 MG TAB (ยาสปสช.)","dosageForm":"TABLET","totalQty":100,"unit":"TAB","expiryDate":"2027-06-23","lotNo":"1454","remainQty":1,"location":"","manufacturer":"PHARMASANT LABORATORY"},{"no":7,"itemCode":"1130630","itemName":"GEMFIBROZIL 600 MG TAB","dosageForm":"TABLET","totalQty":9000,"unit":"TAB","expiryDate":"2027-09-10","lotNo":"I39181","remainQty":18,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":8,"itemCode":"1070910","itemName":"GENTAMICIN SULFATE INJ 80MG/2ML","dosageForm":"INJECTION","totalQty":50,"unit":"AMP","expiryDate":"2027-09-22","lotNo":"425293","remainQty":50,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":0,"itemCode":"1191100","itemName":"GLIPIZIDE 5 MG TAB","dosageForm":"TABLET","totalQty":74500,"unit":"TAB","expiryDate":"2027-11-28","lotNo":"K39424","remainQty":149,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":1,"itemCode":"1271310","itemName":"GLUCOSE INJ 50% 50ML","dosageForm":"INJECTION","totalQty":66,"unit":"VIAL","expiryDate":"2027-09-16","lotNo":"L250860","remainQty":66,"location":"1A","manufacturer":""},{"no":2,"itemCode":"1071020","itemName":"GRISEOFULVIN 500 MG TAB","dosageForm":"TABLET","totalQty":1250,"unit":"TAB","expiryDate":"2027-07-30","lotNo":"49150","remainQty":5,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":4,"itemCode":"1250370","itemName":"HALOPERIDOL 0.5 MG TAB","dosageForm":"TABLET","totalQty":4000,"unit":"TAB","expiryDate":"2027-06-19","lotNo":"148842","remainQty":4,"location":"","manufacturer":""},{"no":5,"itemCode":"1250310","itemName":"HALOPERIDOL 2 MG TAB","dosageForm":"TABLET","totalQty":5000,"unit":"TAB","expiryDate":"2027-03-26","lotNo":"F680534","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1250330","itemName":"HALOPERIDOL 5 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-06-18","lotNo":"F680736","remainQty":1,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1250330","itemName":"HALOPERIDOL 5 MG TAB","dosageForm":"TABLET","totalQty":6000,"unit":"TAB","expiryDate":"2027-09-24","lotNo":"F681172","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"3280200","itemName":"HEPARIN LOCK","dosageForm":"INJECTION","totalQty":0,"unit":"","expiryDate":"2027-01-11","lotNo":"26/0057","remainQty":1300,"location":"","manufacturer":""},{"no":0,"itemCode":"1131110","itemName":"HYDRALAZINE HCL 25 MG TAB","dosageForm":"TABLET","totalQty":7500,"unit":"TAB","expiryDate":"2027-01-21","lotNo":"A40294","remainQty":15,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":2,"itemCode":"1170220","itemName":"HYDROCHLOROTHIAZIDE (HCTZ) 25 MG TAB","dosageForm":"TABLET","totalQty":44500,"unit":"TAB","expiryDate":"2027-03-24","lotNo":"T680132","remainQty":29,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1170220","itemName":"HYDROCHLOROTHIAZIDE (HCTZ) 25 MG TAB","dosageForm":"TABLET","totalQty":44500,"unit":"TAB","expiryDate":"2027-09-11","lotNo":"T680253","remainQty":60,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1190510","itemName":"HYDROCORTISONE INJ 100 MG/VIAL","dosageForm":"INJECTION","totalQty":1610,"unit":"VIAL","expiryDate":"2027-11-30","lotNo":"H24A159","remainQty":410,"location":"","manufacturer":"TROIKAA"},{"no":3,"itemCode":"1190510","itemName":"HYDROCORTISONE INJ 100 MG/VIAL","dosageForm":"INJECTION","totalQty":1610,"unit":"VIAL","expiryDate":"2027-11-30","lotNo":"H24A161","remainQty":1200,"location":"","manufacturer":"TROIKAA"},{"no":5,"itemCode":"1160410","itemName":"HYDROGEN PEROXIDE","dosageForm":"SOLUTION","totalQty":0,"unit":"","expiryDate":"2026-08-18","lotNo":"","remainQty":3,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1220410","itemName":"HYDROXYPROPYL METHYLCELLULOSE 0.5% EYE DROP","dosageForm":"SOLUTION","totalQty":121,"unit":"BOTT","expiryDate":"2027-12-16","lotNo":"24035","remainQty":121,"location":"1A","manufacturer":"แสงไทยเมดิคอล จำกัด"},{"no":7,"itemCode":"1060210","itemName":"HYDROXYZINE HCL 10 MG TAB","dosageForm":"TABLET","totalQty":7000,"unit":"TAB","expiryDate":"2027-07-24","lotNo":"150462","remainQty":7,"location":"","manufacturer":""},{"no":8,"itemCode":"1060240","itemName":"HYDROXYZINE HCL 10 MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2026-05-14","lotNo":"","remainQty":74,"location":"","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":9,"itemCode":"1180710","itemName":"HYOSCINE-N-BUTYL Br. INJ 20MG/ML","dosageForm":"INJECTION","totalQty":140,"unit":"AMP","expiryDate":"2026-07-26","lotNo":"","remainQty":140,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1180740","itemName":"HYOSCINE-N-BUTYL Br. SYR 5MG/5ML","dosageForm":"SYRUP","totalQty":48,"unit":"BOTT","expiryDate":"2027-07-11","lotNo":"0058-68-05","remainQty":48,"location":"1A","manufacturer":""},{"no":1,"itemCode":"1180720","itemName":"HYOSCINE-N-BUTYL Br.10 MG TAB","dosageForm":"TABLET","totalQty":6500,"unit":"TAB","expiryDate":"2027-10-24","lotNo":"8284014","remainQty":13,"location":"","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":2,"itemCode":"1020430","itemName":"IBUPROFEN 200 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-01-21","lotNo":"51240","remainQty":4,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":3,"itemCode":"1020410","itemName":"IBUPROFEN 400 MG TAB","dosageForm":"TABLET","totalQty":12500,"unit":"TAB","expiryDate":"2027-12-11","lotNo":"II550C","remainQty":25,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1020420","itemName":"IBUPROFEN SUSP 100MG/5ML 60ML","dosageForm":"SYRUP","totalQty":93,"unit":"BOTT","expiryDate":"2027-10-10","lotNo":"M680265","remainQty":93,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1190940","itemName":"INSULIN 70/30 MIXTARD PENFILL 100U/ML","dosageForm":"INJECTION","totalQty":1525,"unit":"VIAL","expiryDate":"2027-10-31","lotNo":"DAA10557","remainQty":25,"location":"","manufacturer":"WOCKHARDT LIMITED"},{"no":7,"itemCode":"1190940","itemName":"INSULIN 70/30 MIXTARD PENFILL 100U/ML","dosageForm":"INJECTION","totalQty":1525,"unit":"VIAL","expiryDate":"2027-11-30","lotNo":"DAB10034","remainQty":1500,"location":"","manufacturer":"WOCKHARDT LIMITED"},{"no":0,"itemCode":"1190950","itemName":"INSULIN NPH PENFILL 100U/ML","dosageForm":"INJECTION","totalQty":260,"unit":"VIAL","expiryDate":"2027-10-31","lotNo":"DAA10611","remainQty":60,"location":"","manufacturer":""},{"no":0,"itemCode":"1190950","itemName":"INSULIN NPH PENFILL 100U/ML","dosageForm":"INJECTION","totalQty":260,"unit":"VIAL","expiryDate":"2027-11-30","lotNo":"DAA10643","remainQty":200,"location":"","manufacturer":""},{"no":2,"itemCode":"1260660","itemName":"IPRATROPIUM+FENOTEROL 0.05+1.25 MG Nebulising","dosageForm":"SOLUTION","totalQty":4200,"unit":"VIAL","expiryDate":"2027-11-21","lotNo":"P1033A","remainQty":200,"location":"","manufacturer":"INTERPHARMA PUBLIC"},{"no":3,"itemCode":"1260680","itemName":"IPRATROPIUM+FENOTEROL MDI 0.02+0.05 MG","dosageForm":"INHALER","totalQty":0,"unit":"","expiryDate":"2027-02-18","lotNo":"AB606A","remainQty":100,"location":"2A","manufacturer":""},{"no":7,"itemCode":"1070242","itemName":"ISONIAZID 300 MG TAB","dosageForm":"TABLET","totalQty":364,"unit":"TAB","expiryDate":"2027-01-31","lotNo":"","remainQty":4,"location":"","manufacturer":""},{"no":7,"itemCode":"1070242","itemName":"ISONIAZID 300 MG TAB","dosageForm":"TABLET","totalQty":364,"unit":"TAB","expiryDate":"2026-12-30","lotNo":"","remainQty":9,"location":"","manufacturer":""},{"no":8,"itemCode":"1130310","itemName":"ISOSORBIDE DINITRATE 10 MG TAB","dosageForm":"TABLET","totalQty":1500,"unit":"TAB","expiryDate":"2027-10-24","lotNo":"F681098","remainQty":3,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1130320","itemName":"ISOSORBIDE DINITRATE SUBLINGUAL 5 MG TAB","dosageForm":"TABLET","totalQty":3000,"unit":"TAB","expiryDate":"2027-05-07","lotNo":"","remainQty":1,"location":"","manufacturer":""},{"no":9,"itemCode":"1130320","itemName":"ISOSORBIDE DINITRATE SUBLINGUAL 5 MG TAB","dosageForm":"TABLET","totalQty":3000,"unit":"TAB","expiryDate":"2027-12-03","lotNo":"1120687-1","remainQty":5,"location":"","manufacturer":""},{"no":7,"itemCode":"1271610","itemName":"KALIMATE 5g/sachet","dosageForm":"POWDER","totalQty":5,"unit":"GM","expiryDate":"2027-10-15","lotNo":"DL511","remainQty":2,"location":"1A","manufacturer":"มิลลิเมด จำกัด"},{"no":7,"itemCode":"1271610","itemName":"KALIMATE 5g/sachet","dosageForm":"POWDER","totalQty":5,"unit":"GM","expiryDate":"2027-01-29","lotNo":"DL603","remainQty":4,"location":"1A","manufacturer":"มิลลิเมด จำกัด"},{"no":6,"itemCode":"1100810","itemName":"LAMOTRIGINE 50 MG TAB","dosageForm":"TABLET","totalQty":330,"unit":"TAB","expiryDate":"2027-09-09","lotNo":"2OR2504","remainQty":11,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1050400","itemName":"LEVETIRACETAM 500 MG TAB","dosageForm":"TABLET","totalQty":450,"unit":"TAB","expiryDate":"2027-12-06","lotNo":"A680595","remainQty":15,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":9,"itemCode":"1100120","itemName":"LEVODOPA + BENSERAZIDE 200+50 MG TAB","dosageForm":"TABLET","totalQty":1500,"unit":"TAB","expiryDate":"2027-07-04","lotNo":"","remainQty":9,"location":"","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":9,"itemCode":"1100120","itemName":"LEVODOPA + BENSERAZIDE 200+50 MG TAB","dosageForm":"TABLET","totalQty":1500,"unit":"TAB","expiryDate":"2027-08-23","lotNo":"XB2508","remainQty":6,"location":"2A","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":2,"itemCode":"1010310","itemName":"LIDOCAINE 1%+EPINEPHRINE INJ 50ML","dosageForm":"INJECTION","totalQty":44,"unit":"VIAL","expiryDate":"2027-11-30","lotNo":"93BAC","remainQty":44,"location":"","manufacturer":""},{"no":0,"itemCode":"1250420","itemName":"LORAZEPAM 2 MG TAB","dosageForm":"TABLET","totalQty":3000,"unit":"TAB","expiryDate":"2027-10-28","lotNo":"J39428","remainQty":3,"location":"","manufacturer":"PHARMASANT LABORATORY"},{"no":1,"itemCode":"1130910","itemName":"LOSARTAN POTASSIUM 50 MG TAB","dosageForm":"TABLET","totalQty":79200,"unit":"TAB","expiryDate":"2027-11-09","lotNo":"L680804","remainQty":264,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1200620","itemName":"MALAYAN PIT VIPER ANTIVENIN (เซรุ่มงูกะปะ)","dosageForm":"INJECTION","totalQty":46,"unit":"VIAL","expiryDate":"2027-02-28","lotNo":"CR00125","remainQty":10,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":2,"itemCode":"1200620","itemName":"MALAYAN PIT VIPER ANTIVENIN (เซรุ่มงูกะปะ)","dosageForm":"INJECTION","totalQty":46,"unit":"VIAL","expiryDate":"2027-06-13","lotNo":"CR00225","remainQty":16,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1190810","itemName":"METFORMIN 500 MG TAB","dosageForm":"TABLET","totalQty":328000,"unit":"TAB","expiryDate":"2027-07-21","lotNo":"684511","remainQty":208,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1190810","itemName":"METFORMIN 500 MG TAB","dosageForm":"TABLET","totalQty":328000,"unit":"TAB","expiryDate":"2027-09-17","lotNo":"684670","remainQty":142,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1190810","itemName":"METFORMIN 500 MG TAB","dosageForm":"TABLET","totalQty":328000,"unit":"TAB","expiryDate":"2027-12-11","lotNo":"140962","remainQty":306,"location":"","manufacturer":""},{"no":1,"itemCode":"1191110","itemName":"METHIMAZOLE 5 MG TAB","dosageForm":"TABLET","totalQty":11500,"unit":"TAB","expiryDate":"2027-09-09","lotNo":"25T06053","remainQty":3,"location":"1A","manufacturer":"SRIPASIT PHARMA"},{"no":1,"itemCode":"1191110","itemName":"METHIMAZOLE 5 MG TAB","dosageForm":"TABLET","totalQty":11500,"unit":"TAB","expiryDate":"2027-11-18","lotNo":"25T06066","remainQty":20,"location":"1A","manufacturer":"SRIPASIT PHARMA"},{"no":5,"itemCode":"1181110","itemName":"METOCLOPRAMIDE INJ 10 MG/2ML","dosageForm":"INJECTION","totalQty":650,"unit":"AMP","expiryDate":"2027-10-22","lotNo":"J680387","remainQty":650,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1131400","itemName":"METOPROLOL TARTRATE 100 MG TAB","dosageForm":"TABLET","totalQty":8800,"unit":"TAB","expiryDate":"2027-11-11","lotNo":"K39151","remainQty":6,"location":"1A","manufacturer":"PHARMASANT LABORATORY"},{"no":8,"itemCode":"1071320","itemName":"METRONIDAZOLE INJ 500MG/100ML","dosageForm":"INJECTION","totalQty":370,"unit":"VIAL","expiryDate":"2027-12-26","lotNo":"B2512104","remainQty":200,"location":"","manufacturer":"AMANTA HEALTHCARE"},{"no":8,"itemCode":"1071320","itemName":"METRONIDAZOLE INJ 500MG/100ML","dosageForm":"INJECTION","totalQty":370,"unit":"VIAL","expiryDate":"2027-07-30","lotNo":"12750334","remainQty":170,"location":"","manufacturer":"AMANTA HEALTHCARE"},{"no":5,"itemCode":"1140990","itemName":"MOLNUPIRAVIR 200 MG CAP (COVID-19)","dosageForm":"CAPSULE","totalQty":4400,"unit":"CAP","expiryDate":"2027-06-30","lotNo":"","remainQty":50,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140990","itemName":"MOLNUPIRAVIR 200 MG CAP (COVID-19)","dosageForm":"CAPSULE","totalQty":4400,"unit":"CAP","expiryDate":"2027-07-02","lotNo":"","remainQty":35,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140990","itemName":"MOLNUPIRAVIR 200 MG CAP (COVID-19)","dosageForm":"CAPSULE","totalQty":4400,"unit":"CAP","expiryDate":"2027-05-08","lotNo":"","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140990","itemName":"MOLNUPIRAVIR 200 MG CAP (COVID-19)","dosageForm":"CAPSULE","totalQty":4400,"unit":"CAP","expiryDate":"2027-05-27","lotNo":"","remainQty":20,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1261700","itemName":"MONTELUKAST 10 MG TAB","dosageForm":"TABLET","totalQty":700,"unit":"TAB","expiryDate":"2027-07-08","lotNo":"L680534","remainQty":2,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1261700","itemName":"MONTELUKAST 10 MG TAB","dosageForm":"TABLET","totalQty":700,"unit":"TAB","expiryDate":"2027-11-19","lotNo":"L680943","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1030110","itemName":"MORPHINE SULFATE INJ 10MG/1ML","dosageForm":"INJECTION","totalQty":250,"unit":"AMP","expiryDate":"2027-09-01","lotNo":"","remainQty":50,"location":"","manufacturer":""},{"no":8,"itemCode":"1030110","itemName":"MORPHINE SULFATE INJ 10MG/1ML","dosageForm":"INJECTION","totalQty":250,"unit":"AMP","expiryDate":"2027-09-03","lotNo":"93AHL","remainQty":200,"location":"","manufacturer":""},{"no":4,"itemCode":"1290210","itemName":"MULTIVITAMIN TAB NED","dosageForm":"TABLET","totalQty":27000,"unit":"TAB","expiryDate":"2026-11-01","lotNo":"","remainQty":13,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1290210","itemName":"MULTIVITAMIN TAB NED","dosageForm":"TABLET","totalQty":27000,"unit":"TAB","expiryDate":"2027-07-26","lotNo":"","remainQty":14,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1021100","itemName":"NAPROXEN 250 MG TAB","dosageForm":"TABLET","totalQty":8500,"unit":"TAB","expiryDate":"2027-10-13","lotNo":"F681074","remainQty":17,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1131200","itemName":"NICARDIPINE HCL INJ 2MG/2ML","dosageForm":"INJECTION","totalQty":120,"unit":"AMP","expiryDate":"2027-01-05","lotNo":"L0532504E2","remainQty":120,"location":"","manufacturer":"BCWORLD PHARM"},{"no":1,"itemCode":"1130561","itemName":"NIFEDIPINE 20 MD SR TAB","dosageForm":"TABLET","totalQty":5600,"unit":"TAB","expiryDate":"2027-05-27","lotNo":"GA0280A","remainQty":6,"location":"","manufacturer":"ZYDUS LIFESCIENCES"},{"no":1,"itemCode":"1130561","itemName":"NIFEDIPINE 20 MD SR TAB","dosageForm":"TABLET","totalQty":5600,"unit":"TAB","expiryDate":"2027-06-15","lotNo":"GA0372A","remainQty":50,"location":"","manufacturer":"ZYDUS LIFESCIENCES"},{"no":4,"itemCode":"1260820","itemName":"NOREPINEPHRINE INJ 4MG/4ML","dosageForm":"INJECTION","totalQty":75,"unit":"AMP","expiryDate":"2026-10-31","lotNo":"","remainQty":15,"location":"","manufacturer":"NOVELL"},{"no":4,"itemCode":"1260820","itemName":"NOREPINEPHRINE INJ 4MG/4ML","dosageForm":"INJECTION","totalQty":75,"unit":"AMP","expiryDate":"2027-08-31","lotNo":"27G571","remainQty":60,"location":"","manufacturer":"NOVELL"},{"no":6,"itemCode":"1071410","itemName":"NORFLOXACIN 400 MG TAB","dosageForm":"TABLET","totalQty":1700,"unit":"TAB","expiryDate":"2027-06-27","lotNo":"259091","remainQty":4,"location":"1A","manufacturer":""},{"no":5,"itemCode":"1140960","itemName":"OSELTAMIVIR 30 MG CAP","dosageForm":"CAPSULE","totalQty":0,"unit":"","expiryDate":"2027-05-31","lotNo":"S685040","remainQty":74,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140960","itemName":"OSELTAMIVIR 30 MG CAP","dosageForm":"CAPSULE","totalQty":0,"unit":"","expiryDate":"2027-11-26","lotNo":"K685364","remainQty":150,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140950","itemName":"OSELTAMIVIR 45 MG CAP","dosageForm":"TABLET","totalQty":580,"unit":"CAP","expiryDate":"2027-06-10","lotNo":"","remainQty":28,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1140950","itemName":"OSELTAMIVIR 45 MG CAP","dosageForm":"TABLET","totalQty":580,"unit":"CAP","expiryDate":"2027-03-10","lotNo":"K685047","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1140940","itemName":"OSELTAMIVIR 75 MG CAP","dosageForm":"CAPSULE","totalQty":3000,"unit":"CAP","expiryDate":"2027-06-01","lotNo":"S685045","remainQty":10,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1140940","itemName":"OSELTAMIVIR 75 MG CAP","dosageForm":"CAPSULE","totalQty":3000,"unit":"CAP","expiryDate":"2027-01-26","lotNo":"K685020","remainQty":2,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1230210","itemName":"OXYTOCIN INJ 10IU/1ML","dosageForm":"INJECTION","totalQty":50,"unit":"AMP","expiryDate":"2027-05-09","lotNo":"","remainQty":50,"location":"1A","manufacturer":""},{"no":6,"itemCode":"1020620","itemName":"PARACETAMOL 325 MG TAB","dosageForm":"TABLET","totalQty":13500,"unit":"TAB","expiryDate":"2027-06-07","lotNo":"130187","remainQty":5,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":7,"itemCode":"1020610","itemName":"PARACETAMOL 500 MG TAB","dosageForm":"TABLET","totalQty":88000,"unit":"TAB","expiryDate":"2027-01-20","lotNo":"194645","remainQty":88,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":8,"itemCode":"1020630","itemName":"PARACETAMOL SYR 120MG/5ML 60ML","dosageForm":"SYRUP","totalQty":646,"unit":"BOTT","expiryDate":"2027-10-07","lotNo":"189205","remainQty":646,"location":"1A","manufacturer":"บูรพา ฟาร์มา จำกัด"},{"no":6,"itemCode":"1050330","itemName":"PHENYTOIN SODIUM 100 MG CAP SR","dosageForm":"CAPSULE","totalQty":5300,"unit":"CAP","expiryDate":"2026-10-23","lotNo":"8193035","remainQty":53,"location":"","manufacturer":""},{"no":7,"itemCode":"1050320","itemName":"PHENYTOIN SODIUM INJ 250MG/5ML","dosageForm":"INJECTION","totalQty":90,"unit":"VIAL","expiryDate":"2027-12-01","lotNo":"253536","remainQty":50,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1050320","itemName":"PHENYTOIN SODIUM INJ 250MG/5ML","dosageForm":"INJECTION","totalQty":90,"unit":"VIAL","expiryDate":"2027-01-11","lotNo":"263054","remainQty":40,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1190410","itemName":"PREDNISOLONE 5 MG TAB","dosageForm":"TABLET","totalQty":8800,"unit":"TAB","expiryDate":"2027-10-13","lotNo":"250183","remainQty":5,"location":"","manufacturer":""},{"no":8,"itemCode":"1190410","itemName":"PREDNISOLONE 5 MG TAB","dosageForm":"TABLET","totalQty":8800,"unit":"TAB","expiryDate":"2027-07-30","lotNo":"150923","remainQty":8,"location":"","manufacturer":""},{"no":0,"itemCode":"1261110","itemName":"PROCATEROL HCL 50 MCG TAB","dosageForm":"TABLET","totalQty":3000,"unit":"TAB","expiryDate":"2027-09-04","lotNo":"4I74F","remainQty":30,"location":"","manufacturer":""},{"no":2,"itemCode":"1130410","itemName":"PROPRANOLOL 10 MG TAB","dosageForm":"TABLET","totalQty":600,"unit":"TAB","expiryDate":"2027-06-09","lotNo":"L680613","remainQty":2,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1190610","itemName":"PROPYLTHIOURACIL 50 MG TAB (PTU)","dosageForm":"TABLET","totalQty":6500,"unit":"TAB","expiryDate":"2027-06-19","lotNo":"","remainQty":2,"location":"","manufacturer":"เอสพีเอส เมดิคอล"},{"no":4,"itemCode":"1190610","itemName":"PROPYLTHIOURACIL 50 MG TAB (PTU)","dosageForm":"TABLET","totalQty":6500,"unit":"TAB","expiryDate":"2027-10-25","lotNo":"","remainQty":10,"location":"","manufacturer":"เอสพีเอส เมดิคอล"},{"no":7,"itemCode":"2100420","itemName":"QUETIAPINE FUMARATE 200 MG TAB","dosageForm":"TABLET","totalQty":600,"unit":"TAB","expiryDate":"2027-09-23","lotNo":"W680184","remainQty":5,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"2100420","itemName":"QUETIAPINE FUMARATE 200 MG TAB","dosageForm":"TABLET","totalQty":600,"unit":"TAB","expiryDate":"2027-08-26","lotNo":"W680176","remainQty":15,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":1,"itemCode":"1171970","itemName":"REMDESIVIR INJ 100 MG/VIAL (COVID-19)","dosageForm":"INJECTION","totalQty":24,"unit":"VIAL","expiryDate":"2027-06-30","lotNo":"","remainQty":24,"location":"","manufacturer":""},{"no":1,"itemCode":"1100400","itemName":"RISPERIDONE 1 MG TAB","dosageForm":"TABLET","totalQty":10800,"unit":"TAB","expiryDate":"2027-05-07","lotNo":"","remainQty":180,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":3,"itemCode":"1100410","itemName":"RISPERIDONE 2 MG TAB","dosageForm":"TABLET","totalQty":4260,"unit":"TAB","expiryDate":"2027-09-09","lotNo":"A680462","remainQty":71,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":5,"itemCode":"1260610","itemName":"SALBUTAMOL 2 MG TAB","dosageForm":"TABLET","totalQty":4340,"unit":"TAB","expiryDate":"2027-05-29","lotNo":"147936","remainQty":34,"location":"","manufacturer":""},{"no":6,"itemCode":"1260620","itemName":"SALBUTAMOL 2 MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2027-11-24","lotNo":"M680304","remainQty":90,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1260620","itemName":"SALBUTAMOL 2 MG/5ML SYRUP","dosageForm":"SYRUP","totalQty":0,"unit":"","expiryDate":"2027-11-25","lotNo":"M680305","remainQty":150,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1260630","itemName":"SALBUTAMOL MDI","dosageForm":"INHALER","totalQty":0,"unit":"","expiryDate":"2027-10-31","lotNo":"71277","remainQty":20,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1260630","itemName":"SALBUTAMOL MDI","dosageForm":"INHALER","totalQty":0,"unit":"","expiryDate":"2027-02-12","lotNo":"70229","remainQty":150,"location":"1A","manufacturer":""},{"no":8,"itemCode":"1260640","itemName":"SALBUTAMOL Nebulizing Solution","dosageForm":"SOLUTION","totalQty":0,"unit":"","expiryDate":"2027-09-09","lotNo":"5150125","remainQty":83,"location":"1A","manufacturer":""},{"no":2,"itemCode":"1250500","itemName":"SERTRALINE 50 MG TAB","dosageForm":"TABLET","totalQty":12960,"unit":"TAB","expiryDate":"2027-12-03","lotNo":"S685101","remainQty":432,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1180440","itemName":"SIMETHICONE 80 MG TAB","dosageForm":"TABLET","totalQty":21000,"unit":"TAB","expiryDate":"2027-12-15","lotNo":"03425L06","remainQty":2,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1180440","itemName":"SIMETHICONE 80 MG TAB","dosageForm":"TABLET","totalQty":21000,"unit":"TAB","expiryDate":"2027-03-13","lotNo":"03426C01","remainQty":40,"location":"1A","manufacturer":""},{"no":0,"itemCode":"1130620","itemName":"SIMVASTATIN 20 MG TAB","dosageForm":"TABLET","totalQty":110900,"unit":"TAB","expiryDate":"2027-11-15","lotNo":"L680919","remainQty":684,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1130620","itemName":"SIMVASTATIN 20 MG TAB","dosageForm":"TABLET","totalQty":110900,"unit":"TAB","expiryDate":"2027-11-15","lotNo":"L680920","remainQty":425,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":4,"itemCode":"1271100","itemName":"SODIUM BICARBONATE 300 MG TAB","dosageForm":"TABLET","totalQty":8000,"unit":"TAB","expiryDate":"2027-11-07","lotNo":"SP68-6787","remainQty":8,"location":"1A","manufacturer":"GOLDEN CUP"},{"no":5,"itemCode":"1270910","itemName":"SODIUM BICARBONATE 7.5% INJ 50ML","dosageForm":"SOLUTION","totalQty":43,"unit":"AMP.","expiryDate":"2027-09-08","lotNo":"253393","remainQty":43,"location":"","manufacturer":""},{"no":8,"itemCode":"1100510","itemName":"SODIUM VALPROATE 200 MG EC TAB","dosageForm":"TABLET","totalQty":1680,"unit":"TAB","expiryDate":"2027-09-30","lotNo":"4R2NK","remainQty":6,"location":"1C","manufacturer":""},{"no":8,"itemCode":"1100510","itemName":"SODIUM VALPROATE 200 MG EC TAB","dosageForm":"TABLET","totalQty":1680,"unit":"TAB","expiryDate":"2027-03-31","lotNo":"5R524","remainQty":36,"location":"1C","manufacturer":""},{"no":9,"itemCode":"1100520","itemName":"SODIUM VALPROATE 500 MG SR TAB","dosageForm":"TABLET","totalQty":450,"unit":"TAB","expiryDate":"2027-08-31","lotNo":"GAS4275","remainQty":15,"location":"1C","manufacturer":""},{"no":4,"itemCode":"1170510","itemName":"SPIRONOLACTONE 25 MG TAB","dosageForm":"TABLET","totalQty":3800,"unit":"TAB","expiryDate":"2027-09-30","lotNo":"2502729","remainQty":6,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1170510","itemName":"SPIRONOLACTONE 25 MG TAB","dosageForm":"TABLET","totalQty":3800,"unit":"TAB","expiryDate":"2027-01-13","lotNo":"2600129","remainQty":7,"location":"1A","manufacturer":""},{"no":1,"itemCode":"3530320","itemName":"TENOFOVIR+EMTRICITABINE 300+200 MG TAB","dosageForm":"TABLET","totalQty":360,"unit":"TAB","expiryDate":"2027-10-26","lotNo":"W685066","remainQty":12,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1530340","itemName":"TENOFOVIR+LAMIVUDINE+DOLUTEGRAVIR TAB","dosageForm":"TABLET","totalQty":14070,"unit":"TAB","expiryDate":"2027-02-18","lotNo":"","remainQty":103,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":6,"itemCode":"1530340","itemName":"TENOFOVIR+LAMIVUDINE+DOLUTEGRAVIR TAB","dosageForm":"TABLET","totalQty":14070,"unit":"TAB","expiryDate":"2027-12-08","lotNo":"D680391","remainQty":48,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1260910","itemName":"TERBUTALINE INJ 0.5MG/1ML","dosageForm":"INJECTION","totalQty":30,"unit":"AMP","expiryDate":"2027-08-07","lotNo":"","remainQty":30,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":1,"itemCode":"1260710","itemName":"THEOPHYLLINE 200 MG SR TAB","dosageForm":"TABLET","totalQty":9000,"unit":"TAB","expiryDate":"","lotNo":"","remainQty":9000,"location":"","manufacturer":"ADCOCK INGRAM"},{"no":0,"itemCode":"1210110","itemName":"TOLPERISONE 50 MG TAB","dosageForm":"TABLET","totalQty":8500,"unit":"TAB","expiryDate":"2027-12-02","lotNo":"8222030","remainQty":17,"location":"1A","manufacturer":"ที.โอ.เคมีคอลส์ (1979) จำกัด"},{"no":1,"itemCode":"1050500","itemName":"TOPIRAMATE 50 MG TAB","dosageForm":"TABLET","totalQty":1020,"unit":"TAB","expiryDate":"2027-08-14","lotNo":"6ON2502","remainQty":17,"location":"1A","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":2,"itemCode":"1030310","itemName":"TRAMADOL HCl 50 MG CAP","dosageForm":"CAPSULE","totalQty":0,"unit":"","expiryDate":"2027-09-16","lotNo":"51276","remainQty":8,"location":"1A","manufacturer":""},{"no":3,"itemCode":"1030320","itemName":"TRAMADOL HCl INJ 50MG/ML","dosageForm":"INJECTION","totalQty":400,"unit":"AMP","expiryDate":"2027-11-15","lotNo":"425351","remainQty":400,"location":"1A","manufacturer":"ที.พี ดรักส์"},{"no":5,"itemCode":"1250810","itemName":"TRAZODONE HCL 50 MG TAB","dosageForm":"TABLET","totalQty":2000,"unit":"TAB","expiryDate":"2027-11-03","lotNo":"0925TZ10","remainQty":4,"location":"1A","manufacturer":"ยูโทเปี้ยน จำกัด"},{"no":6,"itemCode":"1140650","itemName":"TRIAMCINOLONE 0.02% CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-09-15","lotNo":"505","remainQty":517,"location":"1A","manufacturer":"2เอ็ม(เมด-เมเกอร์) จำกัด"},{"no":7,"itemCode":"1140610","itemName":"TRIAMCINOLONE 0.1% CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-11-29","lotNo":"G680287","remainQty":97,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":7,"itemCode":"1140610","itemName":"TRIAMCINOLONE 0.1% CREAM","dosageForm":"CREAM","totalQty":0,"unit":"","expiryDate":"2027-12-02","lotNo":"G680289","remainQty":589,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":8,"itemCode":"1140630","itemName":"TRIAMCINOLONE ACETONIDE INJ 50MG/5ML","dosageForm":"INJECTION","totalQty":15,"unit":"VIAL","expiryDate":"2026-07-26","lotNo":"MTA5C705","remainQty":15,"location":"","manufacturer":"DONGKWANG"},{"no":4,"itemCode":"1100210","itemName":"TRIHEXYPHENIDYL 5 MG TAB","dosageForm":"TABLET","totalQty":10500,"unit":"TAB","expiryDate":"2027-10-23","lotNo":"F681134","remainQty":21,"location":"","manufacturer":"องค์การเภสัชกรรม"},{"no":0,"itemCode":"1290320","itemName":"VITAMIN B COMPLEX INJ 1ML","dosageForm":"INJECTION","totalQty":200,"unit":"AMP.","expiryDate":"2027-08-20","lotNo":"425247","remainQty":200,"location":"2A","manufacturer":"ที.พี ดรักส์"},{"no":1,"itemCode":"1290310","itemName":"VITAMIN B COMPLEX TAB","dosageForm":"TABLET","totalQty":32000,"unit":"TAB","expiryDate":"2027-01-15","lotNo":"AK260161","remainQty":32,"location":"","manufacturer":""},{"no":2,"itemCode":"1290710","itemName":"VITAMIN B-1 100 MG TAB","dosageForm":"TABLET","totalQty":17000,"unit":"TAB","expiryDate":"2027-02-03","lotNo":"RF604A","remainQty":17,"location":"1A","manufacturer":""},{"no":4,"itemCode":"1290610","itemName":"VITAMIN B-6 50 MG TAB","dosageForm":"TABLET","totalQty":4000,"unit":"TAB","expiryDate":"2026-11-18","lotNo":"","remainQty":3,"location":"","manufacturer":""},{"no":4,"itemCode":"1290610","itemName":"VITAMIN B-6 50 MG TAB","dosageForm":"TABLET","totalQty":4000,"unit":"TAB","expiryDate":"2026-12-03","lotNo":"","remainQty":1,"location":"","manufacturer":""},{"no":5,"itemCode":"1290410","itemName":"VITAMIN C 100 MG TAB","dosageForm":"TABLET","totalQty":19000,"unit":"TAB","expiryDate":"2027-12-22","lotNo":"512181","remainQty":19,"location":"","manufacturer":""},{"no":7,"itemCode":"1110210","itemName":"VITAMIN K1 INJ 1MG 0.5ML","dosageForm":"INJECTION","totalQty":124,"unit":"AMP","expiryDate":"2027-11-30","lotNo":"","remainQty":24,"location":"1A","manufacturer":""},{"no":7,"itemCode":"1110210","itemName":"VITAMIN K1 INJ 1MG 0.5ML","dosageForm":"INJECTION","totalQty":124,"unit":"AMP","expiryDate":"2027-05-31","lotNo":"253237","remainQty":100,"location":"1A","manufacturer":""},{"no":5,"itemCode":"1271220","itemName":"WATER FOR INJECTION","dosageForm":"INJECTION","totalQty":0,"unit":"","expiryDate":"2027-06-30","lotNo":"2545135","remainQty":95,"location":"","manufacturer":"AMANTA HEALTHCARE"},{"no":6,"itemCode":"1271240","itemName":"WATER FOR INJECTION 10ML","dosageForm":"INJECTION","totalQty":0,"unit":"","expiryDate":"2027-12-14","lotNo":"B2512186","remainQty":20,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":6,"itemCode":"1271240","itemName":"WATER FOR INJECTION 10ML","dosageForm":"INJECTION","totalQty":0,"unit":"","expiryDate":"2027-02-16","lotNo":"B2602036","remainQty":100,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":7,"itemCode":"1271230","itemName":"WATER FOR IRRIGATION 1000ML","dosageForm":"INJECTION","totalQty":127,"unit":"BOTT","expiryDate":"2027-11-06","lotNo":"2511174","remainQty":127,"location":"","manufacturer":"THAI NAKORN PATANA"},{"no":1,"itemCode":"1141640","itemName":"v-INFLUENZA VACCINE 0.5 (EPI)","dosageForm":"INJECTION","totalQty":34,"unit":"VIAL","expiryDate":"2026-07-03","lotNo":"V60225062","remainQty":34,"location":"","manufacturer":"GC BIOPHARMA"},{"no":0,"itemCode":"1141510","itemName":"v-MMR VACCINE 1 DOSE (EPI ROUTINE)","dosageForm":"INJECTION","totalQty":59,"unit":"VIAL","expiryDate":"2026-10-16","lotNo":"Y017260","remainQty":50,"location":"","manufacturer":"GLAXOSMITHKLINE"},{"no":0,"itemCode":"1141510","itemName":"v-MMR VACCINE 1 DOSE (EPI ROUTINE)","dosageForm":"INJECTION","totalQty":59,"unit":"VIAL","expiryDate":"2026-10-16","lotNo":"Y017259","remainQty":9,"location":"","manufacturer":"GLAXOSMITHKLINE"},{"no":1,"itemCode":"1141500","itemName":"v-HPV VACCINE 2 สายพันธุ์","dosageForm":"INJECTION","totalQty":11,"unit":"AMP","expiryDate":"2026-10-14","lotNo":"","remainQty":6,"location":"","manufacturer":"GLAXO WELLCOME S.A."},{"no":8,"itemCode":"1141711","itemName":"v-ROTAVIRUS VACCINE 3 DOSE","dosageForm":"INJECTION","totalQty":0,"unit":"","expiryDate":"2026-10-31","lotNo":"2154R222","remainQty":44,"location":"2C","manufacturer":"SERUM INSTITUTE OF"},{"no":2,"itemCode":"3050560","itemName":"SYRING 1CC+NEEDLE 25GX1 inch","dosageForm":"SET","totalQty":3700,"unit":"PCS","expiryDate":"2026-09-10","lotNo":"","remainQty":3700,"location":"","manufacturer":""},{"no":3,"itemCode":"3100530","itemName":"TEGADERM 6X7 CM","dosageForm":"PLASTER","totalQty":100,"unit":"PCS","expiryDate":"2026-09-22","lotNo":"","remainQty":1,"location":"","manufacturer":""},{"no":4,"itemCode":"1300710","itemName":"ครีมใบบัวบก 20G","dosageForm":"CREAM","totalQty":25,"unit":"หลอด","expiryDate":"2027-09-18","lotNo":"ECC2501","remainQty":25,"location":"","manufacturer":"THAI HERBAL"},{"no":9,"itemCode":"1300431","itemName":"ฟ้าทะลายโจรแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":10920,"unit":"CAP","expiryDate":"2027-09-18","lotNo":"MB03725010","remainQty":22,"location":"","manufacturer":""},{"no":9,"itemCode":"1300431","itemName":"ฟ้าทะลายโจรแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":10920,"unit":"CAP","expiryDate":"2027-09-30","lotNo":"MB03725012","remainQty":160,"location":"","manufacturer":""},{"no":5,"itemCode":"1300310","itemName":"พญายอ ครีม 5 กรัม","dosageForm":"CREAM","totalQty":63,"unit":"หลอด","expiryDate":"2027-10-29","lotNo":"TV68012","remainQty":3,"location":"","manufacturer":"ธงทองโอสถ จำกัด"},{"no":5,"itemCode":"1300310","itemName":"พญายอ ครีม 5 กรัม","dosageForm":"CREAM","totalQty":63,"unit":"หลอด","expiryDate":"2027-02-17","lotNo":"TV69001","remainQty":60,"location":"","manufacturer":"ธงทองโอสถ จำกัด"},{"no":6,"itemCode":"1300810","itemName":"เพชรสังฆาตแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":2900,"unit":"CAP","expiryDate":"2027-11-14","lotNo":"PTT68005","remainQty":26,"location":"","manufacturer":"ธงทองโอสถ จำกัด"},{"no":7,"itemCode":"1181510","itemName":"ยาขมิ้นชันแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":10620,"unit":"CAP","expiryDate":"2027-07-23","lotNo":"ทิ03525005","remainQty":27,"location":"","manufacturer":""},{"no":7,"itemCode":"1181510","itemName":"ยาขมิ้นชันแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":10620,"unit":"CAP","expiryDate":"2027-09-08","lotNo":"MB03525006","remainQty":150,"location":"","manufacturer":""},{"no":9,"itemCode":"1302010","itemName":"ยาเขียวหอมแคปซูล 500 MG","dosageForm":"CAPSULE","totalQty":500,"unit":"CAP","expiryDate":"2027-09-27","lotNo":"","remainQty":2,"location":"","manufacturer":""},{"no":8,"itemCode":"1300520","itemName":"ยาหม่องไพล 50 กรัม","dosageForm":"OINTMENT","totalQty":348,"unit":"ขวด","expiryDate":"2027-09-30","lotNo":"6/25","remainQty":348,"location":"","manufacturer":""},{"no":9,"itemCode":"1302211","itemName":"ยาหอมเทพจิตร 200 mg","dosageForm":"TABLET","totalQty":2400,"unit":"TAB","expiryDate":"2027-10-13","lotNo":"THE68012","remainQty":6,"location":"G","manufacturer":"ธงทองโอสถ จำกัด"},{"no":1,"itemCode":"1302111","itemName":"ยาหอมนวโกฐ 200 mg","dosageForm":"TABLET","totalQty":600,"unit":"TAB","expiryDate":"2027-11-14","lotNo":"NA68006","remainQty":6,"location":"G","manufacturer":"ธงทองโอสถ จำกัด"},{"no":3,"itemCode":"1261010","itemName":"ยาอมมะแว้ง","dosageForm":"TABLET","totalQty":20000,"unit":"TAB","expiryDate":"2027-01-23","lotNo":"T26004","remainQty":50,"location":"","manufacturer":""},{"no":4,"itemCode":"1140730","itemName":"ลูกประคบสมุนไพรแห้ง","dosageForm":"COMPRESS","totalQty":76,"unit":"ลูก","expiryDate":"2027-03-13","lotNo":"P26017","remainQty":76,"location":"","manufacturer":""},{"no":9,"itemCode":"1300631","itemName":"ยาชงรางจืด (10 sachets*3g)","dosageForm":"POWDER","totalQty":94,"unit":"ห่อ","expiryDate":"2027-07-28","lotNo":"THI68002","remainQty":94,"location":"","manufacturer":""},{"no":1,"itemCode":"1300610","itemName":"ยาชงชุมเห็ดเทศ 3 กรัม","dosageForm":"POWDER","totalQty":120,"unit":"ซองชา","expiryDate":"2027-05-08","lotNo":"RIP68001","remainQty":12,"location":"","manufacturer":""}];
// ============== PROCESSING ==============
let actionData = JSON.parse(localStorage.getItem('pharma_actions') || '{}');
function calcDaysLeft(expiryDate) {
if (!expiryDate) return null;
const exp = parseExpiryDate(expiryDate);
if (!exp) return null;
return Math.ceil((exp - startOfToday()) / MS_PER_DAY);
}
function calcTimeLeft(expiryDate) {
const exp = parseExpiryDate(expiryDate);
if (!exp) return null;
return exp.getTime() - Date.now();
}
function formatDaysLeft(d) {
if (d.daysLeft === null) return '<span class="text-gray-400">-</span>';
if (d.timeLeftMs < 0) {
const overdueDays = Math.floor(Math.abs(d.timeLeftMs) / MS_PER_DAY);
return `<span class="font-bold text-red-600">-${overdueDays} วัน</span>`;
}
const days = Math.floor(d.timeLeftMs / MS_PER_DAY);
const hours = Math.floor((d.timeLeftMs % MS_PER_DAY) / 3600000);
const minutes = Math.floor((d.timeLeftMs % 3600000) / 60000);
const seconds = Math.floor((d.timeLeftMs % 60000) / 1000);
const time = `${String(hours).padStart(2,'0')}:${String(minutes).padStart(2,'0')}:${String(seconds).padStart(2,'0')}`;
const cls = d.daysLeft <= 30 ? 'text-red-600' : d.daysLeft <= 90 ? 'text-orange-600' : 'text-gray-600';
return `<span class="${d.daysLeft <= 90 ? 'font-bold' : ''} ${cls}">${days} วัน ${time}</span>`;
}
function getRiskLevel(days) {
if (days === null) return 'nodate';
if (days < 0) return 'expired';
if (days <= 30) return 'critical';
if (days <= 90) return 'urgent';
if (days <= 180) return 'high';
if (days <= 270) return 'watch';
if (days <= 365) return 'normal2';
return 'ok';
}
const RISK_LABELS = {
expired:'หมดอายุแล้ว', critical:'วิกฤติ (≤30 วัน)',
urgent:'ด่วนพิเศษ (31-90 วัน)', high:'เฝ้าระวังสูง (91-180 วัน)',
watch:'เฝ้าระวัง (181-270 วัน)', normal2:'ติดตามปกติ (271-365 วัน)',
ok:'ปกติ (>365 วัน)', nodate:'ไม่มีวันหมดอายุ'
};
const RISK_COLORS = {
expired:'#dc2626', critical:'#ea580c', urgent:'#ca8a04',
high:'#2563eb', watch:'#16a34a', normal2:'#475569', ok:'#94a3b8', nodate:'#d1d5db'
};
const RISK_BADGE = {
expired:'badge-expired', critical:'badge-critical', urgent:'badge-urgent',
high:'badge-high', watch:'badge-watch', normal2:'badge-normal2', ok:'badge-ok', nodate:'badge-ok'
};
const ACTION_COLORS = {
'PENDING':'bg-gray-100 text-gray-600',
'CHECKED':'bg-blue-100 text-blue-700',
'USED FIRST':'bg-yellow-100 text-yellow-700',
'MOVED':'bg-purple-100 text-purple-700',
'RETURNED':'bg-orange-100 text-orange-700',
'DISPOSED':'bg-red-100 text-red-700',
'DONE':'bg-green-100 text-green-700'
};
// Build enriched data
const DATA = RAW_DATA.map((d, i) => {
const days = calcDaysLeft(d.expiryDate);
const risk = getRiskLevel(days);
const timeLeftMs = calcTimeLeft(d.expiryDate);
const key = d.itemCode + '_' + (d.lotNo || 'NOLOT') + '_' + i;
const action = actionData[key] || { status: 'PENDING', note: '' };
return { ...d, id: i, key, daysLeft: days, timeLeftMs, riskLevel: risk, actionStatus: action.status, actionNote: action.note };
});
function refreshExpiryData() {
DATA.forEach(d => {
d.daysLeft = calcDaysLeft(d.expiryDate);
d.timeLeftMs = calcTimeLeft(d.expiryDate);
d.riskLevel = getRiskLevel(d.daysLeft);
});
}
// ============== FILTER STATE ==============
let currentPage = 1;
const PAGE_SIZE = 50;
let tableMode = 'compact';
let filteredData = [...DATA];
let currentQuickStatus = '';
function applyFilters(quickStatus, quickAction, keepPage = false) {
const q = (document.getElementById('searchInput')?.value || '').toLowerCase().trim();
let status = document.getElementById('filterStatus')?.value || '';
const action = (quickAction !== undefined ? quickAction : document.getElementById('filterAction')?.value || '');
const form = document.getElementById('filterForm')?.value || '';
const loc = document.getElementById('filterLocation')?.value || '';
const month = document.getElementById('filterMonth')?.value || '';
if (quickStatus !== undefined) {
currentQuickStatus = quickStatus;
if (document.getElementById('filterStatus')) document.getElementById('filterStatus').value = '';
status = '';
}
filteredData = DATA.filter(d => {
if (q && !d.itemName.toLowerCase().includes(q) && !d.itemCode.includes(q) && !(d.lotNo||'').toLowerCase().includes(q) && !(d.tradeName||'').toLowerCase().includes(q)) return false;
if (form && d.dosageForm !== form) return false;
if (loc && d.location !== loc) return false;
if (month && !(d.expiryDate||'').startsWith(month)) return false;
if (action && d.actionStatus !== action) return false;
// Status filter
const statuses = (status || currentQuickStatus).split(',').filter(Boolean);
if (statuses.length > 0) {
if (!statuses.includes(d.riskLevel)) return false;
}
return true;
});
// Sort: expired first, then by daysLeft asc
filteredData.sort((a, b) => {
if (a.daysLeft === null && b.daysLeft === null) return 0;
if (a.daysLeft === null) return 1;
if (b.daysLeft === null) return -1;
return a.daysLeft - b.daysLeft;
});
if (!keepPage) currentPage = 1;
renderTable();
updateResultCount();
}
function setQuickFilter(status) {
currentQuickStatus = status;
if (document.getElementById('filterStatus')) document.getElementById('filterStatus').value = '';
if (document.getElementById('searchInput')) document.getElementById('searchInput').value = '';
if (document.getElementById('filterAction')) document.getElementById('filterAction').value = '';
if (document.getElementById('filterForm')) document.getElementById('filterForm').value = '';
if (document.getElementById('filterLocation')) document.getElementById('filterLocation').value = '';
if (document.getElementById('filterMonth')) document.getElementById('filterMonth').value = '';
filteredData = [...DATA];
if (status) {
const statuses = status.split(',');
filteredData = DATA.filter(d => statuses.includes(d.riskLevel));
}
filteredData.sort((a, b) => {
if (a.daysLeft === null && b.daysLeft === null) return 0;
if (a.daysLeft === null) return 1;
if (b.daysLeft === null) return -1;
return a.daysLeft - b.daysLeft;
});
currentPage = 1;
renderTable();
updateResultCount();
}
function filterByStatus(status) {
showTab('search');
setTimeout(() => setQuickFilter(status), 50);
}
function filterByAction(action) {
showTab('search');
setTimeout(() => {
document.getElementById('filterAction').value = action;
setQuickFilter('');
}, 50);
}
// ============== TABLE RENDERING ==============
function setMode(mode) {
tableMode = mode;
document.getElementById('modeCompact').className = `text-xs px-3 py-1 rounded border ${mode==='compact'?'tab-active':'tab-inactive'}`;
document.getElementById('modeFull').className = `text-xs px-3 py-1 rounded border ${mode==='full'?'tab-active':'tab-inactive'}`;
renderTable();
}
function renderTable() {
const start = (currentPage - 1) * PAGE_SIZE;
const end = start + PAGE_SIZE;
const pageData = filteredData.slice(start, end);
const head = document.getElementById('mainTableHead');
const body = document.getElementById('mainTableBody');
const cols = tableMode === 'compact'
? ['รหัส', 'ชื่อยา/เวชภัณฑ์', 'Lot', 'วันหมดอายุ', 'วันเหลือ', 'คงเหลือ', 'สถานะ', 'Action']
: ['รหัส', 'ชื่อยา/เวชภัณฑ์', 'รูปแบบ', 'Lot', 'วันหมดอายุ', 'วันเหลือ', 'จำนวน (รวม)', 'คงเหลือ', 'หน่วย', 'ตำแหน่ง', 'สถานะ', 'Action'];
head.innerHTML = `<tr class="bg-gray-50 text-xs text-gray-500">${cols.map(c => `<th class="text-left px-3 py-2">${c}</th>`).join('')}</tr>`;
body.innerHTML = pageData.map(d => {
const riskBadge = `<span class="chip ${RISK_BADGE[d.riskLevel]}">${RISK_LABELS[d.riskLevel]}</span>`;
const daysTxt = formatDaysLeft(d);
const rowBg = d.riskLevel === 'expired' ? 'row-expired' : d.riskLevel === 'critical' ? 'row-critical' : d.riskLevel === 'urgent' ? 'row-urgent' : '';
const actionBadge = `<span class="chip text-xs ${ACTION_COLORS[d.actionStatus] || 'bg-gray-100 text-gray-500'}">${d.actionStatus}</span>`;
const expFormatted = d.expiryDate ? d.expiryDate.split('-').reverse().join('/') : '-';
if (tableMode === 'compact') {
return `<tr class="data-row border-b ${rowBg}" onclick="openModal(${d.id})">
<td class="px-3 py-2 font-mono text-xs">${d.itemCode}</td>
<td class="px-3 py-2 font-medium">${d.itemName}</td>
<td class="px-3 py-2 text-xs text-gray-500">${d.lotNo||'-'}</td>
<td class="px-3 py-2 text-xs">${expFormatted}</td>
<td class="px-3 py-2">${daysTxt}</td>
<td class="px-3 py-2 text-right">${d.remainQty?.toLocaleString()}</td>
<td class="px-3 py-2">${riskBadge}</td>
<td class="px-3 py-2">${actionBadge}</td>
</tr>`;
} else {
return `<tr class="data-row border-b ${rowBg}" onclick="openModal(${d.id})">
<td class="px-3 py-2 font-mono text-xs">${d.itemCode}</td>
<td class="px-3 py-2 font-medium">${d.itemName}</td>
<td class="px-3 py-2 text-xs">${d.dosageForm||'-'}</td>
<td class="px-3 py-2 text-xs text-gray-500">${d.lotNo||'-'}</td>
<td class="px-3 py-2 text-xs">${expFormatted}</td>
<td class="px-3 py-2">${daysTxt}</td>
<td class="px-3 py-2 text-right text-xs">${d.totalQty?.toLocaleString()}</td>
<td class="px-3 py-2 text-right font-medium">${d.remainQty?.toLocaleString()}</td>
<td class="px-3 py-2 text-xs">${d.unit||'-'}</td>
<td class="px-3 py-2 text-xs">${d.location||'-'}</td>
<td class="px-3 py-2">${riskBadge}</td>
<td class="px-3 py-2">${actionBadge}</td>
</tr>`;
}
}).join('');
renderPagination();
}
function renderPagination() {
const total = filteredData.length;
const totalPages = Math.ceil(total / PAGE_SIZE);
const pi = document.getElementById('pageInfo');
const pc = document.getElementById('pagination');
const start = (currentPage - 1) * PAGE_SIZE + 1;
const end = Math.min(currentPage * PAGE_SIZE, total);
pi.textContent = total ? `แสดง ${start}–${end} จาก ${total} รายการ` : 'ไม่พบรายการ';
let btns = '';
if (totalPages > 1) {
btns += `<button onclick="goPage(${currentPage-1})" class="px-2 py-1 text-xs rounded border ${currentPage===1?'opacity-40 cursor-default':'hover:bg-gray-100'}" ${currentPage===1?'disabled':''}>‹</button>`;
const range = [];
for (let i = Math.max(1, currentPage-2); i <= Math.min(totalPages, currentPage+2); i++) range.push(i);
if (range[0] > 1) btns += `<button onclick="goPage(1)" class="px-2 py-1 text-xs rounded border hover:bg-gray-100">1</button>`;
if (range[0] > 2) btns += `<span class="px-1 text-xs text-gray-400">…</span>`;
range.forEach(p => {
btns += `<button onclick="goPage(${p})" class="px-2 py-1 text-xs rounded border ${p===currentPage?'bg-green-600 text-white border-green-600':'hover:bg-gray-100'}">${p}</button>`;
});
if (range[range.length-1] < totalPages-1) btns += `<span class="px-1 text-xs text-gray-400">…</span>`;
if (range[range.length-1] < totalPages) btns += `<button onclick="goPage(${totalPages})" class="px-2 py-1 text-xs rounded border hover:bg-gray-100">${totalPages}</button>`;
btns += `<button onclick="goPage(${currentPage+1})" class="px-2 py-1 text-xs rounded border ${currentPage===totalPages?'opacity-40 cursor-default':'hover:bg-gray-100'}" ${currentPage===totalPages?'disabled':''}>›</button>`;
}
pc.innerHTML = btns;
}
function goPage(p) {
const max = Math.ceil(filteredData.length / PAGE_SIZE);
if (p < 1 || p > max) return;
currentPage = p;
renderTable();
}
function updateResultCount() {
const el = document.getElementById('resultCount');
if (el) el.textContent = `พบทั้งหมด ${filteredData.length} รายการ (จาก ${DATA.length} records ทั้งหมด)`;
}
// ============== MODAL ==============
function openModal(id) {
const d = DATA[id];
const days = d.daysLeft;
const riskBadge = `<span class="chip ${RISK_BADGE[d.riskLevel]}">${RISK_LABELS[d.riskLevel]}</span>`;
const expFormatted = d.expiryDate ? d.expiryDate.split('-').reverse().join('/') : '-';
const dayLabel = days === null ? '-' : formatDaysLeft(d);
const savedAction = actionData[d.key] || { status: 'PENDING', note: '' };
document.getElementById('modalContent').innerHTML = `
<div class="grid grid-cols-2 gap-3 mb-4">
<div class="col-span-2 p-3 bg-green-50 rounded-lg border border-green-200">
<div class="text-xs text-gray-500 mb-1">ชื่อเวชภัณฑ์</div>
<div class="font-bold text-green-900 text-base">${d.itemName}</div>
</div>
${field('รหัสเวชภัณฑ์', d.itemCode, 'font-mono')}
${field('รูปแบบยา', d.dosageForm||'-')}
${field('ผู้ผลิต', d.manufacturer||'-')}
${field('หน่วยนับ', d.unit||'-')}
${field('Lot/รุ่นการผลิต', d.lotNo||'-', 'font-mono')}
${field('วันหมดอายุ', expFormatted)}
${field('วันคงเหลือ', dayLabel)}
${field('ปริมาณรวม', (d.totalQty||0).toLocaleString())}
${field('คงเหลือ', (d.remainQty||0).toLocaleString(), 'font-bold text-green-800')}
${field('ตำแหน่งเก็บ', d.location||'-')}
<div class="col-span-2">${field('สถานะเฝ้าระวัง', '', '', riskBadge)}</div>
</div>
<div class="border-t pt-4">
<div class="font-semibold text-gray-700 mb-3">🔧 จัดการสถานะ</div>
<div class="mb-2">
<label class="text-xs text-gray-500">Action Status</label>
<select id="modalAction" class="w-full mt-1" onchange="">
${['PENDING','CHECKED','USED FIRST','MOVED','RETURNED','DISPOSED','DONE'].map(a =>
`<option value="${a}" ${savedAction.status===a?'selected':''}>${a}</option>`).join('')}
</select>
</div>
<div class="mb-3">
<label class="text-xs text-gray-500">หมายเหตุ</label>
<input type="text" id="modalNote" class="w-full mt-1" placeholder="บันทึกการดำเนินการ..." value="${savedAction.note}">
</div>
<button onclick="saveAction('${d.key}', ${id})" class="bg-green-600 text-white px-4 py-2 rounded-lg text-sm hover:bg-green-700 w-full">💾 บันทึก</button>
</div>
`;
document.getElementById('detailModal').classList.remove('hidden');
}
function field(label, val, cls='', html='') {
return `<div class="bg-gray-50 rounded p-2">
<div class="text-xs text-gray-500 mb-0.5">${label}</div>
<div class="text-sm ${cls}">${html || val}</div>
</div>`;
}
function saveAction(key, id) {
const status = document.getElementById('modalAction').value;
const note = document.getElementById('modalNote').value;
actionData[key] = { status, note };
localStorage.setItem('pharma_actions', JSON.stringify(actionData));
DATA[id].actionStatus = status;
DATA[id].actionNote = note;
closeModal();
applyFilters();
updateProgress();
renderUrgentTable();
}
function closeModal() {
document.getElementById('detailModal').classList.add('hidden');
}
// ============== SUMMARY & CHARTS ==============
function renderSummary() {
const counts = {};
Object.keys(RISK_LABELS).forEach(k => counts[k] = 0);
DATA.forEach(d => counts[d.riskLevel]++);
const done = DATA.filter(d => d.actionStatus === 'DONE').length;
const hasDays = DATA.filter(d => d.daysLeft !== null);
const cards = [
{ label: 'หมดอายุแล้ว', val: counts.expired, color: 'border-red-500 bg-red-50', txt: 'text-red-700', icon: '💀', status: 'expired' },
{ label: 'วิกฤติ ≤30 วัน', val: counts.critical, color: 'border-orange-500 bg-orange-50', txt: 'text-orange-700', icon: '🚨', status: 'critical' },
{ label: 'ด่วนพิเศษ 31-90 วัน', val: counts.urgent, color: 'border-yellow-500 bg-yellow-50', txt: 'text-yellow-700', icon: '⚠️', status: 'urgent' },
{ label: 'เฝ้าระวังสูง 91-180 วัน', val: counts.high, color: 'border-blue-400 bg-blue-50', txt: 'text-blue-700', icon: '🔵', status: 'high' },
{ label: 'เฝ้าระวัง 181-270 วัน', val: counts.watch, color: 'border-green-400 bg-green-50', txt: 'text-green-700', icon: '🟢', status: 'watch' },
{ label: 'ติดตามปกติ 271-365 วัน', val: counts.normal2, color: 'border-gray-400 bg-gray-50', txt: 'text-gray-700', icon: '📋', status: 'normal2' },
{ label: 'ปกติ >365 วัน', val: counts.ok, color: 'border-slate-300 bg-slate-50', txt: 'text-slate-600', icon: '✅', status: 'ok' },
{ label: 'ไม่มีวันหมดอายุ', val: counts.nodate, color: 'border-gray-300 bg-white', txt: 'text-gray-500', icon: '❓', status: 'nodate' },
{ label: 'จำนวน records ทั้งหมด', val: DATA.length, color: 'border-green-600 bg-green-700', txt: 'text-white', icon: '📦', status: '' },
{ label: 'จัดการแล้ว (DONE)', val: done, color: 'border-green-500 bg-green-50', txt: 'text-green-800', icon: '✔️', status: '' },
];
document.getElementById('summaryCards').innerHTML = cards.map(c => `
<div class="card-hover rounded-lg border-l-4 p-3 ${c.color} ${c.status?'cursor-pointer':''}" ${c.status?`onclick="filterByStatus('${c.status}')"`:''}>
<div class="text-xl mb-1">${c.icon}</div>
<div class="text-2xl font-bold ${c.txt}">${c.val.toLocaleString()}</div>
<div class="text-xs ${c.txt} opacity-80 mt-0.5">${c.label}</div>
</div>
`).join('');
document.getElementById('reportDate').textContent = `ข้อมูลล่าสุด ${formatReportDate()} | แหล่งข้อมูล ${SOURCE_REPORT_DATE}`;
}
function updateProgress() {
const done = DATA.filter(d => d.actionStatus === 'DONE').length;
const urgent = DATA.filter(d => ['expired','critical','urgent'].includes(d.riskLevel)).length;
const pct = urgent > 0 ? Math.round((done / urgent) * 100) : 0;
document.getElementById('progressFill').style.width = pct + '%';
document.getElementById('progressText').textContent = `${done} / ${urgent} รายการเร่งด่วนที่จัดการแล้ว`;
}
let donutChart, monthlyChart, topChart;
function monthRiskColor(monthKey) {
const [year, month] = monthKey.split('-').map(Number);
const monthEnd = new Date(year, month, 0, 23, 59, 59, 999);
const days = Math.ceil((monthEnd - startOfToday()) / MS_PER_DAY);
if (days < 0) return '#dc2626';
if (days <= 90) return '#ea580c';
return '#16a34a';
}
function renderCharts() {
if (donutChart) donutChart.destroy();
if (monthlyChart) monthlyChart.destroy();
if (topChart) topChart.destroy();
const counts = {};
['expired','critical','urgent','high','watch','normal2','ok'].forEach(k => counts[k] = 0);
DATA.forEach(d => { if (counts[d.riskLevel] !== undefined) counts[d.riskLevel]++; });
// Donut
const ctx1 = document.getElementById('donutChart').getContext('2d');
donutChart = new Chart(ctx1, {
type: 'doughnut',
data: {
labels: Object.keys(counts).map(k => RISK_LABELS[k]),
datasets: [{ data: Object.values(counts), backgroundColor: Object.keys(counts).map(k => RISK_COLORS[k]), borderWidth: 2 }]
},
options: { responsive:true, maintainAspectRatio:true, plugins: { legend: { position:'bottom', labels:{ font:{size:10}, boxWidth:12 } } } }
});
// Monthly
const monthCounts = {};
DATA.forEach(d => {
if (d.expiryDate) {
const m = d.expiryDate.slice(0,7);
monthCounts[m] = (monthCounts[m]||0) + 1;
}
});
const sortedMonths = Object.keys(monthCounts).sort().slice(0, 18);
const ctx2 = document.getElementById('monthlyChart').getContext('2d');
monthlyChart = new Chart(ctx2, {
type: 'bar',
data: {
labels: sortedMonths.map(m => m.replace('-','/')),
datasets: [{ label:'จำนวน', data: sortedMonths.map(m => monthCounts[m]),
backgroundColor: sortedMonths.map(m => monthRiskColor(m)), borderRadius: 3 }]
},
options: { responsive:true, maintainAspectRatio:true, plugins:{legend:{display:false}}, scales:{x:{ticks:{font:{size:9}}},y:{ticks:{font:{size:9}}}} }
});
// Top 10
const topItems = DATA.filter(d => d.daysLeft !== null && d.daysLeft >= 0).sort((a,b) => a.daysLeft - b.daysLeft).slice(0, 10);
const ctx3 = document.getElementById('topChart').getContext('2d');
topChart = new Chart(ctx3, {
type: 'bar',
data: {
labels: topItems.map(d => d.itemName.substring(0,20)),
datasets: [{ label:'วันเหลือ', data: topItems.map(d => d.daysLeft),
backgroundColor: topItems.map(d => d.daysLeft <= 30 ? '#dc2626' : d.daysLeft <= 90 ? '#ea580c' : '#ca8a04'), borderRadius: 3 }]
},
options: { indexAxis:'y', responsive:true, maintainAspectRatio:true,
plugins:{legend:{display:false}}, scales:{x:{ticks:{font:{size:9}}},y:{ticks:{font:{size:9}}}} }
});
}
function renderUrgentTable() {
const urgent = DATA.filter(d => ['expired','critical','urgent'].includes(d.riskLevel))
.sort((a,b) => (a.daysLeft||0) - (b.daysLeft||0)).slice(0, 30);
document.getElementById('urgentTableBody').innerHTML = urgent.map(d => {
const expFormatted = d.expiryDate ? d.expiryDate.split('-').reverse().join('/') : '-';
const dayTxt = formatDaysLeft(d);
const rowBg = d.riskLevel === 'expired' ? 'row-expired' : d.riskLevel === 'critical' ? 'row-critical' : 'row-urgent';
const riskBadge = `<span class="chip ${RISK_BADGE[d.riskLevel]}">${RISK_LABELS[d.riskLevel]}</span>`;
const actionBadge = `<span class="chip ${ACTION_COLORS[d.actionStatus] || 'bg-gray-100'}">${d.actionStatus}</span>`;
return `<tr class="border-b data-row ${rowBg}" onclick="openModal(${d.id})">
<td class="px-3 py-2 font-mono text-xs">${d.itemCode}</td>
<td class="px-3 py-2 font-medium text-sm">${d.itemName}</td>
<td class="px-3 py-2 text-xs text-gray-500">${d.lotNo||'-'}</td>
<td class="px-3 py-2 text-xs text-center">${expFormatted}</td>
<td class="px-3 py-2 text-center">${dayTxt}</td>
<td class="px-3 py-2 text-right font-medium">${d.remainQty?.toLocaleString()}</td>
<td class="px-3 py-2 text-center">${riskBadge}</td>
<td class="px-3 py-2 text-center">${actionBadge}</td>
</tr>`;
}).join('');
}
function renderAlertBanner() {
const expired = DATA.filter(d => d.riskLevel === 'expired').length;
const critical = DATA.filter(d => d.riskLevel === 'critical').length;
let msg = '';
if (expired > 0) msg += `มีเวชภัณฑ์หมดอายุแล้ว ${expired} รายการ`;
if (critical > 0) msg += (msg ? ' · ' : '') + `วิกฤติ (≤30 วัน) ${critical} รายการ`;
document.getElementById('alertText').textContent = msg || 'ตรวจสอบรายการยาใกล้หมดอายุ';
document.getElementById('alertSubText').textContent = `อัปเดตแบบ realtime ณ ${new Date().toLocaleString('th-TH')} | แหล่งข้อมูล ${SOURCE_REPORT_DATE}`;
}
function populateFilters() {
const forms = [...new Set(DATA.map(d => d.dosageForm).filter(Boolean))].sort();
const locs = [...new Set(DATA.map(d => d.location).filter(Boolean))].sort();
const months = [...new Set(DATA.map(d => d.expiryDate?.slice(0,7)).filter(Boolean))].sort();
const formSel = document.getElementById('filterForm');
forms.forEach(f => { const o = document.createElement('option'); o.value = f; o.textContent = f; formSel.appendChild(o); });
const locSel = document.getElementById('filterLocation');
locs.forEach(l => { const o = document.createElement('option'); o.value = l; o.textContent = l; locSel.appendChild(o); });
const mSel = document.getElementById('filterMonth');
months.forEach(m => { const o = document.createElement('option'); o.value = m; o.textContent = m.replace('-','/'); mSel.appendChild(o); });
}
// ============== TABS ==============
function showTab(tab) {
document.getElementById('tab-dashboard-content').classList.toggle('hidden', tab !== 'dashboard');
document.getElementById('tab-search-content').classList.toggle('hidden', tab !== 'search');
document.getElementById('tab-dashboard').className = `tab-btn px-4 py-1.5 rounded-full text-sm font-medium transition ${tab==='dashboard'?'tab-active':'tab-inactive'}`;
document.getElementById('tab-search').className = `tab-btn px-4 py-1.5 rounded-full text-sm font-medium transition ${tab==='search'?'tab-active':'tab-inactive'}`;
}
// ============== EXPORT CSV ==============
function exportCSV() {
const cols = ['itemCode','itemName','dosageForm','lotNo','expiryDate','daysLeft','remainQty','unit','location','manufacturer','riskLevel','actionStatus','actionNote'];
const header = ['รหัส','ชื่อ','รูปแบบ','Lot','วันหมดอายุ','วันเหลือ','คงเหลือ','หน่วย','ตำแหน่ง','ผู้ผลิต','สถานะเฝ้าระวัง','Action','หมายเหตุ'].join(',');
const rows = filteredData.map(d => cols.map(c => `"${(d[c]??'').toString().replace(/"/g,'""')}"`).join(','));
const csv = '\uFEFF' + [header, ...rows].join('\n');
const blob = new Blob([csv], {type:'text/csv;charset=utf-8'});
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = `expiry_watch_${new Date().toISOString().slice(0,10)}.csv`;
a.click();
}
// ============== CLOCK ==============
function updateClock() {
const now = new Date();
document.getElementById('clock').textContent = now.toLocaleString('th-TH');
}
let lastFullRefreshMinute = '';
function refreshRealtime(force = false) {
refreshExpiryData();
const now = new Date();
const minuteKey = `${now.getFullYear()}-${now.getMonth()}-${now.getDate()}-${now.getHours()}-${now.getMinutes()}`;
if (force || minuteKey !== lastFullRefreshMinute) {
lastFullRefreshMinute = minuteKey;
applyFilters(undefined, undefined, true);
renderSummary();
renderAlertBanner();
renderUrgentTable();
updateProgress();
renderCharts();
return;
}
renderTable();
renderUrgentTable();
}
// ============== INIT ==============
function init() {
refreshExpiryData();
renderSummary();
renderCharts();
renderAlertBanner();
renderUrgentTable();
updateProgress();
populateFilters();
filteredData = [...DATA].sort((a,b) => {
if (a.daysLeft === null && b.daysLeft === null) return 0;
if (a.daysLeft === null) return 1;
if (b.daysLeft === null) return -1;
return a.daysLeft - b.daysLeft;
});
renderTable();
updateResultCount();
updateClock();
setInterval(updateClock, 1000);
setInterval(refreshRealtime, 1000);
}
window.addEventListener('DOMContentLoaded', init);
</script>
</body>
</html>