department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 200 forks source link

[spike] DR | Investigate whether LH/VBA records can serve as proof of submission to VBMS. #76819

Closed data-doge closed 6 months ago

data-doge commented 7 months ago

Value Statement

As a Veteran I want VA.gov's DR team to be able to quickly determine, through a simple database query, whether NOD and SC forms and associated evidence have been successfully submitted to VBMS So that the DR team can focus its efforts on improving the DR forms, instead of wasting its resources coordinating with multiple stakeholders to confirm whether such submissions are successful.

Background Context

Currently, to verify whether appeals and associated evidence have been successfully submitted all the way to VBMS, we have been manually coordinating with other VA stakeholders (Jacob, Bo) to verify that these submissions appear in CMP and VBMS. This process is inefficient and not scalable.

As an alternative to this process, we may be able to rely solely on the submission status of records in VA.gov's database. Specifically, the VBADocuments::UploadSubmission, AppealsApi::NoticeOfDisagreement, AppealsApi::EvidenceSubmission. Every hour, it appears that vets-api polls central mail for the status of document uploads, and updates VBADocuments::UploadSubmissions appropriately. See:

Meaning, it's very likely that we can rely on these records to tell whether evidence uploads have been successfully submitted to VBMS, instead of asking CMP to manually check. Ideally, we can do the same for appeal submissions, by referencing the status of LH's AppealsApi::NoticeOfDisagreement records.

Tasks

Acceptance Criteria

Definition of Ready

N/A. Ready now.

Definition of Done

saderagsdale commented 7 months ago

How is the VBMS status in production created?

Is there documentation I can check out?

Are there any internal errors in staging or production that would compromise the accuracy of that status? (Examples: Partially stored data, concurrent transactions interfering with one another, yet still returning the status VBMS)

saderagsdale commented 7 months ago

@data-doge Can we post the status of every piece of evidence in DataDog for complete observability?

anniebtran commented 7 months ago

Started looking into this and going to confirm some of these items with Lighthouse, but here are some of my notes so far:

saderagsdale commented 7 months ago

Annie will reach out to LH for additional questions.

anniebtran commented 7 months ago

Chatted with Michel from the LH team a bit and confirmed a few things:

He also mentioned that there was an internal table they use to track status changes and can see how appeals move through their statuses on their way to being established appeals.

saderagsdale commented 7 months ago

Will update Eugene next.

anniebtran commented 6 months ago

TODO:

anniebtran commented 6 months ago

Might not have to reach out to CMP after all because Timothy Wagner actually mentioned (what I suspect is) the same endpoint that Lighthouse uses to retrieve statuses from their system:

From Timothy's email:

Also, are you aware of the “get status” option? This will allow you to see if a submission is successful and should provide you with packetIDs which would eliminate the need for these spreadsheets going back and forth. If problems occur with a submission, then maybe bring it to us and we can work through it. How does that sound?

And the message from Michel in our thread where he shows an example of what their status call to CMP looks like:

I grabbed a staging NOD, 28e7a25d-f87f-4825-9b0d-c8b0fc5fc301 and made a call to fetch the latest status from CMP staging:

irb(main):007:0> CentralMail::Service.new.status("28e7a25d-f87f-4825-9b0d-c8b0fc5fc301")
response_body=
"[[{\"uuid\":\"28e7a25d-f87f-4825-9b0d-c8b0fc5fc301\",\"status\":\"Received\",\"errorMessage\":null,\"lastUpdated\":\"2024-01-29 18:16:45\",\"packets\":[]}]]">

Here's an example of one of our test submissions on staging that has the packet IDs that Timothy mentioned would get returned:

[[{"uuid"=>"b011f71c-d440-4f34-b231-2ff06d2be256",
   "status"=>"Success",
   "errorMessage"=>"",
   "lastUpdated"=>"2024-02-13 17:25:01",
   "packets"=>
    [{"veteranId"=>"16933629",
      "status"=>"Success",
      "completedReason"=>"UploadSucceeded",
      "transactionDate"=>"02/09/2024 21:17:40"}]}]]

Also if we dig into the code, the endpoint seems to be called getStatus which is what he referred to it as in his email: https://github.com/department-of-veterans-affairs/vets-api/blob/master/lib/central_mail/service.rb#L52

Not sure how much more confirmation we need on this as I would've asked him if the getStatus endpoint was the one that we should be using anyway, so if we feel comfortable with moving forward based on all of these notes, I'd say we're good to go.