Skip to content

Spouse POA Access Legacy Appeals

Aiman Kayad edited this page Jan 2, 2024 · 6 revisions

Spouse POA Access SOP

Prerequisites, this SOP is for Legacy appeals ONLY

You will need the following pieces of information:

vacols_id - the veteran's Legacy appeal

claimant_participant_id - participant ID of spouse

Sudo into caseflow

sudo su -c "source /opt/caseflow-certification/caseflow-certification_env.sh; cd /opt/caseflow-certification/src; bin/rails c"

Set the user

RequestStore[:current_user] = User.system_user

vacols_id = ** Insert vacols_id ** ;

claimant_participant_id = ** Insert spouse claimant_participant_id **;

legacy_appeal = LegacyAppeal.find_by!(vacols_id: vacols_id)

First a clean up is needed for any existing POA record

set POA to the one that is currently listed on the legacy appeal IF there is no BGS record for the POA, or it doesn't match our new spouse participant ID, remove it

poa = legacy_appeal.bgs_power_of_attorney;

if poa.bgs_record == :not_found || poa.claimant_participant_id != claimant_participant_id
	poa.destroy!
end

Create the Person record for the spouse using the claimant participant ID Person.find_or_create_by_participant_id(claimant_participant_id);

Create the BGS POA record

NOTE: Please ONLY attempt to run this command if you already have confirmed with the End User that the following 3 additional data attributes as well as the claimant_participant_id were properly added to BGS by the End User that is requesting the remediation, you may also need the poa_participant_id, representative_name, and representative_type for the representative of the new Spouse POA to have been previously entered by the End User, otherwise this command will likely fail.

The POA is updated in a before_save callback. If done correctly, it will pull in all data for the created POA

BgsPowerOfAttorney.find_or_create_by_claimant_participant_id(claimant_participant_id);

Confirm the fix is successful if true is returned by testing the equality of the legacy appeal's POA claimant_participant_id with the spouse claimant_participant_id NOTE: If False is returned, report to Tier 4 for further investiation

legacy_appeal.reload.bgs_power_of_attorney.claimant_participant_id == claimant_participant_id;
Clone this wiki locally