EMR Interface Testing: A Practical Guide for Lab Interfaces

EMR interface testing proves that orders leave your electronic medical record intact, that results come back to the right patient with the right values, and that every failure along the way is visible instead of silent. Done well, it is a short, scripted exercise with clear pass and fail criteria. Done badly, it surfaces as a wrong reference range or a missing result in front of a clinician. If you run a practice, a clinic group, a long-term care facility or a research site, the fastest route to a clean go-live is a laboratory partner that builds and tests the connection with you. At KoHealth Labs, LIS and EMR integration, electronic results reporting and dedicated onboarding and training are part of what we offer.
TL;DR
- An interface is the agreed message exchange between your EMR and a lab system: orders out, results and acknowledgments back. Test both directions.
- Test in a non-production environment first, with scripted scenarios that include errors, not only the happy path.
- Cover four layers: message syntax, meaning (codes and units), complete use-case scenarios, and error handling.
- Verify results in the screen where the clinician actually reads them, including abnormal flags, comments and corrected results.
- Keep testing after go-live: log defects, retest every fix, and recheck on a schedule.
What an EMR interface is and what it carries
An EMR interface is a defined connection that moves data between your electronic medical record and another clinical system. For a laboratory, the core traffic is simple: a test order travels from the EMR to the lab information system (LIS, the software that runs the lab’s workflow), and the result travels back and files into the patient’s chart. Each message is acknowledged by the receiver so the sender knows it arrived and was understood.
Most of this traffic still uses HL7 version 2, a long-established message format built from pipe-delimited segments. Newer exchange uses FHIR, a web-based standard built on APIs. Which one your interface uses decides which tools you test with, but the questions are the same. Did the right patient get the right order? Did the result come back with the right units, flags and comments? What happens when something goes wrong?
If you want the architecture behind this, our guide to how LIS and EMR integration connects lab orders and results walks through the flow from order entry to filed result.

Standards and message types to put in scope
Start by listing what the interface actually exchanges. For a typical practice that means orders, results, acknowledgments and, for some labs, reportable results sent on to public health agencies. The National Institute of Standards and Technology (NIST) publishes a free HL7 v2 conformance testing tool portfolio with separate suites for laboratory results, public health electronic lab reporting, laboratory test, immunization and syndromic surveillance. The tools support two modes: context-free testing, which validates any message the system produces, and context-based testing, which checks messages against a specific use case and test data.
NIST’s conformance profile approach explains why this matters. A profile documents the use case, the exact message definition and the acknowledgment exchange between sender and receiver. It works as a contract between both sides and removes the ambiguity that the standard itself allows. The same source says a test plan should account for four things: syntax, semantics, use-case scenarios and error conditions. Use those four as the backbone of your plan.

For FHIR interfaces, HL7’s testing framework uses the TestScript resource. It describes tests in a form engines can run automatically, loads test data, runs each operation in order and tears down afterward. Operations that are expected to fail must be followed by an assertion, which is how you test for error responses on purpose. The engine produces a TestReport you can keep as evidence.
Coding is part of the scope too. Results that arrive with local test names instead of standard codes cannot be trended or reported reliably. Our piece on LOINC mapping for labs explains why to map the highest-volume tests first.
How to plan and run the test
The Office of the National Coordinator for Health IT (ONC) publishes an EHR system testing plan that is a sound base for any practice. Its core rules translate into six steps.
- Set up a test environment. Use a test environment or a separate database section that is not in production use and holds no real patient data. Both the EMR and the lab side need a test endpoint.
- Write scenarios before you touch the interface. Each scenario names the patient, the test, the specimen, the expected message and the expected result in the chart. Use scripts for varied cases, not one ordinary order repeated.
- Test both directions. For a bidirectional interface, test sending and receiving separately. An order that leaves correctly proves nothing about a result that comes back.
- Test the workflow, not only the message. Confirm that data moves properly between systems, from order entry through collection, resulting and filing.
- Simulate live conditions. Integrated testing should include the exception logic and high-risk functions your staff will meet on a bad day.
- Set acceptance criteria and record the outcome. Decide in advance what counts as a pass, and keep the evidence.
NIST’s standards and testing framework draws a useful line between capability testing in a controlled environment and production testing on live systems. Treat go-live as the second kind: the first live orders deserve a named person watching them end to end.
The usual place this goes wrong is step 2. Teams test a handful of routine chemistry panels, then discover at go-live that microbiology, add-on tests or corrected results behave differently. Write scenarios by test type and by result type from the start. Our guide on designing a CLIA-ready lab data pipeline shows how a small pilot of real orders fits into that plan, and the seven stages of EMR lab integration place testing in the wider project.
Test cases that catch real problems
The table below groups the cases most worth scripting. Each can be run as written against a test environment.
| Area | What to test | Pass looks like |
|---|---|---|
| Patient matching | Same name with different dates of birth, hyphenated names, a patient with two record numbers | The order and result attach to one correct chart, never a near match |
| Specimen matching | Accession number on the label, the order and the result | Identifiers agree in every message and on the report |
| Orders | Single test, panel, add-on, cancellation, STAT priority | Lab receives exactly what the clinician ordered, with priority intact |
| Results | Numeric, text, qualitative, abnormal flag, critical value, corrected result | Values, units, reference ranges and comments display unchanged |
| Acknowledgments | Accepted, application error, rejected | Sender reads each status and acts on it |
| Routing | Results for an ordering provider, a covering provider and a second recipient | Each result reaches the right inbox |
| Error handling | Malformed message, unknown test code, receiver offline | Error is logged, someone is alerted, nothing is lost |
| Permissions | Each user role opening results | Only authorized roles see the data |
A few concrete reference points show what these cases look like in practice.
- Headers. The Michigan Department of Health and Human Services results implementation guide requires the processing ID field to carry a T for testing or P for production and the version field to read 2.5.1. It also specifies that if a receiving EHR or LIS is unavailable, the state hub retries up to five times before results may go by mail or fax. A test that sets the wrong processing ID is a classic way to mix test data into production.
- Acknowledgments. The Department of Veterans Affairs laboratory universal interface specification defines acknowledgment codes of accept, application error and reject. Error responses carry an error code, a severity and a user message, and its default retry is a one-minute wait with a maximum of two attempts. Your own retry rules may differ, but you need to know them and test them.
- Display. NIST’s test methods for health IT simulate an LIS with a test harness and check that results display the elements derived from CLIA requirements in the EHR. The test is not whether a message was valid but whether the clinician sees the right thing.
- Permissions. ONC’s testing guidance recommends testing each data element at least once before moving to a condensed core list. It also says to check each applicable user role so only authorized groups can reach the data. Results should also stay out of unsecured channels: a HIPAA texting policy for care teams covers the human side of that rule.
Verifying results where clinicians read them
The College of American Pathologists (CAP) accreditation checklist item GEN.48500, on interface result integrity, sets a clear bar that is useful even if your site is not CAP accredited. According to the CAP laboratory general checklist, a lab needs a procedure to verify that results transmit accurately from data entry to patient reports. It must be done before go-live and every two years afterward. The check covers reference ranges, comments, actual results and report formats in the first downstream system where the clinician routinely reviews results. At implementation, at least two example reports from each applicable discipline must be validated, including abnormal flags, comments and corrected results.
The practical lesson: compare the printed or on-screen report in the EMR to the lab’s source report, line by line, for every result type you will receive.
U.S. requirements that shape the test
The rules here belong to the EMR vendor and the lab as much as to you, but they set what a certified interface should do, so your test plan can lean on them.
- Electronic lab reporting to public health. ONC’s test procedure for § 170.315(f)(3) requires reportable lab messages to conform to the HL7 v2.5.1 ELR implementation guide and pass the NIST ELR test tool without error. They must use at least SNOMED CT and LOINC and cover all context-based test cases.
- APIs and data standards. Under 45 CFR Part 170 as published on October 1, 2025, the API base standard is HL7 FHIR Release 4.0.1. The same text adopts USCDI v3, the standardized set of patient data classes, and requires certified developers to test the real-world use of their modules.
- Patient and population APIs. The § 170.315(g)(10) test procedure covers single-patient and bulk data requests, application registration, secure connections and refresh tokens valid for at least three months.
- What changed recently. The HTI-1 Final Rule, published January 9, 2024, finalized USCDI v3 and moved the USCDI v1 expiration to January 1, 2026. ONC has since issued enforcement discretion notices giving developers extra time for some HTI-1 updates, so ask your EMR vendor which version your build runs on.
- Lab orders and display. Certified health IT must support computerized provider order entry for laboratory tests, and the standards in 45 CFR Part 170 include HL7 2.5.1, LOINC and UCUM units.
For questions about your own compliance obligations, your compliance officer or counsel is the right person to confirm scope.
Defects, retesting and life after go-live
Testing only works if findings are tracked. Keep one log with, for each defect, the scenario, the message or screenshot, the expected and actual result, severity, owner and the retest result. ONC’s testing guidance also recommends documenting and tracking testing activities, results and errors.
A fix is not closed until the scenario that failed passes again and the neighboring scenarios still pass. Changing a unit mapping for one test can quietly break another, so rerun the full core list after any change to mappings, code sets or interface engine rules.
After go-live, set a rhythm:
- Review rejected and errored messages daily during the first weeks, then weekly.
- Reconcile order counts against result counts so a missing result stands out.
- Retest after every EMR upgrade, lab test menu change or new code set.
- Repeat the downstream report check on a fixed schedule, and at least as often as the two-year interval in the CAP item above.
Common failures and how to prevent them
The failures that recur are rarely exotic. They tend to come from the same few gaps.
- Only the happy path was tested. Prevent it by scripting cancellations, add-ons, corrected results and rejected messages up front.
- Units and reference ranges drift. A mapped test shows a value in the wrong unit or a missing range. Compare the EMR display to the source report for every result type.
- Local codes never mapped. Unmapped tests fall out of trending and reporting. Map the highest-volume tests first.
- Test data reaches production, or the reverse. Check the processing ID and keep test patients clearly marked.
- Silent failures. A rejected message with no alert looks identical to a result that never existed. Test that errors raise a visible notification.
- Wrong recipient. Covering providers, group practices and multi-site clinics need routing scenarios of their own.
- No owner. Name one person on each side who signs off acceptance criteria and reads the logs.
What KoHealth Labs brings to your interface project
If you are connecting a practice, a long-term care facility, a home health organization or a research site to a lab, the interface is easier to test when the lab is part of the project from the first scenario. KoHealth Labs offers LIS and EMR integration, electronic results reporting, a provider portal and dedicated onboarding and training, alongside specimen pickup and mobile phlebotomy, so order entry, collection and results sit with one partner. You can see the integration offer on the KoHealth Labs site.

For clinical trials, we support CROs and sponsors with specimen collection and management, biomarker analysis and regulatory-aligned data delivery, so lab data arrives in the form the study protocol expects.
Our perspective
A lab interface is a clinical process that happens to run on software. The message can be perfectly valid and the patient can still see the wrong range or no result at all, which is why we think testing should end at the clinician’s screen, not at the interface engine.
We build our approach around direct communication. Our clinic and research partners work with people who know their orders, their test menu and their workflow, rather than a ticket queue. That matters most in the first weeks, when a mapping question answered in an hour saves a day of rework.
Our integration, onboarding and training services exist so your staff are not left to translate between an EMR vendor and a laboratory on their own. Whether we are your primary laboratory or an added resource for specialized testing, our goal is the same: fast, reliable results that arrive in your chart ready to use.
Kohealth Labs
FAQ
What is the difference between interface testing and integration testing?
Interface testing checks the connection itself: message structure, codes, acknowledgments and error handling between two systems. Integration testing checks the whole workflow around it, from order entry and collection to a filed result a clinician can act on. A project needs both, and the second is where most workflow surprises appear.
Do I need to test in a separate environment?
Yes. ONC’s testing plan calls for a test environment or separate database section that is not in production use and holds no real patient data. This lets you send malformed messages, cancellations and error cases safely.
How often should an EMR lab interface be retested?
Retest after any change to mappings, code sets, EMR versions or the lab’s test menu. As a baseline for result integrity, the CAP checklist item on interface result integrity calls for verification before go-live and every two years afterward.
Which standards should the interface use?
Most lab interfaces use HL7 v2.5.1 messages, with LOINC for test codes and UCUM for units. FHIR R4 is the base standard for certified APIs under current ONC rules. Confirm with your EMR vendor and lab which one each connection uses before you write scenarios.
Sources
- HL7 v2 Conformance Testing Tools, NIST
- The HL7 Conformance Profile Approach, NIST
- Testing, FHIR v5.0.0, HL7
- EHR System Testing Plan, ONC
- The Standards and Testing Landscape, NIST
- Michigan DHHS results implementation guide
- VA Laboratory Universal Interface specification
- Test methods for health information technology, NIST
- Testing Guidance, ONC
- CAP Laboratory General Checklist
- Transmission to public health agencies, § 170.315(f)(3), ONC
- 45 CFR Part 170, eCFR, October 1, 2025
- Standardized API for patient and population services, ONC
- Enforcement Discretion Notices, ONC
- HTI-1 Final Rule, Federal Register
- 45 CFR Part 170, eCFR, current
For more information about our diagnostic testing, clinical research laboratory services, or partnership opportunities, visit https://kohealthlabs.com or contact KoHealth Labs at (469) 792-8439 and ask for Amy Patterson.
