Prenetics Platform is a multi-tenant platform that offers individual organisations such as clinics and hospitals to manage their customers and patients data and test results.
Here is a screenshot of the our patient management portal. It has a Patient Management page that allows an organisation administrator to view and search details about organisation’s patients. The Patient Management page should support organisation specific search across many organisations. For the purpose of this challenge, we have two organisations: Prenetics and Circle
Our technical stack is TypeScript on PERN (Postgres, Express, React, NodeJS). Our APIs follows JSON:API format.
As a prerequisite, you should follow the following instructions to set up and run the backend test service for the patient management portal locally
- Checkout https://github.com/Prenetics/prenetics-backend-assignment
- Read README.md and prepare your development environment
docker-compose up -d --build– This will build and set up swagger, postgres and service- Go to
http://localhost:9080/swagger/to interact with the APIs – the GET endpoint you would need to interact is “Get results of organisation”. This endpoint currently only returns mock data. This is the main endpoint for this exercise.
- Create a Patient Management page for organisation Prenetics to display and paginate test results (15 results per page). Display the following column
- patient name
- sample barcode
- activation date
- result date
- result value
- Implement search functionality for the Patient Management page by the following
- patient name
- sample barcode
- activation date
- result date
- For organisation Circle, the Patient Management page should view the following properties in addition to those from Question 1:
- result type (RT-PCR, Antigen, Antibody)
- patient ID
- For organisation Circle, the Patient Management page should also be able to search by patient ID.
- For each step, show how you test your changes.
The repository https://github.com/Prenetics/prenetics-backend-assignment contains the source code of the patient management service. It is designed to be run locally using Docker Compose (see README.md)
For this exercise, the function to be implemented is search.ts.
- Extend the service to allow paginating test results (15 results per page) such that the endpoint returns the following details
- patient name
- sample barcode
- activation date
- result date
- result value
- Extend the endpoint to search by the following:
- patient name
- sample barcode
- activation date
- result date
- Extend the endpoint to allow another organisation to return the following extra fields about their result:
- result type (RT-PCR, Antigen, Antibody)
- patient ID
- Extend the endpoint to search by patient ID.
- For each step, show how you test your changes.
