sehatscribe-ai

byMuhammad ramzan

# SehatScribe AI — Medical Assistant Web App Act as a senior full-stack developer, AI engineer, healthcare software architect, and professional UI/UX designer. Build a responsive web app called **SehatScribe AI** for doctors in Pakistan. Its main purpose is to save doctors' time by converting speech into clinical notes and explaining handwritten prescriptions in simple Urdu or English. IMPORTANT: This is a clinical documentation assistant, NOT an autonomous doctor. Never invent diagnoses, medicines, dosages, allergies, examination findings, or missing medical information. ## 1. DESIGN AND INTERFACE Create a premium, professional healthcare SaaS dashboard: - Clean white background, blue/teal accents, modern cards and professional icons. - Responsive on desktop, tablet and mobile. - English and Urdu language switch. - Proper right-to-left layout for Urdu. - Simple navigation: Dashboard, New Consultation, Prescription Reader, Saved Drafts, Settings. - Professional loading, error, empty and success states. - All visible buttons must work. - Use React and TypeScript if supported. ## 2. FEATURE A: VOICE-TO-MEDICAL-NOTES Create a working microphone interface with Start, Stop, Pause/Resume where supported, recording status, and editable transcription. Support Urdu, English, and mixed Urdu-English speech where the chosen speech recognition engine permits it. Use browser speech recognition if available. If unsupported or permission is denied, show a clear error and provide a manual text input fallback. Never pretend recording or transcription succeeded when it did not. After transcription, use Gemini AI to organize the doctor's actual words into: 1. Chief Complaint 2. History of Present Illness 3. Duration of Symptoms 4. Relevant Symptoms 5. Medical History 6. Allergies 7. Current Medicines 8. Examination Findings 9. Doctor's Assessment 10. Plan and Instructions 11. Missing or Unclear Information Only populate fields supported by the doctor's words. Keep unspecified fields empty or label them "Not provided." Preserve medicine names, numbers, strengths, units, negations and durations. Flag uncertain words, numbers, medicine names and dosages for doctor review. Allow the doctor to edit the original transcript and every generated section before saving or printing. ## 3. FEATURE B: PRESCRIPTION IMAGE READER Create a prescription upload tool with: - Drag-and-drop and file selection. - Image preview, replace and remove controls. - File type and size validation. - Clear processing and error messages. Use a real image-capable Gemini model or suitable OCR integration to extract the visible handwriting. Display two separate panels: A. Extracted Prescription Text B. Simple Patient-Friendly Explanation Requirements: - Preserve the original medicine names, strengths, frequency, quantity and duration as written. - Mark unclear handwriting and uncertain fields as "Needs confirmation." - Never guess unreadable medicine names or dosages. - Explain only what can reasonably be supported by the prescription. - Provide Urdu and English explanations. - Clearly separate extracted text from AI interpretation. - Do not independently recommend medicines, change dosages, stop medicines, or make treatment decisions. - If a medicine's purpose cannot be established confidently, tell the user to confirm with the doctor or pharmacist. ## 4. FEATURE C: EDITABLE CLINICAL DOCUMENT Create an editable, print-friendly A4 document containing: - Configurable clinic and doctor name. - Patient name or demo ID. - Consultation date. - Clinical notes. - Medicine details only when explicitly supplied and confirmed by the doctor. - Doctor's instructions and patient-friendly explanation. Include Edit, Copy, Print, Clear Draft and Review controls. The output must have a clear DRAFT / REQUIRES DOCTOR REVIEW status until the doctor explicitly confirms it. Never automatically sign or finalize a prescription. ## 5. DASHBOARD Show: - Welcome section. - New Consultation button. - Upload Prescription button. - Recent demo drafts. - Simple demo statistics, clearly labelled as demo data. - Privacy notice and doctor-review reminder. Use synthetic patient information only during development. ## 6. GEMINI API INTEGRATION Integrate the currently supported image-capable Gemini model through a secure server-side API route. - Never hardcode API keys in client-side code. - Read secrets from environment variables. - Validate inputs and structured outputs. - Handle quota limits, timeouts, API errors and malformed responses. - Use structured JSON output where supported. - Keep UI, AI processing and validation logic separate. - Do not use fake AI responses or hardcoded success messages. - Explain any missing API key or configuration requirement. - Provide manual fallback functionality when AI is unavailable. Suggested structured response: { "extracted_text": "", "clinical_sections": {}, "patient_explanation": "", "uncertain_fields": [], "missing_information": [], "review_required": true } Validate the response before displaying it. Do not render model output as trusted HTML. ## 7. PRIVACY AND SECURITY For this prototype: - Use synthetic demo patients only. - Do not upload real medical records. - Explain when information is sent to an external AI service. - Do not save raw audio or prescription images unnecessarily. - Provide a way to clear temporary data. - Do not store sensitive medical data in browser local storage by default. - Never claim medical privacy compliance without verification. Before real clinical use, implement and review authentication, authorization, encryption, secure storage, retention/deletion policies, audit logs and backups. ## 8. DEVELOPMENT PLAN Build in phases: Phase 1: Complete responsive dashboard and functional UI. Phase 2: Voice recording, transcription, editing and fallback. Phase 3: Prescription image upload and real AI/OCR extraction. Phase 4: Urdu/English patient-friendly explanation. Phase 5: Doctor review, draft editing, copy and print. Phase 6: Test and fix the complete workflow. Start with Phase 1. Build clean, reusable code that supports later integration. Do not rebuild working components unnecessarily. ## 9. ACCEPTANCE TESTS Verify: - App runs without compilation errors. - English/Urdu switching works, including Urdu RTL. - Microphone permissions and unsupported browsers are handled. - Prescription images can be previewed, replaced and removed. - Unreadable text is flagged rather than guessed. - Missing clinical information is never fabricated. - The doctor can edit, review, copy and print. - Loading and API errors are handled. - API secrets are not exposed in browser code. - All visible controls have functional behavior. After each phase, summarize files changed, working features, setup requirements, limitations and tests performed. Build a polished, usable MVP first. Prioritize reliability, doctor control, simple Urdu explanations, accessibility and privacy over unnecessary features. BEGIN WITH PHASE 1 NOW. Do not merely describe the app; implement it in the available environment.

Landing
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks

30 planning tasks
#1

Generate system requirement document

1m 38s0.2 cr used
Done
#2

Generate personas & user flows

0m 11s0.2 cr used
Done
#7

Create flow for Doctor

0m 10sCredits in parent
Done
#8

Create flow for Clinic Administrator / Clinic Setup Owner

0m 9sCredits in parent
Done
#9

Landing

7m 45sCredits in subtasks
Done
#32

Fix Landing review finding: frontend/src/components/Navigation.jsx: The anonymous Landing…

0m 13s0.4 cr used
Done
#30

Fix Landing review findings: Q2 as reviewed now: The entry tiles are stacked… (+1 more)

0m 57s0.4 cr used
Done
#29

Fix Landing review findings: Hero readout labels break into unreadable fragments at… (+3 more)

1m 46s0.4 cr used
Done
#21

Landing / Navigation

0m 0s0.85 cr used
Done
#17

Landing / Instrument Band

0m 36s0.85 cr used
Done
#18

Landing / Entry Tiles

0m 31s0.85 cr used
Done
#19

Landing / Capability Ledger

0m 30s0.85 cr used
Done
#20

Landing / Boundary Statement

0m 31s0.85 cr used
Done
#22

Landing / Footer

0m 0s0.85 cr used
Done
#25

Fix Landing: Hero readout labels break into unreadable fragments at desktop and tablet…

2m 39sCredits unavailable
Done
#26

Fix Landing: Entry tile text is broken into narrow, fragmented lines at tablet width…

4m 11sCredits unavailable
Done
#27

Fix Landing: Measured internal clipping at mobile (375px viewport): button.lib-lang__btn clipped by…

4m 32sCredits unavailable
Done
#28

Fix Landing: The landing entry surface renders a permanent failure state because the orchestrator…

4m 11sCredits unavailable
Done
#31

Fix Landing: The anonymous Landing page still exposes navigation links to protected workspace…

0m 36sCredits unavailable
Done
#23

Navigation

0m 28sCredits in parent
Done
#24

Footer

0m 22sCredits in parent
Done
#10

Login

Credits in subtasks
Backlog
#11

Dashboard

Credits in subtasks
Backlog
#12

Sign Up

Credits in subtasks
Backlog
#13

New Consultation

Credits in subtasks
Backlog
#14

Prescription Reader

Credits in subtasks
Backlog
#15

Saved Drafts

Credits in subtasks
Backlog
#16

Settings

Credits in subtasks
Backlog
#5

Architecture

0.2 cr needed
Backlog
#6

Workspace task plan

0.2 cr needed
Backlog
Landing design preview
Landing: Read product boundary
Landing: Switch to Urdu
Sign Up: Create identity
Login: 1. Submit credentials
Login: 2. Correct failed submission
Dashboard: Review demo statistics
Settings: Enter clinic and doctor name
Settings: 1. Save practice identity
Settings: 2. Retry failed save
Settings: Switch interface language
Settings: Read API configuration explanation
Settings: Clear temporary data
Landing design preview
Landing: Read product boundary
Landing: Switch to Urdu
Sign Up: Create identity
Login: 1. Submit credentials
Login: 2. Correct failed submission
Dashboard: Review demo statistics
Settings: Enter clinic and doctor name
Settings: 1. Save practice identity
Settings: 2. Retry failed save
Settings: Switch interface language
Settings: Read API configuration explanation
Settings: Clear temporary data