Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update veteran status determination, VIC eligibility #1536

Merged
merged 6 commits into from
Nov 16, 2017

Conversation

patrickvinograd
Copy link
Contributor

No description provided.

Copy link
Contributor

@kreek kreek left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 one minor comment

@@ -110,9 +111,12 @@ def can_prefill_emis?
beta_enabled?(uuid, FormProfile::EMIS_PREFILL_KEY)
end

ID_CARD_ALLOWED_STATUSES = %w(V1 V3 V6).freeze

def can_access_id_card?
Copy link
Contributor

Choose a reason for hiding this comment

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

Not specifically aimed at this PR 😄 but the User model's getting pretty hefty. Once we have policy files for authorization all the can_x? logic can move there. Maybe move ID_CARD_ALLOWED_STATUSES so all the constants are at the top of the class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed about the can_xyz methods getting crufty.

Will move the constant.

@va-bot va-bot temporarily deployed to pv-is-veteran-title38/master November 16, 2017 18:17 Inactive
def can_access_id_card?
beta_enabled?(uuid, 'veteran_id_card') && loa3? && edipi.present? && veteran?
rescue # Default to false for any veteran_status error
beta_enabled?(uuid, 'veteran_id_card') && loa3? && edipi.present? &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Performance NITPICK, possibly do the loa3? check before beta_enabled? check to avoid making a db call if not necessary. Maybe even edipi since MVI is going to get fetched one way or the other if loa3.

@@ -111,8 +115,9 @@ def can_prefill_emis?
end

def can_access_id_card?
beta_enabled?(uuid, 'veteran_id_card') && loa3? && edipi.present? && veteran?
rescue # Default to false for any veteran_status error
beta_enabled?(uuid, 'veteran_id_card') && loa3? && edipi.present? &&
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why my comment got suppressed.

Performance NITPICK:

loa3? && edipi.present? && beta_enabled?(uuid, 'veteran_id_card') &&

will avoid invoking a database call unless necessary. LOA3 users will always fetch EDIPI one way or the other as part of users profile, and future hits will be a redis cache hit. Whereas for LOA1 you'd effectively be hitting the database first, every time.

@patrickvinograd patrickvinograd merged commit 088b555 into master Nov 16, 2017
@patrickvinograd patrickvinograd deleted the pv-is-veteran-title38 branch November 16, 2017 20:29
tsr-rise8 pushed a commit that referenced this pull request Dec 11, 2023
* getting started with emis

* make emis work for veteran status

* handle errors, refactor services, make all services

* Add Josh to EDU Daily stats mailer

* fixes the issue with vets-api not passing through params (#917)

* Add Claim IDs to the logs so we can track them down more quickly if needed

* Update vets json schema (#914)

* update vets json schema

* add previous benefits va file number to 5490 spool

* Evss failed upload job (#919)

* add aws gem

* add failed claims report and mailer

* job will send email

* add entry in sidekiq scheduler

* report mailer spec

* lint

* failed claims report spec

* lint

* Update vets json schema (#922)

* update json schema

* fix 5495 spec

* add training end date 5495

* Route EDU claims based on the school being applied to and applicant address

* Route EDU claims based on disbursement location, then vet location

* Update edu benefits api documentation (#925)

* Update edu-benefits.md

* Update edu-benefits.md

* Update Routing for the 1995 and 5495

* Swagger documentation (#910)

* Swagger documentation

* subclass the controller correctly

* and now the actual correct class

* no auth for api docs

* add the rest of the responses

* bunch of emis fixes

* finalize emis

* remove unused module

* refactor SSL configs for SOAP configurations

* remove cruft

* fix coverage

* no more openstruct

* add tests for error conditions

Verify veteran status (#992)

* extracted response caching to CacheAside concern

* adding veteran status delegate (eMIS veteran status) to user

* updated user serializer to return veteran status

rerun tests

Update veteran status determination, VIC eligibility (#1536)

* Updated veteran eligibility logic and corresponding ID card changes

Military service episodes may have a nil end date. Treat as ending in (#1567)

future for sorting purposes.

VCR cassette reflecting a collection of multiple service episodes

An episode is inside of an `militaryServiceEpisode` element.

Sibling `militaryServiceEpisode` elements reflect a collection of these episodes.  Meaning, nothing is nested in an array, etc., to illustrate a collection.

Siblings of this `militaryServiceEpisode` type indicate a collection of them.

And if there is just one `militaryServiceEpisode`, then the collection contains only one episode.

Add reserves guard to prefill (#2108)

* Add retrieving reserves information to military_information model

* Add reserves/guard date period to 526ez prefill

Update vets-json-schema version (#2937)

Correct gemfile (#3239)

* revert changes to Gemfile.lock #3200

* don't change bundler version

Create v2 of eMIS payment service to get pay grade history data (#3499)

* Create v2 of eMIS payment service to get pay grade history data
* Change settings file to split apart payment service v1 and v2 config

Upgrade eMIS Military Information Service to v2 (#3590)

* Create eMIS Military Information Service V2

* Create tests for Military Information Service V2

* Create v2 response and model

* Test v2 response

* Add version to service_name for breakers

* Fix casettes

* Add attribute expectations

* Update response v2 file name

* Add ability to use v2 response to eMIS services

* Extract get_endpoint_attributes method

Create Veteran Confirmation /status endpoint (#3676)

* Add the implementation for an endpoint in the Veteran Confirmation API which queries MVI and eMIS with passed in attributes to return veteran status

Co-authored-by: Katherine Rodriguez <edmkitty@users.noreply.github.com>

Add deployments method to MilitaryInformationServiceV2 (#4014)

* Add deployment method to MilitaryInformationServiceV2 to retrieve pay grade information

* Added more detailed deployment expects

* Fixed spacing lint issue.

Co-authored-by: drown-va <derek.brown5@va.gov>

Update to Concatenate Pay Plan and Pay Grade (#4054)

* Update to Concatenate Pay Plan and Pay Grade

* Added null & blank checking.

* Added unit testing.

* Removed unnecessary return statements

* Fixed lint issue

* Corrected spec schemas expected json

* Added missing pay plan unit test.

* Corrected minor swagger spacing issue

Co-authored-by: dbrown-va <derek.brown5@va.gov>

Service history pact tests (#5052)

* build_user_and_stub_session allows passed in user

* working on service history pact

* add at least one entry in the service history exists state

* one service history entry spec working

* no service history records spec

* finish not a veteran spec

* lint

* dont need to pass anything into build_user_and_stub_session

Mobile API docs: update user, add address update (#4980)

All emis services are converted to soap 1.2 (#5216)

* All emis services are converted to soap 1.2

* linting

* changed emis vcr_cassettes to reflect change to soap 1.2

* Reverted Gemfile.lock

21584 mobile delete email fix (#6229)

* call merge on controller params to properly add effective_end_date

* cast controller params to hash first

Add simple last name and social stamp to hlr v2 form (#6987)

Created Check for service history null dates (#7300)

* Created Check for service history null dates

* new logic will order service history episodes from earliest to latest so spec needed to be changed

* created test for end_date null

* fixed service history episode spec

Api 9107 service history gras integration (#7685)

* added Gras V2 endpoint

* added guard_reserve_service_periods

* basic implementation of gras filtering

* Added personnel_organization_code and personnel_segment_identifier to military service episode v2 response

* added key data to guard reserver service period v2

* map episode to guard service by key data

* Will filter out if guar.trainin indicator code is Y

* fixed linting issues

* added end_date check for episode period matching

* default tests wil not be service guard

* added intial tests

* Cleaned up unit tests

* added emis guard v2 to betamocks config

* fixed tests

* new gras logic

* fixed tests

* modified service history v0 tests

* branch of service logic for guard

* fixed bug

* fixed test

* Linting

Co-authored-by: Derek Brown <derek.brown@libertyits.com>

Api 12952 vba docs kevin daily report update (#8976)

* Logging for the action_mailer

* Adding Processing column to daily report

* Lint adjustments

* Lint adjustments

RRD: increase RRD job retry limit (#9670)

* increase RRD job retry limit
* consistent hash keys

Bump google-protobuf from 3.21.12 to 3.22.0 (#11878)

Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.21.12 to 3.22.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](protocolbuffers/protobuf@v3.21.12...v3.22.0)

---
updated-dependencies:
- dependency-name: google-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Adds tracked items status to oas (#11909)

fix spec (#12037)

fix failure (#12043)

fix failing test (#12075)

fix failing test (#12076)

API 27878 secondary dsabilities not requred (#13270)

Removes min-items indicator for secondaryDisabilities property
* Updates 526.jsn, request.json and submssion.json to remove the mnItems indicator for secondary disabilities
* Updates swagger docs to reflect change
Changes to be committed:
	modified:   modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
	modified:   modules/claims_api/config/schemas/v2/526.json
	modified:   modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json
	modified:   spec/support/schemas/claims_api/v2/forms/disability/submission.json

feat: add form 1990meb confirmation email trigger

Update logic to handle separate templates

Lint

Split out logic for retrieving template id

Move confirmation email to separate sidekiq job

Lint

Re-lint

Fix education benefits spec

Move sidekiq job to meb_api module

Also updates job to take relevant data rather than entire form

Move email logic to separate method

remove invalid files
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