Why this manual exists
iRehab's Pre-Consult feature is built on one design principle: AI isn't here to write prose for you — it's here to give time back to you. When the patient sits down, the screen already has a structured summary. You don't spend five minutes collecting basics — you spend those five minutes listening, examining, deciding. The full design rationale lives in Pre-Visit Brief: When the Patient Can't Tell You Whether It's Tendon or Nerve.
This manual is for the doctor who actually uses the feature. Print and post at your desk.
1. Before clinic: print today's QR poster
- Open the Doctor PWA (
irehab-doctor.pages.dev) and sign in - Go to the Pre-Consult tab
- Top right, tap "Print Today's QR"
- An A4 preview opens — print, or save as PDF first
Notes:
- Use a desktop browser in the clinic if you can. iPhone Safari sometimes breaks the layout — if you must use a phone, save as PDF first and print from there
- The poster shows the day's consulting doctor name. Reprint when the doctor changes
- Post it where patients can easily see it — waiting area or reception counter. If patients can't scan, the front-desk assistant can help
2. Reading the pre-consult queue
After the patient submits the form, within about 30 seconds their record appears in your "Pre-Consult" queue. Each card shows:
- Name + birth year + sex (for young children, it displays "X years Y months")
- Chief complaint in one line — patient's own words, preserved verbatim
- VAS pain score (0–10)
- Sensation-type chip (pain / numbness / weakness / multiple / other)
- Red advisory bar — appears if the symptom combination warrants extra attention; look at these first
- ⚠️ Manual-lookup chip — means the record was pulled from another doctor's queue using the code; ask a few extra questions
Expand the card and you'll see the full intake summary draft in two formats:
- Telegraphic summary — one-tap copy for pasting into the S-line of HIS (
R't knee,B/L,F/M/N) - Prose paragraph — use when writing IRB reports or referrals
3. Decision tree during the visit
At the end of each visit, press one close-out button. Three options:
┌──────────────────────────┐
│ Follow-up (conservative)│ → Patient enters iRehab follow-up list
│ │ VAS + GROC survey auto-sent 3 days before return visit
└──────────────────────────┘
┌──────────────────────────┐
│ Surgery or rehab │ → Creates a formal care record
│ │ You select pathway (TKA / THA / Shoulder / General rehab)
└──────────────────────────┘
┌──────────────────────────┐
│ Close (no follow-up) │ → Record kept 180 days for later retrieval
│ │ System sends zero further notifications
└──────────────────────────┘
Every button shows a confirmation dialog listing exactly what the system will do next — confirm before it fires.
4. Manual lookup with the confirmation code
When to use:
- Your queue looks empty but the patient insists they filled the form
- Patient hands you a code
PC-XXXXXX - You're covering for another doctor (patient scanned the other doctor's QR)
- Cross-clinic assist
How:
- Top-right of the queue, tap "⊕ Manual Lookup"
- Enter the 6 characters the patient reads to you:
PC- [ _ _ _ _ _ _ ](case-insensitive; if they paste from LINE the system cleans it up) - Submit → the record joins your queue, tagged ⚠️ Manual Lookup
- If the record was originally filed under another doctor, the card shows "Original doctor: XXX" — a reminder this isn't your original patient, so ask a bit more
Limitation: Only works within the same hospital. No cross-hospital lookup.
5. Common questions
Q: The patient says they filled it, but my queue is empty. What now?
A: First, check timing — submit to appearance is about 30 seconds. Still nothing? Ask for the code PC-XXXXXX and use Section 4's manual lookup.
Q: What about confusable characters like O vs 0?
A: The system deliberately excludes ambiguous characters (no O / 0 / I / 1 in generated codes). What the patient reads to you will not be ambiguous.
Q: I'm covering for Dr. X. How do I see their queue? A: Use Section 4 to pull the record into your own queue with the code. The card will mark "Original doctor: X". Close out normally — the care record will correctly attribute to you, since you're the one who actually saw the patient.
Q: Patient filled half the form and left. What happens? A: The record stays in "unsubmitted" state and never reaches the queue. If they return and rescan the same QR from the same phone, the system resumes from the last step.
Q: I clicked "Close" by mistake — how do I undo? A: Closed records are kept 180 days. Open the record, top-right "Reopen", then pick "Follow-up" or "Surgery or rehab". A new care record is created; the original closure is marked "withdrawn".
Q: What does the red advisory bar mean? A: The patient's answers match a combination the system flags as warranting extra attention (example: "weakness + worsening + persistent"). It's not a diagnosis, just a prompt to ask those warning-sign questions during your exam. Whether it's actually urgent is still your call.
6. AI Translation (optional) — Bring Your Own Gemini Key (BYOK)
Optional feature. If you don't enable it, day-to-day use is unaffected; you'll see the patient's chief complaint in their original language without auto-translation. This is the BYoAI design (Bring-your-own-AI): the doctor uses their own Gemini API quota, bearing the (very low) cost. iRehab's servers do not retain any LLM response.
When to enable it
- You see non-Chinese-native patients regularly (Vietnamese, Indonesian, Japanese, Korean, English…)
- You want a one-tap button to translate the patient's foreign-language complaint into a language you read easily
Setup (5 minutes)
Step 1 — Get a key from Google AI Studio
- Browser → https://aistudio.google.com/app/apikey
- Sign in with your Google account (use a personal one, not your hospital account)
- Click "Create API key" → you'll get a string starting with
AIza... - Don't close the tab yet; copy that string
Step 2 — Confirm billing is active (critical)
- Click the new key → or the left sidebar "Billing" → enable billing
- Even for the free tier, Google requires a credit card on the project before giving you normal quota
- Without billing, registration will fail (you'll see "quota exceeded")
Step 3 — Register the key in Doctor PWA
- Switch to the "✨ AI" tab at the bottom (not Profile; BYOK settings moved from Profile to the AI tab)
- Find the "BYOK Gemini Key" card
- Tap "Enable and Enter Key"
- Read the purpose notice → Continue
- Check all three consent items (data goes to Google, hospital allows it, iRehab is not responsible for Google-side handling) → Continue
- Paste
AIza...→ press "Save Key" - Success shows a green indicator "Configured (active)"
Common registration errors
| Error | Why | Fix |
|---|---|---|
| Invalid format | Copy-paste has extra whitespace or missing chars | Recopy the full AIza... |
| Key invalid or revoked | Key was actually deleted or permission-restricted | Regenerate at AI Studio |
| Quota exceeded | Google-side quota hit | Wait 1–2 min / confirm billing is on / rotate key |
| Google response error | Malformed response from Google | Wait 1 min; if persistent, notify engineering |
| Service temporarily unavailable | iRehab's KMS transiently unavailable | Wait 1 min and retry |
| Too many attempts | More than 20 registrations in an hour | Wait 1 hour |
How to use after enabled
Expand a patient card in the pre-consult queue → the Path B area will show a "Translate Chief Complaint" button (only shown when the patient's CC language ≠ your UI language). Tap it and the complaint is sent to your own Gemini API; a one-line translation appears on the card within seconds.
Important:
- The translation is a reading aid; it does not overwrite the HIS S-line. The S-line still pastes the original telegraphic summary.
- The patient's original text is preserved 100% in the record — unmodified, unsummarized, unrewritten.
- The translation runs only when you tap — it does not auto-trigger. You decide when to translate.
Security assurances (hospital IT may ask)
- Your key never leaves your browser + iRehab backend; it does not enter logs, error messages, or support systems
- Backend storage uses Google KMS envelope encryption (double-wrapped); not even iRehab engineers can decrypt it directly
- Every key decryption event writes a Google Cloud Audit Log (anomalous use is traceable)
- iRehab servers do not retain LLM response content; translation output renders only in your browser
- You can tap "Remove Key" in the AI tab anytime — the encrypted secret is deleted immediately
- Historical usage logs are retained for audit; they are not deleted
What to tell hospital IT
- Data travels over HTTPS to Google Gemini API (
generativelanguage.googleapis.com) - Each request carries only the patient's chief complaint text — no name, no national ID, no chart number
- Google's retention policy on this path: commercial API route, not used to train models (contractually guaranteed)
- If hospital policy prohibits it, IT can notify the department head and we will disable this feature for the whole institution from the backend
