-
Notifications
You must be signed in to change notification settings - Fork 12
CIT: Modificar API y APP p/solicitud telemedicina #2162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
5656f0a to
1c96518
Compare
|
|
||
| if (!req.query.teleConsulta) { | ||
| const conceptosTurneables: any = await tipoPrestacion.find({ teleConsulta: true }); | ||
| const conceptId = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esta parte se podría resolver con un map y quedaría mas legible:
| const conceptId = []; | |
| const conceptIdArray = conceptosTurneables?.map(ct => ct.conceptId); | |
| query.where('tipoPrestaciones.conceptId').nin(conceptIdArray); |
Sugiero tambien renombrarlo "conceptIdArray" o algo similar, ya que "conceptId" es un atributo propio de todos los conceptos snomed
negro89
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Juancho, dejé algunas dudas y/u observaciones. Cualquier cosita consultame 👌🏼
| } | ||
|
|
||
| query.exec((err, data) => { | ||
| await query.exec((err, data) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acá si vamos a awaitear deberíamos eliminar callbacks (una u otra):
| await query.exec((err, data) => { | |
| try { | |
| const data = await query.exec(); | |
| res.json(data); | |
| } catch (err) { | |
| return next(err); | |
| } |
| const tipoPrestacion = Auth.getPermissions(req, 'visualizacionInformacion:dashboard:citas:tipoPrestacion:?'); | ||
| if (tipoPrestacion.length > 0 && tipoPrestacion[0] !== '*') { | ||
| permisos.tipoPrestacion = tipoPrestacion; | ||
| const tipo_Prestacion = Auth.getPermissions(req, 'visualizacionInformacion:dashboard:citas:tipoPrestacion:?'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Por qué el renombre de tipoPrestacion?
Requerimiento
https://proyectos.andes.gob.ar/browse/CIT-395
Funcionalidad desarrollada
UserStories llegó a completarse
Requiere actualizaciones en la base de datos