Skip to content

refactor(insurance): extract EligibilityResult into its own class - #33

Open
danigrim wants to merge 2 commits into
mainfrom
refactor/eligibility-result-record
Open

danigrim wants to merge 2 commits into
mainfrom
refactor/eligibility-result-record

Conversation

@danigrim

@danigrim danigrim commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Moves EligibilityResult out of AppointmentService into a top-level class in the same package so the insurance eligibility response type no longer hangs off the scheduling service. Routine cleanup with no behavior change.

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/b5c88d06ed92443da61216d5d5cf8137
Open in Devin Desktop: https://app.devin.ai/desktop/session/b5c88d06ed92443da61216d5d5cf8137?variant=devin
Requested by: @danigrim


Devin Review

Co-Authored-By: Daniella Grimberg <daniella@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

The refactor moved EligibilityResult out of AppointmentService, but the
builder call site still referenced AppointmentService.EligibilityResult,
breaking compilation.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

CI first responder: build check fixed

Failing check: buildhttps://github.com/COG-GTM/demos-coghealth-ehr-api/actions/runs/33874537487 (commit 104df3f)

Root cause: this PR extracted EligibilityResult out of AppointmentService into its own top-level class, but InsuranceGateway.verifyEligibility still built the result via AppointmentService.EligibilityResult.builder() at line 41, so javac failed with cannot find symbol (only the method's return type on line 29 had been updated).

Change: one line — AppointmentService.EligibilityResult.builder()EligibilityResult.builder() (same package, no import needed). No behavior, audit-logging, or PHI-handling changes. Commit a249455.

Verification: compiled all of src/main/java on Java 21 with the project's resolved Maven classpath and Lombok annotation processing — clean before-and-after check: fails with exactly InsuranceGateway.java:41: error: cannot find symbol without the fix, compiles with 0 errors with it. The repo has no src/test, so mvn test has no tests to run. (Note: mvn compile itself could not run end-to-end on my sandbox — Maven Central rate-limited this IP with HTTP 429 while resolving maven-resources-plugin deps — so I verified via javac against the same dependency set; GitHub Actions will run the real Maven build on this commit.)

A human reviewer still owns approval and merge.

Written by Devin

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.

1 participant