Skip to content

Commit

Permalink
feat(MPI): recupera financiador en paciente sin params
Browse files Browse the repository at this point in the history
  • Loading branch information
ma7payne committed Dec 16, 2024
1 parent ff92c6b commit 6479b8f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core-v2/mpi/paciente/paciente.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isSelected } from '@andes/core';
import { AndesDrive, FileMetadata } from '@andes/drive';
import { geoReferenciar, getBarrio } from '@andes/georeference';
import { Matching } from '@andes/match';
Expand All @@ -16,7 +15,6 @@ import { IPaciente, IPacienteDoc } from './paciente.interface';
import { PacienteCtr } from './paciente.routes';
import { Paciente, replaceChars } from './paciente.schema';


/**
* Crea un objeto paciente
*/
Expand Down Expand Up @@ -119,11 +117,8 @@ export async function findById(id: string | String | Types.ObjectId, options = n
}
const paciente = await queryFind;
if (paciente) {
if (isSelected(fields, 'financiador')) {
const financiador = await updateObraSocial(paciente);

paciente.financiador = financiador;
}
const financiador = await updateObraSocial(paciente);
paciente.financiador = financiador;
return paciente;
}
return null;
Expand Down

0 comments on commit 6479b8f

Please sign in to comment.