Closed sethdarragile6 closed 1 year ago
Here's how we process military and (international) addresses in vets-api currently (in data_translation_all_claim.rb
, --> def translate_mailing_address
)
state
is AA, AE, or AP, then the type is MILITARY
b. otherwise, if country
is USA, then the type is DOMESTIC
c. otherwise, the type is INTERNATIONALcity
, state
, zipFirstFive
and zipLastFour
per usual
b. MILITARY, then populate
militaryPostOfficeTypeCode
with the city
, stripped of whitespace and uppercased, and
militaryStateCode
with the state
zipFirstFive
and zipLastFour
per usual
c. INTERNATIONAL, populate
internationalPostalCode
from a lookup from international_postal_codes.json
based on the country
field
city
per usualI'm assuming that, if it's a military address, we're expecting city
to come in as "APO", "DPO", "FPO"- albeit possibly with whitespace and mixed case. We should confirm whether or not there is front end validation for this, because it seems that the backend code is trying to sanitize a freeform text field here
Other than that little nagging doubt, it would seem that our logic mirrors Lighthouse's expectations. I will post out to the migration channel to be sure, of course.
Resolved all my questions with Michael Harlow on this thread. Updated implementation story with relevant deets.
Dug a little more into militaryPostOfficeTypeCode
, and inferred that these are coming in as expected, i.e. 'APO'. I was unable to trace it from the front-end directly, complicated by the fact that this information apparently gets pulled in from an external source. But investigating some "black hole submissions" detailed by Sam (and with his help) I was able to clearly delineate that
Issue Description
Lighthouse recently started conversations around the use of submit requests elements pertaining to the military address of the veteran that EVSS had used, but they omitted. From LH:
Long story short: LH would like us map the veteran's military address to LH's single address fields
slack thread 1 - ? OG thread from Kayla, I couldn't find it Kayla - My team is looking to confirm if the 526 submission flow on VA.gov needs to support Military address types. Is your team the correct team to direct that question to? We are specifically wanting to know if you are currently using militaryStateCode or militaryPostOfficeTypeCode in the EVSS Form526 request. I discussed this further with Michael Harlow to confirm how EVSS was treating these attributes. It turns out they were internally mapping militaryStateCode to state, and militaryPostOfficeTypeCode to city. That is how the values would be displayed in VBMS. So, we were wondering if you could keep collecting the information as you do today from the Veteran, but map those to state and city on our Claims v2 526 request? That should still mimic the existing functionality without adding additional attributes to our request.
slack thread 2
Tasks
internationalPostalCode
comes into play, as this appears to be related to address mappingsAcceptance Criteria
Screenshots
Private Zenhub Image (from EVSS/LH Mapping doc)
How to configure this issue
product support
,analytics-insights
,operations
,service-design
,Console-Services
,tools-fe
)backend
,frontend
,devops
,design
,research
,product
,ia
,qa
,analytics
,contact center
,research
,accessibility
,content
)bug
,request
,discovery
,documentation
, etc.)