Skip to content

Commit

Permalink
[Rated Disabilities] Updating service connected decision logic to inc…
Browse files Browse the repository at this point in the history
…lude 1151 granted (#29450)

* Updating service connected decisions to include 1151 granted

* Updatings specs for RatingLists component
  • Loading branch information
jerekshoe committed Apr 29, 2024
1 parent cf9eb31 commit a669237
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Expand Up @@ -12,7 +12,14 @@ export const getHeadingText = rating => {
return headingParts.join(' ');
};

const isServiceConnected = item => item.decision === 'Service Connected';
// Possible decision values:
// 1151 Denied, 1151 Granted, Not Service Connected, Service Connected
// Decisions that should be considered Service Connected:
// 1151 Granted and Service Connected
const serviceConnectedDecisions = ['1151 Granted', 'Service Connected'];

const isServiceConnected = item =>
serviceConnectedDecisions.includes(item.decision);

export const sortRatings = ratings => {
return ratings.sort((a, b) => b.effectiveDate.localeCompare(a.effectiveDate));
Expand Down
Expand Up @@ -13,6 +13,8 @@ const nonServiceConnectedSectionTitle =
'Conditions VA determined aren’t service-connected';
const serviceConnectedSectionTitle = 'Service-connected ratings';

// The possible decision values that we can get from vets-api currently are:
// 1151 Denied, 1151 Granted, Not Service Connected, and Service Connected
const ratings = [
{
decision: 'Service Connected',
Expand All @@ -29,7 +31,7 @@ const ratings = [
ratingPercentage: 100,
},
{
decision: 'Service Connected',
decision: '1151 Granted',
diagnosticText: 'Sarcoma Soft-Tissue',
diagnosticTypeName: 'Soft tissue sarcoma (neurogenic origin)',
effectiveDate: '2018-08-01',
Expand All @@ -43,7 +45,7 @@ const ratings = [
ratingPercentage: null,
},
{
decision: 'Not Service Connected',
decision: '1151 Denied',
diagnosticText: 'Diabetes',
diagnosticTypeName: 'Diabetes mellitus',
effectiveDate: null,
Expand Down

0 comments on commit a669237

Please sign in to comment.