Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cda-laboratorios/controller/import-labs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ export async function importarDatos(paciente) {

let validado = true;
let hiv = false;
let hpv = false;

if (validado && details?.recordset) {
details.recordset.forEach(detail => {
validado = validado && (detail.profesional_val !== '');
hiv = hiv || /hiv|vih/i.test(detail.item);
});

hpv = hpv || /hpv|hpv/i.test(details.recordset[0].grupo);

const fecha = moment(lab.fecha, 'DD/MM/YYYY');

const profesional = {
Expand All @@ -94,6 +97,7 @@ export async function importarDatos(paciente) {
tipoPrestacion: '4241000179101',
paciente,
confidencialidad: hiv ? 'R' : 'N',
confidencialidadHPV: hpv,
profesional,
cie10: 'Z01.7',
file,
Expand Down