Last updated / 最後更新:2026-06-17 Effective date / 生效日期:2026-06-17
NHI-FHIR Bridge(以下稱「本擴充功能」)是一款開源 Chrome 擴充功能,協助使用者將自己在台灣健保署「健康存摺」(https://myhealthbank.nhi.gov.tw/) 上的個人醫療紀錄,轉換為 HL7 FHIR R4 國際標準格式,僅供使用者本人作為個人健康資料備份、臨床研究、或匯入相容軟體之用。
原始碼公開於 https://github.com/voho0000/NHI-FHIR-BRIDGE (Apache License 2.0)。
本擴充功能採取「零資料收集 (zero data collection)」原則:
下述資料僅在使用者自己的電腦上處理,從不離開使用者裝置:
| 資料類別 | 來源 | 用途 | 儲存位置 |
|---|---|---|---|
| 醫療紀錄(就醫、用藥、檢驗、影像、過敏、預防接種等) | 健保署「健康存摺」API(使用者本人帳號) | 轉換為 FHIR R4 格式 | 瀏覽器記憶體 → 使用者選擇下載為 JSON 檔 或 上傳至使用者自架的本機後端 |
| 個人識別資料(姓名、性別、出生日期、身分證字號) | 健保署「健康存摺」API + 使用者於 popup 自行填寫 | 產生 FHIR Patient 資源 | 同上;使用者偏好(性別、出生年、Backend URL 等)存於 chrome.storage.local(僅本機,不會同步至 Google 帳號)。產生的健康紀錄檔暫存於 chrome.storage.local(v0.14 起;因影像資料超過 session storage 上限,搭配 unlimitedStorage 權限。僅本機,但重啟瀏覽器不會自動清除)。暫存依下列事件先到先清除:使用者下載完成當下立即清除、使用者按「清除」、1 小時 TTL 自動清掃(Chrome 執行期間每 10 分鐘檢查一次;擴充功能啟動/更新時亦清掃)、或被下一次同步覆寫 |
| 同步狀態與設定 | 擴充功能執行過程 | UI 狀態顯示 | chrome.storage.local(瀏覽器本地) |
| NHI session bearer token | 你已登入的健保署分頁(sessionStorage) |
僅在啟用「一併下載影像」時:讓背景 service worker 在 popup 關閉後仍能向健保署抓取影像 | chrome.storage.local(僅本機,不同步 Google 帳號);設 30 分鐘 TTL,逾時自動清除;從不傳送至任何外部伺服器 |
本擴充功能只在下列情境會將資料送出瀏覽器:
http://localhost:8010,使用者可改為自架伺服器網址)上述兩種情境均由使用者主動觸發且目的地由使用者完全控制,開發者無法存取。
本擴充功能要求以下 Chrome 權限:
| 權限 | 用途 |
|---|---|
activeTab |
在使用者點擊擴充功能圖示後,存取當前分頁以執行健保署 API 請求 |
storage |
保存使用者偏好設定、同步進度,以及暫存待下載的健康紀錄檔;啟用影像下載時並暫存 NHI session bearer token 供背景抓圖(30 分鐘 TTL 後清除)。皆僅存於本機 chrome.storage,不外傳(清除機制見第三節) |
scripting |
在健保署網域分頁中執行擷取邏輯,以沿用 first-party cookie 呼叫 API |
downloads |
將產生的 FHIR Bundle JSON 儲存至使用者本機 |
alarms |
維持背景同步流程之心跳,避免 Chrome Manifest V3 service worker 在長時間同步時被回收;並每 10 分鐘檢查、清除逾時(1 小時)的本機暫存健康紀錄檔 |
unlimitedStorage |
含影像的健康紀錄檔可能超過瀏覽器預設儲存配額,需要此權限才能在本機暫存(仍受上述 1 小時 TTL 與下載後立即清除機制管控) |
Host: https://myhealthbank.nhi.gov.tw/* |
擷取使用者本人的健康存摺紀錄(安裝時要求的唯一主機權限) |
Optional host: http://localhost/*、http://127.0.0.1/* |
(選用,v0.18.6 起改為 optional_host_permissions)將 FHIR 資料上傳至使用者自架的本機後端。安裝時不要求;僅在使用者主動啟用「上傳後端」模式時,由擴充功能在當下請求授權 |
無。本擴充功能除呼叫健保署 (myhealthbank.nhi.gov.tw) 與使用者自行指定的本機後端外,不與任何第三方通訊。
本擴充功能不主動向 13 歲以下兒童收集任何資料。
如政策有實質變更(例如新增資料收集),將更新本頁面之「最後更新」日期並於 GitHub repository 中標示。
如對本政策有任何疑問,請透過下列方式聯絡:
NHI-FHIR Bridge (the “Extension”) is an open-source Chrome extension that helps a user convert their own personal health records from Taiwan’s NHI “My Health Bank” portal (https://myhealthbank.nhi.gov.tw/) into the HL7 FHIR R4 standard format, for the user’s personal use only — as a personal health record backup, for clinical research on one’s own data, or for import into FHIR-compatible software.
Source code is publicly available at https://github.com/voho0000/NHI-FHIR-BRIDGE under the Apache License 2.0.
The Extension follows a zero data collection principle:
The data below is only processed on the user’s own machine and never leaves the device:
| Data Category | Source | Purpose | Storage Location |
|---|---|---|---|
| Medical records (encounters, medications, lab results, imaging, allergies, immunizations, etc.) | NHI “My Health Bank” APIs (user’s own account) | Convert to FHIR R4 | Browser memory → user-initiated download as JSON, or upload to user’s self-hosted local backend |
| Personal identifiers (name, sex, DOB, national ID) | NHI APIs + user input in popup | Generate FHIR Patient resource | Same as above; user preferences (sex, birth year, backend URL, etc.) live in chrome.storage.local (browser-local only — never replicated to your Google account). The generated health-record bundle is temporarily staged in chrome.storage.local (since v0.14, with the unlimitedStorage permission, because imaging bundles exceed session storage’s size cap; browser-local only, but NOT wiped automatically when the browser closes). The staged bundle is cleared by whichever happens first: the moment the user-initiated download completes, the user clicking “Clear”, a 1-hour TTL sweep (checked every 10 minutes while Chrome runs, and at extension startup/update), or being overwritten by the next sync |
| Sync state and settings | Extension runtime | UI state display | chrome.storage.local (browser-local) |
| NHI session bearer token | The signed-in NHI tab (sessionStorage) |
Only when “download imaging too” is enabled: lets the background service worker keep fetching imaging from NHI after the popup closes | chrome.storage.local (browser-local only, not synced to your Google account); a 30-minute TTL auto-clears it; never transmitted to any external server |
The Extension sends data out of the browser only in these situations:
http://localhost:8010; user may override with their own self-hosted server URL)Both paths are user-initiated with the destination fully controlled by the user. The developer has no access.
| Permission | Purpose |
|---|---|
activeTab |
Access the current tab after user clicks the Extension icon, to execute NHI API requests |
storage |
Save user preferences, sync progress, and the temporarily staged health-record bundle; when imaging download is enabled, also stage the NHI session bearer token for background fetching (cleared after a 30-minute TTL). All in local chrome.storage only, never transmitted (clearing mechanism in Section 3) |
scripting |
Run capture logic inside NHI domain tabs so the first-party cookies/session are used for API calls |
downloads |
Save the generated FHIR Bundle JSON to the user’s local machine |
alarms |
Keep service-worker heartbeat alive during long syncs to prevent Manifest V3 worker termination; also runs a 10-minute sweep that clears locally staged bundles older than the 1-hour TTL |
unlimitedStorage |
Bundles that include imaging can exceed the browser’s default storage quota; this permission allows local staging (still bounded by the 1-hour TTL and cleared-on-download mechanisms above) |
Host: https://myhealthbank.nhi.gov.tw/* |
Read the user’s own health records from NHI (the only host permission requested at install) |
Optional host: http://localhost/*, http://127.0.0.1/* |
(Optional, moved to optional_host_permissions in v0.18.6) Upload FHIR data to the user’s self-hosted local backend. Not requested at install; requested on demand only when the user enables “Upload to backend” mode |
None. The Extension communicates only with myhealthbank.nhi.gov.tw and the user’s self-specified local backend.
The Extension does not knowingly collect any data from children under 13.
Material changes (e.g. introducing any data collection) will be reflected in the “Last updated” date above and announced in the GitHub repository.