From e39d758d3996668f67fc842062323ab703d1c48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Wed, 11 Mar 2026 10:59:23 +0100 Subject: [PATCH] add process step constants, channel/result label maps Co-Authored-By: Claude Opus 4.6 --- src/shared/lib/constants.test.ts | 17 ++++++++ src/shared/lib/constants.ts | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 src/shared/lib/constants.test.ts create mode 100644 src/shared/lib/constants.ts diff --git a/src/shared/lib/constants.test.ts b/src/shared/lib/constants.test.ts new file mode 100644 index 0000000..2882a38 --- /dev/null +++ b/src/shared/lib/constants.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it } from "vitest"; +import { PROZESS_SCHRITTE } from "./constants"; + +describe("PROZESS_SCHRITTE", () => { + it("has 6 steps in correct order", () => { + expect(PROZESS_SCHRITTE).toHaveLength(6); + expect(PROZESS_SCHRITTE[0].key).toBe("neu"); + expect(PROZESS_SCHRITTE[5].key).toBe("antrag_gestellt"); + }); + + it("every step has label and description", () => { + for (const step of PROZESS_SCHRITTE) { + expect(step.label).toBeTruthy(); + expect(step.beschreibung).toBeTruthy(); + } + }); +}); diff --git a/src/shared/lib/constants.ts b/src/shared/lib/constants.ts new file mode 100644 index 0000000..42a2c72 --- /dev/null +++ b/src/shared/lib/constants.ts @@ -0,0 +1,69 @@ +import type { + KontaktErgebnis, + KontaktKanal, + ProzessSchritt, + Therapieform, +} from "../db/schema"; + +export const PROZESS_SCHRITTE: { + key: ProzessSchritt; + label: string; + beschreibung: string; +}[] = [ + { + key: "neu", + label: "Noch nicht begonnen", + beschreibung: "Du hast noch keine Schritte unternommen.", + }, + { + key: "sprechstunde_absolviert", + label: "Sprechstunde absolviert", + beschreibung: + "Du hast eine psychotherapeutische Sprechstunde (PTS) besucht. Dort wurde eine erste Einschätzung vorgenommen.", + }, + { + key: "diagnose_erhalten", + label: "Diagnose erhalten", + beschreibung: + "Du hast eine vorläufige Diagnose und ggf. einen Dringlichkeitscode erhalten.", + }, + { + key: "tss_beantragt", + label: "TSS kontaktiert", + beschreibung: + "Du hast die Terminservicestelle (TSS) deiner Kassenärztlichen Vereinigung kontaktiert.", + }, + { + key: "eigensuche", + label: "Eigensuche läuft", + beschreibung: + "Du suchst parallel selbst nach Therapieplätzen und dokumentierst deine Kontaktversuche.", + }, + { + key: "antrag_gestellt", + label: "Kostenerstattung beantragt", + beschreibung: + "Du hast den Kostenerstattungsantrag bei deiner Krankenkasse eingereicht.", + }, +]; + +export const KANAL_LABELS: Record = { + telefon: "Telefon", + email: "E-Mail", + online_formular: "Online-Formular", + persoenlich: "Persönlich", +}; + +export const ERGEBNIS_LABELS: Record = { + keine_antwort: "Keine Antwort", + absage: "Absage", + warteliste: "Warteliste", + zusage: "Zusage", +}; + +export const THERAPIEFORM_LABELS: Record = { + verhaltenstherapie: "Verhaltenstherapie (VT)", + tiefenpsychologisch: "Tiefenpsychologisch fundierte PT (TP)", + analytisch: "Analytische Psychotherapie (AP)", + systemisch: "Systemische Therapie", +};