diff --git a/ui/src/app/components/clinical-notes-table.tsx b/ui/src/app/components/clinical-notes-table.tsx index b336021..2582157 100644 --- a/ui/src/app/components/clinical-notes-table.tsx +++ b/ui/src/app/components/clinical-notes-table.tsx @@ -22,6 +22,11 @@ const ClinicalNotesTable: React.FC = ({ notes, patientI router.push(`/note/${patientId}/${noteId}`); }, [router, patientId]); + const formatEncounterId = (encounterId: string | number): string => { + const numericId = parseInt(encounterId.toString(), 10); + return numericId === -1 ? 'N/A' : numericId.toString(); + }; + return ( @@ -49,7 +54,7 @@ const ClinicalNotesTable: React.FC = ({ notes, patientI
- {note.encounter_id === '-1' ? 'N/A' : note.encounter_id} + {formatEncounterId(note.encounter_id)}