import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "../../../components/ui/dialog.tsx"; import { Button } from "../../../components/ui/button.tsx"; import type { DiagnosticOrderQueueRow } from "../../../hooks/useDiagnosticOrderQueue.ts"; import { formatDateTime } from "../../../utils/dateUtils"; import { Identity } from "./QueueOrderDialogs.tsx"; // A tube refused at receipt rejects the specimen, not the order: this says why and what happens next. const RecollectionNeededDialog = ({ row, onClose }: { row?: DiagnosticOrderQueueRow; onClose: () => void }) => { if (!row) return null; const { reason, recorded } = row.rejection ?? {}; return ( { if (!open) onClose(); }}> Recollection needed

{"Specimen rejected: " + (reason ?? "no reason recorded")} {recorded ? {"Recorded " + formatDateTime(recorded)} : null}

The order stays open. Record receipt only when the replacement specimen arrives.

); }; export default RecollectionNeededDialog;