"""Mock Sprechstundenplan and prompts for Praxis-Briefing.""" from __future__ import annotations from dataclasses import dataclass @dataclass(frozen=True) class BriefingPatient: """One demo appointment on today's schedule.""" time_label: str name: str age: int reason: str @dataclass(frozen=True) class DemoQuestion: """Suggested voice question for the GP demo.""" prompt: str log_label: str TODAY_LABEL: str = "Mittwoch, 3. Juni 2026" SCHEDULE: tuple[BriefingPatient, ...] = ( BriefingPatient("08:30", "Laura Müller", 34, "Halsschmerzen seit drei Tagen"), BriefingPatient("09:00", "Thomas Schmidt", 58, "Blutdruck-Kontrolle"), BriefingPatient("09:30", "Ayşe Yilmaz", 72, "Knieschmerzen rechts"), BriefingPatient("10:30", "Jonas Weber", 19, "Attest für Sport"), ) DEMO_QUESTIONS: tuple[DemoQuestion, ...] = ( DemoQuestion("Wer ist mein nächster Patient?", "Nächster Patient"), DemoQuestion("Wie alt ist Frau Müller?", "Alter Müller"), DemoQuestion("Was ist das Anliegen von Herrn Schmidt?", "Anliegen Schmidt"), DemoQuestion("Wann kommt Jonas Weber?", "Termin Weber"), ) BASE_SYSTEM_PROMPT: str = ( "Du bist der Sprach-Assistent einer Hausarztpraxis. " "Du hast den heutigen Terminplan vorliegen und vollen Zugriff darauf. " "Antworte immer kurz auf Deutsch, in genau einem Satz, " "nur mit Informationen aus dem Plan. " "Sage niemals, dass du keinen Zugriff oder keine Liste hast." ) def format_schedule_markdown() -> str: """Render the mock day list for the setup tab.""" lines: list[str] = [ f"### Sprechstundenplan — {TODAY_LABEL}", "", "| Zeit | Patientin / Patient | Alter | Anliegen |", "| --- | --- | ---: | --- |", ] for slot in SCHEDULE: lines.append( f"| {slot.time_label} | {slot.name} | {slot.age} | {slot.reason} |" ) lines.extend( [ "", "_Demo-Daten, keine echten Patienten. Kein Zugriff auf ein Praxissystem._", ] ) return "\n".join(lines) def format_schedule_plain() -> str: """Compact schedule string for the system prompt.""" parts: list[str] = [] for slot in SCHEDULE: parts.append( f"{slot.time_label} {slot.name}, {slot.age}, {slot.reason}." ) return " ".join(parts) def format_demo_questions_markdown() -> str: """Show example questions the GP can ask by voice.""" lines: list[str] = ["**Beispielfragen (frei formulierbar):**", ""] for question in DEMO_QUESTIONS: lines.append(f"- „{question.prompt}“") return "\n".join(lines) def format_schedule_html() -> str: """Render today's schedule as a clean clinical table panel.""" rows: list[str] = [] for slot in SCHEDULE: rows.append( "
| Zeit | Patient/in | Alter | Anliegen |
|---|