尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證自動抓取缺藥平台的替代藥品公告
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
專為臨床醫療人員、藥局採購與藥師設計的西藥供應狀態監測面板。本系統透過自動化排程介接衛福部食藥署開放資料,提供即時、視覺化且易於檢索的藥品短缺與替代資訊。 • 臨床導向的缺藥分級:嚴格區分「無替代藥品 (紅)」、「有替代藥品 (黃)」與「已解除短缺 (綠)」,協助快速確立處置優先級。 • 智慧型決策輔助: • 自動計算「缺藥持續天數」,精準標示長期斷鏈品項。 • 運用正規表達式 (Regex) 自動萃取公告內文的「替代藥品建議」與「預計恢復時間」。 • 多維度數據分析 (Recharts):提供月度/年度的紅黃綠複合疊加長條圖 (Stacked Bar Chart),視覺化呈現整體供應壓力與恢復彈性的趨勢變化。 • 高效率多條件篩選器:支援以「字串 (品名/字號)」、「狀態 (紅/黃/綠)」、「公告年份」進行交集過濾,並具備自訂排序邏輯(最新公告/缺藥最久/字母排序)。 • 雙軌資料時效警示:分別偵測兩種「畫面停在過去」的失效模式,兩者互為獨立訊號、可同時顯示。 • 排程停跑 — last_updated 逾 10 天未前進即警示(GitHub 會自動停用長期無活動 repo 的排程)。 • 上游停更 — 排程照跑但食藥署最大公告日期連續 4 個觀測區間未前進時提示。此為疑似訊號而非停更證明:同日修訂、舊公告修正、單一端點停更都不會觸發。檢視完整 README ↗
English | 繁體中文
A drug supply monitoring dashboard designed for clinical staff, pharmacy purchasing and pharmacists. An automated schedule ingests open data from the Taiwan Food and Drug Administration (TFDA) and presents drug shortage and alternative information in a timely, visual and easily searchable form. The interface is in Traditional Chinese.
last_updated hasn't advanced for more than 10 days (GitHub automatically disables schedules in long-inactive repos).The project uses a serverless + SSG (static site generation) architecture for the highest availability and lowest hosting cost.
| Stage | Component | Logic and technology |
|---|---|---|
| Data source | Ministry of Health and Welfare open data API | Endpoint codes: 104 (alternative available), 105 (no alternative), 106 (resolved) |
| ETL | GitHub Actions + Python | Runs fetch_fda_data.py early every Friday morning, cleaning data and merging it into supply_status_latest.json. Fail-closed, and serialized with a concurrency group (only one copy of cross-run state) |
| Supplement scraping | Local scheduled task + Python | While the open data is frozen, a daily local task runs update_supplement.py, diffs a full list snapshot of the TFDA drug-supply website against the main file, and writes only supply_supplement.json (never the main file). The site may block non-Taiwan IPs, so this does not run on GitHub Actions |
| Frontend rendering | React + TypeScript + Vite | Reads static JSON and renders a responsive UI with custom CSS (BEM naming); applies the supplement diff and shows per-category red warnings when the supplement is unavailable |
| Hosting | GitHub Pages | Served from GitHub's global CDN for fast loading |
public/data/supply_status_latest.json){
"last_updated": "2026-09-08 12:04:33", // last successful ETL "check" time; advances on every successful run
"upstream_max_date": "2026/08/31", // latest upstream announcement date; null means no baseline to compare
"frozen_runs": 0, // consecutive observation periods without the upstream date advancing
"last_observed_period": "2026-W37", // counting unit: ISO week in Taiwan time (reruns in the same week don't count)
"datasets": { }
}
⚠️ last_updated only means "checked", not "data updated". To judge whether upstream is still moving, look at
upstream_max_date / frozen_runs; the two semantics must not be mixed. The last three fields are optional;
if an older data file lacks them the frontend disables the stale-upstream prompt rather than erroring.
To run or modify the project locally, make sure Node.js (v18+) and Python (v3.10+) are installed.
git clone https://github.com/<your-account>/TFDA-drug-shortage-dashboard.git
cd TFDA-drug-shortage-dashboard
npm install # install dependencies
npm run dev # start the local dev server
npm run build # type check (tsc) + Vite build → dist/
npm run lint # ESLint
# Fetch TFDA 104/105/106 open data and merge into public/data/supply_status_latest.json
# Fail-closed: any connection / HTTP / JSON / validation failure on any endpoint aborts without overwriting existing data
uv run --with requests python scripts/fetch_fda_data.py
# Supplement scraping (needs a Taiwan network): sync remote → scrape → commit/push if changed
uv run --with requests==2.34.2 python scripts/update_supplement.py
# Register the daily task (once; run `uv venv && uv pip install requests==2.34.2` first)
powershell -File scripts/register_supplement_task.ps1
npm run test # data pipeline + supplement apply (Vitest, 207 cases)
uv run --with pytest --with requests pytest scripts # ETL / stale detection / supplement / task wrapper (pytest, 251 cases)
Browser behaviour (supplement banners, offline cache) is covered by SMOKE_TEST.md.
.ai-review/ keeps each increment's spec, raw Codex independent-review output and item-by-item verdicts.
Before changing a feature, read the "non-goals" section of its spec — it is the anchor against scope creep.
| Increment | Spec | Review / verdict |
|---|---|---|
| Whole-repo code review (CR-01–CR-14) | — | codex-review.md / verdict.md / remediation-log.md |
| Upstream stale detection (F1–F15b) | plan-upstream-freeze.md | plan-review-upstream-freeze.md / plan-verdict-upstream-freeze.md |
| Supplement scraping (S, three review rounds) | plan-supplement.md | plan-review-supplement.md / plan-verdict-supplement.md |