Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api 34938 poa v2 create veteran rep #16212

Merged
merged 20 commits into from
Apr 24, 2024

Conversation

rockwellwindsor-va
Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va commented Apr 4, 2024

Summary

  • Builds out the last request in the workflow, createVeteranRepresentative

Related issue(s)

Screenshot 2024-04-22 at 4 26 24 PM

Testing done

  • New code is covered by unit tests

Testing Notes

Here are the steps to test run the entire process. xxxxxx & nnnnnn will be specific to your returns so those will need to be filled in as you get them in step 1 and step 3.

require 'bgs_service/vnp_proc_service_v2'
s1 = ClaimsApi::VnpProcServiceV2.new(external_uid: 'test', external_key: 'test')
s1.vnp_proc_create
=> {:vnp_proc_id=>"xxxxxx"}
require 'bgs_service/vnp_proc_form_service'
s2 = ClaimsApi::VnpProcFormService.new(external_uid: 'test', external_key: 'test')
s2.vnp_proc_form_create({vnp_proc_id: "xxxxxx"})
=> {:comp_id=>{:vnp_proc_id=>"xxxxxx", :form_type_cd=>"21-22"}}
require 'bgs_service/vnp_ptcpnt_service'
s3 = ClaimsApi::VnpPtcpntService.new(external_uid: 'test', external_key: 'test')
s3.vnp_ptcpnt_create({vnp_proc_id: 'xxxxxx', corp_ptcpnt_id: '600043284', ptcpnt_type_nm: 'Person'}) <-- Or whatever Participant ID you want.  This is the Participant ID from MPI which is not the same thing as the vnp participant ID
=> {:vnp_ptcpnt_id=>"nnnnnn", :vnp_proc_id=>"xxxxxx", :ptcpnt_type_nm=>"Person", :corp_ptcpnt_id=>"600043284"}
require 'bgs_service/vnp_person_service'
s4 = ClaimsApi::VnpPersonService.new(external_uid: 'test', external_key: 'test')
s4.vnp_person_create({vnp_ptcpnt_id: 'nnnnnn', vnp_proc_id: 'xxxxxx', first_nm: 'Vernon', last_nm: 'Wagner'})
=> 
{:vnp_ptcpnt_id=>"nnnnnn",
 :first_nm=>"Vernon",
 :jrn_dt=>"2024-04-22T14:15:18-05:00",
 :jrn_lctn_id=>"281",
 :jrn_obj_id=>"VAgovAPI",
 :jrn_status_type_cd=>"U",
 :jrn_user_id=>"VAgovAPI",
 :last_nm=>"Wagner",
 :vnp_proc_id=>"xxxxxx"}
require 'bgs_service/vnp_ptcpnt_addrs_service'
s5 = ClaimsApi::VnpPtcpntAddrsService.new(external_uid: 'test', external_key: 'test')
s5.vnp_ptcpnt_addrs_create({vnp_ptcpnt_id: 'nnnnnn', vnp_proc_id: 'xxxxxx', efctv_dt: '2020-07-16T18:20:18Z', addrs_one_txt: '76 Crowther Ave',city_nm: 'Bridgeport',email_addrs_txt: '[email protected]',jrn_dt: '2020-07-16T18:20:17Z',jrn_lctn_id: '281',jrn_obj_id: 'VAgovAPI',jrn_status_type_cd: 'U',jrn_user_id: 'VAgovAPI',postal_cd: 'CT',prvnc_nm: 'CT',ptcpnt_addrs_type_nm: 'Mailing',shared_addrs_ind: 'N',zip_prefix_nbr: '06605'})
=>
{:vnp_ptcpnt_addrs_id=>"144274",
 :efctv_dt=>"2020-07-16T18:20:18Z",
 :vnp_ptcpnt_id=>"nnnnnn",
 :vnp_proc_id=>"xxxxxx",
 :addrs_one_txt=>"76 Crowther Ave",
 :city_nm=>"Bridgeport",
 :email_addrs_txt=>"[email protected]",
 :jrn_dt=>"2020-07-16T18:20:17Z",
 :jrn_lctn_id=>"281",
 :jrn_obj_id=>"VAgovAPI",
 :jrn_status_type_cd=>"U",
 :jrn_user_id=>"VAgovAPI",
 :postal_cd=>"CT",
 :prvnc_nm=>"CT",
 :ptcpnt_addrs_type_nm=>"Mailing",
 :shared_addrs_ind=>"N",
 :zip_prefix_nbr=>"06605"}
require 'bgs_service/vnp_ptcpnt_phone_service'
s6 = ClaimsApi::VnpPtcpntPhoneService.new(external_uid: 'test', external_key: 'test')
s6.vnp_ptcpnt_phone_create({vnp_ptcpnt_id: 'nnnnnn', vnp_proc_id: 'xxxxxx',phone_nbr: '2223334444'})
=>
{:vnp_ptcpnt_phone_id=>"101941",
 :vnp_proc_id=>"xxxxxx",
 :vnp_ptcpnt_id=>"nnnnnn",
 :phone_type_nm=>"Daytime",
 :phone_nbr=>"2223334444",
 :efctv_dt=>"2024-04-22T19:27:37Z"}
require 'bgs_service/veteran_representative_service'
s7 = ClaimsApi::VeteranRepresentativeService.new(external_uid: 'test', external_key: 'test')
s7.create_veteran_representative({ form_type_code: '21-22', proc_id: 'xxxxxx', veteran_ptcpnt_id: 'nnnnnn', poa_code: '074', section_7332_auth: false, limitation_drug_abuse: false, limitation_alcohol: false, limitation_hiv: false, limitation_s_c_a: false, limitation_h_i_v: false,change_address_auth: true, vdc_status: 'Submitted', representative_type: 'Recognized Veterans Service Organization', claimant_ptcpnt_id: '182358', address_line_1: '76 Crowther Ave', city: 'Bridgeport', postal_code: '06605', state: 'CT', submitted_date: '2024-04-22T19:27:37Z' })
=> 

What areas of the site does it impact?

  • modules/claims_api/lib/bgs_service/veteran_representative_service.rb
  • modules/claims_api/lib/bgs_service/veteran_representative_service/create_veteran_representative_request.rb
  • modules/claims_api/lib/bgs_service/veteran_representative_service/read_all_veteran_representatives.rb
  • modules/claims_api/spec/lib/claims_api/bgs/veteran_representative_service/create_veteran_representative_request_spec.rb
  • modules/claims_api/spec/lib/claims_api/bgs/veteran_representative_service/veteran_representative_service_spec.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@va-vfs-bot va-vfs-bot temporarily deployed to API-34938-poa-v2-create-veteran-rep/main/main April 4, 2024 20:15 Inactive
@rockwellwindsor-va rockwellwindsor-va added the claimsApi modules/claims_api label Apr 16, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-34938-poa-v2-create-veteran-rep/main/main April 16, 2024 16:54 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-34938-poa-v2-create-veteran-rep/main/main April 22, 2024 22:17 Inactive
Copy link

github-actions bot commented Apr 23, 2024

1 Warning
⚠️ This PR changes 211 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/claims_api/lib/bgs_service/veteran_representative_service.rb (+3/-2)

  • modules/claims_api/lib/bgs_service/veteran_representative_service/create_veteran_representative_request.rb (+21/-0)

  • modules/claims_api/lib/bgs_service/veteran_representative_service/read_all_veteran_representatives.rb (+1/-1)

  • modules/claims_api/spec/lib/claims_api/bgs/veteran_representative_service/create_veteran_representative_request_spec.rb (+147/-0)

  • modules/claims_api/spec/lib/claims_api/bgs/veteran_representative_service/veteran_representative_service_spec.rb (+36/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review April 23, 2024 20:16
@rockwellwindsor-va rockwellwindsor-va requested a review from a team as a code owner April 23, 2024 20:16
@va-vfs-bot va-vfs-bot temporarily deployed to API-34938-poa-v2-create-veteran-rep/main/main April 23, 2024 20:29 Inactive
Copy link
Contributor

@FonzMP FonzMP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rockwellwindsor-va rockwellwindsor-va merged commit 8aebcd6 into master Apr 24, 2024
22 checks passed
@rockwellwindsor-va rockwellwindsor-va deleted the API-34938-poa-v2-create-veteran-rep branch April 24, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimsApi modules/claims_api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants