Skip to content

incorporate enhancements for extensibility#875

Merged
josdem merged 3 commits into
josdem:feature/847from
khawaja-abdullah:feature/847_enhancements
May 27, 2026
Merged

incorporate enhancements for extensibility#875
josdem merged 3 commits into
josdem:feature/847from
khawaja-abdullah:feature/847_enhancements

Conversation

@khawaja-abdullah

@khawaja-abdullah khawaja-abdullah commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Extension to #874

@khawaja-abdullah khawaja-abdullah requested a review from josdem May 26, 2026 23:06
@khawaja-abdullah khawaja-abdullah mentioned this pull request May 26, 2026
@khawaja-abdullah khawaja-abdullah changed the title enhancements proposed for extensibility incorporate enhancements for extensibility May 26, 2026

@josdem josdem left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi @khawaja-abdullah ; I like this solution, looks cleaner and easy to maintain, thanks for improving our code 👍

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 the vaccination “next vaccine” logic to support generating multiple follow-up vaccines from a single applied vaccine (notably TRICAT → TRICAT_BOOST and FeLV), and updates the associated unit tests accordingly.

Changes:

  • Refactored next-vaccine configuration to allow multiple next vaccines (with offsets) per applied vaccine.
  • Moved FeLV creation into validateNextVaccines flow and expanded criteria handling in isSpecificCriteriaSatisfiedForApplyingNextVaccine.
  • Updated/added tests for FeLV creation and non-creation scenarios.

Reviewed changes

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

File Description
src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java Refactors next-vaccine mapping to support multiple follow-ups (TRICAT → TRICAT_BOOST + FeLV) and updates criteria logic.
src/test/java/com/josdem/vetlog/helper/VaccinationHelperTest.kt Renames/adjusts tests and adds coverage for FeLV generation and suppression.

💡 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 Outdated
Comment thread src/main/java/com/josdem/vetlog/helper/VaccinationHelper.java Outdated
Comment on lines +115 to +121
} else if (TRICAT_VACCINE.equalsIgnoreCase(appliedName) && FELV_VACCINE.equalsIgnoreCase(nextName)) {
return Optional.ofNullable(pet)
.map(Pet::getBreed)
.map(Breed::getType)
.filter(PetType.CAT::equals)
.flatMap(type -> Optional.ofNullable(pet.getGoingOutOften()))
.orElse(false);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

As per my understanding there was no age restriction specified of in #847 or implemented in #847, but could you confirm @josdem? I will update accordingly.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes, however; do not worry, I asked copilot to address this for us, it did it here: #876

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@josdem josdem marked this pull request as ready for review May 27, 2026 13:00
@josdem josdem merged commit caf6119 into josdem:feature/847 May 27, 2026
josdem added a commit that referenced this pull request May 28, 2026
* #847 Adding logic to create FeLV vaccination record

* #847 Adding expected tests

* #847 Setting release version :)

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* incorporate enhancements for extensibility (#875)

* 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>

* Add 16-month age gate to FeLV eligibility after TRICAT (#876)

* 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>

* #847 Fixing tests

* #847 Applying suggestions

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Khawaja Abdullah Ansar <khawaja.abdullah.ansar@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

3 participants