-
Notifications
You must be signed in to change notification settings - Fork 69
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
[API-42091] Retrieve POA Requests - Schema Update #19949
Conversation
def get_poa_list | ||
proc_ids = poa_list.pluck('procID') | ||
|
||
poa_requests = ClaimsApi::PowerOfAttorneyRequest.where(proc_id: proc_ids).select(:id, :proc_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding index in #19945 to optimize this query.
...s/claims_api/app/controllers/claims_api/v2/blueprints/power_of_attorney_request_blueprint.rb
Show resolved
Hide resolved
...s/claims_api/app/controllers/claims_api/v2/blueprints/power_of_attorney_request_blueprint.rb
Outdated
Show resolved
Hide resolved
@@ -3,7 +3,7 @@ | |||
require 'rails_helper' | |||
require Rails.root / 'modules/claims_api/spec/rails_helper' | |||
|
|||
RSpec.describe 'ClaimsApi::V2::PowerOfAttorneyRequests#index', :bgs, type: :request do | |||
RSpec.describe 'ClaimsApi::V2::PowerOfAttorneyRequests#index', :bgs, skip: 'unused', type: :request do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from #19932.
field :attributes do |request| | ||
{ | ||
veteran: { | ||
first_name: request['vetFirstName'], | ||
last_name: request['vetLastName'], | ||
middle_name: request['vetMiddleName'] | ||
}, | ||
claimant: { | ||
city: request['claimantCity'], | ||
country: request['claimantCountry'], | ||
military_po: request['claimantMilitaryPO'], | ||
military_postal_code: request['claimantMilitaryPostalCode'], | ||
state: request['claimantState'], | ||
zip: request['claimantZip'] | ||
}, | ||
representative: { | ||
poa_code: request['poaCode'], | ||
vso_user_email: request['VSOUserEmail'], | ||
vso_user_first_name: request['VSOUserFirstName'], | ||
vso_user_last_name: request['VSOUserLastName'] | ||
}, | ||
received_date: request['dateRequestReceived'], | ||
decision_date: request['dateRequestActioned'], | ||
status: request['secondaryStatus'], | ||
declined_reason: request['declinedReason'], | ||
change_address_authorization: request['changeAddressAuth'], | ||
health_info_authorization: request['healthInfoAuth'] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf. BGS response:
vets-api/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
Lines 416 to 439 in d870a13
"example": [ | |
{ | |
"VSOUserEmail": null, | |
"VSOUserFirstName": "Joe", | |
"VSOUserLastName": "BestRep", | |
"changeAddressAuth": "Y", | |
"claimantCity": "Charlottesville", | |
"claimantCountry": "USA", | |
"claimantMilitaryPO": null, | |
"claimantMilitaryPostalCode": null, | |
"claimantState": null, | |
"claimantZip": "00123", | |
"dateRequestActioned": "2024-05-25T13:45:00-05:00", | |
"dateRequestReceived": "2012-11-23T16:49:16-06:00", | |
"declinedReason": null, | |
"healthInfoAuth": "Y", | |
"poaCode": "083", | |
"procID": "11027", | |
"secondaryStatus": "New", | |
"vetFirstName": "[Vet First Name]", | |
"vetLastName": "[Vet Last Name]", | |
"vetMiddleName": null, | |
"vetPtcpntID": "111" | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tycol7 Looks like some unrelated tests are failing, but everything related to this work looked good to me!
Summary
Related issue(s)
API-42091
Testing done
Note:
id
will benull
unless you create a correspondingPowerOfAttorneyRequest
record in your local database (must include procID from the BGS response).Screenshots
What areas of the site does it impact?
PowerOfAttorneyRequests index (search)
v2 staging docs
Acceptance criteria
Requested Feedback
See below.