OpenEvidence Selection Opener is a lightweight Chrome extension for clinicians,
students, and evidence-based medicine readers. Select text on a whitelisted page,
click Ask OpenEvidence, and the extension opens the selection in OpenEvidence
right next to the current tab. With a validated Groq API key, it can also rewrite
selected recall-style text into editable foreground questions before sending them
to OpenEvidence.
Personal fork note (liangRXdev). This fork adds two features on top of the upstream htlin222/oe-extension: a Dotflows integration (pick one of your OpenEvidence Dotflows and have it officially activated on the answer you send) and a hospital formulary lookup (a
院內button that matches the selection against your imported in-house drug list, entirely offline). Everything else tracks upstream. See Dotflows (fork addition) and Hospital formulary lookup (fork addition) below. Maintained for personal use.
- Selection toolbar anchored above highlighted text.
UpToDateandGooglebuttons to search the selection beside the current tab.- Right-click
Ask OpenEvidencecontext menu for pages and Chrome PDF selection fallback. - Opens OpenEvidence beside the current tab, optionally in the background.
- Local query history with a dedicated options tab, recording each text sent to OpenEvidence (plus the original selection, prompt, and transformed text for
PICO/custom rewrites). - Whitelist-based activation, including
file:///*support. - BYOK Groq integration stored in
chrome.storage.local. - Built-in
PICOrewrite flow for evidence-based medicine questions. - Custom prompt buttons with user-defined names and prompt instructions.
- (fork)
院內button: match the selection against an imported hospital drug list, with same-ingredient and same-ATC-class items — matched locally, nothing is sent out. - Editable LLM output panel with
Copy,Ask OpenEvidence, andClose. - Optional redirect of NCCN guideline PDF links on OpenEvidence to your own viewer, in a tab and in the side pane alike (fork: off by default).
- Light, dark, or system appearance modes.
- No runtime framework, no remote UI dependencies.
https://ankiuser.net/study
https://www.openevidence.com/*
http://uptodate.com/*
nejm.org/*
file:///*
Entries are URL prefixes. * can be used as a wildcard.
- Download the latest
oe-extension-vX.Y.Z.zipfrom Releases. - Unzip it.
- Open
chrome://extensions. - Enable Developer mode.
- Click
Load unpacked. - Select the unzipped extension folder.
The release also includes a .crx artifact generated by GitHub Actions.
git clone https://github.com/htlin222/oe-extension.git
cd oe-extension
npm test
npm run buildThen load dist/extension from chrome://extensions.
For local PDF files opened in Chrome:
- Open
chrome://extensions. - Open this extension's details.
- Enable
Allow access to file URLs.
Chrome's built-in PDF viewer may not expose selection events to content scripts.
When the floating toolbar does not appear, use the right-click context menu:
select text, right click, choose Ask OpenEvidence.
OpenEvidence cites NCCN guidelines as links to nccn.org PDFs, which are behind
a login. This extension rewrites those links to a viewer you control, keeping the
guideline slug and page number.
It runs in a full OpenEvidence tab and inside the side pane. Because the side pane hosts OpenEvidence in an iframe, a redirected link there always opens in a new tab, so the side pane stays on the conversation.
Configure it under Settings in the options page:
Redirect NCCN guideline linksturns the rewrite on or off. (fork) Off by default in this fork — upstream turns it on and points to a third-party viewer; here NCCN links open as-is until you enable it and set your own template.Redirect URL templateaccepts two variables:$cancer— the guideline slug, such asb-cell;$page— the page number, defaulting to1.
| Target | Template |
|---|---|
| Web viewer | https://nccn.hsiehting.com/preview/$cancer?page=$page |
| Local (macOS/Linux) | file:///Users/YOUR_NAME/Downloads/NCCN/$cancer.pdf#page=$page |
| Local (Windows) | file:///C:/Users/YOUR_NAME/Documents/NCCN/$cancer.pdf#page=$page |
file:// templates need Allow access to file URLs enabled, as described under
Local PDF Support.
The PICO and custom prompt buttons appear only after a Groq API key is validated.
- Open extension options.
- Under
PICO rewrite, clickEdit. - Paste a Groq API key.
- Click
Save.
The key is stored locally with chrome.storage.local; it is not committed,
bundled, or sent anywhere except Groq API requests initiated by the extension.
Custom prompts let you create extra buttons beside Ask OpenEvidence and PICO.
Each custom prompt has:
- a button name, such as
Dx,Summarize, orGuideline; - a prompt that tells Groq how to transform the selected text.
The model output is displayed in an editable panel. You can copy it or ask OpenEvidence with the edited result.
This section describes a feature added in this personal fork; it is not part of upstream
htlin222/oe-extension.
Dotflows are OpenEvidence's reusable answer
workflows (a saved explanation_prompt applied to a question). This fork lets you
attach one of your own Dotflows to a question straight from the extension, so the
answer is generated with that Dotflow already active — no manual selection on the
OpenEvidence page.
How it works
- The side panel fetches your Dotflow list from
https://www.openevidence.com/api/dotflows/dot-flowsusing your existing logged-in session (credentials: "include"), and caches it locally for 30 minutes (chrome.storage.local, keyoeDotflowsCache). - Pick a Dotflow in the floating selector. The extension appends
oe_ext_dotflow_id=<id>to theopenevidence.com/askURL it opens. - A
document_start,MAIN-world content script (src/dotflow-inject.js) patchesfetchandXMLHttpRequeston that page. When OpenEvidence submits the question (POST /api/article), it injectsdotflow: { id }into the request body under the confirmedinputsschema, then restores the original network functions. - The injection is one-shot per page load and touches only the matching OpenEvidence submit request; all other traffic is untouched.
Notes / limitations
- Requires being logged in to OpenEvidence in the same browser profile.
- Relies on OpenEvidence's private
/api/dotflowsand/api/articleshapes, which may change without notice; if activation stops working, append&oe_ext_debug=1to the/askURL to log every POST endpoint seen and re-verify the schema. - Scoped to
https://www.openevidence.com/ask*viamanifest.jsoncontent scripts.
Fork addition, ported from LCCtaiwan/oe-extension (
feature/hospital-formulary) with every network lookup removed.
Select a drug name and press 院內 (next to Ask OpenEvidence). A panel lists:
- 符合品項 — in-house items whose Chinese name, English name, ingredient, or in-house code matches the selection.
- 同成分 — other items with the identical 7-character ATC code.
- 同 ATC 分類 — items sharing the 5-character ATC chemical subgroup
(e.g.
C10AAstatins). This is a classification grouping, not a statement of therapeutic equivalence or substitutability; the panel says so. - Click an in-house code to copy it.
Importing the list
Options page → 院內品項 tab → choose an .xlsx (first worksheet) or .csv
(UTF-8 or Big5). The header row is detected automatically within the first 20 rows:
| Field | Accepted headers |
|---|---|
| Name (required, one of) | 藥名 品名 藥品名稱 中文品名 / 英文品名 |
| In-house code | CODE 院內代碼 藥品代碼 批價碼 藥碼 |
| Ingredient | 成分 主成分 |
| ATC | ATC ATC碼 |
Rows with no name are skipped; a malformed ATC (e.g. A02AB;A02AX) is kept for
name matching but not used for grouping. Importing a new file replaces the list;
a failed import keeps the previous one.
Privacy
- The list is stored only in
chrome.storage.localon this computer — not synced, not uploaded. - Matching runs inside the page's content script; the selected text is never sent to any server. This is deliberate: a selection on a web-based HIS page can include patient identifiers. (The upstream port's RxClass / Groq / Google Sheet features were removed for this reason.)
Limitations
- Chinese matches need the full product name or a contiguous part of it; a whole Chinese sentence won't match.
- Foreign brand names not stocked in-house can't be resolved (no RxNorm lookup).
- Salt / hydrate words (
hydrochloride,maleate, …) andanti-xxxterms are ignored for matching.
The extension opens selections with this URL shape:
https://www.openevidence.com/ask?query=<selected text>&configName=prod&attachments=%5B%5D&_rsc=1pln2
Release packaging runs on GitHub release creation/publication:
- runs the test suite;
- builds
dist/oe-extension-v<version>.zip; - packs
dist/oe-extension-v<version>.crx; - uploads both files as release artifacts.
For stable CRX IDs across releases, add a repository secret named
CRX_PRIVATE_KEY_BASE64 containing the base64-encoded Chrome extension private
key. Without that secret, CI still generates a .crx, but Chrome may assign a
new extension ID.
npm test
npm run buildThe project is intentionally plain Manifest V3 JavaScript, CSS, and HTML.
If you use this project, please cite it:
@software{lin2026oeextension,
author = {Lin, Hsieh-Ting},
title = {oe-extension: OpenEvidence selection helper for Chrome},
year = {2026},
url = {https://github.com/htlin222/oe-extension},
version = {0.1.2}
}This project is licensed under the MIT License.

