As a doctor, I want the back-end to send patients data to the front-end, so that so that they can be visualised using graphs for inspection.
Acceptance Criteria
[x] There shall be a GET endpoint for each data category
[x] The endpoints shall have api/v1/patients/:id/<data_category>as their route string. Note that even though we do not have a database and different patients, we still use some dummy id for compatibility for future changes where there will be different patients with different ids. you may use 1 as the id for now.
[x] The endpoints shall be implemented in their own file and not in server.js
[x] The patient data is saved in .json files. This .json file shall be sent as a response
[x] There shall be postman requests written for each endpoint that verify that the functionality work
[x] The code shall use proper error-handling and send the right status code with the right message upon errors
User Story
As a doctor,
I want the back-end to send patients data to the front-end,
so that so that they can be visualised using graphs for inspection.
Acceptance Criteria
GET
endpoint for each data categoryapi/v1/patients/:id/<data_category>
as their route string. Note that even though we do not have a database and different patients, we still use some dummy id for compatibility for future changes where there will be different patients with different ids. you may use1
as the id for now.server.js
.json
files. This.json
file shall be sent as a responseNotes