View all services
Talk to QA Advisor
Browse the Knowledge Hub56 resources
/Test Cases/EHR patient record test cases

Test cases

EHR patient record test cases, where a defect reaches the patient

Twenty eight cases covering duplicate detection and merge, wrong patient entry, units of measure, allergy and interaction alerting, signed note amendment, role based access, break glass events, audit of reads, interface exchange and timeline ordering.

28cases/8coverage types/10security cases/FreeCSV download

All 28 test cases, ready to copy

Free to use and adapt, no sign-up. Download as CSV or Markdown, or copy it straight into your own tooling.

Last updated

28 worked examples

EHR-01

Create a patient record with the full demographic set

TypeFunctionalPriorityHigh
Test data
Given name, family name, date of birth, sex at birth, gender identity and a national identifier
Expected result
Record is created with a unique internal identifier, every field is stored as entered, and the identifier is not derived from any demographic value.
EHR-02

Detect a probable duplicate at registration

TypeFunctionalPriorityHigh
Test data
Same date of birth and family name with a transposed given name and a differently formatted phone number
Expected result
Possible match is surfaced before the record is created. Silent duplicate creation splits a clinical history across two charts.
EHR-03

Distinguish two genuinely different patients with identical names

TypeNegativePriorityHigh
Test data
Two patients sharing a name and date of birth with different national identifiers
Expected result
Both records are retained as distinct. Over-eager matching is more dangerous than duplication, because it merges two clinical histories.
EHR-04

Merge duplicate records and preserve all clinical data

TypeStatePriorityHigh
Test data
Two charts, each holding allergies, medications and results
Expected result
Merged chart carries every allergy, medication and result from both. The retired identifier resolves to the surviving record rather than returning not found.
EHR-05

Reverse an incorrect merge

TypeStatePriorityHigh
Test data
Merge two records in error, then unmerge
Expected result
Each chart is restored with only its own data, entries added after the merge are assigned deliberately rather than duplicated, and the whole sequence is audited.
EHR-06

Verify patient identity before any clinical action is recorded

TypeSecurityPriorityHigh
Test data
Open two charts in two tabs, then file a note from the tab that is not in focus
Expected result
Note is written to the intended chart. Context that leaks between tabs or persists after a chart is closed is the mechanism behind wrong patient entries.
EHR-07

Store and display a value with its unit of measure

TypeFunctionalPriorityHigh
Test data
Weight recorded in kilograms and displayed in a pounds locale, and glucose in two common unit systems
Expected result
Unit is stored alongside the value and converted only for display, with the unit always shown. A bare number is unusable and a converted number without its unit is dangerous.
EHR-08

Reject a physiologically impossible value

TypeNegativePriorityHigh
Test data
An adult weight of 700 kilograms, a negative temperature and a heart rate of zero on a conscious patient
Expected result
Each is refused or requires explicit confirmation. Silent acceptance feeds a dosing calculation that produces a harmful result.
EHR-09

Recalculate age and dosing bands correctly across a birthday

TypeBoundaryPriorityHigh
Test data
A paediatric patient the day before, the day of and the day after a birthday that crosses a dosing band
Expected result
Age is calculated from the date of birth in the facility timezone and the correct band applies on each day, including the twenty ninth of February.
EHR-10

Raise an allergy alert before an order is signed

TypeFunctionalPriorityHigh
Test data
Order a medication in a class the patient is recorded as allergic to
Expected result
Alert is raised before signing, states the recorded reaction, and requires an explicit override with a reason that is stored.
EHR-11

Raise an alert on a drug to drug interaction

TypeFunctionalPriorityHigh
Test data
Two active medications with a documented severe interaction, including one prescribed at another facility
Expected result
Interaction is detected across the whole active medication list rather than only within the current order session.
EHR-12

Continue to alert after a medication is renewed or substituted

TypeStatePriorityHigh
Test data
Renew an interacting medication and switch to a generic equivalent
Expected result
Alerting continues to fire. Matching on brand name alone rather than on ingredient allows a substitution to bypass the check silently.
EHR-13

Distinguish an allergy from an intolerance and a contraindication

TypeFunctionalPriorityMedium
Test data
One recorded allergy, one intolerance and one condition based contraindication
Expected result
Each is stored under the correct classification and drives the appropriate severity of warning rather than being flattened into one list.
EHR-14

Record no known allergies as an assertion, not as an absence

TypeStatePriorityHigh
Test data
A chart never asked about allergies, and one confirmed as having none
Expected result
The two states are distinguishable. An empty allergy list must never be presented as a confirmed absence of allergies.
EHR-15

Prevent two clinicians from overwriting the same note

TypeBoundaryPriorityHigh
Test data
Two users open the same note and save conflicting content at the same instant
Expected result
One save succeeds and the other is refused with a conflict showing the newer version. A silent last write wins destroys a clinical entry.
EHR-16

Amend a signed note without altering the original

TypeStatePriorityHigh
Test data
Sign a note, then amend it
Expected result
Original remains readable and the amendment is a new versioned entry with its own author and timestamp. Signed clinical content is never edited in place.
EHR-17

Retract an entry filed on the wrong patient

TypeStatePriorityHigh
Test data
File a note and a result on the wrong chart, then retract both
Expected result
Entries are marked retracted and excluded from the clinical view while remaining in the audit record. Hard deletion is not an acceptable outcome.
EHR-18

Enforce role based access to the record

TypeSecurityPriorityHigh
Test data
Clinical, administrative and billing roles requesting the same chart
Expected result
Each sees only the permitted sections. Restrictions are enforced on the server, so a hidden section is genuinely unreachable rather than merely not rendered.
EHR-19

Refuse access to a chart the user has no relationship with

TypeSecurityPriorityHigh
Test data
Request a chart identifier belonging to a patient outside the assigned caseload
Expected result
Refused. Identifiers must not be enumerable, and the response reveals nothing about whether that record exists.
EHR-20

Permit emergency access and record it as a break glass event

TypeSecurityPriorityHigh
Test data
Emergency access to a restricted chart with a stated reason
Expected result
Access is granted, the reason is captured, the event is flagged for review, and the flag cannot be cleared by the user who raised it.
EHR-21

Apply consent and sensitive data restrictions

TypeSecurityPriorityHigh
Test data
A chart with a restricted section and a patient who has withdrawn consent for sharing
Expected result
Restricted content is withheld from the interface, from exports and from outbound interface messages, not only from the screen.
EHR-22

Write an audit entry for every read as well as every write

TypeSecurityPriorityHigh
Test data
One chart view, one edit, one refused access and one break glass event
Expected result
All four are recorded with user, patient, timestamp, action and outcome. The record is immutable and reads are audited, not only changes.
EHR-23

Exchange the record over a clinical interface without loss

TypeCompatibilityPriorityHigh
Test data
Outbound and inbound messages carrying allergies, medications, units and coded diagnoses
Expected result
Every field survives the round trip with its coding system intact. Codes are never mapped to a nearest neighbour without being flagged.
EHR-24

Preserve accented characters and long names

TypeNegativePriorityMedium
Test data
Names with diacritics, apostrophes, hyphens, a single word name and one at the maximum field length
Expected result
Stored and returned unchanged in the interface, in exports and in interface messages, with no truncation and no substitution.
EHR-25

Order the timeline correctly across timezones and daylight saving

TypeBoundaryPriorityHigh
Test data
Events recorded either side of a daylight saving change and from a facility in another timezone
Expected result
Chronological order is correct, the repeated hour does not reorder events, and each entry shows the timezone it was recorded in.
EHR-26

Keep clinical documentation available when a dependency is down

TypeStatePriorityHigh
Test data
Take the results interface offline while a clinician is documenting
Expected result
Documentation continues and queues, the degraded state is visible rather than silent, and nothing already entered is lost on recovery.
EHR-27

Verify the value shown on screen against export and reporting

TypeStatePriorityHigh
Test data
Compare one result in the chart, in a printed summary, in an export and in a reporting extract
Expected result
All four agree in value, unit and timestamp. A unit converted in one path and not another is the defect this case exists to catch.
EHR-28

Operate the chart with a keyboard and a screen reader

TypeAccessibilityPriorityMedium
Test data
Keyboard only navigation through the allergy list, an alert dialogue and the signing control
Expected result
Alerts receive focus and are announced with their severity, the override reason is reachable, and nothing can be signed without the warning being announced.

What goes in each field

ID

Required

Stable identifier, prefixed by module.

Test case

Required

What is being verified, in one line.

Type

Functional, negative, boundary, security, state, performance, accessibility or compatibility. Use it to check coverage is spread rather than clustered on the happy path.

Priority

Risk based, weighted by clinical harm. Anything that can attach data to the wrong patient, hide an allergy or interaction warning, or present a value in the wrong unit is High. Access and audit failures are High because they are reportable.

Test data

The specific values, including the invalid and boundary ones.

Expected result

Required

The precise observable outcome, including message text where the wording itself is the requirement.

How To Use This

Open two charts and file one note

Clinical software fails in ways that are quiet at the time and serious later. These four conditions produce most of them.

Work with two charts open

File a note from the tab that is not in focus. Patient context that leaks between tabs, or survives a chart being closed, is the mechanism behind wrong patient entries.

Never trust a bare number

Every clinical value needs its unit stored with it and displayed with it. A weight converted for display but shown without its unit will eventually drive a dose.

Substitute the drug, keep the alert

Renew an interacting medication and switch it to a generic. Alerting that matches on brand rather than ingredient stops firing and nobody notices.

Separate unknown from none

A chart never asked about allergies and a chart confirmed as having none must be distinguishable. An empty list presented as a confirmed absence is a harm pathway.

What Most Sets Miss

Why record defects cause harm

Patient identity is the first and largest category. A missed duplicate splits a clinical history in two, so the chart a clinician reads is missing half the picture. An over-eager match does the opposite and merges two people into one record, which is worse. Both need testing, and they pull in opposite directions: the same matching rule cannot be tuned for both, so the test set has to assert on a deliberate position rather than on whatever the algorithm returns. The merge itself needs its own cases, including the unmerge, because an incorrect merge that cannot be reversed leaves two patients permanently entangled.

Units of measure are the second and are almost never present in published sets. A value stored without its unit is not clinical data, it is a number. The failure appears at a boundary: a value entered in one unit system, converted for display in another, then read back by a calculation that assumes the original. Testing that the same result agrees in the chart, in a printed summary, in an export and in a reporting extract is one case, and it catches a whole class of conversion defects at once.

Alerting degrades silently. An allergy or interaction check that fires correctly during the first order will often stop firing after a renewal or a generic substitution, because the match is on brand name rather than on ingredient. Nothing errors, no alert appears, and the absence of a warning reads as safety. The related case is the distinction between unknown and none: an empty allergy list rendered as no known allergies asserts something that was never established.

Finally, access and audit are regulated rather than merely desirable. Reads are auditable events in clinical systems, not only writes, and emergency access needs to be possible, recorded, and flagged for a review that the accessing user cannot clear. Consent restrictions have to hold on exports and outbound interface messages, not only on the screen, because that is the path by which restricted data actually leaves the building.

Suggest an improvement

Testing an EHR or clinical platform?

QAble tests clinical systems end to end, including patient identity, alerting logic, units of measure, access control and interface exchange between systems.

Healthcare software testing services

More test case sets

View all

Test cases for a login page

Test cases
25 cases across functional, negative, boundary, security, session and accessibility paths, including account enumeration and lockout.

Test cases for a registration form

Test cases
28 cases covering validation, duplicate accounts, email verification, password rules and the enumeration leak most signup forms ship with.

Test cases for search functionality

Test cases
28 cases across relevance, partial and fuzzy matching, filters, pagination, empty states, injection attempts and performance under load.

Test cases for a shopping cart

Test cases
27 cases on quantity limits, price recalculation, stock changes, coupon stacking, guest to account merge and cart persistence.

Test cases for checkout and payment

Test cases
30 cases including 3D Secure, declines, timeouts, duplicate charges, idempotency, refunds and partial captures.

Test cases for file upload

Test cases
28 cases on size and type limits, spoofed content types, malicious filenames, progress, resume, virus scanning and storage limits.

Test cases for forgot password

Test cases
26 cases on reset token expiry, single use enforcement, session invalidation and the enumeration and rate limit gaps that are routine here.

Test cases for OTP verification

Test cases
26 cases on expiry, resend throttling, attempt limits, code reuse, delivery failure and the brute force window teams forget to close.

Test cases for user roles and permissions

Test cases
26 cases on horizontal and vertical privilege checks, direct object access, role changes mid-session and permission inheritance.

Test cases for form validation

Test cases
27 rules-based cases on required fields, length and numeric boundaries, client and server parity, hidden field tampering and error accessibility.

Test cases for a date picker

Test cases
26 cases on timezone shifts, ambiguous day and month order, impossible dates, min and max limits, leap years and keyboard operation.

Test cases for pagination

Test cases
24 cases on ordering stability, records changing mid-session, page size caps, deep offset cost, permission-filtered totals and state restore.

Test cases for push notifications

Test cases
26 cases on app states, deep link routing, token release on sign out, lock screen privacy, preferences, provider failures and platform differences.

Test cases for reports and data export

Test cases
25 cases on permission filtering in the file, spreadsheet formula injection, encoding, typed numbers and dates, row limits and audit logging.

Test cases for a chatbot

Test cases
28 cases on paraphrased intents, context, fallback loops, human handoff, policy grounding, prompt injection and data scoping.

Test cases for net banking transactions

Test cases
28 cases on duplicate debits from a retried request, concurrent transfers against one balance, daily limits across channels, beneficiary cooling periods, second factor binding and reconciliation.

Test cases for wallet and UPI payments

Test cases
28 cases on payments that time out with no response, idempotency on retry, racing balances, caps across devices, collect request fraud, mandates and refunds.

Test cases for insurance claim submission

Test cases
28 cases on coverage at the date of loss, waiting periods, deductibles and sub limits, exclusions and riders, duplicate claims and settlement reconciliation.

Test cases for CRM lead management

Test cases
28 cases on duplicate leads under concurrency, routing and the unrouted fallback, round robin races, territory visibility, conversion and bulk import.

Test cases for an ERP purchase order

Test cases
28 cases on approval thresholds, amendments that must reset approval, budget commitment races, over receipt tolerance, three-way match and duplicate invoices.

Test cases for OTT video playback

Test cases
28 cases on bitrate recovery after a dip, DRM renewal mid stream, concurrent stream limits and leaked slots, resume conflicts, ad cue points and offline expiry.

Test cases for game level progression

Test cases
28 cases on save corruption during a crash write, cloud save conflicts, offline queue replay, unlock gating, currency exploits and purchase restore.

Test cases for a REST API

Test cases
28 cases on status code correctness, cross tenant resource access, mass assignment, idempotent retries, cursor pagination, rate limits and contract drift.

Test cases for SSO and social login

Test cases
28 cases on linking an account on an unverified email, state and code replay, redirect allow lists, token signature and issuer, deprovisioning and session rotation.

Test cases for subscription and billing

Test cases
28 cases on mid cycle proration, duplicate and out of order webhooks, renewal double charges, dunning and grace, trials, coupons, metered usage and tax.

Test cases for data tables, filters and sorting

Test cases
28 cases on unstable sorts across pages, filters that must reset pagination, selection surviving a filter change, bulk action scope and export fidelity.

Test cases for session timeout and concurrent login

Test cases
28 cases on tokens that survive sign out, refresh token reuse, idle against absolute lifetime, multi tab expiry, session limits and remote revocation.

Test cases for a multi step form wizard

Test cases
28 cases on values lost to back navigation, refresh and session expiry, step skipping, server side revalidation, duplicate submission and conditional branches.

Test cases for email verification

Test cases
28 cases on token reuse and expiry, invalidating earlier links, account enumeration, header injection, safe address change and mail scanner prefetching.

Test cases for dashboards and analytics widgets

Test cases
28 cases on reconciling against source rows, widgets that disagree, timezone aggregation, zero baselines, no data shown as zero and permission leaks in aggregates.

Test cases for booking and reservation

Test cases
28 cases on concurrent bookings for the last slot, inventory holds that leak, payment without a booking, cancellation boundaries and channel sync.

Test cases for mobile app install and update

Test cases
28 cases on migration chains across skipped versions, crashes during post upgrade migration, forced update lockouts, deep links and clean reinstall.

Test cases for accessibility (WCAG 2.2 AA)

Test cases
28 cases on keyboard only completion, focus management, live region announcements, contrast, reflow at 320 pixels, target size and screen reader verification.

Test cases for performance and load

Test cases
28 cases on spikes with no ramp, recovery after peak, soak and leak detection, pool exhaustion, cold caches, retry storms and data correctness under load.

Test cases for the OWASP Top 10

Test cases
28 cases on broken access control, mass assignment, injection across every input surface, credential stuffing, session invalidation, SSRF and exposed secrets.

Test cases for cross browser compatibility

Test cases
28 cases on storage that throws in private mode, blocked third party cookies, engine date parsing, mobile viewport units, in app browsers and ad blockers.

Test cases for database and data integrity

Test cases
28 cases on uniqueness under concurrency, lost updates, counter races, orphaned rows, migration and backfill safety, replica lag and verified restores.

Test cases for localisation and multi language support

Test cases
28 cases on text expansion, concatenated sentences, plural rules, locale date parsing, decimal separators, right to left layout, collation and encoding.

Want clinical data integrity proven, not assumed?

QAble covers functional, boundary and security paths with ISTQB-certified engineers. Start with a free QA audit of your platform.

Talk to QA Advisor