/lab-report

This repository contains a patient disease management app on web

Primary LanguageJavaScriptMIT LicenseMIT

Lab Report Management System

GitHub Issues GitHub License GitHub Pull Requests GitHub Forks GitHub Stars

| English | Turkish |

Explore the more documentation »

Project Overview

This project contains a web information management application to store, manage and present information about diseases of patients. It has report management system inside to manage diagnostic and pathologic reports. It includes a spring rest service and react web ui client.

Project Overview

Getting Started

Prerequisites

  • Java 17
  • Maven 3.8 (probably higher than 3.0 versions will work)
  • Docker Compose or Docker Desktop
    • ( compose 2.24, desktop 4.27 have bug that changes out of order. If you are encountering with this error update the docker)
  • 3000, 3307, 8080 ports must be available. If it isn't change the host ports with available one inside ./docker-compose.yml

Installation

  1. Clone the repo

    git clone https://github.com/kerimsenturk5734/lab-report
  2. Build the project with maven in root location

    mvn clean install
  3. Be sure that Docker Engine is running.

  4. Run following code in root location. It will take a while installing dependencies, please be patient.

    docker compose up
  5. After installation, you can check if the container is running by running below command in new terminal;

    docker ps
  6. Open the browser and locate to localhost:3000 (If you changed the default port, use updated port instead of 3000)

Project Details

System Context

Database

  • Entity Models

Entity Modesl

  • Report Folder Structure

Report Folder Structure

Swagger Documentatiton

You can access the API documentation at http://localhost:8080/swagger-ui/index.html. If you can't see the endpoints when you access the Swagger page, make sure that you typed /v3/api-docs in the search bar and click explore button.

We have an authorization mechanism on api. So different user types can perform different actions. We have four user types called ADMIN, PATIENT, LAB_TECHNICIAN and DOCTOR. If you want to access all endpoints you must log in as an ADMIN user.

Here there are some example users, you can use them to test api;

  • User Type - UserId - Password
    • ADMIN - 4561234 - A12345678b
    • DOCTOR - 1234567 - A12345678b
    • LAB_TECHNICIAN - 1234568 - A12345678b
    • PATIENT - 98765432109 - A12345678b
    • (Note that not every user can access all endpoints)

Follow the below instructions to login and test endpoints;

  • Select a user from above

  • Go to v1/api/users/login endpoint

    login-endpoint

  • Enter the userId and password as sampled on swagger

  • Execute the endpoint

  • You will get a response as sampled below

    login-credentials

  • Copy the key from response and paste to Authorize tab at top section of page

    authorize-btn authorize-key

  • If you want to use the JWT token key as Auhorization header, add 'Bearer' at starting;
    Authorization : Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOi

  • Now you are ready to test endpoints.

Built With

Spring Boot Maven Swagger
Java React JS TS


kersenturk57 kerim-%c5%9fent%c3%bcrk-784a3220a 16939669 kerimm_sntrk

(back to top)