03X Remediation Taxonomies - department-of-veterans-affairs/caseflow GitHub Wiki

Helpful links for further information on EPEs

Required steps

  1. Log in to AWS
  2. EC2 find the appeals-prod instance and connect
  3. Source environment variables and open console and set user
sudo su -
source /opt/caseflow-certification/caseflow-certification_env.sh; cd /opt/caseflow-certification/src; bin/rails c
RequestStore[:current_user] = User.system_user

EPE 030 has not been established

This is where an End Product Establishment has all of the correct details and only needs to be established in VBMS with no additional changes Frequent ticket titles: "Unable to cest 030", "ep has not been established in vbms"

  1. Find appeal with uuid
appeal = Appeal.find_by(uuid: "*appeal uuid*")
  1. Find decision document and decision issues on appeal
dd = appeal.decision_document
dis = appeal.decision_issues
  1. Check EPE not established in VBMS
if dd.end_product_establishments.count <= 1
	"safe to proceed board effectuations count: #{dd.effectuations.count} end product establishments count: #{dd.end_product_establishments.count}"
	else
	"escalate to tier 4"
end
  1. If either return 0, skip to step 8. Check decision issues
  2. If both return 1 or more run the code below step 6 to check that EPE has not been established in VBMS
  3. WARNING if there are multiple EPEs attached to the decision document escalate to tier 4 and contact Drew Hadley
epe = dd.end_product_establishments.first
epe.established_at
  1. If epe.established_atreturns nil proceed to check decision issues. If it returns a date escalate to tier 4 and tag Drew Hadley.
  2. Check decision issues
    1. If there are no changes requested to the decision issue(s) ensure the description(s) and disposition(s) are correct before proceeding
    2. If there are decision issues that need added or updated go to Updating Decision Issues section of this SOP
pp dis
  1. If dd.effectuations.count was 0 create effectuations and grab the EPE from the new Effectuation. If the count was 1, skip to step 10
if dd.effectuations.count == 0
	dd.send(:create_board_grant_effectuations!)
	dd.effectuations
end
  1. Assign End Product Establishment to a variable
epe = dd.end_product_establishments.first
  1. Establish the EPE in VBMS
DecisionReviewProcessJob.perform_now(epe)
  1. Will return true if successful

Updating Decision Issues

Get new description(s) and disposition(s) from the decision document found in Triage form attached to snow ticket. There are two sub categories below 1. Creating New Decision Issues, and 2. Updating Existing Decision Issues. Use these for each decision issue that requires alteration.

Creating New Decision Issue

  1. Follow steps 1-7 of EPE 030 has not been established to check current decision issues
  2. Set variables for new decision issue note: the disposition for granted will be "allowed" in caseflow and the most common benefit_type is "compensation"
di_description = "*description*"
di_disposition = "*disposition*"
di_benefit_type = "*benefit type*"
  1. Create decision issue and assign to variable
new_di = DecisionIssue.create!(
	disposition: di_disposition,
	description: di_description,
	participant_id: appeal.veteran.participant_id,
	decision_review_type: "Appeal",
	decision_review_id: appeal.id,
	benefit_type: di_benefit_type
)

The decision issues need to be attached to the corresponding request issues in order to show up in Caseflow. Typically the Triage form is explicit about which request issue the new decision issue should be attached to and you can match based on descriptions, but sometimes we have to create a new one. 4. Grab array of request issues and Pretty Print the request issues to find the corresponding request issue description

pp ris = appeal.request_issues
  1. If you found a corresponding request issue use the id to assign to a variable if not skip to Create Request Issue and return to step 6 once complete
ri = ris.find_by(id:"*request issue id*")
  1. Push the decision issue into the request issue's decision_issues array
ri.decision_issues.push(new_di)
  1. Check the Caseflow page with the appeal and ensure the correct decision issue is listed under the related request issue it would look something like [https://appeals.cf.ds.va.gov/queue/appeals/appeal-uuid/]

REPEAT STEPS 1-7 FOR EACH NEW DECISION ISSUE Note: each decision issue should have it's own corresponding request issue unless specifically stated otherwise

  1. If dd.effectuations.count was 0 create effectuations and grab the EPE from the new Effectuation. If the count was 1, skip to step 10
if dd.effectuations.count == 0
	dd.send(:create_board_grant_effectuations!)
	dd.effectuations
end
  1. Assign End Product Establishment to a variable
epe = dd.end_product_establishments.first
  1. Establish the EPE in VBMS
DecisionReviewProcessJob.perform_now(epe)
  1. Will return true if successful

Creating a Request Issue

For the situations where there is a decision issue that doesn't have a corresponding request issue so will not show up in Caseflow

  1. For the description just use the same description given for the decision issue if there was no other description specified. The benefit type and the appeal should be the same that was assigned at earlier steps in the sop, but here are lines of code to reset if necessary
ri_description = di_description 
ri_benefit_type = di_benefit_type
appeal = Appeal.find_by(uuid:"*appeal uuid*")
  1. create the request issue and assign it to a variable
ri = RequestIssue.create!(
	veteran_participant_id: appeal.veteran.participant_id,
	decision_review_type: "Appeal",
	decision_review_id: appeal.id,
	contested_issue_description: ri_description,
	type: "RequestIssue",
	benefit_type: ri_benefit_type
)
  1. Return to step 6 of Creating New Decision Issue

Updating Existing Decision Issues

WARNING: Do not attempt to do this if the EPE has previously been established in VBMS.

Sometimes the existing decision issues on an appeal in Caseflow do not accurately reflect the decisions made in VBMS. This is to rectify the description(s) and disposition(s).

  1. Follow steps 1-7 of EPE 030 has not been established to check current decision issues
  2. Grab and Pretty Print current decision issues using Triage form to help find the correct decision issue to update
pp dis
  1. Set variable with correct decision issue
di = dis.find_by(id: "<decision issue id>")
  1. Set variables with new disposition and description
new_disposition = "<new disposition>"
new_description = "<new description>"
  1. Update the decision issue
di.update!(description: new_description, disposition: new_disposition)
  1. Check Caseflow to ensure update was successful [https://appeals.cf.ds.va.gov/queue/appeals//]
  2. Check the Caseflow page with the appeal and ensure the correct decision issue is listed under the related request issue it would look something like [https://appeals.cf.ds.va.gov/queue/appeals/appeal-uuid/]
  3. If dd.effectuations.count was 0 create effectuations and grab the EPE from the new Effectuation. If the count was 1, skip to step 10
if dd.effectuations.count == 0
	dd.send(:create_board_grant_effectuations!)
	dd.effectuations
end
  1. Assign End Product Establishment to a variable
epe = dd.end_product_establishments.first
  1. Establish the EPE in VBMS
DecisionReviewProcessJob.perform_now(epe)
  1. Will return true if successful

Reestablish a Cancelled EP

  1. Grab the EPE with the given claim iid
epe = EndProductEstablishment.find_by(reference_id: "<claim id>")
  1. Create a duplicate EPE with the original
epe2 = EndProductEstablishment.create(
  source_type: epe.source_type,
  source_id: epe.source_id,
  veteran_file_number: epe.veteran_file_number,
  claim_date: epe.claim_date,
  code: epe.code,
  station: epe.station,
  claimant_participant_id: epe.claimant_participant_id,
  payee_code: epe.payee_code,
  doc_reference_id: epe.doc_reference_id,
  development_item_reference_id: epe.development_item_reference_id,
  benefit_type_code: epe.benefit_type_code,
  user_id: epe.user_id,
  limited_poa_code: epe.limited_poa_code,
  limited_poa_access: epe.limited_poa_access
)
  1. If it's a Board Grant EPE (030BGR, 030BGRNR, 030BGRPMC, 030BGNRPMC) we want to connect the newly created End Product Establishment to the corresponding Board Grant Effectuation on the old EPE. All other forms of EPEs, you will connect it to the Request Issues on the old EPE.
if ["030BGR", "030BGRNR", "030BGRPMC", "030BGNRPMC"].include?(epe.code)
  epe.source.effectuations.update_all(end_product_establishment_id: epe2.id, contention_reference_id: nil)
else
  epe.source.request_issues.update_all(end_product_establishment_id: epe2.id, contention_reference_id: nil, closed_status: nil, closed_at: nil)
end
  1. Reload the duplicated EPE
epe2.reload
  1. Manually establish the duplicated EPE
epe2.establish!
  1. This should return true if successful
⚠️ **GitHub.com Fallback** ⚠️