Spaces:
Sleeping
Sleeping
Commit History
24 days ago
-
fix: Or_7 feedback — Spiritual Health team wording, coping follow-up, summary trigger
- Consent question now asks "Would you be open to having someone from the team reach out to you?" instead of asking to share the patient's information; confirmation and all consent templates renamed to the Spiritual Health team - Service explanation rewritten from Alex's program description: ambulatory, not hospital/bedside, phone or video, free, and visits are NOT private; the description is also added to the classifier and medical assistant prompts - Triage evaluator: a practical/treatment-related cause alone no longer resolves to GREEN; ongoing burden prompts a question about coping - Drop the canned "I'm glad you have support" on GREEN resolution - Provider summary context keeps only patient lines, most recent 2000 chars, so the triggering distress statement is not truncated; prompt requires naming the reported feeling in the patient's words - CSV export now includes provider_summary on the PROVIDER_SUMMARY row - Medical assistant must not invent appointment times or …948058d
-
Implement provider summary improvements from Or_3.txt review
Tasks completed: 1. Remove phone number from provider summary (modified spiritual_care_message.txt prompt) 2. Include all patient inputs throughout interaction (updated prompt to capture all conversation) 3. Auto-generate provider summary when RED flag + consent given (modified chat_handlers.py) 4. Fix HTML badge rendering issue in provider summary status Changes: - src/config/prompts/spiritual_care_message.txt: Removed phone number requirement, added all patient inputs - src/interface/chat_handlers.py: Added automatic summary generation on consent, fixed HTML badge display - src/interface/stats_handlers.py: Updated coherent summary handling with proper Gradio updates - Enhanced debug logging for troubleshooting summary generation61eaa9c
-
edit src/config/prompts/spiritual_care_message.txt
cf1a820 -
feat: Fix classification logic and remove redundant spiritual care message functionality
## Major Changes ### 🔧 Classification Logic Fixes (review/Or_2.txt recommendations) - Fix JSON parsing bug: LLM returns 'classification' but parser expected 'state' - Update RED flag definition: broader than crisis-only, includes active spiritual distress - Add explicit RED indicators: complex grief, loss of loved one, doubt about meaning of life/suffering/dignity - Fix 'I am fine' classification: now correctly GREEN (was incorrectly YELLOW) - Fix 'feeling sad' classification: now correctly YELLOW without spiritual context (was incorrectly RED) - Loss of meaning/purpose now correctly RED with high confidence ### 🗑️ Remove Redundant Spiritual Care Message UI - Remove redundant '💬 Care Team Message' tab from Provider Summary panel - Remove related UI controls and event handlers - Fix undefined 'spiritual_care_msg' variable in return statements - Preserve prompt editing and model settings (now used for Medical Brain Summary) - Medical Brain Summary now first tab by default in '�� Che…be1b5d2
-
refactor: Structure spiritual care prompt and simplify fallback message generation to a concise narrative, increasing conversation context length.
b6906ba
-
feat: Add comprehensive manual tests for spiritual care message features
- Introduced a new changelog documenting notable changes and version history. - Created manual test scripts for validating patient profile flow, context integration, and spiritual care message generation. - Implemented tests for prompt editing functionality and model selection in the spiritual care message context. - Enhanced existing prompt templates and configurations for better clarity and usability. - Organized project structure for improved maintainability and documentation accessibility.1d0741a -
fix: Remove outdated model reference from Gemini provider configuration
0750ce4 -
feat: Complete prompt optimization system implementation
🎉 MAJOR FEATURE: Comprehensive prompt optimization system ## Core Architecture - ✅ Centralized PromptController with shared component architecture - ✅ Session-level prompt override system with isolation and cleanup - ✅ Enhanced Edit Prompts UI with validation and promotion workflows - ✅ Complete integration with existing Gradio interface ## Key Features Implemented - 🔧 Real-time prompt editing with session isolation - �� Visual indicators for prompt sources (session vs centralized) - ✅ Live validation with syntax and structure checking - 🔄 Promote to File workflow for permanent adoption - 🛡️ Automatic backup and rollback capabilities ## Shared Component System - 📋 Centralized indicators catalog (68 indicators) - 📏 Unified rules catalog (7 classification rules) - 📝 Template catalog (5 reusable patterns) - �� Consistent terminology across all AI agents ## Testing & Quality Assurance - ✅ 65+ comprehensive tests - all passing - 🧪 Property-based tests validating 9 correctness pr…24214fc
-
feat: Enhance spiritual state management and UI for provider summaries
- Added AWAITING_CONSENT state to SpiritualState enum for tracking consent responses. - Updated SessionSpiritualState to include pending referral data and methods for consent handling. - Implemented a provider summary panel in the Gradio interface, including download and clear functionality. - Enhanced conversation handling to check for provider summaries in RED flag cases, with detailed logging. - Created a simple test script for Gradio UI to simulate provider summary functionality. - Developed a prompt loader to manage spiritual and medical prompts from markdown files, ensuring backward compatibility. - Added comprehensive documentation for prompt structure and loading process. - Implemented triage evaluator and question prompts to improve emotional and spiritual distress assessment.f91e0d7
-
Implement model overrides for AI clients and enhance interfaces for manual input and file upload
37184d4 -
Implement model override functionality for AI clients and enhance session management in the simplified medical app
ba5a70c
-
chore: Remove legacy modules and old tests
- Removed .kiro/specs and .vscode directories - Removed old spiritual analyzer and assistant modules - Removed combined assistant and multi-faith modules - Removed old Gradio interface and spiritual interface - Removed prompts, storage, and utils modules - Removed all old tests (kept only simplified app tests) - Repository now contains only essential files for Simplified Medical Assistant - Clean, minimal codebase ready for production6c0e398 -
feat: Update Help tab and README with comprehensive documentation
- Updated Help tab with detailed information about all features - Added documentation for Model Settings, Patient Profiles, and Edit Prompts - Documented all 8 Spiritual Testing Profiles (GREEN, YELLOW, RED) - Updated README.md with Simplified Medical Assistant information - Added testing instructions and profile usage guide - Updated project status and technology stack - All 130 tests passing - Ready for production usee531bb9
-
fix: Fix Claude model name and add dynamic spiritual dialog response
- Fixed Claude Sonnet 4.5 model name: claude-sonnet-4-5-20250929 - Added SYSTEM_PROMPT_SPIRITUAL_DIALOG and PROMPT_SPIRITUAL_DIALOG for natural responses - SpiritualAssistant now generates LLM-based responses for no-flag cases - Responses are now in patient's language (Ukrainian, English, etc.) - Removed static English-only response template for no-flag cases7fbff0e -
feat: Add language matching to conversational prompts only
- Added 'Always respond in the same language as the patient's message' instruction to all conversational prompts - Conversational prompts updated: Medical Assistant, Soft Medical Triage, Main Lifestyle Assistant, Lifestyle Profile Updater, Spiritual Distress Analyzer, Referral Message Generator, Clarifying Question Generator, Reevaluation Prompt - Classifiers (Entry Classifier, Triage Exit Classifier) intentionally excluded to preserve JSON output format - Ensures multi-language support (English, Ukrainian, etc.) for patient-facing interactionse14e926 -
feat: Upgrade to Claude Sonnet 4.5 and add Spiritual components to Anthropic
Model upgrades: - Main Lifestyle Assistant: Claude 4 → 4.5 - Medical Assistant: Claude 4 → 4.5 - Spiritual Distress Analyzer: Gemini 2.0 Flash → Claude 4.5 New Anthropic agents: - ReferralMessageGenerator (Claude 4.5, temp 0.3) - ClarifyingQuestionGenerator (Claude 4.5, temp 0.3) Rationale: - Spiritual assessment requires empathy and cultural sensitivity - Claude 4.5 provides better nuanced understanding - Compassionate communication for sensitive topics - Improved safety for spiritual distress detection Configuration: src/config/ai_providers_config.py Documentation: LLM_MODELS_CONFIGURATION.md updated Total: 5 Anthropic agents, 4 Gemini agents9cc7b86 -
add
f5f8487 -
🧹 Організація проекту: структурування коду, тестів та документації
✨ Основні зміни: - Переміщено всі тести в tests/spiritual/ (145 тестів) - Переміщено документацію в docs/spiritual/ та docs/general/ - Переміщено демо в demos/, скрипти в scripts/ - Переміщено конфігурацію в src/config/ - Видалено проміжні звіти (TASK_*_SUMMARY.md) - Створено чітку структуру проекту 📁 Нова структура: - src/ - вихідний код - tests/ - всі тести - docs/ - вся документація - demos/ - демонстраційні скрипти - scripts/ - утилітні скрипти - deployment/ - файли для розгортання 📚 Документація: - README.md - головний README - QUICK_START.md - швидкий старт - STRUCTURE.md - структура проекту - FILE_INDEX.md - індекс файлів - FINAL_STATUS.md - статус проекту ✅ Результат: чистий, організований репозиторій готовий до productiona2eebc7
-
Оновлено lifestyle_profile.json: уточнено основну мету, додано нотатки про дієту та особисті вподобання пацієнта. Внесено зміни до обмежень щодо фізичної активності, зокрема, знято обмеження на виконання присідань після медичного огляду. Оновлено підсумок останньої сесії з акцентом на новий симптом та підтвердження медичної безпеки. Додано логування динамічних запитів у класі EnhancedMainLifestyleAssistant для покращення відстеження. Змінено обробку конфігурацій у класі EnvironmentConfigurationManager для підтримки тестового середовища.
b7b658f
-
refactor: adopt src/ modular structure, update imports, add compatibility shims; dynamic prompt safety components; tests passing (52)
aa18fb4