Skip to content

Commit

Permalink
Merge pull request #30 from LabGraphTeam/feature/westgard_multi-rules
Browse files Browse the repository at this point in the history
Feature/westgard multi rules
  • Loading branch information
LeonardoMeireles55 authored Jan 24, 2025
2 parents afef8ed + 49c54f7 commit c1ce350
Show file tree
Hide file tree
Showing 66 changed files with 2,394 additions and 2,082 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Docker Image CI/CD

on:
push:
branches: ['master']
branches: [ 'master' ]
# pull_request:
# branches: ['master']

jobs:
build:
runs-on: [self-hosted, linux, x64, backend]
runs-on: [ self-hosted, linux, x64, backend ]

steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +29,7 @@ jobs:
docker-compose -f docker-compose.build.yml push
deploy:
runs-on: [self-hosted, linux, x64, backend]
runs-on: [ self-hosted, linux, x64, backend ]
needs: build
environment: production

Expand All @@ -52,6 +52,7 @@ jobs:
API_SECURITY_TOKEN_SECRET: ${{ secrets.API_SECURITY_TOKEN_SECRET }}
SPRING_MAIL_USERNAME: ${{ secrets.SPRING_MAIL_USERNAME }}
SPRING_MAIL_PASSWORD: ${{ secrets.SPRING_MAIL_PASSWORD }}
EMAIL_TO_SEND_LIST: ${{ secrets.EMAIL_TO_SEND_LIST }}
run: |
docker-compose pull
docker-compose up -d
Expand Down
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# QualityLab Pro-API RESTful for internal laboratory quality control.

[![Docker Image CI/CD](https://github.com/LabGraphTeam/LabGraph-Back-End/actions/workflows/docker-image.yml/badge.svg?branch=master)](https://github.com/LabGraphTeam/LabGraph-Back-End/actions/workflows/docker-image.yml)
<p align="center">
<img src="https://img.shields.io/static/v1?label=STATUS&message=In%20progress&color=RED&style=for-the-badge" alt="Em desenvolvimento"/>
Expand All @@ -14,12 +15,18 @@
![Git](https://img.shields.io/badge/git-%23F05033.svg?style=for-the-badge&logo=git&logoColor=white)

## Description
The RESTful API for Laboratory Internal Quality Control is designed to assist clinical and research laboratories in monitoring and controlling the quality of their processes. This API provides endpoints to manage information related to control standards, test results, statistical analyses, and other activities essential for ensuring the accuracy and reliability of laboratory data.

The RESTful API for Laboratory Internal Quality Control is designed to assist clinical and research laboratories in
monitoring and controlling the quality of their processes. This API provides endpoints to manage information related to
control standards, test results, statistical analyses, and other activities essential for ensuring the accuracy and
reliability of laboratory data.

## Implemented functionalities

The API efficiently manages package insert values and test values, offering simple and intuitive CRUD operations.

## Project Structure

```
.
├── .github/workflows # GitHub Actions workflow configurations
Expand Down Expand Up @@ -50,6 +57,7 @@ The API efficiently manages package insert values and test values, offering simp
```

### Key Components:

- `configs/`: Configuration classes for security, documentation, and more
- `controllers/`: REST API endpoints organized by domain
- `services/`: Business logic implementations
Expand All @@ -71,6 +79,7 @@ This project uses GitHub Actions for automated testing and deployment. Our CI/CD
You can view the workflow configurations in the `.github/workflows` directory.

## Requirements

* [Java 21](https://www.oracle.com/br/java/technologies/javase/jdk21-archive-downloads.html)
* [Maven](https://maven.apache.org/)
* [Docker](https://www.docker.com/get-started/)
Expand All @@ -79,71 +88,89 @@ You can view the workflow configurations in the `.github/workflows` directory.
## Installation

#### Step 1. Clone the repository

Run the command below in Git Bash or Terminal to clone the repository:

```
git clone https://github.com/LeonardoMeireles55/QualityLabPro.git
```

#### Step 2. Running with docker-compose

In the project root directory, run the command:

```
docker-compose up or docker compose up
```

## Usage

#### Step 3. Access API documentation

```
http://localhost:8080/swagger-ui.html
```

## Running Tests

### With Maven

To run tests with detailed output:

```bash
./mvnw test -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
```

For even more detailed test output:

```bash
./mvnw test -X
```

### With Docker

When running with docker-compose, you can view test output in real-time:

```bash
docker-compose logs -f app
```

To see test execution during build:

```bash
docker-compose up --build --force-recreate
```

## Services

### CoagulationAnalyticsService

Handles analytics related to coagulation tests.

### BiochemistryAnalyticsService

Handles analytics related to biochemistry tests.

### HematologyAnalyticsService

Handles analytics related to hematology tests.

## Controllers

### CoagulationAnalyticsController

Manages endpoints for coagulation analytics.

### BiochemistryAnalyticsController

Manages endpoints for biochemistry analytics.

### HematologyAnalyticsController

Manages endpoints for hematology analytics.

## React Recharts.js Front-end

<img width="1470" alt="Screenshot 2024-12-06 at 18 01 35" src="https://github.com/user-attachments/assets/4fca9580-c012-48ef-a3d7-bf264593ccf2">

## Contributing
Expand All @@ -157,9 +184,11 @@ Manages endpoints for hematology analytics.

## License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the [LICENSE](LICENSE) file for details.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the [LICENSE](LICENSE) file for
details.

The GPL-3.0 ensures that:

- The software remains open source
- Any modifications or derived works must also be released under GPL-3.0
- Source code must be made available when distributing the software
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
quality-lab-pro:
restart: on-failure
build:
context: ./
context: ./
dockerfile: Dockerfile
working_dir: /usr/src/app
container_name: quality-lab-pro
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ services:
API_SECURITY_ISSUER: ${API_SECURITY_ISSUER}
SPRING_MAIL_USERNAME: ${SPRING_MAIL_USERNAME}
SPRING_MAIL_PASSWORD: ${SPRING_MAIL_PASSWORD}
command: ["java", "-jar", "-Dspring.profiles.active=prod", "app.jar"]
EMAIL_TO_SEND_LIST: ${EMAIL_TO_SEND_LIST}
command: [ "java", "-jar", "-Dspring.profiles.active=prod", "app.jar" ]
networks:
- qualitylab-net

nginx:
restart: always
image: nginx:latest
Expand Down
Loading

0 comments on commit c1ce350

Please sign in to comment.