Let patients schedule, update, and cancel appointments in Epic or Cerner from Salesforce Health Cloud, mobile apps, or patient portals — accelerator APIs wrap the EHR scheduling endpoints you already have.
Appointment Scheduling: Patient Engagement to EHR
Objective: Enable patients to schedule, update, and cancel appointments in the EHR via APIs from patient engagement platforms such as Salesforce Health Cloud, mobile apps, and patient portals — without staff re-keying requests into the scheduling system.
What's Getting Built
- Patient Booking (Experience API) — patient-facing booking endpoints consumed by Health Cloud, portals, and mobile apps ·
GET /slots, POST /appointments, PUT /appointments/{id}, DELETE /appointments/{id}
- Scheduling Orchestration (Process API) — orchestrates slot search, hold/release logic, and conflict detection with atomic commit ·
POST /search, POST /hold, POST /commit, POST /cancel
- EHR Scheduling Adapter (System API) — thin wrapper over Epic or Cerner FHIR Appointment, Slot, and Schedule endpoints ·
GET /Appointment/$find, GET /Slot, POST /Appointment, GET /Patient/{id}
- Engagement Platform Notifications (target) — receives appointment lifecycle events and triggers SMS/email reminders through the platform notification service ·
PUBLISH appointment-created, PUBLISH appointment-updated, PUBLISH appointment-canceled, TRIGGER SMS/email reminder
Prerequisites
- Anypoint Platform org with API Manager exposed to patient-facing channels.
- MuleSoft Accelerator for Healthcare Appointment scheduling assets imported from Exchange.
- Epic or Cerner scheduling API credentials (FHIR Appointment/Slot or proprietary equivalent).
- Salesforce Health Cloud, patient portal, or mobile app as the Experience API consumer.
EHR vendor notes
Epic
- Use FHIR Appointment.$find (or Slot search) for open slots — patient context via FHIR Patient read with Epic MRN.
- OAuth: backend services for server-side booking; patient-facing channels may require a separate Epic MyChart or guest-access client.
- Map Epic visit-type and department codes to your Experience API catalog — Slot
serviceType and schedule references are Epic-specific.
Cerner (Oracle Health)
- Connect to Millennium Scheduling via FHIR Slot/Appointment where licensed, or Cerner proprietary Scheduling REST — confirm API tier with your Oracle Health contract.
- Location and visit-type filters must align with Millennium schedule catalog codes — mismatches return empty slot lists with no error detail.
- Patient lookup before slot search: verify MRN via FHIR Patient or Millennium registration API to avoid booking against the wrong chart.
Architecture
1. Business requirements
- Expose self-service booking for eligible visit types and locations.
- Reflect real-time slot availability from the EHR scheduling engine.
- Confirm, reschedule, and cancel appointments with immediate EHR updates.
- Send confirmation and reminder events back to the engagement platform.
- Enforce cancellation policies and lead-time rules per visit type.
2. API design
- Experience API: Patient-facing REST endpoints consumed by Health Cloud, portals, and mobile apps.
- Process API: Slot search orchestration, hold/release logic, and conflict detection.
- System API: Thin wrapper over Epic or Cerner scheduling APIs (FHIR Appointment, Slot, Schedule, or proprietary equivalents).
- Return patient-friendly error messages while logging technical detail for operators.
3. Slot availability and booking
- Query available slots by provider, location, visit type, and date range.
- Place a temporary hold while the patient completes booking to prevent double-booking.
- Commit the appointment atomically and release the hold on failure.
- Map EHR appointment identifiers back to the engagement platform record.
4. Patient and coverage validation
- Verify the patient exists in the EHR before offering slots (MRN or FHIR Patient lookup).
- Validate insurance eligibility when required for the visit type.
- Block booking for visit types that require a referral or prior authorization.
5. Notifications
- Publish appointment-created, -updated, and -canceled events to the engagement platform.
- Trigger SMS/email reminders through the platform's notification service.
- Include timezone-aware datetime formatting for patient communications.
6. Error handling and operations
- Retry transient EHR API failures; surface "slot no longer available" clearly to the patient.
- Monitor booking success rate, average response time, and hold-timeout rate.
- Alert when EHR scheduling API error rates exceed threshold.
7. Security and compliance
- Encrypt PHI in transit and at rest.
- Audit-log every access to and modification of patient data.
- Enforce minimum-necessary access for integration operators and support users.
For additional HIPAA controls, API policies, and reference security patterns, see the MuleSoft Accelerator for Healthcare on Anypoint Exchange.
Sample payload — FHIR Appointment.$find (open slots)
GET /Appointment/$find?patient=Patient/eXampleMRN
&date=ge2026-02-01T00:00:00Z&date=le2026-02-28T23:59:59Z
&appointment-type=http://terminology.hl7.org/CodeSystem/v2-0276|ROUTINE
&location=Location/emergency-dept HTTP/1.1
Host: fhir.example.org
Authorization: Bearer {access_token}
Testing and validation
- Query available Slot resources for a test provider and visit type; book an Appointment and confirm the EHR returns a committed appointment ID.
- Attempt to book a slot that was just taken and verify the patient receives a clear "slot no longer available" response, not a silent failure.
- Cancel the test appointment and confirm the EHR status updates and the engagement platform receives a cancellation event.
- Hold a slot, let the hold timeout expire, and confirm the slot returns to availability without a orphaned hold record.
Phased rollout
Phase 1 — Connect
- Deploy Experience, Process, and System APIs; connect sandbox EHR scheduling endpoints and one patient portal or Health Cloud org.
- Configure visit-type catalog, location list, and hold-timeout values in externalized properties.
Phase 2 — Map and test
- Pilot self-service booking for one visit type and location; complete Testing and validation for book, cancel, and slot-conflict paths.
- Enable confirmation and reminder events to the engagement platform for the pilot cohort.
Phase 3 — Production
- Expand eligible visit types and locations; monitor booking success rate and EHR API error thresholds.
- Publish patient-facing error messages and staff escalation runbook for failed bookings.
Success metrics
- Self-service booking success rate ≥ 90% for eligible visit types (excluding user-canceled attempts).
- Median API response time for slot search and commit ≤ 3 seconds at P95.
- Hold-timeout rate < 2% of booking attempts — slots released cleanly without orphan holds.
- Cancellation and reschedule events reflected in EHR within 60 seconds in ≥ 99% of transactions.
Configuration checklist
Before first sandbox deploy, complete the shared Healthcare integration configuration checklist — secure property keys, TLS, OAuth, and credential naming conventions are documented once for all Exchange use cases.
8. Implementation starting point
Download the Appointment scheduling assets from the MuleSoft Accelerator for Healthcare on Anypoint Exchange.
Configure the System API against your EHR scheduling endpoints (Epic FHIR Appointment/Slot or Cerner equivalent).
Wire the Experience API to Salesforce Health Cloud or your patient portal.
Customize visit-type catalogs, location lists, and cancellation policies in configuration — not hard-coded flows.
Troubleshooting
- Patient sees "slot no longer available" after selecting a time — Likely cause: hold expired or another patient committed the slot first. Fix: Shorten booking flow UX or extend hold TTL; verify atomic commit releases hold on failure.
- EHR returns 409 on appointment commit — Likely cause: double-booking or stale Slot reference. Fix: Refresh Slot search before commit and treat 409 as a user-facing retry, not a system error.
- Canceled appointment still shows in patient portal — Likely cause: engagement platform event not consumed or EHR cancel succeeded but notification failed. Fix: Replay cancellation event from outbox and verify idempotent cancel by EHR appointment ID.
- No slots returned for valid provider — Likely cause: visit type or location filter mismatch with EHR schedule configuration. Fix: Align visit-type catalog mapping with EHR Schedule resources and check provider location affiliation.
Deliverable: An Experience API to schedule, update, and cancel appointments that writes in real time to Epic or Cerner from Health Cloud or a patient portal.