Open
Description
Update the JSON schema to match the subgrouping changes that were made to Medical Providers #102950 and Supporting Evidence #102947.
Similar to behaviors, medical providers and supporting evidence is subgrouped, but the original schema design considered all provider and evidence data in an aggregate group.
Objective
Current schema, update "treatmentProviders" and "evidence" attributes:
{
"treatmentProviders": {
"privateCare": boolean,
"vetCenter": boolean,
"communityCare": boolean,
"vamc": boolean,
"cboc": boolean,
"mtf": boolean,
"none": boolean
},
"evidence": {
"crisisCenter": boolean,
"counseling": boolean,
"family": boolean,
"faculty": boolean,
"police": boolean,
"medical": boolean,
"clergy": boolean,
"peers": boolean,
"journal": boolean,
"none": boolean,
"other": boolean,
"otherDetails": string
}
}
Update to instead have the following structure:
{
"treatmentReceivedVaProvider": {
"medicalCenter": boolean,
"communityOutpatient": boolean,
"vaPaid": boolean,
"dod": boolean
},
"treatmentReceivedNonVaProvider": {
"nonVa": boolean,
"vaCenters": boolean
},
"supportingEvidenceReports": {
"police": boolean
},
"supportingEvidenceRecords": {
"physicians": boolean,
"counseling": boolean,
"crisis": boolean
},
"supportingEvidenceWitness": {
"family": boolean,
"faculty": boolean,
"service": boolean,
"clergy": boolean
},
"supportingEvidenceOther": {
"personal": boolean
},
"supportingEvidenceUnlisted": string
}
Tasks to Complete:
- Update JSON schema:
- Restructure the schema to match the new "treatmentProviders" and "evidence" data capture.
- Update PDF generator service:
- Modify the mapping logic in the PDF fill forms library to handle the new structure.
- Ensure all
treatmentProviders
andevidence
data are correctly extracted and filled into the PDF.
- Update tests:
- Refactor existing tests that validate the functionality of the PDF fill forms library.
- Update
.json
files used for test cases to reflect the new structure.
- Update documentation:
- Update related documentation to describe the new schema and its usage.
Acceptance Criteria:
- All corresponding tests should pass
- PDF should generate correctly with any combination of
treatmentProviders
andevidence
data
Resources:
- [0781 PS] Scope change - Types of medical providers #102950
- [0781 PS] Scope change - Supporting evidence document types #102947
- VABC Types of medical providers - 102950 vets-website#34866
- Supporting evidence page for 0781 vets-website#34958
Files:
- lib/pdf_fill/forms/va210781v2.rb
- spec/fixtures/pdf_fill/21-0781V2/kitchen_sink.json
- spec/fixtures/pdf_fill/21-0781V2/kitchen_sink.pdf
- spec/fixtures/pdf_fill/21-0781V2/merge_fields.json
- spec/fixtures/pdf_fill/21-0781V2/overflow.json
- spec/fixtures/pdf_fill/21-0781V2/overflow.pdf
- spec/lib/pdf_fill/forms/va210781v2_spec.rb
- spec/support/disability_compensation_form/all_claims_with_0781v2_fe_submission.json
- spec/support/disability_compensation_form/form_0781v2.json
- spec/support/disability_compensation_form/submissions/with_0781v2.json
Activity