+ Part I · Built in on the day it shipped

Why software fails differently.

Between 1992 and 1998 the FDA counted 3,140 recalls of medical devices, and 242 of them, 7.7 percent, were caused by software. Of those 242, 192 were caused by defects introduced when the software was changed after it had first been distributed. Both counts are evidence of the same peculiarity: software is not a part that ages, so its failures are mistakes made by people, in the first version or in a later one. The three chapters of this part set out what software in a device is trusted to do, why it fails when it does, and why no amount of testing can prove that it will not.

01 — Software in a device

What the code is trusted to decide.

+ The questionWhat does the software in a medical device actually do, and when is the software itself the device?

A camera, a client and a server

The system in the opening scene has three pieces, and only its software is the device the FDA authorized. A commercial retinal camera, the Topcon NW400, takes the photographs. A computer attached to the camera runs a program the maker calls the client, which lets the operator pick two images of each eye and sends them "over a secure internet connection" to a server in a data center. There a second program, the analysis, examines the images and returns one of three answers to the client screen: more than mild diabetic retinopathy detected, not detected, or image quality insufficient. The FDA set out its review in a public decision summary, which describes this architecture and names the software version reviewed in 2018, IDx-DR 2.0.0.

The camera is a separate product, outside the authorization. What the FDA classified in April 2018 was software. The FDA sorts devices into three classes by risk, from class I, the lowest, to class III, the highest. In a 510(k), a maker shows that its device is substantially equivalent to one already legally marketed, its predicate, and the FDA clears the device. A De Novo is the route for a novel device of low or moderate risk with nothing comparable on the market. The FDA grants a De Novo rather than clearing it, and in granting it creates a new device type; for a class II type it also sets special controls, requirements that every device of that type must meet. The highest-risk devices need premarket approval.

IDx-DR was authorized through a De Novo. The FDA created a new category for it, the retinal diagnostic software device, in class II, the class for moderate risk, under a regulation written for this authorization. Nothing in that device touches the patient, emits energy or moves. Its effect on health passes entirely through a decision: whether a person with diabetes is referred to an eye specialist now or told to come back in a year.

01 — One camera, software in two places, three answers
THE AUTHORIZED DEVICE: SOFTWARE ONLY (class II, 21 CFR 886.1100) RETINAL CAMERA Topcon NW400 a separate cleared device 2 images per eye: disc- and fovea-centered CLIENT on the camera's computer secure internet connection DATA CENTER SERVICE ANALYSIS images one of three answers operator picks images and sends them shown on the client screen more than mild DR detected: refer not detected: rescreen in 12 months insufficient image quality no clinician reads the image architecture as described in FDA decision summary DEN180001 (2018); software version 2.0.0
SpecificationCodeDataReadoutFocal detail
Plate 01 — The device the FDA authorized in 2018 was software: a client on the camera's computer and an analysis on a server, returning one of three answers. The camera is a separate product, and no clinician interprets the images before the answer is given.

When the software is the device

Most medical devices with software carry it inside: the firmware of an infusion pump, the program that runs a ventilator's valves, the code in an imaging scanner. That software is part of the device and is judged with it. A growing share of devices are software alone, running on ordinary computers, phones or cloud servers. Regulators call these software as a medical device, and newer documents describe them simply as medical device software that stands alone. IDx-DR's analysis program is an example.

What turns code into a device is not anything in the code. It is the intended use: what the maker says the software is for, in its claims and in its labeling, which covers the label and any written material that accompanies the device. A program that draws a graph of blood glucose readings for a person's own interest is not a device in the US; the same graph with a rule that tells the patient how much insulin to take is. The US definition, the EU's rules and India's 2026 guidance differ in detail on where the boundary lies, and Chapter 26 sets those differences out. They agree on the principle: the claim makes the device, and the claim also fixes what the evidence must show.

A sentence of labeling can make code a device

Two companies can ship identical image-analysis code, one to help researchers count lesions in a study and one to tell clinicians which patients to refer. Only the second makes a medical claim, and only the second needs a medical device's evidence. Changing a sentence of labeling can therefore change the regulatory status of software that has not changed at all.

Inform, drive, diagnose or treat

Once software is a device, the evidence it needs rises with the answers to two questions. The first is how serious the patient's situation is: whether a wrong answer could lead to death or irreversible harm, to a serious but treatable deterioration, or to something minor. The second is how much the software's output decides: whether it treats or diagnoses directly, drives the next step of care, or only informs a clinician who still decides. Regulators from many countries and the EU agree common approaches through the International Medical Device Regulators Forum. In 2014 the Forum set out these two questions as the axes of a grid for software as a medical device. India's regulator uses the same grid in its 2026 guidance to assign device classes.

IDx-DR sits high on the second axis. Its output is the screening decision itself; no clinician interprets the image. Diabetic retinopathy threatens sight but rarely kills, and a person told to rescreen in a year will usually be seen again, so the situation is serious rather than critical. By contrast, a stroke-triage program that alerts a specialist to a suspected blocked artery informs a clinician who still reads the scan, but in a situation where minutes count. The two products sit in different cells of the same grid, and Chapter 16 returns to the difference between a program that decides and one that advises.

Solved example: what each function is trusted to decide

Take four functions. A pump's bolus calculator computes a bolus, a dose of insulin given all at once, from a glucose reading and the carbohydrates entered. It sets the treatment itself, and an error of a few units can cause dangerously low blood sugar, or hypoglycemia, so it sits at the top of both axes. A triage program examines a CT angiogram, a scan that shows the blood vessels, and flags a suspected large-vessel occlusion, a blockage in one of the large arteries that supply the brain. It informs a stroke team in a critical situation: lower on the second axis, highest on the first. A logbook app that stores and displays glucose readings without interpreting them generally falls outside the US device definition, because a US statute excludes the display of device data from that definition. A step counter for fitness is a wellness product, not a device. The same phone could run all four; the evidence each needs ranges from none to a clinical trial.

02 — Two questions that set the stakes
HOW MUCH THE SOFTWARE'S OUTPUT DECIDES → INFORMS CLINICAL MANAGEMENT DRIVES CLINICAL MANAGEMENT TREATS OR DIAGNOSES HOW SERIOUS THE PATIENT'S SITUATION IS CRITICAL SERIOUS NON-SERIOUS more evidence → pump bolus calculator stroke triage alert (CT angiogram) IDx-DR screening decision the output is the decision OUTSIDE THE DEVICE DEFINITION glucose logbook that only stores and displays readings fitness step counter grid after the international software framework of 2014, also used in India's 2026 guidance; classes in Chapter 26
SpecificationCodeFocal detail
Plate 02 — The evidence a software device needs rises with two things: how serious the patient's situation is and how much the output decides. IDx-DR's output is the screening decision itself, in a serious but not critical situation; a logbook and a step counter fall outside the device definition.

The claim is the unit of evidence

Because the claim defines the device, it also defines what can go wrong. The FDA's decision summary for IDx-DR lists three risks to health: a false positive leading to an unnecessary referral, a false negative delaying evaluation and treatment, and an operator failing to capture images good enough to analyze. Each special control the FDA required answers one of those three risks. The controls cover clinical testing; software verification and validation built on a hazard analysis, a study of how the device could cause harm; training and human-factors testing for operators; labeling; and a protocol stating which changes could significantly affect the device's safety or effectiveness. Chapter 21 shows how that last requirement anticipated the plans for changing AI models that the FDA finalized in 2024, six years later.

Both lists are short because the claim is narrow. IDx-DR is indicated for adults with diabetes who have not been diagnosed with retinopathy. It is to be used by health care providers, with images from the Topcon NW400. It does not look for glaucoma, an eye disease that damages the optic nerve, and at the time of authorization it was not labeled for patients younger than 22 or for pregnant patients. Each limit removes a population or a condition from what the evidence has to cover. The rest of this guide is about the evidence inside those limits and about what happens at their edges, which real use tends to reach.

Write the intended use before the first line of code

A useful intended-use statement names the decision the software supports, the patients it applies to, the users, the setting and the inputs it accepts, including the devices that produce them. Draft it before architecture begins, and treat each change to it as a design change, because the statement fixes the class of the device, the hazards to analyze, the population a clinical study must sample, and the edges where use outside the claim is most likely.

+ What this chapter established
  • IDx-DR is a software device: a client and a server-side analysis that turn photographs from a named camera into one of three screening answers.
  • Software becomes a medical device through its intended use, not through anything in its code, so a change of claim can change its status.
  • The evidence a software device needs rises with how serious the patient's situation is and with how much the software's output decides.
  • The claim defines the risks and the controls; narrow indications shrink what the evidence must cover, and real use tends to test the edges.
Created with Claude (Anthropic).
Educational reference material, not engineering, regulatory or clinical advice. Product and company names referenced are the property of their respective owners.