Skip to content

HUDS : Armar api o controladores para situaciones activas y antecedentes - #2267

Open
nicolasarana wants to merge 2 commits into
masterfrom
HUDS-203
Open

HUDS : Armar api o controladores para situaciones activas y antecedentes#2267
nicolasarana wants to merge 2 commits into
masterfrom
HUDS-203

Conversation

@nicolasarana

Copy link
Copy Markdown
Contributor

Requerimiento

HUDS-203

Funcionalidad desarrollada

  1. GET /:idPaciente/situacionesActivas
  2. GET /:idPaciente/antecedentesPersonales
  3. GET /:idPaciente/AntecedentesFamiliares
  4. Nuevo router
  5. Agregado campo virtual embarazoEnCurso que retorna true si no tiene fechaFinEmbarazo y la fecha de referencia (último control o creación) está dentro de los últimos 10 meses.

UserStories llegó a completarse

  • Si
  • No

Requiere actualizaciones en la base de datos

  • Si
  • No

@nicolasarana
nicolasarana requested review from a team as code owners June 30, 2026 13:07
@nicolasarana
nicolasarana force-pushed the HUDS-203 branch 2 times, most recently from 572c3ea to f238f6a Compare June 30, 2026 13:13
import * as moment from 'moment';

// SNOMED ECL para antecedentes familiares
const ECL_ANTECEDENTES_FAMILIARES = '<< 57177007';

@MCele MCele Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

esta query me parece debería obtenerse desde la BD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

gracias por la corrección

return null;
}

const expression = '<< 57177007';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

idem anterior

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

corregido

res.json(result);
}));

router.get('/:idPaciente/AntecedentesFamiliares', asyncHandler(async (req: any, res) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

compa, la ruta deberia respetar el lowerCamelCase, en este caso lo cambiaria a: /:idPaciente/antecedentesFamiliares

return null;
}

const eclQuery = await ECLQueries.findOne({ key: 'antecedentes_personales' });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seria necesario agregar el objeto en la coleccion de ECLQueries, para manejar las key, valor, etc...

return null;
}

const eclQuery = await ECLQueries.findOne({ key: 'antecedentes_familiares' });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Idem al comentario en linea 89

@Fabio-Ramirez

Copy link
Copy Markdown
Contributor

Compa, haciendo unas pruebas con la ruta de situacionesActivas, tengo un ejemplo q se trae trastornos q no estan activos:

Ruta de prueba: http://localhost:3002/api/modules/huds/58d91ba40bb1a96b254dc127/situacionesActivas

Entre otro la api devuelve este trastorno: {
"tipo": "trastorno",
"concepto": {
"term": "fiebre Q",
"fsn": "fiebre Q (trastorno)",
"conceptId": "186788009",
"semanticTag": "trastorno"
},
"fecha": "2025-10-08T10:45:00.027Z",
"profesional": {
"id": "6298f4cbe65ac510203cfaf2",
"nombre": "Agostina",
"apellido": "Lizzi",
"documento": "38812761"
},
"organizacion": {
"id": "59380153db8e90fe4602ec02",
"nombre": "SUBSECRETARIA DE SALUD"
},
"idPrestacion": "68e6407a0030461865fb4b56",
"tipoPrestacion": {
"conceptId": "5971000013106",
"term": "evolución médica",
"fsn": "evolución médica (procedimiento)",
"semanticTag": "procedimiento"
}
},

DOnde en la HUDS del paciente, se encuentra en estado "resuelto":
image

Otro ejemplo:

{
"tipo": "trastorno",
"concepto": {
"term": "bronquitis",
"fsn": "bronquitis (trastorno)",
"conceptId": "32398004",
"semanticTag": "trastorno"
},
"fecha": "2025-07-16T13:53:50.996Z",
"profesional": {
"id": "6179831aadc0572a15773037",
"nombre": "SILVINA ANALIA",
"apellido": "ROA",
"documento": "30093263"
},
"organizacion": {
"id": "59380153db8e90fe4602ec02",
"nombre": "SUBSECRETARIA DE SALUD"
},
"idPrestacion": "6877aefc486bda5a08514692",
"tipoPrestacion": {
"conceptId": "391000013108",
"term": "consulta de medicina general",
"fsn": "consulta de medicina general",
"semanticTag": "procedimiento",
"noNominalizada": false,
"id": "598ca8375adc68e2a0c121b8"
}
},
DOnde en la HUDS aparece como resuelto:
image

@Fabio-Ramirez Fabio-Ramirez added the changes requested Se solicitaron cambios label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Se solicitaron cambios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants