import { Patient } from "fhir/r4"; import { ArrowLeft, ExternalLink, LoaderCircle } from "lucide-react"; import PatientProfileCard from "../../../components/PatientProfileCard/PatientProfileCard"; import { Button } from "../../../components/ui/button.tsx"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../../../components/ui/dialog.tsx"; import { formatFhirHumanName } from "../../../utils/fhirHumanName.tsx"; interface ReceptionistPatientQuickViewDialogProps { open: boolean; patient?: Patient; loading: boolean; error?: string; onOpenChange: (open: boolean) => void; onBack: () => void; onViewFullProfile: () => void; } export default function ReceptionistPatientQuickViewDialog({ open, patient, loading, error, onOpenChange, onBack, onViewFullProfile, }: ReceptionistPatientQuickViewDialogProps) { const patientName = patient ? formatFhirHumanName(patient.name, { emptyText: "Patient" }) : "Patient"; return (
Patient Quick View {patientName}
{loading ? (
Loading patient profile…
) : error ? (
{error}
) : patient ? ( ) : (
Patient profile is unavailable.
)}
); }