Blog

    SMART Health IT Sandbox for EHR Integration: Launcher, Synthetic Patients and Launch Tests

    By GauravJuly 5, 20269 mins read
    On this page

    Most SMART on FHIR projects start by applying for a vendor sandbox and waiting. The waiting is avoidable, because the open SMART tools let a team build and test a full launch flow on day one, with no registration and no real patient data.

    This post is for engineering teams starting a SMART app or an EHR integration. It explains which open tools exist, how to set up a local development loop around them, how to automate launch tests, and the point at which a vendor sandbox becomes necessary.

    What is the SMART Health IT sandbox, and why start there?

    Starting an EHR integration project?

    Our EHR integration team sets up the development loop, test data and launch tests before vendor access arrives.

    The SMART Health IT sandbox is the set of open tools published by the SMART team, chiefly the SMART App Launcher, that simulate an EHR launch against test FHIR data without registering with any vendor. Agnotic Technologies starts SMART projects there, so launch, token and context handling work before the first vendor sandbox is approved.

    Starting in the open sandbox does not replace vendor testing. It moves the generic work earlier, so the vendor sandbox is used to find vendor differences rather than basic bugs.

    Which tools make up the open SMART test setup?

    The open setup has three parts: a launcher that plays the EHR, a FHIR server holding test data, and a source of realistic test patients. Together they cover everything a SMART app touches during a launch.

    SMART Health IT lists the SMART App Launcher as a developer tool for SMART apps that needs no registration, alongside other test environments and a set of SMART test data.

    • Launcher: starts your app the way an EHR would, with a chosen patient and user in context.
    • Test FHIR server: answers the app's reads and searches with non-real records.
    • Test patients: synthetic or de-identified records that exercise the screens you are building.
    • Your own server: optional, a local FHIR server you control for data the shared ones do not hold.

    Each part can be swapped. The launcher can point your app at a different FHIR server, which is useful once you need data shaped like a particular customer's.

    What can the SMART App Launcher simulate?

    The launcher simulates the EHR side of a SMART launch. It lets a developer choose a launch type, pick a test patient and practitioner, and start the app as if a clinician had opened it from a chart.

    • EHR launch: the app receives an issuer and a launch value, then completes the authorization flow.
    • Standalone launch: the app starts on its own and asks for patient context.
    • Context choices: a specific patient, a practitioner as the user, and an encounter where needed.
    • Server choice: which FHIR version and server the app talks to during the session.

    Because no registration is needed, every developer and every test run can use it. That makes it the natural first target for automated launch tests.

    Synthetic patients instead of real ones

    Development and test environments should never hold real patient data, and they do not need to. Synthetic patients give realistic histories with none of the privacy risk.

    Synthea is an open-source synthetic patient generator that models the medical histories of synthetic patients, producing realistic but not real records that are free from cost, privacy and security restrictions.

    • Breadth: generate enough patients to cover the conditions, ages and medications your screens show.
    • Edge cases: hand-edit a few records to add missing fields, long names and unusual units.
    • Stability: freeze a named test set so screenshots and expected results do not change between runs.
    • Loading: load the set into your own FHIR server when shared servers do not hold what you need.

    Synthetic data is realistic in shape, not in every clinical detail. Do not use it to tune clinical thresholds or to judge how a model performs on real populations.

    How should the local development loop work?

    The local loop should let a developer change code and run a full launch in seconds. If a launch takes a vendor login and a VPN, people stop testing launches and start testing screens in isolation.

    • Step 1, start the app locally: your app runs on a local address registered in the launcher session.
    • Step 2, launch from the launcher: pick the patient and user, and start an EHR launch into the local app.
    • Step 3, inspect the token response: log the granted scopes and context, never the token itself.
    • Step 4, exercise the screens: read data, follow links and repeat with a different patient.
    • Step 5, switch servers: point at your own FHIR server to test data the shared server lacks.

    Keep the launcher settings in the repository as documented configuration. A new developer should be able to run a launch on the first afternoon.

    Automated launch tests in CI

    Launch tests belong in continuous integration, not only on a developer's laptop. A browser test can drive the launcher, complete the flow and check that the app shows the expected patient.

    • Happy path: EHR launch with a known patient renders the right name and data.
    • Missing context: a launch without an encounter still shows a usable screen.
    • Refused scope: when a scope is not granted, the app explains what it cannot show.
    • Bad state: a tampered state value is rejected and logged.

    Run these on every merge. When a library upgrade breaks the token exchange, the build fails the same day rather than at a customer site.

    Keep the tests independent of shared server data by pointing them at your own FHIR server loaded with the frozen test set. A shared public server is fine for exploring, but a test that depends on someone else's records will fail for reasons you cannot control.

    What does the open sandbox not prove?

    The open sandbox does not prove your app works with any particular vendor or customer. It proves your code follows the specification on a well-behaved server.

    • Registration: each vendor's app registration and approval steps.
    • Vendor scopes: which scopes and resources a vendor actually supports and grants.
    • Customer settings: endpoints, activation and the launch point in each customer's workflow.
    • Data reality: local codes, missing fields and the volume of real records.

    Treat a pass in the open sandbox as the entry ticket to vendor testing, not as a go-live signal.

    Write these gaps into the project plan from the start. A customer who hears that the app works in a sandbox will assume more than you mean, so say which sandbox, which tests passed and which vendor steps remain.

    When should you move to a vendor sandbox?

    Move once the launch, token handling, context handling and core screens pass automated tests in the open setup. At that point, vendor time is spent on vendor differences.

    Apply for vendor access early, because approval can take a while, but plan the work so the team is not idle while it waits. When access arrives, run the same test suite against the vendor sandbox and record each difference as configuration, not as a code branch.

    Keep the open setup running after the move. It stays the fastest place to reproduce a bug, onboard a new engineer or test a library upgrade, and the vendor sandbox is then reserved for the questions only it can answer.

    Mistakes teams make with open sandboxes

    The open sandbox is easy to misuse, mostly by trusting it too much or too little.

    • Hard-coded URLs: the launcher's endpoints copied into code instead of read from discovery.
    • Shared data drift: tests that depend on records on a shared server that can change.
    • Real data creep: a production extract loaded into a test server to make a demo look right.
    • Skipped CI: launch tests run by hand once, then never again.
    • False confidence: a passing open sandbox reported to a customer as vendor readiness.

    A worked example: a medication review app before its first vendor

    A team building a medication review app starts on the first day with the SMART App Launcher and a frozen set of synthetic patients. Within the first sprint, an EHR launch opens the app on a chosen patient and lists active medications.

    They add edge cases by hand: a patient with no medications, one with dozens, and one with an unusual dose unit. Browser tests drive the launcher on every merge and check each case.

    When the first vendor sandbox is approved, the same suite runs against it. Two differences appear, a scope name and a missing encounter, and both are handled in per-vendor configuration within the week.

    Who owns the SMART sandbox setup and test data?

    Even a sandbox setup needs owners, or the test data rots and the CI tests get switched off.

    • Engineering lead: the local loop, launcher configuration and the CI launch tests.
    • QA lead: the frozen test patient set, edge cases and expected results.
    • Security lead: the rule that no real patient data enters any test environment.
    • Product owner: deciding when the open setup has done its job and vendor testing starts.

    What are SMART sandbox best practices?

    Start on the open launcher from day one, use synthetic patients only, and freeze a named test set with documented edge cases. Read endpoints from discovery even in development, and keep launcher settings in the repository.

    Automate launch tests in CI, keep them running when vendor sandboxes arrive, and treat every vendor difference as configuration. Never present an open sandbox pass as proof of vendor or customer readiness.

    How can Agnotic help set up a SMART test environment?

    Agnotic sets up SMART development environments for integration teams: the launcher configuration, synthetic test sets, browser-driven launch tests in CI and the move to vendor sandboxes. We build the app on the same foundation, so the tests that guided development keep protecting it after go-live.

    Start your SMART app with Agnotic

    We build launch flows and the test setup around them before vendor access arrives.

    Sources

    Frequently Asked Questions

    No. SMART Health IT lists it as a developer tool that needs no registration, which is why it suits local development and automated tests.

    Talk to an engineer about your project

    Tell us which EHRs you plan to launch from. We will set up a development loop and launch tests before vendor access arrives.

    Go deeper

    Services and solutions on this topic