Caseflow: Decision Sync | DTA Error EP fails to establish because of no date

Created on 18 Jan 2019  路  9Comments  路  Source: department-of-veterans-affairs/caseflow

We got a claim date error when trying to establish a DTA error EP. This is because approx_decision_date from the decision issue was null.

irb(main):032:0> SupplementalClaim.where(veteran_file_number: "124592531").first.decision_review_remanded.decision_issues.first.approx_decision_date
[2019-01-17 19:19:18 -0500]   SupplementalClaim Load (1.2ms)  SELECT  "supplemental_claims".* FROM "supplemental_claims" WHERE "supplemental_claims"."veteran_file_number" = $1 ORDER BY "supplemental_claims"."id" ASC LIMIT $2  [["veteran_file_number", "124592531"], ["LIMIT", 1]]
[2019-01-17 19:19:18 -0500]   HigherLevelReview Load (1.0ms)  SELECT  "higher_level_reviews".* FROM "higher_level_reviews" WHERE "higher_level_reviews"."id" = $1 LIMIT $2  [["id", 879], ["LIMIT", 1]]
[2019-01-17 19:19:18 -0500]   DecisionIssue Load (1.0ms)  SELECT  "decision_issues".* FROM "decision_issues" WHERE "decision_issues"."decision_review_id" = $1 AND "decision_issues"."decision_review_type" = $2 ORDER BY "decision_issues"."id" ASC LIMIT $3  [["decision_review_id", 879], ["decision_review_type", "HigherLevelReview"], ["LIMIT", 1]]
=> nil
High caseflow-intake Bug

Most helpful comment

@aroltsch We just merged a PR that will get the decision date for Appeals from the Decision Document, and Appeals shouldn't need the profile date

All 9 comments

The end_product_last_action_date was not set for this issue

Have added an error when this happens to help diagnose it.

@aroltsch points out that other parts of the system may need updating depending on the outcome of this bug. E.g.: https://github.com/department-of-veterans-affairs/caseflow/blob/master/app/models/concerns/issue_updater.rb#L48

I did look at that code before. These could still be two different problems since the above was for a ClaimReview.

@shanear when creating decision issues, do we need to set a profile date?
https://github.com/department-of-veterans-affairs/caseflow/blob/master/app/models/concerns/issue_updater.rb#L48
If yes, where do I get this info?

@aroltsch We just merged a PR that will get the decision date for Appeals from the Decision Document, and Appeals shouldn't need the profile date

For claim reviews which get the end product last action date, we've discovered that the date was being misinterpreted (the day and month were getting switched), resulting in incorrect dates or invalid dates. In the case of invalid dates, this would prevent the new Supplemental Claim from being created, because the Decision Issue was missing the approximate decision date.

looks good!

[#<DecisionIssue:0x000055678e989ce8
  id: 138,
  disposition: "DTA Error - PMRs",
  description:
   "DTA Error - PMRs: Service connection for diabetes Mellitus is denied.",
  promulgation_date: Wed, 06 Feb 2019 20:57:52 UTC +00:00,
  profile_date: Wed, 06 Feb 2019 20:41:18 UTC +00:00,
  participant_id: "600246804",
  rating_issue_reference_id: nil,
  decision_text: nil,
  decision_review_type: "HigherLevelReview",
  decision_review_id: 1100,
  benefit_type: "compensation",
  end_product_last_action_date: Wed, 06 Feb 2019,
  diagnostic_code: nil,
  caseflow_decision_date: nil>]
[#<DecisionIssue:0x0000556794057110
   id: 137,
   disposition: "DTA Error - PMRs",
   description:
    "A duty to assist error has been identified during the Higher Level Review for heart.",
   promulgation_date: Wed, 06 Feb 2019 20:26:29 UTC +00:00,
   profile_date: Wed, 06 Feb 2019 20:13:58 UTC +00:00,
   participant_id: "600246813",
   rating_issue_reference_id: "123870",
   decision_text:
    "A duty to assist error has been identified during the Higher Level Review for heart.",
   decision_review_type: "HigherLevelReview",
   decision_review_id: 1099,
   benefit_type: "compensation",
   end_product_last_action_date: Wed, 06 Feb 2019,
   diagnostic_code: nil,
   caseflow_decision_date: nil>],
 [2019-02-07 18:18:29 -0500]   DecisionIssue Load (0.5ms)  SELECT "decision_issues".* FROM "decision_issues" INNER JOIN "request_decision_issues" ON "decision_issues"."id" = "request_decision_issues"."decision_issue_id" WHERE "request_decision_issues"."request_issue_id" = $1  [["request_issue_id", 1260]]
[#<DecisionIssue:0x0000556794014400
   id: 136,
   disposition: "DTA Error - Fed Recs",
   description:
    "A duty to assist error has been identified during the Higher Level Review for Tinnitus.",
   promulgation_date: Wed, 06 Feb 2019 20:26:29 UTC +00:00,
   profile_date: Wed, 06 Feb 2019 20:13:58 UTC +00:00,
   participant_id: "600246813",
   rating_issue_reference_id: "123868",
   decision_text:
    "A duty to assist error has been identified during the Higher Level Review for Tinnitus.",
   decision_review_type: "HigherLevelReview",
   decision_review_id: 1099,
   benefit_type: "compensation",
   end_product_last_action_date: Wed, 06 Feb 2019,
   diagnostic_code: nil,
   caseflow_decision_date: nil>],
 [2019-02-07 18:18:29 -0500]   DecisionIssue Load (0.6ms)  SELECT "decision_issues".* FROM "decision_issues" INNER JOIN "request_decision_issues" ON "decision_issues"."id" = "request_decision_issues"."decision_issue_id" WHERE "request_decision_issues"."request_issue_id" = $1  [["request_issue_id", 1261]]
[#<DecisionIssue:0x0000556793fe24f0
   id: 135,
   disposition: "Denied",
   description:
    "Evaluation of PTSD, which is currently 30 percent disabling, is continued.",
   promulgation_date: Wed, 06 Feb 2019 20:26:29 UTC +00:00,
   profile_date: Wed, 06 Feb 2019 20:13:58 UTC +00:00,
   participant_id: "600246813",
   rating_issue_reference_id: "123869",
   decision_text:
    "Evaluation of PTSD, which is currently 30 percent disabling, is continued.",
   decision_review_type: "HigherLevelReview",
   decision_review_id: 1099,
   benefit_type: "compensation",
   end_product_last_action_date: Wed, 06 Feb 2019,
   diagnostic_code: nil,
   caseflow_decision_date: nil>]]
Was this page helpful?
0 / 5 - 0 ratings