import { useState } from "react"; import ClaimsRecentTable from "./claims-recent-table"; import { PatientTable } from "../patients/patient-table"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "../ui/card"; import { Patient } from "@repo/db/types"; interface ClaimsOfPatientModalProps { onNewClaim?: (patientId: number) => void; } export default function ClaimsOfPatientModal({ onNewClaim, }: ClaimsOfPatientModalProps) { const [selectedPatient, setSelectedPatient] = useState(null); const [isModalOpen, setIsModalOpen] = useState(false); const [claimsPage, setClaimsPage] = useState(1); const handleSelectPatient = (patient: Patient | null) => { if (patient) { setSelectedPatient(patient); setClaimsPage(1); setIsModalOpen(true); } else { setSelectedPatient(null); setIsModalOpen(false); } }; return (
{/* Claims Section */} {selectedPatient && ( Claims for {selectedPatient.firstName} {selectedPatient.lastName} Displaying recent claims for the selected patient. )} {/* Patients Section */} Patient Records Select any patient and View all their recent claims. Also create new claim for any patients.
); }