Spaces:
Sleeping
Sleeping
feat: Enhance provider summary and consent process for spiritual care support
Browse files
src/interface/simplified_gradio_app.py
CHANGED
|
@@ -564,7 +564,32 @@ Goal: understand whether extra support (like a referral) may be helpful.
|
|
| 564 |
|
| 565 |
### 🔴 RED — Severe distress / safety concern
|
| 566 |
The assistant prioritizes safety and guidance.
|
| 567 |
-
It
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
|
| 569 |
---
|
| 570 |
|
|
@@ -605,10 +630,22 @@ Use this when you want to test an entire dataset:
|
|
| 605 |
|
| 606 |
---
|
| 607 |
|
| 608 |
-
## 💾 Exports
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 612 |
|
| 613 |
CSV note:
|
| 614 |
- The **Notes** column contains **only the model `reasoning`** (when present).
|
|
@@ -616,8 +653,11 @@ CSV note:
|
|
| 616 |
---
|
| 617 |
|
| 618 |
## 🔐 Privacy & Safety
|
| 619 |
-
- Session data is stored locally
|
| 620 |
-
-
|
|
|
|
|
|
|
|
|
|
| 621 |
- If there is an emergency, contact local emergency services.
|
| 622 |
""")
|
| 623 |
|
|
|
|
| 564 |
|
| 565 |
### 🔴 RED — Severe distress / safety concern
|
| 566 |
The assistant prioritizes safety and guidance.
|
| 567 |
+
It will ask for your **consent** before sharing information with the spiritual care team.
|
| 568 |
+
|
| 569 |
+
**What happens:**
|
| 570 |
+
1. The system detects severe emotional or spiritual distress
|
| 571 |
+
2. A compassionate message appears asking if you'd like support
|
| 572 |
+
3. If you agree, a **Provider Summary** panel appears on the right
|
| 573 |
+
4. The spiritual care team receives a detailed summary of your situation
|
| 574 |
+
5. Someone from the team will reach out to you
|
| 575 |
+
|
| 576 |
+
---
|
| 577 |
+
|
| 578 |
+
## 📋 Provider Summary (for RED flags)
|
| 579 |
+
When you consent to spiritual care support, a **Provider Summary** panel appears showing:
|
| 580 |
+
- **Status:** Confirmation that a summary has been generated
|
| 581 |
+
- **Patient Info:** Your name and contact information
|
| 582 |
+
- **Classification:** RED flag with distress indicators
|
| 583 |
+
- **Download Button:** Click to download the complete summary as a text file
|
| 584 |
+
|
| 585 |
+
**What the spiritual care team receives:**
|
| 586 |
+
- Your name and phone number
|
| 587 |
+
- Emotional/spiritual distress indicators detected
|
| 588 |
+
- Reasoning for the referral
|
| 589 |
+
- Context from your conversation
|
| 590 |
+
- Triage questions and your responses (if applicable)
|
| 591 |
+
|
| 592 |
+
This ensures the spiritual care team has all the information they need to provide appropriate support.
|
| 593 |
|
| 594 |
---
|
| 595 |
|
|
|
|
| 630 |
|
| 631 |
---
|
| 632 |
|
| 633 |
+
## 💾 Exports & Downloads
|
| 634 |
+
|
| 635 |
+
### Conversation Exports (Chat tab)
|
| 636 |
+
In the **Chat** tab, you can download your conversation:
|
| 637 |
+
- **📥 Download JSON** - Full conversation with all classifications and metadata
|
| 638 |
+
- **📊 Download CSV** - Conversation in spreadsheet format
|
| 639 |
+
|
| 640 |
+
### Provider Summary Download (Chat tab, RED flags only)
|
| 641 |
+
When a RED flag is detected and you consent to spiritual care:
|
| 642 |
+
- **📥 Download Summary** - Complete provider summary as a text file
|
| 643 |
+
- This file contains all information shared with the spiritual care team
|
| 644 |
+
|
| 645 |
+
### Enhanced Verification Exports
|
| 646 |
+
In **Enhanced Verification** tab:
|
| 647 |
+
- **CSV** - Test results with classifications and notes
|
| 648 |
+
- **JSON** - Detailed test session data
|
| 649 |
|
| 650 |
CSV note:
|
| 651 |
- The **Notes** column contains **only the model `reasoning`** (when present).
|
|
|
|
| 653 |
---
|
| 654 |
|
| 655 |
## 🔐 Privacy & Safety
|
| 656 |
+
- Session data is stored locally
|
| 657 |
+
- Provider summaries are generated only with your explicit consent
|
| 658 |
+
- Information is shared only with authorized spiritual care team members
|
| 659 |
+
- This tool does not replace professional medical advice
|
| 660 |
+
- In case of emergency, contact local emergency services immediately
|
| 661 |
- If there is an emergency, contact local emergency services.
|
| 662 |
""")
|
| 663 |
|