Description
Issue Description
Filling out the 526 form is a long and possibly trigger process for some vets.
When the vets use va.gov to create a 526 claim, we need to be able to provide them the option to save a 526 PDF using data from the web site form they entered.
In general, this would be a nice feature. There are reports of users expecting this to be available, I assume that users want a "hard" copy of the PDF for their own records.
The other story where we could use a hard copy is for 526 claims that the vets-api is not able to submit to evss. Pif in use is a specific example of an issue that some vets hit that prevents evss from accepting their claim submission, but in general we should plan on hitting other unanticipated issues like this, hopefully not too frequently. We should have a general approach to handle these. The idea is that since 526s are so long, if something goes wrong, as a last resort, the vets could be instructed to print a hard copy of the 526 form and mail it in to the VA. This would save them the trouble of manually reproducing the data they already entered into the website.
The current vets-api codebase already has this functionality in place for some forms, see:
vets-api/lib/pdf_fill/forms for some examples.
Talked with @RudyOnRails, and he showed me the tool used to parse out the PDFs field names some they can be mapped to a form json field:
https://github.com/jkraemer/pdf-forms#query-form-fields-and-fill-out-pdf-forms-with-pdftk
So this is an example of code that is used to ref a specific field in the PDF so we can throw data into it. The tool above should provide us the the field ref:
key: 'VBA281900[0].#subform[0].SocialSecurityNumber_FirstThreeNumbers[0]'
Something to worry about is if there is not a clean mapping from the form json to the 526 PDF. What if the form allow more issues than the PDF allows ? What if the web-form allows more characters in a field than the PDF supports ?
Tasks
- Parse 526 PDF to get the fields
- Map the json526 json form data to the PDF fields from task above via ruby code
Acceptance Criteria
- Backend code in place to allow producing a pre-filled 562 PDF based on 526 json form data.
How to configure this issue
- Attached to a Milestone (when will this be completed?)
- Attached to an Epic (what body of work is this a part of?)
- Labeled with Team (
product support
,analytics-insights
,operations
,service-design
,tools-be
,tools-fe
) - Labeled with Practice Area (
backend
,frontend
,devops
,design
,research
,product
,ia
,qa
,analytics
,contact center
,research
,accessibility
,content
) - Labeled with Type (
bug
,request
,discovery
,documentation
, etc.)
Activity