System Goal: Create a React-based, voice-first web app called 'MedBrief.' The app acts as a Senior Medical Scribe that conducts guided interviews and translates patient "rambling" into a structured History of Present Illness (HPI) brief. Visual & UX Specs: Aesthetic: 'Calm Tech'—Background #F8FAFC, Primary Blue #3182CE, Text Slate #1A202C. Accessibility: Minimum font size 18px (Inter font) for high legibility. Three-Screen Architecture: Screen 1: Entry Minimalist landing with a 'Prepare for My Visit' button. Privacy badge: 'Local processing. Your data is cleared after every session'. Footer disclaimer: 'Productivity tool for communication; not a medical device/diagnosis'. Screen 2: Guided Scribe (Voice) Implement MediaRecorder API to capture voice. Show a reactive waveform animation. Logic: Integrate Groq API (Llama 3). The AI must listen to the initial complaint and then prompt the user with 3 clinical follow-up questions focused on PQRST (Provocation, Quality, Region, Severity, Timing). Screen 3: Clinical Output AI Translation: The system prompt for Groq must instruct the AI to translate patient-speak into clinical terminology (e.g., 'fluttering' to 'palpitations'). Structure: Generate sections for Chief Complaint, HPI, and Patient Goals. Features: Doctor Mode Toggle: Increases text to 24px and hides UI navigation for easy reading during the exam. Local PDF Export: A button to generate and download a clean A4 PDF of the brief. Wipe Session: A red 'Burn Session' button to purge all local state and return to Home. Technical Constraints: Use Environment Variables for the Groq API key. Ensure all PDF generation is handled locally on-device to maintain zero-cost and maximum privacy.
Sign in to leave a comment
No comments yet. Be the first!