sehatscribe-ai-doctors

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.

No preview

Comments (0)

No comments yet. Be the first!

Architecture

No Services Diagrams Yet

Architecture diagrams will be automatically generated when the Project Manager creates tasks for your project.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.