import { getPatient } from '../actions'; import { PatientForm } from '../components/patient-form'; import Link from 'next/link'; import { ChevronLeft } from 'lucide-react'; export default async function PatientDetailPage({ params, }: { params: Promise<{ id: string }>; }) { const { id } = await params; const patient = await getPatient(id); const name = patient.name?.[0]; const fullName = [ ...(name?.prefix || []), ...(name?.given || []), name?.family, ] .filter(Boolean) .join(' '); return (
{fullName} - ID: {patient.id}