Accept 64-bit patient identifiers

This commit is contained in:
Angel Capetillo Zavala
2026-11-13 18:23:45 -06:00
parent 3b246b4f1f
commit 01d6e71f07
2 changed files with 2 additions and 1 deletions
@@ -28,6 +28,7 @@ describe('Identidad de un renglón', () => {
it('refuses a pac_id that is not a plain decimal string, without falling back to id_seudonimo', () => {
for (const malo of [42, '042', '-1', '4 2', '1e3', '', 'P-X', '12345678901234567890', {}]) expect(identidadDe({ pac_id: malo, id_seudonimo: 'P-X' })).toBeNull();
expect(identidadDe({ pac_id: '0' })?.id).toBe('0');
expect(identidadDe({ pac_id: '9223372036854775807' })?.id).toBe('9223372036854775807');
});
// Fails if a row with no identifier opens a record for nobody.