Skip to content

Commit

Permalink
feat(mapa-camas): agrega atributo esCensable al esquema de prestacion (
Browse files Browse the repository at this point in the history
…#1440)

* ref(in): agrega atributo esCensable al esquema de prestacion

permite que las internaciones censables se tengan en cuenta durante los censos

* ref(in): correcciones
  • Loading branch information
negro89 authored Jul 19, 2021
1 parent 5e0f9fe commit c0be1bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/rup/internacion/censo.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function realizarConteo(internaciones, unidadOrganizativa, timestampStart,
}
}

if (!ultimoMovimiento.esCensable) {
if (!ultimoMovimiento.esCensable && !(prestacion as any).ejecucion.registros[0].esCensable) {
return;
}
if (fechaEgreso) {
Expand Down
1 change: 0 additions & 1 deletion modules/rup/routes/prestacion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ router.patch('/prestaciones/:id', (req: Request, res, next) => {
if (req.body.solicitud) {
data.solicitud = req.body.solicitud;
}

if (req.body.paciente) {
data.paciente = req.body.paciente;
}
Expand Down
5 changes: 4 additions & 1 deletion modules/rup/schemas/prestacion.registro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ schema.add({
// Indica los id de otros registros dentro array 'registros' de la prestación
// O un conceptId si el registro está relacionado con un concepto (ej: un registro de "caries" con concepto "diente 18")
relacionadoCon: [mongoose.Schema.Types.Mixed],

esCensable: {
type: Boolean,
required: false
},
/**
* ID del ElementoRUP utilizado
*/
Expand Down

0 comments on commit c0be1bd

Please sign in to comment.