""" Case Sheet API — Domain-agnostic case indexing & transfer tracking ================================================================== Spreadsheet-style registry for cases by status. Works with any tool (surgio, clinica, labo, …) via `tool_slug`. Routes: GET /apps/transfert/data → HTMX
{len(rows)} cas — partagé publiquement
" "| Réf. | Patient | CIN | Âge | " "Sexe | Diagnostic | Indication | C.A.T | " "Raison | Destination | Statut | Date | " "
|---|---|---|---|---|---|---|---|---|---|---|---|
{htmllib.escape(r.get("case_ref",""))} | '
f'{htmllib.escape(r.get("patient_name",""))} | ' f'{htmllib.escape(r.get("cin",""))} | '
f'{htmllib.escape(r.get("age",""))} | ' f'{"♂" if r.get("gender")=="M" else "♀"} | ' f'{htmllib.escape(r.get("diagnosis",""))} | ' f'{htmllib.escape(r.get("indication",""))} | ' f'{htmllib.escape(r.get("management",""))} | ' f'{htmllib.escape(r.get("transfer_reason",""))} | ' f'{htmllib.escape(r.get("destination",""))} | ' f'' f'{sm["label_fr"]} | ' f'{r.get("created_at","")[:10]} | ' f"