Skip to content
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

96414 Add submit_appointment method to EPS AppointmentService #19973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

randomsync
Copy link
Member

Summary

Implements a new method to submit appointments to the EPS API using the /appointments/{appointmentId}/submit endpoint. The method:

  • Validates appointment_id and required parameters (network_id, provider_service_id,
    slot_ids, referral_number)
  • Supports optional additional_patient_attributes
  • Returns API response wrapped in OpenStruct

Related issue(s)

department-of-veterans-affairs/va.gov-team#96414

Testing done

  • New code is covered by unit tests

What areas of the site does it impact?

VAOS appointments, community care referrals

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

end

it 'raises ArgumentError when multiple required parameters are missing' do
invalid_params = valid_params.except(:network_id, :provider_service_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please also handle the scenario of network_id or other mandatory parameters being nil or empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO that is unnecessary and if it is being called by the caller without those checks, the error message from underlying service should be returned. Please also see the patterns in other service methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants