Skip to content

Feature/847#874

Merged
josdem merged 9 commits into
mainfrom
feature/847
May 28, 2026
Merged

Feature/847#874
josdem merged 9 commits into
mainfrom
feature/847

Conversation

@josdem

@josdem josdem commented May 26, 2026

Copy link
Copy Markdown
Owner
  • Adding create FeLV vaccine when we applied TRICAT and the pet is cat and is older than 16 moths and going out often is true
  • Adding required tests
  • Setting release version 🎉

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends vaccination scheduling logic to add FeLV (feline leukemia) follow-up creation for eligible cats when scheduling Rabies, and updates/extends unit tests accordingly.

Changes:

  • Add FeLV vaccine constant and conditional scheduling in VaccinationHelper.validateRabiesVaccine.
  • Add tests for TRICAT_BOOST-triggered Rabies scheduling and for FeLV vaccine creation.
  • Bump project version to 3.7.0.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java Adds FeLV scheduling logic and a helper method to determine FeLV eligibility.
src/test/java/com/josdem/vetlog/helper/VaccinationHelperTest.kt Updates one test name and adds new tests covering Rabies scheduling after TRICAT_BOOST and FeLV creation.
build.gradle.kts Updates the project version number.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java
Comment thread src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java Outdated
Comment thread src/test/java/com/josdem/vetlog/helper/VaccinationHelperTest.kt Outdated
josdem and others added 2 commits May 26, 2026 16:00
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@khawaja-abdullah khawaja-abdullah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @josdem, while the solution looks solid all in all, however, I notice that we have tied FeLV creation in next Rabies vaccination validation path (which is handled differently right now from the others). May I request you to please check out this draft PR where I have proposed enhancements that can be incorporated to extend the existing next vaccinations validation flow such that applying one (TRICAT in this case) can create multiple new if criteria is satisfied (TRICAT_BOOST and FeLV in this case).

khawaja-abdullah and others added 3 commits May 27, 2026 07:00
* enhancements proposed for extensibility

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* address review feedback

---------

Co-authored-by: Jose Morales <joseluis.delacruz@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Initial plan

* fix: require age check for FeLV eligibility

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jose Morales <joseluis.delacruz@gmail.com>
@josdem josdem requested a review from khawaja-abdullah May 27, 2026 13:25
@josdem

josdem commented May 27, 2026

Copy link
Copy Markdown
Owner Author

Hey @khawaja-abdullah ; I merged required changes from the hot-fix branches and this PR is ready for review, please take a look when you can.

@josdem

josdem commented May 27, 2026

Copy link
Copy Markdown
Owner Author

I did some testing , and seems like the scenario when a pet is a cat, and going out often is true and the cat is between 9 and 16 weeks old is creating a FeLV, this is not expected, however let's merge it as it is and let's create a bug instead for the sake of not spending more time in this PR, thanks!

mysql> select id, name, birth_date , date_created, breed_id, status, adopter_id , user_id, pet_id, going_out_often from pet;
+----+---------+------------+---------------------+----------+--------+------------+---------+--------+-----------------+
| id | name    | birth_date | date_created        | breed_id | status | adopter_id | user_id | pet_id | going_out_often |
+----+---------+------------+---------------------+----------+--------+------------+---------+--------+-----------------+
|  2 | Mirinda | 2026-03-04 | 2026-05-23 17:35:47 |       41 | OWNED  |       NULL |       4 |   NULL |               1 |
+----+---------+------------+---------------------+----------+--------+------------+---------+--------+-----------------+

mysql> select id, date, name, status, pet_id from vaccination where pet_id=2 order by date;
+-----+------------+--------------+---------+--------+
| id  | date       | name         | status  | pet_id |
+-----+------------+--------------+---------+--------+
|   2 | 2026-05-23 | Deworming    | PENDING |      2 |
|   1 | 2026-05-27 | TRICAT       | APPLIED |      2 |
| 134 | 2026-06-17 | FeLV         | NEW     |      2 |
| 135 | 2026-06-17 | TRICAT_BOOST | NEW     |      2 |
+-----+------------+--------------+---------+--------+
4 rows in set (0.00 sec)

@josdem

josdem commented May 27, 2026

Copy link
Copy Markdown
Owner Author

Here: #877

Comment thread src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java Outdated
Comment thread src/test/java/com/josdem/vetlog/helper/VaccinationHelperTest.kt

@josdem josdem left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @khawaja-abdullah I implemented suggested changes, please take a look when you can.

@josdem josdem requested a review from khawaja-abdullah May 27, 2026 23:43
@sonarqubecloud

Copy link
Copy Markdown

@khawaja-abdullah khawaja-abdullah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @josdem thanks for incorporating the suggestions, really appreciate it! I notice that we have incorporated FeLV creation in next Rabies vaccine validation path. While it works, the criteria is not tightened around pet's breed or age or whether they are going out often - while also being dependent on rabies to have been applied. It may cause unwanted FeLV creation for other pet types or when specific criteria is not being satisfied.

I have implemented an alternate approach (with some minor tweaks) for next vaccine validation path in #878; could you please take a look at it when you get the chance and if looks good, make it a part of this PR?

@khawaja-abdullah khawaja-abdullah self-requested a review May 28, 2026 07:26
@josdem josdem merged commit 83a37c3 into main May 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants