-
Notifications
You must be signed in to change notification settings - Fork 66
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
98249 Implement draft appointment controller method #20137
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.
LGTM
@randomsync there's a failing test. Possibly a flakey test, please re-run the Code Check - Test until it passes. |
draft_appointment = eps_appointment_service.create_draft_appointment(referral_id: draft_params[:referral_id]) | ||
|
||
provider = eps_provider_service.get_provider_service(provider_id: draft_params[:provider_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.
You could also make these private methods (with or without memoization as needed)
private
def draft_appointment
eps_appointment_service.create_draft_appointment(referral_id: draft_params[:referral_id])
end
def provider
eps_provider_service.get_provider_service(provider_id: draft_params[:provider_id])
end
7722767
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, but maybe more tests for nil/empty objects or params.
Will those TODOs at the top be covered in this PR or another one?
The other TODOs also have corresponding tickets that will be worked on separately. One of them especially (referrals validation) cannot be done until referrals part is done. |
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.
LGTM
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.
More tests will be added in another PR Gaurav has said, so good to go
Summary
Add a create_draft appointment method, which creates a draft appointment with EPS, gets additional data like provider, drive times, and available slots and returns the combined payload.
Related issue(s)
department-of-veterans-affairs/va.gov-team#98249
Testing done
Acceptance criteria