Test Data for Epic

This test data can be used to try out integration with Epic in Leyr Sandbox.
It is applicable when using Leyr credentials, as described in the EHR configuration guide.

If you'd like to use your own credentials or are going live, please refer to our Epic EHR setup guide.

Environment Overview

We have a fully integrated Sandbox for testing with Epic. Most endpoints are functional and reflect real-world behavior, though some features like appointment updates and medical notes are still in development. The sandbox follows US healthcare regulations and data requirements.

Common Workflows

With Epic's integration, you have access to real data and can create your own test scenarios! Feel free to create patients and book appointments, though note the US-specific requirements. Check our supported services matrix to see what's available for Epic.

Care Units Discovery

This is the typical entry point to the Leyr API. The care unit ID returned here is required for all subsequent API calls.

Call GET /care-units to discover available care units in your Epic system. Use any id from the response in the path parameter for other endpoints.

Patient Management

Create and retrieve patient information following US healthcare data requirements.

Create Patient: Use POST /patients to create new patients. You'll need to provide a valid US Social Security Number (SSN) as Epic's Sandbox follows US regulations. You can generate test SSNs using online generators like https://theonegenerator.com/generators/documents/ssn-generator.

Get Patient: Use GET /patients/{patient_id} with any patient ID from your system, patients created via the API, or the following test patient IDs:

patient_id
e5s6OVXlZumYgZW-AWVMnvg3
e63wRTbPfr1p8UW81d8Seiw3

Availability

Discover available resources, services, and time slots for appointment booking.

Get Services: Call GET /healthcare-services to retrieve all available healthcare services configured in your Epic system.

Get Resources: Call GET /resources to get available practitioners and resources.

Get Time Slots: Use GET /timeslots with resource_id and/or healthcare_service_id from previous calls to find available appointment times.

Testing Tip: Try your first /timeslots call without filtering parameters to see all available slots, then use resource_id or healthcare_service_id to narrow down results.

Appointment Booking

Create and retrieve appointments, with some management features still in development.

Book Appointment: Use POST /appointments with a patient ID (from Patient Management) and time slot details (from Availability) to create appointments.

Get Appointments: Call GET /appointments to retrieve existing appointments. You can filter by patient, date range, or leave parameters empty to see all appointments.

Update Appointment: This functionality is in progress for Epic.
Cancel Appointment: This functionality is in progress for Epic.

Medical Notes

Medical Notes functionality is in progress for Epic.

Documents

Documents functionality is in progress for Epic.

Happy coding! 🙂

In case of any questions or if you feel stuck - please feel free to reach out at contact@leyr.io.