尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A simpler way to browse Canadian drug shortage and discontinuation reports from Health Product Shortages Canada. The data is refreshed twice a day.
Live site: https://zeptotech.github.io/drugshortages/
This is an independent tool for healthcare professionals. It is not affiliated with Health Canada. Always confirm details with the official report, which is linked from each entry. Use at your own discretion.
late_submission flag)./ to jump to search, and a phone
layout.There is no server. A scheduled GitHub Actions job is the backend, and the site is static files served by GitHub Pages.
Midnight + noon Eastern (GitHub Actions) Anytime (browser)
┌───────────────────────────────────────┐ ┌───────────────────────────┐
│ scripts/fetch_and_diff.py │ │ index.html + app.js │
│ 1. log in to the API (repo secrets) │ │ loads data/*.json │
│ 2. pull current + recent reports │ │ search, filters, sorting │
│ 3. compare with the previous data │ │ all run in the browser │
│ 4. write data/*.json │ │ (no API calls) │
│ commit data/ → deploy GitHub Pages ───┼──►│ │
└───────────────────────────────────────┘ └───────────────────────────┘
The API password lives only in GitHub Actions secrets. The browser never talks to the API.
| Statuses | How | Requests |
|---|---|---|
active_confirmed, anticipated_shortage, to_be_discontinued | Full pull, sorted by id ascending, 100 per page (as the API requires for multi-report extraction) | ~25 |
resolved, avoided_shortage, discontinued, reversed | Updated in the last 30 days only, newest first | ~5 |
| Reports that left the current lists since the last run | One detail lookup each, to see what they became | a few |
The API allows 1,000 requests per hour, and a run uses about 30–45.
The job keeps only the English fields the site needs, compares them with the
previous snapshot, and records what changed. It aborts without touching the data
if the login fails, the API errors, or a status count suddenly drops by more than
5% from the previous run's (use --force to override a real drop). When that check
stops a run, the log lists the current status of a sample of the missing reports,
which shows whether the drop is real or the API left them out.
| File | Contents |
|---|---|
data/shortages.json | Current shortages plus those resolved or avoided in the last 30 days |
data/discontinuations.json | Upcoming discontinuations plus those discontinued or reversed in the last 30 days |
data/meta.json | Last check time and counts per status |
data/changes/YYYY-MM-DD.json | New, updated and status-changed reports for that day (last 30 days; older files are deleted) |
data/changes/index.json | Days with changes in the last 30 days, newest first |
Each report is written on its own line, so the daily data commits show exactly which reports changed.
These follow the official site's summary report:
HPS_EMAIL and HPS_PASSWORD.The workflow (.github/workflows/update-data.yml):
data/ if it
changed, and deploys.main: only redeploys the site.The job runs twice a day, 12 hours apart (GitHub cron always uses UTC):
0 5 * * *: 05:00 UTC, which is midnight EST in winter and 1 AM EDT in summer.0 17 * * *: 17:00 UTC, which is noon EST in winter and 1 PM EDT in summer.A second run on the same day adds to that day's change log rather than replacing it, so "What's new" still shows one list per day. GitHub can start scheduled runs late when it is busy, sometimes by hours, so the actual time varies.
Fetch data, using only the Python 3.9+ standard library (nothing to install):
read "HPS_EMAIL?Email: "; read -s "HPS_PASSWORD?Password: "; echo
HPS_EMAIL=$HPS_EMAIL HPS_PASSWORD=$HPS_PASSWORD python3 scripts/fetch_and_diff.py
Preview the site:
python3 -m http.server 8000
# open http://localhost:8000
The bot commits data daily, so run git pull before starting work.
The code is commented for readers new to it. app.js starts with an overview of
how the page works.
index.html, app.js, styles.css the website (no build step)
scripts/fetch_and_diff.py daily fetch, compare and write
.github/workflows/update-data.yml schedule, commit and deploy
data/ generated, committed by the bot
Data comes from the Health Product Shortages Canada public API. Only English fields are used.