This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 94
Claim status tool cards champva be #27235
Merged
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a41722e
Working example
ksantiagoBAH 1c328d3
Added ChampVA cards to CST and added metadata support
ksantiagoBAH 501e530
Fixed linting issues
ksantiagoBAH 0e878bc
Added to CODEOWNERS file
ksantiagoBAH b62a9cb
Fixed more linting
ksantiagoBAH e738178
Fixed Rspecs
ksantiagoBAH 8ffdf39
Updated specs
ksantiagoBAH 0988e51
Fixed linting
ksantiagoBAH 49c1d18
Added 2 new specs
ksantiagoBAH 5cb6656
Updated CODEOWNERS file for new specs
ksantiagoBAH 096da8e
Fixed linting issues
ksantiagoBAH 09d52d2
Set the provider to IVC
ksantiagoBAH a5a2840
Added memonization
ksantiagoBAH af6c285
Merge branch 'master' into Claim-status-tool-cards-champva-BE
ksantiagoBAH b4653c3
Updated specs
ksantiagoBAH d116767
Added platform flag attributes
ksantiagoBAH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
config/benefits_claims/claim_status_meta/ivc_champva/default.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| { | ||
| "detail": { | ||
| "pageTitle": "Application for CHAMPVA benefits", | ||
| "sectionTitle": "Applicants" | ||
| }, | ||
| "statusHeader": { | ||
| "label": "Application status", | ||
| "intro": "Here's the latest update on your application." | ||
| }, | ||
| "whatYouNeedToDo": { | ||
| "title": "What you need to do", | ||
| "emptyState": "You don't need to do anything right now. If there's an update, we'll mail you a letter." | ||
| }, | ||
| "files": { | ||
| "simpleLayout": true, | ||
| "headerTitle": "Application files", | ||
| "description": "If you need to add information or update your documents, you can print a copy of each document and send them by mail or fax.", | ||
| "sectionTitle": "Application files", | ||
| "introText": "If you need to add information or update your documents, you can print a copy of each document and send them by mail or fax.", | ||
| "noteText": "We can only scan 1 side of each document. If any of your documents are double-sided, you'll need to include copies of each side of those documents.", | ||
| "options": { | ||
| "mail": { | ||
| "title": "Option 1: By mail", | ||
| "description": "Mail copies of your documents to this address:", | ||
| "addressLines": [ | ||
| "VHA Office of Community Care", | ||
| "CHAMPVA Eligibility", | ||
| "PO Box 137", | ||
| "Spring City, PA 19475" | ||
| ] | ||
| }, | ||
| "fax": { | ||
| "title": "Option 2: By fax", | ||
| "description": "Fax your documents to 1-303-331-7809." | ||
| } | ||
| }, | ||
| "confirmation": { | ||
| "title": "How to confirm we've received your documents", | ||
| "description": "To confirm we've received documents you submitted by mail or fax, call us at 800-733-8387 (TTY: 711). We're here Monday through Friday, 8:00 a.m. to 7:30 p.m. ET." | ||
| } | ||
| }, | ||
| "help": { | ||
| "phone": "8007338387", | ||
| "tty": "711", | ||
| "hours": "Monday through Friday, 8:00 a.m. to 7:30 p.m. ET.", | ||
| "intro": "If you have questions about your CHAMPVA application, call us" | ||
| }, | ||
| "overview": { | ||
| "title": "Overview of the application process", | ||
| "description": "Track where you are in the application process for CHAMPVA benefits. And learn what to expect at each step.", | ||
| "currentStepPrefix": "Your application moved to this step on", | ||
| "steps": [ | ||
| { | ||
| "phase": 1, | ||
| "header": "Step 1: Application received", | ||
| "description": "We received your application.", | ||
| "details": [ | ||
| "If we need more information, we'll mail you a letter." | ||
| ], | ||
| "linkText": "Learn more about what to do after you apply for CHAMPVA benefits", | ||
| "linkUrl": "https://www.va.gov/health-care/family-caregiver-benefits/champva/" | ||
| }, | ||
| { | ||
| "phase": 2, | ||
| "header": "Step 2: Application decided", | ||
| "description": "We made a decision on your application.", | ||
| "details": [ | ||
| "We'll send you a decision letter for each applicant by mail. They should arrive within 7 to 10 business days." | ||
| ] | ||
| } | ||
| ], | ||
| "currentStepByStatus": { | ||
| "pending": 1, | ||
| "vbms": 2, | ||
| "error": 2 | ||
| } | ||
| }, | ||
| "listCard": { | ||
| "title": "Application for CHAMPVA benefits", | ||
| "receivedLabel": "Received on", | ||
| "lastUpdatedPrefix": "Last updated:" | ||
| }, | ||
| "whatWeAreDoing": { | ||
| "title": "What we're doing", | ||
| "linkText": { | ||
| "status": "Learn more about this step" | ||
| }, | ||
| "statusMap": { | ||
| "pending": { | ||
| "title": "Step 1 of 2: Application received", | ||
| "description": "We received your application. If we need more information, we'll mail you a letter." | ||
| }, | ||
| "vbms": { | ||
| "title": "Step 2 of 2: Application completed", | ||
| "description": "We completed processing your application." | ||
| }, | ||
| "error": { | ||
| "title": "Step 2 of 2: Additional review needed", | ||
| "description": "We need additional review before we can complete your application." | ||
| } | ||
| } | ||
| } | ||
| } |
82 changes: 82 additions & 0 deletions
82
config/benefits_claims/claim_status_meta/lighthouse/default.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| { | ||
| "detail": { | ||
| "sectionTitle": "What you've claimed" | ||
| }, | ||
| "statusHeader": { | ||
| "label": "Claim status", | ||
| "intro": "Here's the latest information on your claim." | ||
| }, | ||
| "whatYouNeedToDo": { | ||
| "title": "What you need to do", | ||
| "emptyState": "There's nothing we need from you right now. We'll let you know when there's an update." | ||
| }, | ||
| "help": { | ||
| "phone": "8008271000", | ||
| "tty": "711", | ||
| "hours": "Monday through Friday, 8:00 a.m. to 9:00 p.m. ET.", | ||
| "intro": "Call us" | ||
| }, | ||
| "whatWeAreDoing": { | ||
| "title": "What we're doing", | ||
| "linkText": { | ||
| "phaseType": "Learn more about this step", | ||
| "status": "Learn more about the review process" | ||
| }, | ||
| "phaseTypeMap": { | ||
| "CLAIM_RECEIVED": { | ||
| "title": "Step 1 of 8: Claim received", | ||
| "description": "We received your claim in our system." | ||
| }, | ||
| "UNDER_REVIEW": { | ||
| "title": "Step 2 of 8: Initial review", | ||
| "description": "We're checking your claim for basic information, like your name and Social Security number. If information is missing, we'll contact you." | ||
| }, | ||
| "GATHERING_OF_EVIDENCE": { | ||
| "title": "Step 3 of 8: Evidence gathering", | ||
| "description": "We're reviewing your claim to make sure we have all the evidence and information we need. If we need anything else, we'll contact you." | ||
| }, | ||
| "REVIEW_OF_EVIDENCE": { | ||
| "title": "Step 4 of 8: Evidence review", | ||
| "description": "We're reviewing all the evidence for your claim. If we need more evidence or you submit more evidence, your claim will go back to Step 3: Evidence gathering." | ||
| }, | ||
| "PREPARATION_FOR_DECISION": { | ||
| "title": "Step 5 of 8: Rating", | ||
| "description": "We're deciding your claim and determining your disability rating. If we need more evidence or you submit more evidence, your claim will go back to Step 3: Evidence gathering." | ||
| }, | ||
| "PENDING_DECISION_APPROVAL": { | ||
| "title": "Step 6 of 8: Preparing decision letter", | ||
| "description": "We're preparing your decision letter. If we need more evidence or you submit more evidence, your claim will go back to Step 3: Evidence gathering." | ||
| }, | ||
| "PREPARATION_FOR_NOTIFICATION": { | ||
| "title": "Step 7 of 8: Final review", | ||
| "description": "A senior reviewer is doing a final review of your claim and the decision letter." | ||
| }, | ||
| "COMPLETE": { | ||
| "title": "Step 8 of 8: Claim decided", | ||
| "description": "You can view and download your decision letter. We also sent you a copy by mail." | ||
| } | ||
| }, | ||
| "statusMap": { | ||
| "CLAIM_RECEIVED": { | ||
| "title": "Step 1 of 5: Claim received", | ||
| "description": "We received your claim. We haven't assigned the claim to a reviewer yet." | ||
| }, | ||
| "INITIAL_REVIEW": { | ||
| "title": "Step 2 of 5: Initial review", | ||
| "description": "We assigned your claim to a reviewer. The reviewer will determine if we need any more information from you." | ||
| }, | ||
| "EVIDENCE_GATHERING_REVIEW_DECISION": { | ||
| "title": "Step 3 of 5: Evidence gathering, review, and decision", | ||
| "description": "We're getting evidence from you, your health care providers, government agencies, and other sources. We'll review the evidence and make a decision." | ||
| }, | ||
| "PREPARATION_FOR_NOTIFICATION": { | ||
| "title": "Step 4 of 5: Preparation for notification", | ||
| "description": "We've made a decision on your claim. We're getting your decision letter ready to mail to you." | ||
| }, | ||
| "COMPLETE": { | ||
| "title": "Step 5 of 5: Closed", | ||
| "description": "We've made a decision about your claim. If available, you can view your decision letter. We'll also send you your letter by U.S. mail." | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'json' | ||
|
|
||
| module BenefitsClaims | ||
| module ClaimStatusMeta | ||
| class ConfigLoader | ||
| BASE_PATH = Rails.root.join('config', 'benefits_claims', 'claim_status_meta') | ||
|
|
||
| class << self | ||
| def load(provider:, variant: 'default') | ||
| provider_name = provider.to_s | ||
| variant_name = variant.to_s | ||
| config = if Rails.env.development? || Rails.env.test? | ||
| parse_config(provider_name, variant_name) | ||
| else | ||
| cached_config(provider_name, variant_name) | ||
| end | ||
|
|
||
| # Callers may mutate values (for dynamic fields); always return a copy. | ||
| config.deep_dup | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def cached_config(provider_name, variant_name) | ||
| Rails.cache.fetch("benefits_claims/claim_status_meta/#{provider_name}/#{variant_name}") do | ||
| parse_config(provider_name, variant_name).freeze | ||
| end | ||
| end | ||
|
|
||
| def parse_config(provider_name, variant_name) | ||
| file_path = BASE_PATH.join(provider_name, "#{variant_name}.json") | ||
| raise ArgumentError, "Claim status metadata file not found: #{file_path}" unless File.exist?(file_path) | ||
|
|
||
| parsed = JSON.parse(File.read(file_path)) | ||
| raise ArgumentError, "Claim status metadata must be a JSON object: #{file_path}" unless parsed.is_a?(Hash) | ||
|
|
||
| parsed | ||
| rescue JSON::ParserError => e | ||
| raise ArgumentError, "Invalid JSON in claim status metadata file #{file_path}: #{e.message}" | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails.cache.fetchhere has no TTL or deploy/versioned cache key. In production cache stores (Redis/Memcached), this can cause stale JSON metadata to survive deploys/updates. Consider addingexpires_inand/or incorporating the file mtime/app version into the cache key to ensure new JSON content takes effect predictably.