Skip to content

Conversation

@ma7payne
Copy link
Contributor

@ma7payne ma7payne commented May 6, 2025

Requerimiento

https://proyectos.andes.gob.ar/browse/HUDS-146

Funcionalidad desarrollada

  1. Recorre periodicamente el listado de recetas que tienen información en appNotificadas sin dispesa y actualizar el estado de cada medicamento recetado.

UserStories llegó a completarse

  • Si
  • No

Requiere actualizaciones en la base de datos

  • Si
  • No

Requiere actualizaciones en otro repositorio

@ma7payne ma7payne requested review from a team as code owners May 6, 2025 17:18
@ma7payne ma7payne requested review from MCele and negro89 May 6, 2025 17:18
@github-actions github-actions bot added the has_conflicts Tiene conlfictos label May 6, 2025
@ma7payne ma7payne removed the has_conflicts Tiene conlfictos label May 16, 2025
@github-actions github-actions bot added the has_conflicts Tiene conlfictos label Jun 3, 2025
@MCele MCele added the receta label Jun 11, 2025
@ma7payne ma7payne removed the has_conflicts Tiene conlfictos label Jun 17, 2025
@ma7payne ma7payne force-pushed the HUDS-146 branch 2 times, most recently from 89b3d6a to 5bf1280 Compare June 17, 2025 18:00
Copy link
Contributor

@negro89 negro89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En lineas generales muy bien, pero sugiero un par de mejoras

Comment on lines 13 to 14
const pacienteId = receta.paciente.id;
const recetaDisp = await getReceta(Types.ObjectId(receta.id), pacienteId, sistema);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por algun motivo este get falla bastante pasandole el id del paciente como bson. Dejo sugerencia que corrigió todas las ocurrencias:

Suggested change
const pacienteId = receta.paciente.id;
const recetaDisp = await getReceta(Types.ObjectId(receta.id), pacienteId, sistema);
const pacienteId = receta.paciente.id.toString();
const recetaDisp = await getReceta(Types.ObjectId(receta.id), Types.ObjectId(pacienteId), sistema);

dispensadas: 0,
sinDispensa: 0,
enUso: 0, // Recetas que están en uso y no se pueden actualizar
errores: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregaría un contador mas a modo de control: errorConsultandoEstado: 0 para en la linea 45 (cuando no se cumple resultado.success) sumar un else aumentando este contador:

Suggested change
errores: 0
if (resultado.success) {
.
.
.
} else {
resultados.errorConsultandoEstado++;
}

@github-actions github-actions bot added the has_conflicts Tiene conlfictos label Aug 22, 2025
@github-actions github-actions bot removed the has_conflicts Tiene conlfictos label Sep 3, 2025
@MCele MCele changed the title HUDS - Implementa job para actualizar estados de dispensa Receta - Implementa job para actualizar estados de dispensa Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants