Inspiration
Hospitals can share records with each other, but they can't see the paper reports patients carry: lab results from a local clinic, a discharge summary from another city, a printed prescription. Patients arrive with a folder, the doctor has a few minutes, and important details get missed. We wanted the doctor to have a clean, trustworthy picture before the visit, with the patient fully in control of what is shared.
What it does
- Profile once. The patient enters allergies, medications, conditions and today's concern. It saves automatically and is reused at every visit.
- Photograph a report. NVIDIA Nemotron on Nebius Token Factory turns a photo, PDF or pasted text into structured data: medications, allergies, conditions and lab results. Each item keeps a quote from the original.
- Patient checks it. The original sits beside the extracted fields. Nothing can be shared until the patient confirms it.
- Share a link. The patient picks what to share and sets an expiry (1 hour to 7 days). Private notes are off by default. Doctors need no account.
- Doctor view. The page leads with what matters most: the patient's own words, allergies, current medications and out-of-range results. Then comes a pre-visit brief and every shared report, with out-of-range values highlighted. It's printable.
- Access log and revoke. The patient sees every time the record or an original is opened, and can switch the link off at any time.
How we built it
- Backend: Python, FastAPI and SQLite. Frontend: plain HTML, CSS and JavaScript, with a patient app and a doctor view.
- Two Nemotron models on Nebius Token Factory, each chosen for its job:
- Nemotron 3.5 Super VL reads photos of reports: tables of lab values, prescriptions, discharge summaries.
- Nemotron 3 Nano 30B reads PDFs and pasted text and writes the brief. It's the cheapest Nemotron, about 5× cheaper than Super, and copying facts into a fixed format doesn't need a bigger model.
- Token Factory's OpenAI-compatible API meant the standard OpenAI SDK worked out of the box, and switching models is a config change.
- Measured on our sample reports: 1–2.5 seconds per report and under $0.003 per photo.
Challenges
- Reasoning ate the answer. With thinking on, both models spent the whole token budget on hidden reasoning, and 3 of 4 reports came back cut off. Turning thinking off (
enable_thinking: false) made answers 3–5× shorter and fixed every report. We added per-call token logging so limits are set from real numbers, not guesses. - The model copied our examples. When the instructions said "e.g. Type 2 diabetes", Nano invented that diagnosis for a report that never mentioned it. We removed every example and added a grounding check: for text and PDFs, any item whose quote isn't actually in the document is dropped before the patient sees it.
- Messy output. Units repeated inside values ("8.1 % %"), lab tests filed as conditions, patient IDs in the notes. We fixed these with clearer field rules plus small safety nets in code.
- Knowing when not to use the model. Nano wasn't reliable at listing only abnormal results or finding real conflicts. Those are exact comparisons, so code now computes the "Notable results" and "Things to confirm" sections (for example, the same medicine with two different doses), and the model writes the parts that need language.
What we learned
Choosing where the model works mattered as much as choosing the model. Nemotron does the tedious part: reading messy documents into structured facts. Code does exact checks. The patient stays the authority on what is true and what is shared.
Safety choices
- The model is told to copy only what a document says: never interpret, diagnose or invent.
- Every extracted fact is checked by the patient against the original before it can be shared.
- A rule-based emergency check (chest pain, trouble breathing, stroke signs) shows a "call emergency services" warning without relying on the model.
- Demo protections: a daily AI call limit per visitor, upload size and type limits, automatic deletion of demo data after 48 hours, and random share links.
What's next
Secure patient accounts, FHIR export and hospital-system integration (with a compliance review), and notifications when a pre-visit record arrives.
Demo only. It uses synthetic data. It is not a medical device, gives no diagnosis or treatment advice, and has no real authentication or compliance certification.
Built With
- css
- fastapi
- html
- javascript
- nebius-token-factory
- nvidia-nemotron
- openai-sdk
- pypdf
- python
- sqlite
- uvicorn
Log in or sign up for Devpost to join the conversation.