Closed mackhowell-nava closed 1 month ago
Results from investigating the feasibility of using BGS for working with tracked items:
bgs-ext, the Ruby gem that vets-api uses for making BGS calls, has a tracked_items service which supports one method, find_tracked_items
(by claim ID). In vets-api staging, this can be invoked like
fs = Form526Submission.find(1366) # VFN 796378881 has results on claim 600442578
key = fs.form['form526']['form526']['veteran']['emailAddress'].first(39)
ti = BGS::Services.new(external_uid: fs.user_account.icn, external_key: key).tracked_items
ti.find_tracked_items(fs.submitted_claim_id)
which returns a data structure that looks like
{:benefit_claim=>
{:name=>"BenefitClaim",
:dvlpmt_items=>
[{:jrn_dt=>Wed, 17 Jul 2024 12:37:27 -0500,
:name=>"DevelopmentItem",
:claim_id=>"600527334",
:create_dt=>Wed, 17 Jul 2024 12:37:26 -0500,
:create_ptcpnt_id=>"601227029",
:create_stn_num=>"322",
:docid=>"1130103",
:dvlpmt_item_id=>"499228",
:dvlpmt_tc=>"CLMNTRQST",
:req_dt=>Wed, 17 Jul 2024 00:00:00 -0500,
:short_nm=>"Claim for a Specific Evaluation",
:std_devactn_id=>"38976",
:suspns_dt=>Wed, 17 Jul 2024 00:00:00 -0500},
{:jrn_dt=>Wed, 17 Jul 2024 12:36:28 -0500,
:name=>"DevelopmentItem",
:claim_id=>"600527334",
...
Other documented methods on the TrackedItemService can be invoked by directly calling the SOAP method:
response = ti.send(:request, :find_tracked_items_by_file_number, "fileNumber": fs.birls_id)
response.body[:find_tracked_items_by_file_number_response]
This should presumably apply to write methods as well, including ManageTrackedItems
and deleteTrackedItems
, although we don't have documentation on the business rule governing when these operations would be allowed.
Working understanding of the data structure resulting from find_tracked_items
:
dvlpmt_items
contains a list of tracked item objects, with the following business-relevant fields:
name
- this is always "DevelopmentItem"claim_id
create_dt
- when the tracked item was createdcreate_ptcpnt_id
- participant ID of the user who created itcreate_stn_num
- station number of the user who created itdocid
- ID of the document (letter) that this is trackingdvlpmt_item_id
- ID of the underlying development item record (this might be usable as a primary key?)dvlpmt_tc
- describes what this tracked item is. CLMNTRQST is "claimant request".req_dt
- ?suspns_dt
- calendar date the tracked item's suspense period is expected to be completeshort_nm
- short namestd_devactn_id
- ID of the standard development action that defines this development itemThe response also includes a list of letters
, each with these fields:
clm_id
docid
dvlpmt_tc
- CLMNTRQST
file_stt_tc
- status code, e.g. DONEDVLPMT
, INDVLPMT
incld_enclsr_ind
- whether to include or exclude enclosures when printing the outgoing documentoutdcmt_tc
- outgoing document type code; seems to always be DV
print_dt
- print date; when the letter was printed and sent outptcpnt_dcmnt_tn
- describes participant document type; seems to always be Receiver
ptcpnt_id
templat_tc
- letter template type code, e.g. VSC
, VSCNP
, VNP
I should also mention that the Ruby gem also supports a separate BGS service DocumentService, which to my knowledge is currently used by Caseflow to generate letters and associated tracked items for HigherLevelReviews.
From Nathan Jolly in Slack in response to if he knows of any more APIs or resources:
Do you know if the received date is set for all tracked items, of is that used conditionally?
Things we know about:
Things we've seen:
See also:
Potential product task: Reach out to Nathan Jolly.