Files
HealthLog/src/components/documents/document-kind-meta.ts
T
Marc-André Bombeck 1564e7c396 Add the sick note document kind
A certificate of incapacity for work (in Germany the
Arbeitsunfähigkeitsbescheinigung) is now its own document kind,
SICK_NOTE, instead of Other. The enum value rides migration 0370.

Uploads, edits, the kind filter, bulk edits, the import script and the
backup format accept it; the vault files it with a thermometer glyph
between prescriptions and referrals; the filing suggestion can propose
it and names the words a sick note carries. The extraction's own kind
field keeps its three values.
2026-10-03 21:40:01 +02:00

52 lines
1.2 KiB
TypeScript

/**
* The vault's kind vocabulary: one Lucide glyph per document kind, in the
* fixed display order the type-chip rail and the cards share. Icons are
* passed as components — the consuming primitive owns size and colour per
* the design standards.
*/
import type { ComponentType } from "react";
import {
ArrowRightLeft,
File,
FileText,
FlaskConical,
Pill,
ScanLine,
ShieldCheck,
Stethoscope,
Syringe,
Thermometer,
} from "lucide-react";
import type { InboundDocumentKindValue } from "@/lib/validations/inbound-documents";
/** Display order for the type-chip rail (everyday kinds first, OTHER last). */
export const DOCUMENT_KIND_ORDER: readonly InboundDocumentKindValue[] = [
"DOCTOR_REPORT",
"LAB_RESULT",
"IMAGING",
"DISCHARGE_LETTER",
"PRESCRIPTION",
"SICK_NOTE",
"REFERRAL",
"VACCINATION",
"INSURANCE",
"OTHER",
];
export const DOCUMENT_KIND_ICONS: Record<
InboundDocumentKindValue,
ComponentType<{ className?: string }>
> = {
DOCTOR_REPORT: Stethoscope,
DISCHARGE_LETTER: FileText,
LAB_RESULT: FlaskConical,
IMAGING: ScanLine,
PRESCRIPTION: Pill,
REFERRAL: ArrowRightLeft,
INSURANCE: ShieldCheck,
VACCINATION: Syringe,
SICK_NOTE: Thermometer,
OTHER: File,
};