-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue 1130 and 1131 smdb norc tools #689
base: dev
Are you sure you want to change the base?
Conversation
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.
Mostly good, but a few comments.
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.
Looks good!
return res.status(405).json(getResponseJSON('Only POST requests are accepted!', 405)); | ||
} | ||
let body = req.body; | ||
const { connectId, currentPaymentRound, dateOfEligibility } = body; |
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.
does dateOfEligibility need to be null checked?
* @param {string} paymentRound - Payment round to check eligibility for participant | ||
* @returns {object} - Object with isEligibleForIncentive boolean and participantData object | ||
*/ | ||
const checkParticipantForEligibleIncentive = async (connectId, currentPaymentRound) => { |
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 might be misunderstanding part of the workflow, but why is this end-point necessary?
* @returns {object} - Object with isEligibleForIncentive boolean and participantData object | ||
*/ | ||
const checkParticipantForEligibleIncentive = async (connectId, currentPaymentRound) => { | ||
try { |
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.
If you wanted to try a simpler approach, you might be able to use the existing function that checks for incentive eligible participants (called from incentive.js) and then see if the returned object contains the participant being checked.
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.
everything looks fine minus the few comments - let's chat when you're back in the office
This PR is related to
Reference Derived Variables Rules: https://nih.app.box.com/file/1668730770583?s=kc8ugxvosd9h5z3glinufwr0thvwlpgi
Information of updates
Reset Participant's SSN Survey
Participant Update Incentive Eligibility Update
130371375.266600170.731498909 (Payment Round, baseline, Eligible for Payment) - 353358909 (Yes)
130371375.266600170.222373868 (Payment Round, baseline, NORC Payment Eligibility) = 353358909 (Yes)
130371375.266600170.787567527 (Payment Round, baseline, auto generated date when payment eligible for payment round) -<Current ISO 8601 Timestamp>
Code changes:
Added new endpoints for dashboard API resetParticipantSurvey, checkParticipantForEligibleIncentive, and updateParticipantIncentiveEligibility