diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6ec7d621946..a7a1200636e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -138,6 +138,7 @@ app/controllers/v0/search_controller.rb @department-of-veterans-affairs/va-api-e app/controllers/v0/search_typeahead_controller.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/controllers/v0/sign_in_controller.rb @department-of-veterans-affairs/octo-identity app/controllers/v0/terms_of_use_agreements_controller.rb @department-of-veterans-affairs/octo-identity +app/controllers/v0/test_account_user_emails_controller.rb @department-of-veterans-affairs/octo-identity app/controllers/v0/trackings_controller.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/qa-standards @department-of-veterans-affairs/backend-review-group app/controllers/v0/triage_teams_controller.rb @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/controllers/v0/upload_supporting_evidences_controller.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -174,6 +175,7 @@ app/controllers/v1/post911_gi_bill_statuses_controller.rb @department-of-veteran app/controllers/v2/higher_level_reviews_controller.rb @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group app/mailers/application_mailer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/mailers/ch31_submissions_report_mailer.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +app/mailers/create_excel_files_mailer.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/mailers/create_daily_spool_files_mailer.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/mailers/create_staging_spool_files_mailer.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/mailers/dependents_application_failure_mailer.rb @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -241,6 +243,7 @@ app/models/eligible_data_class.rb @department-of-veterans-affairs/vfs-vaos @depa app/models/evss_claim_document.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/evss_claim.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/evss_claims_sync_status_tracker.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +app/models/excel_file_event.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/expiry_scanner.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/external_services_redis/status.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/feature_toggle_event.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -304,6 +307,7 @@ app/models/rate_limited_search.rb @department-of-veterans-affairs/va-api-enginee app/models/saml_request_tracker.rb @department-of-veterans-affairs/octo-identity app/models/saved_claim.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/saved_claim/education_benefits/va_10203.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +app/models/saved_claim/education_benefits/va_10282.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/saved_claim/disability_compensation.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/saved_claim/dependency_claim.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/models/session.rb @department-of-veterans-affairs/octo-identity @@ -362,6 +366,7 @@ app/policies/mpi_policy.rb @department-of-veterans-affairs/octo-identity app/policies/ppiu_policy.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/policies/vet360_policy.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/policies/va_profile_policy.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +app/policies/vye_policy.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/backend-review-group app/serializers/appointment_serializer.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/serializers/async_transaction @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/serializers/async_transaction/base_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -460,7 +465,6 @@ app/services/mhv_account_type_service.rb @department-of-veterans-affairs/octo-id app/services/mhv_logging_service.rb @department-of-veterans-affairs/octo-identity app/services/rapid_ready_for_decision @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/services/sign_in @department-of-veterans-affairs/octo-identity -app/services/submission_pdf_url_service.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/services/terms_of_use @department-of-veterans-affairs/octo-identity app/services/users @department-of-veterans-affairs/octo-identity app/swagger/readme.md @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -630,6 +634,7 @@ app/sidekiq/evss/delete_old_claims.rb @department-of-veterans-affairs/mbs-core-t app/sidekiq/evss/dependents_application_job.rb @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/evss/disability_compensation_form @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/evss/document_upload.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/backend-review-group +app/sidekiq/evss/failure_notification.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-management-tools-be app/sidekiq/evss/disability_compensation_form/form526_document_upload_failure_email.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/evss/retrieve_claims_from_remote_job.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/evss/request_decision.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -656,6 +661,7 @@ app/sidekiq/lighthouse @department-of-veterans-affairs/backend-review-group app/sidekiq/lighthouse/submit_career_counseling_job.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/lighthouse/create_intent_to_file_job.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group app/sidekiq/lighthouse/income_and_assets_intake_job.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group +app/sidekiq/lighthouse/failure_notification.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-management-tools-be app/sidekiq/load_average_days_for_claim_completion_job.rb @department-of-veterans-affairs/benefits-microservices @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/mhv @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/mhv/account_creator_job.rb @department-of-veterans-affairs/octo-identity @@ -668,7 +674,7 @@ spec/sidekiq/simple_forms_api/form_remediation/upload_retry_job_spec @department app/sidekiq/terms_of_use @department-of-veterans-affairs/octo-identity app/sidekiq/test_user_dashboard @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/qa-standards @department-of-veterans-affairs/backend-review-group app/sidekiq/test_user_dashboard/daily_maintenance.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/qa-standards @department-of-veterans-affairs/backend-review-group -app/sidekiq/transactional_email_analytics_job.rb @department-of-veterans-affairs/backend-review-group +app/sidekiq/transactional_email_analytics_job.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/backend-review-group app/sidekiq/va_notify_dd_email_job.rb @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/va_notify_email_job.rb @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group app/sidekiq/vbms @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -702,8 +708,7 @@ config/form_profile_mappings/21-526EZ.yml @department-of-veterans-affairs/Disabi config/form_profile_mappings/21-686C.yml @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group config/form_profile_mappings/21P-527EZ.yml @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group config/form_profile_mappings/21P-0969.yml @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group -config/form_profile_mappings/21P-530.yml @department-of-veterans-affairs/disability-experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -config/form_profile_mappings/21P-530V2.yml @department-of-veterans-affairs/disability-experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +config/form_profile_mappings/21P-530EZ.yml @department-of-veterans-affairs/disability-experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group config/form_profile_mappings/21-22.yml @department-of-veterans-affairs/accredited-representation-management @department-of-veterans-affairs/backend-review-group config/form_profile_mappings/21-22A.yml @department-of-veterans-affairs/accredited-representation-management @department-of-veterans-affairs/backend-review-group config/form_profile_mappings/22-0993.yml @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -849,6 +854,7 @@ lib/caseflow @department-of-veterans-affairs/lighthouse-banana-peels @department lib/central_mail @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/chip @department-of-veterans-affairs/vsa-healthcare-health-quest-1-backend @department-of-veterans-affairs/patient-check-in @department-of-veterans-affairs/backend-review-group lib/claim_letters @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +lib/claim_documents/monitor.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group lib/clamav @department-of-veterans-affairs/backend-review-group lib/common/client/base.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/common/client/concerns/mhv_fhir_session_client.rb @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -962,10 +968,8 @@ lib/pdf_fill/forms/pdfs/28-1900.pdf @department-of-veterans-affairs/benefits-non lib/pdf_fill/forms/va281900.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/pdf_fill/forms/pdfs/28-8832.pdf @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/pdf_fill/forms/va288832.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -lib/pdf_fill/forms/pdfs/21P-530.pdf @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -lib/pdf_fill/forms/va21p530.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -lib/pdf_fill/forms/pdfs/21P-530V2.pdf @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -lib/pdf_fill/forms/va21p530v2.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +lib/pdf_fill/forms/pdfs/21P-530EZ.pdf @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +lib/pdf_fill/forms/va21p530ez.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/pdf_fill/forms/pdfs/686C-674.pdf @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/pdf_fill/forms/va686c674.rb @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/pdf_fill/forms/pdfs/21-674.pdf @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1025,6 +1029,7 @@ lib/virtual_regional_office @department-of-veterans-affairs/va-api-engineers @de lib/vre @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/res @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/va_notify @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +lib/vye @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/govcio-vfep-codereviewers lib/webhooks @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/zero_silent_failures @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group modules/accredited_representative_portal @department-of-veterans-affairs/benefits-accredited-rep-facing-engineers @department-of-veterans-affairs/backend-review-group @@ -1065,7 +1070,7 @@ modules/veteran @department-of-veterans-affairs/lighthouse-dash @department-of-v modules/pensions @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group modules/veteran_confirmation @department-of-veterans-affairs/lighthouse-ninjapigs @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group modules/travel_pay @department-of-veterans-affairs/travel-pay-integration @department-of-veterans-affairs/backend-review-group -modules/vye @department-of-veterans-affairs/backend-review-group #@department-of-veterans-affairs/govcio-vye-codereviewers +modules/vye @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/govcio-vfep-codereviewers modules/decision_reviews @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group postman/vets-api.pm-collection.json @department-of-veterans-affairs/backend-review-group postman/Dockerfile @department-of-veterans-affairs/backend-review-group @@ -1199,6 +1204,7 @@ spec/factories/education_career_counseling_claim_no_vet_information.rb @departme spec/factories/education_career_counseling_claim.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/education_stem_automated_decisions.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/eligible_data_classes.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/factories/excel_file_events.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/extract_statuses.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/evss_claims.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/evss_intent_to_files.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1233,6 +1239,7 @@ spec/factories/message_drafts.rb @department-of-veterans-affairs/vfs-mhv-secure- spec/factories/message_threads.rb @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/messages.rb @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/messaging_preferences.rb @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/factories/mhv_user_accounts.rb @department-of-veterans-affairs/octo-identity spec/factories/military_service_episodes.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/mpi @department-of-veterans-affairs/octo-identity spec/factories/mvi_profile_relationships.rb @department-of-veterans-affairs/octo-identity @@ -1270,6 +1277,7 @@ spec/factories/user_verifications.rb @department-of-veterans-affairs/octo-identi spec/factories/va0993.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/va0994.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/va10203.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/factories/va10282.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/va1990e.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/va1990n.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/factories/va1990.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1323,10 +1331,11 @@ spec/fixtures/okta @department-of-veterans-affairs/lighthouse-pivot spec/fixtures/okta/okta_callback_request_idme_1567760195.json @department-of-veterans-affairs/lighthouse-pivot spec/fixtures/pdf_fill @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/10-10CG @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/fixtures/pdf_fill/21-0781V2 @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/21-674 @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/21P-0969 @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group -spec/fixtures/pdf_fill/21P-530 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -spec/fixtures/pdf_fill/21P-530V2 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/fixtures/pdf_fill/21P-530EZ @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/fixtures/pdf_fill/26-1880 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/28-1900 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/28-8832 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/pdf_fill/5655 @department-of-veterans-affairs/vsa-debt-resolution @@ -1340,6 +1349,7 @@ spec/fixtures/supplemental_claims @department-of-veterans-affairs/benefits-decis spec/fixtures/va_profile @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/vba_documents @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/fixtures/vbms @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/lib/vye @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/govcio-vfep-codereviewers spec/sidekiq/account_login_statistics_job_spec.rb @department-of-veterans-affairs/octo-identity spec/sidekiq/benefits_intake_status_job_spec.rb @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/bgs @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management @@ -1362,6 +1372,7 @@ spec/sidekiq/evss/disability_compensation_form/submit_form8940_spec.rb @departme spec/sidekiq/evss/disability_compensation_form/submit_uploads_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/evss/disability_compensation_form/upload_bdd_instructions_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/evss/document_upload_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/sidekiq/evss/failure_notification_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-management-tools-be spec/sidekiq/evss/retrieve_claims_from_remote_job_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/evss/update_claim_from_remote_job_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/export_breaker_status_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1382,19 +1393,19 @@ spec/sidekiq/income_limits @department-of-veterans-affairs/vfs-public-websites-f spec/sidekiq/in_progress_form_cleaner_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/kms_key_rotation @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/lighthouse @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/sidekiq/lighthouse/failure_notification_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-management-tools-be spec/sidekiq/load_average_days_for_claim_completion_job_spec.rb @department-of-veterans-affairs/benefits-microservices @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/mhv @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/mhv/account_creator_job_spec.rb @department-of-veterans-affairs/octo-identity spec/sidekiq/pager_duty @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/preneeds @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/schema_contract @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group -spec/sidekiq/sidekiq_stats_job_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/sign_in @department-of-veterans-affairs/octo-identity spec/sidekiq/sign_in/delete_expired_sessions_job_spec.rb @department-of-veterans-affairs/octo-identity spec/sidekiq/simple_forms_api @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/terms_of_use @department-of-veterans-affairs/octo-identity spec/sidekiq/test_user_dashboard @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/qa-standards @department-of-veterans-affairs/backend-review-group -spec/sidekiq/transactional_email_analytics_job_spec.rb @department-of-veterans-affairs/backend-review-group +spec/sidekiq/transactional_email_analytics_job_spec.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/backend-review-group spec/sidekiq/va_notify_dd_email_job_spec.rb @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/va_notify_email_job_spec.rb @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/sidekiq/vbms @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1413,6 +1424,7 @@ spec/lib/carma @department-of-veterans-affairs/vfs-10-10 @department-of-veterans spec/lib/caseflow @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/central_mail @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/chip @department-of-veterans-affairs/vsa-healthcare-health-quest-1-backend @department-of-veterans-affairs/patient-check-in @department-of-veterans-affairs/backend-review-group +spec/lib/claim_documents/monitor_spec.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group spec/lib/claim_status_tool @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/common/client/concerns/mhv_fhir_session_client_spec.rb @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/common/client/concerns/mhv_jwt_session_client_spec.rb @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1497,6 +1509,7 @@ spec/lib/pdf_info/metadata_spec.rb @department-of-veterans-affairs/va-api-engine spec/lib/pdf_utilities @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/pension_burial @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/pension21p527ez/pension_military_information_spec.rb @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/lib/periodic_jobs_spec.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/backend-review-group spec/lib/preneeds @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/post911_sob @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/rx @department-of-veterans-affairs/vfs-mhv-medications @@ -1584,6 +1597,7 @@ spec/models/education_benefits_claim_spec.rb @department-of-veterans-affairs/my- spec/models/education_benefits_submission_spec.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/models/education_stem_automated_decision_spec.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/models/evss_claims_sync_status_tracker_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/models/excel_file_event_spec.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/models/external_services_redis @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/models/folder_spec.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/models/form1010cg @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1728,6 +1742,7 @@ spec/requests/v0/caregivers_assistance_claims_spec.rb @department-of-veterans-af spec/requests/v0/claim_documents_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/requests/v0/debts_spec.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group spec/requests/v0/disability_compensation_form_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/requests/v0/test_account_user_emails_spec.rb @department-of-veterans-affairs/octo-identity spec/requests/v1/higher_level_reviews @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group spec/requests/v1/notice_of_disagreements @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group spec/requests/v1/supplemental_claims @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/backend-review-group @@ -1843,6 +1858,7 @@ spec/support/database_cleaner.rb @department-of-veterans-affairs/va-api-engineer spec/support/default_configuration_helper.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/disability_compensation_form @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/error_details.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/support/excel_helpers.rb @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/factory_bot.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/fake_api_key_for_lighthouse.txt @department-of-veterans-affairs/backend-review-group spec/support/financial_status_report_helpers.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group @@ -2119,6 +2135,7 @@ spec/support/vcr_cassettes/spec/support @department-of-veterans-affairs/octo-ide spec/support/vcr_cassettes/staccato @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/vcr_cassettes/token_validation @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/vcr_cassettes/travel_pay @department-of-veterans-affairs/travel-pay-integration @department-of-veterans-affairs/backend-review-group +spec/support/vcr_cassettes/uploads/validate_document.yml @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/backend-review-group spec/spupport/vcr_cassettes/user/get_facilities_empty.yml @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/vcr_cassettes/va_forms @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/support/vcr_cassettes/va_notify @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -2141,6 +2158,7 @@ spec/swagger_helper.rb @department-of-veterans-affairs/va-api-engineers @departm spec/uploaders/evss_claim_document_uploader_base_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/uploaders/evss_claim_document_uploader_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/uploaders/form1010cg @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/uploaders/hca_attachment_uploader_spec.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/uploaders/form1010cg/poa_uploader_spec.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/uploaders/supporting_evidence_attachment_uploader_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/uploaders/uploader_virus_scan_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group diff --git a/.github/workflows/build_atlas_codeowners.yml b/.github/workflows/build_atlas_codeowners.yml index a4a4ded0851..989268bf202 100644 --- a/.github/workflows/build_atlas_codeowners.yml +++ b/.github/workflows/build_atlas_codeowners.yml @@ -45,6 +45,6 @@ jobs: destination_repo: 'department-of-veterans-affairs/platform-atlas' destination_folder: '/lib/codeowners/vets-api' destination_branch: 'master' - user_email: 'devops@va.gov' + user_email: '70344339+va-vsp-bot@users.noreply.github.com' user_name: 'va-vsp-bot' commit_message: 'Auto update Atlas with Vets-API CODEOWNERS' diff --git a/.github/workflows/deploy-template.yml b/.github/workflows/deploy-template.yml index 7f51b19fb9a..39e9b4cd52d 100644 --- a/.github/workflows/deploy-template.yml +++ b/.github/workflows/deploy-template.yml @@ -101,5 +101,5 @@ jobs: add: "*" cwd: vsp-infra-application-manifests/apps author_name: va-vsp-bot - author_email: devops@va.gov + author_email: 70344339+va-vsp-bot@users.noreply.github.com message: "Release ${{ needs.prepare-values.outputs.environments }} for ${{inputs.ecr_repository}} : ${{ inputs.commit_sha }}." diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2d355a5b986..be760d9fbad 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -315,6 +315,7 @@ Lint/MissingSuper: - 'modules/va_notify/lib/va_notify/service.rb' - 'modules/vaos/app/services/vaos/session_service.rb' - 'modules/veteran/app/models/veteran/user.rb' + - 'lib/vye/dgib/service.rb' # Offense count: 5 Lint/NoReturnInBeginEndBlocks: diff --git a/Gemfile b/Gemfile index 18a75dd2fc0..c55e94ca519 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,7 @@ gem 'aws-sdk-s3', '~> 1' gem 'aws-sdk-sns', '~> 1' gem 'betamocks', git: 'https://github.com/department-of-veterans-affairs/betamocks', branch: 'master' gem 'bgs_ext', git: 'https://github.com/department-of-veterans-affairs/bgs-ext.git', require: 'bgs', ref: '350e45ae69' +gem 'blind_index' gem 'blueprinter' gem 'bootsnap', require: false gem 'breakers' @@ -206,6 +207,7 @@ group :development, :test do gem 'byebug', platforms: :ruby # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'danger' gem 'database_cleaner' + gem 'debug' gem 'factory_bot_rails' gem 'faker' # CAUTION: faraday_curl may not provide all headers used in the actual faraday request. Be cautious if using this to diff --git a/Gemfile.lock b/Gemfile.lock index 6c53c7c5129..7b0bfd1b77a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,10 +74,10 @@ GIT GIT remote: https://github.com/department-of-veterans-affairs/vets-json-schema - revision: 3a6965b5d60abdb99dc2d21fcd15784c52a51927 + revision: a84abd360072a0d4aaa8b1984cee2c33e1844335 branch: master specs: - vets_json_schema (24.6.1) + vets_json_schema (24.7.0) multi_json (~> 1.0) script_utils (= 0.0.4) @@ -85,6 +85,7 @@ PATH remote: modules specs: accredited_representative_portal (0.1.0) + blind_index appeals_api (0.0.1) jsonapi-serializer (>= 2.2.0) sidekiq @@ -240,11 +241,12 @@ GEM base64 gyoku (>= 0.4.0) nokogiri + argon2-kdf (0.2.0) ast (2.4.2) attr_extras (7.1.0) awesome_print (1.9.2) aws-eventstream (1.3.0) - aws-partitions (1.1019.0) + aws-partitions (1.1022.0) aws-sdk-core (3.214.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) @@ -253,7 +255,7 @@ GEM aws-sdk-kms (1.96.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.173.0) + aws-sdk-s3 (1.176.1) aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -273,6 +275,9 @@ GEM bigdecimal (3.1.8) bigdecimal (3.1.8-java) bindex (0.8.1) + blind_index (2.6.1) + activesupport (>= 7) + argon2-kdf (>= 0.2) blueprinter (1.1.2) bootsnap (1.18.4) msgpack (~> 1.2) @@ -308,7 +313,7 @@ GEM coercible (1.0.0) descendants_tracker (~> 0.0.1) colored2 (3.1.2) - combine_pdf (1.0.26) + combine_pdf (1.0.29) matrix ruby-rc4 (>= 0.1.5) committee (5.4.0) @@ -370,6 +375,9 @@ GEM libddwaf (~> 1.14.0.0.0) msgpack debase-ruby_core_source (3.3.1) + debug (1.10.0) + irb (~> 1.10) + reline (>= 0.3.8) declarative (0.0.20) deep_merge (1.2.2) descendants_tracker (0.0.4) @@ -535,7 +543,7 @@ GEM ffi (~> 1) ffi-compiler (~> 1) rake (>= 13) - googleauth (1.12.0) + googleauth (1.12.2) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.2) google-logging-utils (~> 0.1) @@ -596,15 +604,15 @@ GEM ruby-vips (>= 2.0.17, < 3) io-console (0.8.0) io-console (0.8.0-java) - irb (1.14.1) + irb (1.14.3) rdoc (>= 4.0.0) reline (>= 0.4.2) iso_country_codes (0.7.8) - jar-dependencies (0.5.0) + jar-dependencies (0.5.1) jmespath (1.6.2) jruby-openssl (0.15.1-java) - json (2.9.0) - json (2.9.0-java) + json (2.9.1) + json (2.9.1-java) json-schema (5.1.0) addressable (~> 2.8) json_schema (0.21.0) @@ -645,7 +653,7 @@ GEM ffi-compiler (~> 1.0) rake (~> 13.0) lockbox (2.0.0) - logger (1.6.2) + logger (1.6.4) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -697,11 +705,9 @@ GEM nio4r (2.7.4-java) nkf (0.2.0) nkf (0.2.0-java) - nokogiri (1.16.8) + nokogiri (1.17.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.8-java) - racc (~> 1.4) nori (2.7.1) bigdecimal notiffany (0.1.3) @@ -758,8 +764,8 @@ GEM ruby-rc4 ttfunk pg (1.5.9) - pg_query (5.1.0) - google-protobuf (>= 3.22.3) + pg_query (6.0.0) + google-protobuf (>= 3.25.3) pg_search (2.3.7) activerecord (>= 6.1) activesupport (>= 6.1) @@ -785,10 +791,10 @@ GEM byebug (~> 11.0) pry (>= 0.13, < 0.15) pstore (0.1.3) - psych (5.2.1) + psych (5.2.2) date stringio - psych (5.2.1-java) + psych (5.2.2-java) date jar-dependencies (>= 0.1.7) public_suffix (6.0.1) @@ -837,7 +843,7 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.1) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rails-session_cookie (0.3.0) @@ -860,7 +866,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - rdoc (6.8.1) + rdoc (6.10.0) psych (>= 4.0.0) redis (5.3.0) redis-client (>= 0.22.0) @@ -869,7 +875,7 @@ GEM redis-namespace (1.11.0) redis (>= 4) regexp_parser (2.9.3) - reline (0.5.12) + reline (0.6.0) io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) @@ -915,7 +921,7 @@ GEM rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.0.1) + rspec-rails (7.1.0) actionpack (>= 7.0) activesupport (>= 7.0) railties (>= 7.0) @@ -930,7 +936,7 @@ GEM rspec-expectations (~> 3.0) rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) - rspec-support (3.13.1) + rspec-support (3.13.2) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) rswag-specs (2.16.0) @@ -942,7 +948,7 @@ GEM actionpack (>= 5.2, < 8.1) railties (>= 5.2, < 8.1) rtesseract (3.1.3) - rubocop (1.69.1) + rubocop (1.69.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -952,7 +958,7 @@ GEM rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.36.2) + rubocop-ast (1.37.0) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -964,7 +970,7 @@ GEM rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.2.0) + rubocop-rspec (3.3.0) rubocop (~> 1.61) rubocop-rspec_rails (2.30.0) rubocop (~> 1.61) @@ -998,7 +1004,7 @@ GEM addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) script_utils (0.0.4) - securerandom (0.4.0) + securerandom (0.4.1) seedbank (0.5.0) rake (>= 10.0) semantic_logger (4.16.0) @@ -1150,6 +1156,7 @@ DEPENDENCIES banners! betamocks! bgs_ext! + blind_index blueprinter bootsnap brakeman @@ -1175,6 +1182,7 @@ DEPENDENCIES date_validator ddtrace debts_api! + debug decision_reviews! dhp_connected_devices! dogstatsd-ruby (= 5.6.3) diff --git a/app/controllers/concerns/exception_handling.rb b/app/controllers/concerns/exception_handling.rb index a365d5a4ed5..a970d57f6cf 100644 --- a/app/controllers/concerns/exception_handling.rb +++ b/app/controllers/concerns/exception_handling.rb @@ -83,7 +83,7 @@ def report_mapped_exception(exception, va_exception) # Add additional user specific context to the logs if exception.is_a?(Common::Exceptions::BackendServiceException) && current_user.present? extra[:icn] = current_user.icn - extra[:mhv_correlation_id] = current_user.mhv_correlation_id + extra[:mhv_credential_uuid] = current_user.mhv_credential_uuid end va_exception_info = { va_exception_errors: va_exception.errors.map(&:to_hash) } log_exception_to_sentry(exception, extra.merge(va_exception_info)) diff --git a/app/controllers/v0/burial_claims_controller.rb b/app/controllers/v0/burial_claims_controller.rb index c53d7167594..dc2c6232de3 100644 --- a/app/controllers/v0/burial_claims_controller.rb +++ b/app/controllers/v0/burial_claims_controller.rb @@ -25,7 +25,7 @@ def show def create PensionBurial::TagSentry.tag_sentry - claim = create_claim + claim = claim_class.new(form: filtered_params[:form]) monitor.track_create_attempt(claim, current_user) in_progress_form = current_user ? InProgressForm.form_for_user(claim.form_id, current_user) : nil @@ -61,15 +61,6 @@ def claim_class SavedClaim::Burial end - def create_claim - if Flipper.enabled?(:va_burial_v2) - form = filtered_params[:form] - claim_class.new(form:, formV2: form.present? ? JSON.parse(form)['formV2'] : nil) - else - claim_class.new(form: filtered_params[:form]) - end - end - def process_and_upload_to_lighthouse(in_progress_form, claim) claim.process_attachments! diff --git a/app/controllers/v0/claim_documents_controller.rb b/app/controllers/v0/claim_documents_controller.rb index 7258eb78f8a..2fef551ea4a 100644 --- a/app/controllers/v0/claim_documents_controller.rb +++ b/app/controllers/v0/claim_documents_controller.rb @@ -2,28 +2,38 @@ require 'pension_burial/tag_sentry' require 'lgy/tag_sentry' +require 'claim_documents/monitor' +require 'lighthouse/benefits_intake/service' +require 'pdf_utilities/datestamp_pdf' module V0 class ClaimDocumentsController < ApplicationController service_tag 'claims-shared' skip_before_action(:authenticate) + before_action :load_user def create - Rails.logger.info "Creating PersistentAttachment FormID=#{form_id}" + uploads_monitor.track_document_upload_attempt(form_id, current_user) - attachment = klass.new(form_id:) + @attachment = klass&.new(form_id:) # add the file after so that we have a form_id and guid for the uploader to use - attachment.file = unlock_file(params['file'], params['password']) + @attachment.file = unlock_file(params['file'], params['password']) - raise Common::Exceptions::ValidationErrors, attachment unless attachment.valid? + if %w[21P-527EZ 21P-530 21P-530V2].include?(form_id) && + Flipper.enabled?(:document_upload_validation_enabled) && !stamped_pdf_valid? - attachment.save + raise Common::Exceptions::ValidationErrors, @attachment + end + + raise Common::Exceptions::ValidationErrors, @attachment unless @attachment.valid? - Rails.logger.info "Success creating PersistentAttachment FormID=#{form_id} AttachmentID=#{attachment.id}" + @attachment.save - render json: PersistentAttachmentSerializer.new(attachment) + uploads_monitor.track_document_upload_success(form_id, @attachment.id, current_user) + + render json: PersistentAttachmentSerializer.new(@attachment) rescue => e - Rails.logger.error "Error creating PersistentAttachment FormID=#{form_id} AttachmentID=#{attachment.id} #{e}" + uploads_monitor.track_document_upload_failed(form_id, @attachment&.id, current_user, e) raise e end @@ -31,7 +41,7 @@ def create def klass case form_id - when '21P-527EZ', '21P-530', '21P-530V2' + when '21P-527EZ', '21P-530EZ', '21P-530V2' PensionBurial::TagSentry.tag_sentry PersistentAttachments::PensionBurial when '21-686C', '686C-674' @@ -47,7 +57,7 @@ def form_id end def unlock_file(file, file_password) - return file unless File.extname(file) == '.pdf' && file_password + return file unless File.extname(file) == '.pdf' && file_password.present? pdftk = PdfForms.new(Settings.binaries.pdftk) tmpf = Tempfile.new(['decrypted_form_attachment', '.pdf']) @@ -69,5 +79,41 @@ def unlock_file(file, file_password) file.tempfile = tmpf file end + + # rubocop:disable Metrics/MethodLength + def stamped_pdf_valid? + extension = File.extname(@attachment&.file&.id) + allowed_types = PersistentAttachment::ALLOWED_DOCUMENT_TYPES + + if allowed_types.exclude?(extension) + raise Common::Exceptions::UnprocessableEntity.new( + detail: I18n.t('errors.messages.extension_allowlist_error', extension:, allowed_types:), + source: 'PersistentAttachment.stamped_pdf_valid?' + ) + elsif @attachment&.file&.size&.< PersistentAttachment::MINIMUM_FILE_SIZE + raise Common::Exceptions::UnprocessableEntity.new( + detail: 'File size must not be less than 1.0 KB', + source: 'PersistentAttachment.stamped_pdf_valid?' + ) + end + + document = PDFUtilities::DatestampPdf.new(@attachment.to_pdf).run(text: 'VA.GOV', x: 5, y: 5) + intake_service.valid_document?(document:) + rescue BenefitsIntake::Service::InvalidDocumentError => e + @attachment.errors.add(:attachment, e.message) + false + rescue PdfForms::PdftkError + @attachment.errors.add(:attachment, 'File is corrupt and cannot be uploaded') + false + end + # rubocop:enable Metrics/MethodLength + + def intake_service + @intake_service ||= BenefitsIntake::Service.new + end + + def uploads_monitor + @uploads_monitor ||= ClaimDocuments::Monitor.new + end end end diff --git a/app/controllers/v0/disability_compensation_forms_controller.rb b/app/controllers/v0/disability_compensation_forms_controller.rb index 05715282ffb..4a6808f9643 100644 --- a/app/controllers/v0/disability_compensation_forms_controller.rb +++ b/app/controllers/v0/disability_compensation_forms_controller.rb @@ -35,9 +35,10 @@ def separation_locations :all_users, :get_separation_locations ) do + provider = Flipper.enabled?(:disability_compensation_staging_lighthouse_brd) ? :lighthouse_staging : nil api_provider = ApiProviderFactory.call( type: ApiProviderFactory::FACTORIES[:brd], - provider: nil, + provider:, options: {}, current_user: @current_user, feature_toggle: ApiProviderFactory::FEATURE_TOGGLE_BRD @@ -122,7 +123,7 @@ def create_submission(saved_claim) saved_claim_id: saved_claim.id, auth_headers_json: auth_headers.to_json, form_json: saved_claim.to_submission_data(@current_user), - submit_endpoint: includes_toxic_exposure? ? 'claims_api' : 'evss' + submit_endpoint: 'claims_api' ) { |sub| sub.add_birls_ids @current_user.birls_id } if missing_disabilities?(submission) @@ -161,11 +162,6 @@ def stats_key 'api.disability_compensation' end - def includes_toxic_exposure? - # any form that has a startedFormVersion (whether it is '2019' or '2022') will go through the Toxic Exposure flow - form_content['form526']['startedFormVersion'] - end - def missing_disabilities?(submission) if submission.form['form526']['form526']['disabilities'].none? StatsD.increment("#{stats_key}.failure") diff --git a/app/controllers/v0/my_va/submission_pdf_urls_controller.rb b/app/controllers/v0/my_va/submission_pdf_urls_controller.rb index b4c4acbfd65..ead7eb07b3f 100644 --- a/app/controllers/v0/my_va/submission_pdf_urls_controller.rb +++ b/app/controllers/v0/my_va/submission_pdf_urls_controller.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'forms/submission_statuses/pdf_urls' + module V0 module MyVA class SubmissionPdfUrlsController < ApplicationController @@ -7,7 +9,7 @@ class SubmissionPdfUrlsController < ApplicationController service_tag 'form-submission-pdf' def create - url = SubmissionPdfUrlService.new( + url = Forms::SubmissionStatuses::PdfUrls.new( form_id: request_params[:form_id], submission_guid: request_params[:submission_guid] ).fetch_url diff --git a/app/controllers/v0/profile/vet_verification_statuses_controller.rb b/app/controllers/v0/profile/vet_verification_statuses_controller.rb index fcc93710f5d..7f6aed1ca8a 100644 --- a/app/controllers/v0/profile/vet_verification_statuses_controller.rb +++ b/app/controllers/v0/profile/vet_verification_statuses_controller.rb @@ -7,8 +7,7 @@ class VetVerificationStatusesController < ApplicationController before_action { authorize :lighthouse, :access? } def show - access_token = settings.access_token - response = service.get_vet_verification_status(@current_user.icn, access_token.client_id, access_token.rsa_key) + response = service.get_vet_verification_status(@current_user.icn) response['data']['id'] = '' render json: response @@ -19,10 +18,6 @@ def show def service @service ||= VeteranVerification::Service.new end - - def settings - Settings.lighthouse.veteran_verification['status'] - end end end end diff --git a/app/controllers/v0/test_account_user_emails_controller.rb b/app/controllers/v0/test_account_user_emails_controller.rb new file mode 100644 index 00000000000..b5c537bcc34 --- /dev/null +++ b/app/controllers/v0/test_account_user_emails_controller.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module V0 + class TestAccountUserEmailsController < ApplicationController + service_tag 'identity' + skip_before_action :authenticate + + NAMESPACE = 'test_account_user_email' + TTL = 2_592_000 + + def create + email_redis_key = SecureRandom.uuid + Rails.cache.write(email_redis_key, create_params, namespace: NAMESPACE, expires_in: TTL) + + Rails.logger.info("[V0][TestAccountUserEmailsController] create, key:#{email_redis_key}") + + render json: { test_account_user_email_uuid: email_redis_key }, status: :created + rescue + render json: { errors: 'invalid params' }, status: :bad_request + end + + def create_params + params.require(:email) + end + end +end diff --git a/app/controllers/v1/sessions_controller.rb b/app/controllers/v1/sessions_controller.rb index fdebee29e18..bdf9d5cfe6f 100644 --- a/app/controllers/v1/sessions_controller.rb +++ b/app/controllers/v1/sessions_controller.rb @@ -30,7 +30,8 @@ class SessionsController < ApplicationController FIM_INVALID_MESSAGE_TIMESTAMP = 'invalid_message_timestamp' OPERATION_TYPES = [AUTHORIZE = 'authorize', INTERSTITIAL_VERIFY = 'interstitial_verify', - INTERSTITIAL_SIGNUP = 'interstitial_signup'].freeze + INTERSTITIAL_SIGNUP = 'interstitial_signup', + MYHEALTHEVET_TEST_ACCOUNT = 'myhealthevet_test_account'].freeze # Collection Action: auth is required for certain types of requests # @type is set automatically by the routes in config/routes.rb @@ -374,7 +375,7 @@ def handle_callback_error(exc, status, response, level = :error, context = {}, else exc.message end - conditional_log_message_to_sentry(message, level, context, code) + conditional_log_message_to_sentry(message, level, context) Rails.logger.info("SessionsController version:v1 saml_callback failure, user_uuid=#{@current_user&.uuid}") unless performed? @@ -393,14 +394,11 @@ def handle_callback_error(exc, status, response, level = :error, context = {}, end # rubocop:enable Metrics/ParameterLists - def conditional_log_message_to_sentry(message, level, context, code) - # If our error is that we have multiple mhv ids, this is a case where we won't log in the user, - # but we give them a path to resolve this. So we don't want to throw an error, and we don't want - # to pollute Sentry with this condition, but we will still log in case we want metrics in - # Cloudwatch or any other log aggregator. Additionally, if the user has an invalid message timestamp + def conditional_log_message_to_sentry(message, level, context) + # If the user has an invalid message timestamp # error, this means they have waited too long in the log in page to progress, so it's not really an # appropriate Sentry error - if code == SAML::UserAttributeError::MULTIPLE_MHV_IDS_CODE || invalid_message_timestamp_error?(message) + if invalid_message_timestamp_error?(message) Rails.logger.warn("SessionsController version:v1 context:#{context} message:#{message}") else log_message_to_sentry(message, level, extra_context: context) diff --git a/app/mailers/create_excel_files_mailer.rb b/app/mailers/create_excel_files_mailer.rb new file mode 100644 index 00000000000..675a6f2d30d --- /dev/null +++ b/app/mailers/create_excel_files_mailer.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class CreateExcelFilesMailer < ApplicationMailer + def build(filename) + date = Time.zone.now.strftime('%m/%d/%Y') + file_contents = File.read("tmp/#{filename}") + headers['Content-Disposition'] = "attachment; filename=#{filename}" + + # rubocop:disable Layout/LineLength + recipients = Settings.vsp_environment.eql?('production') ? Settings.edu.production_excel_contents.emails : Settings.edu.staging_excel_contents.emails + subject = Settings.vsp_environment.eql?('production') ? "22-10282 Form CSV file for #{date}" : "Staging CSV file for #{date}" + # rubocop:enable Layout/LineLength + + mail( + to: recipients, + subject: subject, + content_type: 'text/csv', + body: file_contents + ) + end +end diff --git a/app/models/appeal_submission.rb b/app/models/appeal_submission.rb index 0acfb04a2ae..0a57ec03742 100644 --- a/app/models/appeal_submission.rb +++ b/app/models/appeal_submission.rb @@ -40,7 +40,8 @@ class AppealSubmission < ApplicationRecord scope :failure_not_sent, -> { where(failure_notification_sent_at: nil).order(id: :asc) } - def self.submit_nod(request_body_hash:, current_user:, decision_review_service: nil) + def self.submit_nod(request_body_hash:, current_user:, decision_review_service: nil, + submit_upload_job: DecisionReview::SubmitUpload) ActiveRecord::Base.transaction do raise 'Must pass in a version of the DecisionReview Service' if decision_review_service.nil? @@ -65,16 +66,16 @@ def self.submit_nod(request_body_hash:, current_user:, decision_review_service: # Clear in-progress form if submit was successful InProgressForm.form_for_user('10182', current_user)&.destroy! - appeal_submission.enqueue_uploads(uploads_arr, current_user) + appeal_submission.enqueue_uploads(uploads_arr, current_user, submit_upload_job) nod_response_body end end - def enqueue_uploads(uploads_arr, _user) + def enqueue_uploads(uploads_arr, _user, submit_upload_job) uploads_arr.each do |upload_attrs| asu = AppealSubmissionUpload.create!(decision_review_evidence_attachment_guid: upload_attrs['confirmationCode'], appeal_submission_id: id) - DecisionReview::SubmitUpload.perform_async(asu.id) + submit_upload_job.perform_async(asu.id) end end diff --git a/app/models/education_benefits_claim.rb b/app/models/education_benefits_claim.rb index 2fd99f8ea2c..0c7f43a97b6 100644 --- a/app/models/education_benefits_claim.rb +++ b/app/models/education_benefits_claim.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class EducationBenefitsClaim < ApplicationRecord - FORM_TYPES = %w[1990 1995 1990e 5490 5495 1990n 0993 0994 10203 1990s].freeze + FORM_TYPES = %w[1990 1995 1990e 5490 5495 1990n 0993 0994 10203 1990s 10282].freeze APPLICATION_TYPES = %w[ chapter33 diff --git a/app/models/excel_file_event.rb b/app/models/excel_file_event.rb new file mode 100644 index 00000000000..695a9d90f55 --- /dev/null +++ b/app/models/excel_file_event.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class ExcelFileEvent < ApplicationRecord + validates :filename, uniqueness: true + + # Look for an existing row with same filename + # and increase retry attempt if wasn't successful from previous attempt + # Otherwise create a new event + def self.build_event(filename) + filename_date = filename.match(/(.+)_/)[1] + event = find_by('filename like ?', "#{filename_date}%") + + if event.present? + event.update(retry_attempt: event.retry_attempt + 1) if event.successful_at.nil? + return event + end + + create(filename: filename) + end +end diff --git a/app/models/form_profile.rb b/app/models/form_profile.rb index b37d108c0c1..3035ef5c188 100644 --- a/app/models/form_profile.rb +++ b/app/models/form_profile.rb @@ -92,7 +92,7 @@ class FormProfile 22-5495 22-0993 22-0994 FEEDBACK-TOOL 22-10203 22-1990S 22-1990EZ], evss: ['21-526EZ'], hca: %w[1010ez 10-10EZR], - pension_burial: %w[21P-530 21P-527EZ 21P-530V2], + pension_burial: %w[21P-530EZ 21P-527EZ], dependents: ['686C-674'], decision_review: %w[20-0995 20-0996 10182], mdot: ['MDOT'], @@ -126,8 +126,7 @@ class FormProfile '22-5490' => ::FormProfiles::VA5490, '22-5490E' => ::FormProfiles::VA5490e, '22-5495' => ::FormProfiles::VA5495, - '21P-530' => ::FormProfiles::VA21p530, - '21P-530V2' => ::FormProfiles::VA21p530v2, + '21P-530EZ' => ::FormProfiles::VA21p530ez, '21-686C' => ::FormProfiles::VA21686c, '686C-674' => ::FormProfiles::VA686c674, '40-10007' => ::FormProfiles::VA4010007, diff --git a/app/models/form_profiles/va_10282.rb b/app/models/form_profiles/va_10282.rb new file mode 100644 index 00000000000..a8dd26e55cc --- /dev/null +++ b/app/models/form_profiles/va_10282.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class FormProfiles::VA10282 < FormProfile + def metadata + { + version: 0, + prefill: true, + returnUrl: '/applicant/information' + } + end +end diff --git a/app/models/form_profiles/va_2122.rb b/app/models/form_profiles/va_2122.rb index 51c0fe6f9a6..8638c39ee14 100644 --- a/app/models/form_profiles/va_2122.rb +++ b/app/models/form_profiles/va_2122.rb @@ -22,7 +22,7 @@ def metadata { version: 0, prefill: true, - returnUrl: '/claimant-information' + returnUrl: '/claimant-type' } end diff --git a/app/models/form_profiles/va_2122a.rb b/app/models/form_profiles/va_2122a.rb index 53a93701020..3c7d61de5b5 100644 --- a/app/models/form_profiles/va_2122a.rb +++ b/app/models/form_profiles/va_2122a.rb @@ -22,7 +22,7 @@ def metadata { version: 0, prefill: true, - returnUrl: '/claimant-information' + returnUrl: '/claimant-type' } end diff --git a/app/models/form_profiles/va_21p530.rb b/app/models/form_profiles/va_21p530.rb deleted file mode 100644 index b21807f1ac5..00000000000 --- a/app/models/form_profiles/va_21p530.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'iso_country_codes' - -class FormProfiles::VA21p530 < FormProfile - def metadata - { - version: 0, - prefill: true, - returnUrl: '/claimant-information' - } - end - - def prefill - @identity_information = initialize_identity_information - @contact_information = initialize_contact_information - if @contact_information&.address&.country.present? - @contact_information.address.country = convert_to_iso2(@contact_information.address.country) - end - mappings = self.class.mappings_for_form(form_id) - - form_data = generate_prefill(mappings) if FormProfile.prefill_enabled_forms.include?(form_id) - - { form_data:, metadata: } - end - - private - - def convert_to_iso2(country_code) - code = IsoCountryCodes.find(country_code) - code.alpha2 - end -end diff --git a/app/models/form_profiles/va_21p530v2.rb b/app/models/form_profiles/va_21p530ez.rb similarity index 94% rename from app/models/form_profiles/va_21p530v2.rb rename to app/models/form_profiles/va_21p530ez.rb index b799953dad4..d1e8cc53309 100644 --- a/app/models/form_profiles/va_21p530v2.rb +++ b/app/models/form_profiles/va_21p530ez.rb @@ -2,7 +2,7 @@ require 'iso_country_codes' -class FormProfiles::VA21p530v2 < FormProfile +class FormProfiles::VA21p530ez < FormProfile def metadata { version: 0, diff --git a/app/models/health_care_application.rb b/app/models/health_care_application.rb index 5fc081a9527..090b2ea5f55 100644 --- a/app/models/health_care_application.rb +++ b/app/models/health_care_application.rb @@ -14,6 +14,10 @@ class HealthCareApplication < ApplicationRecord FORM_ID = '10-10EZ' ACTIVEDUTY_ELIGIBILITY = 'TRICARE' DISABILITY_THRESHOLD = 50 + DD_ZSF_TAGS = [ + 'service:healthcare-application', + 'function: 10-10EZ async form submission' + ].freeze LOCKBOX = Lockbox.new(key: Settings.lockbox.master_key, encode: true) attr_accessor :user, :async_compatible, :google_analytics_client_id, :form @@ -255,15 +259,14 @@ def log_sync_submission_failure end def log_async_submission_failure - log_zero_silent_failures + log_zero_silent_failures unless Flipper.enabled?(:hca_zero_silent_failures) StatsD.increment("#{HCA::Service::STATSD_KEY_PREFIX}.failed_wont_retry") StatsD.increment("#{HCA::Service::STATSD_KEY_PREFIX}.failed_wont_retry_short_form") if short_form? log_submission_failure_details end def log_zero_silent_failures - tags = ['service:healthcare-application', 'function: 10-10EZ async form submission'] - StatsD.increment('silent_failure_avoided_no_confirmation', tags:) + StatsD.increment('silent_failure_avoided_no_confirmation', tags: DD_ZSF_TAGS) end def log_submission_failure_details @@ -292,13 +295,19 @@ def send_failure_email api_key = Settings.vanotify.services.health_apps_1010.api_key salutation = first_name ? "Dear #{first_name}," : '' + metadata = + { + callback_metadata: { + notification_type: 'error', + form_number: FORM_ID, + statsd_tags: DD_ZSF_TAGS + } + } - VANotify::EmailJob.perform_async( - email, - template_id, - { 'salutation' => salutation }, - api_key - ) + params = [email, template_id, { 'salutation' => salutation }, api_key] + params << metadata if Flipper.enabled?(:hca_zero_silent_failures) + + VANotify::EmailJob.perform_async(*params) StatsD.increment("#{HCA::Service::STATSD_KEY_PREFIX}.submission_failure_email_sent") rescue => e log_exception_to_sentry(e) diff --git a/app/models/in_progress_form.rb b/app/models/in_progress_form.rb index 47e0acf78ce..9f222cc071c 100644 --- a/app/models/in_progress_form.rb +++ b/app/models/in_progress_form.rb @@ -142,7 +142,7 @@ def days_till_expires def default_expires_after case form_id - when '21-526EZ', '21P-527EZ', '21P-530V2' + when '21-526EZ', '21P-527EZ', '21P-530EZ' 1.year else 60.days diff --git a/app/models/mhv_user_account.rb b/app/models/mhv_user_account.rb index 1083b77c8ff..cb036f12451 100644 --- a/app/models/mhv_user_account.rb +++ b/app/models/mhv_user_account.rb @@ -10,6 +10,7 @@ class MHVUserAccount attribute :patient, :boolean attribute :sm_account_created, :boolean attribute :message, :string + alias_attribute :id, :user_profile_id validates :user_profile_id, presence: true validates :premium, :champ_va, :patient, :sm_account_created, inclusion: { in: [true, false] } diff --git a/app/models/persistent_attachment.rb b/app/models/persistent_attachment.rb index f37730ed72b..ac967d3f5af 100644 --- a/app/models/persistent_attachment.rb +++ b/app/models/persistent_attachment.rb @@ -8,6 +8,9 @@ class PersistentAttachment < ApplicationRecord include SetGuid + ALLOWED_DOCUMENT_TYPES = %w[.pdf .jpg .jpeg .png].freeze + MINIMUM_FILE_SIZE = 1.kilobyte.freeze + has_kms_key has_encrypted :file_data, key: :kms_key, **lockbox_options belongs_to :saved_claim, inverse_of: :persistent_attachments, optional: true diff --git a/app/models/prescription_details.rb b/app/models/prescription_details.rb index 51dd21ba03a..ac495b8c1ec 100644 --- a/app/models/prescription_details.rb +++ b/app/models/prescription_details.rb @@ -31,6 +31,7 @@ class PrescriptionDetails < Prescription attribute :color, String attribute :back_imprint, String attribute :front_imprint, String + attribute :grouped_medications, Array[String] def sorted_dispensed_date has_refills = try(:rx_rf_records).present? diff --git a/app/models/saved_claim.rb b/app/models/saved_claim.rb index d81c8091ef9..98509688106 100644 --- a/app/models/saved_claim.rb +++ b/app/models/saved_claim.rb @@ -35,7 +35,7 @@ class SavedClaim < ApplicationRecord # create a uuid for this second (used in the confirmation number) and store # the form type based on the constant found in the subclass. after_initialize do - self.form_id = self.class::FORM.upcase unless instance_of?(::SavedClaim::Burial) + self.form_id = self.class::FORM.upcase end def self.add_form_and_validation(form_id) @@ -99,6 +99,8 @@ def form_matches_schema unless validation_errors.empty? Rails.logger.error('SavedClaim form did not pass validation', { guid:, errors: validation_errors }) end + + schema_errors.empty? && validation_errors.empty? end def to_pdf(file_name = nil) @@ -147,14 +149,57 @@ def va_notification?(email_template_id) private + # Depending on the feature flipper, validate the *entire schema* + # via either the json_schema or json_schemer gem. + # This is tied to vets-api #19684 def validate_schema(schema) + if Flipper.enabled?(:validate_saved_claims_with_json_schemer) + validate_schema_with_json_schemer(schema) + else + validate_schema_with_json_schema(schema) + end + end + + # Depending on the feature flipper, validate the *parsed form* + # via either the json_schema or the json_schemer gem. + # This is tied to vets-api #19684 + def validate_form(schema, clear_cache) + if Flipper.enabled?(:validate_saved_claims_with_json_schemer) + validate_form_with_json_schemer(schema) + else + validate_form_with_json_schema(schema, clear_cache) + end + end + + # For json_schemer, the default behavior is not to raise an exception + # on validation, so we return an array of errors if they exist. + # This method validates the *entire schema*. + def validate_schema_with_json_schemer(schema) + errors = JSONSchemer.validate_schema(schema).to_a + return [] if errors.empty? + + reformatted_schemer_errors(errors) + end + + # For json_schema, validation errors raise an exception. + # This method validates the *entire schema*. + def validate_schema_with_json_schema(schema) JSON::Validator.fully_validate_schema(schema, { errors_as_objects: true }) rescue => e Rails.logger.error('Error during schema validation!', { error: e.message, backtrace: e.backtrace, schema: }) raise end - def validate_form(schema, clear_cache) + # This method validates the *parsed form* with json_schemer. + def validate_form_with_json_schemer(schema) + errors = JSONSchemer.schema(schema).validate(parsed_form).to_a + return [] if errors.empty? + + reformatted_schemer_errors(errors) + end + + # This method validates the *parsed form* with json_schema. + def validate_form_with_json_schema(schema, clear_cache) JSON::Validator.fully_validate(schema, parsed_form, { errors_as_objects: true, clear_cache: }) rescue => e PersonalInformationLog.create(data: { schema:, parsed_form:, params: { errors_as_objects: true, clear_cache: } }, @@ -164,6 +209,18 @@ def validate_form(schema, clear_cache) raise end + # This method exists to change the json_schemer errors + # to be formatted like json_schema errors, which keeps + # the error logging smooth and identical for both options. + def reformatted_schemer_errors(errors) + errors.map!(&:symbolize_keys) + errors.each do |error| + error[:fragment] = error[:data_pointer] + error[:message] = error[:error] + end + errors + end + def attachment_keys [] end diff --git a/app/models/saved_claim/burial.rb b/app/models/saved_claim/burial.rb index c1e5d255c66..8d1ecef0c07 100644 --- a/app/models/saved_claim/burial.rb +++ b/app/models/saved_claim/burial.rb @@ -3,18 +3,7 @@ require 'pension_burial/processing_office' class SavedClaim::Burial < SavedClaim - FORM = '21P-530' - - # attribute name is passed from the FE as a flag, maintaining camel case - attr_accessor :formV2 # rubocop:disable Naming/MethodName - - after_initialize do - self.form_id = if Flipper.enabled?(:va_burial_v2) - formV2 || form_id == '21P-530V2' ? '21P-530V2' : self.class::FORM.upcase - else - self.class::FORM.upcase - end - end + FORM = '21P-530EZ' def process_attachments! refs = attachment_keys.map { |key| Array(open_struct_form.send(key)) }.flatten diff --git a/app/models/saved_claim/education_benefits/va_10282.rb b/app/models/saved_claim/education_benefits/va_10282.rb new file mode 100644 index 00000000000..ac108796e24 --- /dev/null +++ b/app/models/saved_claim/education_benefits/va_10282.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class SavedClaim::EducationBenefits::VA10282 < SavedClaim::EducationBenefits + add_form_and_validation('22-10282') + + def after_submit(_user) + return unless Flipper.enabled?(:form22_10282_confirmation_email) + + parsed_form_data = JSON.parse(form) + email = parsed_form_data['email'] + return if email.blank? + + send_confirmation_email(parsed_form_data, email) + end + + private + + def send_confirmation_email(parsed_form_data, email) + VANotify::EmailJob.perform_async( + email, + Settings.vanotify.services.va_gov.template_id.form22_10282_confirmation_email, + { + 'first_name' => parsed_form_data.dig('veteranFullName', 'first')&.upcase.presence, + 'date_submitted' => Time.zone.today.strftime('%B %d, %Y'), + 'confirmation_number' => education_benefits_claim.confirmation_number + } + ) + end +end diff --git a/app/models/user.rb b/app/models/user.rb index ed0e6738041..d7e99dc14d8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -98,6 +98,7 @@ def pciu_alternate_phone delegate :idme_uuid, to: :identity, allow_nil: true delegate :loa3?, to: :identity, allow_nil: true delegate :logingov_uuid, to: :identity, allow_nil: true + delegate :mhv_credential_uuid, to: :identity, allow_nil: true delegate :mhv_icn, to: :identity, allow_nil: true delegate :multifactor, to: :identity, allow_nil: true delegate :sign_in, to: :identity, allow_nil: true, prefix: true @@ -152,20 +153,16 @@ def mhv_account_type end def mhv_correlation_id - identity.mhv_correlation_id || mpi_mhv_correlation_id + return mhv_user_account.id if mhv_user_account.present? + + mpi_mhv_correlation_id if active_mhv_ids&.one? end def mhv_user_account - @mhv_user_account ||= if va_patient? - MHV::UserAccount::Creator.new(user_verification:).perform - else - log_mhv_user_account_error('User has no va_treatment_facility_ids') - - nil - end - rescue MHV::UserAccount::Errors::UserAccountError => e + @mhv_user_account ||= MHV::UserAccount::Creator.new(user_verification:).perform + rescue => e log_mhv_user_account_error(e.message) - raise + nil end def middle_name @@ -473,9 +470,7 @@ def create_mhv_account_async end def can_create_mhv_account? - return false unless Flipper.enabled?(:mhv_account_creation_after_login, user_account) - - loa3? && va_patient? && !needs_accepted_terms_of_use + loa3? && !needs_accepted_terms_of_use end private @@ -496,7 +491,7 @@ def mpi def get_user_verification case identity_sign_in&.dig(:service_name) when SAML::User::MHV_ORIGINAL_CSID - return UserVerification.find_by(mhv_uuid: mhv_correlation_id) if mhv_correlation_id + return UserVerification.find_by(mhv_uuid: mhv_credential_uuid) if mhv_credential_uuid when SAML::User::DSLOGON_CSID return UserVerification.find_by(dslogon_uuid: identity.edipi) if identity.edipi when SAML::User::LOGINGOV_CSID diff --git a/app/models/user_identity.rb b/app/models/user_identity.rb index f65a91a4ffa..ab40985c8de 100644 --- a/app/models/user_identity.rb +++ b/app/models/user_identity.rb @@ -29,7 +29,7 @@ class UserIdentity < Common::RedisStore attribute :verified_at # Login.gov IAL2 verification timestamp attribute :sec_id attribute :mhv_icn # only needed by B/E not serialized in user_serializer - attribute :mhv_correlation_id # this is the cannonical version of MHV Correlation ID, provided by MHV sign-in users + attribute :mhv_credential_uuid attribute :mhv_account_type # this is only available for MHV sign-in users attribute :edipi # this is only available for dslogon users attribute :sign_in, Hash # original sign_in (see sso_service#mergable_identity_attributes) diff --git a/app/policies/vye_policy.rb b/app/policies/vye_policy.rb new file mode 100644 index 00000000000..b07fa2733a8 --- /dev/null +++ b/app/policies/vye_policy.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +VyePolicy = Struct.new(:user, :user_info) do + def access? + user.present? + end +end diff --git a/app/serializers/submission_status_serializer.rb b/app/serializers/submission_status_serializer.rb index 1751ccf849d..327b5377eed 100644 --- a/app/serializers/submission_status_serializer.rb +++ b/app/serializers/submission_status_serializer.rb @@ -3,5 +3,5 @@ class SubmissionStatusSerializer include JSONAPI::Serializer - attributes :id, :detail, :form_type, :message, :status, :created_at, :updated_at + attributes :id, :detail, :form_type, :message, :status, :created_at, :updated_at, :pdf_support end diff --git a/app/services/login/after_login_actions.rb b/app/services/login/after_login_actions.rb index 18464aa4d6d..728b4c57cc9 100644 --- a/app/services/login/after_login_actions.rb +++ b/app/services/login/after_login_actions.rb @@ -48,7 +48,7 @@ def id_mismatch_validations check_id_mismatch(current_user.identity.icn, current_user.mpi_icn, 'User Identity & MPI ICN values conflict') check_id_mismatch(current_user.identity.edipi, current_user.edipi_mpi, 'User Identity & MPI EDIPI values conflict') - check_id_mismatch(current_user.identity.mhv_correlation_id, current_user.mpi_mhv_correlation_id, + check_id_mismatch(current_user.identity.mhv_credential_uuid, current_user.mpi_mhv_correlation_id, 'User Identity & MPI MHV Correlation ID values conflict') end diff --git a/app/services/login/user_verifier.rb b/app/services/login/user_verifier.rb index c2e6ad2ed63..a001bb30d1f 100644 --- a/app/services/login/user_verifier.rb +++ b/app/services/login/user_verifier.rb @@ -5,7 +5,7 @@ class UserVerifier def initialize(user) @login_type = user.sign_in&.dig(:service_name) @auth_broker = user.sign_in&.dig(:auth_broker) - @mhv_uuid = user.mhv_correlation_id + @mhv_uuid = user.mhv_credential_uuid @idme_uuid = user.idme_uuid @dslogon_uuid = user.edipi @logingov_uuid = user.logingov_uuid diff --git a/app/services/sign_in/attribute_validator.rb b/app/services/sign_in/attribute_validator.rb index bda8269a31a..23bae1e1e9f 100644 --- a/app/services/sign_in/attribute_validator.rb +++ b/app/services/sign_in/attribute_validator.rb @@ -15,7 +15,7 @@ class AttributeValidator :ssn, :mhv_icn, :edipi, - :mhv_correlation_id + :mhv_credential_uuid def initialize(user_attributes:) @idme_uuid = user_attributes[:idme_uuid] @@ -31,7 +31,7 @@ def initialize(user_attributes:) @ssn = user_attributes[:ssn] @mhv_icn = user_attributes[:mhv_icn] @edipi = user_attributes[:edipi] - @mhv_correlation_id = user_attributes[:mhv_correlation_id] + @mhv_credential_uuid = user_attributes[:mhv_credential_uuid] end def perform @@ -59,8 +59,9 @@ def validate_existing_mpi_attributes check_lock_flag(mpi_response_profile.id_theft_flag, 'Theft Flag', Constants::ErrorCode::MPI_LOCKED_ACCOUNT) check_lock_flag(mpi_response_profile.deceased_date, 'Death Flag', Constants::ErrorCode::MPI_LOCKED_ACCOUNT) check_id_mismatch(mpi_response_profile.edipis, 'EDIPI', Constants::ErrorCode::MULTIPLE_EDIPI) - check_id_mismatch(mpi_response_profile.mhv_iens, 'MHV_ID', Constants::ErrorCode::MULTIPLE_MHV_IEN) check_id_mismatch(mpi_response_profile.participant_ids, 'CORP_ID', Constants::ErrorCode::MULTIPLE_CORP_ID) + check_id_mismatch(mpi_response_profile.mhv_iens, 'MHV_ID', Constants::ErrorCode::MULTIPLE_MHV_IEN, + raise_error: false) end def add_mpi_user @@ -108,7 +109,7 @@ def user_attribute_mismatch_checks def validate_credential_attributes if mhv_auth? credential_attribute_check(:icn, mhv_icn) - credential_attribute_check(:mhv_uuid, mhv_correlation_id) + credential_attribute_check(:mhv_uuid, mhv_credential_uuid) else credential_attribute_check(:dslogon_uuid, edipi) if dslogon_auth? credential_attribute_check(:last_name, last_name) unless auto_uplevel @@ -154,26 +155,26 @@ def check_lock_flag(attribute, attribute_description, code) handle_error("#{attribute_description} Detected", code, error: Errors::MPILockedAccountError) if attribute end - def check_id_mismatch(id_array, id_description, code) + def check_id_mismatch(id_array, id_description, code, raise_error: true) if id_array && id_array.compact.uniq.size > 1 handle_error("User attributes contain multiple distinct #{id_description} values", code, - error: Errors::MPIMalformedAccountError) + error: Errors::MPIMalformedAccountError, raise_error:) end end - def handle_error(error_message, error_code, error: nil) + def handle_error(error_message, error_code, error: nil, raise_error: true) sign_in_logger.info('attribute validator error', { errors: error_message, credential_uuid:, mhv_icn:, type: service_name }.compact) - raise error.new message: error_message, code: error_code if error + raise error.new message: error_message, code: error_code if error && raise_error end def mpi_response_profile @mpi_response_profile ||= - if mhv_correlation_id - mpi_service.find_profile_by_identifier(identifier: mhv_correlation_id, + if mhv_credential_uuid + mpi_service.find_profile_by_identifier(identifier: mhv_credential_uuid, identifier_type: MPI::Constants::MHV_UUID)&.profile elsif idme_uuid mpi_service.find_profile_by_identifier(identifier: idme_uuid, diff --git a/app/services/sign_in/user_code_map_creator.rb b/app/services/sign_in/user_code_map_creator.rb index e04561a57f6..bc3de6fb069 100644 --- a/app/services/sign_in/user_code_map_creator.rb +++ b/app/services/sign_in/user_code_map_creator.rb @@ -9,7 +9,7 @@ class UserCodeMapCreator :all_credential_emails, :verified_icn, :edipi, - :mhv_correlation_id, + :mhv_credential_uuid, :request_ip, :first_name, :last_name @@ -21,7 +21,7 @@ def initialize(user_attributes:, state_payload:, verified_icn:, request_ip:) @credential_email = user_attributes[:csp_email] @all_credential_emails = user_attributes[:all_csp_emails] @edipi = user_attributes[:edipi] - @mhv_correlation_id = user_attributes[:mhv_correlation_id] + @mhv_credential_uuid = user_attributes[:mhv_credential_uuid] @verified_icn = verified_icn @request_ip = request_ip @first_name = user_attributes[:first_name] @@ -71,7 +71,7 @@ def user_verifier_object logingov_uuid:, sign_in:, edipi:, - mhv_correlation_id:, + mhv_credential_uuid:, icn: verified_icn }) end diff --git a/app/services/submission_pdf_url_service.rb b/app/services/submission_pdf_url_service.rb deleted file mode 100644 index d9e1e0e58bc..00000000000 --- a/app/services/submission_pdf_url_service.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -require 'simple_forms_api/form_remediation/configuration/vff_config' - -class SubmissionPdfUrlService - VFF_FORMS = %w[20-10206 20-10207 21-0845 21-0966 21-0972 21-10210 21-4138 21-4142 21P-0847 26-4555 40-0247 - 40-10007].freeze - - def initialize(form_id:, submission_guid:) - @form_id = form_id - @submission_guid = submission_guid - end - - def fetch_url - config = determine_config - SimpleFormsApi::FormRemediation::S3Client.fetch_presigned_url(@submission_guid, config:) - end - - private - - def determine_config - return SimpleFormsApi::FormRemediation::Configuration::VffConfig.new if VFF_FORMS.include?(@form_id) - - raise Common::Exceptions::Forbidden, detail: "Form '#{@form_id}' does not support pdf downloads" - end -end diff --git a/app/sidekiq/benefits_intake_status_job.rb b/app/sidekiq/benefits_intake_status_job.rb index fe430fff4e2..deccfc05ce7 100644 --- a/app/sidekiq/benefits_intake_status_job.rb +++ b/app/sidekiq/benefits_intake_status_job.rb @@ -4,7 +4,7 @@ require 'lighthouse/benefits_intake/service' require 'pensions/monitor' require 'pensions/notification_email' -require 'va_notify/notification_email/burial' +require 'burials/notification_email' require 'pcpg/monitor' require 'dependents/monitor' require 'vre/monitor' @@ -139,7 +139,7 @@ def monitor_failure(form_id, saved_claim_id, bi_uuid) } call_location = caller_locations.first - if %w[21P-530V2 21P-530].include?(form_id) + if %w[21P-530EZ 21P-530V2].include?(form_id) claim = SavedClaim::Burial.find(saved_claim_id) if claim Burials::NotificationEmail.new(claim.id).deliver(:error) diff --git a/app/sidekiq/education_form/create_daily_excel_files.rb b/app/sidekiq/education_form/create_daily_excel_files.rb new file mode 100644 index 00000000000..39e8d668da2 --- /dev/null +++ b/app/sidekiq/education_form/create_daily_excel_files.rb @@ -0,0 +1,194 @@ +# frozen_string_literal: true + +require 'sentry_logging' +require 'sftp_writer/factory' + +module EducationForm + class DailyExcelFileError < StandardError + end + + class CreateDailyExcelFiles + MAX_RETRIES = 5 + STATSD_KEY = 'worker.education_benefits_claim' + STATSD_FAILURE_METRIC = "#{STATSD_KEY}.failed_excel_file".freeze + LIVE_FORM_TYPES = ['22-10282'].freeze + AUTOMATED_DECISIONS_STATES = [nil, 'denied', 'processed'].freeze + EXCEL_FIELDS = %w[ + name + first_name + last_name + military_affiliation + phone_number + email_address + country + state + race_ethnicity + gender + education_level + employment_status + salary + technology_industry + ].freeze + HEADERS = ['Name', 'First Name', 'Last Name', 'Select Military Affiliation', + 'Phone Number', 'Email Address', 'Country', 'State', 'Race/Ethnicity', + 'Gender of Applicant', 'What is your highest level of education?', + 'Are you currently employed?', 'What is your current salary?', + 'Are you currently working in the technology industry? (If so, please select one)'].freeze + include Sidekiq::Job + include SentryLogging + sidekiq_options queue: 'default', + unique_for: 30.minutes, + retry: 5 + + # rubocop:disable Metrics/MethodLength + def perform + retry_count = 0 + filename = "22-10282_#{Time.zone.now.strftime('%m%d%Y_%H%M%S')}.csv" + excel_file_event = ExcelFileEvent.build_event(filename) + begin + records = EducationBenefitsClaim + .unprocessed + .joins(:saved_claim) + .where( + saved_claims: { + form_id: LIVE_FORM_TYPES + } + ) + return false if federal_holiday? + + if records.count.zero? + log_info('No records to process.') + return true + elsif retry_count.zero? + log_info("Processing #{records.count} application(s)") + end + + # Format the records and write to CSV file + formatted_records = format_records(records) + write_csv_file(formatted_records, filename) + + email_excel_files(filename) + + # Make records processed and add excel file event for rake job + records.each { |r| r.update(processed_at: Time.zone.now) } + excel_file_event.update(number_of_submissions: records.count, successful_at: Time.zone.now) + rescue => e + StatsD.increment("#{STATSD_FAILURE_METRIC}.general") + if retry_count < MAX_RETRIES + log_exception(DailyExcelFileError.new("Error creating excel files.\n\n#{e} + Retry count: #{retry_count}. Retrying..... ")) + retry_count += 1 + sleep(10 * retry_count) # exponential backoff for retries + retry + else + log_exception(DailyExcelFileError.new("Error creating excel files. + Job failed after #{MAX_RETRIES} retries \n\n#{e}")) + end + end + true + end + + def write_csv_file(records, filename) + retry_count = 0 + + begin + # Generate CSV string content instead of writing to file + csv_contents = CSV.generate do |csv| + # Add headers + csv << HEADERS + + # Add data rows + records.each_with_index do |record, index| + log_info("Processing record #{index + 1}: #{record.inspect}") + + begin + row_data = EXCEL_FIELDS.map do |field| + value = record.public_send(field) + value.is_a?(Hash) ? value.to_s : value + end + + csv << row_data + rescue => e + log_exception(DailyExcelFileError.new("Failed to add row #{index + 1}:\n")) + log_exception(DailyExcelFileError.new("#{e.message}\nRecord: #{record.inspect}")) + next + end + end + end + + # Write to file for backup/audit purposes + File.write("tmp/#{filename}", csv_contents) + log_info('Successfully created CSV file') + + # Return the CSV contents + csv_contents + rescue => e + StatsD.increment("#{STATSD_FAILURE_METRIC}.general") + log_exception(DailyExcelFileError.new('Error creating CSV files.')) + + if retry_count < MAX_RETRIES + log_exception(DailyExcelFileError.new("Retry count: #{retry_count}. Retrying..... ")) + retry_count += 1 + sleep(5) + retry + else + log_exception(DailyExcelFileError.new("Job failed after #{MAX_RETRIES} retries \n\n#{e}")) + end + end + end + # rubocop:enable Metrics/MethodLength + + def format_records(records) + records.map do |record| + format_application(record) + end.compact + end + + def format_application(data) + form = EducationForm::Forms::Base.build(data) + track_form_type("22-#{data.form_type}") + form + rescue => e + inform_on_error(data, e) + nil + end + + def inform_on_error(claim, error = nil) + StatsD.increment("#{STATSD_KEY}.failed_formatting.22-#{claim.form_type}") + exception = if error.present? + FormattingError.new("Could not format #{claim.confirmation_number}.\n\n#{error}") + else + FormattingError.new("Could not format #{claim.confirmation_number}") + end + log_exception(exception) + end + + private + + def federal_holiday? + holiday = Holidays.on(Time.zone.today, :us, :observed) + if holiday.empty? + false + else + log_info("Skipping on a Holiday: #{holiday.first[:name]}") + true + end + end + + def track_form_type(type) + StatsD.gauge("#{STATSD_KEY}.transmissions.#{type}", 1) + end + + def log_exception(exception) + log_exception_to_sentry(exception) + end + + def log_info(message) + logger.info(message) + end + + def email_excel_files(contents) + CreateExcelFilesMailer.build(contents).deliver_now + end + end +end diff --git a/app/sidekiq/education_form/forms/va_10282.rb b/app/sidekiq/education_form/forms/va_10282.rb new file mode 100644 index 00000000000..ff8be795ac6 --- /dev/null +++ b/app/sidekiq/education_form/forms/va_10282.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +module EducationForm::Forms + class VA10282 < Base + SALARY_TYPES = { + moreThanSeventyFive: 'More than $75,000', + thirtyFiveToFifty: '$35,000 - $50,000', + fiftyToSeventyFive: '$50,000 - $75,000', + twentyToThirtyFive: '$20,000 - $35,000', + lessThanTwenty: 'Less than $20,000' + }.freeze + + TECH_AREAS = { + CP: 'Computer Programming', + DP: 'Data Processing', + CS: 'Cyber Security', + IS: 'Information Security', + MA: 'Mobile Applications', + NA: 'Not Applicable' + }.freeze + + GENDER_TYPES = { + 'M' => 'Male', + 'W' => 'Female', + 'TW' => 'Transgender Woman', + 'TM' => 'Transgender Man', + 'NB' => 'Non-Binary', + '0' => 'Other', + 'NA' => 'Prefer Not to Answer' + }.freeze + + EDUCATION_LEVELS = { + 'HS' => 'High School', + 'AD' => 'Associate Degree', + 'BD' => "Bachelor's Degree", + 'MD' => "Master's Degree", + 'DD' => 'Doctorate Degree', + 'NA' => 'Prefer Not to Answer' + }.freeze + + MILITARY_TYPES = { + 'veteran' => 'Veteran', + 'veteransSpouse' => "Veteran's Spouse", + 'veteransChild' => "Veteran's Child", + 'veteransCaregiver' => "Veteran's Caregiver", + 'activeduty' => 'Active Duty', + 'nationalGuard' => 'National Guard', + 'reservist' => 'Reservist', + 'individualReadyReserve' => 'Individual Ready Reserve' + }.freeze + + ETHNICITY_TYPES = { + 'HL' => 'Hispanic or Latino', + 'NHL' => 'Not Hispanic or Latino', + 'NA' => 'Prefer Not to Answer' + }.freeze + + # rubocop:disable Lint/MissingSuper + def initialize(education_benefits_claim) + @education_benefits_claim = education_benefits_claim + @applicant = education_benefits_claim.parsed_form + end + # rubocop:enable Lint/MissingSuper + + def name + "#{first_name} #{last_name}" + end + + def first_name + @applicant['veteranFullName']['first'] + end + + def last_name + @applicant['veteranFullName']['last'] + end + + def military_affiliation + MILITARY_TYPES[@applicant['veteranDesc']] || 'Not specified' + end + + def phone_number + @applicant.dig('contactInfo', 'mobilePhone') || + @applicant.dig('contactInfo', 'homePhone') || + 'Not provided' + end + + def email_address + @applicant['contactInfo']['email'] + end + + def country + @applicant['country'] + end + + def state + @applicant['state'] + end + + def race_ethnicity + races = [] + origin_race = @applicant['originRace'] + + races << 'American Indian or Alaska Native' if origin_race['isAmericanIndianOrAlaskanNative'] + races << 'Asian' if origin_race['isAsian'] + races << 'Black or African American' if origin_race['isBlackOrAfricanAmerican'] + races << 'Native Hawaiian or Other Pacific Islander' if origin_race['isNativeHawaiianOrOtherPacificIslander'] + races << 'White' if origin_race['isWhite'] + races << 'Prefer Not to Answer' if origin_race['noAnswer'] + + return 'Not specified' if races.empty? + + races.join(', ') + end + + def gender + GENDER_TYPES[@applicant['gender']] || 'Not specified' + end + + def education_level + EDUCATION_LEVELS[@applicant['highestLevelOfEducation']['level']] || 'Not specified' + end + + def employment_status + @applicant['currentlyEmployed'] ? 'Yes' : 'No' + end + + def salary + SALARY_TYPES[@applicant['currentAnnualSalary']&.to_sym] || 'Not specified' + end + + def technology_industry + return 'No' unless @applicant['isWorkingInTechIndustry'] + + TECH_AREAS[@applicant['techIndustryFocusArea']&.to_sym] || 'Not specified' + end + + def header_form_type + 'V10282' + end + end +end diff --git a/app/sidekiq/education_form/templates/1995.erb b/app/sidekiq/education_form/templates/1995.erb index 3ea59e2d7ef..98b3b80e739 100644 --- a/app/sidekiq/education_form/templates/1995.erb +++ b/app/sidekiq/education_form/templates/1995.erb @@ -57,6 +57,8 @@ VA File Number: <%= value_or_na(@applicant.vaFileNumber) %> Benefit Most Recently Received: <%= form_benefit %> +Do you wish to request a 'Rudisill' review?: <%= @applicant.rudisillReview %> + Select Another Benefit: <%= @applicant.changeAnotherBenefit %> Benefit Being Applied For: <%= @applicant.benefitAppliedFor&.titleize %> diff --git a/app/sidekiq/evss/disability_compensation_form/submit_form0781.rb b/app/sidekiq/evss/disability_compensation_form/submit_form0781.rb index c06e9670303..c7cd83d69c3 100644 --- a/app/sidekiq/evss/disability_compensation_form/submit_form0781.rb +++ b/app/sidekiq/evss/disability_compensation_form/submit_form0781.rb @@ -30,10 +30,12 @@ class SubmitForm0781 < Job FORM_ID_0781 = '21-0781' # form id for PTSD FORM_ID_0781A = '21-0781a' # form id for PTSD Secondary to Personal Assault + FORM_ID_0781V2 = '21-0781V2' # form id for Mental Health Disorder(s) Due to In-Service Traumatic Event(s) FORMS_METADATA = { FORM_ID_0781 => { docType: 'L228' }, - FORM_ID_0781A => { docType: 'L229' } + FORM_ID_0781A => { docType: 'L229' }, + FORM_ID_0781V2 => { docType: 'L228' } }.freeze STATSD_KEY_PREFIX = 'worker.evss.submit_form0781' @@ -145,12 +147,17 @@ def get_docs(submission_id, uuid) @submission = Form526Submission.find_by(id: submission_id) file_type_and_file_objs = [] - { 'form0781' => FORM_ID_0781, 'form0781a' => FORM_ID_0781A }.each do |form_type_key, actual_form_types| - if parsed_forms[form_type_key].present? + { + 'form0781' => FORM_ID_0781, + 'form0781a' => FORM_ID_0781A, + 'form0781v2' => FORM_ID_0781V2 + }.each do |form_type_key, actual_form_types| + form_content = parsed_forms[form_type_key] + + if form_content.present? file_type_and_file_objs << { type: actual_form_types, - file: process_0781(uuid, actual_form_types, parsed_forms[form_type_key], - upload: false) + file: process_0781(uuid, actual_form_types, form_content, upload: false) } end end @@ -172,12 +179,14 @@ def perform(submission_id) super(submission_id) with_tracking('Form0781 Submission', submission.saved_claim_id, submission.id) do - # process 0781 and 0781a - if parsed_forms['form0781'].present? - process_0781(submission.submitted_claim_id, FORM_ID_0781, parsed_forms['form0781']) - end - if parsed_forms['form0781a'].present? - process_0781(submission.submitted_claim_id, FORM_ID_0781A, parsed_forms['form0781a']) + # process 0781, 0781a and 0781v2 + { + 'form0781' => FORM_ID_0781, + 'form0781a' => FORM_ID_0781A, + 'form0781v2' => FORM_ID_0781V2 + }.each do |form_key, form_id| + form_content = parsed_forms[form_key] + process_0781(submission.submitted_claim_id, form_id, form_content) if form_content.present? end end rescue => e diff --git a/app/sidekiq/evss/document_upload.rb b/app/sidekiq/evss/document_upload.rb index c7151f31050..c8486287b51 100644 --- a/app/sidekiq/evss/document_upload.rb +++ b/app/sidekiq/evss/document_upload.rb @@ -3,6 +3,7 @@ require 'ddtrace' require 'timeout' require 'logging/third_party_transaction' +require 'evss/failure_notification' class EVSS::DocumentUpload include Sidekiq::Job @@ -52,13 +53,9 @@ class EVSS::DocumentUpload date_submitted = format_issue_instant_for_mailers(msg['created_at']) date_failed = format_issue_instant_for_mailers(msg['failed_at']) - notify_client.send_email( - recipient_identifier: { id_value: icn, id_type: 'ICN' }, - template_id: MAILER_TEMPLATE_ID, - personalisation: { first_name:, filename:, date_submitted:, date_failed: } - ) + EVSS::FailureNotification.perform_async(icn, first_name, filename, date_submitted, date_failed) - ::Rails.logger.info('EVSS::DocumentUpload exhaustion handler email sent') + ::Rails.logger.info('EVSS::DocumentUpload exhaustion handler email queued') StatsD.increment('silent_failure_avoided_no_confirmation', tags: DD_ZSF_TAGS) rescue => e ::Rails.logger.error('EVSS::DocumentUpload exhaustion handler email error', @@ -101,10 +98,6 @@ def self.format_issue_instant_for_mailers(issue_instant) timestamp.strftime('%B %-d, %Y %-l:%M %P %Z').sub(/([ap])m/, '\1.m.') end - def self.notify_client - VaNotify::Service.new(NOTIFY_SETTINGS.api_key) - end - private def validate_document! diff --git a/app/sidekiq/evss/failure_notification.rb b/app/sidekiq/evss/failure_notification.rb new file mode 100644 index 00000000000..0fb573acbed --- /dev/null +++ b/app/sidekiq/evss/failure_notification.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +class EVSS::FailureNotification + include Sidekiq::Job + include SentryLogging + + NOTIFY_SETTINGS = Settings.vanotify.services.benefits_management_tools + MAILER_TEMPLATE_ID = NOTIFY_SETTINGS.template_id.evidence_submission_failure_email + + # retry for one day + sidekiq_options retry: 14, queue: 'low' + # Set minimum retry time to ~1 hour + sidekiq_retry_in do |count, _exception| + rand(3600..3660) if count < 9 + end + + sidekiq_retries_exhausted do + ::Rails.logger.info('EVSS::FailureNotification email could not be sent') + end + + def notify_client + VaNotify::Service.new(NOTIFY_SETTINGS.api_key) + end + + def perform(icn, first_name, filename, date_submitted, date_failed) + notify_client.send_email( + recipient_identifier: { id_value: icn, id_type: 'ICN' }, + template_id: MAILER_TEMPLATE_ID, + personalisation: { first_name:, filename:, date_submitted:, date_failed: } + ) + + ::Rails.logger.info('EVSS::FailureNotification email sent') + rescue => e + ::Rails.logger.error('EVSS::FailureNotification email error', + { message: e.message }) + log_exception_to_sentry(e) + end +end diff --git a/app/sidekiq/form1010cg/submission_job.rb b/app/sidekiq/form1010cg/submission_job.rb index 02c3cc5f809..81aeba7bc73 100644 --- a/app/sidekiq/form1010cg/submission_job.rb +++ b/app/sidekiq/form1010cg/submission_job.rb @@ -5,10 +5,20 @@ module Form1010cg class SubmissionJob STATSD_KEY_PREFIX = "#{Form1010cg::Auditor::STATSD_KEY_PREFIX}.async.".freeze + DD_ZSF_TAGS = [ - 'caregiver-application', + 'service:caregiver-application', 'function: 10-10CG async form submission' ].freeze + + CALLBACK_METADATA = { + callback_metadata: { + notification_type: 'error', + form_number: '10-10CG', + statsd_tags: DD_ZSF_TAGS + } + }.freeze + include Sidekiq::Job include Sidekiq::MonitoredWorker include SentryLogging @@ -19,12 +29,9 @@ class SubmissionJob sidekiq_retries_exhausted do |msg, _e| StatsD.increment("#{STATSD_KEY_PREFIX}failed_no_retries_left", tags: ["claim_id:#{msg['args'][0]}"]) - StatsD.increment('silent_failure_avoided_no_confirmation', tags: DD_ZSF_TAGS) - if Flipper.enabled?(:caregiver_use_va_notify_on_submission_failure) - claim = SavedClaim::CaregiversAssistanceClaim.find(msg['args'][0]) - send_failure_email(claim.parsed_form) if claim.parsed_form.dig('veteran', 'email') - end + claim = SavedClaim::CaregiversAssistanceClaim.find(msg['args'][0]) + send_failure_email(claim) end def retry_limits_for_notification @@ -51,6 +58,7 @@ def perform(claim_id) end rescue CARMA::Client::MuleSoftClient::RecordParseError StatsD.increment("#{STATSD_KEY_PREFIX}record_parse_error", tags: ["claim_id:#{claim_id}"]) + self.class.send_failure_email(claim) rescue => e log_exception_to_sentry(e) StatsD.increment("#{STATSD_KEY_PREFIX}retries") @@ -58,21 +66,38 @@ def perform(claim_id) raise end - def self.send_failure_email(parsed_form) - first_name = parsed_form.dig('veteran', 'fullName', 'first') - email = parsed_form.dig('veteran', 'email') - template_id = Settings.vanotify.services.health_apps_1010.template_id.form1010_cg_failure_email - api_key = Settings.vanotify.services.health_apps_1010.api_key - salutation = first_name ? "Dear #{first_name}," : '' - - VANotify::EmailJob.perform_async( - email, - template_id, - { 'salutation' => salutation }, - api_key - ) - - StatsD.increment("#{STATSD_KEY_PREFIX}submission_failure_email_sent") + class << self + def send_failure_email(claim) + unless can_send_failure_email?(claim) + StatsD.increment('silent_failure', tags: DD_ZSF_TAGS) + return + end + + parsed_form = claim.parsed_form + first_name = parsed_form.dig('veteran', 'fullName', 'first') + email = parsed_form.dig('veteran', 'email') + template_id = Settings.vanotify.services.health_apps_1010.template_id.form1010_cg_failure_email + api_key = Settings.vanotify.services.health_apps_1010.api_key + salutation = first_name ? "Dear #{first_name}," : '' + + VANotify::EmailJob.perform_async( + email, + template_id, + { 'salutation' => salutation }, + api_key, + CALLBACK_METADATA + ) + + StatsD.increment("#{STATSD_KEY_PREFIX}submission_failure_email_sent") + end + + private + + def can_send_failure_email?(claim) + Flipper.enabled?(:caregiver_use_va_notify_on_submission_failure) && claim.parsed_form.dig( + 'veteran', 'email' + ) + end end end end diff --git a/app/sidekiq/form526_submission_failure_email_job.rb b/app/sidekiq/form526_submission_failure_email_job.rb index e53c10de310..65fa491da9f 100644 --- a/app/sidekiq/form526_submission_failure_email_job.rb +++ b/app/sidekiq/form526_submission_failure_email_job.rb @@ -17,8 +17,16 @@ class Form526SubmissionFailureEmailJob 'form4142' => 'VA Form 21-4142', 'form0781' => 'VA Form 21-0781', 'form0781a' => 'VA Form 21-0781a', + 'form0781v2' => 'VA Form 21-0781', 'form8940' => 'VA Form 21-8940' }.freeze + FORM_KEYS = { + 'form4142' => 'form4142', + 'form0781' => 'form0781.form0781', + 'form0781a' => 'form0781.form0781a', + 'form0781v2' => 'form0781.form0781v2', + 'form8940' => 'form8940' + }.freeze # retry for 2d 1h 47m 12s # https://github.com/sidekiq/sidekiq/wiki/Error-Handling @@ -86,11 +94,8 @@ def send_email end def list_forms_submitted - [].tap do |forms| - forms << FORM_DESCRIPTIONS['form4142'] if form['form4142'].present? - forms << FORM_DESCRIPTIONS['form0781'] if form['form0781'].present? - forms << FORM_DESCRIPTIONS['form0781a'] if form.dig('form0781', 'form0781a').present? - forms << FORM_DESCRIPTIONS['form8940'] if form['form8940'].present? + FORM_KEYS.each_with_object([]) do |(key, path), forms| + forms << FORM_DESCRIPTIONS[key] if form.dig(*path.split('.')).present? end end diff --git a/app/sidekiq/hca/log_email_diff_job.rb b/app/sidekiq/hca/log_email_diff_job.rb index b8af859d15f..069b1c348b7 100644 --- a/app/sidekiq/hca/log_email_diff_job.rb +++ b/app/sidekiq/hca/log_email_diff_job.rb @@ -22,9 +22,8 @@ def log_email_difference_redis(in_progress_form_id, user_uuid) parsed_form = JSON.parse(in_progress_form.form_data) form_email = parsed_form['email'] - email_confirmation = parsed_form['view:email_confirmation'] - return if form_email.blank? || form_email != email_confirmation + return if form_email.blank? user = User.find(user_uuid) va_profile_email = user.va_profile_email @@ -45,9 +44,8 @@ def log_email_difference(in_progress_form_id, user_uuid) parsed_form = JSON.parse(in_progress_form.form_data) form_email = parsed_form['email'] - email_confirmation = parsed_form['view:email_confirmation'] - return if form_email.blank? || form_email != email_confirmation + return if form_email.blank? user = User.find(user_uuid) va_profile_email = user.va_profile_email diff --git a/app/sidekiq/lighthouse/create_intent_to_file_job.rb b/app/sidekiq/lighthouse/create_intent_to_file_job.rb index 0c960f1947d..3046812b2c8 100644 --- a/app/sidekiq/lighthouse/create_intent_to_file_job.rb +++ b/app/sidekiq/lighthouse/create_intent_to_file_job.rb @@ -17,8 +17,7 @@ class InvalidITFTypeError < StandardError; end # Only pension form configured to create async ITFs for now ITF_FORMS = { # '21-526EZ' => 'compensation', - # '21P-530' => 'survivor', - # '21P-530V2' => 'survivor', + # '21P-530EZ' => 'survivor', '21P-527EZ' => 'pension' }.freeze diff --git a/app/sidekiq/lighthouse/document_upload.rb b/app/sidekiq/lighthouse/document_upload.rb index f7e76d7932b..084cf600e33 100644 --- a/app/sidekiq/lighthouse/document_upload.rb +++ b/app/sidekiq/lighthouse/document_upload.rb @@ -3,6 +3,7 @@ require 'ddtrace' require 'timeout' require 'lighthouse/benefits_documents/worker_service' +require 'lighthouse/failure_notification' class Lighthouse::DocumentUpload include Sidekiq::Job @@ -37,13 +38,9 @@ class Lighthouse::DocumentUpload date_submitted = format_issue_instant_for_mailers(msg['created_at']) date_failed = format_issue_instant_for_mailers(msg['failed_at']) - notify_client.send_email( - recipient_identifier: { id_value: icn, id_type: 'ICN' }, - template_id: MAILER_TEMPLATE_ID, - personalisation: { first_name:, filename:, date_submitted:, date_failed: } - ) + Lighthouse::FailureNotification.perform_async(icn, first_name, filename, date_submitted, date_failed) - ::Rails.logger.info('Lighthouse::DocumentUpload exhaustion handler email sent') + ::Rails.logger.info('Lighthouse::DocumentUpload exhaustion handler email queued') StatsD.increment('silent_failure_avoided_no_confirmation', tags: DD_ZSF_TAGS) rescue => e ::Rails.logger.error('Lighthouse::DocumentUpload exhaustion handler email error', @@ -75,10 +72,6 @@ def self.format_issue_instant_for_mailers(issue_instant) timestamp.strftime('%B %-d, %Y %-l:%M %P %Z').sub(/([ap])m/, '\1.m.') end - def self.notify_client - VaNotify::Service.new(NOTIFY_SETTINGS.api_key) - end - def perform(user_icn, document_hash) client = BenefitsDocuments::WorkerService.new document, file_body, uploader = nil diff --git a/app/sidekiq/lighthouse/failure_notification.rb b/app/sidekiq/lighthouse/failure_notification.rb new file mode 100644 index 00000000000..77d6345500e --- /dev/null +++ b/app/sidekiq/lighthouse/failure_notification.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +class Lighthouse::FailureNotification + include Sidekiq::Job + include SentryLogging + + NOTIFY_SETTINGS = Settings.vanotify.services.benefits_management_tools + MAILER_TEMPLATE_ID = NOTIFY_SETTINGS.template_id.evidence_submission_failure_email + + # retry for one day + sidekiq_options retry: 14, queue: 'low' + # Set minimum retry time to ~1 hour + sidekiq_retry_in do |count, _exception| + rand(3600..3660) if count < 9 + end + + sidekiq_retries_exhausted do + ::Rails.logger.info('Lighthouse::FailureNotification email could not be sent') + end + + def notify_client + VaNotify::Service.new(NOTIFY_SETTINGS.api_key) + end + + def perform(icn, first_name, filename, date_submitted, date_failed) + notify_client.send_email( + recipient_identifier: { id_value: icn, id_type: 'ICN' }, + template_id: MAILER_TEMPLATE_ID, + personalisation: { first_name:, filename:, date_submitted:, date_failed: } + ) + + ::Rails.logger.info('Lighthouse::FailureNotification email sent') + rescue => e + ::Rails.logger.error('Lighthouse::FailureNotification email error', + { message: e.message }) + log_exception_to_sentry(e) + end +end diff --git a/app/sidekiq/lighthouse/submit_benefits_intake_claim.rb b/app/sidekiq/lighthouse/submit_benefits_intake_claim.rb index e19fa1c85a9..226ebde8f3b 100644 --- a/app/sidekiq/lighthouse/submit_benefits_intake_claim.rb +++ b/app/sidekiq/lighthouse/submit_benefits_intake_claim.rb @@ -4,11 +4,11 @@ require 'pdf_utilities/datestamp_pdf' require 'pension_burial/tag_sentry' require 'burials/monitor' +require 'burials/notification_email' require 'pcpg/monitor' require 'benefits_intake_service/service' require 'simple_forms_api_submission/metadata_validator' require 'pdf_info' -require 'va_notify/notification_email/burial' module Lighthouse class SubmitBenefitsIntakeClaim @@ -36,7 +36,7 @@ class BenefitsIntakeClaimError < StandardError; end rescue claim = nil end - if %w[21P-530V2 21P-530].include?(claim&.form_id) + if %w[21P-530EZ].include?(claim&.form_id) burial_monitor = Burials::Monitor.new burial_monitor.track_submission_exhaustion(msg, claim) end @@ -109,7 +109,7 @@ def process_record(record) document = stamped_path2 - if ['21P-530V2'].include?(record.form_id) + if ['21P-530EZ'].include?(record.form_id) # If you are doing a burial form, add the extra box that is filled out document = stamped_pdf_with_form(record.form_id, stamped_path2, record.created_at) @@ -192,9 +192,7 @@ def check_zipcode(address) def send_confirmation_email @claim.respond_to?(:send_confirmation_email) && @claim.send_confirmation_email - if %w[21P-530V2 21P-530].include?(@claim&.form_id) - Burials::NotificationEmail.new(@claim.id).deliver(:confirmation) - end + Burials::NotificationEmail.new(@claim.id).deliver(:confirmation) if %w[21P-530EZ].include?(@claim&.form_id) rescue => e Rails.logger.warn('Lighthouse::SubmitBenefitsIntakeClaim send_confirmation_email failed', generate_log_details(e)) diff --git a/app/sidekiq/sidekiq_stats_job.rb b/app/sidekiq/sidekiq_stats_job.rb deleted file mode 100644 index d60d088d1df..00000000000 --- a/app/sidekiq/sidekiq_stats_job.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class SidekiqStatsJob - include Sidekiq::Job - - sidekiq_options queue: 'critical' - - METRIC_NAMES = %w[ - processed - failed - scheduled_size - ].freeze - - def perform - info = Sidekiq::Stats.new - - self.class::METRIC_NAMES.each do |method, stat| - stat ||= method - - StatsD.gauge "shared.sidekiq.stats.#{stat}", info.send(method) - end - - working = Sidekiq::ProcessSet.new.select { |p| p[:busy] == 1 }.count - StatsD.gauge 'shared.sidekiq.stats.working', working - - retry_size = Sidekiq::RetrySet.new.size - StatsD.gauge 'shared.sidekiq.stats.retry_size', retry_size - - info.queues.each do |name, size| - StatsD.gauge "shared.sidekiq.#{name}.size", size - end - end -end diff --git a/app/swagger/swagger/requests/claim_documents.rb b/app/swagger/swagger/requests/claim_documents.rb index e337d552d85..0c2d5f6c40c 100644 --- a/app/swagger/swagger/requests/claim_documents.rb +++ b/app/swagger/swagger/requests/claim_documents.rb @@ -23,7 +23,7 @@ class ClaimDocuments schema do key :required, %i[file form_id] property :file, type: :object - property :form_id, type: :string, example: '21P-530V2' + property :form_id, type: :string, example: '21P-530EZ' end end end diff --git a/app/swagger/swagger/requests/my_va/submission_statuses.rb b/app/swagger/swagger/requests/my_va/submission_statuses.rb index dff3632dd59..8b629ad8509 100644 --- a/app/swagger/swagger/requests/my_va/submission_statuses.rb +++ b/app/swagger/swagger/requests/my_va/submission_statuses.rb @@ -99,7 +99,7 @@ class SubmissionStatuses property :detail, type: [:string, 'null'], example: '', description: 'Error details (only when errors are present)' property :form_type, type: :string, example: '21-0845', description: 'The type of form' - property :message, type: [:string, 'null'] + property :message, type: [:string, 'null'], example: 'Descriptive message' property :status, type: [:string, 'null'], enum: [ nil, 'pending', @@ -115,6 +115,8 @@ class SubmissionStatuses description: 'The submission record created in VA.gov' property :updated_at, type: [:string, 'null'], example: '2023-12-15T20:40:54.474Z', description: 'The last time the submission status was updated' + property :pdf_support, type: :boolean, example: true, + description: 'True if submission supports archived pdf downloads' end end end diff --git a/config/features.yml b/config/features.yml index ed006ae3ce0..200781e9609 100644 --- a/config/features.yml +++ b/config/features.yml @@ -87,6 +87,13 @@ features: caregiver_retry_form_validation: actor_type: user description: Enables 1010CG to retry schema validation + disability_compensation_staging_lighthouse_brd: + actor_type: user + description: Switches to Lighthouse Staging BRD Service. NEVER ENABLE IN PRODUCTION. + document_upload_validation_enabled: + actor_type: user + description: Enables stamped PDF validation on document upload + enable_in_development: true hca_browser_monitoring_enabled: actor_type: user description: Enables browser monitoring for the health care application. @@ -125,6 +132,9 @@ features: hca_retrieve_facilities_without_repopulating: actor_type: user description: Constrain facilities endpoint to only return existing facilities values - even if the table is empty, do not rerun the Job to populate it. + hca_zero_silent_failures: + actor_type: user + description: Pass callback metadata to vanotify sidekiq job cg1010_oauth_2_enabled: actor_type: user description: Use OAuth 2.0 Authentication for 10-10CG Form Mulesoft integration. @@ -167,6 +177,9 @@ features: cerner_override_757: actor_type: user description: This will show the Cerner facility 757 as `isCerner`. + champva_multiple_stamp_retry: + actor_type: user + description: Enables retry of file creation for some errors in CHAMPVA PDF stamping champva_failure_email_job_enabled: actor_type: user description: Enables sending failure notification emails for IVC CHAMPVA form submissions that lack a Pega status @@ -497,6 +510,12 @@ features: decision_review_sc_new_api: actor_type: user description: Enable to switch to new Supplemental Claim modularized Decision Review endpoint + decision_review_new_engine_4142_job: + actor_type: user + description: Enable to switch to new modularized Decision Review Form4142Submit job + decision_review_new_engine_submit_upload_job: + actor_type: user + description: Enable to switch to new modularized Decision Review SubmitUpload job dependency_verification: actor_type: user description: Feature gates the dependency verification modal for updating the diaries service. @@ -615,16 +634,9 @@ features: actor_type: user description: Send only lat/long values (no bounding box or address) to the API when querying for facilities. enable_in_development: true - facility_locator_ppms_legacy_urgent_care_to_pos_locator: - actor_type: user - description: force the legacy urgent care path to use the new POS locator facility_locator_predictive_location_search: actor_type: user description: Use predictive location search in the Facility Locator UI - facility_locator_pull_operating_status_from_lighthouse: - actor_type: user - description: A fast and dirty way to get the operating status from lighthouse - enable_in_development: true facility_locator_rails_engine: actor_type: user description: Use rails engine routes for all Facility Locator API calls @@ -776,6 +788,13 @@ features: form21_4142_confirmation_email: actor_type: user description: Enables form 21-4142 email submission confirmation (VaNotify) + form22_10282_confirmation_email: + actor_type: user + description: Enables form 22-10282 email submission confirmation (VaNotify) + enable_in_development: true + form26_4555_confirmation_email: + actor_type: user + description: Enables form 26-4555 email submission confirmation (VaNotify) enable_in_development: true form_526_required_identifiers_in_user_object: actor_type: user @@ -910,7 +929,7 @@ features: enable_in_development: true lighthouse_claims_api_v2_add_person_proxy: actor_type: user - description: Lighthouse Benefits Claims API v2 uses add_person_proxy service when target Veteran is missing a Participant ID + description: Lighthouse Benefits Claims API v2 uses add_person_proxy service when target Veteran is missing a Participant ID enable_in_development: true lighthouse_claims_api_poa_dependent_claimants: actor_type: user @@ -918,7 +937,7 @@ features: enable_in_development: true lighthouse_claims_api_v2_poa_va_notify: actor_type: user - description: Enable/disable the VA ntofication emails in V2 POA + description: Enable/disable the VA notification emails in V2 POA enable_in_development: false lighthouse_claims_v2_poa_requests_skip_bgs: actor_type: user @@ -951,6 +970,10 @@ features: actor_type: user description: Enables notifications to be sent for new copay statements enable_in_development: true + mhv_account_creation_api_consumption: + actor_type: user + descriptiom: Enables access to alerts related to MHV Account Creation API + enable_in_development: true mhv_account_creation_after_login: actor_type: user descriptiom: Enables access to MHV Account Creation API @@ -1482,6 +1505,9 @@ features: va_dependents_new_fields_for_pdf: actor_typer: user description: Allows us to toggle the new fields on the front end for 686C-674 + va_dependents_submit674: + actor_type: user + description: Allows submission of 674 without MANUAL_VAGOV flag va_online_scheduling_enable_OH_cancellations: actor_type: user enable_in_development: true @@ -1526,9 +1552,6 @@ features: actor_type: user enable_in_development: true description: Toggle to remove Podiatry from the type of care list when scheduling an online appointment. - va_burial_v2: - actor_type: user - description: Allows us to toggle between 21-P530 and 21-P530V2 va_v2_person_service: actor_type: user description: When enabled, the VAProfile::V2::Person::Service will be enabled @@ -1537,6 +1560,10 @@ features: actor_type: user description: When enabled, the VAProfile::V3::ContactInformation will be enabled enable_in_development: true + validate_saved_claims_with_json_schemer: + actor_type: user + description: When enabled, Saved Claims will be validated using the JSON Schemer gem rather than JSON Schema + enable_in_development: false veteran_onboarding_beta_flow: actor_type: user description: Conditionally display the new veteran onboarding flow to user @@ -1669,9 +1696,6 @@ features: mobile_v2_contact_info: actor_type: user description: For mobile app, enables ContactInformationV2 Service. - appointment_provider_id_logging: - actor_type: user - description: For mobile app, logs provider id for debugging mobile_push_register_logging: actor_type: user description: For mobile app, logs push register errors for debugging @@ -1801,10 +1825,6 @@ features: burial_form_enabled: actor_type: user description: Enable the burial form - burial_form_v2: - actor_type: user - description: Enable Burial form v2 re-design - enable_in_development: true burial_confirmation_page: actor_type: user description: Toggle showing the updated confirmation page @@ -1815,6 +1835,9 @@ features: burial_received_email_notification: actor_type: cookie_id description: Toggle sending of the Received email notification + burial_browser_monitoring_enabled: + actor_type: user + description: Burial Datadog RUM monitoring pension_form_enabled: actor_type: user description: Enable the pension form @@ -1961,7 +1984,18 @@ features: is_DGIB_endpoint: actor_type: user description: used to call data from DGIB endpoints for MGIB VYE application + lighthouse_veterans_health_debug_logging: + actor_type: user + description: Enable debug logging for Lighthouse Veterans Health API + enable_in_development: false benefits_non_disability_ch31_v2: actor_type: user description: If enabled, use new form and api endpoint for Ch31 VR&E form - enable_in_development: false + is_updated_gi: + actor_type: user + description: If enabled, use updated gi design + show_rudisill_1995: + actor_type: user + description: If enabled, show rudisill review in 22-1995 + + diff --git a/config/form_profile_mappings/21-22.yml b/config/form_profile_mappings/21-22.yml index ef78558d94b..5900926801c 100644 --- a/config/form_profile_mappings/21-22.yml +++ b/config/form_profile_mappings/21-22.yml @@ -11,7 +11,6 @@ militaryInformation: serviceDateRange: from: [military_information, last_entry_date] to: [military_information, last_discharge_date] -vaFileNumber: [veteran_information, va_file_number] identityValidation: hasICN: [identity_validation, has_icn] hasParticipantId: [identity_validation, has_participant_id] diff --git a/config/form_profile_mappings/21-22A.yml b/config/form_profile_mappings/21-22A.yml index ef78558d94b..5900926801c 100644 --- a/config/form_profile_mappings/21-22A.yml +++ b/config/form_profile_mappings/21-22A.yml @@ -11,7 +11,6 @@ militaryInformation: serviceDateRange: from: [military_information, last_entry_date] to: [military_information, last_discharge_date] -vaFileNumber: [veteran_information, va_file_number] identityValidation: hasICN: [identity_validation, has_icn] hasParticipantId: [identity_validation, has_participant_id] diff --git a/config/form_profile_mappings/21P-530.yml b/config/form_profile_mappings/21P-530EZ.yml similarity index 100% rename from config/form_profile_mappings/21P-530.yml rename to config/form_profile_mappings/21P-530EZ.yml diff --git a/config/form_profile_mappings/21P-530V2.yml b/config/form_profile_mappings/21P-530V2.yml deleted file mode 100644 index 199957e34cd..00000000000 --- a/config/form_profile_mappings/21P-530V2.yml +++ /dev/null @@ -1,4 +0,0 @@ -claimant_full_name: [identity_information, full_name] -claimant_address: [contact_information, address] -claimant_phone: [contact_information, us_phone] -claimant_email: [contact_information, email] diff --git a/config/initializers/breakers.rb b/config/initializers/breakers.rb index 18b0b7c4f57..eff62e33c70 100644 --- a/config/initializers/breakers.rb +++ b/config/initializers/breakers.rb @@ -6,6 +6,7 @@ require 'central_mail/configuration' require 'debt_management_center/debts_configuration' require 'decision_review/configuration' +require 'vye/dgib/service' require 'dgi/automation/configuration' require 'dgi/eligibility/configuration' require 'dgi/status/configuration' @@ -84,6 +85,7 @@ SearchTypeahead::Configuration.instance.breakers_service, SearchClickTracking::Configuration.instance.breakers_service, VAOS::Configuration.instance.breakers_service, + Vye::DGIB::Configuration.instance.breakers_service, IAMSSOeOAuth::Configuration.instance.breakers_service, CovidVaccine::V0::VetextConfiguration.instance.breakers_service, VEText::Configuration.instance.breakers_service, diff --git a/config/routes.rb b/config/routes.rb index c2aac422a66..6991a60729b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -105,6 +105,8 @@ resource :mhv_user_account, only: [:show], controller: 'user/mhv_user_accounts' end + resource :test_account_user_email, only: [:create] + resource :veteran_onboarding, only: %i[show update] resource :education_benefits_claims, only: %i[create show] do diff --git a/config/settings.yml b/config/settings.yml index cdb11ce7577..c508c23cd7e 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -230,6 +230,17 @@ edu: - marelby.hernandez@va.gov - nawar.hussein@va.gov - engin.akman@va.gov + staging_excel_contents: + emails: + - alex.chan1@va.gov + - gregg.puhala@va.gov + - noah.stern@va.gov + - marelby.hernandez@va.gov + - nawar.hussein@va.gov + - engin.akman@va.gov + production_excel_contents: + emails: + - patricia.terry1@va.gov dependents: prefill: true @@ -1230,6 +1241,8 @@ covid_vaccine: port: ~ username: fake_username password: fake_password + kex_algorithms: fake_kex_algorithms + host_key_algorithms: fake_host_key_algorithms virtual_agent: webchat_secret: fake_secret @@ -1301,6 +1314,9 @@ vanotify: form21_4142_confirmation_email: form21_4142_confirmation_email_template_id form21_4142_error_email: form21_4142_error_email_template_id form21_4142_received_email: form21_4142_received_email_template_id + form26_4555_confirmation_email: form26_4555_confirmation_email_template_id + form26_4555_rejected_email: form26_4555_rejected_email_template_id + form26_4555_duplicate_email: form26_4555_duplicate_email_template_id form27_8832_action_needed_email: form27_8832_action_needed_email_template_id form40_0247_confirmation_email: form40_0247_confirmation_email_template_id form40_0247_error_email: form40_0247_error_email_template_id @@ -1442,10 +1458,19 @@ genisis: pass: bogus # Settings for connecting AFS Veteran Services +# For locahost we can use the existing certs as long as we don't call out dgi: jwt: public_key_path: modules/meb_api/spec/fixtures/dgi_public_test.pem private_key_path: modules/meb_api/spec/fixtures/dgi_private_test.pem + vye: + jwt: + public_key_path: modules/vye/spec/fixtures/dgi_public_test.pem + private_key_path: modules/vye/spec/fixtures/dgi_private_test.pem + public_ica11_rca2_key_path: modules/vye/spec/fixtures/ICA11-RCA2-combined-cert.pem + vets: + url: "" + mock: false vets: url: "https://jenkins.ld.afsp.io:32512/vets-service/v1/" # Docker setup for microservice mock: false @@ -1847,10 +1872,15 @@ vaos: base_path: "care-navigation/v1" scopes: "care-nav" +ogc: + form21a_service_url: + url: http://localhost:5000/api/v1/accreditation/applications/form21a + api_key: fake_key + accredited_representative_portal: pilot_users_email_poa_codes: ~ banners: drupal_username: banners_api drupal_password: test - drupal_url: https://test.cms.va.gov/ \ No newline at end of file + drupal_url: https://test.cms.va.gov/ diff --git a/config/settings/test.yml b/config/settings/test.yml index b87aff55faf..35f28fbb40a 100644 --- a/config/settings/test.yml +++ b/config/settings/test.yml @@ -246,12 +246,6 @@ lighthouse: client_id: abc123456 rsa_key: path/to/key use_mocks: false - status: - host: https://sandbox-api.va.gov - access_token: - client_id: ~ - rsa_key: ~ - use_mocks: false benefits_claims: host: https://sandbox-api.va.gov aud_claim_url: https://deptva-eval.okta.com/oauth2/ausi3u00gw66b9Ojk2p7/v1/token diff --git a/db/migrate/20241212101623_add_claim_va_notifications_reference_columns.rb b/db/migrate/20241212101623_add_claim_va_notifications_reference_columns.rb new file mode 100644 index 00000000000..d4066899c19 --- /dev/null +++ b/db/migrate/20241212101623_add_claim_va_notifications_reference_columns.rb @@ -0,0 +1,9 @@ +class AddClaimVANotificationsReferenceColumns < ActiveRecord::Migration[7.1] + def change + safety_assured do + add_column :claim_va_notifications, :notification_id, :uuid + add_column :claim_va_notifications, :notification_type, :string + add_column :claim_va_notifications, :notification_status, :string + end + end +end diff --git a/db/migrate/20241213171608_add_path_to_banners.rb b/db/migrate/20241213171608_add_path_to_banners.rb new file mode 100644 index 00000000000..88663e24b92 --- /dev/null +++ b/db/migrate/20241213171608_add_path_to_banners.rb @@ -0,0 +1,5 @@ +class AddPathToBanners < ActiveRecord::Migration[7.2] + def change + add_column :banners, :path, :string + end +end diff --git a/db/migrate/20241213173113_add_index_to_banners_path.rb b/db/migrate/20241213173113_add_index_to_banners_path.rb new file mode 100644 index 00000000000..601177f4ce8 --- /dev/null +++ b/db/migrate/20241213173113_add_index_to_banners_path.rb @@ -0,0 +1,7 @@ +class AddIndexToBannersPath < ActiveRecord::Migration[7.2] + disable_ddl_transaction! + + def change + add_index :banners, :path, algorithm: :concurrently + end +end diff --git a/db/migrate/20241219205816_create_excel_file_events.rb b/db/migrate/20241219205816_create_excel_file_events.rb new file mode 100644 index 00000000000..ba7a44f32db --- /dev/null +++ b/db/migrate/20241219205816_create_excel_file_events.rb @@ -0,0 +1,12 @@ +class CreateExcelFileEvents < ActiveRecord::Migration[7.2] + def change + create_table :excel_file_events do |t| + t.integer :number_of_submissions + t.string :filename + t.timestamp :successful_at + t.integer :retry_attempt, default: 0 + t.timestamps + t.index :filename, name: "index_excel_file_events_uniqueness", unique: true + end + end +end diff --git a/db/schema.rb b/db/schema.rb index aaba60a88fd..09c8727634f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_12_09_231104) do +ActiveRecord::Schema[7.2].define(version: 2024_12_20_164548) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "fuzzystrmatch" @@ -269,6 +269,44 @@ t.index ["veteran_icn"], name: "index_appeals_api_supplemental_claims_on_veteran_icn" end + create_table "ar_power_of_attorney_forms", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "power_of_attorney_request_id", null: false + t.text "encrypted_kms_key" + t.text "data_ciphertext", null: false + t.string "city_bidx", null: false + t.string "state_bidx", null: false + t.string "zipcode_bidx", null: false + t.index ["city_bidx", "state_bidx", "zipcode_bidx"], name: "idx_on_city_bidx_state_bidx_zipcode_bidx_a85b76f9bc" + t.index ["power_of_attorney_request_id"], name: "idx_on_power_of_attorney_request_id_fc59a0dabc", unique: true + t.index ["zipcode_bidx"], name: "index_ar_power_of_attorney_forms_on_zipcode_bidx" + end + + create_table "ar_power_of_attorney_request_decisions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "type", null: false + t.uuid "creator_id", null: false + t.index ["creator_id"], name: "index_ar_power_of_attorney_request_decisions_on_creator_id" + end + + create_table "ar_power_of_attorney_request_expirations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + end + + create_table "ar_power_of_attorney_request_resolutions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "power_of_attorney_request_id", null: false + t.string "resolving_type", null: false + t.uuid "resolving_id", null: false + t.text "reason_ciphertext" + t.text "encrypted_kms_key" + t.datetime "created_at", null: false + t.index ["power_of_attorney_request_id"], name: "idx_on_power_of_attorney_request_id_fd7d2d11b1", unique: true + t.index ["resolving_type", "resolving_id"], name: "unique_resolving_type_and_id", unique: true + end + + create_table "ar_power_of_attorney_requests", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "claimant_id", null: false + t.datetime "created_at", null: false + t.index ["claimant_id"], name: "index_ar_power_of_attorney_requests_on_claimant_id" + end + create_table "async_transactions", id: :serial, force: :cascade do |t| t.string "type" t.string "user_uuid" @@ -310,7 +348,9 @@ t.boolean "limit_subpage_inheritance" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "path" t.index ["entity_id"], name: "index_banners_on_entity_id" + t.index ["path"], name: "index_banners_on_path" end create_table "base_facilities", id: false, force: :cascade do |t| @@ -354,6 +394,9 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "email_template_id" + t.uuid "notification_id" + t.string "notification_type" + t.string "notification_status" t.index ["saved_claim_id"], name: "index_claim_va_notifications_on_saved_claim_id" end @@ -650,6 +693,16 @@ t.index ["user_uuid"], name: "index_evss_claims_on_user_uuid" end + create_table "excel_file_events", force: :cascade do |t| + t.integer "number_of_submissions" + t.string "filename" + t.datetime "successful_at", precision: nil + t.integer "retry_attempt", default: 0 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["filename"], name: "index_excel_file_events_uniqueness", unique: true + end + create_table "feature_toggle_events", force: :cascade do |t| t.string "feature_name" t.string "operation" @@ -1398,6 +1451,8 @@ t.jsonb "callback_metadata" t.text "callback_klass" t.uuid "template_id" + t.text "to_ciphertext" + t.text "encrypted_kms_key" end create_table "vba_documents_monthly_stats", force: :cascade do |t| @@ -1711,6 +1766,10 @@ add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" add_foreign_key "appeal_submissions", "user_accounts" + add_foreign_key "ar_power_of_attorney_forms", "ar_power_of_attorney_requests", column: "power_of_attorney_request_id" + add_foreign_key "ar_power_of_attorney_request_decisions", "user_accounts", column: "creator_id" + add_foreign_key "ar_power_of_attorney_request_resolutions", "ar_power_of_attorney_requests", column: "power_of_attorney_request_id" + add_foreign_key "ar_power_of_attorney_requests", "user_accounts", column: "claimant_id" add_foreign_key "async_transactions", "user_accounts" add_foreign_key "claim_va_notifications", "saved_claims" add_foreign_key "claims_api_claim_submissions", "claims_api_auto_established_claims", column: "claim_id" diff --git a/lib/bgs/form674.rb b/lib/bgs/form674.rb index 977e40c5d9e..12b9019cf4c 100644 --- a/lib/bgs/form674.rb +++ b/lib/bgs/form674.rb @@ -22,6 +22,7 @@ def initialize(user, saved_claim) @saved_claim = saved_claim @end_product_name = '130 - Automated School Attendance 674' @end_product_code = '130SCHATTEBN' + @proc_state = 'Ready' if Flipper.enabled?(:va_dependents_submit674) end def submit(payload) @@ -32,7 +33,11 @@ def submit(payload) vnp_benefit_claim = VnpBenefitClaim.new(proc_id:, veteran:, user:) vnp_benefit_claim_record = vnp_benefit_claim.create - set_claim_type('MANUAL_VAGOV') # we are TEMPORARILY always setting to MANUAL_VAGOV for 674 + # we are TEMPORARILY always setting to MANUAL_VAGOV for 674 + if !Flipper.enabled?(:va_dependents_submit674) || @saved_claim.submittable_686? + set_claim_type('MANUAL_VAGOV') + @proc_state = 'MANUAL_VAGOV' + end # temporary logging to troubleshoot log_message_to_sentry("#{proc_id} - #{@end_product_code}", :warn, '', { team: 'vfs-ebenefits' }) @@ -45,10 +50,12 @@ def submit(payload) # we only want to add a note if the claim is being set to MANUAL_VAGOV # but for now we are temporarily always setting to MANUAL_VAGOV for 674 # when that changes, we need to surround this block of code in an IF statement - note_text = 'Claim set to manual by VA.gov: This application needs manual review because a 674 was submitted.' - bgs_service.create_note(benefit_claim_record[:benefit_claim_id], note_text) + if @proc_state == 'MANUAL_VAGOV' + note_text = 'Claim set to manual by VA.gov: This application needs manual review because a 674 was submitted.' + bgs_service.create_note(benefit_claim_record[:benefit_claim_id], note_text) - bgs_service.update_proc(proc_id, proc_state: 'MANUAL_VAGOV') + bgs_service.update_proc(proc_id, proc_state: 'MANUAL_VAGOV') + end rescue log_submit_failure(error) end diff --git a/lib/bip_claims/service.rb b/lib/bip_claims/service.rb index 204809fb1e1..22523e57dec 100644 --- a/lib/bip_claims/service.rb +++ b/lib/bip_claims/service.rb @@ -14,7 +14,7 @@ class Service < Common::Client::Base def veteran_attributes(claim) case claim.form_id - when '21P-530', '21P-530V2' + when '21P-530EZ' ssn, full_name, bday = claim.parsed_form.values_at( 'veteranSocialSecurityNumber', 'veteranFullName', diff --git a/lib/burials/monitor.rb b/lib/burials/monitor.rb index 760ce5c63d0..8d208594b77 100644 --- a/lib/burials/monitor.rb +++ b/lib/burials/monitor.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'va_notify/notification_email/burial' +require 'burials/notification_email' require 'zero_silent_failures/monitor' module Burials diff --git a/lib/va_notify/notification_email/burial.rb b/lib/burials/notification_email.rb similarity index 100% rename from lib/va_notify/notification_email/burial.rb rename to lib/burials/notification_email.rb diff --git a/lib/claim_documents/monitor.rb b/lib/claim_documents/monitor.rb new file mode 100644 index 00000000000..14c68d398c7 --- /dev/null +++ b/lib/claim_documents/monitor.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +require 'logging/monitor' + +module ClaimDocuments + ## + # Monitor functions for Rails logging and StatsD + # @todo abstract, split logging for controller and sidekiq + # + class Monitor < ::Logging::Monitor + # statsd key for document uploads + DOCUMENT_STATS_KEY = 'api.claim_documents' + + def initialize + super('claim_documents') + end + + def track_document_upload_attempt(form_id, current_user) + additional_context = { + user_account_uuid: current_user&.user_account_uuid, + tags: ["form_id:#{form_id}"] + } + track_request('info', "Creating PersistentAttachment FormID=#{form_id}", "#{DOCUMENT_STATS_KEY}.attempt", + **additional_context) + end + + def track_document_upload_success(form_id, attachment_id, current_user) + additional_context = { + attachment_id:, + user_account_uuid: current_user&.user_account_uuid, + tags: ["form_id:#{form_id}"] + } + track_request('info', "Success creating PersistentAttachment FormID=#{form_id} AttachmentID=#{attachment_id}", + "#{DOCUMENT_STATS_KEY}.success", **additional_context) + end + + def track_document_upload_failed(form_id, attachment_id, current_user, e) + additional_context = { + attachment_id:, + user_account_uuid: current_user&.user_account_uuid, + tags: ["form_id:#{form_id}"], + message: e&.message + } + track_request('error', "Error creating PersistentAttachment FormID=#{form_id} AttachmentID=#{attachment_id} #{e}", + "#{DOCUMENT_STATS_KEY}.failure", **additional_context) + end + end +end diff --git a/lib/decision_review_v1/appeals/supplemental_claim_services.rb b/lib/decision_review_v1/appeals/supplemental_claim_services.rb index 4f0197c48cb..a97a77cc1d5 100644 --- a/lib/decision_review_v1/appeals/supplemental_claim_services.rb +++ b/lib/decision_review_v1/appeals/supplemental_claim_services.rb @@ -251,7 +251,7 @@ def queue_submit_evidence_uploads(sc_evidences, appeal_submission_id) asu = AppealSubmissionUpload.create!(decision_review_evidence_attachment_guid: upload['confirmationCode'], appeal_submission_id:) - DecisionReview::SubmitUpload.perform_async(asu.id) + submit_upload_job.perform_async(asu.id) end end @@ -265,7 +265,7 @@ def queue_submit_evidence_uploads(sc_evidences, appeal_submission_id) # @return String # def queue_form4142(appeal_submission_id:, rejiggered_payload:, submitted_appeal_uuid:) - DecisionReview::Form4142Submit.perform_async( + form4142_submit_job.perform_async( appeal_submission_id, payload_encrypted_string(rejiggered_payload), submitted_appeal_uuid diff --git a/lib/decision_review_v1/service.rb b/lib/decision_review_v1/service.rb index caf070de305..0776aaa68ad 100644 --- a/lib/decision_review_v1/service.rb +++ b/lib/decision_review_v1/service.rb @@ -328,6 +328,14 @@ def construct_tmpfile_name(appeal_submission_upload_id, original_filename) private + def submit_upload_job + DecisionReview::SubmitUpload + end + + def form4142_submit_job + DecisionReview::Form4142Submit + end + def create_higher_level_review_headers(user) headers = { 'X-VA-SSN' => user.ssn.to_s.strip.presence, diff --git a/lib/disability_compensation/factories/api_provider_factory.rb b/lib/disability_compensation/factories/api_provider_factory.rb index a5da3ee093c..d100bac04fd 100644 --- a/lib/disability_compensation/factories/api_provider_factory.rb +++ b/lib/disability_compensation/factories/api_provider_factory.rb @@ -15,6 +15,7 @@ require 'disability_compensation/providers/brd/brd_provider' require 'disability_compensation/providers/brd/evss_brd_provider' require 'disability_compensation/providers/brd/lighthouse_brd_provider' +require 'disability_compensation/providers/brd/lighthouse_staging_brd_provider' require 'disability_compensation/providers/generate_pdf/generate_pdf_provider' require 'disability_compensation/providers/generate_pdf/evss_generate_pdf_provider' require 'disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider' @@ -28,7 +29,8 @@ class UndefinedFactoryTypeError < StandardError; end API_PROVIDER = { evss: :evss, - lighthouse: :lighthouse + lighthouse: :lighthouse, + lighthouse_staging: :lighthouse_staging }.freeze FACTORIES = { @@ -166,6 +168,8 @@ def brd_service_provider EvssBRDProvider.new(@current_user) when API_PROVIDER[:lighthouse] LighthouseBRDProvider.new(@current_user) + when API_PROVIDER[:lighthouse_staging] + LighthouseStagingBRDProvider.new(@current_user) else raise NotImplementedError, 'No known BRD Api Provider type provided' end diff --git a/lib/disability_compensation/providers/brd/lighthouse_staging_brd_provider.rb b/lib/disability_compensation/providers/brd/lighthouse_staging_brd_provider.rb new file mode 100644 index 00000000000..a8fb0139e89 --- /dev/null +++ b/lib/disability_compensation/providers/brd/lighthouse_staging_brd_provider.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'disability_compensation/providers/brd/lighthouse_brd_provider' +require 'lighthouse/benefits_reference_data_staging/service' + +class LighthouseStagingBRDProvider < LighthouseBRDProvider + def initialize(_current_user) + super + @service = BenefitsReferenceData::Staging::Service.new + end +end diff --git a/lib/evss/disability_compensation_form/form0781.rb b/lib/evss/disability_compensation_form/form0781.rb index 59ab207877d..d2d870ed2ee 100644 --- a/lib/evss/disability_compensation_form/form0781.rb +++ b/lib/evss/disability_compensation_form/form0781.rb @@ -12,6 +12,7 @@ def initialize(user, form_content) @user = user @phone_email = form_content.dig('form526', 'phoneAndEmail') @form_content = form_content.dig('form526', 'form0781') + @sync_modern_0781_flow = form_content.dig('form526', 'syncModern0781Flow') @translated_forms = {} end @@ -22,16 +23,20 @@ def initialize(user, form_content) def translate return nil unless @form_content - # The pdf creation functionality is looking for a single street address - # instead of a hash - @form_content['incidents'].each do |incident| - incident['incidentLocation'] = join_location(incident['incidentLocation']) if incident['incidentLocation'] - end + if @sync_modern_0781_flow + @translated_forms['form0781v2'] = create_form_v2 + else + # The pdf creation functionality is looking for a single street address + # instead of a hash + @form_content['incidents'].each do |incident| + incident['incidentLocation'] = join_location(incident['incidentLocation']) if incident['incidentLocation'] + end - incs0781a, incs0781 = split_incidents(@form_content['incidents']) + incs0781a, incs0781 = split_incidents(@form_content['incidents']) - @translated_forms['form0781'] = create_form(incs0781) if incs0781.present? - @translated_forms['form0781a'] = create_form(incs0781a) if incs0781a.present? + @translated_forms['form0781'] = create_form(incs0781) if incs0781.present? + @translated_forms['form0781a'] = create_form(incs0781a) if incs0781a.present? + end @translated_forms end @@ -39,6 +44,31 @@ def translate private def create_form(incidents) + prepare_veteran_info.merge({ + 'incidents' => incidents, + 'remarks' => @form_content['remarks'], + 'additionalIncidentText' => @form_content['additionalIncidentText'], + 'otherInformation' => @form_content['otherInformation'] + }) + end + + def create_form_v2 + prepare_veteran_info.merge({ + 'eventsDetails' => @form_content['eventsDetails'], + 'reports' => @form_content['reports'], + 'reportsDetails' => @form_content['reportsDetails'], + 'behaviors' => @form_content['behaviors'], + 'behaviorsDetails' => @form_content['behaviorsDetails'], + 'evidence' => @form_content['evidence'], + 'traumaTreatment' => @form_content['traumaTreatment'], + 'treatmentProviders' => @form_content['treatmentProviders'], + 'treatmentProvidersDetails' => @form_content['treatmentProvidersDetails'], + 'optionIndicator' => @form_content['optionIndicator'], + 'additionalInformation' => @form_content['additionalInformation'] + }) + end + + def prepare_veteran_info { 'vaFileNumber' => @user.ssn, 'veteranSocialSecurityNumber' => @user.ssn, @@ -47,11 +77,7 @@ def create_form(incidents) 'email' => @phone_email['emailAddress'], 'veteranPhone' => @phone_email['primaryPhone'], 'veteranSecondaryPhone' => '', # No secondary phone available in 526 PreFill - 'veteranServiceNumber' => '', # No veteran service number available in 526 PreFill - 'incidents' => incidents, - 'remarks' => @form_content['remarks'], - 'additionalIncidentText' => @form_content['additionalIncidentText'], - 'otherInformation' => @form_content['otherInformation'] + 'veteranServiceNumber' => '' # No veteran service number available in 526 PreFill } end diff --git a/lib/evss/disability_compensation_form/form4142_processor.rb b/lib/evss/disability_compensation_form/form4142_processor.rb index 66ce712b30a..e4d9113d62f 100644 --- a/lib/evss/disability_compensation_form/form4142_processor.rb +++ b/lib/evss/disability_compensation_form/form4142_processor.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'pdf_fill/forms/va21p530' -require 'pdf_fill/forms/va21p530v2' require 'pdf_fill/forms/va214142' require 'pdf_fill/forms/va210781a' require 'pdf_fill/forms/va210781' diff --git a/lib/forms/submission_statuses/formatter.rb b/lib/forms/submission_statuses/formatter.rb index 45cb0d86e08..49a42f66d1d 100644 --- a/lib/forms/submission_statuses/formatter.rb +++ b/lib/forms/submission_statuses/formatter.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require_relative 'pdf_urls' + module Forms module SubmissionStatuses class Formatter @@ -46,10 +48,18 @@ def build_submissions_map(submissions) message: nil, status: nil, created_at: submission.created_at, - updated_at: nil + updated_at: nil, + pdf_support: pdf_supported?(submission) ) end end + + def pdf_supported?(submission) + PdfUrls.new( + form_id: submission.form_type, + submission_guid: submission.benefits_intake_uuid + ).supported? + end end end end diff --git a/lib/forms/submission_statuses/pdf_urls.rb b/lib/forms/submission_statuses/pdf_urls.rb new file mode 100644 index 00000000000..e3990afbbd9 --- /dev/null +++ b/lib/forms/submission_statuses/pdf_urls.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require 'simple_forms_api/form_remediation/configuration/vff_config' + +module Forms + module SubmissionStatuses + class PdfUrls + VFF_FORMS = %w[20-10206 20-10207 21-0845 21-0966 21-0972 21-10210 21-4138 21-4142 21P-0847 26-4555 40-0247 + 40-10007].freeze + + def initialize(form_id:, submission_guid:) + @form_id = form_id + @submission_guid = submission_guid + end + + def fetch_url + config = determine_config + SimpleFormsApi::FormRemediation::S3Client.fetch_presigned_url(@submission_guid, config:) + end + + def supported? + determine_config + rescue Common::Exceptions::Forbidden + false + else + true + end + + private + + def determine_config + return SimpleFormsApi::FormRemediation::Configuration::VffConfig.new if VFF_FORMS.include?(@form_id) + + raise Common::Exceptions::Forbidden, detail: "Form '#{@form_id}' does not support pdf downloads" + end + end + end +end diff --git a/lib/lighthouse/benefits_reference_data_staging/configuration.rb b/lib/lighthouse/benefits_reference_data_staging/configuration.rb new file mode 100644 index 00000000000..6696a31879a --- /dev/null +++ b/lib/lighthouse/benefits_reference_data_staging/configuration.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +require 'common/client/configuration/rest' +require 'faraday/multipart' + +module BenefitsReferenceData + ## + # HTTP client configuration for the {BenefitsReferenceData::Service}, + # sets the base path, the base request headers, and a service name for breakers and metrics. + + module Staging + class Configuration < Common::Client::Configuration::REST + self.read_timeout = Settings.lighthouse.benefits_reference_data.timeout || 20 + + ## + # @return [String] Base path for benefits_reference_data URLs. + # + def base_path + settings = Settings.lighthouse.benefits_reference_data + url = settings.staging_url + path = settings.path + version = settings.version + safe_slash_merge(url, path, version) + end + + ## + # @return [String] Service name to use in breakers and metrics. + # + def service_name + 'BenefitsReferenceDataStaging' + end + + ## + # @return [Hash] The basic headers required for any benefits_reference_data API call. + # + def self.base_request_headers + key = Settings.lighthouse.staging_api_key + message = "No api_key set for LH benefits_reference_data_staging. Please set 'lighthouse.staging_api_key'" + raise message if key.nil? + + super.merge('apiKey' => key) + end + + ## + # Creates the a connection with parsing json and adding breakers functionality. + # + # @return [Faraday::Connection] a Faraday connection instance. + # + def connection + @conn ||= Faraday.new(base_path, headers: base_request_headers, request: request_options) do |faraday| + faraday.use :breakers + faraday.use Faraday::Response::RaiseError + + faraday.request :multipart + faraday.request :json + faraday.response :json + faraday.adapter Faraday.default_adapter + end + end + + private + + def safe_slash_merge(*url_segments) + url_segments.map { |segment| segment.sub(%r{^/}, '').chomp('/') }.join('/') + end + end + end +end diff --git a/lib/lighthouse/benefits_reference_data_staging/service.rb b/lib/lighthouse/benefits_reference_data_staging/service.rb new file mode 100644 index 00000000000..ada49d3bc76 --- /dev/null +++ b/lib/lighthouse/benefits_reference_data_staging/service.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +require 'common/client/base' +require 'common/client/concerns/monitoring' +require 'common/client/errors' +require 'common/exceptions/forbidden' +require 'common/exceptions/schema_validation_errors' +require 'lighthouse/benefits_reference_data_staging/configuration' +require 'lighthouse/benefits_reference_data/service_exception' + +module BenefitsReferenceData + ## + # Proxy Service for the Lighthouse Benefits Reference Data API. + + module Staging + class Service < Common::Client::Base + include SentryLogging + include Common::Client::Concerns::Monitoring + + configuration BenefitsReferenceData::Staging::Configuration + + # ap @configuration.base_request_headers; exit + + STATSD_KEY_PREFIX = 'api.benefits_reference_data_staging' + + ## + # Hit a Benefits Reference Data End-point + # + # @path end-point [string|symbol] a string or symbol of the end-point you wish to hit. + # @params params hash [Hash] a hash of key-value pairs of parameters + # + # @return [Faraday::Response] + # + def get_data(path:, params: {}) + headers = config.base_request_headers + begin + response = perform :get, path, params, headers + rescue => e + raise BenefitsReferenceData::ServiceException.new(e), 'Lighthouse Error' + end + response + end + end + end +end diff --git a/lib/lighthouse/veterans_health/client.rb b/lib/lighthouse/veterans_health/client.rb index 2e7a6b3707b..a5a59241b1f 100644 --- a/lib/lighthouse/veterans_health/client.rb +++ b/lib/lighthouse/veterans_health/client.rb @@ -124,6 +124,9 @@ def collect_all_entries(next_page, collection) def perform_get(uri_path, **params) perform(:get, uri_path, params, headers_hash) + rescue Common::Client::Errors::ClientError => e + log_operation_outcome(e) + raise e end def authenticate(params) @@ -133,6 +136,18 @@ def authenticate(params) URI.encode_www_form(params), { 'Content-Type': 'application/x-www-form-urlencoded' } ) + rescue Common::Client::Errors::ClientError => e + log_operation_outcome(e) + raise e + end + + def log_operation_outcome(error) + if Flipper.enabled?(:lighthouse_veterans_health_debug_logging, @current_user) + PersonalInformationLog.create!( + data: error.body || error, + error_class: self.class.name + ) + end end def base64_icn diff --git a/lib/medical_records/bb_internal/client.rb b/lib/medical_records/bb_internal/client.rb index 2bb43e63674..adda633cbcb 100644 --- a/lib/medical_records/bb_internal/client.rb +++ b/lib/medical_records/bb_internal/client.rb @@ -321,6 +321,13 @@ def map_study_ids(data) modified_data end + ## + # Overriding MHVSessionBasedClient's method to ensure the thread blocks if patient ID is not yet set. + # + def invalid?(session) + super(session) || session.patient_id.blank? + end + ## # Overriding MHVSessionBasedClient's method so we can get the patientId and store it as well. # diff --git a/lib/medical_records/lighthouse_client.rb b/lib/medical_records/lighthouse_client.rb index 094e7ebbe9e..11de0edaf42 100644 --- a/lib/medical_records/lighthouse_client.rb +++ b/lib/medical_records/lighthouse_client.rb @@ -36,7 +36,7 @@ def list_vitals(from_date = nil, to_date = nil) params[:date] = ["ge#{from_date}", "le#{to_date}"] if from_date && to_date bundle = lighthouse_client.list_observations(params) bundle = Oj.load(bundle[:body].to_json, symbol_keys: true) - sort_bundle(bundle, :recordedDate, :desc) + sort_bundle(bundle, :effectiveDateTime, :desc) end def list_allergies @@ -118,55 +118,21 @@ def paginate_bundle_entries(entries, page_size, page_num) end ## - # Sort the FHIR::Bundle entries on a given field and sort order. If a field is not present, that entry - # is sorted to the end. + # Sort FHIR entries on a given field and sort order. If a field is not present, + # that entry is sorted to the end. # - # @param bundle [FHIR::Bundle] the bundle to sort - # @param field [Symbol, String] the field to sort on (supports nested fields with dot notation) + # @param bundle [Hash] the bundle to sort + # @param field [Symbol] the field to sort on # @param order [Symbol] the sort order, :asc (default) or :desc # def sort_bundle(bundle, field, order = :asc) - field = field.to_s - sort_bundle_with_criteria(bundle, order) do |resource| - fetch_nested_value(resource, field) - end - end - - ## - # Sort the FHIR::Bundle entries based on a provided block. The block should handle different resource types - # and define how to extract the sorting value from each. - # - # @param bundle [FHIR::Bundle] the bundle to sort - # @param order [Symbol] the sort order, :asc (default) or :desc - # - def sort_bundle_with_criteria(bundle, order = :asc) - sorted_entries = bundle[:entry].sort do |entry1, entry2| - value1 = yield(entry1[:resource]) - value2 = yield(entry2[:resource]) - if value2.nil? - -1 - elsif value1.nil? - 1 - else - order == :asc ? value1 <=> value2 : value2 <=> value1 - end - end - bundle[:entry] = sorted_entries + # Sort bundle[:entry] based on the field + bundle[:entry].sort_by! { |entry| entry[:resource][field] } + # reverse the order if descending + bundle[:entry].reverse! if order == :desc bundle end - ## - # Fetches the value of a potentially nested field from a given object. - # - # @param object [Object] the object to fetch the value from - # @param field_path [String] the dot-separated path to the field - # - def fetch_nested_value(object, field_path) - field_path.split('.').reduce(object) do |obj, method| - obj.respond_to?(method) ? obj.send(method) : nil - end - end - def measure_duration(event: 'default', tags: []) # Use time since boot to avoid clock skew issues # https://github.com/sidekiq/sidekiq/issues/3999 diff --git a/lib/pdf_fill/filler.rb b/lib/pdf_fill/filler.rb index 2bf190e90a8..26e48283909 100644 --- a/lib/pdf_fill/filler.rb +++ b/lib/pdf_fill/filler.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true require 'pdf_fill/forms/va21p0969' -require 'pdf_fill/forms/va21p530' -require 'pdf_fill/forms/va21p530v2' +require 'pdf_fill/forms/va21p530ez' require 'pdf_fill/forms/va214142' require 'pdf_fill/forms/va210781a' require 'pdf_fill/forms/va210781' +require 'pdf_fill/forms/va210781v2' require 'pdf_fill/forms/va218940' require 'pdf_fill/forms/va1010cg' require 'pdf_fill/forms/va686c674' @@ -47,11 +47,12 @@ def register_form(form_id, form_class) # Registers form classes for various form IDs. { '21P-0969' => PdfFill::Forms::Va21p0969, - '21P-530' => PdfFill::Forms::Va21p530, - '21P-530V2' => PdfFill::Forms::Va21p530v2, + '21P-530V2' => PdfFill::Forms::Va21p530ez, + '21P-530EZ' => PdfFill::Forms::Va21p530ez, '21-4142' => PdfFill::Forms::Va214142, '21-0781a' => PdfFill::Forms::Va210781a, '21-0781' => PdfFill::Forms::Va210781, + '21-0781V2' => PdfFill::Forms::Va210781v2, '21-8940' => PdfFill::Forms::Va218940, '10-10CG' => PdfFill::Forms::Va1010cg, '686C-674' => PdfFill::Forms::Va686c674, diff --git a/lib/pdf_fill/forms/pdfs/21-0781V2.pdf b/lib/pdf_fill/forms/pdfs/21-0781V2.pdf new file mode 100644 index 00000000000..03215bf3b9a Binary files /dev/null and b/lib/pdf_fill/forms/pdfs/21-0781V2.pdf differ diff --git a/lib/pdf_fill/forms/pdfs/21-0781v2.pdf b/lib/pdf_fill/forms/pdfs/21-0781v2.pdf new file mode 100644 index 00000000000..03215bf3b9a Binary files /dev/null and b/lib/pdf_fill/forms/pdfs/21-0781v2.pdf differ diff --git a/lib/pdf_fill/forms/pdfs/21P-530.pdf b/lib/pdf_fill/forms/pdfs/21P-530.pdf deleted file mode 100644 index a8da305ac58..00000000000 Binary files a/lib/pdf_fill/forms/pdfs/21P-530.pdf and /dev/null differ diff --git a/lib/pdf_fill/forms/pdfs/21P-530V2.pdf b/lib/pdf_fill/forms/pdfs/21P-530EZ.pdf similarity index 100% rename from lib/pdf_fill/forms/pdfs/21P-530V2.pdf rename to lib/pdf_fill/forms/pdfs/21P-530EZ.pdf diff --git a/lib/pdf_fill/forms/va210781v2.rb b/lib/pdf_fill/forms/va210781v2.rb new file mode 100644 index 00000000000..24528c9cfe5 --- /dev/null +++ b/lib/pdf_fill/forms/va210781v2.rb @@ -0,0 +1,741 @@ +# frozen_string_literal: true + +require 'pdf_fill/hash_converter' +require 'pdf_fill/forms/form_helper' +require 'pdf_fill/forms/form_base' +require 'pdf_fill/forms/common_ptsd' + +# rubocop:disable Metrics/ClassLength +module PdfFill + module Forms + class Va210781v2 < FormBase + include CommonPtsd + + ITERATOR = PdfFill::HashConverter::ITERATOR + + # rubocop:disable Layout/LineLength + KEY = { + 'veteranFullName' => { + 'first' => { + key: 'F[0].#subform[2].Veterans_Service_Members_First_Name[0]', + limit: 12, # limit: 28 (with combs removed) + question_num: 1, + question_suffix: 'A', + question_text: 'VETERAN/SERVICE MEMBER\'S NAME. First Name' + }, + 'middleInitial' => { + key: 'F[0].#subform[2].VeteransMiddleInitial1[0]', + limit: 1, + question_num: 1, + question_suffix: 'B', + question_text: 'VETERAN/SERVICE MEMBER\'S NAME. Middle Initial' + }, + 'last' => { + key: 'F[0].#subform[2].VeteransLastName[0]', + limit: 18, # limit: 45 (with combs removed) + question_num: 1, + question_suffix: 'C', + question_text: 'VETERAN/SERVICE MEMBER\'S NAME. Last Name' + } + }, + 'veteranSocialSecurityNumber' => { # question_num: 2 + 'first' => { + key: 'F[0].#subform[2].SSN1[0]' + }, + 'second' => { + key: 'F[0].#subform[2].SSN2[0]' + }, + 'third' => { + key: 'F[0].#subform[2].SSN3[0]' + } + }, + 'vaFileNumber' => { + key: 'F[0].#subform[2].VAFileNumber[0]', + limit: 9, + question_num: 3, + question_text: 'VA FILE NUMBER (If applicable)' + }, + 'veteranDateOfBirth' => { + 'month' => { + key: 'F[0].#subform[2].Month[0]', + limit: 2, + question_num: 4, + question_suffix: 'A', + question_text: 'DATE OF BIRTH. Enter 2 digit Month.' + }, + 'day' => { + key: 'F[0].#subform[2].Day[0]', + limit: 2, + question_num: 4, + question_suffix: 'B', + question_text: 'DATE OF BIRTH. Enter 2 digit day.' + }, + 'year' => { + key: 'F[0].#subform[2].Year[0]', + limit: 4, + question_num: 4, + question_suffix: 'C', + question_text: 'DATE OF BIRTH. Enter 4 digit year.' + } + }, + 'veteranServiceNumber' => { + key: 'F[0].#subform[2].VeteransServiceNumber[0]', + limit: 10, + question_num: 5, + question_text: 'VETERAN\'S SERVICE NUMBER (If applicable)' + }, + 'veteranPhone' => { + 'first' => { + key: 'F[0].#subform[2].AreaCode[0]', + limit: 3, + question_num: 6, + question_suffix: 'A', + question_text: 'TELEPHONE NUMBER (Include Area Code). Enter three digits of Area Code.' + }, + 'second' => { + key: 'F[0].#subform[2].FirstThreeNumbers[0]', + limit: 3, + question_num: 6, + question_suffix: 'B', + question_text: 'TELEPHONE NUMBER (Include Area Code). Enter middle three digits.' + }, + 'third' => { + key: 'F[0].#subform[2].LastFourNumbers[0]', + limit: 4, + question_num: 6, + question_suffix: 'C', + question_text: 'TELEPHONE NUMBER (Include Area Code). Enter last four digits.' + } + }, + 'veteranIntPhone' => { + key: 'F[0].#subform[2].International_Telephone_Number_If_Applicable[0]', + limit: 25, + question_num: 6, + question_suffix: 'D', + question_text: 'Enter International Phone Number (If applicable).' + }, + 'email' => { + key: 'F[0].#subform[2].E_Mail_Address_Optional[0]', + limit: 75, # TODO: This is a guess. Need to confirm. + question_num: 7, + question_text: 'E-Mail Address (Optional).' + }, + 'emailOverflow' => { + key: '', + question_num: 7, + question_text: 'E-Mail Address (Optional).' + }, + 'eventTypes' => { # question_num: 8 + 'combat' => { + key: 'F[0].#subform[2].Combat_Traumatic_Events[0]' + }, + 'mst' => { + key: 'F[0].#subform[2].Personal_Traumatic_Events_Not_Involving_Military_Sexual_Trauma[0]' + }, + 'nonMst' => { + key: 'F[0].#subform[2].Personal_Traumatic_Events_Involving_Military_Sexual_Trauma[0]' + }, + 'other' => { + key: 'F[0].#subform[2].Other_Traumatic_Events[0]' + } + }, + 'eventsDetails' => { + limit: 6, + first_key: 'details', + question_text: 'EVENT DETAILS', + question_num: 9, + 'details' => { + key: "F[0].#subform[2].Brief_Description_Of_The_Traumatic_Events[#{ITERATOR}]", + limit: 150 + }, + 'location' => { + key: "F[0].#subform[2].Location_Of_The_Traumatic_Events[#{ITERATOR}]", + limit: 84 + }, + 'timing' => { + key: "F[0].#subform[2].Dates_The_Traumatic_Events_Occured[#{ITERATOR}]", + limit: 75 + }, + 'eventOverflow' => { + key: '', + question_text: 'TRAUMATIC EVENT(S) INFORMATION', + question_num: 9, + question_suffix: 'A' + } + }, + 'behaviors' => { # question_num: 10A + 'reassignment' => { + key: 'F[0].#subform[3].Request_For_A_Change_In_Occupational_Series_Or_Duty_Assignment[0]' + }, + 'absences' => { + key: 'F[0].#subform[3].Increased_Decreased_Use_Of_Leave[0]' + }, + 'performance' => { + key: 'F[0].#subform[3].Changes_In_Performance_Or_Performance_Evaluations[0]' + }, + 'consultations' => { + key: 'F[0].#subform[3].Increased_Decreased_Visits_To_A_Healthcare_Professional_Counselor_Or_Treatment_Facility[0]' + }, + 'episodes' => { + key: 'F[0].#subform[3].Episodes_Of_Depression_Panic_Attacks_Or_Anxiety[0]' + }, + 'medications' => { + key: 'F[0].#subform[3].Increased_Decreased_Use_Of_Prescription_Medications[0]' + }, + 'selfMedication' => { + key: 'F[0].#subform[3].Increased_Decreased_Use_Of_Over_The_Counter_Medications[0]' + }, + 'substances' => { + key: 'F[0].#subform[3].Increased_Decreased_Use_Of_Alcohol_Or_Drugs[0]' + }, + 'appetite' => { + key: 'F[0].#subform[3].Changes_In_Eating_Habits_Such_As_Overeating_Or_Undereating_Or_Significant_Changes_In_Weight[0]' + }, + 'pregnancy' => { + key: 'F[0].#subform[4].Pregnancy_Tests_Around_The_Time_Of_The_Traumatic_Events[0]' + }, + 'screenings' => { + key: 'F[0].#subform[4].Tests_For_Sexually_Transmitted_Infections[0]' + }, + 'socialEconomic' => { + key: 'F[0].#subform[4].Economic_Or_Social_Behavioral_Changes[0]' + }, + 'relationships' => { + key: 'F[0].#subform[4].Changes_In_Or_Breakup_Of_A_Significant_Relationship[0]' + }, + 'misconduct' => { + key: 'F[0].#subform[3].Disciplinary_Or_Legal_Difficulties[0]' + } + }, + 'behaviorsDetails' => { # question_num: 10B + 'reassignment' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[1]', + limit: 217, + question_num: 10, + question_suffix: 'B[2]', + question_text: 'ADDTIONAL INFORMATION ABOUT Request for a change in occupational series or duty assignment.' + }, + 'reassignmentOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[2]', + question_text: 'ADDTIONAL INFORMATION ABOUT Request for a change in occupational series or duty assignment.' + }, + 'absences' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[2]', + limit: 217, + question_num: 10, + question_suffix: 'B[3]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/decreased use of leave.' + }, + 'absencesOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[3]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/decreased use of leave.' + }, + 'performance' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[3]', + limit: 217, + question_num: 10, + question_suffix: 'B[4]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in performance or performance evaluations.' + }, + 'performanceOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[4]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in performance or performance evaluations.' + }, + 'consultations' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[0]', + limit: 217, + question_num: 10, + question_suffix: 'B[1]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/decreased visits to a healthcare professional, counselor, or treatment Facility' + }, + 'consultationsOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[1]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/decreased visits to a healthcare professional, counselor, or treatment Facility' + }, + 'episodes' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[4]', + limit: 217, + question_num: 10, + question_suffix: 'B[5]', + question_text: 'ADDTIONAL INFORMATION ABOUT Episodes of depression, panic attacks, or anxiety.' + }, + 'episodesOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[5]', + question_text: 'ADDTIONAL INFORMATION ABOUT Episodes of depression, panic attacks, or anxiety.' + }, + 'medications' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[5]', + limit: 217, + question_num: 10, + question_suffix: 'B[6]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of prescription medications.' + }, + 'medicationsOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[6]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of prescription medications.' + }, + 'selfMedication' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[6]', + limit: 217, + question_num: 10, + question_suffix: 'B[7]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of over-the-counter medications.' + }, + 'selfMedicationOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[7]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of over-the-counter medications.' + }, + 'substances' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[7]', + limit: 217, + question_num: 10, + question_suffix: 'B[8]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of alcohol or drugs.' + }, + 'substancesOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[8]', + question_text: 'ADDTIONAL INFORMATION ABOUT Increased/Decreased use of alcohol or drugs.' + }, + 'appetite' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[9]', + limit: 217, + question_num: 10, + question_suffix: 'B[10]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in eating habits, such as overeating or under eating, or significant changes in weight.' + }, + 'appetiteOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[10]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in eating habits, such as overeating or under eating, or significant changes in weight.' + }, + 'pregnancy' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[10]', + limit: 217, + question_num: 10, + question_suffix: 'B[11]', + question_text: 'ADDTIONAL INFORMATION ABOUT Pregnancy tests around the time of the traumatic event(s).' + }, + 'pregnancyOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[11]', + question_text: 'ADDTIONAL INFORMATION ABOUT Pregnancy tests around the time of the traumatic event(s).' + }, + 'screenings' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[11]', + limit: 217, + question_num: 10, + question_suffix: 'B[12]', + question_text: 'ADDTIONAL INFORMATION ABOUT Tests for sexually transmitted infections.' + }, + 'screeningsOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[12]', + question_text: 'ADDTIONAL INFORMATION ABOUT Tests for sexually transmitted infections.' + }, + 'socialEconomic' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[12]', + limit: 217, + question_num: 10, + question_suffix: 'B[13]', + question_text: 'ADDTIONAL INFORMATION ABOUT Economic or social behavioral changes.' + }, + 'socialEconomicOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[13]', + question_text: 'ADDTIONAL INFORMATION ABOUT Economic or social behavioral changes.' + }, + 'relationships' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[13]', + limit: 217, + question_num: 10, + question_suffix: 'B[14]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in or breakup of a significant relationship.' + }, + 'relationshipsOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[14]', + question_text: 'ADDTIONAL INFORMATION ABOUT Changes in or breakup of a significant relationship.' + }, + 'misconduct' => { + key: 'F[0].#subform[3].Additional_Information_About_Behavioral_Changes[8]', + limit: 217, + question_num: 10, + question_suffix: 'B[9]', + question_text: 'ADDTIONAL INFORMATION ABOUT Disciplinary or legal difficulties.' + }, + 'misconductOverflow' => { + key: '', + question_num: 10, + question_suffix: 'B[9]', + question_text: 'ADDTIONAL INFORMATION ABOUT Disciplinary or legal difficulties.' + }, + 'otherBehavior' => { + key: 'F[0].#subform[4].List_Additional_Behavioral_Changes[0]', + limit: 784, + question_num: 10, + question_suffix: 'C', + question_text: 'ADDTIONAL INFORMATION ABOUT Additional behavioral changes.' + }, + 'otherBehaviorOverflow' => { + key: '', + question_num: 10, + question_suffix: 'C', + question_text: 'ADDTIONAL INFORMATION ABOUT Additional behavioral changes.' + } + }, + 'reportFiled' => { # question_num: 11 + key: 'F[0].#subform[4].Report_Yes[0]' + }, + 'noReportFiled' => { # question_num: 11 + key: 'F[0].#subform[4].Report_No[0]' + }, + 'restrictedReport' => { # question_num: 11 + key: 'F[0].#subform[4].Restricted[0]' + }, + 'unrestrictedReport' => { # question_num: 11 + key: 'F[0].#subform[4].Unrestricted[0]' + }, + 'neitherReport' => { # question_num: 11 + key: 'F[0].#subform[4].Neither[0]' + }, + 'policeReport' => { # question_num: 11 + key: 'F[0].#subform[4].Police[0]' + }, + 'otherReport' => { # question_num: 11 + key: 'F[0].#subform[4].Other[1]' + }, + 'reportsDetails' => { + 'police' => { + key: 'F[0].#subform[4].Police_Report_Location_If_Known[0]', + limit: 68, + question_num: 11, + question_suffix: 'A', + question_text: 'Police Report Location' + }, + 'policeOverflow' => { + key: '', + question_num: 11, + question_suffix: 'A', + question_text: 'Police Report Location' + }, + 'other' => { + key: 'F[0].#subform[4].Other_Report[0]', + limit: 194, + question_num: 11, + question_suffix: 'B', + question_text: 'Other Report' + }, + 'otherOverflow' => { + key: '', + question_num: 11, + question_suffix: 'B', + question_text: 'Other Report' + } + }, + 'evidence' => { # question_num: 12 + 'crisisCenter' => { + key: 'F[0].#subform[4].A_Rape_Crisis_Center_Or_Center_For_Domestic_Abuse[0]' + }, + 'counseling' => { + key: 'F[0].#subform[4].A_Counseling_Facility_Or_Health_Clinic[0]' + }, + 'family' => { + key: 'F[0].#subform[4].Family_Member_Or_Roomates[0]' + }, + 'faculty' => { + key: 'F[0].#subform[4].A_Faculty_Member[0]' + }, + 'police' => { + key: 'F[0].#subform[4].Civilian_Police_Reports[0]' + }, + 'medical' => { + key: 'F[0].#subform[4].Medical_Reports_From_Civilian_Physicians_Or_Caregivers_Who_Treated_You_Immediately_Following_The_Incident_Or_Sometime_Later[0]' + }, + 'clergy' => { + key: 'F[0].#subform[4].A_Chaplain_Or_Clergy[0]' + }, + 'peers' => { + key: 'F[0].#subform[4].Fellow_Service_Members[0]' + }, + 'journal' => { + key: 'F[0].#subform[4].Personal_Diaries_Or_Journals[0]' + }, + 'none' => { + key: 'F[0].#subform[4].No_Evidence[0]' + }, + 'other' => { + key: 'F[0].#subform[4].Other_Specify_Below[0]' + }, + 'otherDetails' => { + key: 'F[0].#subform[4].Other_Evidence[0]', + limit: 100, + question_num: 12, + question_text: 'OTHER' + }, + 'otherDetailsOverflow' => { + key: '', + question_num: 12, + question_text: 'ADDITIONAL OTHER EVIDENCE DETAILS' + } + }, + 'treatment' => { # question_num: 13A + key: 'F[0].#subform[4].Treatment_Yes[0]' + }, + 'noTreatment' => { # question_num: 13A + key: 'F[0].#subform[4].Treatment_No[0]' + }, + 'treatmentProviders' => { # question_num: 13B + 'privateCare' => { + key: 'F[0].#subform[4].Private_Healthcare_Provider[0]' + }, + 'vetCenter' => { + key: 'F[0].#subform[4].VA_Vet_Center[0]' + }, + 'communityCare' => { + key: 'F[0].#subform[4].Community_Care_Paid_For_By_VA[0]' + }, + 'vamc' => { + key: 'F[0].#subform[4].VA_Medical_Center_And_Community_Based_Outpatient_Clinics[0]' + }, + 'cboc' => { + key: 'F[0].#subform[4].VA_Medical_Center_And_Community_Based_Outpatient_Clinics[0]' + }, + 'mtf' => { + key: 'F[0].#subform[4].Department_Of_Defense_Military_Treatment_Facilities[0]' + } + }, + 'treatmentProvidersDetails' => { + limit: 3, + first_key: 'facilityInfo', + question_text: 'TREATMENT INFORMATION', + question_num: 13, + 'facilityInfo' => { + key: "F[0].#subform[5].Name_And_Location_Of_Treatment_Facility[#{ITERATOR}]", + limit: 100 + }, + 'treatmentMonth' => { + key: "F[0].#subform[5].Date_Of_Treatment_Month[#{ITERATOR}]", + limit: 2 + }, + 'treatmentYear' => { + key: "F[0].#subform[5].Date_Of_Treatment_Year[#{ITERATOR}]", + limit: 4 + }, + 'noDates' => { + key: "F[0].#subform[5].Check_Box_Do_Not_Have_Date_s[#{ITERATOR}]" + }, + 'providerOverflow' => { + key: '', + question_text: 'TREATMENT INFORMATION', + question_num: 13, + question_suffix: 'C' + } + }, + 'additionalInformation' => { + key: 'F[0].#subform[5].Remarks_If_Any[0]', + limit: 1940, + question_num: 14, + question_text: 'REMARKS' + }, + 'additionalInformationOverflow' => { + key: '', + question_num: 14, + question_text: 'ADDITIONAL REMARKS' + }, + 'optionIndicator' => { # question_num: 15 + 'yes' => { + key: 'F[0].#subform[5].I_Consent_To_Have_VBA_Notify_VHA_About_Certain_Upcoming_Events_Related_To_My_Claim_And_Or_Appeal[0]' + }, + 'no' => { + key: 'F[0].#subform[5].I_Do_Not_Consent_To_Have_VBA_Notify_VHA_About_Certain_Upcoming_Events_Related_To_My_Claim_And_Or_Appeal[0]' + }, + 'revoke' => { + key: 'F[0].#subform[5].I_Revoke_Prior_Consent_To_Have_VBA_Notify_VHA_About_Certain_Upcoming_Events_Related_To_My_Claim_And_Or_Appeal[0]' + }, + 'notEnrolled' => { + key: 'F[0].#subform[5].Not_Applicable_And_Or_Not_Enrolled_In_VHA_Healthcare[0]' + } + }, + 'signature' => { + key: 'F[0].#subform[5].Signature[0]', + limit: 50, # TODO: This is a guess. Need to confirm. + question_num: 16, + question_suffix: 'A', + question_text: 'VETERAN/SERVICE MEMBER\'S SIGNATURE' + }, + 'signatureDate' => { + 'month' => { + key: 'F[0].#subform[5].Date_Signed_Month[0]', + limit: 2, + question_num: 16, + question_suffix: 'B', + question_text: 'DATE SIGNED. Enter 2 digit month.' + }, + 'day' => { + key: 'F[0].#subform[5].Date_Signed_Day[0]', + limit: 2, + question_num: 16, + question_suffix: 'B', + question_text: 'DATE SIGNED. Enter 2 digit day.' + }, + 'year' => { + key: 'F[0].#subform[5].Date_Signed_Year[0]', + limit: 4, + question_num: 16, + question_suffix: 'B', + question_text: 'DATE SIGNED. Enter 4 digit Year.' + } + } + }.freeze + # rubocop:enable Layout/LineLength + + def merge_fields(_options = {}) + @form_data['veteranFullName'] = extract_middle_i(@form_data, 'veteranFullName') + @form_data = expand_ssn(@form_data) + @form_data['veteranDateOfBirth'] = expand_veteran_dob(@form_data) + + split_phone(@form_data, 'veteranPhone') + + set_treatment_selection + set_reports_selection + + format_other_behavior_details + format_police_report_location + + expand_collection('eventsDetails', :format_event, 'eventOverflow') + expand_collection('treatmentProvidersDetails', :format_provider, 'providerOverflow') + + expand_signature(@form_data['veteranFullName'], @form_data['signatureDate']) + + formatted_date = DateTime.parse(@form_data['signatureDate']).strftime('%Y-%m-%d') + @form_data['signatureDate'] = split_date(formatted_date) + @form_data['signature'] = "/es/ #{@form_data['signature']}" + + @form_data + end + + private + + def split_phone(hash, key) + phone = hash[key] + return if phone.blank? + + phone = sanitize_phone(phone) + hash[key] = { + 'first' => phone[0..2], + 'second' => phone[3..5], + 'third' => phone[6..9] + } + end + + def sanitize_phone(phone) + phone.gsub('-', '') + end + + def set_treatment_selection + treated = @form_data['traumaTreatment'] + return if treated.nil? + + @form_data['treatment'] = treated ? 0 : 1 + @form_data['noTreatment'] = treated ? 0 : 1 + end + + def set_reports_selection + reports = @form_data['reports'] + return if reports.nil? + + @form_data['reportFiled'] = reports['yes'] ? 0 : nil + @form_data['noReportFiled'] = reports['no'] ? 1 : nil + @form_data['restrictedReport'] = reports['restricted'] ? 0 : nil + @form_data['unrestrictedReport'] = reports['unrestricted'] ? 1 : nil + @form_data['neitherReport'] = reports['neither'] ? 2 : nil + @form_data['policeReport'] = reports['police'] ? 3 : nil + @form_data['otherReport'] = reports['other'] ? 4 : nil + end + + def format_other_behavior_details + other_behavior = @form_data['behaviors']&.[]('otherBehavior') + return if other_behavior.blank? + + details = @form_data['behaviorsDetails']['otherBehavior'] + @form_data['behaviorsDetails']['otherBehavior'] = "#{other_behavior}: #{details}" + end + + def format_police_report_location + report = @form_data['reportsDetails']&.[]('police') + return if report.blank? + + @form_data['reportsDetails']['police'] = report.values.reject(&:empty?).join(', ') + end + + def expand_collection(collection, format_method, overflow_key) + collection = @form_data[collection] + return if collection.blank? + + collection.each_with_index do |item, index| + format_item_overflow(item, index + 1, format_method, overflow_key) + end + end + + def format_item_overflow(item, index, format_method, overflow_key) + item_overflow = send(format_method, item, index) + + return if item_overflow.blank? + + item[overflow_key] = PdfFill::FormValue.new('', item_overflow.compact.join("\n\n")) + end + + def format_event(event, index) + return if event.blank? + + event_overflow = ["Event Number: #{index}"] + event_details = event['details'] || '' + event_location = event['location'] || '' + event_timing = event['timing'] || '' + + event_overflow.push("Event Description: \n\n#{event_details}") + event_overflow.push("Event Location: \n\n#{event_location}") + event_overflow.push("Event Date: \n\n#{event_timing}") + + event_overflow + end + + def format_provider(provider, index) + return if provider.blank? + + provider_overflow = ["Treatment Information Number: #{index}"] + facility_info = provider['facilityInfo'] + month = provider['treatmentMonth'] || 'XX' + year = provider['treatmentYear'] || 'XXXX' + no_date = provider['noDates'] + + provider_overflow.push("Treatment Facility Name and Location: \n\n#{facility_info}") + provider_overflow.push(no_date ? "Treatment Date: Don't have date" : "Treatment Date: #{month}-#{year}") + + provider_overflow + end + end + end +end +# rubocop:enable Metrics/ClassLength diff --git a/lib/pdf_fill/forms/va21p530.rb b/lib/pdf_fill/forms/va21p530.rb deleted file mode 100644 index 640ad1121d4..00000000000 --- a/lib/pdf_fill/forms/va21p530.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -require 'pdf_fill/hash_converter' -require 'pdf_fill/forms/form_base' -require 'pdf_fill/forms/form_helper' -require 'string_helpers' - -# rubocop:disable Metrics/ClassLength -module PdfFill - module Forms - class Va21p530 < FormBase - include FormHelper - - ITERATOR = PdfFill::HashConverter::ITERATOR - - PLACE_OF_DEATH_KEY = { - 'vaMedicalCenter' => 'VA MEDICAL CENTER', - 'stateVeteransHome' => 'STATE VETERANS HOME', - 'nursingHome' => 'NURSING HOME UNDER VA CONTRACT' - }.freeze - - # rubocop:disable Layout/LineLength - KEY = { - 'burialAllowanceRequested' => { - 'checkbox' => { - 'nonService' => { - key: 'form1[0].#subform[37].Non-Service-ConnectedDeath[0]' - }, - 'service' => { - key: 'form1[0].#subform[37].Service-ConnectedDeath[0]' - }, - 'vaMC' => { - key: 'form1[0].#subform[37].UnclaimedRemains[0]' - } - } - }, - 'signature' => { - key: 'form1[0].#subform[37].CLAIMANT_SIGNATURE[0]', - limit: 45, - question_num: 20, - question_text: 'SIGNATURE OF CLAIMANT', - question_suffix: 'A' - }, - 'amountIncurred' => { - key: 'form1[0].#subform[37].COST_OF_BURIAL[0]', - question_num: 19, - dollar: true, - question_text: "EXPENSES INCURED FOR THE TRANSPORTATION OF THE VETERAN'S REMAINS FROM THE PLACE OF DEATH TO THE FINAL RESTING PLACE", - limit: 12 - }, - 'amountGovtContribution' => { - key: 'form1[0].#subform[37].AMOUNT[0]', - question_num: 18, - question_suffix: 'B', - dollar: true, - question_text: 'AMOUNT OF GOVERNMENT OR EMPLOYER CONTRIBUTION', - limit: 10 - }, - 'placeOfRemains' => { - key: 'form1[0].#subform[37].PLACE_OF_DEATH[1]', - limit: 80, - question_num: 16, - question_text: "PLACE OF BURIAL OR LOCATION OF DECEASED VETERAN'S REMAINS" - }, - 'hasGovtContributions' => { - key: 'form1[0].#subform[37].YES5[0]' - }, - 'noGovtContributions' => { - key: 'form1[0].#subform[37].NO5[0]' - }, - 'hasStateCemetery' => { - key: 'form1[0].#subform[37].YES4[2]' - }, - 'noStateCemetery' => { - key: 'form1[0].#subform[37].NO4[2]' - }, - 'hasFederalCemetery' => { - key: 'form1[0].#subform[37].YES4[0]' - }, - 'noFederalCemetery' => { - key: 'form1[0].#subform[37].NO4[0]' - }, - 'hasBenefitsUnclaimedRemains' => { - key: 'form1[0].#subform[37].YES4[4]' - }, - 'noBenefitsUnclaimedRemains' => { - key: 'form1[0].#subform[37].NO4[4]' - }, - 'hasPlotAllowance' => { - key: 'form1[0].#subform[37].YES4[1]' - }, - 'noPlotAllowance' => { - key: 'form1[0].#subform[37].NO4[1]' - }, - 'officialPosition' => { - key: 'officialPosition', - limit: 48, - question_num: 20, - question_suffix: 'B', - question_text: 'OFFICIAL POSITION OF PERSON SIGNING ON BEHALF OF FIRM, CORPORATION OR STATE AGENCY' - }, - 'hasBurialAllowance' => { - key: 'form1[0].#subform[37].YES4[3]' - }, - 'noBurialAllowance' => { - key: 'form1[0].#subform[37].NO4[3]' - }, - 'hasPreviouslyReceivedAllowance' => { - key: 'form1[0].#subform[37].YES2[0]' - }, - 'noPreviouslyReceivedAllowance' => { - key: 'form1[0].#subform[37].NO2[0]' - }, - 'locationOfDeath' => { - 'checkbox' => { - 'vaMedicalCenter' => { - key: 'form1[0].#subform[37].CheckBox1[1]' - }, - 'stateVeteransHome' => { - key: 'form1[0].#subform[37].CheckBox2[1]' - }, - 'nursingHome' => { - key: 'form1[0].#subform[37].CheckBox3[1]' - }, - 'other' => { - key: 'form1[0].#subform[37].CheckBox4[1]' - } - }, - 'other' => { - key: 'form1[0].#subform[37].OTHER_SPECIFY[1]', - question_num: 13, - question_suffix: 'B', - question_text: "WHERE DID THE VETERAN'S DEATH OCCUR?", - limit: 50 - } - }, - 'burialCost' => { - key: 'form1[0].#subform[37].COST_OF_BURIAL[1]', - limit: 12, - question_num: 13, - question_suffix: 'A', - question_text: 'If VA Medical Center Death is checked, provide actual burial cost' - }, - 'veteranFullName' => { - 'first' => { - key: 'form1[0].#subform[36].VeteransFirstName[0]', - limit: 12, - question_num: 1, - question_text: "DECEASED VETERAN'S FIRST NAME" - }, - 'middleInitial' => { - key: 'form1[0].#subform[36].VeteransMiddleInitial1[0]' - }, - 'last' => { - key: 'form1[0].#subform[36].VeteransLastName[0]', - limit: 18, - question_num: 1, - question_text: "DECEASED VETERAN'S LAST NAME" - } - }, - 'previousNames' => { - key: 'form1[0].#subform[36].OTHER_NAME[0]', - question_num: 12, - question_text: 'IF VETERAN SERVED UNDER NAME OTHER THAN THAT SHOWN IN ITEM 1, GIVE FULL NAME AND SERVICE RENDERED UNDER THAT NAME', - limit: 180 - }, - 'burialDate' => { - key: 'form1[0].#subform[36].DATE_OF_BURIAL[0]', - format: 'date' - }, - 'vaFileNumber' => { - key: 'form1[0].#subform[36].VAFileNumber[0]' - }, - 'placeOfDeath' => { - key: 'form1[0].#subform[36].PLACE_OF_DEATH[0]', - limit: 52, - question_num: 10, - question_suffix: 'B', - question_text: 'PLACE OF DEATH' - }, - 'claimantEmail' => { - key: 'form1[0].#subform[36].PreferredE_MailAddress[0]', - limit: 31, - question_num: 7, - question_text: 'PREFERRED E-MAIL ADDRESS' - }, - 'claimantFullName' => { - 'first' => { - key: 'form1[0].#subform[36].ClaimantsFirstName[0]', - limit: 12, - question_num: 4, - question_text: "CLAIMANT'S FIRST NAME" - }, - 'middleInitial' => { - key: 'form1[0].#subform[36].ClaimantsMiddleInitial1[0]' - }, - 'last' => { - key: 'form1[0].#subform[36].ClaimantsLastName[0]', - limit: 18, - question_num: 4, - question_text: "CLAIMANT'S LAST NAME" - } - }, - 'claimantAddress' => { - 'street' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_NumberAndStreet[0]', - limit: 30, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - STREET" - }, - 'street2' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_ApartmentOrUnitNumber[0]', - limit: 5, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - APT/UNIT NO." - }, - 'city' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_City[0]', - limit: 18, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - CITY" - }, - 'state' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_StateOrProvince[0]', - limit: 2, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - STATE" - }, - 'country' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_Country[0]', - limit: 2, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - COUNTRY" - }, - 'postalCode' => { - 'firstFive' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_ZIPOrPostalCode_FirstFiveNumbers[0]', - limit: 5, - question_num: 5, - question_text: "CLAIMANT'S ADDRESS - POSTAL CODE - FIRST FIVE" - }, - 'lastFour' => { - key: 'form1[0].#subform[36].CurrentMailingAddress_ZIPOrPostalCode_LastFourNumbers[0]', - limit: 4, - question: 5, - question_text: "CLAIMANT's ADDRESS - POSTAL CODE - LAST FOUR" - } - } - }, - 'relationship' => { - 'checkbox' => { - 'spouse' => { - key: 'form1[0].#subform[36].CheckBox1[0]' - }, - 'child' => { - key: 'form1[0].#subform[36].CheckBox2[0]' - }, - 'executor' => { - key: 'form1[0].#subform[36].CheckBox4[0]' - }, - 'other' => { - key: 'form1[0].#subform[36].CheckBox5[0]' - }, - 'parent' => { - key: 'form1[0].#subform[36].CheckBox3[0]' - } - }, - 'other' => { - limit: 58, - question_num: 8, - question_text: 'RELATIONSHIP OF CLAIMANT TO DECEASED VETERAN', - key: 'form1[0].#subform[36].OTHER_SPECIFY[0]' - } - }, - 'toursOfDuty' => { - limit: 3, - first_key: 'rank', - 'dateRangeStart' => { - key: "toursOfDuty.dateRangeStart[#{ITERATOR}]", - question_num: 11, - question_suffix: 'A', - question_text: 'ENTERED SERVICE (date)', - format: 'date' - }, - 'placeOfEntry' => { - key: "toursOfDuty.placeOfEntry[#{ITERATOR}]", - limit: 14, - question_num: 11, - question_suffix: 'A', - question_text: 'ENTERED SERVICE (place)' - }, - 'serviceNumber' => { - key: "toursOfDuty.serviceNumber[#{ITERATOR}]", - limit: 12, - question_num: 11, - question_suffix: 'B', - question_text: 'SERVICE NUMBER' - }, - 'dateRangeEnd' => { - key: "toursOfDuty.dateRangeEnd[#{ITERATOR}]", - question_num: 11, - question_suffix: 'C', - question_text: 'SEPARATED FROM SERVICE (date)', - format: 'date' - }, - 'placeOfSeparation' => { - key: "toursOfDuty.placeOfSeparation[#{ITERATOR}]", - question_num: 11, - question_suffix: 'C', - question_text: 'SEPARATED FROM SERVICE (place)', - limit: 15 - }, - 'rank' => { - key: "toursOfDuty.rank[#{ITERATOR}]", - question_num: 11, - question_suffix: 'D', - question_text: 'GRADE, RANK OR RATING, ORGANIZATION AND BRANCH OF SERVICE', - limit: 31 - } - }, - 'placeOfBirth' => { - key: 'form1[0].#subform[36].PLACE_OF_BIRTH[0]', - limit: 71, - question_num: 9, - question_suffix: 'B', - question_text: 'PLACE OF BIRTH' - }, - 'veteranDateOfBirth' => { - key: 'form1[0].#subform[36].DATE_OF_BIRTH[0]', - format: 'date' - }, - 'deathDate' => { - key: 'form1[0].#subform[36].DATE_OF_DEATH[0]', - format: 'date' - }, - 'claimantPhone' => { - 'first' => { - key: 'form1[0].#subform[36].PreferredTelephoneNumber_AreaCode[0]' - }, - 'second' => { - key: 'form1[0].#subform[36].PreferredTelephoneNumber_FirstThreeNumbers[0]' - }, - 'third' => { - key: 'form1[0].#subform[36].PreferredTelephoneNumber_LastFourNumbers[0]' - } - }, - 'veteranSocialSecurityNumber2' => { - 'first' => { - key: 'form1[0].#subform[37].VeteransSocialSecurityNumber_FirstThreeNumbers[1]' - }, - 'second' => { - key: 'form1[0].#subform[37].VeteransSocialSecurityNumber_SecondTwoNumbers[1]' - }, - 'third' => { - key: 'form1[0].#subform[37].VeteransSocialSecurityNumber_LastFourNumbers[1]' - } - }, - 'firmNameAndAddr' => { - key: 'form1[0].#subform[37].FULL_NAME[0]', - limit: 90, - question_num: 21, - question_text: 'FULL NAME AND ADDRESS OF THE FIRM, CORPORATION, OR STATE AGENCY FILING AS CLAIMANT' - }, - 'veteranSocialSecurityNumber' => { - 'first' => { - key: 'form1[0].#subform[36].VeteransSocialSecurityNumber_FirstThreeNumbers[0]' - }, - 'second' => { - key: 'form1[0].#subform[36].VeteransSocialSecurityNumber_SecondTwoNumbers[0]' - }, - 'third' => { - key: 'form1[0].#subform[36].VeteransSocialSecurityNumber_LastFourNumbers[0]' - } - } - }.freeze - # rubocop:enable Layout/LineLength - - def split_phone(hash, key) - phone = hash[key] - return if phone.blank? - - hash[key] = { - 'first' => phone[0..2], - 'second' => phone[3..5], - 'third' => phone[6..9] - } - end - - def split_postal_code(hash) - postal_code = hash['claimantAddress']['postalCode'] - return if postal_code.blank? - - hash['claimantAddress']['postalCode'] = { - 'firstFive' => postal_code[0..4], - 'lastFour' => postal_code[6..10] - } - end - - def expand_checkbox_in_place(hash, key) - hash.merge!(expand_checkbox(hash[key], StringHelpers.capitalize_only(key))) - end - - def expand_relationship(hash, key) - expand_checkbox_as_hash(hash[key], 'type') - end - - def expand_tours_of_duty(tours_of_duty) - return if tours_of_duty.blank? - - tours_of_duty.each do |tour_of_duty| - expand_date_range(tour_of_duty, 'dateRange') - tour_of_duty['rank'] = combine_hash(tour_of_duty, %w[serviceBranch rank], ', ') - end - end - - def expand_place_of_death - location_of_death = @form_data['locationOfDeath'] - return if location_of_death.blank? - - location = location_of_death['location'] - - @form_data['placeOfDeath'] = - if location == 'other' - location_of_death['other'] - else - PLACE_OF_DEATH_KEY[location] - end - end - - def expand_firm - if @form_data['relationship'].try(:[], 'isEntity') - combine_name_addr( - @form_data, - name_key: 'firmName', - address_key: 'claimantAddress', - combined_key: 'firmNameAndAddr' - ) - end - end - - def expand_burial_allowance - burial_allowance = @form_data['burialAllowanceRequested'] - return if burial_allowance.blank? - - @form_data['burialAllowanceRequested'] = { - 'value' => burial_allowance - } - - expand_checkbox_as_hash(@form_data['burialAllowanceRequested'], 'value') - end - - # VA file number can be up to 10 digits long; An optional leading 'c' or 'C' followed by - # 7-9 digits. The file number field on the 4142 form has space for 9 characters so trim the - # potential leading 'c' to ensure the file number will fit into the form without overflow. - def extract_va_file_number(va_file_number) - return va_file_number if va_file_number.blank? || va_file_number.length < 10 - - va_file_number.sub(/^[Cc]/, '') - end - - # rubocop:disable Metrics/MethodLength - def merge_fields(_options = {}) - expand_signature(@form_data['claimantFullName']) - - %w[veteranFullName claimantFullName].each do |attr| - extract_middle_i(@form_data, attr) - end - - ssn = @form_data['veteranSocialSecurityNumber'] - ['', '2'].each do |suffix| - @form_data["veteranSocialSecurityNumber#{suffix}"] = split_ssn(ssn) - end - - split_phone(@form_data, 'claimantPhone') - - split_postal_code(@form_data) - - expand_relationship(@form_data, 'relationship') - - expand_place_of_death - - expand_tours_of_duty(@form_data['toursOfDuty']) - - @form_data['previousNames'] = combine_previous_names(@form_data['previousNames']) - - @form_data['vaFileNumber'] = extract_va_file_number(@form_data['vaFileNumber']) - - expand_burial_allowance - - expand_firm - - expand_checkbox_as_hash(@form_data['locationOfDeath'], 'location') - - %w[ - previouslyReceivedAllowance - burialAllowance - plotAllowance - benefitsUnclaimedRemains - federalCemetery - stateCemetery - govtContributions - ].each do |attr| - expand_checkbox_in_place(@form_data, attr) - end - - @form_data - end - # rubocop:enable Metrics/MethodLength - end - end -end -# rubocop:enable Metrics/ClassLength diff --git a/lib/pdf_fill/forms/va21p530v2.rb b/lib/pdf_fill/forms/va21p530ez.rb similarity index 99% rename from lib/pdf_fill/forms/va21p530v2.rb rename to lib/pdf_fill/forms/va21p530ez.rb index 1592cfe23a3..c8b04ab3bad 100644 --- a/lib/pdf_fill/forms/va21p530v2.rb +++ b/lib/pdf_fill/forms/va21p530ez.rb @@ -8,7 +8,7 @@ # rubocop:disable Metrics/ClassLength module PdfFill module Forms - class Va21p530v2 < FormBase + class Va21p530ez < FormBase include FormHelper ITERATOR = PdfFill::HashConverter::ITERATOR diff --git a/lib/periodic_jobs.rb b/lib/periodic_jobs.rb index 7f76e0ee6f3..ac82f6b8d9e 100644 --- a/lib/periodic_jobs.rb +++ b/lib/periodic_jobs.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'holidays' + # @see https://crontab.guru/ # @see https://en.wikipedia.org/wiki/Cron PERIODIC_JOBS = lambda { |mgr| # rubocop:disable Metrics/BlockLength @@ -57,6 +59,9 @@ # Update Optionset data cache mgr.register('0 0 * * *', 'Crm::OptionsetDataJob') + # Update Facilities data cache + mgr.register('0 0 * * *', 'Crm::FacilitiesDataJob') + # Update FormSubmissionAttempt status from Lighthouse Benefits Intake API mgr.register('0 0 * * *', 'BenefitsIntakeStatusJob') @@ -110,6 +115,7 @@ # TODO: Document this job mgr.register('0 3 * * MON-FRI', 'EducationForm::CreateDailySpoolFiles') + mgr.register('0 3 * * MON-FRI', 'EducationForm::CreateDailyExcelFiles') # Deletes old, completed AsyncTransaction records mgr.register('0 3 * * *', 'DeleteOldTransactionsJob') @@ -249,10 +255,8 @@ # Daily 0000 hrs job for Vye: performs ingress of state from BDN & TIMS. mgr.register('15 00 * * 1-5', 'Vye::MidnightRun::IngressBdn') mgr.register('45 03 * * 1-5', 'Vye::MidnightRun::IngressTims') - # Daily 0600 hrs job for Vye: activates ingressed state, and egresses the changes for the day. mgr.register('45 05 * * 1-5', 'Vye::DawnDash') - - # Daily job for Vye: clears deactivated BDNs every evening. + # Daily 1900 job for Vye: clears deactivated BDNs every evening. mgr.register('00 19 * * 1-5', 'Vye::SundownSweep') } diff --git a/lib/saml/post_url_service.rb b/lib/saml/post_url_service.rb index 43f28e11b82..73f9d834500 100644 --- a/lib/saml/post_url_service.rb +++ b/lib/saml/post_url_service.rb @@ -113,7 +113,7 @@ def terms_of_use_url "#{base_redirect_url}/terms-of-use" end - if current_application.in?(SKIP_MHV_ACCOUNT_CREATION_CLIENTS) + if current_application.in?(SKIP_MHV_ACCOUNT_CREATION_CLIENTS) || @tracker&.payload_attr(:type) == 'custom' base_url = add_query(base_url, { skip_mhv_account_creation: true }) end diff --git a/lib/saml/user_attributes/ssoe.rb b/lib/saml/user_attributes/ssoe.rb index 58a86584f03..b78fcfc0d93 100644 --- a/lib/saml/user_attributes/ssoe.rb +++ b/lib/saml/user_attributes/ssoe.rb @@ -11,7 +11,7 @@ class SSOe include Identity::Parsers::GCIds SERIALIZABLE_ATTRIBUTES = %i[email first_name middle_name last_name gender ssn birth_date uuid idme_uuid logingov_uuid verified_at sec_id mhv_icn - mhv_correlation_id mhv_account_type edipi loa sign_in multifactor icn].freeze + mhv_credential_uuid mhv_account_type edipi loa sign_in multifactor icn].freeze INBOUND_AUTHN_CONTEXT = 'urn:oasis:names:tc:SAML:2.0:ac:classes:Password' attr_reader :attributes, :authn_context, :tracker_uuid, :warnings @@ -95,7 +95,7 @@ def mhv_icn safe_attr('va_eauth_icn') end - def mhv_correlation_id + def mhv_credential_uuid safe_attr('va_eauth_mhvuuid') || mvi_ids[:mhv_ien] end @@ -215,7 +215,7 @@ def multiple_id_validations check_id_mismatch([safe_attr('va_eauth_icn'), safe_attr('va_eauth_mhvicn')], :mhv_icn_mismatch) check_id_mismatch(mvi_ids[:vba_corp_ids], :multiple_corp_ids) check_id_mismatch(edipi_ids[:edipis], :multiple_edipis) - check_id_mismatch(mhv_iens, :multiple_mhv_ids) + check_id_mismatch(mhv_iens, :multiple_mhv_ids, raise_error: false) if sec_id_mismatch? log_message_to_sentry('User attributes contains multiple sec_id values', 'warn', @@ -259,22 +259,25 @@ def mhv_iens def mhv_outbound_redirect(mismatched_ids_error) return false if mismatched_ids_error[:tag] == :multiple_edipis - @mhv_outbound_redirect ||= %w[mhv myvahealth].include?(tracker&.payload_attr(:application)) + %w[mhv myvahealth].include?(tracker&.payload_attr(:application)) end - def check_id_mismatch(ids, multiple_ids_error_type) + def check_id_mismatch(ids, multiple_ids_error_type, raise_error: true) return if ids.blank? + return if ids.compact.uniq.count <= 1 - if ids.reject(&:nil?).uniq.size > 1 - mismatched_ids_error = SAML::UserAttributeError::ERRORS[multiple_ids_error_type] - error_data = { mismatched_ids: ids, icn: mhv_icn } - Rails.logger.warn("[SAML::UserAttributes::SSOe] #{mismatched_ids_error[:message]}, #{error_data}") - unless mhv_outbound_redirect(mismatched_ids_error) - raise SAML::UserAttributeError.new(message: mismatched_ids_error[:message], - code: mismatched_ids_error[:code], - tag: mismatched_ids_error[:tag]) - end - end + mismatched_ids_error = SAML::UserAttributeError::ERRORS[multiple_ids_error_type] + error_data = { mismatched_ids: ids, icn: mhv_icn } + + Rails.logger.warn("[SAML::UserAttributes::SSOe] #{mismatched_ids_error[:message]}", error_data) + + return if mhv_outbound_redirect(mismatched_ids_error) || !raise_error + + raise SAML::UserAttributeError.new( + message: mismatched_ids_error[:message], + code: mismatched_ids_error[:code], + tag: mismatched_ids_error[:tag] + ) end def sec_id_mismatch? diff --git a/lib/sidekiq/form526_backup_submission_process/processor.rb b/lib/sidekiq/form526_backup_submission_process/processor.rb index ba97939ce46..a4e45b5a90f 100644 --- a/lib/sidekiq/form526_backup_submission_process/processor.rb +++ b/lib/sidekiq/form526_backup_submission_process/processor.rb @@ -51,6 +51,7 @@ class Processor '21-4142' => 'L107', '21-0781' => 'L228', '21-0781a' => 'L229', + '21-0781V2' => 'L228', '21-8940' => 'L149', 'bdd' => 'L023' }.freeze @@ -59,6 +60,7 @@ class Processor 21-4142 21-0781 21-0781a + 21-0781V2 21-8940 ].freeze diff --git a/lib/sign_in/idme/service.rb b/lib/sign_in/idme/service.rb index c5dc062980a..1de85b9cf05 100644 --- a/lib/sign_in/idme/service.rb +++ b/lib/sign_in/idme/service.rb @@ -126,7 +126,7 @@ def dslogon_attributes(user_info) def mhv_attributes(user_info) { - mhv_correlation_id: user_info.mhv_uuid, + mhv_credential_uuid: user_info.mhv_uuid, mhv_icn: user_info.mhv_icn, mhv_assurance: user_info.mhv_assurance } diff --git a/lib/source_app_middleware.rb b/lib/source_app_middleware.rb index 32eb6c58509..b3ec3d24b9a 100644 --- a/lib/source_app_middleware.rb +++ b/lib/source_app_middleware.rb @@ -123,6 +123,7 @@ class SourceAppMiddleware search-representative secure-messaging secure-messaging-pilot + sign-in-changes survivor-dependent-education-benefit-22-5490 static-pages submitted-appeal diff --git a/lib/va_profile/models/v3/address.rb b/lib/va_profile/models/v3/address.rb index d473da25864..dfcae4ed5e3 100644 --- a/lib/va_profile/models/v3/address.rb +++ b/lib/va_profile/models/v3/address.rb @@ -82,9 +82,9 @@ def self.build_from(body) bad_address: body['bad_address'], city: body['city_name'], country_name: body.dig('country', 'country_name'), - country_code_iso2: body.dig('country', 'iso_2_code'), + country_code_iso2: body.dig('country', 'country_code_iso2'), country_code_iso3: body.dig('country', 'country_code_iso3'), - fipsCode: body.dig('country', 'fips_code'), + fips_code: body.dig('country', 'country_code_fips'), county_code: body.dig('county', 'county_code'), county_name: body.dig('county', 'county_name'), created_at: body['create_date'], diff --git a/lib/va_profile/models/v3/validation_address.rb b/lib/va_profile/models/v3/validation_address.rb index a238b5ddf6a..795cd1eb93c 100644 --- a/lib/va_profile/models/v3/validation_address.rb +++ b/lib/va_profile/models/v3/validation_address.rb @@ -23,7 +23,7 @@ def address_validation_req cityName: @city, zipCode5: @zip_code, zipCode4: @zip_code_suffix, - country: { countryCodeISO2: @country_code_iso2, countryCodeISO3: @country_code_iso3, + country: { countryCodeISO3: @country_code_iso3, countryName: @country_name, countryCodeFIPS: @country_code_fips }, state: { stateCode: @state_code, stateName: @state_name }, province: { provinceName: @province_name, provinceCode: @province_code }, diff --git a/lib/vets/attributes.rb b/lib/vets/attributes.rb index 5cc4f76703e..ff085ef736d 100644 --- a/lib/vets/attributes.rb +++ b/lib/vets/attributes.rb @@ -16,8 +16,9 @@ def attributes def attribute(name, klass, **options) default = options[:default] array = options[:array] || false + filterable = options[:filterable] || false - attributes[name] = { type: klass, default:, array: } + attributes[name] = { type: klass, default:, array:, filterable: } define_getter(name, default) define_setter(name, klass, array) @@ -28,6 +29,21 @@ def attribute_set ancestors.select { |klass| klass.respond_to?(:attributes) }.flat_map { |klass| klass.attributes.keys }.uniq end + # Lists the attributes that are filterable + def filterable_attributes + attributes.select { |_, options| options[:filterable] }.keys + end + + # Creates a param hash for filterable + def filterable_params + attributes.each_with_object({}) do |attribute, hash| + name = attribute.first + options = attribute.second + + hash[name.to_s] = options[:filterable] if options[:filterable] + end.with_indifferent_access + end + private def define_getter(name, default) diff --git a/lib/vets/model.rb b/lib/vets/model.rb index 7f3986d5656..470b85a4d1a 100644 --- a/lib/vets/model.rb +++ b/lib/vets/model.rb @@ -1,18 +1,25 @@ # frozen_string_literal: true require 'vets/attributes' +require 'vets/model/dirty' +require 'vets/model/sortable' +require 'vets/model/pagination' # This will be moved after virtus is removed module Bool; end class TrueClass; include Bool; end class FalseClass; include Bool; end +# This will be a replacement for Common::Base module Vets module Model extend ActiveSupport::Concern include ActiveModel::Model include ActiveModel::Serializers::JSON include Vets::Attributes + include Vets::Model::Dirty + include Vets::Model::Sortable + include Vets::Model::Pagination included do extend ActiveModel::Naming diff --git a/lib/vets/model/dirty.rb b/lib/vets/model/dirty.rb new file mode 100644 index 00000000000..bd2703c1e41 --- /dev/null +++ b/lib/vets/model/dirty.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Intended to only be used with Vets::Model +# inspired by ActiveModel::Dirty + +module Vets + module Model + module Dirty + extend ActiveSupport::Concern + + included do + attr_reader :original_attributes + end + + def initialize(*, **) + super(*, **) if defined?(super) + @original_attributes = attribute_values.dup + end + + def changed? + changes.any? + end + + def changed + changes.keys + end + + def changes + attribute_values.each_with_object({}) do |(key, current_value), result| + original_value = @original_attributes[key] + result[key] = [original_value, current_value] if original_value != current_value + end + end + end + end +end diff --git a/lib/vets/model/pagination.rb b/lib/vets/model/pagination.rb new file mode 100644 index 00000000000..5aa3eba316b --- /dev/null +++ b/lib/vets/model/pagination.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# +# Pagination allows Vets::Model models to set pagination info +# for that model class. +# +# class User +# include Vets::Model +# +# attr_accessor :name, :age +# +# set_pagination per_page: 21, max_per_page: 41 +# +# ... +# end +# +# User.per_page +# => 21 +# +# User.max_per_page +# => 41 +# + +module Vets + module Model + module Pagination + extend ActiveSupport::Concern + + DEFAULT_PER_PAGE = 10 + DEFAULT_MAX_PER_PAGE = 100 + + class_methods do + # rubocop:disable ThreadSafety/ClassInstanceVariable + def set_pagination(per_page:, max_per_page:) + @per_page = per_page + @max_per_page = max_per_page + end + private :set_pagination + + # Provide default values if set_pagination has not been called + def per_page + @per_page || DEFAULT_PER_PAGE + end + + def max_per_page + @max_per_page || DEFAULT_MAX_PER_PAGE + end + # rubocop:enable ThreadSafety/ClassInstanceVariable + end + end + end +end diff --git a/lib/vets/model/sortable.rb b/lib/vets/model/sortable.rb new file mode 100644 index 00000000000..9ac5130e837 --- /dev/null +++ b/lib/vets/model/sortable.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# +# Sortable allows Vets::Model models to specify a default sort attribute and direction +# for use with `#sort`. +# +# class User +# include Vets::Model +# +# attr_accessor :name, :age +# +# default_sort_by name: :asc +# +# ... +# end +# +# [user1, user3, user4, user2].sort +#=> [user1, user2, user3, user4] +# + +module Vets + module Model + module Sortable + include Comparable + extend ActiveSupport::Concern + + class_methods do + # sets the default sorting criteria + # required for use with Array#sort + # rubocop:disable ThreadSafety/ClassInstanceVariable + def default_sort_by(sort_criteria) + if sort_criteria.size != 1 + raise ArgumentError, 'Only one attribute and direction can be provided in default_sort_by' + end + + _, direction = sort_criteria.first + raise ArgumentError, 'Direction must be either :asc or :desc' unless %i[asc desc].include?(direction) + + @default_sort_criteria = sort_criteria + end + + def default_sort_criteria + @default_sort_criteria ||= {} + end + # rubocop:enable ThreadSafety/ClassInstanceVariable + end + + def <=>(other) + return 0 unless self.class.default_sort_criteria.any? + + attribute = self.class.default_sort_criteria.keys.first + direction = self.class.default_sort_criteria[attribute] || :asc + + # Validate if the attribute value is comparable + raise ArgumentError, "Attribute '#{attribute}' is not comparable." unless comparable?(attribute) + + comparison_result = public_send(attribute) <=> other.public_send(attribute) + direction == :desc ? -comparison_result : comparison_result + end + + private + + def comparable?(attribute) + value = public_send(attribute) + value.is_a?(Comparable) + end + end + end +end diff --git a/lib/vye/dgib/authentication_token_service.rb b/lib/vye/dgib/authentication_token_service.rb new file mode 100644 index 00000000000..2f48056c69a --- /dev/null +++ b/lib/vye/dgib/authentication_token_service.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Vye + module DGIB + class AuthenticationTokenService + ALGORITHM_TYPE = 'RS256' + E = 'AQAB' + TYP = 'JWT' + KID = 'vye' + USE = 'sig' + SIGNING_KEY = Settings.dgi.vye.jwt.private_key_path + RSA_PRIVATE = OpenSSL::PKey::RSA.new(File.read(SIGNING_KEY)) + + def self.call + payload = { + exp: 5.minutes.from_now.to_i, # JWT expiration time (5 minutes) + nbf: Time.now.to_i, + realm_access: { + roles: ['VYE'] + } + } + + header_fields = { kid: KID, typ: TYP } + + JWT.encode payload, RSA_PRIVATE, ALGORITHM_TYPE, header_fields + end + end + end +end diff --git a/lib/vye/dgib/configuration.rb b/lib/vye/dgib/configuration.rb new file mode 100644 index 00000000000..36616a18d15 --- /dev/null +++ b/lib/vye/dgib/configuration.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module Vye + module DGIB + class Configuration < Common::Client::Configuration::REST + def connection + @conn ||= Faraday.new(base_path, headers: base_request_headers, request: request_options) do |faraday| + faraday.use :breakers + faraday.ssl[:ca_file] = Settings.dgi.vye.jwt.public_ica11_rca2_key_path + faraday.request :json + faraday.use Faraday::Response::RaiseError + faraday.response :betamocks if mock_enabled? + faraday.response :snakecase, symbolize: false + faraday.response :json, content_type: /\bjson$/ # ensures only json content types parsed + faraday.adapter Faraday.default_adapter + end + end + + def base_path + Settings.dgi.vye.vets.url.to_s + end + + def service_name + 'VYE/DGIB' + end + + def mock_enabled? + Settings.dgi.vye.vets.mock || false + end + end + end +end diff --git a/lib/vye/dgib/response.rb b/lib/vye/dgib/response.rb new file mode 100644 index 00000000000..fe28fa37d75 --- /dev/null +++ b/lib/vye/dgib/response.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true + +require 'common/client/concerns/service_status' +require 'common/models/base' + +module Vye + module DGIB + class Response < Common::Base + include Common::Client::Concerns::ServiceStatus + + attribute :status, Integer + + def initialize(status, attributes = nil) + super(attributes) if attributes + self.status = status + end + + def ok? + status == 200 + end + + def cache? + ok? + end + + def metadata + { status: response_status } + end + + def response_status + case status + when 200 + RESPONSE_STATUS[:ok] + when 204 + RESPONSE_STATUS[:no_content] + when 403 + RESPONSE_STATUS[:not_authorized] + when 404 + RESPONSE_STATUS[:not_found] + when 500 + RESPONSE_STATUS[:internal_server_error] + else + RESPONSE_STATUS[:server_error] + end + end + end + + class ClaimantStatusResponse < Response + attribute :claimant_id, Integer + attribute :delimiting_date, String + attribute :verified_details, Array + attribute :payment_on_hold, Boolean + + def initialize(status, response = nil) + attributes = { + claimant_id: response.body['claimant_id'], + delimiting_date: response.body['delimiting_date'], + verified_details: response.body['verified_details'], + payment_on_hold: response.body['payment_on_hold'] + } + + super(status, attributes) + end + end + + class ClaimantLookupResponse < Response + attribute :claimant_id, Integer + + def initialize(status, response = nil) + attributes = { claimant_id: response.body['claimant_id'] } + + super(status, attributes) + end + end + + class VerificationRecordResponse < Response + attribute :claimant_id, Integer + attribute :delimiting_date, String + attribute :enrollment_verifications, Array + attribute :verified_details, Array + attribute :payment_on_hold, Boolean + + def initialize(status, response = nil) + attributes = { + claimant_id: response.body['claimant_id'], + delimiting_date: response.body['delimiting_date'], + enrollment_verifications: response.body['enrollment_verifications'], + verified_details: response.body['verified_details'], + payment_on_hold: response.body['payment_on_hold'] + } + + super(status, attributes) + end + end + + class VerifyClaimantResponse < Response + attribute :claimant_id, Integer + attribute :delimiting_date, String + attribute :verified_details, Array + attribute :payment_on_hold, Boolean + + def initialize(status, response = nil) + attributes = { + claimant_id: response.body['claimant_id'], + delimiting_date: response.body['delimiting_date'], + verified_details: response.body['verified_details'], + payment_on_hold: response.body['payment_on_hold'] + } + + super(status, attributes) + end + end + end +end diff --git a/lib/vye/dgib/service.rb b/lib/vye/dgib/service.rb new file mode 100644 index 00000000000..6a3b7761527 --- /dev/null +++ b/lib/vye/dgib/service.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +require 'common/client/base' +require_relative 'configuration' +require_relative 'response' +require_relative 'authentication_token_service' + +module Vye + module DGIB + class Service < Common::Client::Base + include Common::Client::Concerns::Monitoring + + STATSD_KEY_PREFIX = 'api.vye.dgib' + configuration Vye::DGIB::Configuration + + def initialize(user) + @user = user + end + + def camelize_keys_for_java_service(params) + local_params = params[0] || params + + local_params.permit!.to_h.deep_transform_keys do |key| + if key.include?('_') + split_keys = key.split('_') + split_keys.collect { |key_part| split_keys[0] == key_part ? key_part : key_part.capitalize }.join + else + key + end + end + end + + def claimant_lookup(ssn) + params = ActionController::Parameters.new({ ssn: }) + with_monitoring do + headers = request_headers + options = { timeout: 60 } + response = perform(:post, claimant_lookup_end_point, camelize_keys_for_java_service(params).to_json, headers, + options) + ClaimantLookupResponse.new(response.status, response) + end + end + + def get_claimant_status(claimant_id) + with_monitoring do + headers = request_headers + options = { timeout: 60 } + raw_response = perform(:get, claimant_status_end_point(claimant_id), {}, headers, options) + ClaimantStatusRecordResponse.new(raw_response.status, raw_response) + end + end + + # rubocop:disable Metrics/ParameterLists + def verify_claimant( + claimant_id, + verified_period_begin_date, + verified_period_end_date, + verified_through_date, + verification_method, + response_type + ) + params = ActionController::Parameters.new({ + claimant_id:, + verified_period_begin_date:, + verified_period_end_date:, + verified_through_date:, + verification_method:, + app_communication: { response_type: } + }) + # rubocop:enable Metrics/ParameterLists + + with_monitoring do + headers = request_headers + options = { timeout: 60 } + response = perform(:post, verify_claimant_end_point, camelize_keys_for_java_service(params).to_json, headers, + options) + VerifyClaimantResponse.new(response.status, response) + end + end + + def get_verification_record(claimant_id) + with_monitoring do + headers = request_headers + options = { timeout: 60 } + raw_response = perform(:get, verification_record_end_point(claimant_id), {}, headers, options) + VerificationRecordResponse.new(raw_response.status, raw_response) + end + end + + private + + def claimant_lookup_end_point + 'dgi/vye/claimantLookup' + end + + def claimant_status_end_point(claimant_id) + "verifications/vye/#{claimant_id}/status" + end + + def verify_claimant_end_point + 'verifications/vye/verify' + end + + def verification_record_end_point(claimant_id) + "verifications/vye/#{claimant_id}/verification-record" + end + + def json + nil + end + + def request_headers + { + Authorization: "Bearer #{AuthenticationTokenService.call}" + } + end + end + end +end diff --git a/modules/accredited_representative_portal/accredited_representative_portal.gemspec b/modules/accredited_representative_portal/accredited_representative_portal.gemspec index 7cc5214cfb9..0a163557ead 100644 --- a/modules/accredited_representative_portal/accredited_representative_portal.gemspec +++ b/modules/accredited_representative_portal/accredited_representative_portal.gemspec @@ -18,5 +18,8 @@ Gem::Specification.new do |spec| spec.files = Dir['{app,config,db,lib}/**/*', 'Rakefile', 'README.md'] spec.test_files = Dir['spec/**/*'] + + spec.add_dependency 'blind_index' + spec.add_development_dependency 'activerecord' spec.add_development_dependency 'rspec-rails' end diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_form.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_form.rb new file mode 100644 index 00000000000..b9d70b73e25 --- /dev/null +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_form.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module AccreditedRepresentativePortal + class PowerOfAttorneyForm < ApplicationRecord + belongs_to :power_of_attorney_request, + class_name: 'AccreditedRepresentativePortal::PowerOfAttorneyRequest', + inverse_of: :power_of_attorney_form + + has_kms_key + + has_encrypted :data, key: :kms_key, **lockbox_options + + blind_index :city + blind_index :state + blind_index :zipcode + end +end diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request.rb new file mode 100644 index 00000000000..18af415b22c --- /dev/null +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module AccreditedRepresentativePortal + class PowerOfAttorneyRequest < ApplicationRecord + belongs_to :claimant, class_name: 'UserAccount' + + has_one :power_of_attorney_form, + class_name: 'AccreditedRepresentativePortal::PowerOfAttorneyForm', + inverse_of: :power_of_attorney_request + + has_one :resolution, + class_name: 'AccreditedRepresentativePortal::PowerOfAttorneyRequestResolution', + inverse_of: :power_of_attorney_request + end +end diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_decision.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_decision.rb new file mode 100644 index 00000000000..6dcc0a03e41 --- /dev/null +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_decision.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module AccreditedRepresentativePortal + class PowerOfAttorneyRequestDecision < ApplicationRecord + include PowerOfAttorneyRequestResolution::Resolving + + self.inheritance_column = nil + + belongs_to :creator, + class_name: 'UserAccount' + end +end diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_expiration.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_expiration.rb new file mode 100644 index 00000000000..a2a6fd4cd9e --- /dev/null +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_expiration.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module AccreditedRepresentativePortal + class PowerOfAttorneyRequestExpiration < ApplicationRecord + include PowerOfAttorneyRequestResolution::Resolving + end +end diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_resolution.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_resolution.rb new file mode 100644 index 00000000000..96754cbb86d --- /dev/null +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_request_resolution.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module AccreditedRepresentativePortal + class PowerOfAttorneyRequestResolution < ApplicationRecord + belongs_to :power_of_attorney_request, + class_name: 'AccreditedRepresentativePortal::PowerOfAttorneyRequest', + inverse_of: :resolution + + RESOLVING_TYPES = [ + 'AccreditedRepresentativePortal::PowerOfAttorneyRequestExpiration', + 'AccreditedRepresentativePortal::PowerOfAttorneyRequestDecision' + ].freeze + + delegated_type :resolving, types: RESOLVING_TYPES + + has_kms_key + + has_encrypted :reason, key: :kms_key, **lockbox_options + + module Resolving + extend ActiveSupport::Concern + + included do + has_one :power_of_attorney_request_resolution, as: :resolving + end + end + end +end diff --git a/modules/accredited_representative_portal/app/services/accreditation_service.rb b/modules/accredited_representative_portal/app/services/accreditation_service.rb index bf0b8356793..fe0d793b7bc 100644 --- a/modules/accredited_representative_portal/app/services/accreditation_service.rb +++ b/modules/accredited_representative_portal/app/services/accreditation_service.rb @@ -13,6 +13,7 @@ class AccreditationService def self.submit_form21a(parsed_body, user_uuid) Rails.logger.info("Accreditation Service attempting submit_form21a with service_url: #{service_url}") connection.post do |req| + req.headers['x-api-key'] = Settings.ogc.form21a_service_url.api_key req.body = parsed_body.to_json end rescue Faraday::ConnectionFailed => e @@ -34,22 +35,8 @@ def self.connection end end - # NOTE: The interface between GCLAWS/OGC and vets-api is not yet established due to ongoing ESECC and MOU requests. - # TODO: Update the service URL based on the actual production and QA URLs once the below issue is resolved. See: - # https://github.com/department-of-veterans-affairs/va.gov-team/issues/85933 - # https://dsva.slack.com/archives/C06ABHUNBRS/p1721769692072489 # self.service_url: Determines and returns the service URL based on the current environment. def self.service_url - case Rails.env - when 'development', 'test' - # NOTE: the below is a temporary URL for development purposes only. - # TODO: Update this once ESECC request goes through. See: https://github.com/department-of-veterans-affairs/va.gov-team/issues/88288 - 'http://localhost:5000/api/v1/accreditation/applications/form21a' - when 'production' - # TODO: Update this once MOU has been signed and the ESECC request has gone through. See: - # https://dsva.slack.com/archives/C06ABHUNBRS/p1721769692072489 - # https://github.com/department-of-veterans-affairs/va.gov-team/issues/85933 - raise 'Accreditation service URL not configured for production' - end + Settings.ogc.form21a_service_url.url end end diff --git a/modules/accredited_representative_portal/db/migrate/20241212000100_create_ar_power_of_attorney_requests.rb b/modules/accredited_representative_portal/db/migrate/20241212000100_create_ar_power_of_attorney_requests.rb new file mode 100644 index 00000000000..3398d6208e0 --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241212000100_create_ar_power_of_attorney_requests.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class CreateArPowerOfAttorneyRequests < ActiveRecord::Migration[7.1] + def change + create_table :ar_power_of_attorney_requests, id: :uuid do |t| + t.references :claimant, type: :uuid, foreign_key: { to_table: :user_accounts }, null: false + t.datetime :created_at, null: false + end + end +end diff --git a/modules/accredited_representative_portal/db/migrate/20241212000150_create_ar_power_of_attorney_request_resolutions.rb b/modules/accredited_representative_portal/db/migrate/20241212000150_create_ar_power_of_attorney_request_resolutions.rb new file mode 100644 index 00000000000..9096e43d2d6 --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241212000150_create_ar_power_of_attorney_request_resolutions.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class CreateArPowerOfAttorneyRequestResolutions < ActiveRecord::Migration[7.1] + disable_ddl_transaction! # Required for concurrent index creation + + def change + create_table :ar_power_of_attorney_request_resolutions, id: :uuid do |t| + t.references :power_of_attorney_request, + type: :uuid, + foreign_key: { to_table: :ar_power_of_attorney_requests }, + null: false, + index: { unique: true } + t.string :resolving_type, null: false + t.uuid :resolving_id, null: false + t.text :reason_ciphertext + t.text :encrypted_kms_key, null: false + t.datetime :created_at, null: false + end + + # Add a unique index to ensure one resolution per resolving_type and resolving_id combination + add_index :ar_power_of_attorney_request_resolutions, + [:resolving_type, :resolving_id], + unique: true, + name: 'unique_resolving_type_and_id', + algorithm: :concurrently + end +end diff --git a/modules/accredited_representative_portal/db/migrate/20241212000155_create_ar_power_of_attorney_request_decisions.rb b/modules/accredited_representative_portal/db/migrate/20241212000155_create_ar_power_of_attorney_request_decisions.rb new file mode 100644 index 00000000000..7cfe23b79c2 --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241212000155_create_ar_power_of_attorney_request_decisions.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CreateArPowerOfAttorneyRequestDecisions < ActiveRecord::Migration[7.1] + disable_ddl_transaction! # Required for concurrent index creation + + def change + # Decisions act as a delegated subtype of Resolutions + # This table stores specific 'decision' types for PowerOfAttorneyRequestResolutions + create_table :ar_power_of_attorney_request_decisions, id: :uuid do |t| + t.string 'type', null: false + t.references 'creator', type: :uuid, foreign_key: { to_table: :user_accounts }, null: false + end + end +end + diff --git a/modules/accredited_representative_portal/db/migrate/20241212000160_create_ar_power_of_attorney_request_expirations.rb b/modules/accredited_representative_portal/db/migrate/20241212000160_create_ar_power_of_attorney_request_expirations.rb new file mode 100644 index 00000000000..05c556bd55a --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241212000160_create_ar_power_of_attorney_request_expirations.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class CreateArPowerOfAttorneyRequestExpirations < ActiveRecord::Migration[7.1] + disable_ddl_transaction! # Required for concurrent index creation + + def change + # Expirations act as a delegated subtype of Resolutions + # This table tracks expiration records for PowerOfAttorneyRequestResolutions + create_table :ar_power_of_attorney_request_expirations, id: :uuid + end +end + diff --git a/modules/accredited_representative_portal/db/migrate/20241212000200_create_ar_power_of_attorney_forms.rb b/modules/accredited_representative_portal/db/migrate/20241212000200_create_ar_power_of_attorney_forms.rb new file mode 100644 index 00000000000..2539b515aba --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241212000200_create_ar_power_of_attorney_forms.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class CreateArPowerOfAttorneyForms < ActiveRecord::Migration[7.1] + disable_ddl_transaction! # Required for concurrent index creation + + def change + create_table :ar_power_of_attorney_forms, id: :uuid do |t| + t.references :power_of_attorney_request, + type: :uuid, + foreign_key: { to_table: :ar_power_of_attorney_requests }, + null: false, + index: { unique: true } + + t.text :encrypted_kms_key, null: false + t.text :data_ciphertext, null: false + t.string :city_bidx, null: false + t.string :state_bidx, null: false + t.string :zipcode_bidx, null: false + end + + # Add additional indexes for city, state, and zipcode + add_index :ar_power_of_attorney_forms, + [:city_bidx, :state_bidx, :zipcode_bidx], + algorithm: :concurrently + + add_index :ar_power_of_attorney_forms, + :zipcode_bidx, + algorithm: :concurrently + end +end diff --git a/modules/accredited_representative_portal/db/migrate/20241220164524_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_forms.rb b/modules/accredited_representative_portal/db/migrate/20241220164524_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_forms.rb new file mode 100644 index 00000000000..ed10d79354e --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241220164524_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_forms.rb @@ -0,0 +1,5 @@ +class RemoveNullConstraintFromEncryptedKmsKeyInArPowerOfAttorneyForms < ActiveRecord::Migration[7.2] + def change + change_column_null :ar_power_of_attorney_forms, :encrypted_kms_key, true + end +end diff --git a/modules/accredited_representative_portal/db/migrate/20241220164548_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_request_resolutions.rb b/modules/accredited_representative_portal/db/migrate/20241220164548_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_request_resolutions.rb new file mode 100644 index 00000000000..ce13bf00ca2 --- /dev/null +++ b/modules/accredited_representative_portal/db/migrate/20241220164548_remove_null_constraint_from_encrypted_kms_key_in_ar_power_of_attorney_request_resolutions.rb @@ -0,0 +1,5 @@ +class RemoveNullConstraintFromEncryptedKmsKeyInArPowerOfAttorneyRequestResolutions < ActiveRecord::Migration[7.2] + def change + change_column_null :ar_power_of_attorney_request_resolutions, :encrypted_kms_key, true + end +end diff --git a/modules/accredited_representative_portal/lib/accredited_representative_portal/engine.rb b/modules/accredited_representative_portal/lib/accredited_representative_portal/engine.rb index 5749fae6814..864b156a223 100644 --- a/modules/accredited_representative_portal/lib/accredited_representative_portal/engine.rb +++ b/modules/accredited_representative_portal/lib/accredited_representative_portal/engine.rb @@ -3,8 +3,28 @@ module AccreditedRepresentativePortal class Engine < ::Rails::Engine isolate_namespace AccreditedRepresentativePortal + + # `isolate_namespace` redefines `table_name_prefix` on load of + # `active_record`, so we append our own callback to redefine it again how we + # want. + ActiveSupport.on_load(:active_record) do + AccreditedRepresentativePortal.redefine_singleton_method(:table_name_prefix) do + 'ar_' + end + end + config.generators.api_only = true + # So that the app-wide migration command notices our engine's migrations. + initializer :append_migrations do |app| + unless app.root.to_s.match? root.to_s + config.paths['db/migrate'].expanded.each do |expanded_path| + app.config.paths['db/migrate'] << expanded_path + ActiveRecord::Migrator.migrations_paths << expanded_path + end + end + end + initializer 'model_core.factories', after: 'factory_bot.set_factory_paths' do FactoryBot.definition_file_paths << File.expand_path('../../spec/factories', __dir__) if defined?(FactoryBot) end diff --git a/modules/accredited_representative_portal/spec/factories/power_of_attorney_decision.rb b/modules/accredited_representative_portal/spec/factories/power_of_attorney_decision.rb new file mode 100644 index 00000000000..fd6f2e65d66 --- /dev/null +++ b/modules/accredited_representative_portal/spec/factories/power_of_attorney_decision.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :power_of_attorney_request_decision, + class: 'AccreditedRepresentativePortal::PowerOfAttorneyRequestDecision' do + id { Faker::Internet.uuid } + association :creator, factory: :user_account + type { 'Approval' } + end +end diff --git a/modules/accredited_representative_portal/spec/factories/power_of_attorney_expiration.rb b/modules/accredited_representative_portal/spec/factories/power_of_attorney_expiration.rb new file mode 100644 index 00000000000..2f294a2a9fb --- /dev/null +++ b/modules/accredited_representative_portal/spec/factories/power_of_attorney_expiration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :power_of_attorney_request_expiration, + class: 'AccreditedRepresentativePortal::PowerOfAttorneyRequestExpiration' do + id { Faker::Internet.uuid } + end +end diff --git a/modules/accredited_representative_portal/spec/factories/power_of_attorney_form.rb b/modules/accredited_representative_portal/spec/factories/power_of_attorney_form.rb new file mode 100644 index 00000000000..adb3cb7f3ca --- /dev/null +++ b/modules/accredited_representative_portal/spec/factories/power_of_attorney_form.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :power_of_attorney_form, class: 'AccreditedRepresentativePortal::PowerOfAttorneyForm' do + association :power_of_attorney_request, factory: :power_of_attorney_request + data_ciphertext { 'Test encrypted data' } + city_bidx { Faker::Alphanumeric.alphanumeric(number: 44) } + state_bidx { Faker::Alphanumeric.alphanumeric(number: 44) } + zipcode_bidx { Faker::Alphanumeric.alphanumeric(number: 44) } + end +end diff --git a/modules/accredited_representative_portal/spec/factories/power_of_attorney_request.rb b/modules/accredited_representative_portal/spec/factories/power_of_attorney_request.rb new file mode 100644 index 00000000000..0aa23eea4f6 --- /dev/null +++ b/modules/accredited_representative_portal/spec/factories/power_of_attorney_request.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :power_of_attorney_request, class: 'AccreditedRepresentativePortal::PowerOfAttorneyRequest' do + association :claimant, factory: :user_account + id { Faker::Internet.uuid } + created_at { Time.current } + end +end diff --git a/modules/accredited_representative_portal/spec/factories/power_of_attorney_request_resolution.rb b/modules/accredited_representative_portal/spec/factories/power_of_attorney_request_resolution.rb new file mode 100644 index 00000000000..189eb10cd37 --- /dev/null +++ b/modules/accredited_representative_portal/spec/factories/power_of_attorney_request_resolution.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :power_of_attorney_request_resolution, + class: 'AccreditedRepresentativePortal::PowerOfAttorneyRequestResolution' do + association :power_of_attorney_request, factory: :power_of_attorney_request + resolving_id { SecureRandom.uuid } + reason_ciphertext { 'Encrypted Reason' } + created_at { Time.current } + + trait :with_expiration do + resolving_type { 'AccreditedRepresentativePortal::PowerOfAttorneyRequestExpiration' } + resolving { create(:power_of_attorney_request_expiration) } + end + + trait :with_decision do + resolving_type { 'AccreditedRepresentativePortal::PowerOfAttorneyRequestDecision' } + resolving { create(:power_of_attorney_request_decision) } + end + + trait :with_invalid_type do + resolving_type { 'AccreditedRepresentativePortal::InvalidType' } + resolving { AccreditedRepresentativePortal::InvalidType.new } + end + end +end + +module AccreditedRepresentativePortal + class InvalidType + def method_missing(_method, *_args) = self + + def respond_to_missing?(_method, _include_private = false) = true + + def id = nil + + def self.method_missing(_method, *_args) = NullObject.new + + def self.respond_to_missing?(_method, _include_private = false) = true + end + + class NullObject + def method_missing(_method, *_args) = self + + def respond_to_missing?(*) = true + + def nil? = true + + def to_s = '' + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_form_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_form_spec.rb new file mode 100644 index 00000000000..0767cf0ceca --- /dev/null +++ b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_form_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require_relative '../../rails_helper' + +RSpec.describe AccreditedRepresentativePortal::PowerOfAttorneyForm, type: :model do + describe 'associations' do + it { is_expected.to belong_to(:power_of_attorney_request) } + end + + describe 'creation' do + it 'creates a valid form' do + form = build(:power_of_attorney_form, data_ciphertext: 'test_data') + expect(form).to be_valid + end + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_decision_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_decision_spec.rb new file mode 100644 index 00000000000..c2376dc7ecd --- /dev/null +++ b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_decision_spec.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +require_relative '../../rails_helper' + +RSpec.describe AccreditedRepresentativePortal::PowerOfAttorneyRequestDecision, type: :model do + describe 'associations' do + it { is_expected.to belong_to(:creator).class_name('UserAccount') } + it { is_expected.to have_one(:power_of_attorney_request_resolution) } + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_expiration_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_expiration_spec.rb new file mode 100644 index 00000000000..2213312df20 --- /dev/null +++ b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_expiration_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require_relative '../../rails_helper' + +RSpec.describe AccreditedRepresentativePortal::PowerOfAttorneyRequestExpiration, type: :model do + describe 'associations' do + it { is_expected.to have_one(:power_of_attorney_request_resolution) } + end + + describe 'validations' do + it 'creates a valid record' do + expiration = create(:power_of_attorney_request_expiration) + expect(expiration).to be_valid + end + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_resolution_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_resolution_spec.rb new file mode 100644 index 00000000000..e7a006aac77 --- /dev/null +++ b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_resolution_spec.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +require_relative '../../rails_helper' + +mod = AccreditedRepresentativePortal +RSpec.describe mod::PowerOfAttorneyRequestResolution, type: :model do + describe 'associations' do + let(:power_of_attorney_request) { create(:power_of_attorney_request) } + + it { is_expected.to belong_to(:power_of_attorney_request) } + + it 'can resolve to PowerOfAttorneyRequestExpiration' do + expiration = create(:power_of_attorney_request_expiration) + resolution = described_class.create!( + resolving: expiration, + power_of_attorney_request: power_of_attorney_request, + created_at: Time.zone.now, + encrypted_kms_key: SecureRandom.hex(16) + ) + + expect(resolution.resolving).to eq(expiration) + expect(resolution.resolving_type).to eq('AccreditedRepresentativePortal::PowerOfAttorneyRequestExpiration') + end + + it 'can resolve to PowerOfAttorneyRequestDecision' do + decision = create(:power_of_attorney_request_decision) + resolution = described_class.create!( + resolving: decision, + power_of_attorney_request: power_of_attorney_request, + created_at: Time.zone.now, + encrypted_kms_key: SecureRandom.hex(16) + ) + + expect(resolution.resolving).to eq(decision) + expect(resolution.resolving_type).to eq('AccreditedRepresentativePortal::PowerOfAttorneyRequestDecision') + end + end + + describe 'delegated_type resolving' do + it 'is valid with expiration resolving' do + resolution = create(:power_of_attorney_request_resolution, :with_expiration) + expect(resolution).to be_valid + expect(resolution.resolving).to be_a(mod::PowerOfAttorneyRequestExpiration) + end + + it 'is valid with decision resolving' do + resolution = create(:power_of_attorney_request_resolution, :with_decision) + expect(resolution).to be_valid + expect(resolution.resolving).to be_a(mod::PowerOfAttorneyRequestDecision) + end + + it 'is invalid with null resolving_type and resolving_id' do + resolution = build(:power_of_attorney_request_resolution, resolving_type: nil, resolving_id: nil) + expect(resolution).not_to be_valid + end + end + + describe 'heterogeneous list behavior' do + it 'conveniently returns heterogeneous lists' do + travel_to Time.zone.parse('2024-11-25T09:46:24Z') do + creator = create(:user_account) + + ids = [] + + # Persisted resolving records + decision_acceptance = mod::PowerOfAttorneyRequestDecision.create!( + type: 'acceptance', + creator: creator + ) + decision_declination = mod::PowerOfAttorneyRequestDecision.create!( + type: 'declination', + creator: creator + ) + expiration = mod::PowerOfAttorneyRequestExpiration.create! + + # Associate resolving records + ids << described_class.create!( + power_of_attorney_request: create(:power_of_attorney_request), + resolving: decision_acceptance, + encrypted_kms_key: SecureRandom.hex(16), + created_at: Time.current + ).id + + ids << described_class.create!( + power_of_attorney_request: create(:power_of_attorney_request), + resolving: decision_declination, + encrypted_kms_key: SecureRandom.hex(16), + created_at: Time.current + ).id + + ids << described_class.create!( + power_of_attorney_request: create(:power_of_attorney_request), + resolving: expiration, + encrypted_kms_key: SecureRandom.hex(16), + created_at: Time.current + ).id + + resolutions = described_class.includes(:resolving).find(ids) + + # Serialize for comparison + actual = + resolutions.map do |resolution| + serialized = + case resolution.resolving + when mod::PowerOfAttorneyRequestDecision + { + type: 'decision', + decision_type: resolution.resolving.type + } + when mod::PowerOfAttorneyRequestExpiration + { + type: 'expiration' + } + end + + serialized.merge!( + created_at: resolution.created_at.iso8601 + ) + end + + expect(actual).to eq( + [ + { + type: 'decision', + decision_type: 'acceptance', + created_at: '2024-11-25T09:46:24Z' + }, + { + type: 'decision', + decision_type: 'declination', + created_at: '2024-11-25T09:46:24Z' + }, + { + type: 'expiration', + created_at: '2024-11-25T09:46:24Z' + } + ] + ) + end + end + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_spec.rb new file mode 100644 index 00000000000..81b29d90317 --- /dev/null +++ b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/power_of_attorney_request_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require_relative '../../rails_helper' + +RSpec.describe AccreditedRepresentativePortal::PowerOfAttorneyRequest, type: :model do + describe 'associations' do + it { is_expected.to belong_to(:claimant).class_name('UserAccount') } + it { is_expected.to have_one(:power_of_attorney_form) } + it { is_expected.to have_one(:resolution) } + end +end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/representative_user_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representative_portal/representative_user_spec.rb similarity index 100% rename from modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/representative_user_spec.rb rename to modules/accredited_representative_portal/spec/models/accredited_representative_portal/representative_user_spec.rb diff --git a/modules/accredited_representative_portal/spec/services/accreditation_service_spec.rb b/modules/accredited_representative_portal/spec/services/accreditation_service_spec.rb index 591074e8ad3..f8b5c421d0a 100644 --- a/modules/accredited_representative_portal/spec/services/accreditation_service_spec.rb +++ b/modules/accredited_representative_portal/spec/services/accreditation_service_spec.rb @@ -11,7 +11,7 @@ describe '#submit_form21a' do context 'when the request is successful' do it 'returns a successful response' do - stub_request(:post, 'http://localhost:5000/api/v1/accreditation/applications/form21a') + stub_request(:post, Settings.ogc.form21a_service_url.url) .to_return(status: 200, body: parsed_body.to_json, headers: { 'Content-Type' => 'application/json' }) response = described_class.submit_form21a(parsed_body, user_uuid) @@ -23,12 +23,12 @@ context 'when the connection fails' do it 'logs the error and returns a service unavailable status' do - stub_request(:post, 'http://localhost:5000/api/v1/accreditation/applications/form21a') + stub_request(:post, Settings.ogc.form21a_service_url.url) .to_raise(Faraday::ConnectionFailed.new('Accreditation Service connection failed')) expect(Rails.logger).to receive(:error).with( "Accreditation Service connection failed for user with user_uuid=#{user_uuid}: " \ - 'Accreditation Service connection failed, URL: http://localhost:5000/api/v1/accreditation/applications/form21a' + "Accreditation Service connection failed, URL: #{Settings.ogc.form21a_service_url.url}" ) response = described_class.submit_form21a(parsed_body, user_uuid) @@ -40,7 +40,7 @@ context 'when the request times out' do it 'logs the error and returns a request timeout status' do - stub_request(:post, 'http://localhost:5000/api/v1/accreditation/applications/form21a') + stub_request(:post, Settings.ogc.form21a_service_url.url) .to_raise(Faraday::TimeoutError.new('Request timed out')) expect(Rails.logger).to receive(:error).with( diff --git a/modules/ask_va_api/app/controllers/ask_va_api/v0/health_facilities_controller.rb b/modules/ask_va_api/app/controllers/ask_va_api/v0/health_facilities_controller.rb index 57e6b7e04ca..45201000688 100644 --- a/modules/ask_va_api/app/controllers/ask_va_api/v0/health_facilities_controller.rb +++ b/modules/ask_va_api/app/controllers/ask_va_api/v0/health_facilities_controller.rb @@ -17,7 +17,20 @@ def search api_result.tmp_covid_online_scheduling = mobile_api_get_by_id(api_result.id) end end - render_json(serializer, lighthouse_params, api_results) + + patsr_approved_codes = retrieve_patsr_approved_facilities[:Data].pluck(:FacilityCode) + + filtered_results = WillPaginate::Collection.create( + api_results.current_page, + api_results.per_page, + api_results.total_entries + ) do |pager| + filtered_items = api_results.select { |object| patsr_approved_codes.include?(object.unique_id) } + pager.replace(filtered_items) + pager.total_entries = filtered_items.size + end + + render_json(serializer, lighthouse_params, filtered_results) end def show @@ -28,6 +41,10 @@ def show private + def retrieve_patsr_approved_facilities + Crm::CacheData.new.fetch_and_cache_data(endpoint: 'Facilities', cache_key: 'Facilities', payload: {}) + end + def api FacilitiesApi::V2::Lighthouse::Client.new end diff --git a/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/inquiry_details.rb b/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/inquiry_details.rb index 3681b9f0582..065a2437925 100644 --- a/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/inquiry_details.rb +++ b/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/inquiry_details.rb @@ -14,7 +14,8 @@ def call inquiry_details = base_inquiry_details(inquiry_params[:your_role]) if education_benefits?(inquiry_params[:select_category], - inquiry_params[:select_topic]) + inquiry_params[:select_topic]) || + inquiry_params[:who_is_your_question_about] == "It's a general question" return general_inquiry(inquiry_params, inquiry_details) end diff --git a/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/shared_helpers.rb b/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/shared_helpers.rb index 819d16e7795..8dab40e8228 100644 --- a/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/shared_helpers.rb +++ b/modules/ask_va_api/app/lib/ask_va_api/inquiries/payload_builder/shared_helpers.rb @@ -20,7 +20,7 @@ def fetch_state(state_code) def formatted_pronouns(pronouns) return unless pronouns - pronouns[:pronouns_not_listed_text].presence || pronouns.key(true)&.to_s&.tr('_', '/') + pronouns[:pronouns_not_listed_text].presence || pronouns.key('true')&.to_s&.tr('_', '/') end def contact_field(field, inquiry_details, inquiry_params) diff --git a/modules/ask_va_api/app/sidekiq/crm/facilities_data_job.rb b/modules/ask_va_api/app/sidekiq/crm/facilities_data_job.rb new file mode 100644 index 00000000000..35347396b1d --- /dev/null +++ b/modules/ask_va_api/app/sidekiq/crm/facilities_data_job.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'sidekiq' + +module Crm + class FacilitiesDataJob + include Sidekiq::Job + + # Schedule to run every 24 hours. Adjust as needed. + sidekiq_options retry: false, unique_for: 24.hours + + def perform + Crm::CacheData.new.fetch_and_cache_data(endpoint: 'Facilities', cache_key: 'Facilities', payload: {}) + rescue => e + log_error('optionset', e) + end + + private + + def log_error(action, exception) + LogService.new.call(action) do |span| + span.set_tag('error', true) + span.set_tag('error.msg', exception.message) + end + Rails.logger.error("Error during #{action}: #{exception.message}") + end + end +end diff --git a/modules/ask_va_api/config/locales/get_facilities_mock_data.json b/modules/ask_va_api/config/locales/get_facilities_mock_data.json new file mode 100644 index 00000000000..b9fc38a7e47 --- /dev/null +++ b/modules/ask_va_api/config/locales/get_facilities_mock_data.json @@ -0,0 +1,177 @@ +{"Data": + [{"Name": "VISN 101 - VHACO", "FacilityCode": "101", "IsAvaTestFacility":" true"}, + {"Name": "200NAA - ADVENTHEALTH", "FacilityCode": "200NAA", "IsAvaTestFacility":" true"}, + {"Name": "VISN - Member Services", "FacilityCode": "MS", "IsAvaTestFacility":" true"}, + {"Name": "VISN 1 - VA New England Healthcare System", "FacilityCode": "478", "IsAvaTestFacility":" true"}, + {"Name": "VISN 2 - NY/NJ VA Health Care Network", "FacilityCode": "479", "IsAvaTestFacility":" true"}, + {"Name": "VISN 4 - VA Healthcare - VISN 4", "FacilityCode": "481", "IsAvaTestFacility":" true"}, + {"Name": "VISN 5 - VA Capitol Health Care Network", "FacilityCode": "482", "IsAvaTestFacility":" true"}, + {"Name": "VISN 6 - VA Mid-Atlantic Health Care Network", "FacilityCode": "483", "IsAvaTestFacility":" true"}, + {"Name": "VISN 7 - VA Southeast Network", "FacilityCode": "484", "IsAvaTestFacility":" true"}, + {"Name": "VISN 8 - VA Sunshine Healthcare Network", "FacilityCode": "485", "IsAvaTestFacility":" true"}, + {"Name": "VISN 9 - VA Mid South Healthcare Network", "FacilityCode": "486", "IsAvaTestFacility":" true"}, + {"Name": "VISN 10 - VA Healthcare System of Ohio", "FacilityCode": "487", "IsAvaTestFacility":" true"}, + {"Name": "VISN 12 - VA Great Lakes Health Care System", "FacilityCode": "489", "IsAvaTestFacility":" true"}, + {"Name": "VISN 15 - VA Heartland Network", "FacilityCode": "491", "IsAvaTestFacility":" true"}, + {"Name": "VISN 16 - South Central VA Health Care Network", "FacilityCode": "492", "IsAvaTestFacility":" true"}, + {"Name": "VISN 17 - VA Heart of Texas Health Care Network", "FacilityCode": "493", "IsAvaTestFacility":" true"}, + {"Name": "VISN 19 - Rocky Mountain Network", "FacilityCode": "495", "IsAvaTestFacility":" true"}, + {"Name": "VISN 20 - Northwest Network", "FacilityCode": "496", "IsAvaTestFacility":" true"}, + {"Name": "VISN 21 - Sierra Pacific Network", "FacilityCode": "497", "IsAvaTestFacility":" true"}, + {"Name": "VISN 22 - Desert Pacific Healthcare Network", "FacilityCode": "498", "IsAvaTestFacility":" true"}, + {"Name": "VISN 23 - VA Midwest Health Care Network", "FacilityCode": "499", "IsAvaTestFacility":" true"}, + {"Name": "101 - VHACO", "FacilityCode": "101", "IsAvaTestFacility": "false"}, + {"Name": "135 - Community Care Contact Center", "FacilityCode": "135", "IsAvaTestFacility":" true"}, + {"Name": "VISN 97 - Test VISN", "FacilityCode": "997", "IsAvaTestFacility":" true"}, + {"Name": "VISN 98 - Test VISN 2", "FacilityCode": "998", "IsAvaTestFacility":" true"}, + {"Name": "VISN 99 - Test VISN 3", "FacilityCode": "999", "IsAvaTestFacility":" true"}, + {"Name": "358 - Manila-Pasay City", "FacilityCode": "358", "IsAvaTestFacility": "false"}, + {"Name": "528A6 - Bath-New York", "FacilityCode": "528A6", "IsAvaTestFacility": "false"}, + {"Name": "528A7 - Syracuse", "FacilityCode": "528A7", "IsAvaTestFacility": "false"}, + {"Name": "528A8 - Albany-New York", "FacilityCode": "528A8", "IsAvaTestFacility": "false"}, + {"Name": "589A4 - Columbia-Missouri", "FacilityCode": "589A4", "IsAvaTestFacility": "false"}, + {"Name": "589A5 - Topeka", "FacilityCode": "589A5", "IsAvaTestFacility": "false"}, + {"Name": "589A7 - Wichita-Kansas", "FacilityCode": "589A7", "IsAvaTestFacility": "false"}, + {"Name": "612 - Northern California Health Care System", "FacilityCode": "612", "IsAvaTestFacility": "false"}, + {"Name": "636A6 - Des Moines-Iowa", "FacilityCode": "636A6", "IsAvaTestFacility": "false"}, + {"Name": "636A8 - Iowa City-Iowa", "FacilityCode": "636A8", "IsAvaTestFacility": "false"}, + {"Name": "657A4 - Poplar Bluff", "FacilityCode": "657A4", "IsAvaTestFacility": "false"}, + {"Name": "657A5 - Marion-Illinois", "FacilityCode": "657A5", "IsAvaTestFacility": "false"}, + {"Name": "987 - CHEY6 ", "FacilityCode": "987", "IsAvaTestFacility":" true"}, + {"Name": "998 - Test Facility", "FacilityCode": "998", "IsAvaTestFacility":" true"}, + {"Name": "984 - DAYTSHR ", "FacilityCode": "984", "IsAvaTestFacility":" true"}, + {"Name": "654 - Reno-Nevada", "FacilityCode": "654", "IsAvaTestFacility": "false"}, + {"Name": "459 - Honolulu", "FacilityCode": "459", "IsAvaTestFacility": "false"}, + {"Name": "570 - Fresno", "FacilityCode": "570", "IsAvaTestFacility": "false"}, + {"Name": "640 - Palo Alto-California", "FacilityCode": "640", "IsAvaTestFacility": "false"}, + {"Name": "662 - San Francisco-California", "FacilityCode": "662", "IsAvaTestFacility": "false"}, + {"Name": "442 - Cheyenne", "FacilityCode": "442", "IsAvaTestFacility": "false"}, + {"Name": "436 - Fort Harrison", "FacilityCode": "436", "IsAvaTestFacility": "false"}, + {"Name": "402 - Togus", "FacilityCode": "402", "IsAvaTestFacility": "false"}, + {"Name": "405 - White River Junction", "FacilityCode": "405", "IsAvaTestFacility": "false"}, + {"Name": "437 - Fargo", "FacilityCode": "437", "IsAvaTestFacility": "false"}, + {"Name": "438 - Sioux Falls", "FacilityCode": "438", "IsAvaTestFacility": "false"}, + {"Name": "460 - Wilmington-Delaware", "FacilityCode": "460", "IsAvaTestFacility": "false"}, + {"Name": "463 - Anchorage", "FacilityCode": "463", "IsAvaTestFacility": "false"}, + {"Name": "501 - Albuquerque", "FacilityCode": "501", "IsAvaTestFacility": "false"}, + {"Name": "502 - Alexandria-Louisiana", "FacilityCode": "502", "IsAvaTestFacility": "false"}, + {"Name": "503 - Altoona", "FacilityCode": "503", "IsAvaTestFacility": "false"}, + {"Name": "504 - Amarillo", "FacilityCode": "504", "IsAvaTestFacility": "false"}, + {"Name": "506 - Ann Arbor-Michigan", "FacilityCode": "506", "IsAvaTestFacility": "false"}, + {"Name": "508 - Atlanta-Georgia", "FacilityCode": "508", "IsAvaTestFacility": "false"}, + {"Name": "509 - Augusta Downtown", "FacilityCode": "509", "IsAvaTestFacility": "false"}, + {"Name": "512 - Baltimore-Maryland", "FacilityCode": "512", "IsAvaTestFacility": "false"}, + {"Name": "515 - Battle Creek", "FacilityCode": "515", "IsAvaTestFacility": "false"}, + {"Name": "516 - Bay Pines", "FacilityCode": "516", "IsAvaTestFacility": "false"}, + {"Name": "517 - Beckley-West Virginia", "FacilityCode": "517", "IsAvaTestFacility": "false"}, + {"Name": "518 - Bedford", "FacilityCode": "518", "IsAvaTestFacility": "false"}, + {"Name": "519 - Big Spring", "FacilityCode": "519", "IsAvaTestFacility": "false"}, + {"Name": "520 - Biloxi", "FacilityCode": "520", "IsAvaTestFacility": "false"}, + {"Name": "521 - Birmingham-Alabama", "FacilityCode": "521", "IsAvaTestFacility": "false"}, + {"Name": "523 - Jamaica Plain", "FacilityCode": "523", "IsAvaTestFacility": "false"}, + {"Name": "526 - Bronx-New York", "FacilityCode": "526", "IsAvaTestFacility": "false"}, + {"Name": "528 - Buffalo-New York", "FacilityCode": "528", "IsAvaTestFacility": "false"}, + {"Name": "529 - Butler", "FacilityCode": "529", "IsAvaTestFacility": "false"}, + {"Name": "531 - Boise", "FacilityCode": "531", "IsAvaTestFacility": "false"}, + {"Name": "534 - Charleston-South Carolina", "FacilityCode": "534", "IsAvaTestFacility": "false"}, + {"Name": "537 - Chicago-Illinois", "FacilityCode": "537", "IsAvaTestFacility": "false"}, + {"Name": "538 - Chillicothe-Ohio", "FacilityCode": "538", "IsAvaTestFacility": "false"}, + {"Name": "539 - Cincinnati-Ohio", "FacilityCode": "539", "IsAvaTestFacility": "false"}, + {"Name": "540 - Clarksburg-West Virginia", "FacilityCode": "540", "IsAvaTestFacility": "false"}, + {"Name": "541 - Cleveland-Ohio", "FacilityCode": "541", "IsAvaTestFacility": "false"}, + {"Name": "542 - Coatesville", "FacilityCode": "542", "IsAvaTestFacility": "false"}, + {"Name": "544 - Columbia-South Carolina", "FacilityCode": "544", "IsAvaTestFacility": "false"}, + {"Name": "546 - Miami", "FacilityCode": "546", "IsAvaTestFacility": "false"}, + {"Name": "548 - West Palm Beach", "FacilityCode": "548", "IsAvaTestFacility": "false"}, + {"Name": "549 - Dallas-Texas", "FacilityCode": "549", "IsAvaTestFacility": "false"}, + {"Name": "550 - Danville-Illinois", "FacilityCode": "550", "IsAvaTestFacility": "false"}, + {"Name": "552 - Dayton-Ohio", "FacilityCode": "552", "IsAvaTestFacility": "false"}, + {"Name": "553 - Detroit-Michigan", "FacilityCode": "553", "IsAvaTestFacility": "false"}, + {"Name": "554 - Aurora-Colorado", "FacilityCode": "554", "IsAvaTestFacility": "false"}, + {"Name": "556 - North Chicago", "FacilityCode": "556", "IsAvaTestFacility": "false"}, + {"Name": "557 - Dublin", "FacilityCode": "557", "IsAvaTestFacility": "false"}, + {"Name": "558 - Durham", "FacilityCode": "558", "IsAvaTestFacility": "false"}, + {"Name": "561 - East Orange", "FacilityCode": "561", "IsAvaTestFacility": "false"}, + {"Name": "562 - Erie-Pennsylvania", "FacilityCode": "562", "IsAvaTestFacility": "false"}, + {"Name": "564 - Fayetteville-Arkansas", "FacilityCode": "564", "IsAvaTestFacility": "false"}, + {"Name": "565 - Fayetteville-North Carolina", "FacilityCode": "565", "IsAvaTestFacility": "false"}, + {"Name": "568 - Fort Meade-South Dakota", "FacilityCode": "568", "IsAvaTestFacility": "false"}, + {"Name": "573 - Gainesville-Florida", "FacilityCode": "573", "IsAvaTestFacility": "false"}, + {"Name": "575 - Grand Junction", "FacilityCode": "575", "IsAvaTestFacility": "false"}, + {"Name": "578 - Hines-Illinois", "FacilityCode": "578", "IsAvaTestFacility": "false"}, + {"Name": "580 - Houston-Texas", "FacilityCode": "580", "IsAvaTestFacility": "false"}, + {"Name": "581 - Huntington-West Virginia", "FacilityCode": "581", "IsAvaTestFacility": "false"}, + {"Name": "583 - Indianapolis-Indiana", "FacilityCode": "583", "IsAvaTestFacility": "false"}, + {"Name": "585 - Iron Mountain", "FacilityCode": "585", "IsAvaTestFacility": "false"}, + {"Name": "586 - Jackson-Mississippi", "FacilityCode": "586", "IsAvaTestFacility": "false"}, + {"Name": "589 - Kansas City-Missouri", "FacilityCode": "589", "IsAvaTestFacility": "false"}, + {"Name": "590 - Hampton", "FacilityCode": "590", "IsAvaTestFacility": "false"}, + {"Name": "593 - Las Vegas-Nevada", "FacilityCode": "593", "IsAvaTestFacility": "false"}, + {"Name": "595 - Lebanon", "FacilityCode": "595", "IsAvaTestFacility": "false"}, + {"Name": "596 - Lexington-Leestown", "FacilityCode": "596", "IsAvaTestFacility": "false"}, + {"Name": "598 - Little Rock-Arkansas", "FacilityCode": "598", "IsAvaTestFacility": "false"}, + {"Name": "600 - Long Beach-California", "FacilityCode": "600", "IsAvaTestFacility": "false"}, + {"Name": "603 - Louisville", "FacilityCode": "603", "IsAvaTestFacility": "false"}, + {"Name": "605 - Loma Linda-California", "FacilityCode": "605", "IsAvaTestFacility": "false"}, + {"Name": "607 - Madison-Wisconsin", "FacilityCode": "607", "IsAvaTestFacility": "false"}, + {"Name": "608 - Manchester-New Hampshire", "FacilityCode": "608", "IsAvaTestFacility": "false"}, + {"Name": "610 - Marion-Indiana", "FacilityCode": "610", "IsAvaTestFacility": "false"}, + {"Name": "613 - Martinsburg", "FacilityCode": "613", "IsAvaTestFacility": "false"}, + {"Name": "614 - Memphis", "FacilityCode": "614", "IsAvaTestFacility": "false"}, + {"Name": "618 - Minneapolis-Minnesota", "FacilityCode": "618", "IsAvaTestFacility": "false"}, + {"Name": "619 - Montgomery", "FacilityCode": "619", "IsAvaTestFacility": "false"}, + {"Name": "620 - Montrose-New York", "FacilityCode": "620", "IsAvaTestFacility": "false"}, + {"Name": "621 - Mountain Home-Tennessee", "FacilityCode": "621", "IsAvaTestFacility": "false"}, + {"Name": "623 - Muskogee-Oklahoma", "FacilityCode": "623", "IsAvaTestFacility": "false"}, + {"Name": "626 - Nashville", "FacilityCode": "626", "IsAvaTestFacility": "false"}, + {"Name": "629 - New Orleans", "FacilityCode": "629", "IsAvaTestFacility": "false"}, + {"Name": "630 - Manhattan", "FacilityCode": "630", "IsAvaTestFacility": "false"}, + {"Name": "631 - Central Western Massachusetts", "FacilityCode": "631", "IsAvaTestFacility": "false"}, + {"Name": "632 - Northport-New York", "FacilityCode": "632", "IsAvaTestFacility": "false"}, + {"Name": "635 - Oklahoma City", "FacilityCode": "635", "IsAvaTestFacility": "false"}, + {"Name": "636 - Omaha-Nebraska", "FacilityCode": "636", "IsAvaTestFacility": "false"}, + {"Name": "637 - Asheville", "FacilityCode": "637", "IsAvaTestFacility": "false"}, + {"Name": "642 - Philadelphia-Pennsylvania", "FacilityCode": "642", "IsAvaTestFacility": "false"}, + {"Name": "644 - Phoenix-Arizona", "FacilityCode": "644", "IsAvaTestFacility": "false"}, + {"Name": "646 - Pittsburgh-University Drive", "FacilityCode": "646", "IsAvaTestFacility": "false"}, + {"Name": "648 - Portland-Oregon", "FacilityCode": "648", "IsAvaTestFacility": "false"}, + {"Name": "649 - Prescott-Arizona", "FacilityCode": "649", "IsAvaTestFacility": "false"}, + {"Name": "650 - Providence", "FacilityCode": "650", "IsAvaTestFacility": "false"}, + {"Name": "652 - Richmond-Virginia", "FacilityCode": "652", "IsAvaTestFacility": "false"}, + {"Name": "653 - Roseburg", "FacilityCode": "653", "IsAvaTestFacility": "false"}, + {"Name": "655 - Saginaw-Michigan", "FacilityCode": "655", "IsAvaTestFacility": "false"}, + {"Name": "656 - St. Cloud-Minnesota", "FacilityCode": "656", "IsAvaTestFacility": "false"}, + {"Name": "657 - St. Louis-John Cochran", "FacilityCode": "657", "IsAvaTestFacility": "false"}, + {"Name": "658 - Salem-Virginia", "FacilityCode": "658", "IsAvaTestFacility": "false"}, + {"Name": "659 - Salisbury", "FacilityCode": "659", "IsAvaTestFacility": "false"}, + {"Name": "660 - Salt Lake City", "FacilityCode": "660", "IsAvaTestFacility": "false"}, + {"Name": "663 - Seattle-Washington", "FacilityCode": "663", "IsAvaTestFacility": "false"}, + {"Name": "664 - San Diego-California", "FacilityCode": "664", "IsAvaTestFacility": "false"}, + {"Name": "666 - Sheridan", "FacilityCode": "666", "IsAvaTestFacility": "false"}, + {"Name": "667 - Shreveport", "FacilityCode": "667", "IsAvaTestFacility": "false"}, + {"Name": "668 - Spokane-Washington", "FacilityCode": "668", "IsAvaTestFacility": "false"}, + {"Name": "671 - San Antonio-Texas", "FacilityCode": "671", "IsAvaTestFacility": "false"}, + {"Name": "672 - San Juan", "FacilityCode": "672", "IsAvaTestFacility": "false"}, + {"Name": "673 - Tampa-Florida", "FacilityCode": "673", "IsAvaTestFacility": "false"}, + {"Name": "674 - Temple-Texas", "FacilityCode": "674", "IsAvaTestFacility": "false"}, + {"Name": "675 - Orlando-Lake Nona", "FacilityCode": "675", "IsAvaTestFacility": "false"}, + {"Name": "676 - Tomah-Wisconsin", "FacilityCode": "676", "IsAvaTestFacility": "false"}, + {"Name": "678 - Tucson", "FacilityCode": "678", "IsAvaTestFacility": "false"}, + {"Name": "679 - Tuscaloosa-Alabama", "FacilityCode": "679", "IsAvaTestFacility": "false"}, + {"Name": "687 - Walla Walla", "FacilityCode": "687", "IsAvaTestFacility": "false"}, + {"Name": "688 - Washington-DC", "FacilityCode": "688", "IsAvaTestFacility": "false"}, + {"Name": "691 - West Los Angeles", "FacilityCode": "691", "IsAvaTestFacility": "false"}, + {"Name": "692 - White City", "FacilityCode": "692", "IsAvaTestFacility": "false"}, + {"Name": "693 - Wilkes-Barre", "FacilityCode": "693", "IsAvaTestFacility": "false"}, + {"Name": "695 - Milwaukee-Wisconsin", "FacilityCode": "695", "IsAvaTestFacility": "false"}, + {"Name": "740 - Harlingen-Texas", "FacilityCode": "740", "IsAvaTestFacility": "false"}, + {"Name": "756 - El Paso-Texas", "FacilityCode": "756", "IsAvaTestFacility": "false"}, + {"Name": "757 - Columbus-Ohio", "FacilityCode": "757", "IsAvaTestFacility": "false"}, + {"Name": "988 - DAYT20 ", "FacilityCode": "988", "IsAvaTestFacility":" true"}, + {"Name": "991 - Test Facility", "FacilityCode": "991", "IsAvaTestFacility":" true"}, + {"Name": "567 - ZZ COLORADO SPRINGS ", "FacilityCode": "567", "IsAvaTestFacility":" true"}, + {"Name": "689 - West Haven", "FacilityCode": "689", "IsAvaTestFacility": "false"}], + "Message": null, + "ExceptionOccurred": "false", + "ExceptionMessage": null, + "MessageId": "ef02faa8-0421-4951-b48a-fac8551ae995"} diff --git a/modules/ask_va_api/config/locales/static_data.json b/modules/ask_va_api/config/locales/static_data.json index 64d77613dad..78eb94df5e5 100644 --- a/modules/ask_va_api/config/locales/static_data.json +++ b/modules/ask_va_api/config/locales/static_data.json @@ -1,2350 +1,1675 @@ -{ - "Topics": [ - { - "Name": "Reporting a broken link on VA.gov", - "Id": "792dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Reporting a broken link on VA.gov", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Accessing a webpage on VA.gov", - "Id": "7b2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Accessing a webpage on VA.gov", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Requesting for VA.gov to link to another website", - "Id": "7d2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Requesting for VA.gov to link to another website", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Reporting incorrect information on VA.gov", - "Id": "7f2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Reporting incorrect information on VA.gov", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Requesting to link to VA.gov from another website", - "Id": "812dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Requesting to link to VA.gov from another website", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "872dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Hearing", - "Id": "892dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "a72a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Hearing", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "8b2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "a72a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "CHAMPVA benefits", - "Id": "8f2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "092b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "CHAMPVA benefits", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Getting care at a VA health facility through CHAMPVA CITI", - "Id": "912dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "092b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Getting care at a VA health facility through CHAMPVA CITI", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Benefits for spina bifida and children of women Vietnam Veterans", - "Id": "932dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "092b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Benefits for spina bifida and children of women Vietnam Veterans", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Application", - "Id": "952dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "152b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Application", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "General question", - "Id": "972dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "152b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "General question", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Position description", - "Id": "992dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "152b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Position description", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Time card", - "Id": "9b2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "152b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Time card", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Signed contract", - "Id": "9d2dbcee-eb64-eb11-bb23-000d3a579b83", - "ParentId": "152b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Signed contract", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Programs and policies", - "Id": "852a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Programs and policies", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Disability compensation overpayments", - "Id": "892a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Disability compensation overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Pension benefit overpayments", - "Id": "8b2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Pension benefit overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Home loan overpayments", - "Id": "8d2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Home loan overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Health care copay debt", - "Id": "8f2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Health care copay debt", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Education benefit overpayments (for students)", - "Id": "912a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Education benefit overpayments (for students)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial benefit overpayments", - "Id": "932a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial benefit overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran Readiness and Employment overpayments", - "Id": "952a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veteran Readiness and Employment overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Separation pay overpayments", - "Id": "972a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Separation pay overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Drill pay overpayments", - "Id": "992a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Drill pay overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Severance pay overpayments", - "Id": "9b2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Severance pay overpayments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Higher-Level Reviews or Supplemental Claims", - "Id": "a52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "60524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Higher-Level Reviews or Supplemental Claims", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Board Appeals", - "Id": "a72a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "60524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Board Appeals", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Home loan benefits", - "Id": "ad2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Home loan benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Home Loan Certificate of Eligibility (COE) or Restoration of Entitlement (ROE)", - "Id": "af2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Home Loan Certificate of Eligibility (COE) or Restoration of Entitlement (ROE)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Help to avoid foreclosure", - "Id": "b12a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Help to avoid foreclosure", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Specially Adapted Housing (SAH) and Special Home Adaptation (SHA) grants", - "Id": "b32a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Specially Adapted Housing (SAH) and Special Home Adaptation (SHA) grants", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Funding fee refund", - "Id": "b52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Funding fee refund", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Appraisals", - "Id": "b72a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Appraisals", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Homes for sale by VA", - "Id": "b92a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Homes for sale by VA", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Property titles and taxes for homes sold by VA", - "Id": "bb2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Property titles and taxes for homes sold by VA", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Education benefits and work study", - "Id": "bf2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "66524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Education benefits and work study", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Disability compensation", - "Id": "c12a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "66524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Disability compensation", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "How to file a claim", - "Id": "c32a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "How to file a claim", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Claim status", - "Id": "c52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Claim status", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Payment issues", - "Id": "c72a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Payment issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Direct deposit", - "Id": "c92a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Direct deposit", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Aid and Attendance or Housebound benefits", - "Id": "cb2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Aid and Attendance or Housebound benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Guardianship, custodianship, or fiduciary issues", - "Id": "cd2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "68524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Guardianship, custodianship, or fiduciary issues", - "TopicType": "Topic", - "ContactPreferences": [ - "USMail" - ] - }, - { - "Name": "How to apply", - "Id": "cf2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "How to apply", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Payment issues", - "Id": "d12a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Payment issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Direct deposit", - "Id": "d32a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Direct deposit", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Aid and Attendance or Housebound benefits", - "Id": "d52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Aid and Attendance or Housebound benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Guardianship, custodianship, or fiduciary issues", - "Id": "d72a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6a524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Guardianship, custodianship, or fiduciary issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "d92a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6d524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Accounting issues", - "Id": "db2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6d524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Accounting issues", - "TopicType": "Topic", - "ContactPreferences": [ - "Email", - "Phone", - "USMail" - ] - }, - { - "Name": "Investigations and field examinations", - "Id": "dd2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6d524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Investigations and field examinations", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Insurance claims", - "Id": "e12a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Insurance claims", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Insurance premiums", - "Id": "e32a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Insurance premiums", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Insurance website issues", - "Id": "e52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Insurance website issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Accessing policy online", - "Id": "e72a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Accessing policy online", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "e92a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Policy loans", - "Id": "eb2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Policy loans", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Service-Disabled Veterans Life Insurance (S-DVI)", - "Id": "ed2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Service-Disabled Veterans Life Insurance (S-DVI)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Servicemembers’ Group Life Insurance (SGLI)", - "Id": "ef2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Servicemembers’ Group Life Insurance (SGLI)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Family Servicemembers’ Group Life Insurance (FSGLI)", - "Id": "f12a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Family Servicemembers’ Group Life Insurance (FSGLI)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veterans’ Group Life Insurance (VGLI)", - "Id": "f32a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veterans’ Group Life Insurance (VGLI)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veterans’ Mortgage Life Insurance (VMLI)", - "Id": "f52a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veterans’ Mortgage Life Insurance (VMLI)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Pre-need eligibility for burial", - "Id": "f92a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Pre-need eligibility for burial", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Memorial items", - "Id": "fb2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Memorial items", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial allowance", - "Id": "ff2a8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial allowance", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "012b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Caregiver support program", - "Id": "032b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Caregiver support program", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Family health benefits", - "Id": "092b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Family health benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Career opportunities at VA health facilities", - "Id": "0b2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Career opportunities at VA health facilities", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Prosthetics", - "Id": "0d2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Prosthetics", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Vet Centers and readjustment counseling", - "Id": "0f2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Vet Centers and readjustment counseling", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Women's health services", - "Id": "112b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Women's health services", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Getting care at a local VA medical center", - "Id": "132b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Getting care at a local VA medical center", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Work study", - "Id": "152b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Work study", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Post-9/11 GI Bill (Chapter 33)", - "Id": "172b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Post-9/11 GI Bill (Chapter 33)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "On-the-job training and apprenticeships", - "Id": "192b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "On-the-job training and apprenticeships", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Benefits for survivors and dependents", - "Id": "1b2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Benefits for survivors and dependents", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Montgomery GI Bill Active Duty (Chapter 30)", - "Id": "1d2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Montgomery GI Bill Active Duty (Chapter 30)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Montgomery GI Bill Selected Reserve (Chapter 1606)", - "Id": "1f2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Montgomery GI Bill Selected Reserve (Chapter 1606)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Tuition Assistance Top-Up", - "Id": "272b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Tuition Assistance Top-Up", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Web Automated Verification of Enrollment (WAVE)", - "Id": "292b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Web Automated Verification of Enrollment (WAVE)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Educational and career counseling", - "Id": "2b2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Educational and career counseling", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veterans’ Educational Assistance Program (Chapter 32)", - "Id": "2d2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veterans’ Educational Assistance Program (Chapter 32)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Reserve Educational Assistance Program (Chapter 1607)", - "Id": "2f2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Reserve Educational Assistance Program (Chapter 1607)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "School Certifying Officials (SCOs)", - "Id": "352b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "School Certifying Officials (SCOs)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Financial issues", - "Id": "392b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "77524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Financial issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "How to apply", - "Id": "3b2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "77524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "How to apply", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Following up on application or contacting counselor", - "Id": "3d2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "77524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Following up on application or contacting counselor", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "3f2b8586-e764-eb11-bb23-000d3a579c3f", - "ParentId": "77524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Signing in to VA.gov", - "Id": "5ca1360a-ed64-eb11-bb23-000d3a579c41", - "ParentId": "eeba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Signing in to VA.gov", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Changing address in VA.gov profile", - "Id": "5ea1360a-ed64-eb11-bb23-000d3a579c41", - "ParentId": "eeba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Changing address in VA.gov profile", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Checking claim status or accessing saved claim", - "Id": "60a1360a-ed64-eb11-bb23-000d3a579c41", - "ParentId": "eeba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Checking claim status or accessing saved claim", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "62a1360a-ed64-eb11-bb23-000d3a579c41", - "ParentId": "eeba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Signing in to VA.gov and managing VA.gov profile", - "Id": "eeba9562-e864-eb11-bb23-000d3a579c44", - "ParentId": "5e524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Signing in to VA.gov and managing VA.gov profile", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Technical issues on VA.gov", - "Id": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "ParentId": "5e524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Technical issues on VA.gov", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Signing in to VA life insurance portal", - "Id": "f2ba9562-e864-eb11-bb23-000d3a579c44", - "ParentId": "5e524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Signing in to VA life insurance portal", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Center for Minority Veterans", - "Id": "5a524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 18, - "DisplayName": "Center for Minority Veterans", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Debt for benefit overpayments and health care copay bills", - "Id": "5c524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 4, - "DisplayName": "Debt for benefit overpayments and health care copay bills", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Sign in and technical issues", - "Id": "5e524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 6, - "DisplayName": "Sign in and technical issues", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Decision reviews and appeals", - "Id": "60524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 5, - "DisplayName": "Decision reviews and appeals", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Center for Women Veterans", - "Id": "62524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 17, - "DisplayName": "Center for Women Veterans", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Housing assistance and home loans", - "Id": "64524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 7, - "DisplayName": "Housing assistance and home loans", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Benefits issues outside the U.S.", - "Id": "66524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 13, - "DisplayName": "Benefits issues outside the U.S.", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Disability compensation", - "Id": "68524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 2, - "DisplayName": "Disability compensation", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Pension", - "Id": "6a524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 11, - "DisplayName": "Pension", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Guardianship, custodianship, or fiduciary issues", - "Id": "6d524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 16, - "DisplayName": "Guardianship, custodianship, or fiduciary issues", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Life insurance", - "Id": "6f524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 14, - "DisplayName": "Life insurance", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial & Memorial", - "Id": "71524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 10, - "DisplayName": "Burial & Memorial", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Health care", - "Id": "73524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 3, - "DisplayName": "Health care", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Education benefits and work study", - "Id": "75524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 1, - "DisplayName": "Education benefits and work study", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran Readiness and Employment", - "Id": "77524deb-d864-eb11-bb24-000d3a579c45", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 8, - "DisplayName": "Veteran Readiness and Employment", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Eligibility and how to apply", - "Id": "99b276de-9f90-eb11-a812-001dd8049eb2", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Eligibility and how to apply", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial in a VA grant-funded state or tribal cemetery", - "Id": "f1e8bfff-e7a8-eb11-b1ac-001dd804a23f", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial in a VA grant-funded state or tribal cemetery", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Program of Comprehensive Assistance for Family Caregivers (PCAFC)", - "Id": "9c970060-7da3-eb11-b1ac-001dd804a2f2", - "ParentId": "032b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Program of Comprehensive Assistance for Family Caregivers (PCAFC)", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Program of General Caregiver Support Services (PGCSS)", - "Id": "bcda106e-7da3-eb11-b1ac-001dd804a2f2", - "ParentId": "032b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Program of General Caregiver Support Services (PGCSS)", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Work study", - "Id": "2a434916-6aa3-eb11-b1ac-001dd804abb9", - "ParentId": "bf2a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Work study", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "School Certifying Officials (SCOs)", - "Id": "7217573f-6aa3-eb11-b1ac-001dd804abb9", - "ParentId": "bf2a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "School Certifying Officials (SCOs)", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "ab00e84d-6aa3-eb11-b1ac-001dd804abb9", - "ParentId": "bf2a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Compliance surveys", - "Id": "6d12b789-dc9e-eb11-b1ac-001dd804ad31", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Compliance surveys", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Education benefit overpayments (for school officials)", - "Id": "439a0e51-01ad-eb11-b1ac-001dd804b647", - "ParentId": "5c524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Education benefit overpayments (for school officials)", - "TopicType": "Topic", - "ContactPreferences": [ - "Email", - "Phone", - "USMail" - ] - }, - { - "Name": "Native American Direct Loan (NADL)", - "Id": "258302a6-eee4-eb11-bacb-001dd804b72f", - "ParentId": "64524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Native American Direct Loan (NADL)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "eBenefits technical issues", - "Id": "de4dc2d5-8bde-eb11-bacb-001dd804c4a1", - "ParentId": "f0ba9562-e864-eb11-bb23-000d3a579c44", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "eBenefits technical issues", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran ID Card (VIC)", - "Id": "e77b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 12, - "DisplayName": "Veteran ID Card (VIC)", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran Health Identification Card (VHIC) for health appointments", - "Id": "ea7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "e77b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veteran Health Identification Card (VHIC) for health appointments", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran ID Card (VIC) for discounts", - "Id": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "e77b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veteran ID Card (VIC) for discounts", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Replacement card", - "Id": "ee7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ea7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Replacement card", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Military base access", - "Id": "f07b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ea7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Military base access", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "f27b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ea7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Replacement card", - "Id": "f47b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Replacement card", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Eligibility", - "Id": "f67b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Eligibility", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Checking application status", - "Id": "f87b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Checking application status", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "How to apply", - "Id": "fb7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "How to apply", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Sign-in issues or records not found", - "Id": "fd7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Sign-in issues or records not found", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Trouble submitting application", - "Id": "ff7b38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Trouble submitting application", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Trouble uploading photos or documents", - "Id": "017c38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Trouble uploading photos or documents", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Other", - "Id": "057c38c8-1617-ec11-b6e5-001dd804ce09", - "ParentId": "ec7b38c8-1617-ec11-b6e5-001dd804ce09", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 999, - "DisplayName": "Other", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Survivor Benefits", - "Id": "282d7129-c977-ec11-8940-001dd804d2b4", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 9, - "DisplayName": "Survivor Benefits", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Aid and Attendance or Housebound benefits", - "Id": "21b6243c-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Aid and Attendance or Housebound benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Direct deposit", - "Id": "403d6b60-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Direct deposit", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "How to apply", - "Id": "a1deac6c-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "How to apply", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Guardianship, custodianship, or fiduciary issues", - "Id": "a6f22b7f-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Guardianship, custodianship, or fiduciary issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Payment issues", - "Id": "2d6e478b-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Payment issues", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Claim status", - "Id": "6c535c91-c977-ec11-8940-001dd804d2b4", - "ParentId": "282d7129-c977-ec11-8940-001dd804d2b4", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Claim status", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Defense Enrollment Eligibility Reporting System (DEERS)", - "Id": "9520fd17-ec3c-ec11-b6e5-001dd804d87f", - "ParentId": null, - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 15, - "DisplayName": "Defense Enrollment Eligibility Reporting System (DEERS)", - "TopicType": "Category", - "ContactPreferences": [ - - ] - }, - { - "Name": "Adding requests", - "Id": "ed455736-ec3c-ec11-b6e5-001dd804d87f", - "ParentId": "9520fd17-ec3c-ec11-b6e5-001dd804d87f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Adding requests", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Updating DEERS records", - "Id": "40a0524e-ec3c-ec11-b6e5-001dd804d87f", - "ParentId": "9520fd17-ec3c-ec11-b6e5-001dd804d87f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Updating DEERS records", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial flags", - "Id": "8c3a16ea-0379-ef11-a670-001dd8053a71", - "ParentId": "fb2a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial flags", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial allowance for unclaimed Veteran remains", - "Id": "cb07439d-6877-ef11-a670-001dd8055a8b", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial allowance for unclaimed Veteran remains", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Burial in a VA national cemetery", - "Id": "cf7dc10a-7e3b-ed11-9daf-001dd806846c", - "ParentId": "71524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Burial in a VA national cemetery", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Audiology and hearing aids", - "Id": "c0da1728-d91f-ed11-b83c-001dd8069009", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": false, - "RankOrder": 0, - "DisplayName": "Audiology and hearing aids", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veterans Affairs Life Insurance (VALife)", - "Id": "5d402b2a-806b-ef11-a671-001dd8097cca", - "ParentId": "6f524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veterans Affairs Life Insurance (VALife)", - "TopicType": null, - "ContactPreferences": [ - - ] - }, - { - "Name": "Transfer of benefits", - "Id": "8085b967-8276-ef11-a671-001dd8097cca", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Transfer of benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Transferring benefits after death of Veteran or dependent (Section 110)", - "Id": "41226b74-8276-ef11-a671-001dd8097cca", - "ParentId": "8085b967-8276-ef11-a671-001dd8097cca", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Transferring benefits after death of Veteran or dependent (Section 110)", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Transferring benefits to dependents", - "Id": "bba71e82-8276-ef11-a671-001dd8097cca", - "ParentId": "8085b967-8276-ef11-a671-001dd8097cca", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Transferring benefits to dependents", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Certificate of Eligibility (COE) or Statement of Benefits", - "Id": "5716ab8e-8276-ef11-a671-001dd8097cca", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Certificate of Eligibility (COE) or Statement of Benefits", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Licensing and testing fees", - "Id": "73d0ad94-8276-ef11-a671-001dd8097cca", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Licensing and testing fees", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Verifying school enrollment", - "Id": "c070c79a-8276-ef11-a671-001dd8097cca", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Verifying school enrollment", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Veteran Readiness and Employment (Chapter 31)", - "Id": "b18831a7-8276-ef11-a671-001dd8097cca", - "ParentId": "75524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": true, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Veteran Readiness and Employment (Chapter 31)", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Headstones, markers, medallions, and Presidential Memorial Certificates", - "Id": "60aa2c22-0c79-ef11-a671-001dd8097cca", - "ParentId": "fb2a8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Headstones, markers, medallions, and Presidential Memorial Certificates", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "General question", - "Id": "141a0e7f-8c34-ef11-8409-001dd809d228", - "ParentId": "62524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "General question", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Programs and policies", - "Id": "bbaf4f8b-8c34-ef11-8409-001dd809d228", - "ParentId": "62524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Programs and policies", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Billing and copays", - "Id": "77bd7f33-773f-ef11-8409-001dd830980e", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Billing and copays", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Foreign Medical Program", - "Id": "b9d2b73f-773f-ef11-8409-001dd830980e", - "ParentId": "73524deb-d864-eb11-bb24-000d3a579c45", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Foreign Medical Program", - "TopicType": "Topic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Eligibility for special benefits related to prosthetics", - "Id": "60b74965-773f-ef11-8409-001dd830980e", - "ParentId": "0d2b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Eligibility for special benefits related to prosthetics", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - }, - { - "Name": "Special benefits application status", - "Id": "0bfe416b-773f-ef11-8409-001dd830980e", - "ParentId": "0d2b8586-e764-eb11-bb23-000d3a579c3f", - "Description": null, - "RequiresAuthentication": false, - "AllowAttachments": true, - "RankOrder": 0, - "DisplayName": "Special benefits application status", - "TopicType": "SubTopic", - "ContactPreferences": [ - - ] - } - ], - "Message": null, - "ExceptionOccurred": false, - "ExceptionMessage": null, - "MessageId": "2e7f63ce-bd8a-47b9-a575-760aca5cb29d" -} \ No newline at end of file +{"Topics": + [{"Name":"Reporting a broken link on VA.gov", + "Id":"792dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Reporting a broken link on VA.gov", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Accessing a webpage on VA.gov", + "Id":"7b2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Accessing a webpage on VA.gov", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Requesting for VA.gov to link to another website", + "Id":"7d2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Requesting for VA.gov to link to another website", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Reporting incorrect information on VA.gov", + "Id":"7f2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Reporting incorrect information on VA.gov", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Requesting to link to VA.gov from another website", + "Id":"812dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Requesting to link to VA.gov from another website", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Other", + "Id":"872dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Hearing", + "Id":"892dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"a72a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Hearing", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Other", + "Id":"8b2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"a72a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"CHAMPVA benefits", + "Id":"8f2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"092b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"CHAMPVA benefits", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Getting care at a VA health facility through CHAMPVA CITI", + "Id":"912dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"092b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Getting care at a VA health facility through CHAMPVA CITI", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Benefits for spina bifida and children of women Vietnam Veterans", + "Id":"932dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"092b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Benefits for spina bifida and children of women Vietnam Veterans", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Application", + "Id":"952dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"152b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Application", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"General question", + "Id":"972dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"152b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"General question", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Position description", + "Id":"992dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"152b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Position description", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Time card", + "Id":"9b2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"152b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Time card", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Signed contract", + "Id":"9d2dbcee-eb64-eb11-bb23-000d3a579b83", + "ParentId":"152b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Signed contract", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Programs and policies", + "Id":"852a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Programs and policies", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Disability compensation overpayments", + "Id":"892a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Disability compensation overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Pension benefit overpayments", + "Id":"8b2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Pension benefit overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Home loan overpayments", + "Id":"8d2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Home loan overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Health care copay debt", + "Id":"8f2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Health care copay debt", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Education benefit overpayments (for students)", + "Id":"912a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Education benefit overpayments (for students)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Burial benefit overpayments", + "Id":"932a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Burial benefit overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Veteran Readiness and Employment overpayments", + "Id":"952a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Veteran Readiness and Employment overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Separation pay overpayments", + "Id":"972a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":2, + "DisplayName":"Separation pay overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Drill pay overpayments", + "Id":"992a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":2, + "DisplayName":"Drill pay overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Severance pay overpayments", + "Id":"9b2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":2, + "DisplayName":"Severance pay overpayments", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Higher-Level Reviews or Supplemental Claims", + "Id":"a52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"60524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Higher-Level Reviews or Supplemental Claims", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Board Appeals", + "Id":"a72a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"60524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Board Appeals", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Home loan benefits", + "Id":"ad2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Home loan benefits", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Home Loan Certificate of Eligibility (COE) or Restoration of Entitlement (ROE)", + "Id":"af2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Home Loan Certificate of Eligibility (COE) or Restoration of Entitlement (ROE)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Help to avoid foreclosure", + "Id":"b12a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Help to avoid foreclosure", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Specially Adapted Housing (SAH) and Special Home Adaptation (SHA) grants", + "Id":"b32a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Specially Adapted Housing (SAH) and Special Home Adaptation (SHA) grants", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Funding fee refund", + "Id":"b52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Funding fee refund", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Appraisals", + "Id":"b72a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Appraisals", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Homes for sale by VA", + "Id":"b92a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Homes for sale by VA", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Property titles and taxes for homes sold by VA", + "Id":"bb2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Property titles and taxes for homes sold by VA", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Education benefits and work study", + "Id":"bf2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"66524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Education benefits and work study", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Disability compensation", + "Id":"c12a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"66524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Disability compensation", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"How to file a claim", + "Id":"c32a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"How to file a claim", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Claim status", + "Id":"c52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Claim status", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Payment issues", + "Id":"c72a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Payment issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Direct deposit", + "Id":"c92a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Direct deposit", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Aid and Attendance or Housebound benefits", + "Id":"cb2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Aid and Attendance or Housebound benefits", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Guardianship, custodianship, or fiduciary issues", + "Id":"cd2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"68524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Guardianship, custodianship, or fiduciary issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"How to apply", + "Id":"cf2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"How to apply", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Payment issues", + "Id":"d12a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Payment issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Direct deposit", + "Id":"d32a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Direct deposit", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Aid and Attendance or Housebound benefits", + "Id":"d52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Aid and Attendance or Housebound benefits", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Guardianship, custodianship, or fiduciary issues", + "Id":"d72a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6a524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Guardianship, custodianship, or fiduciary issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Other", + "Id":"d92a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6d524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Accounting issues", + "Id":"db2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6d524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Accounting issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Investigations and field examinations", + "Id":"dd2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6d524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Investigations and field examinations", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Insurance claims", + "Id":"e12a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Insurance claims", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Insurance premiums", + "Id":"e32a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Insurance premiums", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Insurance website issues", + "Id":"e52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Insurance website issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Accessing policy online", + "Id":"e72a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Accessing policy online", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Other", + "Id":"e92a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Policy loans", + "Id":"eb2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Policy loans", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Service-Disabled Veterans Life Insurance (S-DVI)", + "Id":"ed2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Service-Disabled Veterans Life Insurance (S-DVI)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Servicemembers’ Group Life Insurance (SGLI)", + "Id":"ef2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Servicemembers’ Group Life Insurance (SGLI)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Family Servicemembers’ Group Life Insurance (FSGLI)", + "Id":"f12a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Family Servicemembers’ Group Life Insurance (FSGLI)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Veterans’ Group Life Insurance (VGLI)", + "Id":"f32a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veterans’ Group Life Insurance (VGLI)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Veterans’ Mortgage Life Insurance (VMLI)", + "Id":"f52a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veterans’ Mortgage Life Insurance (VMLI)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Pre-need eligibility for burial", + "Id":"f92a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Pre-need eligibility for burial", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Memorial items", + "Id":"fb2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Memorial items", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Burial allowance", + "Id":"ff2a8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Burial allowance", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Other", + "Id":"012b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Caregiver support program", + "Id":"032b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Caregiver support program", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Family health benefits", + "Id":"092b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Family health benefits", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Career opportunities at VA health facilities", + "Id":"0b2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Career opportunities at VA health facilities", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Prosthetics", + "Id":"0d2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Prosthetics", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Vet Centers and readjustment counseling", + "Id":"0f2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Vet Centers and readjustment counseling", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Women's health services", + "Id":"112b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Women's health services", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Getting care at a local VA medical center", + "Id":"132b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Getting care at a local VA medical center", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Work study", + "Id":"152b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Work study", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Post-9/11 GI Bill (Chapter 33)", + "Id":"172b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Post-9/11 GI Bill (Chapter 33)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"On-the-job training and apprenticeships", + "Id":"192b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"On-the-job training and apprenticeships", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Benefits for survivors and dependents", + "Id":"1b2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Benefits for survivors and dependents", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Montgomery GI Bill Active Duty (Chapter 30)", + "Id":"1d2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Montgomery GI Bill Active Duty (Chapter 30)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Montgomery GI Bill Selected Reserve (Chapter 1606)", + "Id":"1f2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Montgomery GI Bill Selected Reserve (Chapter 1606)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Tuition Assistance Top-Up", + "Id":"272b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Tuition Assistance Top-Up", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Web Automated Verification of Enrollment (WAVE)", + "Id":"292b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Web Automated Verification of Enrollment (WAVE)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Educational and career counseling", + "Id":"2b2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Educational and career counseling", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Veterans’ Educational Assistance Program (Chapter 32)", + "Id":"2d2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veterans’ Educational Assistance Program (Chapter 32)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Reserve Educational Assistance Program (Chapter 1607)", + "Id":"2f2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Reserve Educational Assistance Program (Chapter 1607)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"School Certifying Officials (SCOs)", + "Id":"352b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"School Certifying Officials (SCOs)", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Financial issues", + "Id":"392b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"77524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Financial issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"How to apply", + "Id":"3b2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"77524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"How to apply", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Following up on application or contacting counselor", + "Id":"3d2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"77524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Following up on application or contacting counselor", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Other", + "Id":"3f2b8586-e764-eb11-bb23-000d3a579c3f", + "ParentId":"77524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Signing in to VA.gov", + "Id":"5ca1360a-ed64-eb11-bb23-000d3a579c41", + "ParentId":"eeba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Signing in to VA.gov", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Changing address in VA.gov profile", + "Id":"5ea1360a-ed64-eb11-bb23-000d3a579c41", + "ParentId":"eeba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Changing address in VA.gov profile", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Checking claim status or accessing saved claim", + "Id":"60a1360a-ed64-eb11-bb23-000d3a579c41", + "ParentId":"eeba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Checking claim status or accessing saved claim", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Other", + "Id":"62a1360a-ed64-eb11-bb23-000d3a579c41", + "ParentId":"eeba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Signing in to VA.gov and managing VA.gov profile", + "Id":"eeba9562-e864-eb11-bb23-000d3a579c44", + "ParentId":"5e524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Signing in to VA.gov and managing VA.gov profile", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Technical issues on VA.gov", + "Id":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "ParentId":"5e524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Technical issues on VA.gov", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Signing in to VA life insurance portal", + "Id":"f2ba9562-e864-eb11-bb23-000d3a579c44", + "ParentId":"5e524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Signing in to VA life insurance portal", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Center for Minority Veterans", + "Id":"5a524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":18, + "DisplayName":"Center for Minority Veterans", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Debt for benefit overpayments and health care copay bills", + "Id":"5c524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":4, + "DisplayName":"Debt for benefit overpayments and health care copay bills", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Sign in and technical issues", + "Id":"5e524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":6, + "DisplayName":"Sign in and technical issues", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Decision reviews and appeals", + "Id":"60524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":5, + "DisplayName":"Decision reviews and appeals", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Center for Women Veterans", + "Id":"62524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":17, + "DisplayName":"Center for Women Veterans", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Housing assistance and home loans", + "Id":"64524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":7, + "DisplayName":"Housing assistance and home loans", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Benefits issues outside the U.S.", + "Id":"66524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":13, + "DisplayName":"Benefits issues outside the U.S.", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Disability compensation", + "Id":"68524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":2, + "DisplayName":"Disability compensation", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Pension", + "Id":"6a524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":11, + "DisplayName":"Pension", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Guardianship, custodianship, or fiduciary issues", + "Id":"6d524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":16, + "DisplayName":"Guardianship, custodianship, or fiduciary issues", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Life insurance", + "Id":"6f524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":14, + "DisplayName":"Life insurance", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Burials and memorials", + "Id":"71524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":10, + "DisplayName":"Burials and memorials", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Health care", + "Id":"73524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":3, + "DisplayName":"Health care", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Education benefits and work study", + "Id":"75524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":1, + "DisplayName":"Education benefits and work study", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Veteran Readiness and Employment", + "Id":"77524deb-d864-eb11-bb24-000d3a579c45", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":8, + "DisplayName":"Veteran Readiness and Employment", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Eligibility and how to apply", + "Id":"99b276de-9f90-eb11-a812-001dd8049eb2", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Eligibility and how to apply", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Burial in a VA grant-funded state or tribal cemetery", + "Id":"f1e8bfff-e7a8-eb11-b1ac-001dd804a23f", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Burial in a VA grant-funded state or tribal cemetery", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Program of Comprehensive Assistance for Family Caregivers (PCAFC)", + "Id":"9c970060-7da3-eb11-b1ac-001dd804a2f2", + "ParentId":"032b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Program of Comprehensive Assistance for Family Caregivers (PCAFC)", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Program of General Caregiver Support Services (PGCSS)", + "Id":"bcda106e-7da3-eb11-b1ac-001dd804a2f2", + "ParentId":"032b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Program of General Caregiver Support Services (PGCSS)", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Work study", + "Id":"2a434916-6aa3-eb11-b1ac-001dd804abb9", + "ParentId":"bf2a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Work study", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"School Certifying Officials (SCOs)", + "Id":"7217573f-6aa3-eb11-b1ac-001dd804abb9", + "ParentId":"bf2a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"School Certifying Officials (SCOs)", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Other", + "Id":"ab00e84d-6aa3-eb11-b1ac-001dd804abb9", + "ParentId":"bf2a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Compliance surveys", + "Id":"6d12b789-dc9e-eb11-b1ac-001dd804ad31", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Compliance surveys", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Education benefit overpayments (for school officials)", + "Id":"439a0e51-01ad-eb11-b1ac-001dd804b647", + "ParentId":"5c524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":1, + "DisplayName":"Education benefit overpayments (for school officials)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Native American Direct Loan (NADL)", + "Id":"258302a6-eee4-eb11-bacb-001dd804b72f", + "ParentId":"64524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Native American Direct Loan (NADL)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"eBenefits technical issues", + "Id":"de4dc2d5-8bde-eb11-bacb-001dd804c4a1", + "ParentId":"f0ba9562-e864-eb11-bb23-000d3a579c44", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"eBenefits technical issues", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Veteran ID Card (VIC)", + "Id":"e77b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":12, + "DisplayName":"Veteran ID Card (VIC)", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Veteran Health Identification Card (VHIC) for health appointments", + "Id":"ea7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"e77b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veteran Health Identification Card (VHIC) for health appointments", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Veteran ID Card (VIC) for discounts", + "Id":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"e77b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veteran ID Card (VIC) for discounts", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Replacement card", + "Id":"ee7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ea7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Replacement card", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Military base access", + "Id":"f07b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ea7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Military base access", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Other", + "Id":"f27b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ea7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Replacement card", + "Id":"f47b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Replacement card", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Eligibility", + "Id":"f67b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Eligibility", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Checking application status", + "Id":"f87b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Checking application status", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"How to apply", + "Id":"fb7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"How to apply", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Sign-in issues or records not found", + "Id":"fd7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Sign-in issues or records not found", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Trouble submitting application", + "Id":"ff7b38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Trouble submitting application", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Trouble uploading photos or documents", + "Id":"017c38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Trouble uploading photos or documents", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Other", + "Id":"057c38c8-1617-ec11-b6e5-001dd804ce09", + "ParentId":"ec7b38c8-1617-ec11-b6e5-001dd804ce09", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":999, + "DisplayName":"Other", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Survivor Benefits", + "Id":"282d7129-c977-ec11-8940-001dd804d2b4", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":9, + "DisplayName":"Survivor Benefits", + "TopicType":"Category", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Aid and Attendance or Housebound benefits", + "Id":"21b6243c-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Aid and Attendance or Housebound benefits", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Direct deposit", + "Id":"403d6b60-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Direct deposit", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"How to apply", + "Id":"a1deac6c-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"How to apply", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Guardianship, custodianship, or fiduciary issues", + "Id":"a6f22b7f-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Guardianship, custodianship, or fiduciary issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Payment issues", + "Id":"2d6e478b-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Payment issues", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Claim status", + "Id":"6c535c91-c977-ec11-8940-001dd804d2b4", + "ParentId":"282d7129-c977-ec11-8940-001dd804d2b4", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Claim status", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Defense Enrollment Eligibility Reporting System (DEERS)", + "Id":"9520fd17-ec3c-ec11-b6e5-001dd804d87f", + "ParentId":null, + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":15, + "DisplayName":"Defense Enrollment Eligibility Reporting System (DEERS)", + "TopicType":"Category", + "ContactPreferences":["Email"]}, + {"Name":"Adding requests", + "Id":"ed455736-ec3c-ec11-b6e5-001dd804d87f", + "ParentId":"9520fd17-ec3c-ec11-b6e5-001dd804d87f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Adding requests", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Updating DEERS records", + "Id":"40a0524e-ec3c-ec11-b6e5-001dd804d87f", + "ParentId":"9520fd17-ec3c-ec11-b6e5-001dd804d87f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Updating DEERS records", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Burial flags", + "Id":"8c3a16ea-0379-ef11-a670-001dd8053a71", + "ParentId":"fb2a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Burial flags", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Burial allowance for unclaimed Veteran remains", + "Id":"cb07439d-6877-ef11-a670-001dd8055a8b", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Burial allowance for unclaimed Veteran remains", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Burial in a VA national cemetery", + "Id":"cf7dc10a-7e3b-ed11-9daf-001dd806846c", + "ParentId":"71524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Burial in a VA national cemetery", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Audiology and hearing aids", + "Id":"c0da1728-d91f-ed11-b83c-001dd8069009", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":false, + "RankOrder":0, + "DisplayName":"Audiology and hearing aids", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Veterans Affairs Life Insurance (VALife)", + "Id":"5d402b2a-806b-ef11-a671-001dd8097cca", + "ParentId":"6f524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veterans Affairs Life Insurance (VALife)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Transfer of benefits", + "Id":"8085b967-8276-ef11-a671-001dd8097cca", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Transfer of benefits", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Transferring benefits after death of Veteran or dependent (Section 110)", + "Id":"41226b74-8276-ef11-a671-001dd8097cca", + "ParentId":"8085b967-8276-ef11-a671-001dd8097cca", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Transferring benefits after death of Veteran or dependent (Section 110)", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Transferring benefits to dependents", + "Id":"bba71e82-8276-ef11-a671-001dd8097cca", + "ParentId":"8085b967-8276-ef11-a671-001dd8097cca", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Transferring benefits to dependents", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Certificate of Eligibility (COE) or Statement of Benefits", + "Id":"5716ab8e-8276-ef11-a671-001dd8097cca", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Certificate of Eligibility (COE) or Statement of Benefits", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Licensing and testing fees", + "Id":"73d0ad94-8276-ef11-a671-001dd8097cca", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Licensing and testing fees", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Verifying school enrollment", + "Id":"c070c79a-8276-ef11-a671-001dd8097cca", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Verifying school enrollment", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Veteran Readiness and Employment (Chapter 31)", + "Id":"b18831a7-8276-ef11-a671-001dd8097cca", + "ParentId":"75524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":true, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Veteran Readiness and Employment (Chapter 31)", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone", "USMail"]}, + {"Name":"Headstones, markers, medallions, and Presidential Memorial Certificates", + "Id":"60aa2c22-0c79-ef11-a671-001dd8097cca", + "ParentId":"fb2a8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Headstones, markers, medallions, and Presidential Memorial Certificates", + "TopicType":"SubTopic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"General question", + "Id":"141a0e7f-8c34-ef11-8409-001dd809d228", + "ParentId":"62524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"General question", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Programs and policies", + "Id":"bbaf4f8b-8c34-ef11-8409-001dd809d228", + "ParentId":"62524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Programs and policies", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Billing and copays", + "Id":"77bd7f33-773f-ef11-8409-001dd830980e", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Billing and copays", + "TopicType":"Topic", + "ContactPreferences":["Email"]}, + {"Name":"Foreign Medical Program", + "Id":"b9d2b73f-773f-ef11-8409-001dd830980e", + "ParentId":"73524deb-d864-eb11-bb24-000d3a579c45", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Foreign Medical Program", + "TopicType":"Topic", + "ContactPreferences":["Email", "Phone"]}, + {"Name":"Eligibility for special benefits related to prosthetics", + "Id":"60b74965-773f-ef11-8409-001dd830980e", + "ParentId":"0d2b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Eligibility for special benefits related to prosthetics", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}, + {"Name":"Special benefits application status", + "Id":"0bfe416b-773f-ef11-8409-001dd830980e", + "ParentId":"0d2b8586-e764-eb11-bb23-000d3a579c3f", + "Description":null, + "RequiresAuthentication":false, + "AllowAttachments":true, + "RankOrder":0, + "DisplayName":"Special benefits application status", + "TopicType":"SubTopic", + "ContactPreferences":["Email"]}], + "Message":null, + "ExceptionOccurred":false, + "ExceptionMessage":null, + "MessageId":"bb5ebe80-f498-4310-a9c3-767d27820910"} diff --git a/modules/ask_va_api/spec/app/lib/ask_va_api/inquiries/payload_builder/submitter_profile_spec.rb b/modules/ask_va_api/spec/app/lib/ask_va_api/inquiries/payload_builder/submitter_profile_spec.rb index e343c1840bf..4317d47b3d7 100644 --- a/modules/ask_va_api/spec/app/lib/ask_va_api/inquiries/payload_builder/submitter_profile_spec.rb +++ b/modules/ask_va_api/spec/app/lib/ask_va_api/inquiries/payload_builder/submitter_profile_spec.rb @@ -21,7 +21,7 @@ } end let(:pronouns) do - { he_him_his: true } + { he_him_his: 'true' } end let(:params) do { diff --git a/modules/ask_va_api/spec/requests/ask_va_api/v0/health_facilities_spec.rb b/modules/ask_va_api/spec/requests/ask_va_api/v0/health_facilities_spec.rb index 881edc3cc3e..ce5e24013cf 100644 --- a/modules/ask_va_api/spec/requests/ask_va_api/v0/health_facilities_spec.rb +++ b/modules/ask_va_api/spec/requests/ask_va_api/v0/health_facilities_spec.rb @@ -35,6 +35,7 @@ it 'is expected to have specified pagination metadata' do current_page = request_params[:page] || 1 prev_page = current_page > 1 ? current_page - 1 : nil + expect(parsed_body[:meta][:pagination]).to match({ current_page:, prev_page:, @@ -76,27 +77,30 @@ RSpec.describe AskVAApi::V0::HealthFacilitiesController, team: :facilities, type: :request, vcr: vcr_options do subject(:parsed_body) { JSON.parse(response.body).with_indifferent_access } + let(:cache_data_instance) { Crm::CacheData.new } + let(:patsr_facilities) do + data = File.read('modules/ask_va_api/config/locales/get_facilities_mock_data.json') + JSON.parse(data, symbolize_names: true) + end + + before do + allow_any_instance_of(Crm::CrmToken).to receive(:call).and_return('token') + allow_any_instance_of(Crm::Service).to receive(:call).and_return(patsr_facilities) + allow(Crm::CacheData).to receive(:new).and_return(cache_data_instance) + allow(cache_data_instance).to receive(:fetch_and_cache_data).and_return(patsr_facilities) + end + describe 'POST #search' do it 'returns 400 for invalid type parameter' do post '/ask_va_api/v0/health_facilities', params: { type: 'bogus' } expect(response).to have_http_status(:bad_request) end - it 'returns 200 for query with services but no type' do - post '/ask_va_api/v0/health_facilities', params: { services: 'EyeCare' } - expect(response).to have_http_status(:ok) - end - it 'returns 400 for health query with unknown service' do post '/ask_va_api/v0/health_facilities', params: { type: 'health', services: ['OilChange'] } expect(response).to have_http_status(:bad_request) end - it 'returns 400 for benefits query with unknown service' do - post '/ask_va_api/v0/health_facilities', params: { type: 'benefits', services: ['Haircut'] } - expect(response).to have_http_status(:bad_request) - end - it "sends a 'lighthouse.facilities.v2.request.faraday' notification to any subscribers listening" do allow(StatsD).to receive(:measure) @@ -113,111 +117,12 @@ end.to instrument('lighthouse.facilities.v2.request.faraday') end - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-74.730, 40.015, -73.231, 41.515], - page: 2 - }, - %w[vc_0110V nca_808 vha_526 vha_526QA vc_0857MVC vha_561GD vc_0132V vha_630A4 vha_526GB vba_309] - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-122.786758, 45.451913, -122.440689, 45.64] - }, - %w[vha_648GI vba_348a vba_348 vc_0617V vba_348d vha_648 vba_348h vha_648A4 nca_954 nca_907] it_behaves_like 'paginated response from request body with expected IDs', { bbox: [-122.786758, 45.451913, -122.440689, 45.64], type: 'health' }, - %w[vha_648GI vha_648 vha_648A4 vha_648GE] - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-122.786758, 45.451913, -122.440689, 45.64], - type: 'benefits' - }, - %w[vba_348a vba_348 vba_348d vba_348h] - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-122.786758, 45.451913, -122.440689, 45.64], - type: 'benefits', - services: ['DisabilityClaimAssistance'] - }, - %w[vba_348] - it_behaves_like 'paginated response from request body with expected IDs', - { - lat: 33.298639, - long: -111.789659 - }, - %w[vha_644BY vha_644GJ vc_0524V vba_345g vha_644GI vba_345 vha_644QA vc_0517V vha_644GG vha_644QB], - [2.08, 6.58, 7.68, 11.72, 16.75, 18.3, 19.59, 19.71, 20.31, 20.95] - it_behaves_like 'paginated response from request body with expected IDs', - { - lat: 33.298639, - long: -111.789659, - radius: 50 - }, - %w[vha_644BY vha_644GJ vc_0524V vba_345g vha_644GI vba_345 vha_644QA vc_0517V vha_644GG vha_644QB], - [2.08, 6.58, 7.68, 11.72, 16.75, 18.3, 19.59, 19.71, 20.31, 20.95] - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-122.786758, 45.451913, -122.440689, 45.64], - lat: 33.298639, - long: -111.789659, - radius: 50 - }, - %w[vha_648GI vba_348a vba_348 vc_0617V vba_348d vha_648 vba_348h vha_648A4 nca_954 nca_907] - it_behaves_like 'paginated response from request body with expected IDs', - { - state: 'TX' - }, - %w[nca_846 nca_851 nca_854 nca_877 nca_886 nca_916 nca_s1118 nca_s1119 nca_s1120 nca_s1121] - it_behaves_like 'paginated response from request body with expected IDs', - { - zip: 85_297 - }, - ['vha_644BY'] - it_behaves_like 'paginated response from request body with expected IDs', - { - ids: 'vha_442,vha_552,vha_552GB,vha_442GC,vha_442GB,vha_552GA,vha_552GD' - }, - %w[vha_442 vha_442GB vha_442GC vha_552 vha_552GA vha_552GB vha_552GD] - - context 'params[:mobile]' do - context 'mobile not passed' do - it_behaves_like 'paginated response from request body with expected IDs', - { - bbox: [-74.730, 40.015, -73.231, 41.515], - page: 1 - }, - %w[vc_0106V vha_630 vba_306 vha_630GA vc_0133V vha_526GD vc_0105V vha_561GE vc_0109V vc_0102V] - end - - context 'true' do - it_behaves_like 'paginated response from request body with expected IDs', - { - mobile: true, - bbox: [-74.730, 40.015, -73.231, 41.515], - page: 1 - }, - %w[vha_526QA vc_0857MVC vha_630QA vha_630QB vha_632QA vha_632QB], - [], - true - end - - context 'false' do - it_behaves_like 'paginated response from request body with expected IDs', - { - mobile: false, - bbox: [-74.730, 40.015, -73.231, 41.515], - page: 1 - }, - %w[ - vc_0106V vha_630 vha_630GA vc_0133V vha_526GD vc_0105V vha_561GE vc_0109V vc_0102V vc_0110V - ], - [], - false - end - end + %w[vha_648] context 'params[:type] = health' do context 'params[:services] = [\'Covid19Vaccine\']', vcr: vcr_options.merge( @@ -244,9 +149,8 @@ it 'is expected not to populate tmpCovidOnlineScheduling' do attributes_covid = parsed_body['data'].collect { |x| x['attributes']['tmpCovidOnlineScheduling'] } - expect(parsed_body['data'][0]['attributes']['tmpCovidOnlineScheduling']).to be_truthy - expect(attributes_covid).to eql([true, true, true, false, true, false, false, true, false, false]) + expect(attributes_covid).to eql([true, false, true, false, false, true, false]) end end diff --git a/modules/ask_va_api/spec/requests/ask_va_api/v0/static_data_spec.rb b/modules/ask_va_api/spec/requests/ask_va_api/v0/static_data_spec.rb index 45075db44da..26f0c64389f 100644 --- a/modules/ask_va_api/spec/requests/ask_va_api/v0/static_data_spec.rb +++ b/modules/ask_va_api/spec/requests/ask_va_api/v0/static_data_spec.rb @@ -129,7 +129,7 @@ 'rank_order' => 1, 'requires_authentication' => true, 'topic_type' => 'Category', - 'contact_preferences' => [] } } + 'contact_preferences' => ['Email'] } } end context 'when successful' do diff --git a/modules/ask_va_api/spec/sidekiq/crm/facilities_data_job_spec.rb b/modules/ask_va_api/spec/sidekiq/crm/facilities_data_job_spec.rb new file mode 100644 index 00000000000..d7e514804af --- /dev/null +++ b/modules/ask_va_api/spec/sidekiq/crm/facilities_data_job_spec.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Crm::FacilitiesDataJob, type: :job do + include ActiveJob::TestHelper + + describe '#perform' do + let(:cache_data_instance) { Crm::CacheData.new } + let(:response) do + File.read('modules/ask_va_api/config/locales/get_facilities_mock_data.json') + end + + context 'when successful' do + before do + allow_any_instance_of(Crm::CrmToken).to receive(:call).and_return('token') + allow_any_instance_of(Crm::Service).to receive(:call).and_return(response) + allow(Crm::CacheData).to receive(:new).and_return(cache_data_instance) + allow(cache_data_instance).to receive(:fetch_and_cache_data) + end + + context 'when successful' do + it 'creates an instance of Crm::CacheData and calls fetch_and_cache_data with correct parameters' do + described_class.new.perform + + expect(cache_data_instance).to have_received(:fetch_and_cache_data).with( + endpoint: 'Facilities', + cache_key: 'Facilities', + payload: {} + ) + end + end + end + + context 'when an error occurs during caching' do + let(:logger) { instance_double(LogService) } + let(:body) do + '{"Data":null' + end + let(:failure) { Faraday::Response.new(response_body: body, status: 400) } + + before do + allow_any_instance_of(Crm::CrmToken).to receive(:call).and_return('token') + allow_any_instance_of(Crm::Service).to receive(:call).and_return(failure) + allow(LogService).to receive(:new).and_return(logger) + allow(logger).to receive(:call) + end + + it 'logs the error and continues processing when an error occurs' do + described_class.new.perform + + expect(logger).to have_received(:call) + end + end + end +end diff --git a/modules/ask_va_api/spec/support/shared_contexts.rb b/modules/ask_va_api/spec/support/shared_contexts.rb index 96f808ce1d1..ca63158464d 100644 --- a/modules/ask_va_api/spec/support/shared_contexts.rb +++ b/modules/ask_va_api/spec/support/shared_contexts.rb @@ -8,8 +8,8 @@ email_address: 'test@test.com', contact_preference: 'Email', preferred_name: 'Submitter', - pronouns: { he_him_his: true }, - is_veteran_deceased: false, + pronouns: { he_him_his: 'true' }, + is_veteran_deceased: 'false', about_the_veteran: { first: 'Joseph', last: 'New', @@ -17,8 +17,8 @@ social_or_service_num: { ssn: '123456799' }, date_of_birth: '2000-01-01' }, - their_vre_information: false, - is_military_base: false, + their_vre_information: 'false', + is_military_base: 'false', postal_code: '80122', family_members_location_of_residence: 'Alabama', about_the_family_member: { @@ -34,7 +34,7 @@ select_topic: 'Audiology and hearing aids', who_is_your_question_about: 'Someone else', about_yourself: { social_or_service_num: {} }, - on_base_outside_us: false, + on_base_outside_us: 'false', address: { military_address: {} }, state_or_residency: {}, category_id: '73524deb-d864-eb11-bb24-000d3a579c45', @@ -42,9 +42,9 @@ subtopic_id: '', updated_in_review: '', search_location_input: '', - get_location_in_progress: false, + get_location_in_progress: 'false', current_user_location: '', - get_location_error: false, + get_location_error: 'false', selected_facility: nil, review_page_view: { open_chapters: [] }, files: [{ file_name: nil, file_content: nil }], @@ -57,8 +57,8 @@ email_address: 'test@test.com', contact_preference: 'Email', preferred_name: 'Submitter', - pronouns: { he_him_his: true }, - is_veteran_deceased: false, + pronouns: { he_him_his: 'true' }, + is_veteran_deceased: 'false', about_the_veteran: { first: 'Joseph', last: 'New', @@ -66,8 +66,8 @@ social_or_service_num: { ssn: '123456799' }, date_of_birth: '2000-01-01' }, - their_vre_information: false, - is_military_base: false, + their_vre_information: 'false', + is_military_base: 'false', postal_code: '80122', family_members_location_of_residence: 'Alabama', about_the_family_member: { @@ -83,7 +83,7 @@ select_topic: 'Audiology and hearing aids', who_is_your_question_about: 'Someone else', about_yourself: { social_or_service_num: {} }, - on_base_outside_us: false, + on_base_outside_us: 'false', address: { military_address: {} }, state_or_residency: {}, category_id: '73524deb-d864-eb11-bb24-000d3a579c45', @@ -91,9 +91,9 @@ subtopic_id: '', updated_in_review: '', search_location_input: '', - get_location_in_progress: false, + get_location_in_progress: 'false', current_user_location: '', - get_location_error: false, + get_location_error: 'false', selected_facility: nil, review_page_view: { open_chapters: [] }, files: [{ file_name: nil, file_content: nil }], @@ -118,7 +118,7 @@ InquirySubtopic: '', InquirySummary: nil, InquiryTopic: 'c0da1728-d91f-ed11-b83c-001dd8069009', - IsVeteranDeceased: false, + IsVeteranDeceased: 'false', LevelOfAuthentication: 722_310_001, MedicalCenter: nil, SchoolObj: { City: nil, diff --git a/modules/burials/lib/benefits_intake/submission_handler.rb b/modules/burials/lib/benefits_intake/submission_handler.rb index 2fa4fae61e2..2f341e5d1b9 100644 --- a/modules/burials/lib/benefits_intake/submission_handler.rb +++ b/modules/burials/lib/benefits_intake/submission_handler.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true require 'lighthouse/benefits_intake/submission_handler/saved_claim' -require 'va_notify/notification_email/burial' require 'burials/monitor' +require 'burials/notification_email' module Burials module BenefitsIntake diff --git a/modules/burials/lib/burials/engine.rb b/modules/burials/lib/burials/engine.rb index 592a60646a0..dbbb99afce0 100644 --- a/modules/burials/lib/burials/engine.rb +++ b/modules/burials/lib/burials/engine.rb @@ -20,10 +20,10 @@ class Engine < ::Rails::Engine # initializer 'burials.pdf_fill.register_form' do |app| # app.config.to_prepare do # require 'pdf_fill/filler' - # require_relative '../pdf_fill/va21p530v2' + # require_relative '../pdf_fill/va21p530ez' # # Register our Burial Pdf Fill form - # ::PdfFill::Filler.register_form(Burials::PdfFill::Va21p530v2::FORM_ID, Burials::PdfFill::Va21p530v2) + # ::PdfFill::Filler.register_form(Burials::PdfFill::Va21p530ez::FORM_ID, Burials::PdfFill::Va21p530ez) # end # end @@ -33,7 +33,7 @@ class Engine < ::Rails::Engine require_relative '../benefits_intake/submission_handler' # Register our Pension Benefits Intake Submission Handler - ::BenefitsIntake::SubmissionStatusJob.register_handler('21P-530V2', Burials::BenefitsIntake::SubmissionHandler) + ::BenefitsIntake::SubmissionStatusJob.register_handler('21P-530EZ', Burials::BenefitsIntake::SubmissionHandler) ::BenefitsIntake::SubmissionStatusJob.register_handler('21P-530', Burials::BenefitsIntake::SubmissionHandler) end end diff --git a/modules/burials/lib/zero_silent_failures/manual_remediation.rb b/modules/burials/lib/zero_silent_failures/manual_remediation.rb index 4d1c4438299..5989368aaab 100644 --- a/modules/burials/lib/zero_silent_failures/manual_remediation.rb +++ b/modules/burials/lib/zero_silent_failures/manual_remediation.rb @@ -27,13 +27,12 @@ def stamps(timestamp) } ] - burials += v2_stamps(timestamp) if ['21P-530V2'].include?(claim.form_id) + burials += submitted_stamp(timestamp) base + burials end - # specific stamps for burials v2 - def v2_stamps(timestamp) + def submitted_stamp(timestamp) [ { text: 'Application Submitted on va.gov', diff --git a/modules/burials/spec/lib/zero_silent_failures/manual_remediation_spec.rb b/modules/burials/spec/lib/zero_silent_failures/manual_remediation_spec.rb index c37865685f6..56156116f8b 100644 --- a/modules/burials/spec/lib/zero_silent_failures/manual_remediation_spec.rb +++ b/modules/burials/spec/lib/zero_silent_failures/manual_remediation_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' RSpec.describe Burials::ZeroSilentFailures::ManualRemediation do - let(:fake_claim) { FactoryBot.build(:burial_claim_v2) } + let(:fake_claim) { FactoryBot.build(:burial_claim) } context 'method override coverage' do it 'uses expected claim class' do diff --git a/modules/check_in/app/sidekiq/check_in/constants.rb b/modules/check_in/app/sidekiq/check_in/constants.rb index 7a471e8b694..ea931afab1a 100644 --- a/modules/check_in/app/sidekiq/check_in/constants.rb +++ b/modules/check_in/app/sidekiq/check_in/constants.rb @@ -5,6 +5,11 @@ module Constants # settings for travel claims for vista appts STATSD_NOTIFY_ERROR = 'worker.checkin.travel_claim.notify.error' STATSD_NOTIFY_SUCCESS = 'worker.checkin.travel_claim.notify.success' + STATSD_NOTIFY_SILENT_FAILURE = 'silent_failure' + STATSD_CIE_SILENT_FAILURE_TAGS = ['service:veteran-facing-forms', + 'function: CheckIn Travel Pay Notification Failure'].freeze + STATSD_OH_SILENT_FAILURE_TAGS = ['service:veteran-facing-forms', + 'function: OH Travel Pay Notification Failure'].freeze CIE_SUCCESS_TEMPLATE_ID = Settings.vanotify.services.check_in.template_id.claim_submission_success_text CIE_DUPLICATE_TEMPLATE_ID = Settings.vanotify.services.check_in.template_id.claim_submission_duplicate_text diff --git a/modules/check_in/app/sidekiq/check_in/travel_claim_base_worker.rb b/modules/check_in/app/sidekiq/check_in/travel_claim_base_worker.rb index dda20ba04a2..715346183ea 100644 --- a/modules/check_in/app/sidekiq/check_in/travel_claim_base_worker.rb +++ b/modules/check_in/app/sidekiq/check_in/travel_claim_base_worker.rb @@ -40,6 +40,9 @@ class TravelClaimBaseWorker Constants::CIE_FAILURE_TEMPLATE_ID] ) + FAILED_CLAIM_TEMPLATE_IDS = [Constants::CIE_TIMEOUT_TEMPLATE_ID, Constants::CIE_FAILURE_TEMPLATE_ID, + Constants::CIE_ERROR_TEMPLATE_ID, Constants::OH_ERROR_TEMPLATE_ID, + Constants::OH_FAILURE_TEMPLATE_ID, Constants::OH_TIMEOUT_TEMPLATE_ID].freeze def send_notification(opts = {}) notify_client = VaNotify::Service.new(Settings.vanotify.services.check_in.api_key) phone_last_four = opts[:mobile_phone].delete('^0-9').last(4) @@ -66,12 +69,21 @@ def send_notification(opts = {}) end def handle_error(ex, opts = {}) + template_id = opts[:template_id] log_exception_to_sentry( ex, - { phone_number: opts[:mobile_phone].delete('^0-9').last(4), template_id: opts[:template_id], + { phone_number: opts[:mobile_phone].delete('^0-9').last(4), template_id:, claim_number: opts[:claim_number] }, { error: :check_in_va_notify_job, team: 'check-in' } ) + if FAILED_CLAIM_TEMPLATE_IDS.include?(template_id) + tags = if 'oh'.casecmp?(opts[:facility_type]) + Constants::STATSD_OH_SILENT_FAILURE_TAGS + else + Constants::STATSD_CIE_SILENT_FAILURE_TAGS + end + StatsD.increment(Constants::STATSD_NOTIFY_SILENT_FAILURE, tags:) + end StatsD.increment(Constants::STATSD_NOTIFY_ERROR) end end diff --git a/modules/check_in/spec/sidekiq/travel_claim_status_check_worker_spec.rb b/modules/check_in/spec/sidekiq/travel_claim_status_check_worker_spec.rb index 3939a1be02f..bae8f9e0ada 100644 --- a/modules/check_in/spec/sidekiq/travel_claim_status_check_worker_spec.rb +++ b/modules/check_in/spec/sidekiq/travel_claim_status_check_worker_spec.rb @@ -17,6 +17,7 @@ @statsd_timeout = CheckIn::Constants::OH_STATSD_BTSSS_TIMEOUT @statsd_failed_claim = CheckIn::Constants::OH_STATSD_BTSSS_CLAIM_FAILURE @statsd_error = CheckIn::Constants::OH_STATSD_BTSSS_ERROR + @statsd_silent_failure_tag = CheckIn::Constants::STATSD_OH_SILENT_FAILURE_TAGS allow(redis_client).to receive(:facility_type).and_return('oh') else @@ -32,6 +33,7 @@ @statsd_timeout = CheckIn::Constants::CIE_STATSD_BTSSS_TIMEOUT @statsd_failed_claim = CheckIn::Constants::CIE_STATSD_BTSSS_CLAIM_FAILURE @statsd_error = CheckIn::Constants::CIE_STATSD_BTSSS_ERROR + @statsd_silent_failure_tag = CheckIn::Constants::STATSD_CIE_SILENT_FAILURE_TAGS allow(redis_client).to receive(:facility_type).and_return(nil) end @@ -251,6 +253,29 @@ .exactly(1).time end end + + context "when #{facility_type} and both travel claim status & notification fails" do + let(:travel_claim_status_resp) do + Faraday::Response.new(response_body: { message: 'BTSSS timeout error' }, status: 408) + end + + before do + allow_any_instance_of(TravelClaim::Client).to receive(:claim_status).and_return(travel_claim_status_resp) + end + + it 'logs silent_failure statsd error metrics' do + worker = described_class.new + + VCR.use_cassette('check_in/vanotify/send_sms_403_forbidden', match_requests_on: [:host]) do + expect { worker.perform(uuid, appt_date) }.to raise_error(VANotify::Forbidden) + end + + expect(StatsD).to have_received(:increment).with(@statsd_timeout).exactly(1).time + expect(StatsD).to have_received(:increment).with(CheckIn::Constants::STATSD_NOTIFY_SILENT_FAILURE, + { tags: @statsd_silent_failure_tag }) + .exactly(1).time + end + end end describe CheckIn::TravelClaimStatusCheckWorker, type: :worker do @@ -269,6 +294,8 @@ before do allow(TravelClaim::RedisClient).to receive(:build).and_return(redis_client) allow(Flipper).to receive(:enabled?).with('check_in_experience_mock_enabled').and_return(false) + allow(Flipper).to receive(:enabled?).with(:va_notify_notification_creation).and_return(false) + allow(Flipper).to receive(:enabled?).with(:va_notify_custom_errors).and_return(true) allow(redis_client).to receive_messages(patient_cell_phone:, token: redis_token, icn:, station_number:, facility_type: nil) diff --git a/modules/check_in/spec/sidekiq/travel_claim_submission_worker_spec.rb b/modules/check_in/spec/sidekiq/travel_claim_submission_worker_spec.rb index 01f536293ed..76a791f1cbd 100644 --- a/modules/check_in/spec/sidekiq/travel_claim_submission_worker_spec.rb +++ b/modules/check_in/spec/sidekiq/travel_claim_submission_worker_spec.rb @@ -16,6 +16,7 @@ @statsd_timeout = CheckIn::Constants::OH_STATSD_BTSSS_TIMEOUT @statsd_error = CheckIn::Constants::OH_STATSD_BTSSS_ERROR @statsd_notify_success = CheckIn::Constants::STATSD_NOTIFY_SUCCESS + @statsd_silent_failure_tag = CheckIn::Constants::STATSD_OH_SILENT_FAILURE_TAGS allow(redis_client).to receive(:facility_type).and_return('oh') else @@ -30,6 +31,7 @@ @statsd_timeout = CheckIn::Constants::CIE_STATSD_BTSSS_TIMEOUT @statsd_error = CheckIn::Constants::CIE_STATSD_BTSSS_ERROR @statsd_notify_success = CheckIn::Constants::STATSD_NOTIFY_SUCCESS + @statsd_silent_failure_tag = CheckIn::Constants::STATSD_CIE_SILENT_FAILURE_TAGS allow(redis_client).to receive(:facility_type).and_return(nil) end @@ -158,6 +160,31 @@ end end + context "when #{facility_type} facility and both submit_claim & send_sms returns an error" do + it 'logs the silent_failure error' do + worker = described_class.new + expect(worker).to receive(:log_exception_to_sentry).with( + instance_of(VANotify::Forbidden), + { phone_number: patient_cell_phone_last_four, template_id: @error_template_id, claim_number: nil }, + { error: :check_in_va_notify_job, team: 'check-in' } + ) + + expect(StatsD).not_to receive(:increment) + .with(CheckIn::Constants::STATSD_NOTIFY_SUCCESS) + expect(StatsD).to receive(:increment).with(CheckIn::Constants::STATSD_NOTIFY_SILENT_FAILURE, + { tags: @statsd_silent_failure_tag }) + .exactly(1).time + expect(StatsD).to receive(:increment) + .with(CheckIn::Constants::STATSD_NOTIFY_ERROR).exactly(1).time + + VCR.use_cassette('check_in/vanotify/send_sms_403_forbidden', match_requests_on: [:host]) do + VCR.use_cassette('check_in/btsss/submit_claim/submit_claim_400_multiple', match_requests_on: [:host]) do + expect { worker.perform(uuid, appt_date) }.to raise_error(VANotify::Forbidden) + end + end + end + end + context "when #{facility_type} facility and submit claim times out" do before do allow_any_instance_of(Faraday::Connection).to receive(:post).and_raise(Faraday::TimeoutError) diff --git a/modules/claims_api/app/clients/claims_api/bgs_client/definitions.rb b/modules/claims_api/app/clients/claims_api/bgs_client/definitions.rb index 70e52916706..d478bd2bfd2 100644 --- a/modules/claims_api/app/clients/claims_api/bgs_client/definitions.rb +++ b/modules/claims_api/app/clients/claims_api/bgs_client/definitions.rb @@ -108,7 +108,7 @@ module UpdatePoaAccess ## # EBenefitsBnftClaimStatusWebServiceBean # - module EBenefitsBnftClaimStatusWebService + module EBenefitsBenefitClaimStatusWebServiceBean DEFINITION = Bean.new( path: 'EBenefitsBnftClaimStatusWebServiceBean', @@ -119,6 +119,14 @@ module EBenefitsBnftClaimStatusWebService ) end + module EBenefitsBenefitClaimStatusWebService + DEFINITION = + Service.new( + bean: EBenefitsBenefitClaimStatusWebServiceBean::DEFINITION, + path: 'EBenefitsBnftClaimStatusWebService' + ) + end + ## # IntentToFileWebServiceBean # diff --git a/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb b/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb index 80d9a5e598d..d7e80699dcd 100644 --- a/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb +++ b/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb @@ -56,6 +56,14 @@ def submit_form_526 # rubocop:disable Metrics/MethodLength ClaimsApi::Logger.log('526', claim_id: auto_claim.id, detail: 'Submitted to Lighthouse', pdf_gen_dis: form_attributes['autoCestPDFGenerationDisabled']) + form_attributes['disabilities'].each do |disability| + if disability['classificationCode'].present? + ClaimsApi::Logger.log('526_classification_code', + classification_code: disability['classificationCode'], + cid: token.payload['cid'], version: 'v1') + end + end + # .create returns the resulting object whether the object was saved successfully to the database or not. # If it's lacking the ID, that means the create was unsuccessful and an identical claim already exists. # Find and return that claim instead. diff --git a/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb b/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb index aa510565235..57d6c119d36 100644 --- a/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb +++ b/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb @@ -117,7 +117,7 @@ def synchronous private - def shared_submit_methods + def shared_submit_methods # rubocop:disable Metrics/MethodLength auto_claim = ClaimsApi::AutoEstablishedClaim.create( status: ClaimsApi::AutoEstablishedClaim::PENDING, auth_headers:, form_data: form_attributes, @@ -133,6 +133,14 @@ def shared_submit_methods ) end + form_attributes['disabilities'].each do |disability| + if disability['classificationCode'].present? + ClaimsApi::Logger.log('526_classification_code', + classification_code: disability['classificationCode'], + cid: token.payload['cid'], version: 'v2') + end + end + track_pact_counter auto_claim auto_claim diff --git a/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/request_controller.rb b/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/request_controller.rb index 9f14f002553..4065535db86 100644 --- a/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/request_controller.rb +++ b/modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/request_controller.rb @@ -123,6 +123,8 @@ def validate_decide_params!(proc_id:, decision:) end def send_declined_notification(ptcpnt_id:, first_name:, representative_id:) + return unless Flipper.enabled?(:lighthouse_claims_api_v2_poa_va_notify) + lockbox = Lockbox.new(key: Settings.lockbox.master_key) encrypted_ptcpnt_id = Base64.strict_encode64(lockbox.encrypt(ptcpnt_id)) encrypted_first_name = Base64.strict_encode64(lockbox.encrypt(first_name)) diff --git a/modules/claims_api/app/controllers/concerns/claims_api/v2/claims_requests/supporting_documents.rb b/modules/claims_api/app/controllers/concerns/claims_api/v2/claims_requests/supporting_documents.rb index ddcba750d52..16873c01279 100644 --- a/modules/claims_api/app/controllers/concerns/claims_api/v2/claims_requests/supporting_documents.rb +++ b/modules/claims_api/app/controllers/concerns/claims_api/v2/claims_requests/supporting_documents.rb @@ -93,19 +93,12 @@ def use_birls_id_file_number? end def find_by_ssn(ssn) - if Flipper.enabled? :claims_api_use_person_web_service - # rubocop:disable Rails/DynamicFindBy - ClaimsApi::PersonWebService.new( - external_uid: target_veteran.participant_id, - external_key: target_veteran.participant_id - ).find_by_ssn(ssn) - else - ClaimsApi::LocalBGS.new( - external_uid: target_veteran.participant_id, - external_key: target_veteran.participant_id - ).find_by_ssn(ssn) - # rubocop:enable Rails/DynamicFindBy - end + # rubocop:disable Rails/DynamicFindBy + ClaimsApi::PersonWebService.new( + external_uid: target_veteran.participant_id, + external_key: target_veteran.participant_id + ).find_by_ssn(ssn) + # rubocop:enable Rails/DynamicFindBy end end end diff --git a/modules/claims_api/app/services/claims_api/power_of_attorney_request_service/create_request.rb b/modules/claims_api/app/services/claims_api/power_of_attorney_request_service/create_request.rb index 4db6b831fa0..f8d88965b0d 100644 --- a/modules/claims_api/app/services/claims_api/power_of_attorney_request_service/create_request.rb +++ b/modules/claims_api/app/services/claims_api/power_of_attorney_request_service/create_request.rb @@ -27,26 +27,33 @@ def initialize(veteran_participant_id, form_data, claimant_participant_id = nil, end def call + # https://github.com/DataDog/dd-trace-rb/blob/master/docs/UpgradeGuide.md#distributed-tracing + trace_digest = Datadog::Tracing.active_trace&.to_digest + @vnp_proc_id = create_vnp_proc[:vnp_proc_id] # Parallelize create_vnp_form and create_vnp_ptcpnt form_promise = Concurrent::Promise.execute do - create_vnp_form + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_form + end end ptcpnt_promise = Concurrent::Promise.execute do - create_vnp_ptcpnt(@veteran_participant_id) + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_ptcpnt(@veteran_participant_id) + end end # Wait for both promises and store the participant ID form_promise.value! @veteran_vnp_ptcpnt_id = ptcpnt_promise.value![:vnp_ptcpnt_id] - create_vonapp_data(@form_data[:veteran], @veteran_vnp_ptcpnt_id) + create_vonapp_data(@form_data[:veteran], @veteran_vnp_ptcpnt_id, trace_digest) if @has_claimant @claimant_vnp_ptcpnt_id = create_vnp_ptcpnt(@claimant_participant_id)[:vnp_ptcpnt_id] - create_vonapp_data(@form_data[:claimant], @claimant_vnp_ptcpnt_id) + create_vonapp_data(@form_data[:claimant], @claimant_vnp_ptcpnt_id, trace_digest) end create_veteran_representative @@ -54,26 +61,34 @@ def call private - def create_vonapp_data(person, vnp_ptcpnt_id) + def create_vonapp_data(person, vnp_ptcpnt_id, trace_digest) # rubocop:disable Metrics/MethodLength promises = [] promises << Concurrent::Promise.execute do - create_vnp_person(person, vnp_ptcpnt_id) + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_person(person, vnp_ptcpnt_id) + end end promises << Concurrent::Promise.execute do - create_vnp_mailing_address(person[:address], vnp_ptcpnt_id) + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_mailing_address(person[:address], vnp_ptcpnt_id) + end end if person[:email] promises << Concurrent::Promise.execute do - create_vnp_email_address(person[:email], vnp_ptcpnt_id) + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_email_address(person[:email], vnp_ptcpnt_id) + end end end if person[:phone] promises << Concurrent::Promise.execute do - create_vnp_phone(person[:phone][:areaCode], person[:phone][:phoneNumber], vnp_ptcpnt_id) + Datadog::Tracing.continue_trace!(trace_digest) do + create_vnp_phone(person[:phone][:areaCode], person[:phone][:phoneNumber], vnp_ptcpnt_id) + end end end diff --git a/modules/claims_api/app/swagger/claims_api/description/v2.md b/modules/claims_api/app/swagger/claims_api/description/v2.md index ca728da0d8a..4304613d734 100644 --- a/modules/claims_api/app/swagger/claims_api/description/v2.md +++ b/modules/claims_api/app/swagger/claims_api/description/v2.md @@ -28,25 +28,25 @@ End-to-end claims tracking provides the status of claims as they move through th ### Claim statuses -Claims are first submitted by this API and then established in Veterans Benefits Management System (VBMS). A 200 response means that the claim was successfully submitted by the API. It does not mean VA has received the claim. Use the appropriate GET endpoint and the ID returned with your submission response to confirm the status of the submission. Statuses are: +After you submit a disability compensation claim with the `POST /veterans/{veteranId}/526/synchronous` endpoint, it is then established in Veterans Benefits Management System (VBMS). A `202` response means that the claim was successfully submitted by the API. However, it does not mean VA has received the required 526EZ PDF. -- Pending - the claim is successfully submitted for processing -- Errored - the submission encountered upstream errors -- Canceled - the claim was identified as a duplicate or another issue caused the claim to be canceled. For duplicate claims, the tracking of the claim's progress happens under a different Claim ID . +To confirm the status of your submission, use the `GET /veterans/{veteranId}/claims/{id}` endpoint and the ID returned with your submission response. Statuses are: -Other statuses this API returns align with the [VA.gov](http://va.gov/) [claim status descriptions](https://www.va.gov/resources/what-your-claim-status-means/), which are: - -- Claim received -- Initial review -- Evidence gathering, review, and decision -- Preparation for notification -- Complete +* **Pending**: The claim is successfully submitted for processing +* **Errored**: The submission encountered upstream errors +* **Canceled**: The claim was identified as a duplicate, or another issue caused the claim to be canceled. + * For duplicate claims, the claim's progress is tracked under a different Claim ID than the one returned in your submission response. +* **Claim received**: The claim was received, but hasn't been assigned to a reviewer yet. +* **Initial review**: The claim has been assigned to a reviewer, who will determine if more information is needed. +* **Evidence gathering, review, and decision**: VA is gathering evidence to make a decision from health care providers, government agencies, and other sources. +* **Preparation for notification**: VA has made a decision on the claim, and is getting a decision letter ready to mail. +* **Complete**: VA has sent a decision letter by U.S. mail. ### Finding a Veteran's unique VA ID -This API uses a unique Veteran identifier to identify the subject of each API request. This Veteran identifier can be retrieved by passing the Veteran’s first name, last name, DOB, and SSN to the ‘/veteran-id’ endpoint. This identifier should then be used as the Veteran ID parameter in request URLs. +This API uses Inegration Control Number (ICN) as a unique Veteran identifier to identify the subject of each API request. This identifier should be used as the `{veteranId}` parameter in request URLs. -Note: though Veteran identifiers are typically static, they may change over time. If a specific Veteran ID suddenly responds with a ‘404 not found’ error, the identifier may have changed. It’s a good idea to periodically check the identifier for each Veteran. +**Note**: though ICNs are typically static, they may change over time. If a specific ICN suddenly responds with a `404 not found` error, it may have changed. It’s a good idea to periodically check the ICN for each Veteran. ### Authentication and authorization diff --git a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json index be2b52c0dd3..6c7e7cf2b5f 100644 --- a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json @@ -3,13 +3,9 @@ "info": { "title": "Benefits Claims", "version": "v2", - "description": "## Background\n\nThe Benefits Claims API Version 2 lets internal consumers: \n\n- Retrieve existing claim information, including status, by claim ID.\n- Automatically establish an Intent To File (21-0966) in VBMS.\n- Automatically establish a disability compensation claim (21-526EZ) in VBMS.\n- Digitally submit supporting documentation for disability compensation claims.\n- Retrieve the active Power of Attorney organization of individual with power of attorney for a claimant.\n- Automatically establish a power of attorney appointment in VBMS for an accredited organization (VA Form 21-22).\n- Automatically establish a power of attorney appointment in VBMS for an accredited individual (VA Form 21-22a).\n\nYou should use the [Benefits Claims API Version 1](https://developer.va.gov/explore/benefits/docs/claims?version=current) if you are a consumer outside of VA and do not have the necessary VA agreements to use this API.\n \n## Appointing an accredited representative for dependents\n\nDependents of Veterans, such as spouses, children (biological and step), and parents (biological and foster) may be eligible for VA benefits and can request representation by an accredited representative.\n\nTo file claims through an accredited representative, dependents must appoint their own. Once appointed, the representative will have power of attorney (POA) to assist with the dependentʼs VA claims.\n\nBefore appointing a representative, the dependentʼs relationship to the Veteran must be established. If a new representative is being appointed, the dependentʼs relationship to the Veteran will be validated first. The representative will be appointed to the dependent, not the Veteran.\n\n## Technical Overview\n\nThis API accepts a payload of requests and responses with the payload identifying the claim and Veteran. Responses provide the submission’s processing status. Responses also provide a unique ID which can be used with the appropriate GET endpoint to return detailed, end-to-end claims status tracking. \n\nEnd-to-end claims tracking provides the status of claims as they move through the submission process, but does not return whether the claim was approved or denied. \n\n### Claim statuses\n\nClaims are first submitted by this API and then established in Veterans Benefits Management System (VBMS). A 200 response means that the claim was successfully submitted by the API. It does not mean VA has received the claim. Use the appropriate GET endpoint and the ID returned with your submission response to confirm the status of the submission. Statuses are:\n\n- Pending - the claim is successfully submitted for processing\n- Errored - the submission encountered upstream errors\n- Canceled - the claim was identified as a duplicate or another issue caused the claim to be canceled. For duplicate claims, the tracking of the claim's progress happens under a different Claim ID . \n\nOther statuses this API returns align with the [VA.gov](http://va.gov/) [claim status descriptions](https://www.va.gov/resources/what-your-claim-status-means/), which are:\n\n- Claim received\n- Initial review\n- Evidence gathering, review, and decision\n- Preparation for notification\n- Complete\n\n### Finding a Veteran's unique VA ID\n\nThis API uses a unique Veteran identifier to identify the subject of each API request. This Veteran identifier can be retrieved by passing the Veteran’s first name, last name, DOB, and SSN to the ‘/veteran-id’ endpoint. This identifier should then be used as the Veteran ID parameter in request URLs.\n\nNote: though Veteran identifiers are typically static, they may change over time. If a specific Veteran ID suddenly responds with a ‘404 not found’ error, the identifier may have changed. It’s a good idea to periodically check the identifier for each Veteran.\n\n### Authentication and authorization\n\nThe authentication model for the Benefits Claims Version 2 is based on OAuth 2.0 / OpenID Connect and supports the [client credentials grant](https://developer.va.gov/explore/authorization/docs/client-credentials?api=claims).\n\n**Important**: To get production access, you must either work for VA or have specific VA agreements in place. If you have questions, [contact us](https://developer.va.gov/support/contact-us).\n\n### Test data for sandbox environment use\n\nWe use mock [test data in the sandbox environment](https://github.com/department-of-veterans-affairs/vets-api-clients/blob/master/test_accounts.md). Sandbox test data and test users for the Benefits Claims API are valid for all versions of the API.\n" + "description": "## Background\n\nThe Benefits Claims API Version 2 lets internal consumers: \n\n- Retrieve existing claim information, including status, by claim ID.\n- Automatically establish an Intent To File (21-0966) in VBMS.\n- Automatically establish a disability compensation claim (21-526EZ) in VBMS.\n- Digitally submit supporting documentation for disability compensation claims.\n- Retrieve the active Power of Attorney organization of individual with power of attorney for a claimant.\n- Automatically establish a power of attorney appointment in VBMS for an accredited organization (VA Form 21-22).\n- Automatically establish a power of attorney appointment in VBMS for an accredited individual (VA Form 21-22a).\n\nYou should use the [Benefits Claims API Version 1](https://developer.va.gov/explore/benefits/docs/claims?version=current) if you are a consumer outside of VA and do not have the necessary VA agreements to use this API.\n \n## Appointing an accredited representative for dependents\n\nDependents of Veterans, such as spouses, children (biological and step), and parents (biological and foster) may be eligible for VA benefits and can request representation by an accredited representative.\n\nTo file claims through an accredited representative, dependents must appoint their own. Once appointed, the representative will have power of attorney (POA) to assist with the dependentʼs VA claims.\n\nBefore appointing a representative, the dependentʼs relationship to the Veteran must be established. If a new representative is being appointed, the dependentʼs relationship to the Veteran will be validated first. The representative will be appointed to the dependent, not the Veteran.\n\n## Technical Overview\n\nThis API accepts a payload of requests and responses with the payload identifying the claim and Veteran. Responses provide the submission’s processing status. Responses also provide a unique ID which can be used with the appropriate GET endpoint to return detailed, end-to-end claims status tracking. \n\nEnd-to-end claims tracking provides the status of claims as they move through the submission process, but does not return whether the claim was approved or denied. \n\n### Claim statuses\n\nAfter you submit a disability compensation claim with the `POST /veterans/{veteranId}/526/synchronous` endpoint, it is then established in Veterans Benefits Management System (VBMS). A `202` response means that the claim was successfully submitted by the API. However, it does not mean VA has received the required 526EZ PDF. \n\nTo confirm the status of your submission, use the `GET /veterans/{veteranId}/claims/{id}` endpoint and the ID returned with your submission response. Statuses are: \n\n* **Pending**: The claim is successfully submitted for processing\n* **Errored**: The submission encountered upstream errors\n* **Canceled**: The claim was identified as a duplicate, or another issue caused the claim to be canceled. \n * For duplicate claims, the claim's progress is tracked under a different Claim ID than the one returned in your submission response. \n* **Claim received**: The claim was received, but hasn't been assigned to a reviewer yet.\n* **Initial review**: The claim has been assigned to a reviewer, who will determine if more information is needed.\n* **Evidence gathering, review, and decision**: VA is gathering evidence to make a decision from health care providers, government agencies, and other sources.\n* **Preparation for notification**: VA has made a decision on the claim, and is getting a decision letter ready to mail.\n* **Complete**: VA has sent a decision letter by U.S. mail.\n\n### Finding a Veteran's unique VA ID\n\nThis API uses Inegration Control Number (ICN) as a unique Veteran identifier to identify the subject of each API request. This identifier should be used as the `{veteranId}` parameter in request URLs.\n\n**Note**: though ICNs are typically static, they may change over time. If a specific ICN suddenly responds with a `404 not found` error, it may have changed. It’s a good idea to periodically check the ICN for each Veteran.\n\n### Authentication and authorization\n\nThe authentication model for the Benefits Claims Version 2 is based on OAuth 2.0 / OpenID Connect and supports the [client credentials grant](https://developer.va.gov/explore/authorization/docs/client-credentials?api=claims).\n\n**Important**: To get production access, you must either work for VA or have specific VA agreements in place. If you have questions, [contact us](https://developer.va.gov/support/contact-us).\n\n### Test data for sandbox environment use\n\nWe use mock [test data in the sandbox environment](https://github.com/department-of-veterans-affairs/vets-api-clients/blob/master/test_accounts.md). Sandbox test data and test users for the Benefits Claims API are valid for all versions of the API.\n" }, "tags": [ - { - "name": "Veteran Identifier", - "description": "Allows authenticated veterans and veteran representatives to retrieve a veteran's id." - }, { "name": "Claims", "description": "Allows authenticated and authorized users to access claims data for a given Veteran. No data is returned if the user is not authenticated and authorized.\n" @@ -90,15 +86,11 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Create the decision for Power of Attorney requests", - "parameters": [ - - ], + "parameters": [], "responses": { "200": { "description": "Submit decision", @@ -411,15 +403,11 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Search for Power of Attorney requests", - "parameters": [ - - ], + "parameters": [], "responses": { "200": { "description": "Search results", @@ -778,272 +766,6 @@ } } }, - "/veteran-id:find": { - "post": { - "summary": "Retrieve Veteran ID.", - "tags": [ - "Veteran Identifier" - ], - "operationId": "postVeteranId", - "security": [ - { - "productionOauth": [ - "system/claim.read" - ] - }, - { - "sandboxOauth": [ - "system/claim.read" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Allows authenticated and authorized users to retrieve a Veteran's ID.", - "parameters": [ - - ], - "responses": { - "201": { - "description": "Veteran's unique identifier", - "content": { - "application/json": { - "example": { - "id": "1012667145V762142" - }, - "schema": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "example": "1012667145V762142" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "invalid value for SSN", - "detail": "blank is not valid for SSN" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Resource not found", - "detail": "Resource not found" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ssn", - "birthdate", - "firstName", - "lastName" - ], - "properties": { - "ssn": { - "type": "string", - "example": "796130115", - "description": "SSN of Veteran being represented" - }, - "firstName": { - "type": "string", - "example": "Tamara", - "description": "First name of Veteran being represented" - }, - "lastName": { - "type": "string", - "example": "Ellis", - "description": "Last name of Veteran being represented" - }, - "birthdate": { - "type": "string", - "example": "1967-06-19", - "description": "Date of birth of Veteran being represented, in ISO8601 format" - } - }, - "example": { - "ssn": "796130115", - "firstName": "Tamara", - "lastName": "Ellis", - "birthdate": "1967-06-19" - } - } - } - }, - "required": true - } - } - }, "/veterans/{veteranId}/claims/{id}/5103": { "post": { "summary": "Submit Evidence Waiver 5103", @@ -1063,9 +785,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Submit Evidence Waiver 5103 for Veteran.", @@ -1275,33 +995,26 @@ } } }, - "/veterans/{veteranId}/526": { + "/veterans/{veteranId}/526/synchronous": { "post": { - "summary": "Asynchronously establishes disability compensation claim", + "summary": "Submits disability compensation claim synchronously (restricted access)", "tags": [ "Disability Compensation Claims" ], - "operationId": "post526Claim", + "operationId": "post526ClaimSynchronous", "security": [ { "productionOauth": [ - "system/claim.read", - "system/claim.write" + "system/526.override" ] }, { "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - + "system/526.override" ] } ], - "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). \nThis endpoint generates a filled and electronically signed 526EZ form, establishes the disability claim in VBMS, and \nsubmits the form to the Veteran's eFolder.\n\nA 202 response indicates the API submission was accepted. The claim has not reached VBMS until it has a CLAIM_RECEIVED status. \nCheck claim status using the GET veterans/{veteranId}/claims/{id} endpoint.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", + "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). This endpoint synchronously generates a filled and electronically signed 526EZ form and establishes the disability claim in VBMS. The 526EZ form is uploaded asynchronously.\n\nA 202 response indicates the API submission was accepted and the claim was established in VBMS. Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. The claim status details response will return the associated 526EZ PDF in the supportingDocuments list.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", "parameters": [ { "name": "veteranId", @@ -1319,6893 +1032,1648 @@ "description": "Successful response", "content": { "application/json": { - "schema": { - "name": "data", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" - }, - "type": { - "type": "string", - "example": "form/526" - }, + "examples": { + "202 without a transactionId": { + "value": { + "data": { + "id": "c04ea779-1c6a-4fd1-a3ba-f6953bc839cc", + "type": "forms/526", "attributes": { - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] + "claimId": "600442191", + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" } } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" } - } + ] }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2023-10-30", + "separationLocationCode": "98282" } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true + } + } + } + }, + "202 with a transactionId": { + "value": { + "data": { + "id": "739cbe6b-be83-4277-a3c6-8eced1eeb527", + "type": "forms/526", + "attributes": { + "claimId": "600442191", + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + }, + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" + ], + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" + } + } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] + }, + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2024-12-18", + "separationLocationCode": "98282" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" + }, + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" + } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true + } + }, + "meta": { + "transactionId": "00000000-0000-0000-0000-000000000000" + } + } + } + }, + "schema": { + "name": "data", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" + }, + "type": { + "type": "string", + "example": "form/8675309" + }, + "attributes": { + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "claimantCertification", + "claimProcessType", + "disabilities", + "serviceInformation", + "veteranIdentification" + ], + "properties": { + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" + ] + }, + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": [ + "mailingAddress", + "currentVaEmployee" + ], + "properties": { + "serviceNumber": { + "type": "string", + "description": "Service identification number", "maxLength": 1000, - "example": "Will be retiring soon.", "nullable": true }, - "militaryRetiredPay": { + "veteranNumber": { + "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", "type": "object", "nullable": true, - "description": "", "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "telephone": { + "description": "Veteran's phone number.", "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" + "pattern": "^\\d{10}?$", + "example": "5555555555", + "nullable": true }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 + "internationalTelephone": { + "type": "string", + "description": "Veteran's international phone number.", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true } } }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { + "mailingAddress": { "type": "object", - "nullable": true, - "description": "", + "additionalProperties": false, + "required": [ + "addressLine1", + "city", + "country" + ], "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "addressLine1": { + "description": "Address line 1 for the Veteran's current mailing address.", "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "addressLine2": { + "description": "Address line 2 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 1, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", "type": "string", - "nullable": true, "maxLength": 1000, - "example": "Air Force" + "example": "USA" }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789", + "nullable": true + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 + "pattern": "^[a-zA-Z0-9]*$" } } }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", "nullable": true, - "example": true, - "default": false + "properties": { + "email": { + "type": "string", + "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", + "description": "The most current email address of the Veteran.", + "maxLength": 80, + "nullable": true + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true, + "default": false, + "nullable": true + } + } + }, + "currentVaEmployee": { + "type": "boolean", + "description": "Set to true if Veteran is a VA employee.", + "nullable": false } } }, - "directDeposit": { + "changeOfAddress": { + "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", "type": "object", "nullable": true, "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "addressLine1": { + "description": "Address line 1 for the Veteran's new address.", "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" }, - "accountType": { - "description": "Account type for the direct deposit.", + "addressLine2": { + "description": "Address line 2 for the Veteran's new address.", "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "addressLine3": { + "description": "Address line 3 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 0, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's new address.", "type": "string", "nullable": true, - "example": "Some Bank" + "pattern": "^$|^\\d{4}?$", + "example": "6789" }, - "routingNumber": { - "description": "Routing number for the direct deposit.", + "internationalPostalCode": { + "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", "type": "string", - "maxLength": 1000, + "maxLength": 16, "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" + "pattern": "^[a-zA-Z0-9]*$" + }, + "dates": { + "type": "object", + "properties": { + "beginDate": { + "description": "Begin date for the Veteran's new address.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "nullable": true, + "example": "2018-06-04" + }, + "endDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" + } + } } } }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - }, - "claimId": { - "type": "string", - "example": "600517517" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - } - } - } - } - } - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "examples": { - "Violates JSON Schema": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - } - ] - } - }, - "Not a JSON Object": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "status": "422", - "detail": "The request body is not a valid JSON object: This is not valid JSON", - "source": { - "pointer": null - } - } - ] - } - } - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "status", - "detail" - ], - "properties": { - "status": { - "type": "string", - "description": "HTTP error code" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "source": { - "type": "object", - "pointer": { - "type": "string" - } - }, - "title": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "attributes", - null - ], - "properties": { - "attributes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" - ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } - } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } - } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } - }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } - } - }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - } - } - } - } - } - }, - "example": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" - }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" - } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" - } - }, - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" - } - } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true - }, - { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } - ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - }, - { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true - } - } - } - }, - "examples": { - "Minimum Required Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "veteranIdentification": { - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "city": "Portland", - "state": "OR", - "country": "USA", - "zipFirstFive": "12345" - }, - "currentVaEmployee": false - }, - "disabilities": [ - { - "name": "hearing loss", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "2017-07", - "disabilityActionType": "NEW" - } - ], - "serviceInformation": { - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "2015-11-14", - "activeDutyEndDate": "2018-11-30" - } - ] - }, - "claimantCertification": true - } - } - } - }, - "Maximum Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - } - } - } - } - } - } - }, - "/veterans/{veteranId}/526/synchronous": { - "post": { - "summary": "Submits disability compensation claim synchronously (restricted access)", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "post526ClaimSynchronous", - "security": [ - { - "productionOauth": [ - "system/526.override" - ] - }, - { - "sandboxOauth": [ - "system/526.override" - ] - } - ], - "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). This endpoint synchronously generates a filled and electronically signed 526EZ form and establishes the disability claim in VBMS. The 526EZ form is uploaded asynchronously.\n\nA 202 response indicates the API submission was accepted and the claim was established in VBMS. Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. The claim status details response will return the associated 526EZ PDF in the supportingDocuments list.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", - "parameters": [ - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "Successful response", - "content": { - "application/json": { - "examples": { - "202 without a transactionId": { - "value": { - "data": { - "id": "409a21fe-d37b-45d7-b9e4-289052fa76b8", - "type": "forms/526", - "attributes": { - "claimId": "600442191", - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - }, - "202 with a transactionId": { - "value": { - "data": { - "id": "1db319a8-30d1-4f09-87a0-28c6afb3346b", - "type": "forms/526", - "attributes": { - "claimId": "600442191", - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-12-06", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - }, - "meta": { - "transactionId": "00000000-0000-0000-0000-000000000000" - } - } - } - }, - "schema": { - "name": "data", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" - }, - "type": { - "type": "string", - "example": "form/8675309" - }, - "attributes": { - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" - ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } - } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } - } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } - }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } - } - }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - }, - "claimId": { - "type": "string", - "example": "600517517" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - } - } - } - } - } - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "examples": { - "Violates JSON Schema": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - } - ] - } - }, - "Not a JSON Object": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "status": "422", - "detail": "The request body is not a valid JSON object: This is not valid JSON", - "source": { - "pointer": null - } - } - ] - } - } - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "status", - "detail" - ], - "properties": { - "status": { - "type": "string", - "description": "HTTP error code" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "source": { - "type": "object", - "pointer": { - "type": "string" - } - }, - "title": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "attributes", - null - ], - "properties": { - "attributes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" - ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } - } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } - } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } - }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } - } - }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - } - } - } - } - } - }, - "example": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" - }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" - } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" - } - }, - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" - } - } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true - }, - { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } - ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - }, - { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true - } - } - } - }, - "examples": { - "Minimum Required Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "veteranIdentification": { - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "city": "Portland", - "state": "OR", - "country": "USA", - "zipFirstFive": "12345" - }, - "currentVaEmployee": false - }, - "disabilities": [ - { - "name": "hearing loss", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "2017-07", - "disabilityActionType": "NEW" - } - ], - "serviceInformation": { - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "2015-11-14", - "activeDutyEndDate": "2018-11-30" - } - ] - }, - "claimantCertification": true - } - } - } - }, - "Maximum Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" + "homeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "isCurrentlyHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently homeless?" + }, + "currentlyHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "homelessSituationOptions": { + "description": "Veteran's living situation.", + "type": "string", + "nullable": true, + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "isAtRiskOfBecomingHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently at risk of becoming homeless?" + }, + "riskOfBecomingHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "livingSituationOptions": { + "type": "string", + "nullable": true, + "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "enum": [ + "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", + "OTHER" + ] + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "pointOfContact": { + "description": "Individual in direct contact with Veteran.", + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "telephone": { + "description": "Ten digit primary phone of point of contact.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555", + "nullable": true + }, + "internationalTelephone": { + "description": "International phone of point of contact.", + "type": "string", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + } } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + }, + "toxicExposure": { + "type": "object", + "nullable": true, + "properties": { + "gulfWarHazardService": { + "type": "object", + "nullable": true, + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "serviceDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "herbicideHazardService": { + "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", + "type": "object", + "nullable": true, + "properties": { + "servedInHerbicideHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "otherLocationsServed": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "description": "Date range for exposure in herbicide hazard location.", + "type": "object", + "nullable": true, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "additionalHazardExposures": { + "type": "object", + "nullable": true, + "description": "Additional hazardous exposures.", + "properties": { + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHIPBOARD_HAZARD_AND_DEFENSE", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] + } + }, + "specifyOtherExposures": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Exposure to asbestos." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "multipleExposures": { + "type": "array", + "nullable": true, + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "hazardExposedTo": { + "type": "string", + "nullable": true, + "pattern": "^([-a-zA-Z0-9'.,&# ])+$", + "maxLength": 1000, + "description": "Hazard the Veteran was exposed to." + }, + "exposureLocation": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 1000, + "description": "Location where the exposure happened." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + } + } } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "disabilityActionType", + "name" + ], + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "disabilityActionType": { + "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", + "type": "string", + "enum": [ + "NONE", + "NEW", + "INCREASE" + ], + "example": "NEW" + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true + }, + "ratedDisabilityId": { + "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", + "type": "string", + "example": "1100583", + "nullable": true + }, + "diagnosticCode": { + "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", + "type": "integer", + "example": 9999, + "nullable": true + }, + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", + "example": true, + "default": false, + "nullable": true + }, + "specialIssues": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "maxItems": 2, + "additionalProperties": false, + "type": "string", + "enum": [ + "POW", + "EMP" + ] + } + }, + "secondaryDisabilities": { + "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "example": "SECONDARY", + "enum": [ + "SECONDARY" + ] + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true + } + } + } + } + } + } }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "beginDate": { + "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", + "type": "string", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018", + "nullable": true + }, + "treatedDisabilityNames": { + "description": "Name(s) of disabilities treated in this time frame.", + "type": "array", + "nullable": true, + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": [ + "PTSD (post traumatic stress disorder)", + "Trauma" + ] + } + }, + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "nullable": true, + "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 + }, + "city": { + "description": "City of treatment facility.", + "type": "string", + "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", + "example": "Portland", + "nullable": true, + "minLength": 0, + "maxLength": 30 + }, + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "OR", + "nullable": true + } + } + } + } + } }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - }, - "Transaction ID": { - "value": { - "meta": { - "transactionId": "00000000-0000-0000-0000-000000000000" - }, - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" + "serviceInformation": { + "type": "object", + "additionalProperties": false, + "required": [ + "servicePeriods" + ], + "properties": { + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "nullable": true, + "maxItems": 100, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "examples": [ + "jane", + "janey lee", + "jane lee MacDonald" + ] + } + }, + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "serviceBranch", + "serviceComponent", + "activeDutyBeginDate", + "activeDutyEndDate" + ], + "properties": { + "serviceBranch": { + "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "example": "Air Force" + }, + "serviceComponent": { + "type": "string", + "description": "", + "enum": [ + "Active", + "Reserves", + "National Guard" + ] + }, + "activeDutyBeginDate": { + "description": "Date started active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "activeDutyEndDate": { + "description": "Date completed active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "nullable": true, + "example": "98283" + } + } + } + }, + "servedInActiveCombatSince911": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": "YES", + "nullable": true + }, + "reservesNationalGuardService": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "component": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "Reserves", + "National Guard" + ] + }, + "obligationTermsOfService": { + "type": "object", + "nullable": true, + "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", + "additionalProperties": false, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "endDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + } + } + }, + "unitName": { + "type": "string", + "nullable": true, + "maxLength": 1000, + "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" + }, + "unitAddress": { + "type": "string", + "maxLength": 1000, + "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", + "nullable": true + }, + "unitPhone": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "areaCode": { + "type": "string", + "nullable": true, + "maxLength": 3, + "pattern": "^$|^\\d{3}$", + "example": "555" + }, + "phoneNumber": { + "type": "string", + "nullable": true, + "maxLength": 20, + "example": "5555555" + } + } + }, + "receivingInactiveDutyTrainingPay": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "nullable": true, + "example": "YES" + } + } + }, + "federalActivation": { + "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "activationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + }, + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + } + } + }, + "confinements": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "approximateBeginDate": { + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + }, + "approximateEndDate": { + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + } + } + } + } } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } + } + }, + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } + } + }, + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + } } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-12-06", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - } - } - } - } - } - } - }, - "/veterans/{veteranId}/526/validate": { - "post": { - "summary": "Validates a 526 claim form submission.", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "post526ClaimValidate", - "security": [ - { - "productionOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Validates a request for a disability compensation claim submission (21-526EZ).\nThis endpoint can be used to test the request parameters for your /526 submission.\n", - "parameters": [ - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful response with disability", - "content": { - "application/json": { - "example": { - "data": { - "type": "claims_api_auto_established_claim_validation", - "attributes": { - "status": "valid" - } - } - }, - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "attributes" - ], - "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "additionalProperties": false, - "required": [ - "status" - ], - "properties": { - "status": { + "directDeposit": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "properties": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" + } + } + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { "type": "string", - "enum": [ - "valid" - ], - "description": "Return whether or not whether or not the payload is valid" + "description": "An optional notes section.", + "maxLength": 4000 + }, + "claimId": { + "type": "string", + "example": "600517517" } } } @@ -8325,41 +2793,59 @@ "description": "Unprocessable entity", "content": { "application/json": { - "example": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } + "examples": { + "Violates JSON Schema": { + "value": { + "errors": [ + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key claimProcessType", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key disabilities", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key serviceInformation", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key veteranIdentification", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + } + ] } - ] + }, + "Not a JSON Object": { + "value": { + "errors": [ + { + "title": "Unprocessable entity", + "status": "422", + "detail": "The request body is not a valid JSON object: This is not valid JSON", + "source": { + "pointer": null + } + } + ] + } + } }, "schema": { "required": [ @@ -9362,1386 +3848,2578 @@ "anticipatedSeparationDate": { "description": "Anticipated date of separation. Date must be in the future.", "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + } + } + }, + "confinements": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "approximateBeginDate": { + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + }, + "approximateEndDate": { + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + } + } + } + } + } + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } + } + }, + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 } } }, - "confinements": { - "type": "array", + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } + "example": true, + "default": false + } + } + }, + "directDeposit": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "properties": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" } } }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { + "type": "string", + "description": "An optional notes section.", + "maxLength": 4000 + } + } + } + } + } + }, + "example": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555" + }, + "mailingAddress": { + "addressLine1": "123 Main Street", + "addressLine2": "Unit 1", + "addressLine3": "Room 2", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "456 Main Street", + "addressLine2": "Unit 3", + "addressLine3": "Room 4", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2025-06-04", + "endDate": "2026-06-04" + } + }, + "homeless": { + "currentlyHomeless": { + "homelessSituationOptions": "OTHER", + "otherDescription": "Other living situation" + }, + "pointOfContact": "John Doe", + "pointOfContactNumber": { + "telephone": "5555555555" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "NO" + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "Other locations served", + "serviceDates": { + "beginDate": "1972-05", + "endDate": "1980-10" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "OTHER" + ], + "specifyOtherExposures": "Agent Orange", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1980-10" + } + }, + "multipleExposures": [ + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1973-01" + } + }, + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1979-04", + "endDate": "1980-10" + } + } + ] + }, + "disabilities": [ + { + "name": "Diabetes", + "exposureOrEventOrInjury": "Agent Orange", + "serviceRelevance": "Service in Vietnam War", + "approximateDate": "1975-05", + "disabilityActionType": "NEW", + "isRelatedToToxicExposure": true + }, + { + "name": "Hearing Loss", + "exposureOrEventOrInjury": "Noise", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "1968-07", + "disabilityActionType": "INCREASE", + "classificationCode": "8987", + "ratedDisabilityId": "1234567", + "diagnosticCode": 5678, + "isRelatedToToxicExposure": false + } + ], + "treatments": [ + { + "beginDate": "2021-04", + "treatedDisabilityNames": [ + "Diabetes" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + }, + { + "beginDate": "1996-03", + "treatedDisabilityNames": [ + "Hearing Loss" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "Jon Doe", + "Jane Doe" + ], + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "1964-11-14", + "activeDutyEndDate": "1980-10-30", + "separationLocationCode": "98289" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "1990-11-24", + "endDate": "1995-11-17" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 Main Street", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "confinements": [ + { + "approximateBeginDate": "1970-06-11", + "approximateEndDate": "1970-09-11" + } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", + "militaryRetiredPay": { + "branchOfService": "Air Force", + "monthlyAmount": 240 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "YES", + "separationSeverancePay": { + "datePaymentReceived": "2018-07-31", + "branchOfService": "Air Force", + "preTaxAmountReceived": 179 + }, + "favorTrainingPay": false + }, + "directDeposit": { + "accountNumber": "123123123123", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123456789" + }, + "claimantCertification": true + } + } + } + }, + "examples": { + "Minimum Required Attributes": { + "value": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "veteranIdentification": { + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "city": "Portland", + "state": "OR", + "country": "USA", + "zipFirstFive": "12345" + }, + "currentVaEmployee": false + }, + "disabilities": [ + { + "name": "hearing loss", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "2017-07", + "disabilityActionType": "NEW" + } + ], + "serviceInformation": { + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "2015-11-14", + "activeDutyEndDate": "2018-11-30" + } + ] + }, + "claimantCertification": true + } + } + } + }, + "Maximum Attributes": { + "value": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + }, + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" + ], + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" } } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true } - } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2023-10-30" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" + } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true } } } }, - "example": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" + "Transaction ID": { + "value": { + "meta": { + "transactionId": "00000000-0000-0000-0000-000000000000" + }, + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + }, + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", "city": "Schenectady", "state": "NY", "country": "USA", "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" - } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" } }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" } }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" + ], + "specifyOtherExposures": "Other exposure details", "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" + "beginDate": "2018-07", + "endDate": "2018-08" } }, + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" + } + } + ] + }, + "disabilities": [ { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] + }, + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" } } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2024-12-18", + "separationLocationCode": "98282" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" + }, + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" + } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" }, - { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } + "claimantCertification": true + } + } + } + } + } + } + } + } + } + }, + "/veterans/{veteranId}/526/validate": { + "post": { + "summary": "Validates a 526 claim form submission.", + "tags": [ + "Disability Compensation Claims" + ], + "operationId": "post526ClaimValidate", + "security": [ + { + "productionOauth": [ + "system/claim.read", + "system/claim.write" + ] + }, + { + "sandboxOauth": [ + "system/claim.read", + "system/claim.write" + ] + }, + { + "bearer_token": [] + } + ], + "description": "Validates a request for a disability compensation claim submission (21-526EZ).\nThis endpoint can be used to test the request parameters for your /526 submission.\n", + "parameters": [ + { + "name": "veteranId", + "in": "path", + "required": true, + "example": "1012667145V762142", + "description": "ID of Veteran", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response with disability", + "content": { + "application/json": { + "example": { + "data": { + "type": "claims_api_auto_established_claim_validation", + "attributes": { + "status": "valid" + } + } + }, + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "attributes" ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } + "properties": { + "type": { + "type": "string" }, - { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" + "attributes": { + "type": "object", + "additionalProperties": false, + "required": [ + "status" ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" + "properties": { + "status": { + "type": "string", + "enum": [ + "valid" + ], + "description": "Return whether or not whether or not the payload is valid" + } } } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "errors": [ + { + "title": "Not authorized", + "status": "401", + "detail": "Not authorized" + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" + "detail": { + "type": "string", + "description": "HTTP error detail" }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" + "status": { + "type": "string", + "description": "HTTP error status code" + }, + "source": { + "type": "object", + "additionalProperties": false, + "description": "Source of error", + "properties": { + "pointer": { + "type": "string", + "description": "Pointer to source of error" + } + } } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "example": { + "errors": [ + { + "status": "404", + "title": "Resource not found", + "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" + ], + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" + }, + "detail": { + "type": "string", + "description": "HTTP error detail" + }, + "status": { + "type": "string", + "description": "HTTP error status code" + } + } + } } } } } } }, - "required": true - } - } - }, - "/veterans/{veteranId}/526/{id}/attachments": { - "post": { - "summary": "Upload documents supporting a 526 claim", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "upload526Attachments", - "security": [ - { - "productionOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Uploads supporting documents related to a disability compensation claim. This endpoint accepts a document binary PDF as part of a multi-part payload.\n", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "description": "UUID given when Disability Claim was submitted", - "schema": { - "type": "string" - } - }, - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "upload response", + "422": { + "description": "Unprocessable entity", "content": { "application/json": { "example": { - "data": { - "id": "f5fb6b0d-317d-46b8-8c50-e533bfccc159", - "type": "forms/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + "errors": [ + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key claimProcessType", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key disabilities", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key serviceInformation", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key veteranIdentification", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "status", + "detail" + ], + "properties": { + "status": { + "type": "string", + "description": "HTTP error code" + }, + "detail": { + "type": "string", + "description": "HTTP error detail" + }, + "source": { + "type": "object", + "pointer": { + "type": "string" } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" + }, + "title": { + "type": "string" } } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30", - "separationLocationCode": "98282" - } + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "attributes", + null + ], + "properties": { + "attributes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "claimantCertification", + "claimProcessType", + "disabilities", + "serviceInformation", + "veteranIdentification" ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" + "properties": { + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" + ] }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": [ + "mailingAddress", + "currentVaEmployee" + ], + "properties": { + "serviceNumber": { + "type": "string", + "description": "Service identification number", + "maxLength": 1000, + "nullable": true + }, + "veteranNumber": { + "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", + "type": "object", + "nullable": true, + "properties": { + "telephone": { + "description": "Veteran's phone number.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555555", + "nullable": true + }, + "internationalTelephone": { + "type": "string", + "description": "Veteran's international phone number.", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + }, + "mailingAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "addressLine1", + "city", + "country" + ], + "properties": { + "addressLine1": { + "description": "Address line 1 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 1, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789", + "nullable": true + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + } + } + }, + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", + "nullable": true, + "properties": { + "email": { + "type": "string", + "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", + "description": "The most current email address of the Veteran.", + "maxLength": 80, + "nullable": true + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true, + "default": false, + "nullable": true + } + } + }, + "currentVaEmployee": { + "type": "boolean", + "description": "Set to true if Veteran is a VA employee.", + "nullable": false + } + } + }, + "changeOfAddress": { + "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" + }, + "addressLine1": { + "description": "Address line 1 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 0, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's new address.", + "type": "string", + "nullable": true, + "pattern": "^$|^\\d{4}?$", + "example": "6789" + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + }, + "dates": { + "type": "object", + "properties": { + "beginDate": { + "description": "Begin date for the Veteran's new address.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "nullable": true, + "example": "2018-06-04" + }, + "endDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" + } + } + } + } }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2025-10-31" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" + "homeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "isCurrentlyHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently homeless?" + }, + "currentlyHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "homelessSituationOptions": { + "description": "Veteran's living situation.", + "type": "string", + "nullable": true, + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "isAtRiskOfBecomingHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently at risk of becoming homeless?" + }, + "riskOfBecomingHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "livingSituationOptions": { + "type": "string", + "nullable": true, + "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "enum": [ + "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", + "OTHER" + ] + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "pointOfContact": { + "description": "Individual in direct contact with Veteran.", + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "telephone": { + "description": "Ten digit primary phone of point of contact.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555", + "nullable": true + }, + "internationalTelephone": { + "description": "International phone of point of contact.", + "type": "string", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + } + } }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - }, - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "description": "Internal vets-api Claim ID" - }, - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "additionalProperties": false, - "required": [ - "claimProcessType", - "veteranIdentification", - "disabilities", - "serviceInformation", - "claimantCertification" - ], - "properties": { - "claimProcessType": { - "type": "string" - }, - "veteranIdentification": { - "type": "object", - "properties": { - "serviceNumber": { - "type": "string" - }, - "veteranNumber": { - "type": "object", - "properties": { - "telephone": { - "type": "string" - }, - "internationalTelephone": { - "type": "string" + "toxicExposure": { + "type": "object", + "nullable": true, + "properties": { + "gulfWarHazardService": { + "type": "object", + "nullable": true, + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "serviceDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "herbicideHazardService": { + "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", + "type": "object", + "nullable": true, + "properties": { + "servedInHerbicideHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "otherLocationsServed": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "description": "Date range for exposure in herbicide hazard location.", + "type": "object", + "nullable": true, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } } } - }, - "currentVaEmployee": { - "type": "boolean" - }, - "mailingAddress": { - "type": "object", - "properties": { - "addressLine1": { - "type": "string" - }, - "addressLine2": { - "type": "string" - }, - "addressLine3": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string" - }, - "zipFirstFive": { - "type": "string" - }, - "zipLastFour": { - "type": "string" + } + }, + "additionalHazardExposures": { + "type": "object", + "nullable": true, + "description": "Additional hazardous exposures.", + "properties": { + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHIPBOARD_HAZARD_AND_DEFENSE", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] + } + }, + "specifyOtherExposures": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Exposure to asbestos." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } } } - }, - "emailAddress": { + } + }, + "multipleExposures": { + "type": "array", + "nullable": true, + "minItems": 1, + "uniqueItems": true, + "items": { "type": "object", + "additionalProperties": false, "properties": { - "email": { - "type": "string" + "hazardExposedTo": { + "type": "string", + "nullable": true, + "pattern": "^([-a-zA-Z0-9'.,&# ])+$", + "maxLength": 1000, + "description": "Hazard the Veteran was exposed to." }, - "agreeToEmailRelatedToClaim": { - "type": "boolean" + "exposureLocation": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 1000, + "description": "Location where the exposure happened." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } } } } } - }, - "changeOfAddress": { + } + }, + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "items": { "type": "object", + "additionalProperties": false, + "required": [ + "disabilityActionType", + "name" + ], "properties": { - "typeOfAddressChange": { - "type": "string" + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 }, - "addressLine1": { - "type": "string" + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] }, - "addressLine2": { - "type": "string" + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." }, - "addressLine3": { - "type": "string" + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true }, - "city": { - "type": "string" + "disabilityActionType": { + "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", + "type": "string", + "enum": [ + "NONE", + "NEW", + "INCREASE" + ], + "example": "NEW" }, - "state": { - "type": "string" + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true }, - "country": { - "type": "string" + "ratedDisabilityId": { + "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", + "type": "string", + "example": "1100583", + "nullable": true }, - "zipFirstFive": { - "type": "string" + "diagnosticCode": { + "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", + "type": "integer", + "example": 9999, + "nullable": true }, - "zipLastFour": { - "type": "string" + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", + "example": true, + "default": false, + "nullable": true }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } + "specialIssues": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "maxItems": 2, + "additionalProperties": false, + "type": "string", + "enum": [ + "POW", + "EMP" + ] } - } - } - }, - "homeless": { - "type": "object", - "properties": { - "currentlyHomeless": { - "type": "object", - "properties": { - "currentlyHomeless": { - "type": "object", - "properties": { - "homelessSituationOptions": { - "type": "string" - }, - "otherDescription": { - "type": "string" - } + }, + "secondaryDisabilities": { + "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "example": "SECONDARY", + "enum": [ + "SECONDARY" + ] + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true } } } - }, - "pointOfContact": { - "type": "string" - }, - "pointOfContactNumber": { - "type": "object", - "properties": { - "telephone": { - "type": "string" - }, - "internationalTelephone": { - "type": "string" - } - } } } - }, - "toxicExposure": { + } + }, + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { "type": "object", + "additionalProperties": false, "properties": { - "gulfWarHazardService": { - "type": "object", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string" - }, - "serviceDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } - } + "beginDate": { + "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", + "type": "string", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018", + "nullable": true }, - "herbicideHazardService": { - "type": "object", - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string" - }, - "otherLocationsServed": { - "type": "string" - }, - "serviceDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } + "treatedDisabilityNames": { + "description": "Name(s) of disabilities treated in this time frame.", + "type": "array", + "nullable": true, + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": [ + "PTSD (post traumatic stress disorder)", + "Trauma" + ] } }, - "additionalHazardExposures": { + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "additionalExposures": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "nullable": true, + "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 }, - "specifyOtherExposures": { - "type": "string" + "city": { + "description": "City of treatment facility.", + "type": "string", + "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", + "example": "Portland", + "nullable": true, + "minLength": 0, + "maxLength": 30 }, - "exposureDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hazardExposedTo": { - "type": "string" - }, - "exposureLocation": { - "type": "string" - }, - "exposureDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "OR", + "nullable": true } } } } - }, - "disabilities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "exposureOrEventOrInjury": { - "type": "string" - }, - "serviceRelevance": { - "type": "string" - }, - "approximateDate": { - "type": "string" - }, - "disabilityActionType": { - "type": "string" - }, - "classificationCode": { - "type": "string" - }, - "ratedDisabilityId": { - "type": "string" - }, - "diagnosticCode": { - "type": "integer" - }, - "isRelatedToToxicExposure": { - "type": "boolean" - }, - "secondaryDisabilities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "exposureOrEventOrInjury": { - "type": "string" - }, - "serviceRelevance": { - "type": "string" - }, - "disabilityActionType": { - "type": "string" - }, - "approximateDate": { - "type": "string" - }, - "classificationCode": { - "type": "string" - } - } + } + }, + "serviceInformation": { + "type": "object", + "additionalProperties": false, + "required": [ + "servicePeriods" + ], + "properties": { + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "nullable": true, + "maxItems": 100, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "examples": [ + "jane", + "janey lee", + "jane lee MacDonald" + ] + } + }, + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "serviceBranch", + "serviceComponent", + "activeDutyBeginDate", + "activeDutyEndDate" + ], + "properties": { + "serviceBranch": { + "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "example": "Air Force" + }, + "serviceComponent": { + "type": "string", + "description": "", + "enum": [ + "Active", + "Reserves", + "National Guard" + ] + }, + "activeDutyBeginDate": { + "description": "Date started active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "activeDutyEndDate": { + "description": "Date completed active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "nullable": true, + "example": "98283" } } } - } - }, - "treatments": { - "type": "array", - "items": { + }, + "servedInActiveCombatSince911": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": "YES", + "nullable": true + }, + "reservesNationalGuardService": { "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "beginDate": { - "type": "string" - }, - "treatedDisabilityNames": { - "type": "array", - "items": { - "type": "string" - } + "component": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "Reserves", + "National Guard" + ] }, - "center": { + "obligationTermsOfService": { "type": "object", + "nullable": true, + "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", + "additionalProperties": false, "properties": { - "name": { - "type": "string" - }, - "city": { - "type": "string" + "beginDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" }, - "state": { - "type": "string" + "endDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" } } - } - } - } - }, - "serviceInformation": { - "type": "object", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "servicePeriods": { - "type": "array", - "items": { + }, + "unitName": { + "type": "string", + "nullable": true, + "maxLength": 1000, + "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" + }, + "unitAddress": { + "type": "string", + "maxLength": 1000, + "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", + "nullable": true + }, + "unitPhone": { "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "serviceBranch": { - "type": "string" - }, - "serviceComponent": { - "type": "string" - }, - "activeDutyBeginDate": { - "type": "string" - }, - "activeDutyEndDate": { - "type": "string" + "areaCode": { + "type": "string", + "nullable": true, + "maxLength": 3, + "pattern": "^$|^\\d{3}$", + "example": "555" }, - "separationLocationCode": { - "type": "string" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string" - }, - "reservesNationalGuardService": { - "type": "object", - "properties": { - "component": { - "type": "string" - }, - "obligationTermsOfService": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - }, - "unitName": { - "type": "string" - }, - "unitAddress": { - "type": "string" - }, - "unitPhone": { - "type": "object", - "properties": { - "areaCode": { - "type": "string" - }, - "phoneNumber": { - "type": "string" - } + "phoneNumber": { + "type": "string", + "nullable": true, + "maxLength": 20, + "example": "5555555" } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string" } + }, + "receivingInactiveDutyTrainingPay": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "nullable": true, + "example": "YES" } - }, - "federalActivation": { - "type": "object", - "properties": { - "activationDate": { - "type": "string" - }, - "anticipatedSeparationDate": { - "type": "string" - } + } + }, + "federalActivation": { + "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "activationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + }, + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true } } }, "confinements": { "type": "array", + "nullable": true, + "uniqueItems": true, "items": { + "additionalProperties": false, "type": "object", "properties": { "approximateBeginDate": { - "type": "string" + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" }, "approximateEndDate": { - "type": "string" + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" } } } - } - }, - "servicePay": { - "type": "object", - "properties": { - "receivingMilitaryRetiredPay": { - "type": "string" - }, - "futureMilitaryRetiredPay": { - "type": "string" - }, - "futureMilitaryRetiredPayExplanation": { - "type": "string" - }, - "militaryRetiredPay": { - "type": "object", - "properties": { - "branchOfService": { - "type": "string" - }, - "monthlyAmount": { - "type": "integer" - } - } - }, - "retiredStatus": { - "type": "string" - }, - "favorMilitaryRetiredPay": { - "type": "boolean" - }, - "receivedSeparationOrSeverancePay": { - "type": "string" - }, - "separationSeverancePay": { - "type": "object", - "properties": { - "datePaymentReceived": { - "type": "string" - }, - "branchOfService": { - "type": "string" - }, - "preTaxAmountReceived": { - "type": "integer" - } + } + } + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } + } + }, + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 } - }, - "favorTrainingPay": { - "type": "boolean" } + }, + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "nullable": true, + "example": true, + "default": false } - }, - "directDeposit": { - "type": "object", - "properties": { - "noAccount": { - "type": "boolean" - }, - "accountNumber": { - "type": "string" - }, - "accountType": { - "type": "string" - }, - "financialInstitutionName": { - "type": "string" - }, - "routingNumber": { - "type": "string" - } + } + }, + "directDeposit": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "properties": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" } - }, - "claimantCertification": { - "type": "boolean" - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 } + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { + "type": "string", + "description": "An optional notes section.", + "maxLength": 4000 + } + } + } + } + } + }, + "example": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555" + }, + "mailingAddress": { + "addressLine1": "123 Main Street", + "addressLine2": "Unit 1", + "addressLine3": "Room 2", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "456 Main Street", + "addressLine2": "Unit 3", + "addressLine3": "Room 4", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2025-06-04", + "endDate": "2026-06-04" + } + }, + "homeless": { + "currentlyHomeless": { + "homelessSituationOptions": "OTHER", + "otherDescription": "Other living situation" + }, + "pointOfContact": "John Doe", + "pointOfContactNumber": { + "telephone": "5555555555" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "NO" + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "Other locations served", + "serviceDates": { + "beginDate": "1972-05", + "endDate": "1980-10" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "OTHER" + ], + "specifyOtherExposures": "Agent Orange", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1980-10" } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" + }, + "multipleExposures": [ + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1973-01" + } }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1979-04", + "endDate": "1980-10" } } + ] + }, + "disabilities": [ + { + "name": "Diabetes", + "exposureOrEventOrInjury": "Agent Orange", + "serviceRelevance": "Service in Vietnam War", + "approximateDate": "1975-05", + "disabilityActionType": "NEW", + "isRelatedToToxicExposure": true + }, + { + "name": "Hearing Loss", + "exposureOrEventOrInjury": "Noise", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "1968-07", + "disabilityActionType": "INCREASE", + "classificationCode": "8987", + "ratedDisabilityId": "1234567", + "diagnosticCode": 5678, + "isRelatedToToxicExposure": false } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Resource not found" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" + ], + "treatments": [ + { + "beginDate": "2021-04", + "treatedDisabilityNames": [ + "Diabetes" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + }, + { + "beginDate": "1996-03", + "treatedDisabilityNames": [ + "Hearing Loss" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "Jon Doe", + "Jane Doe" ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "1964-11-14", + "activeDutyEndDate": "1980-10-30", + "separationLocationCode": "98289" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "1990-11-24", + "endDate": "1995-11-17" }, - "detail": { - "type": "string", - "description": "HTTP error detail" + "unitName": "National Guard Unit Name", + "unitAddress": "1243 Main Street", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" }, - "status": { - "type": "string", - "description": "HTTP error status code" + "receivingInactiveDutyTrainingPay": "YES" + }, + "confinements": [ + { + "approximateBeginDate": "1970-06-11", + "approximateEndDate": "1970-09-11" } - } - } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", + "militaryRetiredPay": { + "branchOfService": "Air Force", + "monthlyAmount": 240 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "YES", + "separationSeverancePay": { + "datePaymentReceived": "2018-07-31", + "branchOfService": "Air Force", + "preTaxAmountReceived": 179 + }, + "favorTrainingPay": false + }, + "directDeposit": { + "accountNumber": "123123123123", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123456789" + }, + "claimantCertification": true } } } } } - } - }, - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "attachment1": { - "type": "file", - "description": "Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in.\n" - }, - "attachment2": { - "type": "file", - "description": "Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in.\n" - } - } - } - } - } + }, + "required": true } } }, @@ -10764,9 +6442,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -12276,9 +7952,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -12551,9 +8225,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Retrieves a specific claim for a Veteran", @@ -12634,9 +8306,7 @@ "documentsNeeded": false, "endProductCode": "404", "evidenceWaiverSubmitted5103": false, - "errors": [ - - ], + "errors": [], "jurisdiction": "National Work Queue", "lighthouseId": null, "maxEstClaimDate": null, @@ -12644,9 +8314,7 @@ "status": "CANCELED", "submitterApplicationCode": "EBN", "submitterRoleCode": "VET", - "supportingDocuments": [ - - ], + "supportingDocuments": [], "tempJurisdiction": null, "trackedItems": [ { @@ -12736,13 +8404,9 @@ "status": "ERRORED", "submitterApplicationCode": null, "submitterRoleCode": null, - "supportingDocuments": [ - - ], + "supportingDocuments": [], "tempJurisdiction": null, - "trackedItems": [ - - ] + "trackedItems": [] } } } @@ -13147,9 +8811,7 @@ "decision_notification_sent": "No", "development_letter_sent": "No", "end_prdct_type_cd": "404", - "errors": [ - - ], + "errors": [], "poa": "RANDOM E PERSON", "program_type": "CPL", "ptcpnt_clmant_id": "111111111", @@ -13308,9 +8970,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Returns Veteran's last active Intent to File submission for given benefit type of compensation, pension, or survivor.", @@ -13552,9 +9212,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Establishes an Intent to File for disability compensation, pension, and survivor claims.", @@ -13580,8 +9238,8 @@ "id": "1", "type": "intent_to_file", "attributes": { - "creationDate": "2024-12-04", - "expirationDate": "2025-12-04", + "creationDate": "2024-12-16", + "expirationDate": "2025-12-16", "type": "compensation", "status": "active" } @@ -13899,9 +9557,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Validates an Intent to File for disability compensation, pension, and survivor claims.", @@ -14163,9 +9819,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Retrieves current Power of Attorney for Veteran or empty data if no POA is assigned.", @@ -14452,9 +10106,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -14477,7 +10129,7 @@ "application/json": { "example": { "data": { - "id": "19edfa42-b627-4d9e-afe5-cc26a03e1c32", + "id": "8ecf04c6-588d-4d57-bd41-4ae0c54c7576", "type": "individual", "attributes": { "code": "067", @@ -15227,9 +10879,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -15251,7 +10901,7 @@ "application/json": { "example": { "data": { - "id": "cb3310b8-55cd-49db-8577-575ca8a94b1c", + "id": "c0ca13ea-5360-4b41-a8af-8f89a181c023", "type": "organization", "attributes": { "code": "083", @@ -15910,9 +11560,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -16596,9 +12244,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -17217,9 +12863,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -17251,10 +12895,10 @@ "application/json": { "example": { "data": { - "id": "610d2a9f-38c7-4a47-b29b-cb81ddc62a11", + "id": "18158bc1-2245-4262-a9a9-d955b93b40ea", "type": "claimsApiPowerOfAttorneys", "attributes": { - "dateRequestAccepted": "2024-12-04", + "dateRequestAccepted": "2024-12-16", "previousPoa": null, "representative": { "serviceOrganization": { @@ -17489,9 +13133,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -17546,7 +13188,7 @@ "HIV", "ALCOHOLISM" ], - "id": "12e13134-7229-4e44-90ae-bcea2a4525fa", + "id": "96fc2003-9ded-4a64-a7f2-798f3d018746", "type": "power-of-attorney-request" } } diff --git a/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json b/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json index 686a4ce3e30..e03ff977473 100644 --- a/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v2/production/swagger.json @@ -3,13 +3,9 @@ "info": { "title": "Benefits Claims", "version": "v2", - "description": "## Background\n\nThe Benefits Claims API Version 2 lets internal consumers: \n\n- Retrieve existing claim information, including status, by claim ID.\n- Automatically establish an Intent To File (21-0966) in VBMS.\n- Automatically establish a disability compensation claim (21-526EZ) in VBMS.\n- Digitally submit supporting documentation for disability compensation claims.\n- Retrieve the active Power of Attorney organization of individual with power of attorney for a claimant.\n- Automatically establish a power of attorney appointment in VBMS for an accredited organization (VA Form 21-22).\n- Automatically establish a power of attorney appointment in VBMS for an accredited individual (VA Form 21-22a).\n\nYou should use the [Benefits Claims API Version 1](https://developer.va.gov/explore/benefits/docs/claims?version=current) if you are a consumer outside of VA and do not have the necessary VA agreements to use this API.\n \n## Appointing an accredited representative for dependents\n\nDependents of Veterans, such as spouses, children (biological and step), and parents (biological and foster) may be eligible for VA benefits and can request representation by an accredited representative.\n\nTo file claims through an accredited representative, dependents must appoint their own. Once appointed, the representative will have power of attorney (POA) to assist with the dependentʼs VA claims.\n\nBefore appointing a representative, the dependentʼs relationship to the Veteran must be established. If a new representative is being appointed, the dependentʼs relationship to the Veteran will be validated first. The representative will be appointed to the dependent, not the Veteran.\n\n## Technical Overview\n\nThis API accepts a payload of requests and responses with the payload identifying the claim and Veteran. Responses provide the submission’s processing status. Responses also provide a unique ID which can be used with the appropriate GET endpoint to return detailed, end-to-end claims status tracking. \n\nEnd-to-end claims tracking provides the status of claims as they move through the submission process, but does not return whether the claim was approved or denied. \n\n### Claim statuses\n\nClaims are first submitted by this API and then established in Veterans Benefits Management System (VBMS). A 200 response means that the claim was successfully submitted by the API. It does not mean VA has received the claim. Use the appropriate GET endpoint and the ID returned with your submission response to confirm the status of the submission. Statuses are:\n\n- Pending - the claim is successfully submitted for processing\n- Errored - the submission encountered upstream errors\n- Canceled - the claim was identified as a duplicate or another issue caused the claim to be canceled. For duplicate claims, the tracking of the claim's progress happens under a different Claim ID . \n\nOther statuses this API returns align with the [VA.gov](http://va.gov/) [claim status descriptions](https://www.va.gov/resources/what-your-claim-status-means/), which are:\n\n- Claim received\n- Initial review\n- Evidence gathering, review, and decision\n- Preparation for notification\n- Complete\n\n### Finding a Veteran's unique VA ID\n\nThis API uses a unique Veteran identifier to identify the subject of each API request. This Veteran identifier can be retrieved by passing the Veteran’s first name, last name, DOB, and SSN to the ‘/veteran-id’ endpoint. This identifier should then be used as the Veteran ID parameter in request URLs.\n\nNote: though Veteran identifiers are typically static, they may change over time. If a specific Veteran ID suddenly responds with a ‘404 not found’ error, the identifier may have changed. It’s a good idea to periodically check the identifier for each Veteran.\n\n### Authentication and authorization\n\nThe authentication model for the Benefits Claims Version 2 is based on OAuth 2.0 / OpenID Connect and supports the [client credentials grant](https://developer.va.gov/explore/authorization/docs/client-credentials?api=claims).\n\n**Important**: To get production access, you must either work for VA or have specific VA agreements in place. If you have questions, [contact us](https://developer.va.gov/support/contact-us).\n\n### Test data for sandbox environment use\n\nWe use mock [test data in the sandbox environment](https://github.com/department-of-veterans-affairs/vets-api-clients/blob/master/test_accounts.md). Sandbox test data and test users for the Benefits Claims API are valid for all versions of the API.\n" + "description": "## Background\n\nThe Benefits Claims API Version 2 lets internal consumers: \n\n- Retrieve existing claim information, including status, by claim ID.\n- Automatically establish an Intent To File (21-0966) in VBMS.\n- Automatically establish a disability compensation claim (21-526EZ) in VBMS.\n- Digitally submit supporting documentation for disability compensation claims.\n- Retrieve the active Power of Attorney organization of individual with power of attorney for a claimant.\n- Automatically establish a power of attorney appointment in VBMS for an accredited organization (VA Form 21-22).\n- Automatically establish a power of attorney appointment in VBMS for an accredited individual (VA Form 21-22a).\n\nYou should use the [Benefits Claims API Version 1](https://developer.va.gov/explore/benefits/docs/claims?version=current) if you are a consumer outside of VA and do not have the necessary VA agreements to use this API.\n \n## Appointing an accredited representative for dependents\n\nDependents of Veterans, such as spouses, children (biological and step), and parents (biological and foster) may be eligible for VA benefits and can request representation by an accredited representative.\n\nTo file claims through an accredited representative, dependents must appoint their own. Once appointed, the representative will have power of attorney (POA) to assist with the dependentʼs VA claims.\n\nBefore appointing a representative, the dependentʼs relationship to the Veteran must be established. If a new representative is being appointed, the dependentʼs relationship to the Veteran will be validated first. The representative will be appointed to the dependent, not the Veteran.\n\n## Technical Overview\n\nThis API accepts a payload of requests and responses with the payload identifying the claim and Veteran. Responses provide the submission’s processing status. Responses also provide a unique ID which can be used with the appropriate GET endpoint to return detailed, end-to-end claims status tracking. \n\nEnd-to-end claims tracking provides the status of claims as they move through the submission process, but does not return whether the claim was approved or denied. \n\n### Claim statuses\n\nAfter you submit a disability compensation claim with the `POST /veterans/{veteranId}/526/synchronous` endpoint, it is then established in Veterans Benefits Management System (VBMS). A `202` response means that the claim was successfully submitted by the API. However, it does not mean VA has received the required 526EZ PDF. \n\nTo confirm the status of your submission, use the `GET /veterans/{veteranId}/claims/{id}` endpoint and the ID returned with your submission response. Statuses are: \n\n* **Pending**: The claim is successfully submitted for processing\n* **Errored**: The submission encountered upstream errors\n* **Canceled**: The claim was identified as a duplicate, or another issue caused the claim to be canceled. \n * For duplicate claims, the claim's progress is tracked under a different Claim ID than the one returned in your submission response. \n* **Claim received**: The claim was received, but hasn't been assigned to a reviewer yet.\n* **Initial review**: The claim has been assigned to a reviewer, who will determine if more information is needed.\n* **Evidence gathering, review, and decision**: VA is gathering evidence to make a decision from health care providers, government agencies, and other sources.\n* **Preparation for notification**: VA has made a decision on the claim, and is getting a decision letter ready to mail.\n* **Complete**: VA has sent a decision letter by U.S. mail.\n\n### Finding a Veteran's unique VA ID\n\nThis API uses Inegration Control Number (ICN) as a unique Veteran identifier to identify the subject of each API request. This identifier should be used as the `{veteranId}` parameter in request URLs.\n\n**Note**: though ICNs are typically static, they may change over time. If a specific ICN suddenly responds with a `404 not found` error, it may have changed. It’s a good idea to periodically check the ICN for each Veteran.\n\n### Authentication and authorization\n\nThe authentication model for the Benefits Claims Version 2 is based on OAuth 2.0 / OpenID Connect and supports the [client credentials grant](https://developer.va.gov/explore/authorization/docs/client-credentials?api=claims).\n\n**Important**: To get production access, you must either work for VA or have specific VA agreements in place. If you have questions, [contact us](https://developer.va.gov/support/contact-us).\n\n### Test data for sandbox environment use\n\nWe use mock [test data in the sandbox environment](https://github.com/department-of-veterans-affairs/vets-api-clients/blob/master/test_accounts.md). Sandbox test data and test users for the Benefits Claims API are valid for all versions of the API.\n" }, "tags": [ - { - "name": "Veteran Identifier", - "description": "Allows authenticated veterans and veteran representatives to retrieve a veteran's id." - }, { "name": "Claims", "description": "Allows authenticated and authorized users to access claims data for a given Veteran. No data is returned if the user is not authenticated and authorized.\n" @@ -69,272 +65,6 @@ } }, "paths": { - "/veteran-id:find": { - "post": { - "summary": "Retrieve Veteran ID.", - "tags": [ - "Veteran Identifier" - ], - "operationId": "postVeteranId", - "security": [ - { - "productionOauth": [ - "system/claim.read" - ] - }, - { - "sandboxOauth": [ - "system/claim.read" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Allows authenticated and authorized users to retrieve a Veteran's ID.", - "parameters": [ - - ], - "responses": { - "201": { - "description": "Veteran's unique identifier", - "content": { - "application/json": { - "example": { - "id": "1012667145V762142" - }, - "schema": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "example": "1012667145V762142" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "invalid value for SSN", - "detail": "blank is not valid for SSN" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Resource not found", - "detail": "Resource not found" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ssn", - "birthdate", - "firstName", - "lastName" - ], - "properties": { - "ssn": { - "type": "string", - "example": "796130115", - "description": "SSN of Veteran being represented" - }, - "firstName": { - "type": "string", - "example": "Tamara", - "description": "First name of Veteran being represented" - }, - "lastName": { - "type": "string", - "example": "Ellis", - "description": "Last name of Veteran being represented" - }, - "birthdate": { - "type": "string", - "example": "1967-06-19", - "description": "Date of birth of Veteran being represented, in ISO8601 format" - } - }, - "example": { - "ssn": "796130115", - "firstName": "Tamara", - "lastName": "Ellis", - "birthdate": "1967-06-19" - } - } - } - }, - "required": true - } - } - }, "/veterans/{veteranId}/claims/{id}/5103": { "post": { "summary": "Submit Evidence Waiver 5103", @@ -354,9 +84,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Submit Evidence Waiver 5103 for Veteran.", @@ -566,33 +294,26 @@ } } }, - "/veterans/{veteranId}/526": { + "/veterans/{veteranId}/526/synchronous": { "post": { - "summary": "Asynchronously establishes disability compensation claim", + "summary": "Submits disability compensation claim synchronously (restricted access)", "tags": [ "Disability Compensation Claims" ], - "operationId": "post526Claim", + "operationId": "post526ClaimSynchronous", "security": [ { "productionOauth": [ - "system/claim.read", - "system/claim.write" + "system/526.override" ] }, { "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - + "system/526.override" ] } ], - "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). \nThis endpoint generates a filled and electronically signed 526EZ form, establishes the disability claim in VBMS, and \nsubmits the form to the Veteran's eFolder.\n\nA 202 response indicates the API submission was accepted. The claim has not reached VBMS until it has a CLAIM_RECEIVED status. \nCheck claim status using the GET veterans/{veteranId}/claims/{id} endpoint.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", + "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). This endpoint synchronously generates a filled and electronically signed 526EZ form and establishes the disability claim in VBMS. The 526EZ form is uploaded asynchronously.\n\nA 202 response indicates the API submission was accepted and the claim was established in VBMS. Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. The claim status details response will return the associated 526EZ PDF in the supportingDocuments list.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", "parameters": [ { "name": "veteranId", @@ -610,1935 +331,972 @@ "description": "Successful response", "content": { "application/json": { - "schema": { - "name": "data", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" - }, - "type": { - "type": "string", - "example": "form/526" - }, + "examples": { + "202 without a transactionId": { + "value": { + "data": { + "id": "75be0d19-4649-4b81-a06c-b99e6b176e7f", + "type": "forms/526", "attributes": { - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] + "claimId": "600442191", + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" } } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" } - } + ] }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2023-10-30", + "separationLocationCode": "98282" } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true + } + } + } + }, + "202 with a transactionId": { + "value": { + "data": { + "id": "f2c7cfd4-277b-4537-9b8d-ea53024b111e", + "type": "forms/526", + "attributes": { + "claimId": "600442191", + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + }, + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" + ], + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" + } + } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true }, - "claimId": { - "type": "string", - "example": "600517517" + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" } } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2024-12-18", + "separationLocationCode": "98282" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" + }, + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" + } + ] }, - "detail": { - "type": "string", - "description": "HTTP error detail" + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 + }, + "favorTrainingPay": true }, - "status": { - "type": "string", - "description": "HTTP error status code" - } + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true } + }, + "meta": { + "transactionId": "00000000-0000-0000-0000-000000000000" } } } - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "examples": { - "Violates JSON Schema": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - } - ] - } - }, - "Not a JSON Object": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "status": "422", - "detail": "The request body is not a valid JSON object: This is not valid JSON", - "source": { - "pointer": null - } - } - ] - } - } }, "schema": { + "name": "data", "required": [ - "errors" + "data" ], "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "status", - "detail" - ], - "properties": { - "status": { - "type": "string", - "description": "HTTP error code" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "source": { - "type": "object", - "pointer": { - "type": "string" - } - }, - "title": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "attributes", - null - ], - "properties": { - "attributes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" - ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true + "data": { + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "properties": { + "id": { + "type": "string", + "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" + }, + "type": { + "type": "string", + "example": "form/8675309" + }, + "attributes": { + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "claimantCertification", + "claimProcessType", + "disabilities", + "serviceInformation", + "veteranIdentification" + ], + "properties": { + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" + ] + }, + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": [ + "mailingAddress", + "currentVaEmployee" + ], + "properties": { + "serviceNumber": { + "type": "string", + "description": "Service identification number", + "maxLength": 1000, + "nullable": true + }, + "veteranNumber": { + "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", + "type": "object", + "nullable": true, + "properties": { + "telephone": { + "description": "Veteran's phone number.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555555", + "nullable": true + }, + "internationalTelephone": { + "type": "string", + "description": "Veteran's international phone number.", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + }, + "mailingAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "addressLine1", + "city", + "country" + ], + "properties": { + "addressLine1": { + "description": "Address line 1 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 1, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789", + "nullable": true + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + } } + }, + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", + "nullable": true, + "properties": { + "email": { + "type": "string", + "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", + "description": "The most current email address of the Veteran.", + "maxLength": 80, + "nullable": true + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true, + "default": false, + "nullable": true + } + } + }, + "currentVaEmployee": { + "type": "boolean", + "description": "Set to true if Veteran is a VA employee.", + "nullable": false } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" + } + }, + "changeOfAddress": { + "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" + }, + "addressLine1": { + "description": "Address line 1 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 0, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's new address.", + "type": "string", + "nullable": true, + "pattern": "^$|^\\d{4}?$", + "example": "6789" + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + }, + "dates": { + "type": "object", + "properties": { + "beginDate": { + "description": "Begin date for the Veteran's new address.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "nullable": true, + "example": "2018-06-04" + }, + "endDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" + } } } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true + } + }, + "homeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "isCurrentlyHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently homeless?" + }, + "currentlyHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "homelessSituationOptions": { + "description": "Veteran's living situation.", + "type": "string", + "nullable": true, + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "isAtRiskOfBecomingHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently at risk of becoming homeless?" + }, + "riskOfBecomingHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "livingSituationOptions": { + "type": "string", + "nullable": true, + "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "enum": [ + "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", + "OTHER" + ] + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "pointOfContact": { + "description": "Individual in direct contact with Veteran.", + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "telephone": { + "description": "Ten digit primary phone of point of contact.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555", + "nullable": true + }, + "internationalTelephone": { + "description": "International phone of point of contact.", + "type": "string", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } } } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" + }, + "toxicExposure": { + "type": "object", + "nullable": true, + "properties": { + "gulfWarHazardService": { + "type": "object", + "nullable": true, + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "serviceDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" + }, + "herbicideHazardService": { + "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", + "type": "object", + "nullable": true, + "properties": { + "servedInHerbicideHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "otherLocationsServed": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "description": "Date range for exposure in herbicide hazard location.", + "type": "object", + "nullable": true, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } - } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { + }, + "additionalHazardExposures": { "type": "object", - "additionalProperties": false, + "nullable": true, + "description": "Additional hazardous exposures.", "properties": { - "hazardExposedTo": { - "type": "string", + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHIPBOARD_HAZARD_AND_DEFENSE", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] + } }, - "exposureLocation": { + "specifyOtherExposures": { "type": "string", "nullable": true, "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." + "maxLength": 5000, + "description": "Exposure to asbestos." }, "exposureDates": { "type": "object", @@ -2562,7477 +1320,4405 @@ } } } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", + "multipleExposures": { + "type": "array", "nullable": true, + "minItems": 1, "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { + "hazardExposedTo": { "type": "string", - "description": "What caused the disability?", "nullable": true, + "pattern": "^([-a-zA-Z0-9'.,&# ])+$", "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] + "description": "Hazard the Veteran was exposed to." }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "exposureLocation": { "type": "string", "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true + "description": "Location where the exposure happened." }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } } } } } } - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { + }, + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "disabilityActionType", + "name" + ], + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "disabilityActionType": { + "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", + "type": "string", + "enum": [ + "NONE", + "NEW", + "INCREASE" + ], + "example": "NEW" + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true + }, + "ratedDisabilityId": { + "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", + "type": "string", + "example": "1100583", + "nullable": true + }, + "diagnosticCode": { + "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", + "type": "integer", + "example": 9999, + "nullable": true + }, + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", + "example": true, + "default": false, + "nullable": true + }, + "specialIssues": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "maxItems": 2, + "additionalProperties": false, "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", "enum": [ - "Active", - "Reserves", - "National Guard" + "POW", + "EMP" ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" + } + }, + "secondaryDisabilities": { + "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "example": "SECONDARY", + "enum": [ + "SECONDARY" + ] + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true + } + } } } } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { + } + }, + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { "type": "object", - "nullable": true, "additionalProperties": false, "properties": { - "component": { + "beginDate": { + "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018", + "nullable": true }, - "obligationTermsOfService": { - "type": "object", + "treatedDisabilityNames": { + "description": "Name(s) of disabilities treated in this time frame.", + "type": "array", "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": [ + "PTSD (post traumatic stress disorder)", + "Trauma" + ] } }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", "type": "object", "nullable": true, "additionalProperties": false, "properties": { - "areaCode": { + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", "type": "string", "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" + "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 }, - "phoneNumber": { + "city": { + "description": "City of treatment facility.", "type": "string", + "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", + "example": "Portland", "nullable": true, - "maxLength": 20, - "example": "5555555" + "minLength": 0, + "maxLength": 30 + }, + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "OR", + "nullable": true } } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" } } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", + } + }, + "serviceInformation": { + "type": "object", + "additionalProperties": false, + "required": [ + "servicePeriods" + ], + "properties": { + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "nullable": true, + "maxItems": 100, + "uniqueItems": true, + "items": { "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true + "additionalProperties": false, + "examples": [ + "jane", + "janey lee", + "jane lee MacDonald" + ] } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { + }, + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "serviceBranch", + "serviceComponent", + "activeDutyBeginDate", + "activeDutyEndDate" + ], + "properties": { + "serviceBranch": { + "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "example": "Air Force" + }, + "serviceComponent": { + "type": "string", + "description": "", + "enum": [ + "Active", + "Reserves", + "National Guard" + ] + }, + "activeDutyBeginDate": { + "description": "Date started active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "activeDutyEndDate": { + "description": "Date completed active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "nullable": true, + "example": "98283" + } + } + } + }, + "servedInActiveCombatSince911": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": "YES", + "nullable": true + }, + "reservesNationalGuardService": { + "type": "object", + "nullable": true, "additionalProperties": false, + "properties": { + "component": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "Reserves", + "National Guard" + ] + }, + "obligationTermsOfService": { + "type": "object", + "nullable": true, + "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", + "additionalProperties": false, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "endDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + } + } + }, + "unitName": { + "type": "string", + "nullable": true, + "maxLength": 1000, + "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" + }, + "unitAddress": { + "type": "string", + "maxLength": 1000, + "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", + "nullable": true + }, + "unitPhone": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "areaCode": { + "type": "string", + "nullable": true, + "maxLength": 3, + "pattern": "^$|^\\d{3}$", + "example": "555" + }, + "phoneNumber": { + "type": "string", + "nullable": true, + "maxLength": 20, + "example": "5555555" + } + } + }, + "receivingInactiveDutyTrainingPay": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "nullable": true, + "example": "YES" + } + } + }, + "federalActivation": { + "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "activationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true }, - "approximateEndDate": { + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + } + } + }, + "confinements": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "approximateBeginDate": { + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + }, + "approximateEndDate": { + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + } } } } } - } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 + }, + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } } + }, + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "nullable": true, + "example": true, + "default": false } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false } + }, + "directDeposit": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "properties": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" + } + } + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { + "type": "string", + "description": "An optional notes section.", + "maxLength": 4000 + }, + "claimId": { + "type": "string", + "example": "600517517" } - }, - "directDeposit": { - "type": "object", - "nullable": true, + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "errors": [ + { + "title": "Not authorized", + "status": "401", + "detail": "Not authorized" + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" + ], + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" + }, + "detail": { + "type": "string", + "description": "HTTP error detail" + }, + "status": { + "type": "string", + "description": "HTTP error status code" + }, + "source": { + "type": "object", "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "description": "Source of error", "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", + "pointer": { "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" + "description": "Pointer to source of error" } } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "example": { + "errors": [ + { + "status": "404", + "title": "Resource not found", + "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" + ], + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false + "detail": { + "type": "string", + "description": "HTTP error detail" }, - "claimNotes": { + "status": { "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 + "description": "HTTP error status code" } } } } } - }, - "example": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" - }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" - } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" + } + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "examples": { + "Violates JSON Schema": { + "value": { + "errors": [ + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key claimProcessType", + "status": "422", + "source": { + "pointer": "data/attributes/" + } }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key disabilities", + "status": "422", + "source": { + "pointer": "data/attributes/" } }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key serviceInformation", + "status": "422", + "source": { + "pointer": "data/attributes/" } }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" - } - }, - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" - } - } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true - }, { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } - ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key veteranIdentification", + "status": "422", + "source": { + "pointer": "data/attributes/" } - }, + } + ] + } + }, + "Not a JSON Object": { + "value": { + "errors": [ { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" + "title": "Unprocessable entity", + "status": "422", + "detail": "The request body is not a valid JSON object: This is not valid JSON", + "source": { + "pointer": null } } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } + ] + } + } + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "status", + "detail" ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" + "properties": { + "status": { + "type": "string", + "description": "HTTP error code" }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" + "detail": { + "type": "string", + "description": "HTTP error detail" }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true - } - } - } - }, - "examples": { - "Minimum Required Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "veteranIdentification": { - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "city": "Portland", - "state": "OR", - "country": "USA", - "zipFirstFive": "12345" + "source": { + "type": "object", + "pointer": { + "type": "string" + } }, - "currentVaEmployee": false - }, - "disabilities": [ - { - "name": "hearing loss", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "2017-07", - "disabilityActionType": "NEW" + "title": { + "type": "string" } - ], - "serviceInformation": { - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "2015-11-14", - "activeDutyEndDate": "2018-11-30" - } - ] - }, - "claimantCertification": true + } } } } - }, - "Maximum Attributes": { - "value": { - "data": { - "type": "form/526", + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "attributes", + null + ], + "properties": { "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "claimantCertification", + "claimProcessType", + "disabilities", + "serviceInformation", + "veteranIdentification" + ], + "properties": { + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" + ] }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": [ + "mailingAddress", + "currentVaEmployee" ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" + "properties": { + "serviceNumber": { + "type": "string", + "description": "Service identification number", + "maxLength": 1000, + "nullable": true + }, + "veteranNumber": { + "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", + "type": "object", + "nullable": true, + "properties": { + "telephone": { + "description": "Veteran's phone number.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555555", + "nullable": true + }, + "internationalTelephone": { + "type": "string", + "description": "Veteran's international phone number.", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + }, + "mailingAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "addressLine1", + "city", + "country" + ], + "properties": { + "addressLine1": { + "description": "Address line 1 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 1, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789", + "nullable": true + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + } + } + }, + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", + "nullable": true, + "properties": { + "email": { + "type": "string", + "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", + "description": "The most current email address of the Veteran.", + "maxLength": 80, + "nullable": true + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true, + "default": false, + "nullable": true + } + } + }, + "currentVaEmployee": { + "type": "boolean", + "description": "Set to true if Veteran is a VA employee.", + "nullable": false } } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } - ] }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30" + "changeOfAddress": { + "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" + }, + "addressLine1": { + "description": "Address line 1 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 0, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's new address.", + "type": "string", + "nullable": true, + "pattern": "^$|^\\d{4}?$", + "example": "6789" + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + }, + "dates": { + "type": "object", + "properties": { + "beginDate": { + "description": "Begin date for the Veteran's new address.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "nullable": true, + "example": "2018-06-04" + }, + "endDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" + } + } + } } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - } - } - } - } - } - } - }, - "/veterans/{veteranId}/526/synchronous": { - "post": { - "summary": "Submits disability compensation claim synchronously (restricted access)", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "post526ClaimSynchronous", - "security": [ - { - "productionOauth": [ - "system/526.override" - ] - }, - { - "sandboxOauth": [ - "system/526.override" - ] - } - ], - "description": "Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS). This endpoint synchronously generates a filled and electronically signed 526EZ form and establishes the disability claim in VBMS. The 526EZ form is uploaded asynchronously.\n\nA 202 response indicates the API submission was accepted and the claim was established in VBMS. Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. The claim status details response will return the associated 526EZ PDF in the supportingDocuments list.\n\n**A substantially complete 526EZ claim must include:**\n* Veteran's name\n* Sufficient service information for VA to verify the claimed service\n* At least one claimed disability or medical condition and how it relates to service\n* Veteran and/or Representative signature\n\n**Standard and fully developed claims (FDCs)**\n\n[Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/)\nare claims certified by the submitter to include all information needed for processing. These claims process faster \nthan claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information, \nit will be processed as a standard claim.\n\nTo certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM.\n", - "parameters": [ - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "Successful response", - "content": { - "application/json": { - "examples": { - "202 without a transactionId": { - "value": { - "data": { - "id": "4b38f39c-9129-4966-acde-8cda8e8d5e27", - "type": "forms/526", - "attributes": { - "claimId": "600442191", - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" + "homeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "isCurrentlyHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently homeless?" + }, + "currentlyHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "homelessSituationOptions": { + "description": "Veteran's living situation.", + "type": "string", + "nullable": true, + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "isAtRiskOfBecomingHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently at risk of becoming homeless?" + }, + "riskOfBecomingHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "livingSituationOptions": { + "type": "string", + "nullable": true, + "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "enum": [ + "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", + "OTHER" + ] + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "pointOfContact": { + "description": "Individual in direct contact with Veteran.", + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "telephone": { + "description": "Ten digit primary phone of point of contact.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555", + "nullable": true + }, + "internationalTelephone": { + "description": "International phone of point of contact.", + "type": "string", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + } } }, "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" + "type": "object", + "nullable": true, + "properties": { + "gulfWarHazardService": { + "type": "object", + "nullable": true, + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "serviceDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + }, + "herbicideHazardService": { + "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", + "type": "object", + "nullable": true, + "properties": { + "servedInHerbicideHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "otherLocationsServed": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "description": "Date range for exposure in herbicide hazard location.", + "type": "object", + "nullable": true, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" + "additionalHazardExposures": { + "type": "object", + "nullable": true, + "description": "Additional hazardous exposures.", + "properties": { + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHIPBOARD_HAZARD_AND_DEFENSE", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] + } + }, + "specifyOtherExposures": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Exposure to asbestos." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" + "multipleExposures": { + "type": "array", + "nullable": true, + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "hazardExposedTo": { + "type": "string", + "nullable": true, + "pattern": "^([-a-zA-Z0-9'.,&# ])+$", + "maxLength": 1000, + "description": "Hazard the Veteran was exposed to." + }, + "exposureLocation": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 1000, + "description": "Location where the exposure happened." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + } } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - }, - "202 with a transactionId": { - "value": { - "data": { - "id": "06ff315d-b022-4268-91a3-8dc28612d935", - "type": "forms/526", - "attributes": { - "claimId": "600442191", - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" } }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-12-06", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - }, - "meta": { - "transactionId": "00000000-0000-0000-0000-000000000000" - } - } - } - }, - "schema": { - "name": "data", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "example": "7d0de77e-b7bd-4db7-a8d9-69a25482c80a" - }, - "type": { - "type": "string", - "example": "form/8675309" - }, - "attributes": { - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "items": { "type": "object", "additionalProperties": false, "required": [ - "mailingAddress", - "currentVaEmployee" + "disabilityActionType", + "name" ], "properties": { - "serviceNumber": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", "type": "string", - "description": "Service identification number", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, "maxLength": 1000, - "nullable": true + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "type": "string", "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } + "maxLength": 1000, + "example": "Heavy equipment operator in service." }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "disabilityActionType": { + "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", "type": "string", "enum": [ - "TEMPORARY", - "PERMANENT" + "NONE", + "NEW", + "INCREASE" ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" + "example": "NEW" }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", + "classificationCode": { "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", "nullable": true }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", + "ratedDisabilityId": { + "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", + "example": "1100583", "nullable": true }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", + "diagnosticCode": { + "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", + "type": "integer", + "example": 9999, "nullable": true }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", + "example": true, + "default": false, "nullable": true }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, + "specialIssues": { + "type": "array", "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } + "uniqueItems": true, + "items": { + "maxItems": 2, + "additionalProperties": false, + "type": "string", + "enum": [ + "POW", + "EMP" + ] } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" + "secondaryDisabilities": { + "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "example": "SECONDARY", + "enum": [ + "SECONDARY" + ] + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true + } } } + } + } + } + }, + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "beginDate": { + "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", + "type": "string", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018", + "nullable": true }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", + "treatedDisabilityNames": { + "description": "Name(s) of disabilities treated in this time frame.", + "type": "array", "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": [ + "PTSD (post traumatic stress disorder)", + "Trauma" + ] + } }, - "riskOfBecomingHomeless": { + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", "type": "object", "nullable": true, "additionalProperties": false, "properties": { - "livingSituationOptions": { + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", "type": "string", "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] + "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "city": { + "description": "City of treatment facility.", "type": "string", + "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", + "example": "Portland", "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true + "minLength": 0, + "maxLength": 30 }, - "internationalTelephone": { - "description": "International phone of point of contact.", + "state": { + "description": "State of treatment facility.", "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "OR", "nullable": true } } } } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { + } + }, + "serviceInformation": { + "type": "object", + "additionalProperties": false, + "required": [ + "servicePeriods" + ], + "properties": { + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "nullable": true, + "maxItems": 100, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "examples": [ + "jane", + "janey lee", + "jane lee MacDonald" + ] + } + }, + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "items": { "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", + "required": [ + "serviceBranch", + "serviceComponent", + "activeDutyBeginDate", + "activeDutyEndDate" + ], "properties": { - "servedInGulfWarHazardLocations": { + "serviceBranch": { + "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true + "maxLength": 1000, + "example": "Air Force" }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { + "serviceComponent": { "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", + "description": "", "enum": [ - "NO", - "YES" - ], - "nullable": true + "Active", + "Reserves", + "National Guard" + ] }, - "otherLocationsServed": { + "activeDutyBeginDate": { + "description": "Date started active duty.", "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" }, - "specifyOtherExposures": { + "activeDutyEndDate": { + "description": "Date completed active duty.", "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" }, - "exposureDates": { - "type": "object", + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } + "example": "98283" } } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { + } + }, + "servedInActiveCombatSince911": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": "YES", + "nullable": true + }, + "reservesNationalGuardService": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "component": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "Reserves", + "National Guard" + ] + }, + "obligationTermsOfService": { "type": "object", + "nullable": true, + "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", "additionalProperties": false, "properties": { - "hazardExposedTo": { + "beginDate": { "type": "string", "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" }, - "exposureLocation": { + "endDate": { "type": "string", "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" } } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 }, - "exposureOrEventOrInjury": { + "unitName": { "type": "string", - "description": "What caused the disability?", "nullable": true, "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] + "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "unitAddress": { "type": "string", - "nullable": true, "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", + "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", "nullable": true }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", + "unitPhone": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "areaCode": { + "type": "string", + "nullable": true, + "maxLength": 3, + "pattern": "^$|^\\d{3}$", + "example": "555" + }, + "phoneNumber": { + "type": "string", + "nullable": true, + "maxLength": 20, + "example": "5555555" + } + } + }, + "receivingInactiveDutyTrainingPay": { "type": "string", "enum": [ - "NONE", - "NEW", - "INCREASE" + "YES", + "NO" ], - "example": "NEW" - }, - "classificationCode": { + "nullable": true, + "example": "YES" + } + } + }, + "federalActivation": { + "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "activationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", "nullable": true }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, + } + } + }, + "confinements": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "approximateBeginDate": { + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" + }, + "approximateEndDate": { + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" } } } } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { + } + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { "type": "object", - "additionalProperties": false, + "nullable": true, + "description": "", "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", + "maxLength": 1000, "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } + "example": "Air Force" }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } + "minimum": 1, + "maximum": 999999, + "example": 100 } } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } + }, + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 } } + }, + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "nullable": true, + "example": true, + "default": false } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } - }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } - } - }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - }, - "claimId": { - "type": "string", - "example": "600517517" } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" }, - "source": { + "directDeposit": { "type": "object", + "nullable": true, "additionalProperties": false, - "description": "Source of error", + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", "properties": { - "pointer": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", "type": "string", - "description": "Pointer to source of error" + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" } } + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { + "type": "string", + "description": "An optional notes section.", + "maxLength": 4000 } } } } } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { + }, "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - } + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555" + }, + "mailingAddress": { + "addressLine1": "123 Main Street", + "addressLine2": "Unit 1", + "addressLine3": "Room 2", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "456 Main Street", + "addressLine2": "Unit 3", + "addressLine3": "Room 4", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2025-06-04", + "endDate": "2026-06-04" } - } - } - } - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "examples": { - "Violates JSON Schema": { - "value": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" + }, + "homeless": { + "currentlyHomeless": { + "homelessSituationOptions": "OTHER", + "otherDescription": "Other living situation" + }, + "pointOfContact": "John Doe", + "pointOfContactNumber": { + "telephone": "5555555555" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "NO" + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "Other locations served", + "serviceDates": { + "beginDate": "1972-05", + "endDate": "1980-10" } }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" + "additionalHazardExposures": { + "additionalExposures": [ + "OTHER" + ], + "specifyOtherExposures": "Agent Orange", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1980-10" } }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" + "multipleExposures": [ + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1973-01" + } + }, + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1979-04", + "endDate": "1980-10" + } } + ] + }, + "disabilities": [ + { + "name": "Diabetes", + "exposureOrEventOrInjury": "Agent Orange", + "serviceRelevance": "Service in Vietnam War", + "approximateDate": "1975-05", + "disabilityActionType": "NEW", + "isRelatedToToxicExposure": true }, { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } + "name": "Hearing Loss", + "exposureOrEventOrInjury": "Noise", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "1968-07", + "disabilityActionType": "INCREASE", + "classificationCode": "8987", + "ratedDisabilityId": "1234567", + "diagnosticCode": 5678, + "isRelatedToToxicExposure": false } - ] - } - }, - "Not a JSON Object": { - "value": { - "errors": [ + ], + "treatments": [ { - "title": "Unprocessable entity", - "status": "422", - "detail": "The request body is not a valid JSON object: This is not valid JSON", - "source": { - "pointer": null + "beginDate": "2021-04", + "treatedDisabilityNames": [ + "Diabetes" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + }, + { + "beginDate": "1996-03", + "treatedDisabilityNames": [ + "Hearing Loss" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" } } - ] - } - } - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "status", - "detail" + ], + "serviceInformation": { + "alternateNames": [ + "Jon Doe", + "Jane Doe" ], - "properties": { - "status": { - "type": "string", - "description": "HTTP error code" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "source": { - "type": "object", - "pointer": { - "type": "string" - } - }, - "title": { - "type": "string" + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "1964-11-14", + "activeDutyEndDate": "1980-10-30", + "separationLocationCode": "98289" } - } - } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "1990-11-24", + "endDate": "1995-11-17" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 Main Street", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" + }, + "confinements": [ + { + "approximateBeginDate": "1970-06-11", + "approximateEndDate": "1970-09-11" + } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", + "militaryRetiredPay": { + "branchOfService": "Air Force", + "monthlyAmount": 240 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "YES", + "separationSeverancePay": { + "datePaymentReceived": "2018-07-31", + "branchOfService": "Air Force", + "preTaxAmountReceived": 179 + }, + "favorTrainingPay": false + }, + "directDeposit": { + "accountNumber": "123123123123", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123456789" + }, + "claimantCertification": true } } } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "attributes", - null - ], - "properties": { + }, + "examples": { + "Minimum Required Attributes": { + "value": { + "data": { + "type": "form/526", "attributes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "veteranIdentification": { + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "city": "Portland", + "state": "OR", + "country": "USA", + "zipFirstFive": "12345" + }, + "currentVaEmployee": false + }, + "disabilities": [ + { + "name": "hearing loss", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "2017-07", + "disabilityActionType": "NEW" + } ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] + "serviceInformation": { + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "2015-11-14", + "activeDutyEndDate": "2018-11-30" + } + ] + }, + "claimantCertification": true + } + } + } + }, + "Maximum Attributes": { + "value": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", - "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - }, - "mailingAddress": { - "type": "object", - "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], - "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", - "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true - } - } - }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" } }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" } } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" + ], + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2023-10-30" } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true + } + } + } + }, + "Transaction ID": { + "value": { + "meta": { + "transactionId": "00000000-0000-0000-0000-000000000000" + }, + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + }, + "mailingAddress": { + "addressLine1": "1234 Couch Street", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "10 Peach St", + "addressLine2": "Unit 4", + "addressLine3": "Room 1", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2023-06-04", + "endDate": "2023-12-04" + } + }, + "homeless": { + "isCurrentlyHomeless": true, + "currentlyHomeless": { + "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", + "otherDescription": "ABCDEFGHIJKLM" + }, + "isAtRiskOfBecomingHomeless": false, + "pointOfContact": "john stewart", + "pointOfContactNumber": { + "telephone": "5555555555", + "internationalTelephone": "+44 20 1234 5678" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "YES", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "ABCDEFGHIJKLM", + "serviceDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "ASBESTOS", + "SHIPBOARD_HAZARD_AND_DEFENSE" + ], + "specifyOtherExposures": "Other exposure details", + "exposureDates": { + "beginDate": "2018-07", + "endDate": "2018-08" + } + }, + "multipleExposures": [ + { + "hazardExposedTo": "RADIATION", + "exposureLocation": "Guam", + "exposureDates": { + "beginDate": "2012-12", + "endDate": "2013-07" } } + ] + }, + "disabilities": [ + { + "name": "Traumatic Brain Injury", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFG", + "approximateDate": "2018-03-11", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 9020, + "isRelatedToToxicExposure": true, + "secondaryDisabilities": [ + { + "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "exposureOrEventOrInjury": "EXPOSURE", + "serviceRelevance": "ABCDEFGHIJKLMNOPQ", + "disabilityActionType": "SECONDARY", + "approximateDate": "2018-03-12", + "classificationCode": "9014" + } + ] }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" + { + "name": "Cancer - Musculoskeletal - Elbow", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2018-03-02", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + }, + { + "name": "Cancer - Musculoskeletal - Knee", + "exposureOrEventOrInjury": "EXPOSURE", + "approximateDate": "2015", + "serviceRelevance": "ABCDEFG", + "disabilityActionType": "NEW", + "classificationCode": "9014", + "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", + "diagnosticCode": 249470, + "isRelatedToToxicExposure": true + } + ], + "treatments": [ + { + "beginDate": "2009-03", + "treatedDisabilityNames": [ + "Traumatic Brain Injury", + "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", + "Cancer - Musculoskeletal - Elbow" ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } + "center": { + "name": "Center One", + "city": "Decatur", + "state": "GA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "john jacob", + "johnny smith" + ], + "servicePeriods": [ + { + "serviceBranch": "Public Health Service", + "serviceComponent": "Active", + "activeDutyBeginDate": "2008-11-14", + "activeDutyEndDate": "2024-12-18", + "separationLocationCode": "98282" } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "2019-06-04", + "endDate": "2020-06-04" + }, + "unitName": "National Guard Unit Name", + "unitAddress": "1243 pine court", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" + }, + "receivingInactiveDutyTrainingPay": "YES" }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } + "federalActivation": { + "activationDate": "2023-10-01", + "anticipatedSeparationDate": "2024-12-18" }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } + "confinements": [ + { + "approximateBeginDate": "2018-06-04", + "approximateEndDate": "2018-07-04" + }, + { + "approximateBeginDate": "2020-06", + "approximateEndDate": "2020-07" } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", + "militaryRetiredPay": { + "branchOfService": "Army", + "monthlyAmount": 840 }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "NO", + "separationSeverancePay": { + "datePaymentReceived": "2022-03-12", + "branchOfService": "Naval Academy", + "preTaxAmountReceived": 379 }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - } - } + "favorTrainingPay": true + }, + "directDeposit": { + "noAccount": false, + "accountNumber": "ABCDEF", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123123123" + }, + "claimantCertification": true } } } - }, + } + } + } + } + } + } + }, + "/veterans/{veteranId}/526/validate": { + "post": { + "summary": "Validates a 526 claim form submission.", + "tags": [ + "Disability Compensation Claims" + ], + "operationId": "post526ClaimValidate", + "security": [ + { + "productionOauth": [ + "system/claim.read", + "system/claim.write" + ] + }, + { + "sandboxOauth": [ + "system/claim.read", + "system/claim.write" + ] + }, + { + "bearer_token": [] + } + ], + "description": "Validates a request for a disability compensation claim submission (21-526EZ).\nThis endpoint can be used to test the request parameters for your /526 submission.\n", + "parameters": [ + { + "name": "veteranId", + "in": "path", + "required": true, + "example": "1012667145V762142", + "description": "ID of Veteran", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response with disability", + "content": { + "application/json": { "example": { "data": { - "type": "form/526", + "type": "claims_api_auto_established_claim_validation", "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" - }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true + "status": "valid" + } + } + }, + "schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "attributes" + ], + "properties": { + "type": { + "type": "string" }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" + "attributes": { + "type": "object", + "additionalProperties": false, + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "valid" + ], + "description": "Return whether or not whether or not the payload is valid" + } + } } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" - } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "example": { + "errors": [ + { + "title": "Not authorized", + "status": "401", + "detail": "Not authorized" + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" + ], + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" }, - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" + "detail": { + "type": "string", + "description": "HTTP error detail" + }, + "status": { + "type": "string", + "description": "HTTP error status code" + }, + "source": { + "type": "object", + "additionalProperties": false, + "description": "Source of error", + "properties": { + "pointer": { + "type": "string", + "description": "Pointer to source of error" + } } } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true - }, - { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } - ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - }, - { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } + } + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "example": { + "errors": [ + { + "status": "404", + "title": "Resource not found", + "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." + } + ] + }, + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "detail" ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" + "properties": { + "title": { + "type": "string", + "description": "HTTP error title" }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" + "detail": { + "type": "string", + "description": "HTTP error detail" }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" + "status": { + "type": "string", + "description": "HTTP error status code" } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true + } + } } } } - }, - "examples": { - "Minimum Required Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "veteranIdentification": { - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "city": "Portland", - "state": "OR", - "country": "USA", - "zipFirstFive": "12345" - }, - "currentVaEmployee": false - }, - "disabilities": [ - { - "name": "hearing loss", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "2017-07", - "disabilityActionType": "NEW" - } - ], - "serviceInformation": { - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "2015-11-14", - "activeDutyEndDate": "2018-11-30" - } - ] - }, - "claimantCertification": true + } + } + }, + "422": { + "description": "Unprocessable entity", + "content": { + "application/json": { + "example": { + "errors": [ + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key claimProcessType", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key disabilities", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key serviceInformation", + "status": "422", + "source": { + "pointer": "data/attributes/" + } + }, + { + "title": "Unprocessable entity", + "detail": "The property / did not contain the required key veteranIdentification", + "status": "422", + "source": { + "pointer": "data/attributes/" } } - } + ] }, - "Maximum Attributes": { - "value": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } + "schema": { + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "additionalProperties": false, + "required": [ + "title", + "status", + "detail" + ], + "properties": { + "status": { + "type": "string", + "description": "HTTP error code" }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } + "detail": { + "type": "string", + "description": "HTTP error detail" }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" + "source": { + "type": "object", + "pointer": { + "type": "string" } }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" - } + "title": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "attributes", + null + ], + "properties": { + "attributes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "claimantCertification", + "claimProcessType", + "disabilities", + "serviceInformation", + "veteranIdentification" + ], + "properties": { + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" ] }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": [ + "mailingAddress", + "currentVaEmployee" ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" + "properties": { + "serviceNumber": { + "type": "string", + "description": "Service identification number", + "maxLength": 1000, + "nullable": true + }, + "veteranNumber": { + "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", + "type": "object", + "nullable": true, + "properties": { + "telephone": { + "description": "Veteran's phone number.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555555", + "nullable": true + }, + "internationalTelephone": { + "type": "string", + "description": "Veteran's international phone number.", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + }, + "mailingAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "addressLine1", + "city", + "country" + ], + "properties": { + "addressLine1": { + "description": "Address line 1 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 1, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789", + "nullable": true + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + } + } + }, + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", + "nullable": true, + "properties": { + "email": { + "type": "string", + "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", + "description": "The most current email address of the Veteran.", + "maxLength": 80, + "nullable": true + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true, + "default": false, + "nullable": true + } + } + }, + "currentVaEmployee": { + "type": "boolean", + "description": "Set to true if Veteran is a VA employee.", + "nullable": false + } } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - }, - "Transaction ID": { - "value": { - "meta": { - "transactionId": "00000000-0000-0000-0000-000000000000" - }, - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + "changeOfAddress": { + "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" + }, + "addressLine1": { + "description": "Address line 1 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "1234 Couch Street" + }, + "addressLine2": { + "description": "Address line 2 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Unit 4", + "nullable": true + }, + "addressLine3": { + "description": "Address line 3 for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 20, + "example": "Room 1", + "nullable": true + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", + "minLength": 0, + "maxLength": 30, + "example": "Schenectady" + }, + "state": { + "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "NY", + "nullable": true + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "maxLength": 1000, + "example": "USA" + }, + "zipFirstFive": { + "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", + "type": "string", + "pattern": "^$|^\\d{5}?$", + "example": "12345", + "nullable": true + }, + "zipLastFour": { + "description": "Zip code (Last 4 digits) for the Veteran's new address.", + "type": "string", + "nullable": true, + "pattern": "^$|^\\d{4}?$", + "example": "6789" + }, + "internationalPostalCode": { + "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", + "type": "string", + "maxLength": 16, + "nullable": true, + "pattern": "^[a-zA-Z0-9]*$" + }, + "dates": { + "type": "object", + "properties": { + "beginDate": { + "description": "Begin date for the Veteran's new address.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "nullable": true, + "example": "2018-06-04" + }, + "endDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" + } + } } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2024-12-06", - "separationLocationCode": "98282" } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2024-12-06" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" - }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - } - } - } - } - } - } - } - }, - "/veterans/{veteranId}/526/validate": { - "post": { - "summary": "Validates a 526 claim form submission.", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "post526ClaimValidate", - "security": [ - { - "productionOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Validates a request for a disability compensation claim submission (21-526EZ).\nThis endpoint can be used to test the request parameters for your /526 submission.\n", - "parameters": [ - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful response with disability", - "content": { - "application/json": { - "example": { - "data": { - "type": "claims_api_auto_established_claim_validation", - "attributes": { - "status": "valid" - } - } - }, - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "attributes" - ], - "properties": { - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "additionalProperties": false, - "required": [ - "status" - ], - "properties": { - "status": { - "type": "string", - "enum": [ - "valid" - ], - "description": "Return whether or not whether or not the payload is valid" - } - } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - }, - "source": { + "homeless": { "type": "object", + "nullable": true, "additionalProperties": false, - "description": "Source of error", "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } - } - } - } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Unable to locate Veteran's ID/ICN in Master Person Index (MPI). Please submit an issue at ask.va.gov or call 1-800-MyVA411 (800-698-2411) for assistance." - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" - } - } - } - } - } - } - } - } - }, - "422": { - "description": "Unprocessable entity", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key claimProcessType", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key disabilities", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key serviceInformation", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - }, - { - "title": "Unprocessable entity", - "detail": "The property / did not contain the required key veteranIdentification", - "status": "422", - "source": { - "pointer": "data/attributes/" - } - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "status", - "detail" - ], - "properties": { - "status": { - "type": "string", - "description": "HTTP error code" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "source": { - "type": "object", - "pointer": { - "type": "string" - } - }, - "title": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "attributes", - null - ], - "properties": { - "attributes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "claimantCertification", - "claimProcessType", - "disabilities", - "serviceInformation", - "veteranIdentification" - ], - "properties": { - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "veteranIdentification": { - "type": "object", - "additionalProperties": false, - "required": [ - "mailingAddress", - "currentVaEmployee" - ], - "properties": { - "serviceNumber": { - "type": "string", - "description": "Service identification number", - "maxLength": 1000, - "nullable": true - }, - "veteranNumber": { - "description": "If there isn't a ten digit phone number in VBMS for the Veteran, the exams will not be ordered. Including the phone number is recommended to avoid claim processing delays.", - "type": "object", + "isCurrentlyHomeless": { + "type": "boolean", "nullable": true, - "properties": { - "telephone": { - "description": "Veteran's phone number.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555555", - "nullable": true - }, - "internationalTelephone": { - "type": "string", - "description": "Veteran's international phone number.", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } + "description": "Is the Veteran currently homeless?" }, - "mailingAddress": { + "currentlyHomeless": { "type": "object", + "nullable": true, "additionalProperties": false, - "required": [ - "addressLine1", - "city", - "country" - ], "properties": { - "addressLine1": { - "description": "Address line 1 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 1, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's current mailing address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's current mailing address.", + "homelessSituationOptions": { + "description": "Veteran's living situation.", "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789", - "nullable": true + "nullable": true, + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's current mailing address. Do not include if 'country' is 'USA'.", + "otherDescription": { + "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", "type": "string", - "maxLength": 16, "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", - "type": "object", - "nullable": true, - "properties": { - "email": { - "type": "string", - "pattern": "^[^\\s@]+@([^\\s@.,]+\\.)+[^\\s@.,]{2,}$", - "description": "The most current email address of the Veteran.", - "maxLength": 80, - "nullable": true - }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true, - "default": false, - "nullable": true + "maxLength": 500, + "example": "other living situation" } } }, - "currentVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "nullable": false - } - } - }, - "changeOfAddress": { - "description": "If 'changeOfAddress' is included, the following attributes are required: 'typeOfAddressChange', 'addressLine1', 'city', 'country'.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address. If 'TEMPORARY', 'beginDate' and 'endDate' are required.", - "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" - }, - "addressLine1": { - "description": "Address line 1 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "1234 Couch Street" - }, - "addressLine2": { - "description": "Address line 2 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Unit 4", - "nullable": true - }, - "addressLine3": { - "description": "Address line 3 for the Veteran's new address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 20, - "example": "Room 1", - "nullable": true - }, - "city": { - "description": "City for the Veteran's new address.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\\'-'.# ]([a-zA-Z0-9\\'-'.# ])?)+$", - "minLength": 0, - "maxLength": 30, - "example": "Schenectady" - }, - "state": { - "description": "State for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "NY", - "nullable": true - }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "maxLength": 1000, - "example": "USA" - }, - "zipFirstFive": { - "description": "Zip code (First 5 digits) for the Veteran's new address. Required if 'country' is 'USA'.", - "type": "string", - "pattern": "^$|^\\d{5}?$", - "example": "12345", - "nullable": true - }, - "zipLastFour": { - "description": "Zip code (Last 4 digits) for the Veteran's new address.", - "type": "string", - "nullable": true, - "pattern": "^$|^\\d{4}?$", - "example": "6789" - }, - "internationalPostalCode": { - "description": "International postal code for the Veteran's new address. Do not include if 'country' is 'USA'.", - "type": "string", - "maxLength": 16, - "nullable": true, - "pattern": "^[a-zA-Z0-9]*$" - }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "description": "Begin date for the Veteran's new address.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "nullable": true, - "example": "2018-06-04" - }, - "endDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" - } - } - } - } - }, - "homeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "isCurrentlyHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently homeless?" - }, - "currentlyHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Veteran's living situation.", - "type": "string", - "nullable": true, - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'homelessSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "isAtRiskOfBecomingHomeless": { - "type": "boolean", - "nullable": true, - "description": "Is the Veteran currently at risk of becoming homeless?" - }, - "riskOfBecomingHomeless": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "nullable": true, - "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "enum": [ - "HOUSING_WILL_BE_LOST_IN_30_DAYS", - "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", - "OTHER" - ] - }, - "otherDescription": { - "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", - "type": "string", - "nullable": true, - "maxLength": 500, - "example": "other living situation" - } - } - }, - "pointOfContact": { - "description": "Individual in direct contact with Veteran.", - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" - }, - "pointOfContactNumber": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "telephone": { - "description": "Ten digit primary phone of point of contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "nullable": true - }, - "internationalTelephone": { - "description": "International phone of point of contact.", - "type": "string", - "example": "+44 20 1234 5678", - "maxLength": 1000, - "nullable": true - } - } - } - } - }, - "toxicExposure": { - "type": "object", - "nullable": true, - "properties": { - "gulfWarHazardService": { - "type": "object", - "nullable": true, - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "serviceDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in Gulf War hazard location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "herbicideHazardService": { - "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", - "type": "object", - "nullable": true, - "properties": { - "servedInHerbicideHazardLocations": { - "type": "string", - "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", - "example": "YES", - "enum": [ - "NO", - "YES" - ], - "nullable": true - }, - "otherLocationsServed": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "description": "Date range for exposure in herbicide hazard location.", - "type": "object", - "nullable": true, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for serving in herbicide location.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "additionalHazardExposures": { - "type": "object", - "nullable": true, - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHIPBOARD_HAZARD_AND_DEFENSE", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 5000, - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "nullable": true, - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "hazardExposedTo": { - "type": "string", - "nullable": true, - "pattern": "^([-a-zA-Z0-9'.,&# ])+$", - "maxLength": 1000, - "description": "Hazard the Veteran was exposed to." - }, - "exposureLocation": { - "type": "string", - "nullable": true, - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "maxLength": 1000, - "description": "Location where the exposure happened." - }, - "exposureDates": { - "type": "object", - "nullable": true, - "description": "Date range for when the exposure happened.", - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "description": "Approximate begin date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - }, - "endDate": { - "type": "string", - "nullable": true, - "description": "Approximate end date for exposure.", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018" - } - } - } - } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "disabilityActionType", - "name" - ], - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "disabilityActionType": { - "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "INCREASE" - ], - "example": "NEW" - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", - "type": "string", - "example": "1100583", - "nullable": true - }, - "diagnosticCode": { - "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", - "type": "integer", - "example": 9999, - "nullable": true - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", - "example": true, - "default": false, - "nullable": true - }, - "specialIssues": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "maxItems": 2, - "additionalProperties": false, - "type": "string", - "enum": [ - "POW", - "EMP" - ] - } - }, - "secondaryDisabilities": { - "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", - "type": "string", - "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength": 255 - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "nullable": true, - "maxLength": 1000, - "examples": [ - "Agent Orange", - "radiation", - "burn pits" - ] - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Heavy equipment operator in service." - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "example": "SECONDARY", - "enum": [ - "SECONDARY" - ] - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", - "example": "2018-03-02 or 2018-03 or 2018", - "nullable": true - }, - "classificationCode": { - "type": "string", - "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "example": "249470", - "nullable": true - } - } - } - } - } - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "beginDate": { - "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", - "type": "string", - "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", - "example": "2018-06 or 2018", - "nullable": true - }, - "treatedDisabilityNames": { - "description": "Name(s) of disabilities treated in this time frame.", - "type": "array", - "nullable": true, - "maxItems": 101, - "items": { - "type": "string", - "additionalProperties": false, - "example": [ - "PTSD (post traumatic stress disorder)", - "Trauma" - ] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "nullable": true, - "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", - "example": "Portland", - "nullable": true, - "minLength": 0, - "maxLength": 30 - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^$|^[a-z,A-Z]{2}$", - "example": "OR", - "nullable": true - } - } - } - } - } - }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": [ - "servicePeriods" - ], - "properties": { - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "nullable": true, - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": [ - "jane", - "janey lee", - "jane lee MacDonald" - ] - } - }, - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "serviceComponent", - "activeDutyBeginDate", - "activeDutyEndDate" - ], - "properties": { - "serviceBranch": { - "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "example": "Air Force" - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date started active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "activeDutyEndDate": { - "description": "Date completed active duty.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "nullable": true, - "example": "98283" - } - } - } - }, - "servedInActiveCombatSince911": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": "YES", - "nullable": true - }, - "reservesNationalGuardService": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "component": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "Reserves", - "National Guard" - ] - }, - "obligationTermsOfService": { - "type": "object", - "nullable": true, - "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", - "additionalProperties": false, - "properties": { - "beginDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - }, - "endDate": { - "type": "string", - "nullable": true, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06" - } - } - }, - "unitName": { - "type": "string", - "nullable": true, - "maxLength": 1000, - "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "maxLength": 1000, - "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", - "nullable": true - }, - "unitPhone": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "areaCode": { - "type": "string", - "nullable": true, - "maxLength": 3, - "pattern": "^$|^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "nullable": true, - "maxLength": 20, - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string", - "enum": [ - "YES", - "NO" - ], - "nullable": true, - "example": "YES" - } - } - }, - "federalActivation": { - "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "activationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - }, - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-06", - "nullable": true - } - } - }, - "confinements": { - "type": "array", - "nullable": true, - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "properties": { - "approximateBeginDate": { - "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - }, - "approximateEndDate": { - "type": "string", - "nullable": false, - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-06-06 or 2018-06" - } - } - } - } - } - }, - "servicePay": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "properties": { - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", - "type": "string", - "maxLength": 1000, - "example": "Will be retiring soon.", - "nullable": true - }, - "militaryRetiredPay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "retiredStatus": { - "type": "string", - "nullable": true, - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "string", - "enum": [ - "YES", - "NO" - ], - "example": "YES", - "nullable": true - }, - "separationSeverancePay": { - "type": "object", - "nullable": true, - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", - "type": "string", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", - "example": "2018-03-02 or 2018-03 or 2018" - }, - "branchOfService": { - "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", - "type": "string", - "nullable": true, - "maxLength": 1000, - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } - }, - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "nullable": true, - "example": true, - "default": false - } - } - }, - "directDeposit": { - "type": "object", - "nullable": true, - "additionalProperties": false, - "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", - "properties": { - "noAccount": { - "type": "boolean", - "nullable": true, - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", - "type": "string", - "maxLength": 1000, - "nullable": true, - "example": "123123123123" - }, - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "nullable": true, - "example": "CHECKING", - "enum": [ - "CHECKING", - "SAVINGS" - ] - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 1000, - "type": "string", - "nullable": true, - "example": "Some Bank" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "maxLength": 1000, - "nullable": true, - "pattern": "^$|^\\d{0,1000}$", - "example": "123123123" - } - } - }, - "claimantCertification": { - "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", - "default": false - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 - } - } - } - } - } - }, - "example": { - "data": { - "type": "form/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555" - }, - "mailingAddress": { - "addressLine1": "123 Main Street", - "addressLine2": "Unit 1", - "addressLine3": "Room 2", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "456 Main Street", - "addressLine2": "Unit 3", - "addressLine3": "Room 4", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2025-06-04", - "endDate": "2026-06-04" - } - }, - "homeless": { - "currentlyHomeless": { - "homelessSituationOptions": "OTHER", - "otherDescription": "Other living situation" - }, - "pointOfContact": "John Doe", - "pointOfContactNumber": { - "telephone": "5555555555" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "NO" - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "Other locations served", - "serviceDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "OTHER" - ], - "specifyOtherExposures": "Agent Orange", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1980-10" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1972-05", - "endDate": "1973-01" - } - }, - { - "hazardExposedTo": "Agent Orange", - "exposureLocation": "Vietnam", - "exposureDates": { - "beginDate": "1979-04", - "endDate": "1980-10" - } - } - ] - }, - "disabilities": [ - { - "name": "Diabetes", - "exposureOrEventOrInjury": "Agent Orange", - "serviceRelevance": "Service in Vietnam War", - "approximateDate": "1975-05", - "disabilityActionType": "NEW", - "isRelatedToToxicExposure": true - }, - { - "name": "Hearing Loss", - "exposureOrEventOrInjury": "Noise", - "serviceRelevance": "Heavy equipment operator in service", - "approximateDate": "1968-07", - "disabilityActionType": "INCREASE", - "classificationCode": "8987", - "ratedDisabilityId": "1234567", - "diagnosticCode": 5678, - "isRelatedToToxicExposure": false - } - ], - "treatments": [ - { - "beginDate": "2021-04", - "treatedDisabilityNames": [ - "Diabetes" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - }, - { - "beginDate": "1996-03", - "treatedDisabilityNames": [ - "Hearing Loss" - ], - "center": { - "name": "ATLANTA VA MEDICAL CENTER", - "state": "GA", - "city": "ATLANTA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "Jon Doe", - "Jane Doe" - ], - "servicePeriods": [ - { - "serviceBranch": "Air Force", - "serviceComponent": "Active", - "activeDutyBeginDate": "1964-11-14", - "activeDutyEndDate": "1980-10-30", - "separationLocationCode": "98289" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "1990-11-24", - "endDate": "1995-11-17" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 Main Street", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "confinements": [ - { - "approximateBeginDate": "1970-06-11", - "approximateEndDate": "1970-09-11" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", - "militaryRetiredPay": { - "branchOfService": "Air Force", - "monthlyAmount": 240 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "YES", - "separationSeverancePay": { - "datePaymentReceived": "2018-07-31", - "branchOfService": "Air Force", - "preTaxAmountReceived": 179 - }, - "favorTrainingPay": false - }, - "directDeposit": { - "accountNumber": "123123123123", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123456789" - }, - "claimantCertification": true - } - } - } - } - } - }, - "required": true - } - } - }, - "/veterans/{veteranId}/526/{id}/attachments": { - "post": { - "summary": "Upload documents supporting a 526 claim", - "tags": [ - "Disability Compensation Claims" - ], - "operationId": "upload526Attachments", - "security": [ - { - "productionOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "sandboxOauth": [ - "system/claim.read", - "system/claim.write" - ] - }, - { - "bearer_token": [ - - ] - } - ], - "description": "Uploads supporting documents related to a disability compensation claim. This endpoint accepts a document binary PDF as part of a multi-part payload.\n", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "description": "UUID given when Disability Claim was submitted", - "schema": { - "type": "string" - } - }, - { - "name": "veteranId", - "in": "path", - "required": true, - "example": "1012667145V762142", - "description": "ID of Veteran", - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "upload response", - "content": { - "application/json": { - "example": { - "data": { - "id": "a114a642-55bf-4aa3-ac74-82b5a17a8db0", - "type": "forms/526", - "attributes": { - "claimProcessType": "STANDARD_CLAIM_PROCESS", - "claimNotes": "Some things that are important to know, and are not included in any other place.", - "veteranIdentification": { - "serviceNumber": "123456789", - "veteranNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - }, - "mailingAddress": { - "addressLine1": "1234 Couch Street", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "1234" - }, - "emailAddress": { - "email": "valid@somedomain.com", - "agreeToEmailRelatedToClaim": true - }, - "currentVaEmployee": false - }, - "changeOfAddress": { - "typeOfAddressChange": "TEMPORARY", - "addressLine1": "10 Peach St", - "addressLine2": "Unit 4", - "addressLine3": "Room 1", - "city": "Schenectady", - "state": "NY", - "country": "USA", - "zipFirstFive": "12345", - "zipLastFour": "9897", - "dates": { - "beginDate": "2023-06-04", - "endDate": "2023-12-04" - } - }, - "homeless": { - "isCurrentlyHomeless": true, - "currentlyHomeless": { - "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE", - "otherDescription": "ABCDEFGHIJKLM" - }, - "isAtRiskOfBecomingHomeless": false, - "pointOfContact": "john stewart", - "pointOfContactNumber": { - "telephone": "5555555555", - "internationalTelephone": "+44 20 1234 5678" - } - }, - "toxicExposure": { - "gulfWarHazardService": { - "servedInGulfWarHazardLocations": "YES", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "herbicideHazardService": { - "servedInHerbicideHazardLocations": "YES", - "otherLocationsServed": "ABCDEFGHIJKLM", - "serviceDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "additionalHazardExposures": { - "additionalExposures": [ - "ASBESTOS", - "SHIPBOARD_HAZARD_AND_DEFENSE" - ], - "specifyOtherExposures": "Other exposure details", - "exposureDates": { - "beginDate": "2018-07", - "endDate": "2018-08" - } - }, - "multipleExposures": [ - { - "hazardExposedTo": "RADIATION", - "exposureLocation": "Guam", - "exposureDates": { - "beginDate": "2012-12", - "endDate": "2013-07" - } - } - ] - }, - "disabilities": [ - { - "name": "Traumatic Brain Injury", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-11", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 9020, - "isRelatedToToxicExposure": true, - "secondaryDisabilities": [ - { - "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "exposureOrEventOrInjury": "EXPOSURE", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "disabilityActionType": "SECONDARY", - "approximateDate": "2018-03-12", - "classificationCode": "9014" + "isAtRiskOfBecomingHomeless": { + "type": "boolean", + "nullable": true, + "description": "Is the Veteran currently at risk of becoming homeless?" + }, + "riskOfBecomingHomeless": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "livingSituationOptions": { + "type": "string", + "nullable": true, + "default": "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "enum": [ + "HOUSING_WILL_BE_LOST_IN_30_DAYS", + "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", + "OTHER" + ] + }, + "otherDescription": { + "description": "Explanation of living situation. Required if 'livingSituationOptions' is 'OTHER'.", + "type": "string", + "nullable": true, + "maxLength": 500, + "example": "other living situation" + } + } + }, + "pointOfContact": { + "description": "Individual in direct contact with Veteran.", + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "telephone": { + "description": "Ten digit primary phone of point of contact.", + "type": "string", + "pattern": "^\\d{10}?$", + "example": "5555555", + "nullable": true + }, + "internationalTelephone": { + "description": "International phone of point of contact.", + "type": "string", + "example": "+44 20 1234 5678", + "maxLength": 1000, + "nullable": true + } + } + } } - ] - }, - { - "name": "Cancer - Musculoskeletal - Elbow", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2018-03-02", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - }, - { - "name": "Cancer - Musculoskeletal - Knee", - "exposureOrEventOrInjury": "EXPOSURE", - "approximateDate": "2015", - "serviceRelevance": "ABCDEFG", - "disabilityActionType": "NEW", - "classificationCode": "9014", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 249470, - "isRelatedToToxicExposure": true - } - ], - "treatments": [ - { - "beginDate": "2009-03", - "treatedDisabilityNames": [ - "Traumatic Brain Injury", - "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders", - "Cancer - Musculoskeletal - Elbow" - ], - "center": { - "name": "Center One", - "city": "Decatur", - "state": "GA" - } - } - ], - "serviceInformation": { - "alternateNames": [ - "john jacob", - "johnny smith" - ], - "servicePeriods": [ - { - "serviceBranch": "Public Health Service", - "serviceComponent": "Active", - "activeDutyBeginDate": "2008-11-14", - "activeDutyEndDate": "2023-10-30", - "separationLocationCode": "98282" - } - ], - "servedInActiveCombatSince911": "NO", - "reservesNationalGuardService": { - "component": "National Guard", - "obligationTermsOfService": { - "beginDate": "2019-06-04", - "endDate": "2020-06-04" - }, - "unitName": "National Guard Unit Name", - "unitAddress": "1243 pine court", - "unitPhone": { - "areaCode": "555", - "phoneNumber": "5555555" - }, - "receivingInactiveDutyTrainingPay": "YES" - }, - "federalActivation": { - "activationDate": "2023-10-01", - "anticipatedSeparationDate": "2025-10-31" - }, - "confinements": [ - { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" }, - { - "approximateBeginDate": "2020-06", - "approximateEndDate": "2020-07" - } - ] - }, - "servicePay": { - "receivingMilitaryRetiredPay": "NO", - "futureMilitaryRetiredPay": "YES", - "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW", - "militaryRetiredPay": { - "branchOfService": "Army", - "monthlyAmount": 840 - }, - "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", - "favorMilitaryRetiredPay": false, - "receivedSeparationOrSeverancePay": "NO", - "separationSeverancePay": { - "datePaymentReceived": "2022-03-12", - "branchOfService": "Naval Academy", - "preTaxAmountReceived": 379 - }, - "favorTrainingPay": true - }, - "directDeposit": { - "noAccount": false, - "accountNumber": "ABCDEF", - "accountType": "CHECKING", - "financialInstitutionName": "Chase", - "routingNumber": "123123123" - }, - "claimantCertification": true - } - } - }, - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string", - "description": "Internal vets-api Claim ID" - }, - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "additionalProperties": false, - "required": [ - "claimProcessType", - "veteranIdentification", - "disabilities", - "serviceInformation", - "claimantCertification" - ], - "properties": { - "claimProcessType": { - "type": "string" - }, - "veteranIdentification": { - "type": "object", - "properties": { - "serviceNumber": { - "type": "string" - }, - "veteranNumber": { - "type": "object", - "properties": { - "telephone": { - "type": "string" - }, - "internationalTelephone": { - "type": "string" + "toxicExposure": { + "type": "object", + "nullable": true, + "properties": { + "gulfWarHazardService": { + "type": "object", + "nullable": true, + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following Gulf War hazard locations: Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "serviceDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in Gulf War hazard location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "herbicideHazardService": { + "description": "Toxic exposure related to herbicide (Agent Orange) hazards.", + "type": "object", + "nullable": true, + "properties": { + "servedInHerbicideHazardLocations": { + "type": "string", + "description": "Set to true if the Veteran served in any of the following herbicide/Agent Orange locations: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves).", + "example": "YES", + "enum": [ + "NO", + "YES" + ], + "nullable": true + }, + "otherLocationsServed": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "description": "Date range for exposure in herbicide hazard location.", + "type": "object", + "nullable": true, + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for serving in herbicide location.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } + } + } + }, + "additionalHazardExposures": { + "type": "object", + "nullable": true, + "description": "Additional hazardous exposures.", + "properties": { + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHIPBOARD_HAZARD_AND_DEFENSE", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED_TOXIN", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] } - } - }, - "currentVaEmployee": { - "type": "boolean" - }, - "mailingAddress": { - "type": "object", - "properties": { - "addressLine1": { - "type": "string" - }, - "addressLine2": { - "type": "string" - }, - "addressLine3": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string" - }, - "zipFirstFive": { - "type": "string" - }, - "zipLastFour": { - "type": "string" + }, + "specifyOtherExposures": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 5000, + "description": "Exposure to asbestos." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } } } - }, - "emailAddress": { + } + }, + "multipleExposures": { + "type": "array", + "nullable": true, + "minItems": 1, + "uniqueItems": true, + "items": { "type": "object", + "additionalProperties": false, "properties": { - "email": { - "type": "string" + "hazardExposedTo": { + "type": "string", + "nullable": true, + "pattern": "^([-a-zA-Z0-9'.,&# ])+$", + "maxLength": 1000, + "description": "Hazard the Veteran was exposed to." }, - "agreeToEmailRelatedToClaim": { - "type": "boolean" + "exposureLocation": { + "type": "string", + "nullable": true, + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "maxLength": 1000, + "description": "Location where the exposure happened." + }, + "exposureDates": { + "type": "object", + "nullable": true, + "description": "Date range for when the exposure happened.", + "properties": { + "beginDate": { + "type": "string", + "nullable": true, + "description": "Approximate begin date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + }, + "endDate": { + "type": "string", + "nullable": true, + "description": "Approximate end date for exposure.", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018" + } + } } } } } - }, - "changeOfAddress": { + } + }, + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "items": { "type": "object", + "additionalProperties": false, + "required": [ + "disabilityActionType", + "name" + ], "properties": { - "typeOfAddressChange": { - "type": "string" + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,#\\[\\] ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 }, - "addressLine1": { - "type": "string" + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] }, - "addressLine2": { - "type": "string" + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury. If the disabilityActionType is 'NEW', the serviceRelevance is required.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." }, - "addressLine3": { - "type": "string" + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true }, - "city": { - "type": "string" + "disabilityActionType": { + "description": "Action type requested for the disability. If 'INCREASE' or 'NONE', then 'ratedDisabilityId' and 'diagnosticCode' should be included. 'NONE' should be used when including a secondary disability.", + "type": "string", + "enum": [ + "NONE", + "NEW", + "INCREASE" + ], + "example": "NEW" }, - "state": { - "type": "string" + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true }, - "country": { - "type": "string" + "ratedDisabilityId": { + "description": "When submitting a contention with action type 'INCREASE', the previously rated disability id may be included.", + "type": "string", + "example": "1100583", + "nullable": true }, - "zipFirstFive": { - "type": "string" + "diagnosticCode": { + "description": "If the disabilityActionType is 'NONE' or 'INCREASE', the diagnosticCode should correspond to an existing rated disability.", + "type": "integer", + "example": 9999, + "nullable": true }, - "zipLastFour": { - "type": "string" + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If true, related 'toxicExposure' must be included.", + "example": true, + "default": false, + "nullable": true }, - "dates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } + "specialIssues": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "maxItems": 2, + "additionalProperties": false, + "type": "string", + "enum": [ + "POW", + "EMP" + ] } - } - } - }, - "homeless": { - "type": "object", - "properties": { - "currentlyHomeless": { - "type": "object", - "properties": { - "currentlyHomeless": { - "type": "object", - "properties": { - "homelessSituationOptions": { - "type": "string" - }, - "otherDescription": { - "type": "string" - } + }, + "secondaryDisabilities": { + "description": "If secondaryDisability is included, the following attributes are required: 'secondaryDisability.name', 'secondaryDisability.disabilityActionType' and 'secondaryDisability.serviceRelevance'", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the disability. The /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible disability names.", + "type": "string", + "pattern": "^$|([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,#\\[\\] ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength": 255 + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "nullable": true, + "maxLength": 1000, + "examples": [ + "Agent Orange", + "radiation", + "burn pits" + ] + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Heavy equipment operator in service." + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "example": "SECONDARY", + "enum": [ + "SECONDARY" + ] + }, + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4}(?:-(?!00)(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[1-2][0-9]|3[0-1]))?)?)$", + "example": "2018-03-02 or 2018-03 or 2018", + "nullable": true + }, + "classificationCode": { + "type": "string", + "description": "Classification code for the associated body system. Must match an active code returned by the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "example": "249470", + "nullable": true } } } - }, - "pointOfContact": { - "type": "string" - }, - "pointOfContactNumber": { - "type": "object", - "properties": { - "telephone": { - "type": "string" - }, - "internationalTelephone": { - "type": "string" - } - } } } - }, - "toxicExposure": { + } + }, + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran. The combination of treatedDisabilityName, center name, center city, and center state must be less than 1000 characters to successfully generate a PDF.", + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { "type": "object", + "additionalProperties": false, "properties": { - "gulfWarHazardService": { - "type": "object", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "string" - }, - "serviceDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } + "beginDate": { + "description": "Begin date for treatment. If treatment began from 2005 to present, you do not need to provide dates. Each treatment begin date must be after the first 'servicePeriod.activeDutyBeginDate'.", + "type": "string", + "pattern": "^(?:19|20)[0-9][0-9]$|^(?:19|20)[0-9][0-9]-(0[1-9]|1[0-2])$", + "example": "2018-06 or 2018", + "nullable": true + }, + "treatedDisabilityNames": { + "description": "Name(s) of disabilities treated in this time frame.", + "type": "array", + "nullable": true, + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": [ + "PTSD (post traumatic stress disorder)", + "Trauma" + ] } }, - "herbicideHazardService": { + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "servedInHerbicideHazardLocations": { - "type": "string" + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "nullable": true, + "pattern": "([a-zA-Z0-9\"/&()\\'-'.,# ]([a-zA-Z0-9()\\'-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 }, - "otherLocationsServed": { - "type": "string" + "city": { + "description": "City of treatment facility.", + "type": "string", + "pattern": "([a-zA-Z0-9\\-'.# ]([a-zA-Z0-9\\-'.# ])?)+$", + "example": "Portland", + "nullable": true, + "minLength": 0, + "maxLength": 30 }, - "serviceDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^$|^[a-z,A-Z]{2}$", + "example": "OR", + "nullable": true } } - }, - "additionalHazardExposures": { + } + } + } + }, + "serviceInformation": { + "type": "object", + "additionalProperties": false, + "required": [ + "servicePeriods" + ], + "properties": { + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "nullable": true, + "maxItems": 100, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "examples": [ + "jane", + "janey lee", + "jane lee MacDonald" + ] + } + }, + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "items": { "type": "object", + "required": [ + "serviceBranch", + "serviceComponent", + "activeDutyBeginDate", + "activeDutyEndDate" + ], "properties": { - "additionalExposures": { - "type": "array", - "items": { - "type": "string" - } + "serviceBranch": { + "description": "Branch of service during period. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "example": "Air Force" }, - "specifyOtherExposures": { - "type": "string" + "serviceComponent": { + "type": "string", + "description": "", + "enum": [ + "Active", + "Reserves", + "National Guard" + ] }, - "exposureDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } - } - }, - "multipleExposures": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hazardExposedTo": { - "type": "string" - }, - "exposureLocation": { - "type": "string" - }, - "exposureDates": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - } - } - } - } - } - }, - "disabilities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "exposureOrEventOrInjury": { - "type": "string" - }, - "serviceRelevance": { - "type": "string" - }, - "approximateDate": { - "type": "string" - }, - "disabilityActionType": { - "type": "string" - }, - "classificationCode": { - "type": "string" - }, - "ratedDisabilityId": { - "type": "string" - }, - "diagnosticCode": { - "type": "integer" - }, - "isRelatedToToxicExposure": { - "type": "boolean" - }, - "secondaryDisabilities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "exposureOrEventOrInjury": { - "type": "string" - }, - "serviceRelevance": { - "type": "string" - }, - "disabilityActionType": { - "type": "string" - }, - "approximateDate": { - "type": "string" - }, - "classificationCode": { - "type": "string" - } - } + "activeDutyBeginDate": { + "description": "Date started active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "activeDutyEndDate": { + "description": "Date completed active duty.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" + }, + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "nullable": true, + "example": "98283" } } } - } - }, - "treatments": { - "type": "array", - "items": { + }, + "servedInActiveCombatSince911": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": "YES", + "nullable": true + }, + "reservesNationalGuardService": { "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "beginDate": { - "type": "string" - }, - "treatedDisabilityNames": { - "type": "array", - "items": { - "type": "string" - } + "component": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "Reserves", + "National Guard" + ] }, - "center": { + "obligationTermsOfService": { "type": "object", + "nullable": true, + "description": "If 'obligationTermsOfService' is included, the following attributes are required: 'beginDate ' and 'endDate'.", + "additionalProperties": false, "properties": { - "name": { - "type": "string" - }, - "city": { - "type": "string" + "beginDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" }, - "state": { - "type": "string" + "endDate": { + "type": "string", + "nullable": true, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06" } } - } - } - } - }, - "serviceInformation": { - "type": "object", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "servicePeriods": { - "type": "array", - "items": { + }, + "unitName": { + "type": "string", + "nullable": true, + "maxLength": 1000, + "pattern": "^$|([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" + }, + "unitAddress": { + "type": "string", + "maxLength": 1000, + "pattern": "^$|^([-a-zA-Z0-9'.,&# ])+$", + "nullable": true + }, + "unitPhone": { "type": "object", + "nullable": true, + "additionalProperties": false, "properties": { - "serviceBranch": { - "type": "string" - }, - "serviceComponent": { - "type": "string" - }, - "activeDutyBeginDate": { - "type": "string" - }, - "activeDutyEndDate": { - "type": "string" + "areaCode": { + "type": "string", + "nullable": true, + "maxLength": 3, + "pattern": "^$|^\\d{3}$", + "example": "555" }, - "separationLocationCode": { - "type": "string" + "phoneNumber": { + "type": "string", + "nullable": true, + "maxLength": 20, + "example": "5555555" } } + }, + "receivingInactiveDutyTrainingPay": { + "type": "string", + "enum": [ + "YES", + "NO" + ], + "nullable": true, + "example": "YES" } - }, - "servedInActiveCombatSince911": { - "type": "string" - }, - "reservesNationalGuardService": { - "type": "object", - "properties": { - "component": { - "type": "string" - }, - "obligationTermsOfService": { - "type": "object", - "properties": { - "beginDate": { - "type": "string" - }, - "endDate": { - "type": "string" - } - } - }, - "unitName": { - "type": "string" - }, - "unitAddress": { - "type": "string" - }, - "unitPhone": { - "type": "object", - "properties": { - "areaCode": { - "type": "string" - }, - "phoneNumber": { - "type": "string" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "string" - } + } + }, + "federalActivation": { + "description": "If federalActivation is present then reservesNationalGuardService.obligationTermsOfService.beginDate, reservesNationalGuardService.obligationTermsOfService.endDate and reservesNationalGuardService.unitName are required", + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "activationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true + }, + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-06", + "nullable": true } - }, - "federalActivation": { + } + }, + "confinements": { + "type": "array", + "nullable": true, + "uniqueItems": true, + "items": { + "additionalProperties": false, "type": "object", "properties": { - "activationDate": { - "type": "string" + "approximateBeginDate": { + "description": "The approximateBeginDate must be after the earliest servicePeriod activeDutyBeginDate.", + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" }, - "anticipatedSeparationDate": { - "type": "string" + "approximateEndDate": { + "type": "string", + "nullable": false, + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-06-06 or 2018-06" } } } + } + } + }, + "servicePay": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "properties": { + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "maxLength": 1000, + "example": "Will be retiring soon.", + "nullable": true + }, + "militaryRetiredPay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 + } + } }, - "confinements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "approximateBeginDate": { - "type": "string" - }, - "approximateEndDate": { - "type": "string" - } - } - } - } - }, - "servicePay": { - "type": "object", - "properties": { - "receivingMilitaryRetiredPay": { - "type": "string" - }, - "futureMilitaryRetiredPay": { - "type": "string" - }, - "futureMilitaryRetiredPayExplanation": { - "type": "string" - }, - "militaryRetiredPay": { - "type": "object", - "properties": { - "branchOfService": { - "type": "string" - }, - "monthlyAmount": { - "type": "integer" - } - } - }, - "retiredStatus": { - "type": "string" - }, - "favorMilitaryRetiredPay": { - "type": "boolean" - }, - "receivedSeparationOrSeverancePay": { - "type": "string" - }, - "separationSeverancePay": { - "type": "object", - "properties": { - "datePaymentReceived": { - "type": "string" - }, - "branchOfService": { - "type": "string" - }, - "preTaxAmountReceived": { - "type": "integer" - } + "retiredStatus": { + "type": "string", + "nullable": true, + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "nullable": true, + "example": true, + "default": false + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "string", + "enum": [ + "YES", + "NO" + ], + "example": "YES", + "nullable": true + }, + "separationSeverancePay": { + "type": "object", + "nullable": true, + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either YYYY-MM-DD or YYYY-MM or YYYY", + "type": "string", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])$|(?:[0-9]{4})$|(?:[0-9]{4})-(?:0[1-9]|1[0-2])$", + "example": "2018-03-02 or 2018-03 or 2018" + }, + "branchOfService": { + "description": "Branch of service. The /service-branches endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve list of possible service branches.", + "type": "string", + "nullable": true, + "maxLength": 1000, + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 999999, + "example": 100 } - }, - "favorTrainingPay": { - "type": "boolean" } + }, + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "nullable": true, + "example": true, + "default": false } - }, - "directDeposit": { - "type": "object", - "properties": { - "noAccount": { - "type": "boolean" - }, - "accountNumber": { - "type": "string" - }, - "accountType": { - "type": "string" - }, - "financialInstitutionName": { - "type": "string" - }, - "routingNumber": { - "type": "string" - } + } + }, + "directDeposit": { + "type": "object", + "nullable": true, + "additionalProperties": false, + "description": "If direct deposit information is included, the following attributes are required: accountType, accountNumber, routingNumber.", + "properties": { + "noAccount": { + "type": "boolean", + "nullable": true, + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false + }, + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9-]{4,1000})?$", + "type": "string", + "maxLength": 1000, + "nullable": true, + "example": "123123123123" + }, + "accountType": { + "description": "Account type for the direct deposit.", + "type": "string", + "nullable": true, + "example": "CHECKING", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 1000, + "type": "string", + "nullable": true, + "example": "Some Bank" + }, + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "maxLength": 1000, + "nullable": true, + "pattern": "^$|^\\d{0,1000}$", + "example": "123123123" } - }, - "claimantCertification": { - "type": "boolean" - }, - "claimNotes": { - "type": "string", - "description": "An optional notes section.", - "maxLength": 4000 } + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "claimNotes": { + "type": "string", + "description": "An optional notes section.", + "maxLength": 4000 + } + } + } + } + } + }, + "example": { + "data": { + "type": "form/526", + "attributes": { + "claimProcessType": "STANDARD_CLAIM_PROCESS", + "claimNotes": "Some things that are important to know, and are not included in any other place.", + "veteranIdentification": { + "serviceNumber": "123456789", + "veteranNumber": { + "telephone": "5555555555" + }, + "mailingAddress": { + "addressLine1": "123 Main Street", + "addressLine2": "Unit 1", + "addressLine3": "Room 2", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "1234" + }, + "emailAddress": { + "email": "valid@somedomain.com", + "agreeToEmailRelatedToClaim": true + }, + "currentVaEmployee": false + }, + "changeOfAddress": { + "typeOfAddressChange": "TEMPORARY", + "addressLine1": "456 Main Street", + "addressLine2": "Unit 3", + "addressLine3": "Room 4", + "city": "Schenectady", + "state": "NY", + "country": "USA", + "zipFirstFive": "12345", + "zipLastFour": "9897", + "dates": { + "beginDate": "2025-06-04", + "endDate": "2026-06-04" + } + }, + "homeless": { + "currentlyHomeless": { + "homelessSituationOptions": "OTHER", + "otherDescription": "Other living situation" + }, + "pointOfContact": "John Doe", + "pointOfContactNumber": { + "telephone": "5555555555" + } + }, + "toxicExposure": { + "gulfWarHazardService": { + "servedInGulfWarHazardLocations": "NO" + }, + "herbicideHazardService": { + "servedInHerbicideHazardLocations": "YES", + "otherLocationsServed": "Other locations served", + "serviceDates": { + "beginDate": "1972-05", + "endDate": "1980-10" + } + }, + "additionalHazardExposures": { + "additionalExposures": [ + "OTHER" + ], + "specifyOtherExposures": "Agent Orange", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1980-10" } - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "example": { - "errors": [ - { - "title": "Not authorized", - "status": "401", - "detail": "Not authorized" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" - ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" - }, - "detail": { - "type": "string", - "description": "HTTP error detail" - }, - "status": { - "type": "string", - "description": "HTTP error status code" + }, + "multipleExposures": [ + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1972-05", + "endDate": "1973-01" + } }, - "source": { - "type": "object", - "additionalProperties": false, - "description": "Source of error", - "properties": { - "pointer": { - "type": "string", - "description": "Pointer to source of error" - } + { + "hazardExposedTo": "Agent Orange", + "exposureLocation": "Vietnam", + "exposureDates": { + "beginDate": "1979-04", + "endDate": "1980-10" } } + ] + }, + "disabilities": [ + { + "name": "Diabetes", + "exposureOrEventOrInjury": "Agent Orange", + "serviceRelevance": "Service in Vietnam War", + "approximateDate": "1975-05", + "disabilityActionType": "NEW", + "isRelatedToToxicExposure": true + }, + { + "name": "Hearing Loss", + "exposureOrEventOrInjury": "Noise", + "serviceRelevance": "Heavy equipment operator in service", + "approximateDate": "1968-07", + "disabilityActionType": "INCREASE", + "classificationCode": "8987", + "ratedDisabilityId": "1234567", + "diagnosticCode": 5678, + "isRelatedToToxicExposure": false } - } - } - } - } - } - } - }, - "404": { - "description": "Resource not found", - "content": { - "application/json": { - "example": { - "errors": [ - { - "status": "404", - "title": "Resource not found", - "detail": "Resource not found" - } - ] - }, - "schema": { - "required": [ - "errors" - ], - "properties": { - "errors": { - "type": "array", - "items": { - "additionalProperties": false, - "required": [ - "title", - "detail" + ], + "treatments": [ + { + "beginDate": "2021-04", + "treatedDisabilityNames": [ + "Diabetes" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + }, + { + "beginDate": "1996-03", + "treatedDisabilityNames": [ + "Hearing Loss" + ], + "center": { + "name": "ATLANTA VA MEDICAL CENTER", + "state": "GA", + "city": "ATLANTA" + } + } + ], + "serviceInformation": { + "alternateNames": [ + "Jon Doe", + "Jane Doe" ], - "properties": { - "title": { - "type": "string", - "description": "HTTP error title" + "servicePeriods": [ + { + "serviceBranch": "Air Force", + "serviceComponent": "Active", + "activeDutyBeginDate": "1964-11-14", + "activeDutyEndDate": "1980-10-30", + "separationLocationCode": "98289" + } + ], + "servedInActiveCombatSince911": "NO", + "reservesNationalGuardService": { + "component": "National Guard", + "obligationTermsOfService": { + "beginDate": "1990-11-24", + "endDate": "1995-11-17" }, - "detail": { - "type": "string", - "description": "HTTP error detail" + "unitName": "National Guard Unit Name", + "unitAddress": "1243 Main Street", + "unitPhone": { + "areaCode": "555", + "phoneNumber": "5555555" }, - "status": { - "type": "string", - "description": "HTTP error status code" + "receivingInactiveDutyTrainingPay": "YES" + }, + "confinements": [ + { + "approximateBeginDate": "1970-06-11", + "approximateEndDate": "1970-09-11" } - } - } + ] + }, + "servicePay": { + "receivingMilitaryRetiredPay": "NO", + "futureMilitaryRetiredPay": "YES", + "futureMilitaryRetiredPayExplanation": "Explanation of future military retired pay", + "militaryRetiredPay": { + "branchOfService": "Air Force", + "monthlyAmount": 240 + }, + "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", + "favorMilitaryRetiredPay": false, + "receivedSeparationOrSeverancePay": "YES", + "separationSeverancePay": { + "datePaymentReceived": "2018-07-31", + "branchOfService": "Air Force", + "preTaxAmountReceived": 179 + }, + "favorTrainingPay": false + }, + "directDeposit": { + "accountNumber": "123123123123", + "accountType": "CHECKING", + "financialInstitutionName": "Chase", + "routingNumber": "123456789" + }, + "claimantCertification": true } } } } } - } - }, - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "attachment1": { - "type": "file", - "description": "Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in.\n" - }, - "attachment2": { - "type": "file", - "description": "Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in.\n" - } - } - } - } - } + }, + "required": true } } }, @@ -10055,9 +5741,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -11567,9 +7251,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -11842,9 +7524,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Retrieves a specific claim for a Veteran", @@ -11925,9 +7605,7 @@ "documentsNeeded": false, "endProductCode": "404", "evidenceWaiverSubmitted5103": false, - "errors": [ - - ], + "errors": [], "jurisdiction": "National Work Queue", "lighthouseId": null, "maxEstClaimDate": null, @@ -11935,9 +7613,7 @@ "status": "CANCELED", "submitterApplicationCode": "EBN", "submitterRoleCode": "VET", - "supportingDocuments": [ - - ], + "supportingDocuments": [], "tempJurisdiction": null, "trackedItems": [ { @@ -12027,13 +7703,9 @@ "status": "ERRORED", "submitterApplicationCode": null, "submitterRoleCode": null, - "supportingDocuments": [ - - ], + "supportingDocuments": [], "tempJurisdiction": null, - "trackedItems": [ - - ] + "trackedItems": [] } } } @@ -12438,9 +8110,7 @@ "decision_notification_sent": "No", "development_letter_sent": "No", "end_prdct_type_cd": "404", - "errors": [ - - ], + "errors": [], "poa": "RANDOM E PERSON", "program_type": "CPL", "ptcpnt_clmant_id": "111111111", @@ -12599,9 +8269,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Returns Veteran's last active Intent to File submission for given benefit type of compensation, pension, or survivor.", @@ -12843,9 +8511,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Establishes an Intent to File for disability compensation, pension, and survivor claims.", @@ -12871,8 +8537,8 @@ "id": "1", "type": "intent_to_file", "attributes": { - "creationDate": "2024-12-04", - "expirationDate": "2025-12-04", + "creationDate": "2024-12-16", + "expirationDate": "2025-12-16", "type": "compensation", "status": "active" } @@ -13190,9 +8856,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Validates an Intent to File for disability compensation, pension, and survivor claims.", @@ -13454,9 +9118,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "description": "Retrieves current Power of Attorney for Veteran or empty data if no POA is assigned.", @@ -13743,9 +9405,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -13768,7 +9428,7 @@ "application/json": { "example": { "data": { - "id": "1a9a1a53-d16d-43fa-99da-33c7f1be7c18", + "id": "3fb853d6-fe4f-4593-9ae4-b44d866cb3b5", "type": "individual", "attributes": { "code": "067", @@ -14518,9 +10178,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -14542,7 +10200,7 @@ "application/json": { "example": { "data": { - "id": "f98553d4-04f6-4e30-acc5-4e47417ddc0e", + "id": "20da46c4-10d5-4985-8113-db92597ac85f", "type": "organization", "attributes": { "code": "083", @@ -15201,9 +10859,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -15887,9 +11543,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -16508,9 +12162,7 @@ ] }, { - "bearer_token": [ - - ] + "bearer_token": [] } ], "parameters": [ @@ -16542,10 +12194,10 @@ "application/json": { "example": { "data": { - "id": "32035d7d-53c9-4af8-bb60-ad2f90ba9152", + "id": "38b49aa2-1163-4b42-9bc1-331a42404117", "type": "claimsApiPowerOfAttorneys", "attributes": { - "dateRequestAccepted": "2024-12-04", + "dateRequestAccepted": "2024-12-16", "previousPoa": null, "representative": { "serviceOrganization": { diff --git a/modules/claims_api/config/routes.rb b/modules/claims_api/config/routes.rb index d52efd8ccf2..1b4663d59ce 100644 --- a/modules/claims_api/config/routes.rb +++ b/modules/claims_api/config/routes.rb @@ -37,7 +37,6 @@ namespace :v2, defaults: { format: 'json' } do mount OkComputer::Engine, at: '/healthcheck' - post '/veteran-id:find', to: 'veteran_identifier#find', constraints: { find: /:find/ } namespace :veterans do get '/:veteranId/claims', to: 'claims#index' get '/:veteranId/claims/:id', to: 'claims#show' @@ -60,9 +59,7 @@ post '/:veteranId/intent-to-file', to: 'intent_to_file#submit' post '/:veteranId/intent-to-file/validate', to: 'intent_to_file#validate' ## 526 Forms - post '/:veteranId/526', to: 'disability_compensation#submit' post '/:veteranId/526/validate', to: 'disability_compensation#validate' - post '/:veteranId/526/:id/attachments', to: 'disability_compensation#attachments' post '/:veteranId/526/generatePDF/minimum-validations', to: 'disability_compensation#generate_pdf' post '/:veteranId/526/synchronous', to: 'disability_compensation#synchronous' end diff --git a/modules/claims_api/spec/controllers/v2/veterans/power_of_attorney/request_controller_spec.rb b/modules/claims_api/spec/controllers/v2/veterans/power_of_attorney/request_controller_spec.rb index 34dec9b5d19..3051a28075e 100644 --- a/modules/claims_api/spec/controllers/v2/veterans/power_of_attorney/request_controller_spec.rb +++ b/modules/claims_api/spec/controllers/v2/veterans/power_of_attorney/request_controller_spec.rb @@ -212,12 +212,33 @@ allow(Lockbox).to receive(:new).and_return(mock_lockbox) end - it 'enqueues the VANotifyDeclinedJob' do - mock_ccg(scopes) do |auth_header| - expect do - decide_request_with(proc_id: '76529', decision: 'DECLINED', auth_header:, ptcpnt_id: '123456789', - representative_id: '456') - end.to change(ClaimsApi::VANotifyDeclinedJob.jobs, :size).by(1) + context 'when the feature flag is enabled' do + before do + allow(Flipper).to receive(:enabled?).with(:lighthouse_claims_api_v2_poa_va_notify).and_return(true) + end + + it 'enqueues the VANotifyDeclinedJob' do + mock_ccg(scopes) do |auth_header| + expect do + decide_request_with(proc_id: '76529', decision: 'DECLINED', auth_header:, ptcpnt_id: '123456789', + representative_id: '456') + end.to change(ClaimsApi::VANotifyDeclinedJob.jobs, :size).by(1) + end + end + end + + context 'when the feature flag is disabled' do + before do + allow(Flipper).to receive(:enabled?).with(:lighthouse_claims_api_v2_poa_va_notify).and_return(false) + end + + it 'does not enqueue the VANotifyDeclinedJob' do + mock_ccg(scopes) do |auth_header| + expect do + decide_request_with(proc_id: '76529', decision: 'DECLINED', auth_header:, ptcpnt_id: '123456789', + representative_id: '456') + end.not_to change(ClaimsApi::VANotifyDeclinedJob.jobs, :size) + end end end end diff --git a/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_validation_spec.rb b/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_validation_spec.rb index a2e7ac06596..bc3e2d4dae2 100644 --- a/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_validation_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_validation_spec.rb @@ -471,6 +471,8 @@ def current_error_array end describe 'validation for BDD_PROGRAM claim' do + future_date = "#{Time.current.year + 1}-12-20" + let(:valid_service_info_for_bdd) do { 'servicePeriods' => [ @@ -478,7 +480,7 @@ def current_error_array 'serviceBranch' => 'Air Force Reserves', 'serviceComponent' => 'Reserves', 'activeDutyBeginDate' => '2015-11-14', - 'activeDutyEndDate' => '2024-12-20' + 'activeDutyEndDate' => future_date } ], 'reservesNationalGuardService' => { @@ -497,7 +499,7 @@ def current_error_array }, 'federalActivation' => { 'activationDate' => '2023-10-01', - 'anticipatedSeparationDate' => '2024-12-20' + 'anticipatedSeparationDate' => future_date } } end diff --git a/modules/claims_api/spec/requests/v2/rswag_veteran_identifier_spec.rb b/modules/claims_api/spec/requests/v2/rswag_veteran_identifier_spec.rb index 685b9e4db0c..d91a1e1dbc6 100644 --- a/modules/claims_api/spec/requests/v2/rswag_veteran_identifier_spec.rb +++ b/modules/claims_api/spec/requests/v2/rswag_veteran_identifier_spec.rb @@ -6,7 +6,8 @@ require_relative '../../rails_helper' require_relative '../../support/swagger_shared_components/v2' -describe 'Veteran Identifier', openapi_spec: Rswag::TextHelpers.new.claims_api_docs do # rubocop:disable RSpec/DescribeClass +describe 'Veteran Identifier', openapi_spec: Rswag::TextHelpers.new.claims_api_docs, # rubocop:disable RSpec/DescribeClass + skip: 'Disabling tests for deactivated veteran-id:find endpoint' do before do stub_mpi(profile) end diff --git a/modules/claims_api/spec/requests/v2/veteran_identifier_spec.rb b/modules/claims_api/spec/requests/v2/veteran_identifier_spec.rb index b118054e425..44f2bd3281b 100644 --- a/modules/claims_api/spec/requests/v2/veteran_identifier_spec.rb +++ b/modules/claims_api/spec/requests/v2/veteran_identifier_spec.rb @@ -5,6 +5,7 @@ require_relative '../../rails_helper' RSpec.describe 'ClaimsApi::V2::VeteranIdentifier', openapi_spec: Rswag::TextHelpers.new.claims_api_docs, + skip: 'Disabling tests for deactivated veteran-id:find endpoint', type: :request do let(:path) { '/services/claims/v2/veteran-id:find' } let(:data) do diff --git a/modules/claims_api/spec/requests/v2/veterans/526_spec.rb b/modules/claims_api/spec/requests/v2/veterans/526_spec.rb index 9ce91a84bc5..08ff4a4a507 100644 --- a/modules/claims_api/spec/requests/v2/veterans/526_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/526_spec.rb @@ -49,7 +49,7 @@ let(:schema) { Rails.root.join('modules', 'claims_api', 'config', 'schemas', 'v2', '526.json').read } let(:veteran_id) { '1013062086V794840' } - context 'submit' do + describe 'submit', skip: 'Disabling tests for deactivated /veterans/{veteranId}/526 endpoint' do let(:submit_path) { "/services/claims/v2/veterans/#{veteran_id}/526" } let(:validate_path) { "/services/claims/v2/veterans/#{veteran_id}/526/validate" } @@ -4073,93 +4073,95 @@ def update_json_and_submit(updated_json_lambda) end end - context 'attachments' do - let(:auto_claim) { create(:auto_established_claim) } - let(:attachments_path) do - "/services/claims/v2/veterans/#{veteran_id}/526/#{auto_claim.id}/attachments" - end - let(:target_veteran) do - OpenStruct.new( - icn: veteran_id, - first_name: 'abraham', - last_name: 'lincoln', - loa: { current: 3, highest: 3 }, - ssn: '796111863', - edipi: '8040545646', - participant_id: '600061742', - mpi: OpenStruct.new( + describe 'attachments', skip: 'Disabling tests for deactivated /veterans/{veteranId}/526/{id}/attachments' do + context 'attachments' do + let(:auto_claim) { create(:auto_established_claim) } + let(:attachments_path) do + "/services/claims/v2/veterans/#{veteran_id}/526/#{auto_claim.id}/attachments" + end + let(:target_veteran) do + OpenStruct.new( icn: veteran_id, - profile: OpenStruct.new(ssn: '796111863') + first_name: 'abraham', + last_name: 'lincoln', + loa: { current: 3, highest: 3 }, + ssn: '796111863', + edipi: '8040545646', + participant_id: '600061742', + mpi: OpenStruct.new( + icn: veteran_id, + profile: OpenStruct.new(ssn: '796111863') + ) ) - ) - end - - describe 'with binary params' do - let(:binary_params) do - { attachment1: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment2: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s) } end - it 'responds with a 202' do - mock_ccg(scopes) do |auth_header| - allow_any_instance_of(ClaimsApi::V2::ApplicationController) - .to receive(:target_veteran).and_return(target_veteran) - post attachments_path, params: binary_params, headers: auth_header - expect(response).to have_http_status(:accepted) + describe 'with binary params' do + let(:binary_params) do + { attachment1: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment2: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s) } end - end - end - describe 'with base 64 params' do - let(:base64_params) do - { attachment1: File.read(Rails.root.join(*'/modules/claims_api/spec/fixtures/base64pdf'.split('/')).to_s), - attachment2: File.read(Rails.root.join(*'/modules/claims_api/spec/fixtures/base64pdf'.split('/')).to_s) } + it 'responds with a 202' do + mock_ccg(scopes) do |auth_header| + allow_any_instance_of(ClaimsApi::V2::ApplicationController) + .to receive(:target_veteran).and_return(target_veteran) + post attachments_path, params: binary_params, headers: auth_header + expect(response).to have_http_status(:accepted) + end + end end - it 'responds with a 202' do - mock_ccg(scopes) do |auth_header| - allow_any_instance_of(ClaimsApi::V2::ApplicationController) - .to receive(:target_veteran).and_return(target_veteran) - post attachments_path, params: base64_params, headers: auth_header - expect(response).to have_http_status(:accepted) + describe 'with base 64 params' do + let(:base64_params) do + { attachment1: File.read(Rails.root.join(*'/modules/claims_api/spec/fixtures/base64pdf'.split('/')).to_s), + attachment2: File.read(Rails.root.join(*'/modules/claims_api/spec/fixtures/base64pdf'.split('/')).to_s) } + end + + it 'responds with a 202' do + mock_ccg(scopes) do |auth_header| + allow_any_instance_of(ClaimsApi::V2::ApplicationController) + .to receive(:target_veteran).and_return(target_veteran) + post attachments_path, params: base64_params, headers: auth_header + expect(response).to have_http_status(:accepted) + end end end - end - describe 'with more then 10 attachments' do - let(:binary_params) do - { attachment1: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment2: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment3: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment4: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment5: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment7: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment6: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment8: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment9: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment10: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s), - attachment11: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' - .split('/')).to_s) } - end - - it 'responds with a 422' do - mock_ccg(scopes) do |auth_header| - allow_any_instance_of(ClaimsApi::V2::ApplicationController) - .to receive(:target_veteran).and_return(target_veteran) - post attachments_path, params: binary_params, headers: auth_header - expect(response).to have_http_status(:unprocessable_entity) + describe 'with more then 10 attachments' do + let(:binary_params) do + { attachment1: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment2: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment3: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment4: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment5: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment7: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment6: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment8: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment9: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment10: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s), + attachment11: Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf' + .split('/')).to_s) } + end + + it 'responds with a 422' do + mock_ccg(scopes) do |auth_header| + allow_any_instance_of(ClaimsApi::V2::ApplicationController) + .to receive(:target_veteran).and_return(target_veteran) + post attachments_path, params: binary_params, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end end end end @@ -4243,7 +4245,8 @@ def update_json_and_submit(updated_json_lambda) end end - describe 'POST #submit not using md5 lookup' do + describe 'POST #submit not using md5 lookup', + skip: 'Disabling tests for deactivated /veterans/{veteranId}/526 endpoint' do let(:anticipated_separation_date) { 2.days.from_now.strftime('%Y-%m-%d') } let(:active_duty_end_date) { 2.days.from_now.strftime('%Y-%m-%d') } let(:data) do diff --git a/modules/claims_api/spec/requests/v2/veterans/rswag_526_spec.rb b/modules/claims_api/spec/requests/v2/veterans/rswag_526_spec.rb index c0d5ee0a3ce..f933317d761 100644 --- a/modules/claims_api/spec/requests/v2/veterans/rswag_526_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/rswag_526_spec.rb @@ -26,77 +26,146 @@ def append_example_metadata(example, response) } end - path '/veterans/{veteranId}/526', vcr: 'claims_api/disability_comp' do - post 'Asynchronously establishes disability compensation claim' do - tags 'Disability Compensation Claims' - operationId 'post526Claim' - security [ - { productionOauth: ['system/claim.read', 'system/claim.write'] }, - { sandboxOauth: ['system/claim.read', 'system/claim.write'] }, - { bearer_token: [] } - ] - consumes 'application/json' - produces 'application/json' + describe '526 submit', skip: 'Disabling tests for deactivated /veterans/{veteranId}/526 endpoint' do + path '/veterans/{veteranId}/526', vcr: 'claims_api/disability_comp' do + post 'Asynchronously establishes disability compensation claim' do + tags 'Disability Compensation Claims' + operationId 'post526Claim' + security [ + { productionOauth: ['system/claim.read', 'system/claim.write'] }, + { sandboxOauth: ['system/claim.read', 'system/claim.write'] }, + { bearer_token: [] } + ] + consumes 'application/json' + produces 'application/json' + + get_schema_description = <<~VERBIAGE + Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS).#{' '} + This endpoint generates a filled and electronically signed 526EZ form, establishes the disability claim in VBMS, and#{' '} + submits the form to the Veteran's eFolder. + + A 202 response indicates the API submission was accepted. The claim has not reached VBMS until it has a CLAIM_RECEIVED status.#{' '} + Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. + + **A substantially complete 526EZ claim must include:** + * Veteran's name + * Sufficient service information for VA to verify the claimed service + * At least one claimed disability or medical condition and how it relates to service + * Veteran and/or Representative signature + + **Standard and fully developed claims (FDCs)** + + [Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/) + are claims certified by the submitter to include all information needed for processing. These claims process faster#{' '} + than claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information,#{' '} + it will be processed as a standard claim. + + To certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM. + VERBIAGE + description get_schema_description + parameter name: 'veteranId', + in: :path, + required: true, + type: :string, + example: '1012667145V762142', + description: 'ID of Veteran' + + let(:veteranId) { '1013062086V794840' } # rubocop:disable RSpec/VariableName + let(:Authorization) { 'Bearer token' } + + let(:scopes) { %w[system/claim.read system/claim.write] } + + request_template = JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'form_526_json_api.json').read) + request_template['data']['attributes']['serviceInformation'].delete('federalActivation') + request_template['data']['attributes']['serviceInformation']['servicePeriods'].each do |per| + per.delete('separationLocationCode') + end - get_schema_description = <<~VERBIAGE - Automatically establishes a disability compensation claim (21-526EZ) in Veterans Benefits Management System (VBMS).#{' '} - This endpoint generates a filled and electronically signed 526EZ form, establishes the disability claim in VBMS, and#{' '} - submits the form to the Veteran's eFolder. + parameter name: :disability_comp_request, in: :body, + schema: SwaggerSharedComponents::V2.body_examples[:disability_compensation][:schema] - A 202 response indicates the API submission was accepted. The claim has not reached VBMS until it has a CLAIM_RECEIVED status.#{' '} - Check claim status using the GET veterans/{veteranId}/claims/{id} endpoint. + parameter in: :body, examples: { + 'Minimum Required Attributes' => { + value: JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'valid_526_minimum.json').read) + }, + 'Maximum Attributes' => { + value: request_template - **A substantially complete 526EZ claim must include:** - * Veteran's name - * Sufficient service information for VA to verify the claimed service - * At least one claimed disability or medical condition and how it relates to service - * Veteran and/or Representative signature + } + } - **Standard and fully developed claims (FDCs)** + describe 'Getting a successful response' do + response '202', 'Successful response' do + let(:claim_date) { (Time.zone.today - 1.day).to_s } + let(:anticipated_separation_date) { 2.days.from_now.strftime('%Y-%m-%d') } + let(:data) do + temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'form_526_json_api.json').read + temp = JSON.parse(temp) + attributes = temp['data']['attributes'] + attributes['serviceInformation']['federalActivation']['anticipatedSeparationDate'] = + anticipated_separation_date + temp['data']['attributes'] = attributes + temp.to_json + temp + end - [Fully developed claims (FDCs)](https://www.va.gov/disability/how-to-file-claim/evidence-needed/fully-developed-claims/) - are claims certified by the submitter to include all information needed for processing. These claims process faster#{' '} - than claims submitted through the standard claim process. If a claim is certified for the FDC, but is missing needed information,#{' '} - it will be processed as a standard claim. + let(:disability_comp_request) do + data + end - To certify a claim for the FDC process, set the claimProcessType to FDC_PROGRAM. - VERBIAGE - description get_schema_description - parameter name: 'veteranId', - in: :path, - required: true, - type: :string, - example: '1012667145V762142', - description: 'ID of Veteran' + schema SwaggerSharedComponents::V2.schemas[:disability_compensation] - let(:veteranId) { '1013062086V794840' } # rubocop:disable RSpec/VariableName - let(:Authorization) { 'Bearer token' } + before do |example| + mock_ccg(scopes) do + submit_request(example.metadata) + end + end - let(:scopes) { %w[system/claim.read system/claim.write] } + it 'returns a valid 202 response' do |example| + assert_response_matches_metadata(example.metadata) + end + end + end - request_template = JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'form_526_json_api.json').read) - request_template['data']['attributes']['serviceInformation'].delete('federalActivation') - request_template['data']['attributes']['serviceInformation']['servicePeriods'].each do |per| - per.delete('separationLocationCode') - end + describe 'Getting an unauthorized response' do + response '401', 'Unauthorized' do + schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', + 'disability_compensation', 'default.json').read) - parameter name: :disability_comp_request, in: :body, - schema: SwaggerSharedComponents::V2.body_examples[:disability_compensation][:schema] + let(:data) do + temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'form_526_json_api.json').read + temp = JSON.parse(temp) + temp + end - parameter in: :body, examples: { - 'Minimum Required Attributes' => { - value: JSON.parse(Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'valid_526_minimum.json').read) - }, - 'Maximum Attributes' => { - value: request_template + let(:disability_comp_request) do + data + end - } - } + before do |example| + # skip ccg authorization to fail authorization + submit_request(example.metadata) + end - describe 'Getting a successful response' do - response '202', 'Successful response' do + after do |example| + example.metadata[:response][:content] = { + 'application/json' => { + example: JSON.parse(response.body, symbolize_names: true) + } + } + end + + it 'returns a 401 response' do |example| + assert_response_matches_metadata(example.metadata) + end + end + end + + describe 'Getting a 404 response' do let(:claim_date) { (Time.zone.today - 1.day).to_s } let(:anticipated_separation_date) { 2.days.from_now.strftime('%Y-%m-%d') } let(:data) do @@ -115,41 +184,14 @@ def append_example_metadata(example, response) data end - schema SwaggerSharedComponents::V2.schemas[:disability_compensation] - before do |example| + expect(ClaimsApi::Veteran).to receive(:new).and_return(veteran) + allow(veteran).to receive(:mpi).and_return(nil) mock_ccg(scopes) do submit_request(example.metadata) end end - it 'returns a valid 202 response' do |example| - assert_response_matches_metadata(example.metadata) - end - end - end - - describe 'Getting an unauthorized response' do - response '401', 'Unauthorized' do - schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', - 'disability_compensation', 'default.json').read) - - let(:data) do - temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'form_526_json_api.json').read - temp = JSON.parse(temp) - temp - end - - let(:disability_comp_request) do - data - end - - before do |example| - # skip ccg authorization to fail authorization - submit_request(example.metadata) - end - after do |example| example.metadata[:response][:content] = { 'application/json' => { @@ -158,109 +200,69 @@ def append_example_metadata(example, response) } end - it 'returns a 401 response' do |example| - assert_response_matches_metadata(example.metadata) - end - end - end + response '404', 'Resource not found' do + schema JSON.parse( + Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', + 'disability_compensation', 'default_without_source.json').read + ) - describe 'Getting a 404 response' do - let(:claim_date) { (Time.zone.today - 1.day).to_s } - let(:anticipated_separation_date) { 2.days.from_now.strftime('%Y-%m-%d') } - let(:data) do - temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'form_526_json_api.json').read - temp = JSON.parse(temp) - attributes = temp['data']['attributes'] - attributes['serviceInformation']['federalActivation']['anticipatedSeparationDate'] = - anticipated_separation_date - temp['data']['attributes'] = attributes - temp.to_json - temp - end - - let(:disability_comp_request) do - data - end - - before do |example| - expect(ClaimsApi::Veteran).to receive(:new).and_return(veteran) - allow(veteran).to receive(:mpi).and_return(nil) - mock_ccg(scopes) do - submit_request(example.metadata) + it 'returns a 404 response' do |example| + assert_response_matches_metadata(example.metadata) + end end end - after do |example| - example.metadata[:response][:content] = { - 'application/json' => { - example: JSON.parse(response.body, symbolize_names: true) - } - } - end - - response '404', 'Resource not found' do - schema JSON.parse( - Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', - 'disability_compensation', 'default_without_source.json').read - ) - - it 'returns a 404 response' do |example| - assert_response_matches_metadata(example.metadata) - end - end - end + describe 'Getting an unprocessable entity response' do + response '422', 'Unprocessable entity' do + schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', + 'disability_compensation', 'default_with_source.json').read) - describe 'Getting an unprocessable entity response' do - response '422', 'Unprocessable entity' do - schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', - 'disability_compensation', 'default_with_source.json').read) - - def make_request(example) - mock_ccg(scopes) do - submit_request(example.metadata) + def make_request(example) + mock_ccg(scopes) do + submit_request(example.metadata) + end end - end - context 'Violates JSON Schema' do - let(:data) { { data: { attributes: nil } } } + context 'Violates JSON Schema' do + let(:data) { { data: { attributes: nil } } } - let(:disability_comp_request) do - data - end + let(:disability_comp_request) do + data + end - before do |example| - make_request(example) - end + before do |example| + make_request(example) + end - after do |example| - append_example_metadata(example, response) - end + after do |example| + append_example_metadata(example, response) + end - it 'returns a 422 response' do |example| - assert_response_matches_metadata(example.metadata) + it 'returns a 422 response' do |example| + assert_response_matches_metadata(example.metadata) + end end - end - context 'Not a JSON Object' do - let(:data) do - 'This is not valid JSON' - end + context 'Not a JSON Object' do + let(:data) do + 'This is not valid JSON' + end - let(:disability_comp_request) do - data - end + let(:disability_comp_request) do + data + end - before do |example| - make_request(example) - end + before do |example| + make_request(example) + end - after do |example| - append_example_metadata(example, response) - end + after do |example| + append_example_metadata(example, response) + end - it 'returns a 422 response' do |example| - assert_response_matches_metadata(example.metadata) + it 'returns a 422 response' do |example| + assert_response_matches_metadata(example.metadata) + end end end end @@ -730,175 +732,177 @@ def make_request(example) end end - path '/veterans/{veteranId}/526/{id}/attachments', vcr: 'claims_api/disability_comp' do - post 'Upload documents supporting a 526 claim' do - tags 'Disability Compensation Claims' - operationId 'upload526Attachments' - security [ - { productionOauth: ['system/claim.read', 'system/claim.write'] }, - { sandboxOauth: ['system/claim.read', 'system/claim.write'] }, - { bearer_token: [] } - ] - consumes 'multipart/form-data' - produces 'application/json' - put_description = <<~VERBIAGE - Uploads supporting documents related to a disability compensation claim. This endpoint accepts a document binary PDF as part of a multi-part payload. - VERBIAGE - description put_description - - parameter name: :id, in: :path, required: true, type: :string, - description: 'UUID given when Disability Claim was submitted' - - parameter name: 'veteranId', - in: :path, - required: true, - type: :string, - example: '1012667145V762142', - description: 'ID of Veteran' - - let(:veteranId) { '1013062086V794840' } # rubocop:disable RSpec/VariableName - let(:Authorization) { 'Bearer token' } - - attachment_description = <<~VERBIAGE - Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in. - VERBIAGE - parameter name: :attachment1, - in: :formData, - schema: { - type: :object, - properties: { - attachment1: { - type: :file, - description: attachment_description - }, - attachment2: { - type: :file, - description: attachment_description + describe '526 attachments', skip: 'Disabling tests for deactivated /veterans/{veteranId}/526/{id}/attachments' do + path '/veterans/{veteranId}/526/{id}/attachments', vcr: 'claims_api/disability_comp' do + post 'Upload documents supporting a 526 claim' do + tags 'Disability Compensation Claims' + operationId 'upload526Attachments' + security [ + { productionOauth: ['system/claim.read', 'system/claim.write'] }, + { sandboxOauth: ['system/claim.read', 'system/claim.write'] }, + { bearer_token: [] } + ] + consumes 'multipart/form-data' + produces 'application/json' + put_description = <<~VERBIAGE + Uploads supporting documents related to a disability compensation claim. This endpoint accepts a document binary PDF as part of a multi-part payload. + VERBIAGE + description put_description + + parameter name: :id, in: :path, required: true, type: :string, + description: 'UUID given when Disability Claim was submitted' + + parameter name: 'veteranId', + in: :path, + required: true, + type: :string, + example: '1012667145V762142', + description: 'ID of Veteran' + + let(:veteranId) { '1013062086V794840' } # rubocop:disable RSpec/VariableName + let(:Authorization) { 'Bearer token' } + + attachment_description = <<~VERBIAGE + Attachment contents. Must be provided in binary PDF or [base64 string](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-api/master/modules/claims_api/spec/fixtures/base64pdf) format and less than 11 in x 11 in. + VERBIAGE + parameter name: :attachment1, + in: :formData, + schema: { + type: :object, + properties: { + attachment1: { + type: :file, + description: attachment_description + }, + attachment2: { + type: :file, + description: attachment_description + } } } - } - describe 'Getting an accepted response' do - response '202', 'upload response' do - schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', - 'veterans', 'disability_compensation', 'attachments.json').read) + describe 'Getting an accepted response' do + response '202', 'upload response' do + schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', + 'veterans', 'disability_compensation', 'attachments.json').read) - let(:data) do - temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'form_526_json_api.json').read - temp = JSON.parse(temp) + let(:data) do + temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'form_526_json_api.json').read + temp = JSON.parse(temp) - temp - end + temp + end - let(:scopes) { %w[system/claim.write] } - let(:auto_claim) { create(:auto_established_claim_v2) } - let(:attachment1) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:attachment2) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:id) { auto_claim.id } + let(:scopes) { %w[system/claim.write] } + let(:auto_claim) { create(:auto_established_claim_v2) } + let(:attachment1) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:attachment2) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:id) { auto_claim.id } - before do |example| - mock_ccg(scopes) do - submit_request(example.metadata) + before do |example| + mock_ccg(scopes) do + submit_request(example.metadata) + end end - end - after do |example| - example.metadata[:response][:content] = { - 'application/json' => { - example: JSON.parse(response.body, symbolize_names: true) + after do |example| + example.metadata[:response][:content] = { + 'application/json' => { + example: JSON.parse(response.body, symbolize_names: true) + } } - } - end + end - it 'returns a valid 202 response' do |example| - assert_response_matches_metadata(example.metadata) + it 'returns a valid 202 response' do |example| + assert_response_matches_metadata(example.metadata) + end end end - end - describe 'Getting a 401 response' do - response '401', 'Unauthorized' do - schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', - 'disability_compensation', 'default.json').read) + describe 'Getting a 401 response' do + response '401', 'Unauthorized' do + schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', + 'disability_compensation', 'default.json').read) - let(:data) do - temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', - 'disability_compensation', 'form_526_json_api.json').read - temp = JSON.parse(temp) + let(:data) do + temp = Rails.root.join('modules', 'claims_api', 'spec', 'fixtures', 'v2', 'veterans', + 'disability_compensation', 'form_526_json_api.json').read + temp = JSON.parse(temp) - temp - end + temp + end - let(:scopes) { %w[system/claim.write] } - let(:auto_claim) { create(:auto_established_claim) } - let(:attachment1) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:attachment2) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:id) { auto_claim.id } - let(:Authorization) { nil } + let(:scopes) { %w[system/claim.write] } + let(:auto_claim) { create(:auto_established_claim) } + let(:attachment1) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:attachment2) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:id) { auto_claim.id } + let(:Authorization) { nil } - before do |example| - submit_request(example.metadata) - end + before do |example| + submit_request(example.metadata) + end - after do |example| - example.metadata[:response][:content] = { - 'application/json' => { - example: JSON.parse(response.body, symbolize_names: true) + after do |example| + example.metadata[:response][:content] = { + 'application/json' => { + example: JSON.parse(response.body, symbolize_names: true) + } } - } - end + end - it 'returns a 401 response' do |example| - assert_response_matches_metadata(example.metadata) + it 'returns a 401 response' do |example| + assert_response_matches_metadata(example.metadata) + end end end - end - describe 'Getting a 404 response' do - response '404', 'Resource not found' do - schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', - 'disability_compensation', 'default_without_source.json').read) + describe 'Getting a 404 response' do + response '404', 'Resource not found' do + schema JSON.parse(Rails.root.join('spec', 'support', 'schemas', 'claims_api', 'v2', 'errors', + 'disability_compensation', 'default_without_source.json').read) - let(:scopes) { %w[claim.write] } - let(:attachment1) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:attachment2) do - Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) - .to_s) - end - let(:id) { 999_999_999 } + let(:scopes) { %w[claim.write] } + let(:attachment1) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:attachment2) do + Rack::Test::UploadedFile.new(Rails.root.join(*'/modules/claims_api/spec/fixtures/extras.pdf'.split('/')) + .to_s) + end + let(:id) { 999_999_999 } - before do |example| - mock_ccg(scopes) do - submit_request(example.metadata) + before do |example| + mock_ccg(scopes) do + submit_request(example.metadata) + end end - end - after do |example| - example.metadata[:response][:content] = { - 'application/json' => { - example: JSON.parse(response.body, symbolize_names: true) + after do |example| + example.metadata[:response][:content] = { + 'application/json' => { + example: JSON.parse(response.body, symbolize_names: true) + } } - } - end + end - it 'returns a 404 response' do |example| - assert_response_matches_metadata(example.metadata) + it 'returns a 404 response' do |example| + assert_response_matches_metadata(example.metadata) + end end end end diff --git a/modules/claims_api/spec/support/rswag_config.rb b/modules/claims_api/spec/support/rswag_config.rb index 264da3585fb..589e7b121c8 100644 --- a/modules/claims_api/spec/support/rswag_config.rb +++ b/modules/claims_api/spec/support/rswag_config.rb @@ -98,10 +98,6 @@ def config # rubocop:disable Metrics/MethodLength description: File.read(ClaimsApi::Engine.root.join('app', 'swagger', 'claims_api', 'description', 'v2.md')) }, tags: [ - { - name: 'Veteran Identifier', - description: "Allows authenticated veterans and veteran representatives to retrieve a veteran's id." - }, { name: 'Claims', description: <<~VERBIAGE diff --git a/modules/covid_vaccine/app/services/covid_vaccine/v0/enrollment_upload_service.rb b/modules/covid_vaccine/app/services/covid_vaccine/v0/enrollment_upload_service.rb index 7c5f4325779..1aadc16a95c 100644 --- a/modules/covid_vaccine/app/services/covid_vaccine/v0/enrollment_upload_service.rb +++ b/modules/covid_vaccine/app/services/covid_vaccine/v0/enrollment_upload_service.rb @@ -12,7 +12,14 @@ def initialize(io, file_name) attr_reader :io, :file_name def upload - Net::SFTP.start(sftp_host, sftp_username, password: sftp_password, port: sftp_port) do |sftp| + Net::SFTP.start( + sftp_host, + sftp_username, + password: sftp_password, + port: sftp_port, + kex: sftp_kex_algorithms, + host_key: sftp_host_key_algorithms + ) do |sftp| sftp.upload!(@io, file_name, name: file_name, progress: EnrollmentHandler.new) end end @@ -34,6 +41,14 @@ def sftp_password def sftp_port Settings.covid_vaccine.enrollment_service.sftp.port end + + def sftp_kex_algorithms + Settings.covid_vaccine.enrollment_service.sftp.kex_algorithms.split(',') + end + + def sftp_host_key_algorithms + Settings.covid_vaccine.enrollment_service.sftp.host_key_algorithms.split(',') + end end end end diff --git a/modules/covid_vaccine/spec/services/covid_vaccine/v0/enrollment_upload_service_spec.rb b/modules/covid_vaccine/spec/services/covid_vaccine/v0/enrollment_upload_service_spec.rb index 43ea8610722..4f0834c6035 100644 --- a/modules/covid_vaccine/spec/services/covid_vaccine/v0/enrollment_upload_service_spec.rb +++ b/modules/covid_vaccine/spec/services/covid_vaccine/v0/enrollment_upload_service_spec.rb @@ -24,15 +24,19 @@ let(:username) { 'mysftp_username' } let(:password) { 'mysftp_password' } let(:port) { 9999 } + let(:host_key) { ['fake_host_key_algorithms'] } + let(:kex) { ['fake_kex_algorithms'] } let(:sftp_connection_double) { double(:sftp_connection_double, upload!: true, download!: true) } let(:sftp_double) { double(:sftp, sftp: sftp_connection_double) } let(:handler) { CovidVaccine::V0::EnrollmentHandler } it 'responds to upload' do with_settings(Settings.covid_vaccine.enrollment_service.sftp, host:, username:, - password:, port:) do + password:, port:, + kex:, host_key:) do expect(Net::SFTP).to receive(:start).with(host, username, password:, - port:).and_yield(sftp_connection_double) + port:, + kex:, host_key:).and_yield(sftp_connection_double) expect(sftp_connection_double) .to receive(:upload!).with(subject.io, file_name, name: file_name, progress: instance_of(handler)) subject.upload diff --git a/modules/debts_api/app/models/debts_api/v0/form5655_submission.rb b/modules/debts_api/app/models/debts_api/v0/form5655_submission.rb index e4b578a14c2..e09a3f25242 100644 --- a/modules/debts_api/app/models/debts_api/v0/form5655_submission.rb +++ b/modules/debts_api/app/models/debts_api/v0/form5655_submission.rb @@ -73,7 +73,7 @@ def set_vha_completed_state(status, options) submission.submitted! StatsD.increment("#{STATS_KEY}.vha.success") else - submission.failed! + submission.register_failure("VHA set completed state: #{status.failure_info}") StatsD.increment("#{STATS_KEY}.vha.failure") Rails.logger.error('Batch FSR Processing Failed', status.failure_info) end @@ -81,6 +81,9 @@ def set_vha_completed_state(status, options) def register_failure(message) failed! + if message.blank? + message = "An unknown error occurred while submitting the form from call_location: #{caller_locations&.first}" + end update(error_message: message) Rails.logger.error("Form5655Submission id: #{id} failed", message) StatsD.increment("#{STATS_KEY}.failure") diff --git a/modules/debts_api/app/sidekiq/debts_api/v0/form5655/vha/vbs_submission_job.rb b/modules/debts_api/app/sidekiq/debts_api/v0/form5655/vha/vbs_submission_job.rb index c93dba7c128..a7bab2c8ef5 100644 --- a/modules/debts_api/app/sidekiq/debts_api/v0/form5655/vha/vbs_submission_job.rb +++ b/modules/debts_api/app/sidekiq/debts_api/v0/form5655/vha/vbs_submission_job.rb @@ -12,14 +12,21 @@ class V0::Form5655::VHA::VBSSubmissionJob class MissingUserAttributesError < StandardError; end - sidekiq_retries_exhausted do |job, _ex| + sidekiq_retries_exhausted do |job, ex| StatsD.increment("#{STATS_KEY}.failure") # Deprecate this in favor of exhausted naming convention below StatsD.increment("#{STATS_KEY}.retries_exhausted") submission_id = job['args'][0] user_uuid = job['args'][1] - UserProfileAttributes.find(user_uuid)&.destroy + submission = DebtsApi::V0::Form5655Submission.find(submission_id) - submission.register_failure("VBS Submission Failed: #{job['error_message']}.") + submission.register_failure("VBS Submission Failed: #{ex.message}") + + Rails.logger.error <<~LOG + V0::Form5655::VHA::VBSSubmissionJob retries exhausted: + submission_id: #{submission_id} | user_id: #{user_uuid} + Exception: #{ex.class} - #{ex.message} + Backtrace: #{ex.backtrace.join("\n")} + LOG end def perform(submission_id, user_uuid) diff --git a/modules/debts_api/spec/models/debt_api/v0/form5655_submission_spec.rb b/modules/debts_api/spec/models/debt_api/v0/form5655_submission_spec.rb index 929a557b1b0..fc465ce2415 100644 --- a/modules/debts_api/spec/models/debt_api/v0/form5655_submission_spec.rb +++ b/modules/debts_api/spec/models/debt_api/v0/form5655_submission_spec.rb @@ -153,7 +153,7 @@ it 'sets the submission as failed' do allow(Rails.logger).to receive(:error) described_class.new.set_vha_completed_state(status, { 'submission_id' => form5655_submission.id }) - expect(form5655_submission.failed?).to eq(true) + expect(form5655_submission.error_message).to eq("VHA set completed state: [\"#{id}\"]") expect(Rails.logger).to have_received(:error).with('Batch FSR Processing Failed', [id]) end end @@ -173,6 +173,13 @@ expect(form5655_submission.error_message).to eq(message) end + it 'saves generic error message with call_location when message is blank' do + form5655_submission.register_failure(nil) + expect(form5655_submission.error_message).to start_with( + 'An unknown error occurred while submitting the form from call_location:' + ) + end + context 'combined form' do it 'saves error message and logs error' do form5655_submission.public_metadata = { combined: true } diff --git a/modules/debts_api/spec/sidekiq/debt_api/v0/vha/vbs_submission_job_spec.rb b/modules/debts_api/spec/sidekiq/debt_api/v0/vha/vbs_submission_job_spec.rb index a31ff8ead66..2fffc450b65 100644 --- a/modules/debts_api/spec/sidekiq/debt_api/v0/vha/vbs_submission_job_spec.rb +++ b/modules/debts_api/spec/sidekiq/debt_api/v0/vha/vbs_submission_job_spec.rb @@ -9,38 +9,53 @@ let(:form_submission) { build(:debts_api_form5655_submission) } let(:user) { build(:user, :loa3) } let(:user_data) { build(:user_profile_attributes) } - let(:msg) do - { - 'class' => 'YourJobClassName', - 'args' => %w[123 123-abc], - 'jid' => '12345abcde', - 'retry_count' => 5 - } - end context 'when all retries are exhausted' do + let(:form_submission) { create(:debts_api_form5655_submission) } + + let(:config) { described_class } + let(:standard_exception) do + e = StandardError.new('abc-123') + allow(e).to receive(:backtrace).and_return(%w[backtrace1 backtrace2]) + e + end + let(:msg) do + { + 'class' => 'YourJobClassName', + 'args' => [form_submission.id, '123-abc'], + 'jid' => '12345abcde', + 'retry_count' => 5 + } + end + before do allow(DebtsApi::V0::Form5655Submission).to receive(:find).and_return(form_submission) end - it 'sets submission to failure' do - described_class.within_sidekiq_retries_exhausted_block({ 'jid' => 123 }) do - expect(form_submission).to receive(:register_failure) - end - end + it 'increments the retries exhausted counter and logs error information' do + expected_log_message = <<~LOG + V0::Form5655::VHA::VBSSubmissionJob retries exhausted: + submission_id: #{form_submission.id} | user_id: 123-abc + Exception: #{standard_exception.class} - #{standard_exception.message} + Backtrace: #{standard_exception.backtrace.join("\n")} + LOG - it 'increments the retries exhausted counter' do statsd_key = DebtsApi::V0::Form5655::VHA::VBSSubmissionJob::STATS_KEY ["#{statsd_key}.failure", "#{statsd_key}.retries_exhausted", 'api.fsr_submission.failure'].each do |key| expect(StatsD).to receive(:increment).with(key) end + expect(Rails.logger).to receive(:error).with( + "Form5655Submission id: #{form_submission.id} failed", 'VBS Submission Failed: abc-123' + ) expect(StatsD).to receive(:increment).with( 'silent_failure', { tags: %w[service:debt-resolution function:register_failure] } ) - described_class.sidekiq_retries_exhausted_block.call(msg, StandardError.new('abc-123')) + expect(Rails.logger).to receive(:error).with(expected_log_message) + config.sidekiq_retries_exhausted_block.call(msg, standard_exception) + expect(form_submission.reload.error_message).to eq('VBS Submission Failed: abc-123') end end end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/appeals_base_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/appeals_base_controller.rb new file mode 100644 index 00000000000..f6fc407ba71 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/appeals_base_controller.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +require 'caseflow/service' +require 'decision_reviews/v1/service' + +module DecisionReviews + module V1 + class AppealsBaseController < ApplicationController + include FailedRequestLoggable + before_action { authorize :appeals, :access? } + + private + + def decision_review_service + DecisionReviews::V1::Service.new + end + + def request_body_hash + @request_body_hash ||= get_hash_from_request_body + end + + def get_hash_from_request_body + # rubocop:disable Style/ClassEqualityComparison + # testing string b/c NullIO class doesn't always exist + raise request_body_is_not_a_hash_error if request.body.class.name == 'Puma::NullIO' + # rubocop:enable Style/ClassEqualityComparison + + body = JSON.parse request.body.string + raise request_body_is_not_a_hash_error unless body.is_a?(Hash) + + body + rescue JSON::ParserError + raise request_body_is_not_a_hash_error + end + + def request_body_is_not_a_hash_error + DecisionReviewV1::ServiceException.new key: 'DR_REQUEST_BODY_IS_NOT_A_HASH' + end + + def request_body_debug_data + { + request_body_class_name: request.try(:body).class.name, + request_body_string: request.try(:body).try(:string) + } + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_evidences_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_evidences_controller.rb new file mode 100644 index 00000000000..9b817733f41 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_evidences_controller.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +require 'decision_reviews/v1/logging_utils' +require 'common/pdf_helpers' + +# Notice of Disagreement evidence submissions +module DecisionReviews + module V1 + class DecisionReviewEvidencesController < ApplicationController + include FormAttachmentCreate + include DecisionReviews::V1::LoggingUtils + service_tag 'evidence-upload' + + FORM_ATTACHMENT_MODEL = DecisionReviewEvidenceAttachment + + private + + def serializer_klass + DecisionReviewEvidenceAttachmentSerializer + end + + # This method, declared in `FormAttachmentCreate`, is responsible for uploading file data to S3. + def save_attachment_to_cloud! + # `form_attachment` is declared in `FormAttachmentCreate`, included above. + form_attachment_guid = form_attachment&.guid + password = filtered_params[:password] + + log_params = { + form_attachment_guid:, + encrypted: password.present? + } + + # Unlock pdf with hexapdf instead of using pdftk + if password.present? + unlocked_pdf = unlock_pdf(filtered_params[:file_data], password) + form_attachment.set_file_data!(unlocked_pdf) + else + super + end + + log_formatted(**common_log_params.merge(params: log_params, is_success: true)) + rescue => e + log_formatted(**common_log_params.merge(params: log_params, is_success: false, response_error: e)) + raise e + end + + def common_log_params + { + key: :evidence_upload_to_s3, + form_id: get_form_id_from_request_headers, + user_uuid: current_user.uuid, + downstream_system: 'AWS S3' + } + end + + def unlock_pdf(file, password) + tmpf = Tempfile.new(['decrypted_form_attachment', '.pdf']) + ::Common::PdfHelpers.unlock_pdf(file.tempfile.path, password, tmpf) + tmpf.rewind + + file.tempfile.unlink + file.tempfile = tmpf + file + end + + def get_form_id_from_request_headers + # 'Source-App-Name', which specifies the form from which evidence was submitted, is taken from `window.appName`, + # which is taken from the `entryName` in the manifest.json files for each form. See: + # - vets-website/src/platform/utilities/api/index.js (apiRequest) + # - vets-website/src/platform/startup/setup.js (setUpCommonFunctionality) + # - vets-website/src/platform/startup/index.js (startApp) + # - vets-api/lib/source_app_middleware.rb + source_app_name = request.env['SOURCE_APP'] + # The higher-level review form (996) is not included in this list because it does not permit evidence uploads. + form_id = { + '10182-board-appeal' => '10182', + '995-supplemental-claim' => '995' + }[source_app_name] + + if form_id.present? + form_id + else + # If, for some odd reason, the `entryName`s are changed in these manifest.json files (or if the HLR form + # begins accepting additional evidence), we will trigger a DataDog alert hinging on the StatsD metric below. + # Upon receiving this alert, we can update the form_id hash above. + StatsD.increment('decision_review.evidence_upload_to_s3.unexpected_form_id') + # In this situation, there is no good reason to block the Veteran from uploading their evidence to S3, + # so we return the unexpected `source_app_name` to be logged by `log_formatted` above. + source_app_name + end + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_notification_callbacks_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_notification_callbacks_controller.rb new file mode 100644 index 00000000000..a6d887eba81 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/decision_review_notification_callbacks_controller.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +require 'decision_reviews/v1/logging_utils' + +module DecisionReviews + module V1 + class DecisionReviewNotificationCallbacksController < ApplicationController + include ActionController::HttpAuthentication::Token::ControllerMethods + include DecisionReviews::V1::LoggingUtils + + service_tag 'appeal-application' + + skip_before_action :verify_authenticity_token, only: [:create] + skip_before_action :authenticate, only: [:create] + skip_after_action :set_csrf_header, only: [:create] + before_action :authenticate_header, only: [:create] + + STATSD_KEY_PREFIX = 'api.decision_review.notification_callback' + + DELIVERED_STATUS = 'delivered' + + APPEAL_TYPE_TO_SERVICE_MAP = { + 'HLR' => 'higher-level-review', + 'NOD' => 'board-appeal', + 'SC' => 'supplemental-claims' + }.freeze + + VALID_FUNCTION_TYPES = %w[form evidence secondary_form].freeze + + def create + return render json: nil, status: :not_found unless enabled? + + payload = JSON.parse(request.body.string) + status = payload['status']&.downcase + reference = payload['reference'] + + StatsD.increment("#{STATSD_KEY_PREFIX}.received", tags: { status: }) + send_silent_failure_avoided_metric(reference) if status == DELIVERED_STATUS + + DecisionReviewNotificationAuditLog.create!(notification_id: payload['id'], reference:, status:, payload:) + + log_formatted(**log_params(payload, true)) + render json: { message: 'success' } + rescue => e + log_formatted(**log_params(payload, false), params: { exception_message: e.message }) + render json: { message: 'failed' } + end + + private + + def log_params(payload, is_success) + { + key: :decision_review_notification_callback, + form_id: '995', + user_uuid: nil, + upstream_system: 'VANotify', + body: payload.merge('to' => ''), # scrub PII from logs + is_success:, + params: { + notification_id: payload['id'], + status: payload['status'] + } + } + end + + def send_silent_failure_avoided_metric(reference) + service_name, function_type = parse_reference_value(reference) + tags = ["service:#{service_name}", "function: #{function_type} submission to Lighthouse"] + StatsD.increment('silent_failure_avoided', tags:) + rescue => e + Rails.logger.error('Failed to send silent_failure_avoided metric', params: { reference:, message: e.message }) + end + + def parse_reference_value(reference) + appeal_type, function_type = reference.split('-') + raise 'Invalid function_type' unless VALID_FUNCTION_TYPES.include? function_type + + [APPEAL_TYPE_TO_SERVICE_MAP.fetch(appeal_type.upcase), function_type] + end + + def authenticate_header + authenticate_user_with_token || authenticity_error + end + + def authenticate_user_with_token + authenticate_with_http_token do |token| + is_authenticated = token == bearer_token_secret + Rails.logger.info('DecisionReviewNotificationCallbacksController callback received', is_authenticated:) + + is_authenticated + end + end + + def authenticity_error + render json: { message: 'Invalid credentials' }, status: :unauthorized + end + + def bearer_token_secret + Settings.nod_vanotify_status_callback.bearer_token + end + + def enabled? + Flipper.enabled? :nod_callbacks_endpoint + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews/contestable_issues_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews/contestable_issues_controller.rb new file mode 100644 index 00000000000..9cfbf8633e4 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews/contestable_issues_controller.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module DecisionReviews + module V1 + module HigherLevelReviews + class ContestableIssuesController < AppealsBaseController + service_tag 'higher-level-review' + + def index + ci = decision_review_service + .get_higher_level_review_contestable_issues(user: current_user, benefit_type: params[:benefit_type]) + .body + render json: merge_legacy_appeals(ci) + rescue => e + log_exception_to_personal_information_log( + e, + error_class: "#{self.class.name}#index exception #{e.class} (HLR_V1)", + benefit_type: params[:benefit_type] + ) + raise + end + + private + + def merge_legacy_appeals(contestable_issues) + # Fetch Legacy Appels and combine with CIs + ci_la = nil + begin + la = decision_review_service + .get_legacy_appeals(user: current_user) + .body + # punch in an empty LA section if no LAs for user to distinguish no LAs from a LA call fail + la['data'] = [{ type: 'legacyAppeal', attributes: { issues: [] } }] if la['data'].empty? + ci_la = { data: contestable_issues['data'] + la['data'] } + rescue => e + # If LA fails keep going Legacy Appeals are not critical, return original contestable_issues + log_exception_to_personal_information_log( + e, + error_class: "#{self.class.name}#index exception #{e.class} (HLR_V1_LEGACY_APPEALS)", + benefit_type: params[:benefit_type] + ) + contestable_issues + else + ci_la + end + end + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews_controller.rb new file mode 100644 index 00000000000..dd90ec7e5c8 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/higher_level_reviews_controller.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +require 'decision_reviews/saved_claim/service' + +module DecisionReviews + module V1 + class HigherLevelReviewsController < AppealsBaseController + include DecisionReviews::SavedClaim::Service + service_tag 'higher-level-review' + + def show + render json: decision_review_service.get_higher_level_review(params[:id]).body + rescue => e + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'show', exception_class: e.class), id: params[:id] + ) + raise + end + + def create + hlr_response_body = decision_review_service + .create_higher_level_review(request_body: request_body_hash, user: @current_user) + .body + submitted_appeal_uuid = hlr_response_body.dig('data', 'id') + ActiveRecord::Base.transaction do + AppealSubmission.create!(user_uuid: @current_user.uuid, user_account: @current_user.user_account, + type_of_appeal: 'HLR', submitted_appeal_uuid:) + + store_saved_claim(claim_class: ::SavedClaim::HigherLevelReview, form: request_body_hash.to_json, + guid: submitted_appeal_uuid) + + # Clear in-progress form since submit was successful + InProgressForm.form_for_user('20-0996', current_user)&.destroy! + end + render json: hlr_response_body + rescue => e + ::Rails.logger.error( + message: "Exception occurred while submitting Higher Level Review: #{e.message}", + backtrace: e.backtrace + ) + + handle_personal_info_error(e) + end + + private + + def error_class(method:, exception_class:) + "#{self.class.name}##{method} exception #{exception_class} (HLR_V1)" + end + + def handle_personal_info_error(e) + request = begin + { body: request_body_hash } + rescue + request_body_debug_data + end + + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'create', exception_class: e.class), request: + ) + raise + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements/contestable_issues_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements/contestable_issues_controller.rb new file mode 100644 index 00000000000..ca4bc08cdfb --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements/contestable_issues_controller.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module DecisionReviews + module V1 + module NoticeOfDisagreements + class ContestableIssuesController < AppealsBaseController + service_tag 'board-appeal' + + def index + render json: decision_review_service + .get_notice_of_disagreement_contestable_issues(user: current_user) + .body + rescue => e + log_exception_to_personal_information_log e, + error_class: + "#{self.class.name}#index exception #{e.class} (NOD_V1)" + raise + end + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements_controller.rb new file mode 100644 index 00000000000..1d0abee5864 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/notice_of_disagreements_controller.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +module DecisionReviews + module V1 + class NoticeOfDisagreementsController < AppealsBaseController + service_tag 'board-appeal' + + def show + render json: decision_review_service.get_notice_of_disagreement(params[:id]).body + rescue => e + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'show', exception_class: e.class), id: params[:id] + ) + raise + end + + def create + nod_response_body = AppealSubmission.submit_nod( + current_user: @current_user, + request_body_hash:, + decision_review_service:, + submit_upload_job: + ) + + render json: nod_response_body + rescue => e + ::Rails.logger.error( + message: "Exception occurred while submitting Notice Of Disagreement: #{e.message}", + backtrace: e.backtrace + ) + handle_personal_info_error(e) + end + + private + + def error_class(method:, exception_class:) + "#{self.class.name}##{method} exception #{exception_class} (NOD_V1)" + end + + def handle_personal_info_error(e) + request = begin + { body: request_body_hash } + rescue + request_body_debug_data + end + + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'create', exception_class: e.class), request: + ) + raise + end + + def submit_upload_job + if Flipper.enabled? :decision_review_new_engine_submit_upload_job + DecisionReviews::SubmitUpload + else + DecisionReview::SubmitUpload + end + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims/contestable_issues_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims/contestable_issues_controller.rb new file mode 100644 index 00000000000..d7bb4f35759 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims/contestable_issues_controller.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module DecisionReviews + module V1 + module SupplementalClaims + class ContestableIssuesController < AppealsBaseController + service_tag 'appeal-application' + + def index + ci = decision_review_service + .get_supplemental_claim_contestable_issues(user: current_user, benefit_type: params[:benefit_type]) + .body + render json: merge_legacy_appeals(ci) + rescue => e + log_exception_to_personal_information_log e, + error_class: "#{self.class.name}#index exception #{e.class} (SC_V1)" + raise + end + + def merge_legacy_appeals(contestable_issues) + # Fetch Legacy Appels and combine with CIs + ci_la = nil + begin + la = decision_review_service + .get_legacy_appeals(user: current_user) + .body + # punch in an empty LA section if no LAs for user to distinguish no LAs from a LA call fail + la['data'] = [{ type: 'legacyAppeal', attributes: { issues: [] } }] if la['data'].empty? + ci_la = { data: contestable_issues['data'] + la['data'] } + rescue => e + # If LA fails keep going Legacy Appeals are not critical, return original contestable_issues + log_exception_to_personal_information_log( + e, + error_class: "#{self.class.name}#index exception #{e.class} (SC_V1_LEGACY_APPEALS)", + benefit_type: params[:benefit_type] + ) + contestable_issues + else + ci_la + end + end + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims_controller.rb new file mode 100644 index 00000000000..c1f96cd3e12 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v1/supplemental_claims_controller.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +require 'decision_reviews/v1//constants' +require 'decision_reviews/v1/helpers' +require 'decision_reviews/saved_claim/service' +module DecisionReviews + module V1 + class SupplementalClaimsController < AppealsBaseController + include DecisionReviews::V1::Helpers + include DecisionReviews::SavedClaim::Service + service_tag 'appeal-application' + + def show + render json: decision_review_service.get_supplemental_claim(params[:id]).body + rescue => e + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'show', exception_class: e.class), id: params[:id] + ) + raise + end + + def create + process_submission + rescue => e + ::Rails.logger.error( + message: "Exception occurred while submitting Supplemental Claim: #{e.message}", + backtrace: e.backtrace + ) + handle_personal_info_error(e) + end + + private + + def post_create_log_msg(appeal_submission_id:, submitted_appeal_uuid:) + { + message: 'Supplemental Claim Appeal Record Created', + appeal_submission_id:, + lighthouse_submission: { + id: submitted_appeal_uuid + } + } + end + + def handle_4142(request_body:, form4142:, appeal_submission_id:, submitted_appeal_uuid:) # rubocop:disable Naming/VariableNumber + return if form4142.blank? + + rejiggered_payload = get_and_rejigger_required_info(request_body:, form4142:, user: @current_user) + jid = decision_review_service.queue_form4142(appeal_submission_id:, rejiggered_payload:, submitted_appeal_uuid:) + log_form4142_job_queued(appeal_submission_id, submitted_appeal_uuid, jid) + end + + def log_form4142_job_queued(appeal_submission_id, submitted_appeal_uuid, jid) + ::Rails.logger.info({ + form_id: DecisionReviews::V1::FORM4142_ID, + parent_form_id: DecisionReviews::V1::SUPP_CLAIM_FORM_ID, + message: 'Supplemental Claim Form4142 queued.', + jid:, + appeal_submission_id:, + lighthouse_submission: { + id: submitted_appeal_uuid + } + }) + end + + def submit_evidence(sc_evidence, appeal_submission_id, submitted_appeal_uuid) + # I know I could just use `appeal_submission.enqueue_uploads` here, but I want to return the jids to log, so + # replicating instead. There is some duplicate code but I want them jids in the logs. + jids = decision_review_service.queue_submit_evidence_uploads(sc_evidence, appeal_submission_id) + ::Rails.logger.info({ + form_id: DecisionReviews::V1::SUPP_CLAIM_FORM_ID, + message: 'Supplemental Claim Evidence jobs created.', + appeal_submission_id:, + lighthouse_submission: { + id: submitted_appeal_uuid + }, + evidence_upload_job_ids: jids + }) + end + + def handle_personal_info_error(e) + request = begin + { body: request_body_hash } + rescue + request_body_debug_data + end + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'create', exception_class: e.class), request: + ) + raise + end + + def process_submission + req_body_obj = request_body_hash.is_a?(String) ? JSON.parse(request_body_hash) : request_body_hash + saved_claim_request_body = req_body_obj.to_json # serialize before request body is modified + form4142 = req_body_obj.delete('form4142') + sc_evidence = req_body_obj.delete('additionalDocuments') + zip_from_frontend = req_body_obj.dig('data', 'attributes', 'veteran', 'address', 'zipCode5') + + sc_response = decision_review_service.create_supplemental_claim(request_body: req_body_obj, user: @current_user) + submitted_appeal_uuid = sc_response.body.dig('data', 'id') + + ActiveRecord::Base.transaction do + appeal_submission_id = create_appeal_submission(submitted_appeal_uuid, zip_from_frontend) + handle_saved_claim(form: saved_claim_request_body, guid: submitted_appeal_uuid, form4142:) + + ::Rails.logger.info(post_create_log_msg(appeal_submission_id:, submitted_appeal_uuid:)) + handle_4142(request_body: req_body_obj, form4142:, appeal_submission_id:, submitted_appeal_uuid:) + submit_evidence(sc_evidence, appeal_submission_id, submitted_appeal_uuid) if sc_evidence.present? + + # Only destroy InProgressForm after evidence upload step + # so that we still have references if a fatal error occurs before this step + clear_in_progress_form + end + render json: sc_response.body, status: sc_response.status + end + + def create_appeal_submission(submitted_appeal_uuid, backup_zip) + upload_metadata = DecisionReviews::V1::Service.file_upload_metadata( + @current_user, backup_zip + ) + create_params = { + user_uuid: @current_user.uuid, + user_account: @current_user.user_account, + type_of_appeal: 'SC', + submitted_appeal_uuid:, + upload_metadata: + } + appeal_submission = AppealSubmission.create!(create_params) + appeal_submission.id + end + + def handle_saved_claim(form:, guid:, form4142:) + uploaded_forms = [] + uploaded_forms << '21-4142' if form4142.present? + store_saved_claim(claim_class: ::SavedClaim::SupplementalClaim, form:, guid:, uploaded_forms:) + end + + def clear_in_progress_form + InProgressForm.form_for_user('20-0995', @current_user)&.destroy! + end + + def error_class(method:, exception_class:) + "#{self.class.name}##{method} exception #{exception_class} (SC_V1)" + end + end + end +end diff --git a/modules/decision_reviews/app/controllers/decision_reviews/v2/higher_level_reviews_controller.rb b/modules/decision_reviews/app/controllers/decision_reviews/v2/higher_level_reviews_controller.rb new file mode 100644 index 00000000000..b62a7bc6824 --- /dev/null +++ b/modules/decision_reviews/app/controllers/decision_reviews/v2/higher_level_reviews_controller.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +require 'decision_reviews/saved_claim/service' +require_relative '../v1/appeals_base_controller' + +module DecisionReviews + module V2 + class HigherLevelReviewsController < V1::AppealsBaseController + include DecisionReviews::SavedClaim::Service + service_tag 'higher-level-review' + + def show + render json: decision_review_service.get_higher_level_review(params[:id]).body + rescue => e + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'show', exception_class: e.class), id: params[:id] + ) + raise + end + + def create + hlr_response_body = decision_review_service + .create_higher_level_review(request_body: request_body_hash, user: @current_user, + version: 'V2') + .body + submitted_appeal_uuid = hlr_response_body.dig('data', 'id') + ActiveRecord::Base.transaction do + AppealSubmission.create!(user_uuid: @current_user.uuid, user_account: @current_user.user_account, + type_of_appeal: 'HLR', submitted_appeal_uuid:) + + store_saved_claim(claim_class: ::SavedClaim::HigherLevelReview, form: request_body_hash.to_json, + guid: submitted_appeal_uuid) + + # Clear in-progress form since submit was successful + InProgressForm.form_for_user('20-0996', current_user)&.destroy! + end + render json: hlr_response_body + rescue => e + ::Rails.logger.error( + message: "Exception occurred while submitting Higher Level Review: #{e.message}", + backtrace: e.backtrace + ) + + handle_personal_info_error(e) + end + + private + + def error_class(method:, exception_class:) + "#{self.class.name}##{method} exception #{exception_class} (HLR_V2)" + end + + def handle_personal_info_error(e) + request = begin + { body: request_body_hash } + rescue + request_body_debug_data + end + + log_exception_to_personal_information_log( + e, error_class: error_class(method: 'create', exception_class: e.class), request: + ) + raise + end + end + end +end diff --git a/modules/decision_reviews/config/routes.rb b/modules/decision_reviews/config/routes.rb index bdb298e5939..e46de01acd1 100644 --- a/modules/decision_reviews/config/routes.rb +++ b/modules/decision_reviews/config/routes.rb @@ -1,4 +1,30 @@ # frozen_string_literal: true DecisionReviews::Engine.routes.draw do + namespace :v1, defaults: { format: 'json' } do + namespace :higher_level_reviews do + get 'contestable_issues(/:benefit_type)', to: 'contestable_issues#index' + end + resources :higher_level_reviews, only: %i[create show] + + namespace :notice_of_disagreements do + get 'contestable_issues', to: 'contestable_issues#index' + end + resources :notice_of_disagreements, only: %i[create show] + + namespace :supplemental_claims do + get 'contestable_issues(/:benefit_type)', to: 'contestable_issues#index' + end + resources :supplemental_claims, only: %i[create show] + + resource :decision_review_evidence, only: :create + + scope format: false do + resources :nod_callbacks, only: [:create], controller: :decision_review_notification_callbacks + end + end + + namespace :v2, defaults: { format: 'json' } do + resources :higher_level_reviews, only: %i[create show] + end end diff --git a/modules/decision_reviews/lib/decision_reviews/saved_claim/service.rb b/modules/decision_reviews/lib/decision_reviews/saved_claim/service.rb new file mode 100644 index 00000000000..ddc4f8c57de --- /dev/null +++ b/modules/decision_reviews/lib/decision_reviews/saved_claim/service.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module DecisionReviews + ## + # Service for persisting Decision Review SavedClaim + # + module SavedClaim + module Service + VALID_CLASS = [ + ::SavedClaim::HigherLevelReview, + ::SavedClaim::NoticeOfDisagreement, + ::SavedClaim::SupplementalClaim + ].freeze + + def store_saved_claim(claim_class:, form:, guid:, uploaded_forms: []) + raise "Invalid class type '#{claim_class}'" unless VALID_CLASS.include? claim_class + + claim = claim_class.new(form:, guid:, uploaded_forms:) + claim.save! + end + end + end +end diff --git a/modules/decision_reviews/lib/decision_reviews/v1/service.rb b/modules/decision_reviews/lib/decision_reviews/v1/service.rb index 32ad4fc4f6e..c616939cbb0 100644 --- a/modules/decision_reviews/lib/decision_reviews/v1/service.rb +++ b/modules/decision_reviews/lib/decision_reviews/v1/service.rb @@ -36,11 +36,11 @@ class Service < Common::Client::Base # @param user [User] Veteran who the form is in regard to # @return [Faraday::Response] # - def create_higher_level_review(request_body:, user:) + def create_higher_level_review(request_body:, user:, version: 'V1') with_monitoring_and_error_handling do headers = create_higher_level_review_headers(user) common_log_params = { key: :overall_claim_submission, form_id: '996', user_uuid: user.uuid, - downstream_system: 'Lighthouse' } + downstream_system: 'Lighthouse', params: { version: } } begin response = perform :post, 'higher_level_reviews', request_body, headers log_formatted(**common_log_params.merge(is_success: true, status_code: response.status, @@ -51,7 +51,7 @@ def create_higher_level_review(request_body:, user:) end raise_schema_error_unless_200_status response.status validate_against_schema json: response.body, schema: HLR_CREATE_RESPONSE_SCHEMA, - append_to_error_class: ' (HLR_V1)' + append_to_error_class: " (HLR_#{version}})" response end end @@ -334,6 +334,22 @@ def construct_tmpfile_name(appeal_submission_upload_id, original_filename) private + def submit_upload_job + if Flipper.enabled? :decision_review_new_engine_submit_upload_job + DecisionReviews::SubmitUpload + else + DecisionReview::SubmitUpload + end + end + + def form4142_submit_job + if Flipper.enabled? :decision_review_new_engine_4142_job + DecisionReviews::Form4142Submit + else + DecisionReview::Form4142Submit + end + end + def create_higher_level_review_headers(user) headers = { 'X-VA-SSN' => user.ssn.to_s.strip.presence, diff --git a/modules/decision_reviews/spec/controllers/decision_review_evidences_controller_spec.rb b/modules/decision_reviews/spec/controllers/decision_review_evidences_controller_spec.rb new file mode 100644 index 00000000000..238fdbfbdb0 --- /dev/null +++ b/modules/decision_reviews/spec/controllers/decision_review_evidences_controller_spec.rb @@ -0,0 +1,202 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe DecisionReviews::V1::DecisionReviewEvidencesController, type: :controller do + routes { DecisionReviews::Engine.routes } + + describe '::FORM_ATTACHMENT_MODEL' do + it 'is a FormAttachment model' do + expect(described_class::FORM_ATTACHMENT_MODEL.ancestors).to include(FormAttachment) + end + end + + describe '#create' do + let(:form_attachment_guid) { SecureRandom.uuid } + let(:pdf_file) do + fixture_file_upload('doctors-note.pdf', 'application/pdf') + end + let(:form_attachment_model) { described_class::FORM_ATTACHMENT_MODEL } + let(:param_namespace) { form_attachment_model.to_s.underscore.split('/').last } + let(:resource_name) { form_attachment_model.name.remove('::').snakecase } + let(:json_api_type) { resource_name.pluralize } + let(:attachment_factory_id) { resource_name.to_sym } + let(:user) { build(:user, :loa1) } + + before do + sign_in_as(user) + end + + it 'requires params.`param_namespace`' do + empty_req_params = [nil, {}] + empty_req_params << { param_namespace => {} } + empty_req_params.each do |params| + post(:create, params:) + + expect(response).to have_http_status(:bad_request) + + response_body = JSON.parse(response.body) + + expect(response_body['errors'].size).to eq(1) + expect(response_body['errors'][0]).to eq( + 'title' => 'Missing parameter', + 'detail' => "The required parameter \"#{param_namespace}\", is missing", + 'code' => '108', + 'status' => '400' + ) + end + end + + it 'requires file_data to be a file' do + params = { param_namespace => { file_data: 'not_a_file_just_a_string' } } + post(:create, params:) + expect(response).to have_http_status(:bad_request) + response_body_errors = JSON.parse(response.body)['errors'] + + expect(response_body_errors.size).to eq(1) + expect(response_body_errors[0]).to eq( + 'title' => 'Invalid field value', + 'detail' => '"String" is not a valid value for "file_data"', + 'code' => '103', + 'status' => '400' + ) + end + + context 'with a param password' do + let(:encrypted_log_params_success) do + { + message: 'Evidence upload to s3 success!', + user_uuid: user.uuid, + action: 'Evidence upload to s3', + form_id: '10182', + upstream_system: nil, + downstream_system: 'AWS S3', + is_success: true, + http: { + status_code: nil, + body: nil + }, + form_attachment_guid:, + encrypted: true + } + end + + let(:expected_response_body) do + { + 'data' => { + 'id' => '99', + 'type' => json_api_type, + 'attributes' => { + 'guid' => form_attachment_guid + } + } + } + end + + it 'creates a FormAttachment, logs formatted success message, and increments statsd' do + request.env['SOURCE_APP'] = '10182-board-appeal' + params = { param_namespace => { file_data: pdf_file, password: 'test_password' } } + + expect(Common::PdfHelpers).to receive(:unlock_pdf) + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(encrypted_log_params_success) + expect(StatsD).to receive(:increment).with('decision_review.form_10182.evidence_upload_to_s3.success') + form_attachment = build(attachment_factory_id, guid: form_attachment_guid) + + expect(form_attachment_model).to receive(:new) do + expect(form_attachment).to receive(:set_file_data!) + + expect(form_attachment).to receive(:save!) do + form_attachment.id = 99 + form_attachment + end + + form_attachment + end + + post(:create, params:) + + expect(response).to have_http_status(:ok) + expect(JSON.parse(response.body)).to eq(expected_response_body) + end + end + + context 'evidence is uploaded from the NOD (10182) form' do + it 'formatted success log and statsd metric are specific to NOD (10182)' do + request.env['SOURCE_APP'] = '10182-board-appeal' + params = { param_namespace => { file_data: pdf_file } } + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(hash_including(form_id: '10182')) + expect(StatsD).to receive(:increment).with('decision_review.form_10182.evidence_upload_to_s3.success') + post(:create, params:) + end + end + + context 'evidence is uploaded from the SC (995) form' do + it 'formatted success log and statsd metric are specific to SC (995)' do + request.env['SOURCE_APP'] = '995-supplemental-claim' + params = { param_namespace => { file_data: pdf_file } } + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(hash_including(form_id: '995')) + expect(StatsD).to receive(:increment).with('decision_review.form_995.evidence_upload_to_s3.success') + post(:create, params:) + end + end + + context 'evidence is uploaded from a form with an unexpected Source-App-Name' do + it 'logs formatted success log and increments success statsd metric, but also increments an `unexpected_form_id` statsd metric' do # rubocop:disable Layout/LineLength + request.env['SOURCE_APP'] = '997-supplemental-claim' + params = { param_namespace => { file_data: pdf_file } } + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(hash_including(form_id: '997-supplemental-claim')) + expect(StatsD).to receive(:increment).with('decision_review.form_997-supplemental-claim.evidence_upload_to_s3.success') # rubocop:disable Layout/LineLength + expect(StatsD).to receive(:increment).with('decision_review.evidence_upload_to_s3.unexpected_form_id') + post(:create, params:) + end + end + + context 'an error is thrown during file upload' do + it 'logs formatted error, increments statsd, and raises error' do + request.env['SOURCE_APP'] = '10182-board-appeal' + params = { param_namespace => { file_data: pdf_file } } + expect(StatsD).to receive(:increment).with('decision_review.form_10182.evidence_upload_to_s3.failure') + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with({ + message: 'Evidence upload to s3 failure!', + user_uuid: user.uuid, + action: 'Evidence upload to s3', + form_id: '10182', + upstream_system: nil, + downstream_system: 'AWS S3', + is_success: false, + http: { + status_code: 422, + body: 'Unprocessable Entity' + }, + form_attachment_guid:, + encrypted: false + }) + form_attachment = build(attachment_factory_id, guid: form_attachment_guid) + expect(form_attachment_model).to receive(:new).and_return(form_attachment) + expected_error = Common::Exceptions::UnprocessableEntity.new( + detail: 'Test Error!', + source: 'FormAttachment.set_file_data' + ) + expect(form_attachment).to receive(:set_file_data!).and_raise(expected_error) + post(:create, params:) + expect(response).to have_http_status(:unprocessable_entity) + expect(JSON.parse(response.body)).to eq( + { + 'errors' => [{ + 'title' => 'Unprocessable Entity', + 'detail' => 'Test Error!', + 'code' => '422', + 'source' => 'FormAttachment.set_file_data', + 'status' => '422' + }] + } + ) + end + end + end +end diff --git a/modules/decision_reviews/spec/controllers/decision_review_notification_callbacks_controller_spec.rb b/modules/decision_reviews/spec/controllers/decision_review_notification_callbacks_controller_spec.rb new file mode 100644 index 00000000000..a0373d0682d --- /dev/null +++ b/modules/decision_reviews/spec/controllers/decision_review_notification_callbacks_controller_spec.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe DecisionReviews::V1::DecisionReviewNotificationCallbacksController, type: :controller do + routes { DecisionReviews::Engine.routes } + + let(:notification_id) { SecureRandom.uuid } + let(:reference) { "NOD-form-#{SecureRandom.uuid}" } + let(:status) { 'delivered' } + let(:params) do + { + id: notification_id, + reference:, + to: 'test@test.com', + status:, + created_at: '2023-01-10T00:04:25.273410Z', + completed_at: '2023-01-10T00:05:33.255911Z', + sent_at: '2023-01-10T00:04:25.775363Z', + notification_type: 'email', + status_reason: '', + provider: 'sendgrid' + }.stringify_keys! + end + + describe '#create' do + before do + request.headers['Authorization'] = "Bearer #{Settings.nod_vanotify_status_callback.bearer_token}" + Flipper.enable(:nod_callbacks_endpoint) + + allow(DecisionReviewNotificationAuditLog).to receive(:create!) + end + + context 'the record saved without an issue' do + it 'returns success' do + expect(DecisionReviewNotificationAuditLog).to receive(:create!) + .with(notification_id:, reference:, status:, payload: params) + + post(:create, params:, as: :json) + + expect(response).to have_http_status(:ok) + + res = JSON.parse(response.body) + expect(res['message']).to eq 'success' + end + end + + context 'the record failed to save' do + before do + expect(DecisionReviewNotificationAuditLog).to receive(:create!).and_raise(ActiveRecord::RecordInvalid) + end + + it 'returns failed' do + post(:create, params:, as: :json) + + expect(response).to have_http_status(:ok) + + res = JSON.parse(response.body) + expect(res['message']).to eq 'failed' + end + end + + context 'the reference value is formatted correctly' do + let(:tags) { ['service:board-appeal', 'function: form submission to Lighthouse'] } + + before do + allow(StatsD).to receive(:increment) + allow(Rails.logger).to receive(:error) + end + + it 'sends a silent_failure_avoided statsd metric' do + expect(StatsD).to receive(:increment).with('silent_failure_avoided', tags:) + expect(Rails.logger).not_to receive(:error) + + post(:create, params:, as: :json) + end + + context 'when the reference is for a secondary form' do + let(:reference) { "SC-secondary_form-#{SecureRandom.uuid}" } + let(:tags) { ['service:supplemental-claims', 'function: secondary_form submission to Lighthouse'] } + + it 'sends a silent_failure_avoided statsd metric' do + expect(StatsD).to receive(:increment).with('silent_failure_avoided', tags:) + expect(Rails.logger).not_to receive(:error) + + post(:create, params:, as: :json) + end + end + end + + context 'the reference appeal_type is invalid' do + let(:reference) { 'APPEALTYPE-form-submitted-appeal-uuid' } + let(:logged_params) { { reference:, message: 'key not found: "APPEALTYPE"' } } + + before do + allow(StatsD).to receive(:increment) + allow(Rails.logger).to receive(:error) + end + + it 'logs an error and does not send a silent_failure_avoided statsd metric' do + expect(StatsD).not_to receive(:increment).with('silent_failure_avoided', tags: anything) + expect(Rails.logger).to receive(:error).with('Failed to send silent_failure_avoided metric', + params: logged_params) + + post(:create, params:, as: :json) + end + end + + context 'the reference function_type is invalid' do + let(:reference) { 'HLR-function_type-submitted-appeal-uuid' } + let(:logged_params) { { reference:, message: 'Invalid function_type' } } + + before do + allow(StatsD).to receive(:increment) + allow(Rails.logger).to receive(:error) + end + + it 'logs an error and does not send a silent_failure_avoided statsd metric' do + expect(StatsD).not_to receive(:increment).with('silent_failure_avoided', tags: anything) + expect(Rails.logger).to receive(:error).with('Failed to send silent_failure_avoided metric', + params: logged_params) + + post(:create, params:, as: :json) + end + end + end + + describe 'authentication' do + context 'with missing Authorization header' do + it 'returns 401' do + request.headers['Authorization'] = nil + post(:create, params:, as: :json) + + expect(response).to have_http_status(:unauthorized) + end + end + + context 'with invalid Authorization header' do + it 'returns 401' do + request.headers['Authorization'] = 'Bearer foo' + post(:create, params:, as: :json) + + expect(response).to have_http_status(:unauthorized) + end + end + end + + describe 'feature flag is disabled' do + before do + Flipper.disable :nod_callbacks_endpoint + end + + it 'returns a 404 error code' do + request.headers['Authorization'] = "Bearer #{Settings.nod_vanotify_status_callback.bearer_token}" + post(:create, params:, as: :json) + + expect(response).to have_http_status(:not_found) + end + end +end diff --git a/modules/decision_reviews/spec/dr_spec_helper.rb b/modules/decision_reviews/spec/dr_spec_helper.rb new file mode 100644 index 00000000000..72f4efcade9 --- /dev/null +++ b/modules/decision_reviews/spec/dr_spec_helper.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV['RAILS_ENV'] ||= 'test' +ENV['RACK_ENV'] ||= 'test' # Shrine uses this to determine log levels +require File.expand_path('../../../config/environment', __dir__) +# Prevent database truncation if the environment is production +abort('The Rails environment is running in production mode!') if Rails.env.production? +require 'statsd-instrument' +require 'statsd/instrument/matchers' +require 'rspec/rails' +require 'webmock/rspec' +require 'shoulda/matchers' +require 'support/stub_va_profile' +require 'support/mpi/stub_mpi' +require 'support/factory_bot' + +WebMock.disable_net_connect!(allow_localhost: true) + +# Helper function for testing changes to the global Settings object +# Pass in the particular settings object that you want to change, +# along with temporary values that should be set on that object. +# For example, +# +# with_settings(Settings.some_group, {foo: 'temp1', bar: 'temp2'}) do +# expect(something).to equal(2) +# end +def with_settings(settings, temp_values) + old_settings = temp_values.keys.index_with { |k| settings[k] } + + # The `Config` object doesn't support `.merge!`, so manually copy + # the updated values. + begin + temp_values.each do |k, v| + settings[k] = v + end + + yield + ensure + old_settings.each do |k, v| + settings[k] = v + end + end +end + +ActiveRecord::Migration.maintain_test_schema! + +FactoryBot::SyntaxRunner.class_eval do + include RSpec::Mocks::ExampleMethods +end + +RSpec.configure do |config| + # Adding support for url_helper + config.include Rails.application.routes.url_helpers + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + config.infer_spec_type_from_file_location! + + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") + + config.include StatsD::Instrument::Matchers +end + +Gem::Deprecate.skip = true + +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end +end diff --git a/modules/decision_reviews/spec/factories/secondary_appeal_forms.rb b/modules/decision_reviews/spec/factories/secondary_appeal_forms.rb new file mode 100644 index 00000000000..da0c3042904 --- /dev/null +++ b/modules/decision_reviews/spec/factories/secondary_appeal_forms.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :secondary_appeal_form4142_module, class: 'SecondaryAppealForm' do + guid { SecureRandom.uuid } + form_id { '21-4142' } + form do + { + veteran: { + fullName: { + first: 'Person', + last: 'McPerson' + }, + dateOfBirth: '1983-01-23', + ssn: '111223333', + address: {}, + homePhone: '123-456-7890' + }, + patientIdentification: { + isRequestingOwnMedicalRecords: true + + }, + providerFacility: [{ + providerFacilityName: 'provider 1', + treatmentDateRange: [ + { + from: '1980-1-1', + to: '1985-1-1' + }, + { + from: '1986-1-1', + to: '1987-1-1' + } + ], + providerFacilityAddress: { + street: '123 Main Street', + street2: '1B', + city: 'Baltimore', + state: 'MD', + country: 'USA', + postalCode: '21200-1111' + } + }], + preparerIdentification: { + relationshipToVeteran: 'self' + }, + acknowledgeToReleaseInformation: true, + limitedConsent: 'some string', + privacyAgreementAccepted: true + }.to_json + end + delete_date { nil } + appeal_submission { create(:appeal_submission_module) } + end +end diff --git a/modules/decision_reviews/spec/lib/v1/service_spec.rb b/modules/decision_reviews/spec/lib/v1/service_spec.rb index 4224b69c165..0d9bb6cf2d3 100644 --- a/modules/decision_reviews/spec/lib/v1/service_spec.rb +++ b/modules/decision_reviews/spec/lib/v1/service_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/vcr_helper' require 'decision_reviews/v1/service' describe DecisionReviews::V1::Service do diff --git a/modules/decision_reviews/spec/requests/v1/higher_level_reviews/contestable_issues_spec.rb b/modules/decision_reviews/spec/requests/v1/higher_level_reviews/contestable_issues_spec.rb new file mode 100644 index 00000000000..24796d0f20a --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/higher_level_reviews/contestable_issues_spec.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V1::HigherLevelReviews::ContestableIssues', type: :request do + let(:user) { build(:user, :loa3) } + let(:success_log_args) do + { + message: 'Get contestable issues success!', + user_uuid: user.uuid, + action: 'Get contestable issues', + form_id: '996', + upstream_system: 'Lighthouse', + downstream_system: nil, + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + } + } + end + let(:error_log_args) do + { + message: 'Get contestable issues failure!', + user_uuid: user.uuid, + action: 'Get contestable issues', + form_id: '996', + upstream_system: 'Lighthouse', + downstream_system: nil, + is_success: false, + http: { + status_code: 404, + body: anything + } + } + end + + before { sign_in_as(user) } + + describe '#index' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::HigherLevelReviews::ContestableIssuesController#index exception % (HLR_V1)' # rubocop:disable Layout/LineLength + end + + subject { get '/decision_reviews/v1/higher_level_reviews/contestable_issues/compensation' } + + it 'fetches issues that the Veteran could contest via a higher-level review' do + VCR.use_cassette('decision_review/HLR-GET-CONTESTABLE-ISSUES-RESPONSE-200_V1') do + VCR.use_cassette('decision_review/HLR-GET-LEGACY_APPEALS-RESPONSE-200_V1') do + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(success_log_args) + subject + expect(response).to be_successful + expect(JSON.parse(response.body)['data']).to be_an Array + expect(JSON.parse(response.body)['data'].length).to be 4 + end + end + end + + it 'fetches issues that the Veteran could contest via a higher-level review, but empty Legacy Appeals' do + VCR.use_cassette('decision_review/HLR-GET-CONTESTABLE-ISSUES-RESPONSE-200_V1') do + VCR.use_cassette('decision_review/HLR-GET-LEGACY_APPEALS-RESPONSE-200-EMPTY_V1') do + subject + expect(response).to be_successful + expect(JSON.parse(response.body)['data']).to be_an Array + expect(JSON.parse(response.body)['data'].length).to be 4 + end + end + end + + it 'adds to the PersonalInformationLog when an exception is thrown' do + VCR.use_cassette('decision_review/HLR-GET-CONTESTABLE-ISSUES-RESPONSE-404_V1') do + expect(personal_information_logs.count).to be 0 + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + expect(pil.data['user']).to be_truthy + expect(pil.data['error']).to be_truthy + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v1/higher_level_reviews_spec.rb b/modules/decision_reviews/spec/requests/v1/higher_level_reviews_spec.rb new file mode 100644 index 00000000000..5dac7bb11ae --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/higher_level_reviews_spec.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisonReviews::V1::HigherLevelReviews', type: :request do + let(:user) { build(:user, :loa3) } + let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } + let(:success_log_args) do + { + message: 'Overall claim submission success!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '996', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + }, + version: 'V1' + } + end + let(:error_log_args) do + { + message: 'Overall claim submission failure!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '996', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: false, + http: { + status_code: 422, + body: response_error_body + }, + version: 'V1' + } + end + + let(:response_error_body) do + { + 'errors' => [{ 'title' => 'Missing required fields', + 'detail' => 'One or more expected fields were not found', + 'code' => '145', + 'source' => { 'pointer' => '/' }, + 'status' => '422', + 'meta' => { 'missing_fields' => %w[data included] } }] + } + end + + let(:extra_error_log_message) do + 'BackendServiceException: {:source=>"Common::Client::Errors::ClientError raised in DecisionReviews::V1::Service", :code=>"DR_422"}' # rubocop:disable Layout/LineLength + end + + before { sign_in_as(user) } + + describe '#create' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::HigherLevelReviewsController#create exception % (HLR_V1)' + end + + subject do + post '/decision_reviews/v1/higher_level_reviews', + params: VetsJsonSchema::EXAMPLES.fetch('HLR-CREATE-REQUEST-BODY_V1').to_json, + headers: + end + + it 'creates an HLR' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-200_V1') do + # Create an InProgressForm + in_progress_form = create(:in_progress_form, user_uuid: user.uuid, form_id: '20-0996') + expect(in_progress_form).not_to be_nil + + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(success_log_args) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_996.overall_claim_submission.success') + + subject + expect(response).to be_successful + appeal_uuid = JSON.parse(response.body)['data']['id'] + expect(AppealSubmission.where(submitted_appeal_uuid: appeal_uuid).first).to be_truthy + # InProgressForm should be destroyed after successful submission + in_progress_form = InProgressForm.find_by(user_uuid: user.uuid, form_id: '20-0996') + expect(in_progress_form).to be_nil + # SavedClaim should be created with request data + saved_claim = SavedClaim::HigherLevelReview.find_by(guid: appeal_uuid) + expect(saved_claim.form).to eq(VetsJsonSchema::EXAMPLES.fetch('HLR-CREATE-REQUEST-BODY_V1').to_json) + end + end + + context 'when an error occurs with the api call' do + it 'adds to the PersonalInformationLog' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-422_V1') do + expect(personal_information_logs.count).to be 0 + + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + expect(Rails.logger).to receive(:error).with( + message: "Exception occurred while submitting Higher Level Review: #{extra_error_log_message}", + backtrace: anything + ) + expect(Rails.logger).to receive(:error).with(extra_error_log_message, anything) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_996.overall_claim_submission.failure') + + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + %w[ + first_name last_name birls_id icn edipi mhv_correlation_id + participant_id vet360_id ssn assurance_level birth_date + ].each { |key| expect(pil.data['user'][key]).to be_truthy } + %w[message backtrace key response_values original_status original_body] + .each { |key| expect(pil.data['error'][key]).to be_truthy } + expect(pil.data['additional_data']['request']['body']).not_to be_empty + end + end + end + + context 'when an error occurs in the transaction' do + shared_examples 'rolledback transaction' do |model| + before do + allow_any_instance_of(model).to receive(:save!).and_raise(ActiveModel::Error) # stub a model error + end + + it 'rollsback transaction' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-200_V1') do + expect(subject).to eq 500 + + # check that transaction rolled back / records were not persisted + expect(AppealSubmission.count).to eq 0 + expect(SavedClaim.count).to eq 0 + end + end + end + + context 'for AppealSubmission' do + it_behaves_like 'rolledback transaction', AppealSubmission + end + + context 'for SavedClaim' do + it_behaves_like 'rolledback transaction', SavedClaim + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v1/notice_of_disagreements/contestable_issues_spec.rb b/modules/decision_reviews/spec/requests/v1/notice_of_disagreements/contestable_issues_spec.rb new file mode 100644 index 00000000000..8b1ab534841 --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/notice_of_disagreements/contestable_issues_spec.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V1::NoticeOfDisagreements::ContestableIssues', type: :request do + let(:user) { build(:user, :loa3) } + + before { sign_in_as(user) } + + describe '#index' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::NoticeOfDisagreements::ContestableIssuesController#index exception % (NOD_V1)' # rubocop:disable Layout/LineLength + end + + subject { get '/decision_reviews/v1/notice_of_disagreements/contestable_issues' } + + it 'fetches issues that the Veteran could contest via a notice of disagreement' do + VCR.use_cassette('decision_review/NOD-GET-CONTESTABLE-ISSUES-RESPONSE-200_V1') do + subject + expect(response).to be_successful + expect(JSON.parse(response.body)['data']).to be_an Array + end + end + + it 'adds to the PersonalInformationLog when an exception is thrown' do + VCR.use_cassette('decision_review/NOD-GET-CONTESTABLE-ISSUES-RESPONSE-404_V1') do + expect(personal_information_logs.count).to be 0 + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + expect(pil.data['user']).to be_truthy + expect(pil.data['error']).to be_truthy + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v1/notice_of_disagreements_spec.rb b/modules/decision_reviews/spec/requests/v1/notice_of_disagreements_spec.rb new file mode 100644 index 00000000000..5ec32afec67 --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/notice_of_disagreements_spec.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V1::NoticeOfDisagreements', type: :request do + let(:user) do + build(:user, + :loa3, + mhv_correlation_id: 'some-mhv_correlation_id', + birls_id: 'some-birls_id', + participant_id: 'some-participant_id', + vet360_id: 'some-vet360_id') + end + let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } + + let(:error_log_args) do + { + message: 'Overall claim submission failure!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '10182', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: false, + http: { + status_code: 422, + body: response_error_body + } + } + end + + let(:response_error_body) do + { + 'errors' => [{ 'title' => 'Missing required fields', + 'detail' => 'One or more expected fields were not found', + 'code' => '145', + 'source' => { 'pointer' => '/data/attributes' }, + 'status' => '422', + 'meta' => { 'missing_fields' => ['boardReviewOption'] } }] + } + end + + before { sign_in_as(user) } + + describe '#create' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::NoticeOfDisagreementsController#create exception % (NOD_V1)' + end + + subject do + post '/decision_reviews/v1/notice_of_disagreements', + params: test_request_body.to_json, + headers: + end + + let(:extra_error_log_message) do + 'BackendServiceException: {:source=>"Common::Client::Errors::ClientError raised in DecisionReviews::V1::Service", :code=>"DR_422"}' # rubocop:disable Layout/LineLength + end + + let(:test_request_body) do + JSON.parse Rails.root.join('spec', 'fixtures', 'notice_of_disagreements', + 'valid_NOD_create_request.json').read + end + + context 'when valid data is submitted' do + shared_examples 'successful NOD' do |upload_job_to_use, upload_job_not_to_use| + it 'creates an NOD and logs to StatsD and logger' do + VCR.use_cassette('decision_review/NOD-CREATE-RESPONSE-200_V1') do + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with({ + message: 'Overall claim submission success!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '10182', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + } + }) + + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_10182.overall_claim_submission.success') + previous_appeal_submission_ids = AppealSubmission.all.pluck :submitted_appeal_uuid + # Create an InProgressForm + in_progress_form = create(:in_progress_form, user_uuid: user.uuid, form_id: '10182') + expect(in_progress_form).not_to be_nil + subject + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + expect(previous_appeal_submission_ids).not_to include id + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('NOD') + # AppealSubmissionUpload should be created for each form attachment + appeal_submission_uploads = AppealSubmissionUpload.where(appeal_submission:) + expect(appeal_submission_uploads.count).to eq 1 + # Evidence upload job is enqueued with non-engine job + expect(upload_job_to_use).to have_enqueued_sidekiq_job(appeal_submission_uploads.first.id) + expect(upload_job_not_to_use).not_to have_enqueued_sidekiq_job(anything) + # InProgressForm should be destroyed after successful submission + in_progress_form = InProgressForm.find_by(user_uuid: user.uuid, form_id: '10182') + expect(in_progress_form).to be_nil + # SavedClaim should be created with request data + saved_claim = SavedClaim::NoticeOfDisagreement.find_by(guid: id) + expect(JSON.parse(saved_claim.form)).to eq(test_request_body) + end + end + end + + context 'and engine job flag is disabled' do + before do + Flipper.disable :decision_review_new_engine_submit_upload_job + end + + it_behaves_like 'successful NOD', DecisionReview::SubmitUpload, DecisionReviews::SubmitUpload + end + + context 'and engine job flag is enabled' do + before do + Flipper.enable :decision_review_new_engine_submit_upload_job + end + + it_behaves_like 'successful NOD', DecisionReviews::SubmitUpload, DecisionReview::SubmitUpload + end + end + + it 'adds to the PersonalInformationLog when an exception is thrown and logs to StatsD and logger' do + VCR.use_cassette('decision_review/NOD-CREATE-RESPONSE-422_V1') do + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + expect(Rails.logger).to receive(:error).with( + message: "Exception occurred while submitting Notice Of Disagreement: #{extra_error_log_message}", + backtrace: anything + ) + expect(Rails.logger).to receive(:error).with(extra_error_log_message, anything) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_10182.overall_claim_submission.failure') + expect(personal_information_logs.count).to be 0 + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + %w[ + first_name last_name birls_id icn edipi mhv_correlation_id + participant_id vet360_id ssn assurance_level birth_date + ].each { |key| expect(pil.data['user'][key]).to be_truthy } + %w[message backtrace key response_values original_status original_body] + .each { |key| expect(pil.data['error'][key]).to be_truthy } + expect(pil.data['additional_data']['request']['body']).not_to be_empty + + # check that transaction rolled back / records were not persisted / evidence upload job was not queued up + expect(AppealSubmission.count).to eq 0 + expect(AppealSubmissionUpload.count).to eq 0 + expect(DecisionReview::SubmitUpload).not_to have_enqueued_sidekiq_job(anything) + + expect(SavedClaim.count).to eq 0 + end + end + + context 'when an error occurs in wrapped code' do + shared_examples 'rolledback transaction' do |model| + before do + allow_any_instance_of(model).to receive(:save!).and_raise(ActiveModel::Error) # stub a model error + end + + it 'rollsback transaction' do + VCR.use_cassette('decision_review/NOD-CREATE-RESPONSE-200_V1') do + expect(subject).to eq 500 + # check that transaction rolled back / records were not persisted / evidence upload job was not queued up + expect(AppealSubmission.count).to eq 0 + expect(AppealSubmissionUpload.count).to eq 0 + expect(DecisionReview::SubmitUpload).not_to have_enqueued_sidekiq_job(anything) + expect(SavedClaim.count).to eq 0 + end + end + end + + context 'for AppealSubmission' do + it_behaves_like 'rolledback transaction', AppealSubmission + end + + context 'for SavedClaim' do + it_behaves_like 'rolledback transaction', SavedClaim + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v1/supplemental_claims/contestable_issues_spec.rb b/modules/decision_reviews/spec/requests/v1/supplemental_claims/contestable_issues_spec.rb new file mode 100644 index 00000000000..b8459297f96 --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/supplemental_claims/contestable_issues_spec.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V1::SupplementalClaims::ContestableIssues', type: :request do + let(:user) { build(:user, :loa3) } + let(:success_log_args) do + { + message: 'Get contestable issues success!', + user_uuid: user.uuid, + action: 'Get contestable issues', + form_id: '995', + upstream_system: 'Lighthouse', + downstream_system: nil, + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + } + } + end + let(:error_log_args) do + { + message: 'Get contestable issues failure!', + user_uuid: user.uuid, + action: 'Get contestable issues', + form_id: '995', + upstream_system: 'Lighthouse', + downstream_system: nil, + is_success: false, + http: { + status_code: 404, + body: anything + } + } + end + + before { sign_in_as(user) } + + describe '#index' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::SupplementalClaims::ContestableIssuesController#index exception % (SC_V1)' # rubocop:disable Layout/LineLength + end + + subject { get '/decision_reviews/v1/supplemental_claims/contestable_issues/compensation' } + + it 'fetches issues that the Veteran could contest via a supplemental claim' do + VCR.use_cassette('decision_review/SC-GET-CONTESTABLE-ISSUES-RESPONSE-200_V1') do + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(success_log_args) + subject + expect(response).to be_successful + expect(JSON.parse(response.body)['data']).to be_an Array + end + end + + it 'adds to the PersonalInformationLog when an exception is thrown' do + VCR.use_cassette('decision_review/SC-GET-CONTESTABLE-ISSUES-RESPONSE-404_V1') do + expect(personal_information_logs.count).to be 0 + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + expect(pil.data['user']).to be_truthy + expect(pil.data['error']).to be_truthy + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v1/supplemental_claims_spec.rb b/modules/decision_reviews/spec/requests/v1/supplemental_claims_spec.rb new file mode 100644 index 00000000000..750ffc3a44e --- /dev/null +++ b/modules/decision_reviews/spec/requests/v1/supplemental_claims_spec.rb @@ -0,0 +1,366 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V1::SupplementalClaims', type: :request do + let(:user) { build(:user, :loa3) } + let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } + let(:success_log_args) do + { + message: 'Overall claim submission success!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '995', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + } + } + end + let(:error_log_args) do + { + message: 'Overall claim submission failure!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '995', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: false, + http: { + status_code: 422, + body: response_error_body + } + } + end + let(:extra_error_log_message) do + 'BackendServiceException: ' \ + '{:source=>"Common::Client::Errors::ClientError raised in DecisionReviews::V1::Service", :code=>"DR_422"}' + end + + let(:response_error_body) do + { + 'errors' => [{ 'title' => 'Missing required fields', + 'detail' => 'One or more expected fields were not found', + 'code' => '145', + 'source' => { 'pointer' => '/data/attributes' }, + 'status' => '422', + 'meta' => { 'missing_fields' => ['form5103Acknowledged'] } }] + } + end + + before { sign_in_as(user) } + + describe '#create' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::SupplementalClaimsController#create exception % (SC_V1)' + end + + subject do + post '/decision_reviews/v1/supplemental_claims', + params: VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY_V1').to_json, + headers: + end + + it 'creates a supplemental claim' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-200_V1') do + # Create an InProgressForm + in_progress_form = create(:in_progress_form, user_uuid: user.uuid, form_id: '20-0995') + expect(in_progress_form).not_to be_nil + previous_appeal_submission_ids = AppealSubmission.all.pluck :submitted_appeal_uuid + + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(success_log_args) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_995.overall_claim_submission.success') + + subject + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + expect(previous_appeal_submission_ids).not_to include id + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('SC') + # InProgressForm should be destroyed after successful submission + in_progress_form = InProgressForm.find_by(user_uuid: user.uuid, form_id: '20-0995') + expect(in_progress_form).to be_nil + # SavedClaim should be created with request data + saved_claim = SavedClaim::SupplementalClaim.find_by(guid: id) + expect(saved_claim.form).to eq(VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY_V1').to_json) + expect(saved_claim.uploaded_forms).to be_empty + end + end + + it 'adds to the PersonalInformationLog when an exception is thrown' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-422_V1') do + expect(personal_information_logs.count).to be 0 + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + expect(Rails.logger).to receive(:error).with( + message: "Exception occurred while submitting Supplemental Claim: #{extra_error_log_message}", + backtrace: anything + ) + expect(Rails.logger).to receive(:error).with(extra_error_log_message, anything) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_995.overall_claim_submission.failure') + + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + %w[ + first_name last_name birls_id icn edipi mhv_correlation_id + participant_id vet360_id ssn assurance_level birth_date + ].each { |key| expect(pil.data['user'][key]).to be_truthy } + %w[message backtrace key response_values original_status original_body] + .each { |key| expect(pil.data['error'][key]).to be_truthy } + expect(pil.data['additional_data']['request']['body']).not_to be_empty + end + end + end + + describe '#create with 4142' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::SupplementalClaimsController#create exception % (SC_V1)' + end + + before do + Flipper.disable(:decision_review_new_engine_4142_job) + end + + context 'when tracking 4142 is enabled' do + subject do + post '/decision_reviews/v1/supplemental_claims', + params: VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json, + headers: + end + + before do + Flipper.enable(:decision_review_track_4142_submissions) + end + + it 'creates a supplemental claim and queues and saves a 4142 form when 4142 info is provided' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-4142-200_V1') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload_location') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload') do + previous_appeal_submission_ids = AppealSubmission.all.pluck :submitted_appeal_uuid + expect { subject }.to change(DecisionReview::Form4142Submit.jobs, :size).by(1) + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + expect(previous_appeal_submission_ids).not_to include id + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('SC') + expect do + DecisionReview::Form4142Submit.drain + end.to change(DecisionReview::Form4142Submit.jobs, :size).by(-1) + + # SavedClaim should be created with request data and list of uploaded forms + request_body = JSON.parse(VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json) + saved_claim = SavedClaim::SupplementalClaim.find_by(guid: id) + expect(saved_claim.form).to eq(request_body.to_json) + expect(saved_claim.uploaded_forms).to contain_exactly '21-4142' + + # SecondaryAppealForm should be created with 4142 data and user data + expected_form4142_data = VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV')['form4142'] + veteran_data = { + 'vaFileNumber' => '796111863', + 'veteranSocialSecurityNumber' => '796111863', + 'veteranFullName' => { + 'first' => 'abraham', + 'middle' => nil, + 'last' => 'lincoln' + }, + 'veteranDateOfBirth' => '1809-02-12', + 'veteranAddress' => { 'addressLine1' => '123 Main St', 'city' => 'New York', 'countryCodeISO2' => 'US', + 'zipCode5' => '30012', 'country' => 'US', 'postalCode' => '30012' }, + 'email' => 'josie@example.com', + 'veteranPhone' => '5558001111' + } + expected_form4142_data_with_user = veteran_data.merge(expected_form4142_data) + saved4142 = SecondaryAppealForm.last + saved_4142_json = JSON.parse(saved4142.form) + expect(saved_4142_json).to eq(expected_form4142_data_with_user) + expect(saved4142.form_id).to eq('21-4142') + expect(saved4142.appeal_submission.id).to eq(appeal_submission.id) + end + end + end + end + end + + context 'when tracking 4142 is disabled' do + before do + Flipper.disable(:decision_review_track_4142_submissions) + end + + it 'creates a supplemental claim and queues a 4142 form when 4142 info is provided' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-4142-200_V1') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload_location') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload') do + previous_appeal_submission_ids = AppealSubmission.all.pluck :submitted_appeal_uuid + expect do + post '/decision_reviews/v1/supplemental_claims', + params: VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json, + headers: + end.to change(DecisionReview::Form4142Submit.jobs, :size).by(1) + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + expect(previous_appeal_submission_ids).not_to include id + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('SC') + expect do + DecisionReview::Form4142Submit.drain + end.to change(DecisionReview::Form4142Submit.jobs, :size).by(-1) + + # SavedClaim should be created with request data and list of uploaded forms + request_body = JSON.parse(VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json) + saved_claim = SavedClaim::SupplementalClaim.find_by(guid: id) + expect(saved_claim.form).to eq(request_body.to_json) + expect(saved_claim.uploaded_forms).to contain_exactly '21-4142' + end + end + end + end + + it 'does not persist a SecondaryAppealForm for the 4142' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-4142-200_V1') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload_location') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload') do + expect do + post '/decision_reviews/v1/supplemental_claims', + params: VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json, + headers: + end.to change(DecisionReview::Form4142Submit.jobs, :size).by(1) + expect do + DecisionReview::Form4142Submit.drain + end.not_to change(SecondaryAppealForm, :count) + end + end + end + end + end + + context 'when 4142 engine job is enabled' do + before do + Flipper.disable(:decision_review_track_4142_submissions) + Flipper.enable(:decision_review_new_engine_4142_job) + end + + it 'creates a supplemental claim and queues a 4142 form when 4142 info is provided' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-4142-200_V1') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload_location') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload') do + previous_appeal_submission_ids = AppealSubmission.all.pluck :submitted_appeal_uuid + expect do + post '/decision_reviews/v1/supplemental_claims', + params: VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV').to_json, + headers: + end.to change(DecisionReviews::Form4142Submit.jobs, :size).by(1) + expect(DecisionReview::SubmitUpload).not_to have_enqueued_sidekiq_job(anything) + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + expect(previous_appeal_submission_ids).not_to include id + + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('SC') + expect do + DecisionReviews::Form4142Submit.drain + end.to change(DecisionReviews::Form4142Submit.jobs, :size).by(-1) + end + end + end + end + end + end + + describe '#create with uploads' do + # Create evidence files objs + + subject do + post '/decision_reviews/v1/supplemental_claims', + params: example_payload.to_json, + headers: + end + + let(:example_payload) { VetsJsonSchema::EXAMPLES.fetch('SC-CREATE-REQUEST-BODY-FOR-VA-GOV') } + + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V1::SupplementalClaimsController#create exception % (SC_V1)' + end + + context 'when valid data is submitted' do + shared_examples 'successful SC' do |upload_job_to_use, upload_job_not_to_use| + it 'creates a supplemental claim and queues evidence jobs when additionalDocuments info is provided' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-UPLOADS-200_V1') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload_location') do + VCR.use_cassette('lighthouse/benefits_intake/200_lighthouse_intake_upload') do + VCR.use_cassette('decision_review/SC-GET-UPLOAD-URL-200_V1') do + expect { subject }.to change(upload_job_to_use.jobs, :size).by(2) + expect(upload_job_not_to_use).not_to have_enqueued_sidekiq_job(anything) + expect(response).to be_successful + parsed_response = JSON.parse(response.body) + id = parsed_response['data']['id'] + appeal_submission = AppealSubmission.find_by(submitted_appeal_uuid: id) + expect(appeal_submission.type_of_appeal).to eq('SC') + end + end + end + end + end + end + + context 'and engine job flag is disabled' do + before do + Flipper.disable :decision_review_new_engine_submit_upload_job + end + + it_behaves_like 'successful SC', DecisionReview::SubmitUpload, DecisionReviews::SubmitUpload + end + + context 'and engine job flag is enabled' do + before do + Flipper.enable :decision_review_new_engine_submit_upload_job + end + + it_behaves_like 'successful SC', DecisionReviews::SubmitUpload, DecisionReview::SubmitUpload + end + end + + context 'when an error occurs in the transaction' do + shared_examples 'rolledback transaction' do |model| + before do + allow_any_instance_of(model).to receive(:save!).and_raise(ActiveModel::Error) # stub a model error + end + + it 'rollsback transaction' do + VCR.use_cassette('decision_review/SC-CREATE-RESPONSE-WITH-UPLOADS-200_V1') do + expect(subject).to eq 500 + + # check that transaction rolled back / records were not persisted / evidence upload job was not queued up + expect(AppealSubmission.count).to eq 0 + expect(AppealSubmissionUpload.count).to eq 0 + expect(DecisionReview::SubmitUpload).not_to have_enqueued_sidekiq_job(anything) + expect(SavedClaim.count).to eq 0 + expect(SecondaryAppealForm.count).to eq 0 + end + end + end + + context 'for AppealSubmission' do + it_behaves_like 'rolledback transaction', AppealSubmission + end + + context 'for SavedClaim' do + it_behaves_like 'rolledback transaction', SavedClaim + end + end + end +end diff --git a/modules/decision_reviews/spec/requests/v2/higher_level_reviews_spec.rb b/modules/decision_reviews/spec/requests/v2/higher_level_reviews_spec.rb new file mode 100644 index 00000000000..81bcd4f5711 --- /dev/null +++ b/modules/decision_reviews/spec/requests/v2/higher_level_reviews_spec.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'support/controller_spec_helper' + +RSpec.describe 'DecisionReviews::V2::HigherLevelReviews', type: :request do + let(:user) { build(:user, :loa3) } + let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } + let(:success_log_args) do + { + message: 'Overall claim submission success!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '996', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: true, + http: { + status_code: 200, + body: '[Redacted]' + }, + version: 'V2' + } + end + let(:error_log_args) do + { + message: 'Overall claim submission failure!', + user_uuid: user.uuid, + action: 'Overall claim submission', + form_id: '996', + upstream_system: nil, + downstream_system: 'Lighthouse', + is_success: false, + http: { + status_code: 422, + body: response_error_body + }, + version: 'V2' + } + end + + let(:response_error_body) do + { + 'errors' => [{ 'title' => 'Missing required fields', + 'detail' => 'One or more expected fields were not found', + 'code' => '145', + 'source' => { 'pointer' => '/' }, + 'status' => '422', + 'meta' => { 'missing_fields' => %w[data included] } }] + } + end + + let(:extra_error_log_message) do + 'BackendServiceException: {:source=>"Common::Client::Errors::ClientError raised in DecisionReviews::V1::Service", :code=>"DR_422"}' # rubocop:disable Layout/LineLength + end + + before { sign_in_as(user) } + + describe '#create' do + def personal_information_logs + PersonalInformationLog.where 'error_class like ?', + 'DecisionReviews::V2::HigherLevelReviewsController#create exception % (HLR_V2)' + end + + subject do + post '/decision_reviews/v2/higher_level_reviews', + params: VetsJsonSchema::EXAMPLES.fetch('HLR-CREATE-REQUEST-BODY_V1').to_json, + headers: + end + + it 'creates an HLR' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-200_V1') do + # Create an InProgressForm + in_progress_form = create(:in_progress_form, user_uuid: user.uuid, form_id: '20-0996') + expect(in_progress_form).not_to be_nil + + allow(Rails.logger).to receive(:info) + expect(Rails.logger).to receive(:info).with(success_log_args) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_996.overall_claim_submission.success') + + subject + expect(response).to be_successful + appeal_uuid = JSON.parse(response.body)['data']['id'] + expect(AppealSubmission.where(submitted_appeal_uuid: appeal_uuid).first).to be_truthy + # InProgressForm should be destroyed after successful submission + in_progress_form = InProgressForm.find_by(user_uuid: user.uuid, form_id: '20-0996') + expect(in_progress_form).to be_nil + # SavedClaim should be created with request data + saved_claim = SavedClaim::HigherLevelReview.find_by(guid: appeal_uuid) + expect(saved_claim.form).to eq(VetsJsonSchema::EXAMPLES.fetch('HLR-CREATE-REQUEST-BODY_V1').to_json) + end + end + + context 'when an error occurs with the api call' do + it 'adds to the PersonalInformationLog' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-422_V1') do + expect(personal_information_logs.count).to be 0 + + allow(Rails.logger).to receive(:error) + expect(Rails.logger).to receive(:error).with(error_log_args) + expect(Rails.logger).to receive(:error).with( + message: "Exception occurred while submitting Higher Level Review: #{extra_error_log_message}", + backtrace: anything + ) + expect(Rails.logger).to receive(:error).with(extra_error_log_message, anything) + allow(StatsD).to receive(:increment) + expect(StatsD).to receive(:increment).with('decision_review.form_996.overall_claim_submission.failure') + + subject + expect(personal_information_logs.count).to be 1 + pil = personal_information_logs.first + %w[ + first_name last_name birls_id icn edipi mhv_correlation_id + participant_id vet360_id ssn assurance_level birth_date + ].each { |key| expect(pil.data['user'][key]).to be_truthy } + %w[message backtrace key response_values original_status original_body] + .each { |key| expect(pil.data['error'][key]).to be_truthy } + expect(pil.data['additional_data']['request']['body']).not_to be_empty + end + end + end + + context 'when an error occurs in the transaction' do + shared_examples 'rolledback transaction' do |model| + before do + allow_any_instance_of(model).to receive(:save!).and_raise(ActiveModel::Error) # stub a model error + end + + it 'rollsback transaction' do + VCR.use_cassette('decision_review/HLR-CREATE-RESPONSE-200_V1') do + expect(subject).to eq 500 + + # check that transaction rolled back / records were not persisted + expect(AppealSubmission.count).to eq 0 + expect(SavedClaim.count).to eq 0 + end + end + end + + context 'for AppealSubmission' do + it_behaves_like 'rolledback transaction', AppealSubmission + end + + context 'for SavedClaim' do + it_behaves_like 'rolledback transaction', SavedClaim + end + end + end +end diff --git a/modules/decision_reviews/spec/sidekiq/delete_saved_claim_records_job_spec.rb b/modules/decision_reviews/spec/sidekiq/delete_saved_claim_records_job_spec.rb index 46ca6d9afed..2d7198699b8 100644 --- a/modules/decision_reviews/spec/sidekiq/delete_saved_claim_records_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/delete_saved_claim_records_job_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' RSpec.describe DecisionReviews::DeleteSavedClaimRecordsJob, type: :job do subject { described_class } diff --git a/modules/decision_reviews/spec/sidekiq/failure_notification_email_job_spec.rb b/modules/decision_reviews/spec/sidekiq/failure_notification_email_job_spec.rb index b6305ae3e98..62f60158ab9 100644 --- a/modules/decision_reviews/spec/sidekiq/failure_notification_email_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/failure_notification_email_job_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' require 'decision_review_v1/service' RSpec.describe DecisionReviews::FailureNotificationEmailJob, type: :job do diff --git a/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb b/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb index e72ea88e98a..763cb002a60 100644 --- a/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/form4142_submit_spec.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' +require './modules/decision_reviews/spec/support/vcr_helper' require 'decision_reviews/v1/service' require 'decision_reviews/v1/helpers' diff --git a/modules/decision_reviews/spec/sidekiq/hlr_status_updater_job_spec.rb b/modules/decision_reviews/spec/sidekiq/hlr_status_updater_job_spec.rb index 82739894a03..6fc43fedb37 100644 --- a/modules/decision_reviews/spec/sidekiq/hlr_status_updater_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/hlr_status_updater_job_spec.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true -require 'rails_helper' -require './modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs' +require './modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs' RSpec.describe DecisionReviews::HlrStatusUpdaterJob, type: :job do subject { described_class } - include_context 'status updater job context', SavedClaim::HigherLevelReview + include_context 'engine status updater job context', SavedClaim::HigherLevelReview describe 'perform' do context 'with flag enabled', :aggregate_failures do @@ -14,7 +13,7 @@ Flipper.enable :decision_review_saved_claim_hlr_status_updater_job_enabled end - include_examples 'status updater job with base forms', SavedClaim::HigherLevelReview + include_examples 'engine status updater job with base forms', SavedClaim::HigherLevelReview end context 'with flag disabled' do diff --git a/modules/decision_reviews/spec/sidekiq/nod_email_loader_job_spec.rb b/modules/decision_reviews/spec/sidekiq/nod_email_loader_job_spec.rb index 65dfa92d900..4feb43ad8d8 100644 --- a/modules/decision_reviews/spec/sidekiq/nod_email_loader_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/nod_email_loader_job_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' RSpec.describe DecisionReviews::NodEmailLoaderJob, type: :job do subject { described_class } diff --git a/modules/decision_reviews/spec/sidekiq/nod_send_email_job_spec.rb b/modules/decision_reviews/spec/sidekiq/nod_send_email_job_spec.rb index 57947348057..76e4c81313c 100644 --- a/modules/decision_reviews/spec/sidekiq/nod_send_email_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/nod_send_email_job_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' require 'decision_review_v1/service' RSpec.describe DecisionReviews::NodSendEmailJob, type: :job do diff --git a/modules/decision_reviews/spec/sidekiq/nod_status_updater_job_spec.rb b/modules/decision_reviews/spec/sidekiq/nod_status_updater_job_spec.rb index 4cf61deefb5..921e7a07318 100644 --- a/modules/decision_reviews/spec/sidekiq/nod_status_updater_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/nod_status_updater_job_spec.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true -require 'rails_helper' -require './modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs' +require './modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs' RSpec.describe DecisionReviews::NodStatusUpdaterJob, type: :job do subject { described_class } - include_context 'status updater job context', SavedClaim::NoticeOfDisagreement + include_context 'engine status updater job context', SavedClaim::NoticeOfDisagreement describe 'perform' do context 'with flag enabled', :aggregate_failures do @@ -14,8 +13,8 @@ Flipper.enable :decision_review_saved_claim_nod_status_updater_job_enabled end - include_examples 'status updater job with base forms', SavedClaim::NoticeOfDisagreement - include_examples 'status updater job when forms include evidence', SavedClaim::NoticeOfDisagreement + include_examples 'engine status updater job with base forms', SavedClaim::NoticeOfDisagreement + include_examples 'engine status updater job when forms include evidence', SavedClaim::NoticeOfDisagreement end context 'with flag disabled' do diff --git a/modules/decision_reviews/spec/sidekiq/sc_status_updater_job_spec.rb b/modules/decision_reviews/spec/sidekiq/sc_status_updater_job_spec.rb index df225707942..7f1f39bf5b3 100644 --- a/modules/decision_reviews/spec/sidekiq/sc_status_updater_job_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/sc_status_updater_job_spec.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true -require 'rails_helper' -require './modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs' +require './modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs' RSpec.describe DecisionReviews::ScStatusUpdaterJob, type: :job do subject { described_class } - include_context 'status updater job context', SavedClaim::SupplementalClaim + include_context 'engine status updater job context', SavedClaim::SupplementalClaim describe 'perform' do context 'with flag enabled', :aggregate_failures do @@ -14,8 +13,169 @@ Flipper.enable :decision_review_saved_claim_sc_status_updater_job_enabled end - include_examples 'status updater job with base forms', SavedClaim::SupplementalClaim - include_examples 'status updater job when forms include evidence', SavedClaim::SupplementalClaim + include_examples 'engine status updater job with base forms', SavedClaim::SupplementalClaim + include_examples 'engine status updater job when forms include evidence', SavedClaim::SupplementalClaim + + context 'SavedClaim records are present with completed status in LH and have associated secondary forms' do + let(:benefits_intake_service) { instance_double(BenefitsIntake::Service) } + let!(:secondary_form1) { create(:secondary_appeal_form4142_module, guid: SecureRandom.uuid) } + let!(:secondary_form2) { create(:secondary_appeal_form4142_module, guid: SecureRandom.uuid) } + let!(:secondary_form3) { create(:secondary_appeal_form4142_module, guid: SecureRandom.uuid) } + let!(:secondary_form_with_delete_date) do + create(:secondary_appeal_form4142_module, guid: SecureRandom.uuid, delete_date: 10.days.from_now) + end + let!(:saved_claim1) do + SavedClaim::SupplementalClaim.create(guid: secondary_form1.appeal_submission.submitted_appeal_uuid, + form: '{}') + end + let!(:saved_claim2) do + SavedClaim::SupplementalClaim.create(guid: secondary_form2.appeal_submission.submitted_appeal_uuid, + form: '{}') + end + let!(:saved_claim3) do + SavedClaim::SupplementalClaim.create(guid: secondary_form3.appeal_submission.submitted_appeal_uuid, + form: '{}') + end + let!(:saved_claim4) do + SavedClaim::SupplementalClaim + .create(guid: secondary_form_with_delete_date.appeal_submission.submitted_appeal_uuid, form: '{}') + end + + let(:upload_response_4142_vbms) do + response = JSON.parse(File.read('spec/fixtures/supplemental_claims/SC_4142_show_response_200.json')) + instance_double(Faraday::Response, body: response) + end + + let(:upload_response_4142_processing) do + response = JSON.parse(File.read('spec/fixtures/supplemental_claims/SC_4142_show_response_200.json')) + response['data']['attributes']['status'] = 'processing' + instance_double(Faraday::Response, body: response) + end + + let(:upload_response_4142_error) do + response = JSON.parse(File.read('spec/fixtures/supplemental_claims/SC_4142_show_response_200.json')) + response['data']['attributes']['status'] = 'error' + response['data']['attributes']['detail'] = 'Invalid PDF' + instance_double(Faraday::Response, body: response) + end + + before do + allow(DecisionReviews::V1::Service).to receive(:new).and_return(service) + allow(BenefitsIntake::Service).to receive(:new).and_return(benefits_intake_service) + allow(service).to receive(:get_supplemental_claim).with(saved_claim1.guid).and_return(response_complete) + allow(service).to receive(:get_supplemental_claim).with(saved_claim2.guid).and_return(response_complete) + allow(service).to receive(:get_supplemental_claim).with(saved_claim3.guid).and_return(response_complete) + allow(service).to receive(:get_supplemental_claim).with(saved_claim4.guid).and_return(response_complete) + + allow(StatsD).to receive(:increment) + allow(Rails.logger).to receive(:info) + end + + it 'does NOT check status for 4142 records that already have a delete_date' do + expect(benefits_intake_service).to receive(:get_status).with(uuid: secondary_form1.guid) + expect(benefits_intake_service).to receive(:get_status).with(uuid: secondary_form2.guid) + expect(benefits_intake_service).to receive(:get_status).with(uuid: secondary_form3.guid) + expect(benefits_intake_service).not_to receive(:get_status) + .with(uuid: secondary_form_with_delete_date.guid) + subject.new.perform + end + + context 'updating 4142 information' do + let(:frozen_time) { DateTime.new(2024, 1, 1).utc } + + before do + allow(benefits_intake_service).to receive(:get_status) + .with(uuid: secondary_form1.guid).and_return(upload_response_4142_vbms) + allow(benefits_intake_service).to receive(:get_status) + .with(uuid: secondary_form2.guid).and_return(upload_response_4142_processing) + allow(benefits_intake_service).to receive(:get_status) + .with(uuid: secondary_form3.guid).and_return(upload_response_4142_error) + end + + it 'updates the status and sets delete_date if appropriate' do + Timecop.freeze(frozen_time) do + subject.new.perform + end + expect(secondary_form1.reload.status).to include('vbms') + expect(secondary_form1.reload.status_updated_at).to eq frozen_time + expect(secondary_form1.reload.delete_date).to eq frozen_time + 59.days + + expect(secondary_form2.reload.status).to include('processing') + expect(secondary_form2.reload.status_updated_at).to eq frozen_time + expect(secondary_form2.reload.delete_date).to be_nil + + expect(secondary_form3.reload.status).to include('error') + expect(secondary_form3.reload.status_updated_at).to eq frozen_time + expect(secondary_form3.reload.delete_date).to be_nil + end + + it 'logs ands increments metrics for updates to the 4142 status' do + Timecop.freeze(frozen_time) do + subject.new.perform + end + + expect(StatsD).to have_received(:increment) + .with('worker.decision_review.saved_claim_sc_status_updater_secondary_form.delete_date_update') + .exactly(1).time + expect(StatsD).to have_received(:increment) + .with('worker.decision_review.saved_claim_sc_status_updater_secondary_form.status', tags: ['status:vbms']) + .exactly(1).time + expect(StatsD).to have_received(:increment) + .with('worker.decision_review.saved_claim_sc_status_updater_secondary_form.status', + tags: ['status:processing']) + .exactly(1).time + + expect(Rails.logger).to have_received(:info) + .with('DecisionReviews::SavedClaimScStatusUpdaterJob secondary form status error', anything) + end + + context 'when the 4142 status is unchanged' do + let(:previous_status) do + { + 'status' => 'processing' + } + end + + before do + secondary_form2.update!(status: previous_status.to_json, status_updated_at: frozen_time - 3.days) + end + + it 'does not log or increment metrics for a status change' do + Timecop.freeze(frozen_time) do + subject.new.perform + end + + expect(secondary_form2.reload.status_updated_at).to eq frozen_time + expect(StatsD).not_to have_received(:increment) + .with('worker.decision_review.saved_claim_sc_status_updater_secondary_form.status', + tags: ['status:processing']) + end + end + + context 'when at least one secondary form is not in vbms status' do + it 'does not set the delete_date for the related SavedCalim::SupplementlClaim' do + Timecop.freeze(frozen_time) do + subject.new.perform + end + + expect(saved_claim1.reload.delete_date).to eq frozen_time + 59.days + expect(saved_claim2.delete_date).to be_nil + end + end + end + + context 'with 4142 flag disabled' do + before do + Flipper.disable :decision_review_track_4142_submissions + end + + it 'does not query SecondaryAppealForm records' do + expect(SecondaryAppealForm).not_to receive(:where) + + subject.new.perform + end + end + end end context 'with flag disabled' do diff --git a/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb b/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb index eea8bda8221..d8a0c4abbd1 100644 --- a/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb +++ b/modules/decision_reviews/spec/sidekiq/submit_upload_spec.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' +require './modules/decision_reviews/spec/support/vcr_helper' RSpec.describe DecisionReviews::SubmitUpload, type: :job do subject { described_class } diff --git a/modules/decision_reviews/spec/spec_helper.rb b/modules/decision_reviews/spec/spec_helper.rb deleted file mode 100644 index 9b94ee05d3c..00000000000 --- a/modules/decision_reviews/spec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -# Configure Rails Envinronment -ENV['RAILS_ENV'] = 'test' - -require 'rspec/rails' - -RSpec.configure { |config| config.use_transactional_fixtures = true } diff --git a/modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs.rb b/modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs.rb similarity index 93% rename from modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs.rb rename to modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs.rb index 3c34ff63196..59b55ba78d1 100644 --- a/modules/decision_reviews/spec/sidekiq/shared_examples_for_status_updater_jobs.rb +++ b/modules/decision_reviews/spec/support/engine_shared_examples_for_status_updater_jobs.rb @@ -1,9 +1,10 @@ # frozen_string_literal: true -require 'rails_helper' +require './modules/decision_reviews/spec/dr_spec_helper' +require './modules/decision_reviews/spec/support/sidekiq_helper' require 'decision_reviews/v1/service' -SUBCLASS_INFO = { +ENGINE_SUBCLASS_INFO = { SavedClaim::SupplementalClaim => { service_method: 'get_supplemental_claim', evidence_service_method: 'get_supplemental_claim_upload', statsd_prefix: 'worker.decision_review.saved_claim_sc_status_updater', @@ -21,7 +22,7 @@ service_tag: 'service:board-appeal' } }.freeze -RSpec.shared_context 'status updater job context' do |subclass| +RSpec.shared_context 'engine status updater job context' do |subclass| subject { described_class } let(:service) { instance_double(DecisionReviews::V1::Service) } @@ -29,15 +30,15 @@ let(:guid1) { SecureRandom.uuid } let(:guid2) { SecureRandom.uuid } let(:guid3) { SecureRandom.uuid } - let(:other_subclass1) { SUBCLASS_INFO.keys.excluding(subclass)[0] } - let(:other_subclass2) { SUBCLASS_INFO.keys.excluding(subclass)[1] } - let(:service_method) { SUBCLASS_INFO[subclass][:service_method].to_sym } - let(:other_service_method1) { SUBCLASS_INFO[other_subclass1][:service_method].to_sym } - let(:other_service_method2) { SUBCLASS_INFO[other_subclass2][:service_method].to_sym } + let(:other_subclass1) { ENGINE_SUBCLASS_INFO.keys.excluding(subclass)[0] } + let(:other_subclass2) { ENGINE_SUBCLASS_INFO.keys.excluding(subclass)[1] } + let(:service_method) { ENGINE_SUBCLASS_INFO[subclass][:service_method].to_sym } + let(:other_service_method1) { ENGINE_SUBCLASS_INFO[other_subclass1][:service_method].to_sym } + let(:other_service_method2) { ENGINE_SUBCLASS_INFO[other_subclass2][:service_method].to_sym } - let(:statsd_prefix) { SUBCLASS_INFO[subclass][:statsd_prefix] } - let(:log_prefix) { SUBCLASS_INFO[subclass][:log_prefix] } - let(:service_tag) { SUBCLASS_INFO[subclass][:service_tag] } + let(:statsd_prefix) { ENGINE_SUBCLASS_INFO[subclass][:statsd_prefix] } + let(:log_prefix) { ENGINE_SUBCLASS_INFO[subclass][:log_prefix] } + let(:service_tag) { ENGINE_SUBCLASS_INFO[subclass][:service_tag] } let(:response_complete) do response = JSON.parse(VetsJsonSchema::EXAMPLES.fetch('HLR-SHOW-RESPONSE-200_V2').to_json) # deep copy @@ -62,7 +63,7 @@ end end -RSpec.shared_examples 'status updater job with base forms' do |subclass| +RSpec.shared_examples 'engine status updater job with base forms' do |subclass| context 'SavedClaim records are present' do before do subclass.create(guid: guid1, form: '{}') @@ -206,7 +207,7 @@ end end -RSpec.shared_examples 'status updater job when forms include evidence' do |subclass| +RSpec.shared_examples 'engine status updater job when forms include evidence' do |subclass| let(:upload_response_vbms) do response = JSON.parse(File.read('spec/fixtures/supplemental_claims/SC_upload_show_response_200.json')) instance_double(Faraday::Response, body: response) @@ -226,7 +227,7 @@ instance_double(Faraday::Response, body: response) end - let(:evidence_service_method) { SUBCLASS_INFO[subclass][:evidence_service_method].to_sym } + let(:evidence_service_method) { ENGINE_SUBCLASS_INFO[subclass][:evidence_service_method].to_sym } context 'SavedClaim records are present with completed status in LH and have associated evidence uploads' do let(:guid4) { SecureRandom.uuid } diff --git a/modules/decision_reviews/spec/support/pdf_helper.rb b/modules/decision_reviews/spec/support/pdf_helper.rb new file mode 100644 index 00000000000..0b657889fbd --- /dev/null +++ b/modules/decision_reviews/spec/support/pdf_helper.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require 'support/pdf_fill_helper' + +RSpec.configure do |config| + %i[model controller request].each do |type| + config.include PdfFillHelper, type: + end +end diff --git a/modules/decision_reviews/spec/support/sidekiq_helper.rb b/modules/decision_reviews/spec/support/sidekiq_helper.rb new file mode 100644 index 00000000000..ca28e6cdc49 --- /dev/null +++ b/modules/decision_reviews/spec/support/sidekiq_helper.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'sidekiq/semantic_logging' +require 'sidekiq/error_tag' +require 'sidekiq/testing' + +Sidekiq::Testing.fake! +Sidekiq::Testing.server_middleware do |chain| + chain.add Sidekiq::SemanticLogging + chain.add SidekiqStatsInstrumentation::ServerMiddleware + chain.add Sidekiq::ErrorTag +end + +RSpec.configure do |config| + config.before do + Sidekiq::Job.clear_all + end +end diff --git a/modules/decision_reviews/spec/support/vcr_helper.rb b/modules/decision_reviews/spec/support/vcr_helper.rb new file mode 100644 index 00000000000..b166c095bfc --- /dev/null +++ b/modules/decision_reviews/spec/support/vcr_helper.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'support/vcr' +require 'support/vcr_multipart_matcher_helper' + +VCR::MATCH_EVERYTHING = { match_requests_on: %i[method uri headers body] }.freeze + +module VCR + def self.all_matches + %i[method uri body] + end +end + +VCR.configure(&:configure_rspec_metadata!) + +VCR.configure do |c| + c.before_record(:force_utf8) do |interaction| + interaction.response.body.force_encoding('UTF-8') + end +end diff --git a/modules/ivc_champva/app/controllers/ivc_champva/v1/uploads_controller.rb b/modules/ivc_champva/app/controllers/ivc_champva/v1/uploads_controller.rb index df96337a7df..25eb41aca09 100644 --- a/modules/ivc_champva/app/controllers/ivc_champva/v1/uploads_controller.rb +++ b/modules/ivc_champva/app/controllers/ivc_champva/v1/uploads_controller.rb @@ -81,20 +81,48 @@ def submit_supporting_documents private - def handle_file_uploads(form_id, parsed_form_data) - file_paths, metadata = get_file_paths_and_metadata(parsed_form_data) - statuses, error_message = FileUploader.new(form_id, metadata, file_paths, true).handle_uploads - statuses = Array(statuses) - - # Retry attempt if specific error message is found - if statuses.any? do |status| - status.is_a?(String) && status.include?('No such file or directory @ rb_sysopen') + if Flipper.enabled?(:champva_multiple_stamp_retry, @current_user) + def handle_file_uploads(form_id, parsed_form_data) + attempt = 0 + max_attempts = 1 + + begin + file_paths, metadata = get_file_paths_and_metadata(parsed_form_data) + file_uploader = FileUploader.new(form_id, metadata, file_paths, true) + statuses, error_message = file_uploader.handle_uploads + rescue => e + attempt += 1 + error_message_downcase = e.message.downcase + Rails.logger.error "Error handling file uploads (attempt #{attempt}): #{e.message}" + + if error_message_downcase.include?('failed to generate stamped file') || + (error_message_downcase.include?('unable to find file') && attempt <= max_attempts) + Rails.logger.error 'Retrying in 1 seconds...' + sleep 1 + retry + else + return [[], 'Error handling file uploads'] + end + end + + [statuses, error_message] end + else + def handle_file_uploads(form_id, parsed_form_data) file_paths, metadata = get_file_paths_and_metadata(parsed_form_data) statuses, error_message = FileUploader.new(form_id, metadata, file_paths, true).handle_uploads - end + statuses = Array(statuses) - [statuses, error_message] + # Retry attempt if specific error message is found + if statuses.any? do |status| + status.is_a?(String) && status.include?('No such file or directory @ rb_sysopen') + end + file_paths, metadata = get_file_paths_and_metadata(parsed_form_data) + statuses, error_message = FileUploader.new(form_id, metadata, file_paths, true).handle_uploads + end + + [statuses, error_message] + end end def get_attachment_ids_and_form(parsed_form_data) diff --git a/modules/ivc_champva/app/form_mappings/vha_10_7959a.json.erb b/modules/ivc_champva/app/form_mappings/vha_10_7959a.json.erb index 187ca5e087e..b30cec049f7 100644 --- a/modules/ivc_champva/app/form_mappings/vha_10_7959a.json.erb +++ b/modules/ivc_champva/app/form_mappings/vha_10_7959a.json.erb @@ -24,7 +24,7 @@ "form1[0].#subform[0].#area[0].OutsdWrkAccdnt[0]": "<%= ['true', true].include?(form.data.dig('claims', 0, 'claim_is_auto_related')) ? 0 : 1 %>", "form1[0].#subform[0].PtntCverage[0]": "<%= ['true', true].include?(form.data.dig('has_ohi')) ? 0 : 1 %>", "form1[0].#subform[0].#area[1].RadioButtonList[0]": "<%= form.data.dig('policies', 0, 'type') === 'group' ? 1 : - form.data.dig('policies', 0, 'type') === 'non_group' ? 2 : + form.data.dig('policies', 0, 'type') === 'nonGroup' ? 2 : form.data.dig('policies', 0, 'type') === 'medicare' ? 3 : form.data.dig('policies', 0, 'type') === 'other' ? 4 : 0 %>", "form1[0].#subform[0].#area[1].SpecifyOtherPrimaryHealthInsurance[0]": "<%= form.data.dig('policies', 0, 'other_type') %>", diff --git a/modules/ivc_champva/app/services/ivc_champva/attachments.rb b/modules/ivc_champva/app/services/ivc_champva/attachments.rb index f5e5627f192..60bb476d2ed 100644 --- a/modules/ivc_champva/app/services/ivc_champva/attachments.rb +++ b/modules/ivc_champva/app/services/ivc_champva/attachments.rb @@ -4,7 +4,7 @@ module IvcChampva module Attachments attr_accessor :form_id, :uuid, :data - def handle_attachments(file_path) + def handle_attachments(file_path) # rubocop:disable Metrics/MethodLength file_paths = [file_path] attachments = get_attachments @@ -22,7 +22,14 @@ def handle_attachments(file_path) File.join(File.dirname(attachment), new_file_name) end - File.rename(attachment, new_file_path) + if Flipper.enabled?(:champva_pdf_decrypt, @current_user) + # Use FileUtils.mv to handle `Errno::EXDEV` error since encrypted PDFs + # get stashed in the clamav_tmp dir which is a different device on staging, apparently + FileUtils.mv(attachment, new_file_path) # Performs a copy automatically if mv fails + else + File.rename(attachment, new_file_path) + end + file_paths << new_file_path end diff --git a/modules/ivc_champva/spec/requests/ivc_champva/v1/forms/uploads_spec.rb b/modules/ivc_champva/spec/requests/ivc_champva/v1/forms/uploads_spec.rb index 138f3af99dd..b603e2d2537 100644 --- a/modules/ivc_champva/spec/requests/ivc_champva/v1/forms/uploads_spec.rb +++ b/modules/ivc_champva/spec/requests/ivc_champva/v1/forms/uploads_spec.rb @@ -336,6 +336,39 @@ expect(error_message).to eq('Upload failed') end end + + context 'when file uploads fail with other errors retry once' do + subject(:result) { controller.send(:handle_file_uploads, form_id, parsed_form_data) } + + let(:failure_response) { [[400], 'Upload failed'] } + let(:expected_statuses) { [400] } + let(:expected_error_message) { 'Upload failed' } + + before do + allow(Flipper).to receive(:enabled?).with(:champva_multiple_stamp_retry, @current_user).and_return(true) + allow(file_uploader).to receive(:handle_uploads).and_return(failure_response) + end + + it 'returns the error statuses and error message' do + expect(result).to eq([expected_statuses, expected_error_message]) + end + end + + context 'when a document is loaded and is missing' do + before do + allow(Flipper).to receive(:enabled?).with(:champva_multiple_stamp_retry, @current_user).and_return(true) + allow(file_uploader).to receive(:handle_uploads).and_return([['No such file '], + 'File not found']) + end + + it 'retries the file uploads and returns the error message' do + allow(file_uploader).to receive(:handle_uploads).and_return([[200], nil]) + + statuses, error_message = controller.send(:handle_file_uploads, form_id, parsed_form_data) + expect(statuses).to eq([200]) + expect(error_message).to be_nil + end + end end end end diff --git a/modules/mobile/docs/index.html b/modules/mobile/docs/index.html index 1bdb44d63b7..7bfe6d06a54 100755 --- a/modules/mobile/docs/index.html +++ b/modules/mobile/docs/index.html @@ -12,7 +12,7 @@ margin: 0; } -