-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPC-3562] Me/dpc 3562 new consent workflow (#2027)
## 🎫 Ticket https://jira.cms.gov/browse/DPC-3562 ## 🛠 Changes - New consent workflow in `JobBatchProcessor`. - Eliminates duplicate Patient resource calls to BFD. - Fixes bug in `dpc-consent` when an enrollee has multiple MBIs and some have opt outs and others don't. - Adds unit tests for `JobBatchProcessor` and `ResourceFetcher` in `dpc-aggregation`. - Updates integration tests in `dpc-api` to test enrollees with multiple MBIs. - Removed V2 code. ## ℹ️ Context for reviewers The spec for this called for doing a full resource load at the start of processing a job, but that was written under the assumption that we were only making one call to BFD to load a patient's resources, similar to how `dpc-api` provides a `Patient/$everything` operation. In reality, for a full resource load (Patient, EoB and Coverage) we were making 8(!) calls to BFD. The details were abstracted away in the `ResourceFetcher` class. The process went like this: ### Old Process **Lookback check** 1.Patient load by MBI get the Patient resource and extract its resource id. 2. EoB load by Patient resource id. **Consent check** No calls to BFD. **EoB resource load** 4. Patient load by MBI get the Patient resource and extract its resource id. 5. EoB load by Patient resource id with a `since` date filter. **Coverage resource load** 6. Patient load by MBI get the Patient resource and extract its resource id. 7. Coverage load by Patient resource id with a `since` filter. **Patient resource load** 8. Patient load by MBI get the Patient resource and extract its resource id. 9. Patient load by Patient resource id with a `since` filter. ### New Process The new process only makes 5 calls per patient, and looks like this: 1.Patient load by MBI get the Patient resource and save it for later. (This also allows us to extract the Patient's MBIs for the consent check) **Consent check** Uses MBIs from Patient resource to call dpc-consent. No calls to BFD. **Look back check** 2. EoB load by Patient resource id. **EoB Resource load** 3. EoB load by Patient resource id with a `since` date filter. **Coverage resource load** 4. Coverage load by Patient resource id with a `since` filter. **Patient resource load** 5. Patient load by Patient resource id with a `since` filter. ### Future Improvements We should be able to bring this down to three calls, one for each resource type. We would just have to verify that all resources we get from BFD have their `meta` element and `lastUpdated` value filled in, and then we could do the date filtering on our side instead of making a separate call to do it. ## ✅ Acceptance Validation New unit and integration tests added and coverage is >98% for `JobBatchProcessor` and `ResourceFetcher`. ## 🔒 Security Implications - [ ] This PR adds a new software dependency or dependencies. - [ ] This PR modifies or invalidates one or more of our security controls. - [ ] This PR stores or transmits data that was not stored or transmitted before. - [ ] This PR requires additional review of its security implications for other reasons. If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval.
- Loading branch information
1 parent
c30a527
commit 3fed283
Showing
25 changed files
with
1,099 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.