EasyPatient / Backend-Java-EasyPatient

Java Backend for easypatient project
0 stars 1 forks source link

[hotfix/BD-009] Poprawa bugów #22

Open rafalkrol100 opened 3 years ago

rafalkrol100 commented 2 years ago
  1. Bug room numbers less than 0
    • steps to reproduce: endpoints: PUT /api/v1/room/{id} POST /api/v1/room
    • expected behaviour no possibility to set room number as a number lesser than 0
    • actual behaviour set -4 response: 200OK

done, when trying to create or update a room to have such number we get 500error with message: Cannot create a room with number that is less than 0

rafalkrol100 commented 2 years ago
  1. Bug room getByVariables doesnt work
    • steps to reproduce: endpoints: Get /api/v1/room/getByVariables
    • expected behaviour edit data
    • actual behaviour response 500 (bad sql)

done, list of returned parameters was not compatible with returned DTO in java method

rafalkrol100 commented 2 years ago
  1. Bug patients can be placed in one bed
    • steps to reproduce: endpoints: POST /api/v1/patient PUT /api/v1/patient/{id}
    • expected behaviour when adding patient with bedId the same as the other patient it cannot be done
    • actual behaviour no validation

done, schema changed so the bedId value is unique

rafalkrol100 commented 2 years ago
  1. Bug patients can have age less than 0
    • steps to reproduce: endpoints: POST /api/v1/patient PUT /api/v1/patient/{id}
    • expected behaviour when adding patient with age less than 0 it can not be acomplished
    • actual behaviour no validation

done, throwing exception with message Can not add patient with age less than 0.

rafalkrol100 commented 2 years ago
  1. Bug bed put doesnt work
    • steps to reproduce: endpoints: PUT /api/v1/bed
    • expected behaviour put
    • actual behaviour bug

done, fixed sql

rafalkrol100 commented 2 years ago
  1. Bug staff getByVar doesnt work
    • steps to reproduce: endpoints: get /api/v1/staff/getByVar
    • expected behaviour get
    • actual behaviour bug

done, fixed sql

rafalkrol100 commented 2 years ago
  1. Bug staffPatient post allows to create multiple records with the same id set
    • steps to reproduce: endpoints: POST /api/v1/staffPatient
    • expected behaviour exception while attemting to make the second record with the same ids
    • actual behaviour lack of validation

done, added additional query while creating a tuple which leads to sql exception

rafalkrol100 commented 2 years ago
  1. Bug staffPatient get endpoints for ids dont work
    • steps to reproduce: endpoints: GET /api/v1/staffPatient/{patientId} GET /api/v1/staffPatient/{staffId}
    • expected behaviour can query with ids
    • actual behaviour exception code 500

done, changed paths so both query have no amiguous paths

rafalkrol100 commented 2 years ago
  1. Bug get by vars dont work
    • steps to reproduce: endpoints: GET /api/v1/*/getByVar
    • expected behaviour can query
    • actual behaviour exception bad sql

staff done smartband done room done patient done medicaments done bed done smartbanddata done

rafalkrol100 commented 2 years ago
  1. Querys dont work properly with time fields (also add fields created after instead of created at in getByVar querys)
    • steps to reproduce: endpoints: GET /api/v1/*/getByVariables?createdAt=2021-12-12T12%3A20%3A39.286Z
    • expected behaviour can query and can set created after
    • actual behaviour error code 400 you can only query for a specific timestamp

added formatter and changed sql querys to obtain functionality of records after timestapm instewad of precise timestamp