---
title: "Smart Mock"
description: "Test integrations against Smart Mock environments that replicate real EHR data models without EHR sandbox access."
canonical_url: "https://docs.leyr.io/api/test-data/smart-mock"
---
# Smart Mock

> Test integrations against Smart Mock environments that replicate real EHR data models without EHR sandbox access.

Leyr provides a **Smart Mock** environment for every supported EHR. It fully replicates real EHR data models and response structures, so you can develop and test your integration without needing access to a real EHR sandbox or any specific test data.

<u-alert color="success" icon="heroicons:light-bulb" variant="subtle">
<template v-slot:description="">

Smart Mock is the fastest way to get started. All supported workflows return production-accurate responses - no special IDs or credentials required beyond your Leyr Sandbox credentials.

</template>
</u-alert>

## How It Works

When you configure an EHR in Leyr Sandbox using [Leyr credentials](https://docs.leyr.io/product/fundamentals/test-in-sandbox#configure-ehr), the Smart Mock environment is automatically available. Smart Mock is a **stateful**, per-EHR simulation. Rather than returning generic dummy data, it replicates each EHR's specific data models, ID formats, and workflows - so the responses you see match what you'd get in production.

- **Per-EHR data quality** - IDs, field names, and response structures mirror the real EHR. For example, one system might use UUIDs for care units while another uses numeric IDs.
- **Workflow replication** - the mock doesn't just return data; it replicates real workflows including error cases. Booking an appointment for a non-existent doctor returns the same error you'd see in production.
- **Stateful** - resources you create (patients, appointments, notes) are persisted in the sandbox, so you can test full end-to-end flows.

For a deeper dive, see [Smart Mock](https://docs.leyr.io/product/leyr-setup/smart-mock).

## How to Test

Follow the [Quickstart guides](https://docs.leyr.io/api/quickstart) - they walk through every common workflow step-by-step with working code examples. The Smart Mock environment supports all workflows described there.

To see which services are available for a specific EHR, check the [supported services matrix](https://docs.leyr.io/product/fundamentals/ehr-vendors#supported-services).

Some EHRs also have a dedicated real sandbox with specific test data - see [EHR Sandbox Data](https://docs.leyr.io/api/test-data/ehr-sandbox-data) for those.


## Sitemap

See the full [sitemap](https://docs.leyr.io/sitemap.md) for all pages.
