-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contract + Rates shared history #2349
Conversation
return firstError | ||
} else { | ||
const allDraftRates: RateType[] = | ||
draftRatesOrError as RateType[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really intend to do this type coercion where an Error is deemed Rate Type list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I just checked that it wasn't an Error above. But I think I'll pull this out into its own function.
}) | ||
} | ||
} | ||
// if (updateResult.draftRevision.rateRevisions.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this being implemented on the other PR that will merge into this? Assuming we would not want to merge as is since it turns off some of the submit rates functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the logic into the submit rates postgres handler, I'll clean up this dead code
- Attempt to find state programs from json file returns an error | ||
- INVALID_PACKAGE_STATUS | ||
- Attempted to submit a package in the SUBMITTED or RESUBMITTED state | ||
- PROTO_DECODE_ERROR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Please check this comment block - some info in here is incurrate
@@ -1281,6 +1325,8 @@ type Rate { | |||
This value is used to generate the rateName | |||
""" | |||
stateNumber: Int! | |||
"parentContractID is the ID of the contract that initially submitted this rate" | |||
parentContractID: ID! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the domain models need these updates as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be updated now
@@ -0,0 +1,27 @@ | |||
import { packageName } from 'app-web/src/common-code/healthPlanFormDataType' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the frontend I get an auth error (signing in doesn't go through) Check Auth Failed. ApolloError: Response not successful: Received status code 502. Until this path is updated to a relative on2 ../../../../app-web/src/common-code/healthPlanFormDataType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a fix for that, I can log in locally lmk if you still can't
return domainRevisions | ||
} | ||
|
||
function unsortedRatesRevisionsToDomainModel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems misnamed now- it looks like we are sorting before we feed into this function and what this function is doing is just changing those sorted rate revisions from prisma to domain model types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this by bringing it into my branch and it looks good
@macrael one thing I'm seeing now is |
Summary
Contract + Rates Submission
This PR implements submission and returns the package submission history for submitted contracts and rates.
Submission submits the contract and any unsubmitted rates. We use the design described in Notion to write to the assorted tables on submit that then get read from in fetchContract.
Related issues
https://jiraent.cms.gov/browse/MCR-3942
https://jiraent.cms.gov/browse/MCR-3966
Screenshots
Test cases covered
MANY TESTS HAVE CHANGED
because I moved the logic for submitting rates into contracts, and because we have to keep track of parent contracts, the API no longer allows a rate to be submitted initially on its own. Many tests had to change to follow the rule that a rate is always initially submitted with a specific contract.
QA guidance
If you can make something break by submitting linked rates, please write a test case! I'm still working on a few more.