Historia-Clinica-La-Rioja / historia_clinica_LR

Sistema de Historia Clínica del Ministerio de Salud de La Rioja
Other
7 stars 1 forks source link

Fix: questionnaires professional details' fetching #142

Closed RLRama closed 5 months ago

RLRama commented 5 months ago

Description

This pull request introduces the following 4 changes to the API:

  1. Change a variable name in the Errata request DTO to better reflect the parameter usage.
  2. Fix the population of the context hashmap being used to populate the HTML templates of the questionnaires, specially the healthcare professional name and their license number (used in the download as PDF endpoint).
  3. Fix the 'get all questionnaire responses' endpoint to properly expose the related healthcare professional's details.

Technical details

For the previously stated changes, specifically:

  1. The JSON request payload for the POST (create) errata endpoint now will look like this:
{
  "description": "string",
  "documentId": 0,
  "userId": 0
}

for further details of the errata feature, take a look at #113 and #121.

  1. The JSON response payload for the GET 'all questionnaire responses' endpoint now will look as follows (only changes the name of variables):
[
  {
    "id": 127,
    "statusId": 2,
    "createdByFullName": "CIANCI HUMBERTO PRIMO",
    "createdByLicenseNumber": "111",
    "updatedByFullName": "CIANCI HUMBERTO PRIMO",
    "updatedByLicenseNumber": "111",
    "questionnaireTypeId": 4,
    "questionnaireType": "Prueba de Desempeño Físico del Adulto Mayor",
    "deleted": false,
    "updatedOn": "2024-05-17T13:52:44.608Z",
    "createdOn": "2024-05-17T13:52:44.608Z"
  },
  ... (other response objects)
]

route and route parameters are left untouched.

Related issues

@Barbara-Alvarez

Related developers

@RodrigoCba96 @cquevedox

RodrigoCba96 commented 5 months ago

Perfect, Ramiro.

RLRama commented 5 months ago

Perfect, Ramiro.

Thank you cbum

RLRama commented 5 months ago

@RodrigoCba96 acá está el PR mostro: #91