Skip to content

[0781 PS] Schema updates: supporting evidence & treatment providers #104113

Open
@lisacapaccioli

Description

@lisacapaccioli

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:

  1. Update JSON schema:
  • Restructure the schema to match the new "treatmentProviders" and "evidence" data capture.
  1. Update PDF generator service:
  • Modify the mapping logic in the PDF fill forms library to handle the new structure.
  • Ensure all treatmentProviders and evidence data are correctly extracted and filled into the PDF.
  1. 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.
  1. Update documentation:

Acceptance Criteria:

  • All corresponding tests should pass
  • PDF should generate correctly with any combination of treatmentProviders and evidence data

Resources:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions