Open yoomlam opened 2 years ago
Requirements questions:
Technical questions:
Requirements questions:
- Is cliam_uuid redundant in "AssessmentResukt" and "EvidenceSummaryDocument"? It already has a contention_uuid and the Contention is linked to claim.
It is. Here's my reasoning but feel free to remove claim_uuid
: Since a Claim is a primary entity being passed around at the VA, may things are associated with a Claim rather than a Contention. I included claim_uuid
for faster query performance, i.e., if VRO ever wants to query all AssessmentResult
records associated with a Claim. This may be pre-optimizing, so you can remove it and we can always add it later if needed.
- Does the claim, when it reaches the service, already contain assessments and evidence, or are these added later on?
Great question! Somewhat complex answer:
- If a claim arrives for a veteran that's already in the DB, I assume we attach the claim to the existing record
Yes! Veterans can and often submit multiple claims.
Technical questions:
- what schema do we use? Same as the rest of the app, or a schema specific to this module?
Not sure I understand where you're coming from. I was expecting a single schema be used for all of VRO. I'm not familiar with "a schema specific to this module" and what that implies.
- How is this module called from services?
- What is the format of the input to this module?
- Does this module need to provide an API for accessing the data? If so, is it REST?
To be discussed and decided by the microservices developers, who will be reading and writing to the DB.
I'd like to present another option for the team's consideration. Instead of a REST interface to the DB (may be more overhead than needed since only VRO will be accessing the DB) or a language-specific DB driver (we'd have to maintain a DB driver for each language that a microservice is written in), we can leverage Apache Camel (such as Camel's JDBC component) if certain constraints are satisfied, for example if microservices don't need to read/write to the DB except at the beginning (input) or end (output) of their processing. An advantage of this option is that microservices don't need to directly access the DB, and hence less coupling, which is good when/if we change DB implementation.
If desired, we can discuss more about this option at our meeting with microservices developers.
Here are some additional thoughts
- If we want to maintain a history of updates to every claim, then the current database design is insufficient, since it only shows the latest version. The "last updated date" may tell us that there have been updates, but we may not be able to tell what they were.
Agree! Auditing is not required for VRO 1.0, but it will be useful for reporting as described in the Roadmap wiki page:
claim_stats_Endpoint
(low priority): Add claim_stats endpoint to API for reporting and monitoring
Maybe have a separate table called something like ClaimEvents
with an event_type
field (with possible values "new_claim"
, "new_contention"
, "contention_updated"
, etc.). A new record is created when the assess_claim
endpoint is called, so I expect this table will become large, which is okay since it will only be for diagnostics and reporting.
- Should we save some identifier of the service calling save-to-db in order to be able to tell where it came from?
If I'm interpreting this properly, I'm not sure we need that level of granularity stored in the DB. Couldn't we get this from regular logs, i.e. the save-to-db logs would occur immediately after the service logs?
We've decided to move forward with using Camel to add a step to read from (and possibly write to if the record doesn't already exist) the DB to inject data into the input of a contention processor (e.g., hypertension processor). This will decouple the processor microservice from having to interact with the DB. The output of the microservice will include some JSON fields that will result in writing some record (e.g., AssessmentResult
) to the DB, so there will be a new workflow step after each processor to write to the DB.
I expect adding these new DB interaction steps will occur in the routes defined in ClaimProcessorRoute
and PrimaryRoutes
.
Issue to discuss DB entities for VRO 1.0.
uuid
primary key that is auto-populated when a new record is created.created_at
field value.updated_at
field to reflect when the record was last changed.Below are DB tables (representing relevant entities) and their DB columns.
Claim
id
: claim identifier used by clientid_type
: domain of theid
, e.g."va.gov-Form526Submission"
(Form526Submission
table in va.gov's DB)"VBMS"
(a.k.a. "Benefit Claim ID")incoming_status
: only expect a"submission"
value for VRO 1.0established
(for claim establishment notifications) andcontention_mod
(for contention update notifications)updated_at
: e.g., to capture whenincoming_status
changedveteran_uuid
: foreign key to Veteran tableVeteran
Expecting only 1 veteran per claim
icn
(unique): Internal Control Number; needed for queries to Lighthouse Health APIparticipant_id
: common identifier used by BGSparticipant_id
also for non-veteran claimants (e.g., spouse or child) but VRO only needs the veteran's identifieredipi
: identifier used by DoDContention
A claim can have multiple contentions
claim_uuid
: foreign key to Claim tablediagnostic_code
: whole number in the thousands; https://www.hillandponton.com/read-va-diagnostic-code/AssessmentResult
A new record is created each time the
assess_claim
endpoint is called and a non-error response returned.claim_uuid
: foreign key to Claim tablecontention_uuid
: foreign key to Contention tableevidence_count
: number of evidence data points found to support fast tracking the claimEvidenceSummaryDocument
A new record is created each time the
generate_summary_doc
endpoint is called and a non-error response returned.claim_uuid
: foreign key to Claim tablecontention_uuid
: foreign key to Contention tableevidence_count
: number of evidence data points found to support fast tracking the claimdocument_name
: filename of document