From 49073c01e003bc672e6b56bb484ce0a25721b277 Mon Sep 17 00:00:00 2001 From: MarianoCampetella Date: Wed, 13 May 2026 12:17:14 -0300 Subject: [PATCH] Filtrar laboratorios con HPV --- modules/cda/routes/cda.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/cda/routes/cda.ts b/modules/cda/routes/cda.ts index 6ce4749136..a32d1da39c 100644 --- a/modules/cda/routes/cda.ts +++ b/modules/cda/routes/cda.ts @@ -286,7 +286,10 @@ router.get('/paciente/:id', async (req: any, res, next) => { const paciente: any = await PacienteCtr.findById(pacienteID, {}); if (paciente) { - const list = await cdaCtr.searchByPatient(paciente.vinculos, prestacion, { skip: 0, limit: 100 }, organizacion); + let list = await cdaCtr.searchByPatient(paciente.vinculos, prestacion, { skip: 0, limit: 100 }, organizacion); + if (req.user.type === 'paciente-token') { + list = list.filter(item => !(item?.extras?.HPV === true)); + } return res.json(list); } } @@ -412,7 +415,6 @@ async function createCDA(req, res, next) { } } const cda = cdaCtr.generateCDA(uniqueId, confidencialidad, paciente, fecha, dataProfesional, organizacion, prestacion, cie10, texto, fileData); - const metadata = { paciente: paciente._id, prestacion, @@ -421,6 +423,7 @@ async function createCDA(req, res, next) { adjuntos, fecha, extras: { + HPV: req.body.confidencialidadHPV, id: idPrestacion, organizacion: organizacion._id }