Skip to content

Commit

Permalink
feat(MISC-259): API agregar índices a mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
aldoEMatamala committed Feb 2, 2024
1 parent 2ae8262 commit 02f809f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core-v2/mpi/paciente/paciente.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ PacienteSchema.plugin(mongoose_fuzzy_searching, {
});

PacienteSchema.index({ tokens: 1 });
PacienteSchema.index({
tokens: 1,
activo: 1,
});
PacienteSchema.index({ documento: 1, sexo: 1 });
PacienteSchema.index({ estado: 1, activo: 1, updateAt: 1 });

Expand Down
6 changes: 6 additions & 0 deletions modules/rup/internacion/censos.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@ export const CensoSchema = new mongoose.Schema({
}]
});

CensoSchema.index({
idOrganizacion: 1,
unidadOrganizativa: 1,
start: 1,
end: 1
});

export const Censo = mongoose.model('internacionCensos', CensoSchema, 'internacionCensos');
6 changes: 6 additions & 0 deletions modules/rup/schemas/prestacion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ PrestacionSchema.index({
'ejecucion.fecha': 1,
'solicitud.tipoPrestacion.conceptId': 1
});
PrestacionSchema.index({
'solicitud.ambitoOrigen': 1,
'solicitud.tipoPrestacion.conceptId': 1,
'ejecucion.registros.valor.InformeEgreso.fechaEgreso': 1,
'solicitud.organizacion.id': 1,
});
PrestacionSchema.index({
createdAt: 1,
'solicitud.organizacion.id': 1,
Expand Down

0 comments on commit 02f809f

Please sign in to comment.