System Design Atlas

Hospital medication orders

03 / 10Worked example

Scale estimates

Which load describe mean, test peak and the hotspot on medication order?

The promise for medication order M-26 is examined under an explicitly assumed magnitude. 14,400 events are spread over 24 operating hours. A test peak of 12 events per second and the hotspot “Two professionals work on the same job in a revision” check different properties than the mean.

Starting point Verification evidence binds the exact prescription content.

Assumptions for the example case

Own fictitious example design. A fictional documentation workflow for a single medication order whose clinical decisions have already been made, without recommendations on substances, doses or treatment. Technical feedback is marked for clarification from age 60 seconds onwards; this threshold does not provide medical clearance. All figures and test goals are illustrative assumptions.

Baseline load, peak load and domain hotspot

Three separate scale views

14,400 / 24 hStorage and deferred-processing volumePlan capacity
12/s for 900 sShort test peakTest throughput
2 professionals · a revisionDomain contention pointTest either order of competing requests

Daily volume, test peak and domain hotspot determine different tests.

Day bars 14400 events / 24 h, top column 12/s, magnifying glass section: Two specialists work on the same assignment during a revision. No common linear process chain.

Reproducible test profile calculations

  1. 01

    Average event rate

    0.166667 Events/s

    14400 ÷ (24 × 3600 seconds)

    For the designBase load for reconciliation processing; long business waiting times are not included.

  2. 02

    Assumed test peak

    12 events/s

    12 × 900 seconds = 10800 events in the 15-minute test

    For the designThis deliberately higher test load checks response time and backlog. It is an assumption, rather than a peak measured in production.

  3. 03

    Raw data per day

    28.12 MiB/day

    14400 × 2048 byte ÷ 1048576

    For the designMetadata budget for prescription revisions, verification records, dispensing events and documentation; document content, indices, replicas and backups are added.

  4. 04

    Domain hotspot

    Two professionals handle the same assignment in a revision

    Separate concurrency or ordering test for the same business identity.

    For the designChange and dispensing both expect version 7. If the change wins, dispensing loses the old approval. If dispensing wins, the change is rejected and, after a fresh read, handled as an investigation case; dispensing that already occurred remains recorded.

Test concurrency on an individual order

Test concurrency on an individual order

Test concurrency on an individual order.

Two professionals handle the same assignment in a revision

0.166667 events/s on average say little about two professionals handling the same assignment in a revision. The exercise specifies the input and expected result.

Alternative considered
A test with only 0.166667 events/s does not capture the concentrated contention.
Trade-off
The separate hotspot profile requires a controlled sequence in addition to the 10800 event test.
Reassess
Measured real peaks above 12 events/s change the load profile.

Try it yourself

Calculate mean rate and number of events in the 15-minute peak test. In addition, explain what the hotspot test proves.

A hint for your attempt

Convert operating hours into seconds first; the peak test lasts 900 seconds.

Compare with a possible solution
Calculation
14400 ÷ (24 × 3600) = 0.166667 events/s. 12 × 900 = 10800 events.
Domain hotspot
Change and dispensing both expect version 7. If the change wins, dispensing loses the old approval. If dispensing wins, the change is rejected and, after a fresh read, handled as an investigation case; dispensing that already occurred remains recorded. The average rate alone cannot prove this commitment.

Apply to your project

Which single item concentrates the load more strongly than the daily mean at medication steps?

Next: Issue requires revision and proof of verification.