This project consists of two main parts: a backend server built with Spring Boot and Java 21, and a frontend application built with React.
Make sure you have the following installed on your machine:
- Java Development Kit (JDK) 21
- Node.js
- npm (comes with Node.js)
- Maven (for building the Spring Boot project)
-
Ongoing Study: I assumed that "ongoing study" in the requirment document refers to studies with a "Recruiting" status.
-
Linking Patients to Studies: I've decided to use the integer part of
PatientId
column in thePatients
table as a foreign key, which represents theStudyId
in theStudies
table and is diplayed as StudyId in the Patients Table on the front-end. This allows multiple patients to be linked to the same study. -
Unique Identifier for Patients: I've added a unique identifier for each patient called
PatientId
. This provides a unique reference for each patient record in thePatients
table.
-
Clone the repository:
git clone https://github.com/sheikh-saqib/clinical-research-web-app.git
-
Navigate to the project directory:
cd clinical-research-web-app
-
Navigate to the backend directory:
cd API
-
Build the backend application:
mvnw clean install
-
Run the backend application:
mvnw spring-boot:run
The backend server should now be running on
http://localhost:8080
.
-
Navigate to the frontend directory:
cd client
-
Install the dependencies:
npm install
-
Run the frontend tests:
npm test
-
Run the frontend application:
npm start
The frontend application should now be running on
http://localhost:3000
.
You can import the provided Postman API collection to interact with the backend API endpoints. The collection includes requests for managing studies and patients, such as creating, reading, updating, and deleting records.
The results are also in the provided link.