跳到正文
DEV Community· Kaustubh Jogle·· 3 小時前AI 評分45

Next of Care:把出院文件整理成可供家人共享的照護計劃

Next of Care: from discharge papers to a plan the family can share

AI 導讀

Next of Care 是一款以瀏覽器為本、優先在本機處理的照護交接工具,可把照護文件轉成可編輯的用藥計劃。它透過 Transformers.js 在瀏覽器 worker 執行開放權重 Qwen3 0.6B ONNX 模型,並可匯出 PDF、Excel 用藥追蹤表、每週時間表及 WhatsApp 訊息,支援英文、印地文和馬拉地文。文件留在裝置上處理;模型首次使用時需要下載,並由瀏覽器快取。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

The day after a hospital visit, somebody usually ends up hunting through a discharge letter again, looking for the one line that says whether a tablet belongs before breakfast or after dinner. Then they do it again. Next of Care turns selected care documents into an editable plan that can be read at a glance, so the family does not have to repeat that search every day. A small relief.

The person using the app selects PDFs, images, or text files in their browser, then reviews and corrects the proposed medicine schedule before taking a copy away. Nothing is silently prescribed. From that reviewed plan, they can make a PDF summary with a compact dosage table, a formatted Excel tracker, a weekly view, or a WhatsApp message for someone helping at home.

Language matters here. A medicine plan written in English may reach a parent who reads Hindi more comfortably, or an elder who would rather receive a Marathi WhatsApp message than open another spreadsheet. So the same plan can be exported in English, Hindi, or Marathi, including the message that is ready to share with a deliberate tap.

Imagine this message arriving after a relative gets home: “Take one tablet after breakfast. Take the second after dinner.” Simple words help. The medicine name and dose still deserve a check against the original instruction, but a readable message means the recipient can see the day’s plan without asking someone to photograph the prescription yet again.

Demo

Code

Next of Care

Next of Care is a browser-based, local-first care handoff tool. People select discharge letters, prescriptions, follow-up schedules, and other care documents on their own device. An open-weight model drafts an editable plan, with original wording available where a match is found. The app can create a PDF summary, an Excel medicine tracker, a weekly schedule, and a WhatsApp-ready message.

Run locally

Requires Node.js 20.19+ or 22.12+.

npm install
npm run dev

Open the address printed by Vite. For a static production build:

npm run build
npm run preview

The dist/ directory can be hosted as static files. There are no application API routes.

Try a fictional sample

Select output/pdf/sample-medicine-instructions.pdf in the app. It has a twice daily medicine at 7:00 AM and 7:00 PM, a medicine on Monday/Wednesday/Friday after breakfast, an as-needed medicine, and a follow-up example. All names and instructions are synthetic test data.

How privacy

…

How I Built It

The interface is a React and TypeScript app built with Vite, while PDF.js reads text from PDFs and Tesseract.js handles image text in the browser. Files stay on the device. For the AI step, Transformers.js runs the open-weight Qwen3 0.6B ONNX model in a browser worker with WebGPU, turning extracted instructions into a draft that the user can edit. Then it is theirs.

The model is downloaded on first use and cached by the browser, so “local” describes where inference happens rather than promising that a new visitor can start with no internet connection at all. That distinction matters. Once the plan is reviewed, browser-side code produces the PDF, Excel tracker, and share text; the WhatsApp action opens a prepared message only when the user chooses it. Their tap, their choice.

I kept the generated plan editable because a neat-looking medicine schedule can still be wrong, especially when source documents contain unusual wording or text recognition misses a line. The source stays close. The language option also applies across the summary, PDF, tracker, and WhatsApp text, with medicine names and source wording kept visible where possible so a family can compare them. Everyone can check.

Why Does Open Innovation Matter?

Medical paperwork can be intimate, and I wanted this tool's ordinary path to work without sending selected files to an application server for processing. The browser does the work. Because the model and inference stack are open, the project can be inspected, changed, and run without a paid inference API sitting between a family and its documents. That feels right.

Another benefit: a developer can swap the model or redesign the export for a household that needs larger type. And they can share it. Open source does not make extraction perfect, but it lets people see how a suggestion was produced and improve the tool instead of treating a black box as the final word.

The Lazy Payoff

This is the kind of laziness I wanted to reward: after doing the careful review once, a caregiver can leave a tracker on the fridge and send the same readable schedule to the person taking the medicine. The papers can rest. Tomorrow’s routine starts from a plan that is easier to find than a folded discharge letter, while the original instructions remain close enough to check when anything is unclear. One less search.

What I Want to Improve Next

Some devices cannot run the browser model comfortably, so I want to offer an explicitly optional hosted model for people who prefer a smaller first download or lack WebGPU support. The app should explain clearly when documents would leave the device, and the local route should remain available for people who want their processing to stay with them. A real choice.

I also want broader OCR language support, stronger checks for translated dose instructions, and an installable offline package that includes what a household needs before the next hospital visit. None of that replaces review. It would make the handoff gentler for more families, especially when the person reading the plan is far from the person who first brought the papers home.

來源:DEV Community · dev.to