台灣健保藥價歷史查詢:以健保藥品代號、中英文品名或成分查詢 1995 年至今的完整健保支付價歷史、調價幅度與終止/暫停支付狀態。資料來源為中央健康保險署開放資料,供臨床藥師與醫療人員參考。
Translation pending
HealthJavaScript · PythonGitHub @liangRXdevOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
台灣健保藥價歷史查詢:NHI 健保用藥品項檔完整支付價歷史(1995 至今)
Translation pending
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
NHI Drug Price History — 台灣健保藥價歷史查詢 以健保藥品代號為單位,呈現 1995-03-01(健保開辦)至今、含已公告未生效的完整健保支付價歷史。 本系統顯示中央健康保險署公告之健保支付價,不代表醫療院所實際採購價、零售價或病人自付金額。Read the full README ↗
English | 繁體中文
Shows the complete Taiwan National Health Insurance (NHI) reimbursement price history for each NHI drug code, from 1995-03-01 (the start of NHI) to today, including prices that have been announced but are not yet in effect.
This site shows NHI reimbursement prices announced by the National Health Insurance Administration (NHIA). They do not represent hospitals' actual purchase prices, retail prices, or patients' out-of-pocket costs.
spec.mdspec-upcoming.md (upcoming-changes center), spec-compare.md (multi-code comparison).ai-review/plan.mdA21030000I-E41001-001); checked weekly, officially updated monthlytests/fixtures/golden_*.json?code= deep link, staleness warning, four-state loading and race handling (acceptance record: .ai-review/phase2-acceptance.md; /codex-review verdict: .ai-review/verdict.md)
TFDA-drug-info-search NHI code table gained a "NHI price history → View ↗" column (2026-09-12, 62de833, end-to-end verified live)spec-compare.md): comparison basket / multi-series chart / status timeline bands / summary table /
merged event table / CSV / failure matrix (acceptance record: .ai-review/compare-acceptance.md;
6 pharmacist visual checks passed; M17 performance threshold revised from measurements, see spec §8.1)spec-upcoming.md): data/upcoming.json, ?view=upcoming list, event tags, filter/sort/group, CSV export (acceptance record: .ai-review/upcoming-acceptance.md; pharmacist visual check passed; U14 performance threshold revised from measurements, see spec §8.2)| Source price | Status | UI |
|---|---|---|
| Positive number | priced | Amount |
0 / 0.00 | terminated | NHI price NT$0 (reimbursement terminated); if never priced before, shown as "no prior priced record" |
- / - / — | suspended | Reimbursement suspended (source marks -) |
| Blank | missing | No price data in source |
| Other | malformed | Malformed data (raw value shown) |
An end date of 9991231 means open-ended. The current price is determined by the frontend from the browser date; detail pages derive it from the full history.
data/upcoming.json (upcoming list)All records not yet in effect as of build date D (from > D), one row per record; multiple upcoming rows for the same code are not merged.
D, not from the upcoming row itself; codes that only have future rows get nullpreviousPrice has event semantics (null for termination / suspension continuation per spec.md §5.4); pricedBefore has state semantics (last priced amount before that row). Both coexist and neither replaces the otherbuildDate) and the "last checked date" (status.json) are different dates, and a gap of several weeks is normal: buildDate only advances when the source changes, the build date crosses an upcoming effective date, or generation rules migratedrug_index.json; any generation or validation failure → exit 1 and nothing is published?view=upcoming)A list of announced but not-yet-effective price changes, grouped by effective date, filterable by event type / ATC / effective date / keyword, with CSV export. Filter state lives only in the URL (shareable, survives reload), not in localStorage.
Known limitations:
0.00 as 0 or turn codes into scientific notation. If you need raw values, import via "Data → From Text/CSV" and set those columns to Text. The file bytes themselves are always faithful (UTF-8 with BOM, RFC 4180).The performance thresholds in spec-upcoming.md §8.2 and spec-compare.md §8.1 were revised on 2026-09-16 based on measurements
(upcoming center 200 → 600 ms / 50 → 120 ms; comparison scenario A 600 → 2,400 ms).
This accepts the status quo; it does not claim optimization: green means "comparable to the 2026-09-16 measurement",
not that the original design target was met. Both specs record the original target, measured values and attribution.
The shared bottleneck is the data layer, not rendering: the first-screen drug_index.json is 3.28 MB gzip (existing E7 issue),
a single shard is 1.2–1.5 MB raw, and the comparison page loads four at once. Making it genuinely faster requires changing the sharding or boot strategy,
which touches the existing shard contract and should be proposed and handled separately.
?codes=)View the price history of 2–4 NHI codes together: multi-series trend chart, one status timeline band per code, shared crosshair, summary table, merged event timeline and CSV export. The comparison basket lives in sessionStorage; state is serialized into the URL for sharing.
Known limitations:
?codes= deep link still waits for the homepage index to load (drug_index.json, 3.28 MB gzip),
about 7 s measured; boot dependencies are unchanged this cycle, so it is recorded without a threshold (see .ai-review/compare-acceptance.md).Requires uv.
uv sync
uv run pytest -q # unit tests (unchecked goldens show as skip)
uv run python build_price_history.py # download from the official endpoint and build data/
uv run python build_price_history.py --source-file .cache/nhi_raw_2026-09-11.csv --no-metadata
Frontend (no build step; index.html + app.js + engine.js + styles.css; tests need Node 22+):
npm ci
npm test # engine.js pure logic + golden cross-check
npx playwright install chromium # first time
npm run e2e # DOM / viewport / races (route mock)
node scripts/measure_e7.mjs # E7 performance measurement + C2 screenshots (not CI)
node scripts/measure_upcoming.mjs # U14 upcoming-center performance (not CI)
node scripts/upcoming_review.mjs # upcoming-center pharmacist review: 8766 real list, 8767 synthetic counterexamples
node scripts/measure_compare.mjs # M17 multi-code comparison performance (not CI)
node scripts/compare_review.mjs # comparison pharmacist review: 8768 four real codes, 8769 synthetic overlap scenario
node scripts/smoke_live.mjs # post-deploy live smoke check (deep link, search, data version, SW)
uv run python scripts/export_golden_frontend.py # regenerate JS golden fixtures after ETL rule changes
data/ nor status.json is writtendata/status.json is updated (drives the frontend staleness warning)docs/golden_check_2026-09-11.xlsx and fill in only the yellow cellsuv run python scripts/golden_sheet.py --freeze docs/golden_check_2026-09-11.xlsx
tests/fixtures/golden_<code>.jsonuv run pytest -q become passesThe frozen snapshot tests/fixtures/source_snapshot_2026-09-11.csv is extracted byte-for-byte from the full CSV by scripts/extract_snapshot.py; the source sha256 is recorded in the matching .meta.json.
main / (root)build-data.yml: checks every Monday 02:00 (Taiwan time); contents: write; all actions pinned to commit SHA
RemoteDisconnected (three failures in a row on 2026-09-12, succeeded on rerun 20 minutes later; same seen in the TFDA project on 2026-08-30). Nothing is written on failure; the next scheduled run or a manual Run workflow fixes ittest.yml: runs tests on PR and push (read-only)Code in this project is under the MIT License. Copyright and terms of use for NHIA open data follow the original source and are not covered by this license.