Feature/847#874
Conversation
There was a problem hiding this comment.
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.
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
left a comment
There was a problem hiding this comment.
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).
* 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>
|
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. |
|
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 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) |
|
Here: #877 |
There was a problem hiding this comment.
Hey @khawaja-abdullah I implemented suggested changes, please take a look when you can.
|
There was a problem hiding this comment.
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?



FeLVvaccine when we appliedTRICATand the pet is cat and is older than 16 moths and going out often is true