Skip to content

Commit

Permalink
79712 kevin exit notes (#82449)
Browse files Browse the repository at this point in the history
* adding Kevin documentation

* updating obsidian syntax

* adding documentation

* rename BE Responsibilities

* rename up-and-running

* update name of team-contacts doc

* update more file names

* update still more names

* remove duplicate file

* linking docs

* minor tweeks

* small changes

* Added copay and debt examples
  • Loading branch information
kjsuarez authored May 6, 2024
1 parent ff7e5e6 commit ec56ef8
Show file tree
Hide file tree
Showing 13 changed files with 408 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ scripts/node_modules
scripts/repo-replace-url.log.csv
scripts/repo-deprecation.log.csv
.idea
*/.obsidian/*
.obsidian
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- What are the relevant repos for this team?
- [vets-api](https://github.com/department-of-veterans-affairs/vets-api)
- [vets-website](https://github.com/department-of-veterans-affairs/vets-website)
- [vets-api-mockdata](https://github.com/department-of-veterans-affairs/vets-api-mockdata/)
- What code is the Debt Team responsible for in vets-api?
- Generally we own everything in [the debts_api module](https://github.com/department-of-veterans-affairs/vets-api/tree/master/modules/debts_api) but for a complete list of what we're responsible for see the [codeowners file](https://github.com/department-of-veterans-affairs/vets-api/blob/master/.github/CODEOWNERS)
- Where do I go if your documentation doesn't answer my question?
- Try the [Platform Docs](https://depo-platform-documentation.scrollhelp.site/developer-docs/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
These documents are intended to provide the best possible context for an engineer joining the Debt Team. The work here isn't particularly demanding or complex. That said, even trivial tasks could prove difficult if you don't know your way around.

I'm going to do my best to provide context posthumously 🤞

### Useful Starting Points
- [Backend Engineer Responsibilities](back-end-responsibilities.md)
- [Getting access to critical tools](up-and-running.md)
- [team-contacts](team-contacts.md)
- [FAQ](FAQ.md)


---
Credit to Scott James for providing the foundation for this documentation. We are standing on the shoulders of giants.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
The Backend really only has a couple of features it needs to maintain. This document exists to outline those features and point to the relevant code.

## The Financial Status Report
See the [financial status report](what-is-a-financial-status-report.md) docs for details.
#### Related Files
- `modules/debts_api/app/controllers/debts_api/v0/financial_status_reports_controller.rb`
- `modules/debts_api/lib/debts_api/v0/financial_status_report_service.rb`
- `modules/debts_api/lib/debts_api/v0/fsr_form_builder.rb`
- `modules/debts_api/lib/debts_api/v0/fsr_form.rb`
- `modules/debts_api/lib/debts_api/v0/user_fsr_form.rb`
- `modules/debts_api/lib/debts_api/v0/vba_fsr_form.rb`
- `modules/debts_api/lib/debts_api/v0/vha_fsr_form.rb`
##### specs
- `modules/debts_api/spec/request/debts_api/v0/financial_status_reports_controller_spec.rb`
- `modules/debts_api/spec/lib/debt_api/v0/financial_status_report_service_spec.rb`
- `modules/debts_api/spec/models/debt_api/v0/form5655_submission_spec.rb`
- `modules/debts_api/spec/lib/debt_api/v0/fsr_form_builder_spec.rb`
- `modules/debts_api/spec/lib/debt_api/v0/vba_fsr_form_spec.rb`
- `modules/debts_api/spec/lib/debt_api/v0/vha_fsr_form_spec.rb`

## Copay Notifications
VBS (one of our customers, related in some way to VHA) consumes [an endpoint](https://department-of-veterans-affairs.github.io/va-digital-services-platform-docs/api-reference/#/medical_copays/sendNewStatementsNotifications) we manage, `/v0/medical_copays/send_statement_notifications`. The endpoint takes a base64 file containing a JSON array of statement data. Basically, each of these array elements corresponds to a copay statement that has been mailed out to a veteran. Our job is to run through each of these statements and email the veteran via VA Notify (VA emailing service) telling them they have a statement in the mail. If you want to know more about VA Notify reach out at their VA slack channel # va-notify-public.
From Scott:
>*"VBS API reads statements based on CCPC schedule for when stations upload patient statements. VBS then codifies these into files broken up by 10k statements at a time and POST to our (VODA) endpoint for us to parse. We then extract the identifier from the statement and get the patient’s MPI profile to get their ICN. We pass this ICN to VA Notify to send an email."*
#### Related Files
- `app/controllers/v0/medical_copays_controller.rb`
- `app/services/medical_copays/vbs/service.rb`
- `app/sidekiq/copay_notifications/parse_new_statements_job.rb`
##### specs
- `spec/sidekiq/copay_notifications/parse_new_statements_job_spec.rb`
- `spec/controllers/v0/medical_copays_controller_spec.rb`
## Datadog
The BE team is responsible for maintaining the [Debt Resolution Dashboard](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=sliding&view=spans&from_ts=1714071874450&to_ts=1714158274450&live=true), any [debt team monitors](https://vagov.ddog-gov.com/monitors/manage?q=tag%3A%22service%3Adebt-resolution%22&order=desc) as well as monitoring the `#debt-alerts` VA slack channel for alerts corresponding to those monitors getting triggered. If the Watch Officer posts an incident in the `#debt-alerts` channel it is the BE Engineer's responsibility to respond to the incident as soon as possible (within their working hours, you're not on call as far as I know). At the very least be sure to respond to the incident's slack thread to assure the watch officer you're looking into it.
## Monthly Metrics Report
We, via our Project Manager (Heather Rienks at time of writing), need to provide stakeholders with a monthly report of our metrics. This boils down to taking screen grabs of the following dashboard widgets:
- [VBS Submission Success](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=5996076007751838)
- [VBS Submission Failure](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=2917387189261178)
- [VBS Submission Success Rate](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=8750649452375376)
- [VHA Sharepoint Submission Success](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=2451651426386062)
- [VHA Sharepoint Submission Failure](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=8025955843558582)
- [VHA Sharepoint Submission Success Rate](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=364445567057332)
- [VHA Sharepoint Request Success](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=1496409506068376)
- [VHA Sharepoint Request Failure](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=4963006620529312)
- [VHA Sharepoint Request Success Rate](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1714072407961&to_ts=1714158807961&live=false&tile_focus=3203499287883862)
- [Financial Status Report Controller Latency](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1711810672408&to_ts=1714402672408&live=false&tile_focus=8525831246735888)
- [Debts Controller Latency](https://vagov.ddog-gov.com/dashboard/shm-nr4-75f/debt-resolution-vets-api?fromUser=false&refresh_mode=paused&view=spans&from_ts=1711810672473&to_ts=1714402672473&live=false&tile_focus=1845517951393098)
## Communicating with API customers
We have a regularly occurring meeting with VBS to discuss issues and change requests to the VHA FSR. In these meetings you are essentially the VODA (debt) team's subject matter expert.
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
## Anatomy of a Debt
```
{
"fileNumber": "012345678",
"payeeNumber": "00",
"personEntitled": "XXXXXXX",
"deductionCode": "72",
"benefitType": "CH33 Housing EDU",
"diaryCode": "100",
"diaryCodeDescription": "First Demand Letter - Inactive Benefits",
"amountOverpaid": 9000.6,
"amountWithheld": 0.0,
"originalAR": 8380.02,
"currentAR": 9000.6,
"debtHistory": [
{
"date": "04/22/2024",
"letterCode": "130",
"description": "Debt Increase - Due Process"
}
]
}
```
We get our debt data from the Debt Management Center. We use the [Debt Service](https://github.com/department-of-veterans-affairs/vets-api/blob/master/lib/debt_management_center/debts_service.rb) to get debts for a given *logged in* user.

## Anatomy of a Copay
```
{
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", // hexidecimal uuid
"pS_SEQ_NUM": 310,
"pS_TOT_SEQ_NUM": 312,
"pS_FACILITY_NUM": "672",
"pS_FAC_PHONE_NUM": "1-800-555-5555",
"pS_TOT_STATEMENT": 23,
"pS_STATEMENT_VAL": "0000012790{",
"pS_STATEMENT_DATE": "10102023",
"pS_STATEMENT_DATE_Output": "10/10/2023",
"pS_PROCESS_DATE": "10062023",
"pS_PROCESS_DATE_Output": "10/06/2023",
"pH_PATIENT_LST_NME": "SUAREZ",
"pH_PATIENT_FST_NME": "BEVIN",
"pH_PATIENT_MID_NME": "JORMS",
"pH_ADDRESS_1": "PO BOX 123",
"pH_ADDRESS_2": null,
"pH_ADDRESS_3": null,
"pH_CITY": "CHICAGO",
"pH_STATE": "IL",
"pH_ZIP_CDE": "007940542",
"pH_ZIP_CDE_Output": "00794-0542",
"pH_CTRY_NME": null,
"pH_AMT_DUE": 85,
"pH_AMT_DUE_Output": "85.00  ",
"pH_PREV_BAL": 0,
"pH_PREV_BAL_Output": ".00  ",
"pH_TOT_CHARGES": 85,
"pH_TOT_CHARGES_Output": "85.00  ",
"pH_TOT_CREDITS": 0,
"pH_TOT_CREDITS_Output": ".00  ",
"pH_NEW_BALANCE": 85,
"pH_NEW_BALANCE_Output": "85.00  ",
"pH_SPECIAL_NOTES": "To pay your statement online, go to www.pay.gov or call 1-888-827-4817.",
"pH_R_O_PARA_CDES": "012345678901234567",
"pH_NUM_OF_LINES": 19,
"pH_DFN_NUMBER": 123456,
"pH_CERNER_STATEMENT_NUMBER": 0,
"pH_CERNER_PATIENT_ID": " ",
"pH_CERNER_ACCOUNT_NUMBER": " ",
"pH_ICN_NUMBER": " ",
"pH_ACCOUNT_NUMBER": 6720000000123456, // facility-number padding DFN/CERNER
"pH_Large_Font_Indcator": 0,
"details": [
{
"pD_DATE_POSTED": "09282023",
"pD_DATE_POSTED_Output": "09/28/2023",
"pD_TRANS_DESC": "COPAY RX:blablabla",
"pD_TRANS_DESC_Output": "COPAY RX#blablabla FILL DATE: 09/28/2023",
"pD_TRANS_AMT": 24,
"pD_TRANS_AMT_Output": "24.00  ",
"pD_REF_NO": "123-K00F0ZZ"
}
],
"station": {
"facilitY_NUM": "672",
"visN_NUM": "08",
"facilitY_DESC": "SAN JUAN VA MEDICAL CENTER (672)",
"cyclE_NUM": "008",
"remiT_TO_FLAG": "L",
"maiL_INSERT_FLAG": "0",
"staT_ADDRESS_1": "ONE VETERANS PLAZA",
"staT_ADDRESS_2": null,
"staT_ADDRESS_3": null,
"city": "SAN JUAN",
"state": "PR",
"ziP_CDE": "009270000",
"ziP_CDE_Output": "00927-0000",
"baR_CDE": null,
"teL_NUM_FLAG": "S",
"teL_NUM": "1-866-793-4591",
"teL_NUM_2": null,
"contacT_INFO": null,
"dM2_TEL_NUM": null,
"contacT_INFO2": null,
"toP_TEL_NUM": null,
"lbX_FEDEX_ADDRESS_1": null,
"lbX_FEDEX_ADDRESS_2": null,
"lbX_FEDEX_ADDRESS_3": null,
"lbX_FEDEX_CITY": null,
"lbX_FEDEX_STATE": null,
"lbX_FEDEX_ZIP_CDE": null,
"lbX_FEDEX_BAR_CDE": null,
"lbX_FEDEX_CONTACT": null,
"lbX_FEDEX_CONTACT_TEL_NUM": null
}
}
```

We get our copay statement data from VBS via [this service](https://github.com/department-of-veterans-affairs/vets-api/blob/master/app/services/medical_copays/vbs/service.rb)

---

See the [Active Record Queries](useful-active-record-queries.md) in this documentation for scripts that can pull debts and copays with only a user UUID (no login required)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
For a general picture of ongoing Backend efforts review the Backend Epics.
### Copay Emails
As mentioned in [back-end-responsibilities](back-end-responsibilities.md), we maintain an endpoint which, when hit, sends out emails letting veterans know that a copay statement is in the mail. In February of 2024 we made an update to the email copy [here](https://github.com/department-of-veterans-affairs/vets-api/pull/15491) Unfortunately the updated copy (purportedly) caused a great upset with veterans and so in [this PR](https://github.com/department-of-veterans-affairs/vets-api/pull/15615) we temporarily turned of the notifications completely. At some future date we're going to have to start sending these emails again and we'll almost certainly need to update the actual email template which live on VA Notify, [here](https://notifications.va.gov/services/b3357476-adf1-4350-be1b-3604034665f9/templates). Bare in mind that you can only access VA Notify from behind the VA Network. At time of writing we're working with VBS (who consume the api endpoint) to add an additional field to the copay statement data they POST to us. We're asking them to add a field for 'account balance' so we can tell the veteran, via this email notification, what their current balance is as of this statement. Ask Heather Rienks to loop you into the email thread for more information.
### Moving business logic from frontend to backend
This one's pretty straight forward. Currently the Frontend code accounts for a good bit of business logic which takes place before FSR submission. We have an ongoing initiative to move basically all business logic into the backend to give the FE less to worry about. Take a look at [the related epic](https://app.zenhub.com/workspaces/vsa---debt-607736a6c8b7e2001084e3ab/issues/gh/department-of-veterans-affairs/va.gov-team/75735) for details. Long story short, we've already ported the logic over to the backend via the below services, now we need to adjust the [FinancialStatusReportService](https://github.com/department-of-veterans-affairs/vets-api/blob/master/modules/debts_api/lib/debts_api/v0/financial_status_report_service.rb) or perhaps the [FsrFormBuilder](https://github.com/department-of-veterans-affairs/vets-api/blob/master/modules/debts_api/lib/debts_api/v0/fsr_form_builder.rb), to apply these services to the FSR data sent from the FE. For more and better context reach out to any of our FE engineers, especially Andrew Rodiek who spearheaded this effort.
### Rehydrating FSR from Submission
This one's probably quite a ways off. Recall from [what-is-a-financial-status-report](what-is-a-financial-status-report.md) that the FSR form users are filling out on the front end is persisted in an `InProgressForm` record. When the form is successfully submitted a `form5655Submission` record is created and the InProgressForm record is deleted. At some point we want to give veterans the ability to repopulate an `InProgressForm` with the data from a previously submitted `form5655Submission`. The ground work has already been laid in [this PR](https://github.com/department-of-veterans-affairs/vets-api/pull/16459) but some adjustments will likely need to be made. For instance, `FinancialStatusReportsController#submissions` is intended to give the FE information about a veteran's existing submissions, but right now it only returns IDs. We'll almost certainly need to give them more information about user's submissions.

### Displaying Account Balance (Lighthouse)
The [Debt Portal](https://staging.va.gov/manage-va-debt/summary) provides some information about the user's standing debts and copays, however, copay data is based on monthly statements, meaning we are often giving financial information which is up to a month old. What's more, $0 balance statements aren't issued, further obscuring the veteran's financial situation. We've asked the Lighthouse team(see team-contacts) to expose an API endpoint for us to consume, which would give an up-to-date value for a given veteran's account balance. Much proverbial ink has been spilled in internal discussions about this task but long story short there is no source of truth for a veteran's account balance, as absurd as that sounds. Lighthouse has promised us data which is only 1 week old. Better than 1 month, but still not ideal. I'm told that when this API endpoint is eventually available it follow the [FHIR Standard](https://www.hl7.org/fhir/R4/financial-module.html) which, at time of writing, I know nothing about.

### Moving Debt Team code into `debts_api` module
vets-api is a big project with many many teams working in relative isolation from each other. As such we try to clearly demarcate what code is our responsibility and which is not. For this reason we have an ongoing initiative to move code owned by `vsa-debt-resolution`(us) out of the root application and into the debts_api module. Currently we've moved *just about* everything related to the FSR into debts_api, but there's still code that technically belongs to us floating around. It wouldn't hurt to confirm that any code owned by us outside of `debts_api` is even in use at all and deprecate if not.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- **DMC (Debt Management Center)**
- Pamela Corbin-jones (Project Manager) [email protected]
- Pavan Sarangalwar (Engineer)
- Satishkumar Harikrishnan (Engineer)
- Daniel Wildman - [email protected] Senior Java Developer
- **VBS (Veteran Billing Services)**
- *(will only communicate via email)*
- John Skarvelis (Project Manager) [email protected]
- Michael Mcdougall (Lead Engineer) [email protected]
- Manish Nevrekar (Engineer) [email protected]
- Russell Funderburk (Engineer) [[email protected]](mailto:[email protected])
- Logan Smith (OIT) [email protected]
- **Huron**
- Varun Uppu [email protected] (Developer)
- Ashlie Roy (Healthcare Associate)
- **VA Notify**
- Melanie Jones (Project Manager)
- Beverly Nelson (Product Owner)
- Kyle MacMillan (Tech Lead)
- Ian Hilton (UX Design)
- **VA Identity**
- #vsp-identity channel on OCTO slack
- Joe Niquette (Lead Engineer)
- Trevor Bosaw (Engineer)
- Damien DeAntonio (Architect)
- Alexander Garcia (Frontend Engineer)
- Riley Anderson (Engineer)
- **VA Security**
- Clint Little (Lead Engineer)
- Gary Fallon (Engineer)
- **Devops**
- Jeremy Britt (Engineer)
- Kyle Matheny (Team Lead)
- **Platform**
- Lainey Trahan (Project Manager)
- Lindsey Hattamer (Lead Engineer)
- Rachal Cassity (Engineer)
- Eric Boehs (Reliability Lead)
- Rebecca Tolmach (Engineer)
- Ryan Johnson (Engineer)  
- **Lighthouse**
- Brian Tomlin
- Jessica Sexton (Project Manager)
- Chintan Patel (Engineer)
- **Sharepoint**
- Andrea Hugo [[email protected]](mailto:[email protected]
- Brian Fuller [[email protected]](mailto:[email protected]
- Richard Crist [[email protected]](mailto:[email protected])
Loading

0 comments on commit ec56ef8

Please sign in to comment.