Skip to content
All articles

Calvin Kennedy ·

Release a patient follow-up feature.

A patient sends a follow-up. Their care team needs the response, one task to review and a named owner.

Explore the product change, interrupt the handover and inspect the evidence for a release. Then let the team make its next change.

Try the handover

For health-product founders and teams with a prototype or a workflow to release. No programming knowledge required.

Discuss your software

Working browser simulation · Fictional records

Patient follow-up 041

Candidate 1

A candidate is the version being considered for release.

Follow-ups

To review 0

Patient responseOwner

The submitted follow-up will appear here.

My follow-up041

After your appointment

Would you like us to contact you?

Please contact me about my follow-up.

Ready to send

What has been checked?

Candidate 1
Software behaviour

Run the retry checks.

Care-team task

Check ownership and receipt.

Saved checkpoint

Restore, then retry the request.

Inspect the checks and saved record

Run a check to inspect its expected and observed results.

Bounded model: one request and up to three delivery attempts.

Saved checkpoint JSON
No checkpoint has been created.

Send the fictional follow-up, then interrupt its confirmation.

Candidate confirmation

Your follow-up has been received.

Released example

No version released yet.

Scroll to follow the story.

These checks run on the browser model. Workflow review is a scripted example; clinical validation and regulatory assessment remain separate.

A retry should not create a second task.

The task reaches the care team, but its confirmation never reaches the patient. The patient tries again. The first implementation creates another task for the same response.

The correction recognises the original submission. A retry can now return its existing task. Compare both implementations in the same product.

The missing confirmation is simulated. The duplicate task is produced by the model you are running.

The check needs to catch the defect.

Verification checks the specified behaviour. Here the requirement is concrete: the patient’s submission must create one logical task, including when it is retried.

Run the same checks before and after the correction. The failing result identifies the sequence that created duplicate work. The corrected result comes from executing that sequence again.

Inspect the bounded state model

A working inbox still needs someone to act.

The software checks can pass while the task has no owner. Who will review this response? Can they see the information they need? What happens when their team is unavailable?

Validation asks whether intended users can complete their work. Assign a review team in the example, then run its workflow checks. Real validation requires the people who will use the product, realistic tasks and recorded findings.

A scripted ownership check illustrates a requirement. It does not establish clinical suitability.

Restore the work. Then try it again.

The example saves a checkpoint after the task arrives and its confirmation is lost. It serialises the record, restores it and retries the request.

Inspect the recovered response, owner and request identifier. The recovery check also asks whether the restored task can continue without creating duplicate work.

A production recovery exercise also needs the actual application, storage, permissions and integrations, with agreed recovery objectives. This checkpoint exists in browser memory.

Decide which version people will use.

The example records the candidate and the results that belong to it. Its release stays on hold until the software, task and recovery checks pass for that candidate.

Quality assurance also controls how requirements, changes and unresolved defects are reviewed. The release record demonstrates one part of that work: evidence for a specific version.

In a real product, the responsible people also decide whether the clinical and regulatory requirements for that release have been met. Passing engineering checks alone cannot settle those questions.

What changes the regulatory questions?

Your team can keep improving the product.

Change the patient’s confirmation message. The released version stays intact while the team works on a new candidate. The earlier results cannot approve this changed version.

Agree which changes the team can make, which need engineering or specialist review, who approves a release and who can recover it. That gives the team a practical way to make the next useful change.

See what the model explores.

Model checking is a formal method: define the possible states and check whether a stated rule holds. Here the checker explores every state reachable using four action types, for one request and at most three delivery attempts. It checks whether any state contains more than one task for that request. A failing sequence shows how it happened.

UML state diagram of the follow-up confirmation An unsent request moves to awaiting confirmation when sent. A lost confirmation permits retry if fewer than three attempts have been made. A delivered confirmation moves the request to received. Task creation or reuse occurs on send and retry. Not sent Awaitingconfirmation Confirmationlost Confirmationreceived send / save tasklose confirmationretry [attempts < 3]/ save or reuse taskdeliver confirmation
UML state notation shows the confirmation state. The retry effect depends on the implementation selected above. OMG UML 2.5.1

Original implementation

6 states with duplicate work

10 reachable states · 40 evaluated action transitions

Corrected implementation

0 states with duplicate work

10 reachable states · 40 evaluated action transitions

The model includes one synthetic request, at most three delivery attempts and four action types executed one at a time. It excludes real networks, databases, concurrent users and clinical decisions. A result with no violations applies only to this property within these bounds.

Read the executable model and checks
export const FOLLOW_UP_REQUEST = 'follow-up-041';
export const FOLLOW_UP_RESPONSE = 'Please contact me about my follow-up.';
export const MAX_DELIVERY_ATTEMPTS = 3;
export const deliveryActions = ['send', 'lose-ack', 'retry', 'acknowledge'] as const;

export type DeliveryAction = (typeof deliveryActions)[number];
export type LabAction = DeliveryAction | 'reset-session';
export type Acknowledgement = 'not-sent' | 'awaiting' | 'lost' | 'received';

export type Candidate = {
  readonly revision: number;
  readonly deduplicate: boolean;
  readonly owner: string | null;
  readonly confirmation: string;
};
export type CandidatePatch = Partial<Omit<Candidate, 'revision'>>;
export type FollowUpTask = {
  readonly id: string;
  readonly requestId: typeof FOLLOW_UP_REQUEST;
  readonly patient: 'Patient 041';
  readonly response: typeof FOLLOW_UP_RESPONSE;
  readonly owner: string | null;
  readonly status: 'Awaiting review';
};
export type TraceEvent = {
  readonly action: DeliveryAction;
  readonly attempt: number;
  readonly tasks: number;
  readonly acknowledgement: Acknowledgement;
  readonly description: string;
};
export type LabSession = {
  readonly attempts: number;
  readonly acknowledgement: Acknowledgement;
  readonly tasks: readonly FollowUpTask[];
  readonly trace: readonly TraceEvent[];
};
export type CheckResult = {
  readonly id: string;
  readonly title: string;
  readonly passed: boolean;
  readonly expected: string;
  readonly observed: string;
  readonly actions: readonly DeliveryAction[];
};
export type ModelCheck = {
  readonly states: number;
  readonly transitions: number;
  readonly violations: number;
  readonly counterexample: { actions: readonly DeliveryAction[]; session: LabSession } | null;
  readonly scope: string;
};
export type Evidence = {
  readonly revision: number;
  readonly candidateKey: string;
  readonly passed: boolean;
  readonly checks: readonly CheckResult[];
};
export type VerificationEvidence = Evidence & { readonly model: ModelCheck };
export type WorkflowEvidence = Evidence & { readonly kind: 'scripted-workflow-check' };
export type RecoveryEvidence = Evidence & {
  readonly snapshot: string;
  readonly snapshotBytes: number;
  readonly restoredTasks: number;
};
export type PublishedRelease = {
  readonly revision: number;
  readonly candidate: Candidate;
  readonly session: LabSession;
  readonly verification: VerificationEvidence;
  readonly workflow: WorkflowEvidence;
  readonly recovery: RecoveryEvidence;
};
export type LabState = {
  readonly candidate: Candidate;
  readonly session: LabSession;
  readonly verification: VerificationEvidence | null;
  readonly workflow: WorkflowEvidence | null;
  readonly recovery: RecoveryEvidence | null;
  readonly published: PublishedRelease | null;
  readonly message: string;
};
export type RestoreResult =
  | { readonly ok: true; readonly candidate: Candidate; readonly session: LabSession }
  | { readonly ok: false; readonly error: string };

export const MODEL_SCOPE =
  'One synthetic request, up to three delivery attempts and four action types, executed one at a time. The model does not include a network, database, concurrent users or clinical decisions.';

const retryOnce: readonly DeliveryAction[] = ['send', 'lose-ack', 'retry', 'acknowledge'];
const retryTwice: readonly DeliveryAction[] = [
  'send',
  'lose-ack',
  'retry',
  'lose-ack',
  'retry',
  'acknowledge',
];

function initialSession(): LabSession {
  return { attempts: 0, acknowledgement: 'not-sent', tasks: [], trace: [] };
}

export function candidateKey(candidate: Candidate): string {
  return JSON.stringify([
    candidate.revision,
    candidate.deduplicate,
    candidate.owner,
    candidate.confirmation,
  ]);
}

function checkedCandidate(revision: number, patch: CandidatePatch): Candidate {
  if (!Number.isSafeInteger(revision) || revision < 1)
    throw new Error('Invalid candidate revision.');
  if (patch.deduplicate !== undefined && typeof patch.deduplicate !== 'boolean') {
    throw new Error('The duplicate-submission setting must be a boolean.');
  }
  if (patch.owner !== undefined && patch.owner !== null && typeof patch.owner !== 'string') {
    throw new Error('The task owner must be a team name or null.');
  }
  const owner = patch.owner?.trim() || null;
  if (owner !== null && owner.length > 80) throw new Error('The team name is too long.');
  const confirmation = patch.confirmation ?? 'Your follow-up has been received.';
  if (typeof confirmation !== 'string' || !confirmation.trim() || confirmation.length > 180) {
    throw new Error('The patient confirmation must contain 1–180 characters.');
  }
  return {
    revision,
    deduplicate: patch.deduplicate ?? false,
    owner,
    confirmation: confirmation.trim(),
  };
}

export function createLab(patch: CandidatePatch = {}): LabState {
  return {
    candidate: checkedCandidate(1, patch),
    session: initialSession(),
    verification: null,
    workflow: null,
    recovery: null,
    published: null,
    message: 'Send the fictional follow-up, then interrupt its confirmation.',
  };
}

function sessionData(session: LabSession) {
  return {
    attempts: session.attempts,
    acknowledgement: session.acknowledgement,
    tasks: session.tasks,
  };
}

function appendEvent(
  previous: LabSession,
  next: Omit<LabSession, 'trace'>,
  action: DeliveryAction,
  description: string
): LabSession {
  return {
    ...next,
    trace: [
      ...previous.trace,
      {
        action,
        attempt: next.attempts,
        tasks: next.tasks.length,
        acknowledgement: next.acknowledgement,
        description,
      },
    ],
  };
}

export function deliveryStep(
  session: LabSession,
  action: DeliveryAction,
  candidate: Candidate
): LabSession {
  if (action === 'send' || action === 'retry') {
    const allowed =
      action === 'send'
        ? session.acknowledgement === 'not-sent'
        : session.acknowledgement === 'lost' && session.attempts < MAX_DELIVERY_ATTEMPTS;
    if (!allowed) return session;
    const existing = session.tasks.some((task) => task.requestId === FOLLOW_UP_REQUEST);
    const reuse = candidate.deduplicate && existing;
    const tasks: readonly FollowUpTask[] = reuse
      ? session.tasks
      : [
          ...session.tasks,
          {
            id: `task-${session.tasks.length + 1}`,
            requestId: FOLLOW_UP_REQUEST,
            patient: 'Patient 041' as const,
            response: FOLLOW_UP_RESPONSE,
            owner: candidate.owner,
            status: 'Awaiting review' as const,
          },
        ];
    const description =
      action === 'send'
        ? 'The care-team task was saved. Its confirmation has not arrived yet.'
        : reuse
          ? 'The retry found the existing task. It did not create another one.'
          : 'The retry created another task for the same follow-up.';
    return appendEvent(
      session,
      {
        attempts: session.attempts + 1,
        acknowledgement: 'awaiting',
        tasks,
      },
      action,
      description
    );
  }
  if (action === 'lose-ack') {
    if (session.acknowledgement !== 'awaiting') return session;
    return appendEvent(
      session,
      {
        ...sessionData(session),
        acknowledgement: 'lost',
      },
      action,
      'The confirmation was lost. The saved task is still in the care-team inbox.'
    );
  }
  if (action === 'acknowledge') {
    if (session.acknowledgement !== 'awaiting') return session;
    return appendEvent(
      session,
      {
        ...sessionData(session),
        acknowledgement: 'received',
      },
      action,
      candidate.confirmation
    );
  }
  throw new Error(`Unknown delivery action: ${action}`);
}

export function runScenario(candidate: Candidate, actions: readonly DeliveryAction[]): LabSession {
  return actions.reduce(
    (session, action) => deliveryStep(session, action, candidate),
    initialSession()
  );
}

export function stepLab(state: LabState, action: LabAction): LabState {
  if (action === 'reset-session') {
    return {
      ...state,
      session: initialSession(),
      message: 'The example request is reset. Candidate settings and evidence are unchanged.',
    };
  }
  const session = deliveryStep(state.session, action, state.candidate);
  return {
    ...state,
    session,
    message:
      session === state.session
        ? state.session.attempts === MAX_DELIVERY_ATTEMPTS && action === 'retry'
          ? 'This bounded example allows three delivery attempts. Reset the request to try again.'
          : 'That action does not change the request in its current state.'
        : session.trace[session.trace.length - 1].description,
  };
}

export function editCandidate(state: LabState, patch: CandidatePatch): LabState {
  const proposed = checkedCandidate(state.candidate.revision, { ...state.candidate, ...patch });
  if (candidateKey(proposed) === candidateKey(state.candidate)) return state;
  const candidate = { ...proposed, revision: state.candidate.revision + 1 };
  if (!Number.isSafeInteger(candidate.revision)) throw new Error('Invalid candidate revision.');
  return {
    ...state,
    candidate,
    session: initialSession(),
    verification: null,
    workflow: null,
    recovery: null,
    message: `Candidate ${candidate.revision} needs fresh checks.${state.published ? ` Released version ${state.published.revision} is unchanged.` : ''}`,
  };
}

export function runModelCheck(candidate: Candidate): ModelCheck {
  const start = initialSession();
  const queue = [start];
  const seen = new Set([JSON.stringify(sessionData(start))]);
  let transitions = 0;
  let violations = 0;
  let counterexample: ModelCheck['counterexample'] = null;
  for (let cursor = 0; cursor < queue.length; cursor += 1) {
    const session = queue[cursor];
    if (session.tasks.length > 1) {
      violations += 1;
      counterexample ??= { actions: session.trace.map((entry) => entry.action), session };
    }
    for (const action of deliveryActions) {
      const next = deliveryStep(session, action, candidate);
      transitions += 1;
      const key = JSON.stringify(sessionData(next));
      if (!seen.has(key)) {
        seen.add(key);
        queue.push(next);
      }
    }
  }
  return { states: seen.size, transitions, violations, counterexample, scope: MODEL_SCOPE };
}

function check(
  id: string,
  title: string,
  actions: readonly DeliveryAction[],
  passed: boolean,
  expected: string,
  observed: string
): CheckResult {
  return { id, title, actions, passed, expected, observed };
}

function bindEvidence(candidate: Candidate, checks: readonly CheckResult[]): Evidence {
  return {
    revision: candidate.revision,
    candidateKey: candidateKey(candidate),
    passed: checks.every((result) => result.passed),
    checks,
  };
}

export function runVerification(state: LabState): LabState {
  const candidate = state.candidate;
  const ordinary = runScenario(candidate, ['send', 'acknowledge']);
  const interrupted = runScenario(candidate, ['send', 'lose-ack']);
  const once = runScenario(candidate, retryOnce);
  const twice = runScenario(candidate, retryTwice);
  const premature = runScenario(candidate, ['retry', 'lose-ack', 'acknowledge']);
  const checks = [
    check(
      'V-01',
      'A normal submission reaches the inbox',
      ['send', 'acknowledge'],
      ordinary.tasks.length === 1 && ordinary.acknowledgement === 'received',
      'One task and a received confirmation.',
      `Tasks: ${ordinary.tasks.length}; confirmation ${ordinary.acknowledgement}.`
    ),
    check(
      'V-02',
      'Losing confirmation does not remove saved work',
      ['send', 'lose-ack'],
      interrupted.tasks.length === 1 && interrupted.acknowledgement === 'lost',
      'One saved task while confirmation is lost.',
      `Tasks: ${interrupted.tasks.length}; confirmation ${interrupted.acknowledgement}.`
    ),
    check(
      'V-03',
      'A retry does not create another task',
      retryOnce,
      once.tasks.length === 1,
      'One logical task after two delivery attempts.',
      `Tasks: ${once.tasks.length}, after ${once.attempts} delivery attempts.`
    ),
    check(
      'V-04',
      'A second retry still uses the same task',
      retryTwice,
      twice.tasks.length === 1,
      'One logical task after three delivery attempts.',
      `Tasks: ${twice.tasks.length}, after ${twice.attempts} delivery attempts.`
    ),
    check(
      'V-05',
      'The task retains the original request identifier',
      retryOnce,
      once.tasks.every((task) => task.requestId === FOLLOW_UP_REQUEST) &&
        once.acknowledgement === 'received',
      `Every task keeps ${FOLLOW_UP_REQUEST} and confirmation is received.`,
      `${once.acknowledgement}; request ${once.tasks[0].requestId}.`
    ),
    check(
      'V-06',
      'An unsent request cannot be confirmed',
      ['retry', 'lose-ack', 'acknowledge'],
      premature.tasks.length === 0 && premature.acknowledgement === 'not-sent',
      'No task and no confirmation before submission.',
      `Tasks: ${premature.tasks.length}; confirmation ${premature.acknowledgement}.`
    ),
  ];
  const model = runModelCheck(candidate);
  const verification = {
    ...bindEvidence(candidate, checks),
    model,
    passed: checks.every((result) => result.passed) && model.violations === 0,
  };
  return {
    ...state,
    verification,
    session: once,
    message: verification.passed
      ? `Candidate ${candidate.revision} passed ${checks.length} implementation checks and the bounded duplicate-task property.`
      : `Candidate ${candidate.revision} failed ${checks.filter((result) => !result.passed).length} implementation checks. Retrying created duplicate work.`,
  };
}

export function validateWorkflow(state: LabState): LabState {
  const session = runScenario(state.candidate, retryOnce);
  const owned = session.tasks.length > 0 && session.tasks.every((task) => Boolean(task.owner));
  const checks = [
    check(
      'W-01',
      'Someone owns the follow-up task',
      retryOnce,
      owned,
      'Every received task names a responsible team.',
      owned
        ? `Assigned to ${state.candidate.owner}.`
        : 'The task arrived without a responsible team.'
    ),
    check(
      'W-02',
      'The inbox contains one task for this follow-up',
      retryOnce,
      session.tasks.length === 1,
      'One follow-up creates one item to review.',
      `Inbox items for this follow-up: ${session.tasks.length}.`
    ),
    check(
      'W-03',
      'The patient receives confirmation after the retry',
      retryOnce,
      session.acknowledgement === 'received',
      'A received confirmation after retry.',
      state.candidate.confirmation
    ),
  ];
  const workflow: WorkflowEvidence = {
    ...bindEvidence(state.candidate, checks),
    kind: 'scripted-workflow-check',
  };
  return {
    ...state,
    session,
    workflow,
    message: workflow.passed
      ? 'The example acceptance rules passed. A real team still needs to validate the intended workflow.'
      : 'The task reaches the inbox, but the example workflow still needs attention.',
  };
}

export function createCheckpoint(state: Pick<LabState, 'candidate' | 'session'>): string {
  return JSON.stringify({
    schema: 'wayrest.follow-up.snapshot',
    version: 1,
    candidate: state.candidate,
    actions: state.session.trace.map((entry) => entry.action),
    expected: sessionData(state.session),
  });
}

function object(value: unknown): value is Record<string, unknown> {
  return value !== null && typeof value === 'object' && !Array.isArray(value);
}

export function restoreCheckpoint(
  serialized: string,
  expectedCandidate?: Candidate
): RestoreResult {
  if (typeof serialized !== 'string' || serialized.length > 32_768) {
    return { ok: false, error: 'The snapshot is missing or exceeds the example size limit.' };
  }
  try {
    const data: unknown = JSON.parse(serialized);
    if (
      !object(data) ||
      data.schema !== 'wayrest.follow-up.snapshot' ||
      data.version !== 1 ||
      !object(data.candidate)
    ) {
      return { ok: false, error: 'The snapshot format is not supported.' };
    }
    const raw = data.candidate;
    if (
      typeof raw.revision !== 'number' ||
      typeof raw.deduplicate !== 'boolean' ||
      (raw.owner !== null && typeof raw.owner !== 'string') ||
      typeof raw.confirmation !== 'string'
    ) {
      return { ok: false, error: 'The snapshot candidate is incomplete.' };
    }
    const candidate = checkedCandidate(raw.revision, {
      deduplicate: raw.deduplicate,
      owner: raw.owner,
      confirmation: raw.confirmation,
    });
    if (expectedCandidate && candidateKey(candidate) !== candidateKey(expectedCandidate)) {
      return { ok: false, error: 'The snapshot belongs to a different candidate.' };
    }
    if (
      !Array.isArray(data.actions) ||
      data.actions.length > 16 ||
      !data.actions.every((action) => deliveryActions.includes(action))
    ) {
      return { ok: false, error: 'The snapshot action record is invalid.' };
    }
    const session = runScenario(candidate, data.actions);
    if (JSON.stringify(data.expected) !== JSON.stringify(sessionData(session))) {
      return { ok: false, error: 'The saved task data does not match the recorded actions.' };
    }
    return { ok: true, candidate, session };
  } catch {
    return { ok: false, error: 'The snapshot could not be read.' };
  }
}

export function runRecovery(state: LabState): LabState {
  const interrupted = runScenario(state.candidate, ['send', 'lose-ack']);
  const snapshot = createCheckpoint({ candidate: state.candidate, session: interrupted });
  const restored = restoreCheckpoint(snapshot, state.candidate);
  const restoredSession = restored.ok ? restored.session : initialSession();
  const resumed = ['retry', 'acknowledge'].reduce(
    (session, action) => deliveryStep(session, action as DeliveryAction, state.candidate),
    restoredSession
  );
  const checks = [
    check(
      'R-01',
      'The JSON snapshot restores the recorded state',
      ['send', 'lose-ack'],
      restored.ok &&
        JSON.stringify(sessionData(restoredSession)) === JSON.stringify(sessionData(interrupted)),
      'The restored task and pending confirmation match the snapshot.',
      restored.ok
        ? `Tasks restored: ${restoredSession.tasks.length}; confirmation ${restoredSession.acknowledgement}.`
        : restored.error
    ),
    check(
      'R-02',
      'The restored task retains the response, owner and request',
      ['send', 'lose-ack'],
      restoredSession.tasks.length === 1 &&
        restoredSession.tasks[0].owner === state.candidate.owner &&
        restoredSession.tasks[0].requestId === FOLLOW_UP_REQUEST &&
        restoredSession.tasks[0].response === FOLLOW_UP_RESPONSE,
      'The saved response, owner and request identifier survive restore.',
      restoredSession.tasks.length
        ? `${restoredSession.tasks[0].requestId}; response “${restoredSession.tasks[0].response}”; owner ${restoredSession.tasks[0].owner ?? 'unassigned'}.`
        : 'No task restored.'
    ),
    check(
      'R-03',
      'Retrying after restore does not duplicate work',
      retryOnce,
      resumed.tasks.length === 1 && resumed.acknowledgement === 'received',
      'One task and a received confirmation after restore and retry.',
      `Tasks: ${resumed.tasks.length}; confirmation ${resumed.acknowledgement}.`
    ),
  ];
  const recovery: RecoveryEvidence = {
    ...bindEvidence(state.candidate, checks),
    snapshot,
    snapshotBytes: new TextEncoder().encode(snapshot).length,
    restoredTasks: restoredSession.tasks.length,
  };
  return {
    ...state,
    recovery,
    session: resumed,
    message: recovery.passed
      ? 'The example snapshot restored one task, retained its owner and accepted a retry without duplication.'
      : 'The snapshot was restored, but the resumed request did not meet all recovery checks.',
  };
}

export function canRelease(state: LabState): { allowed: boolean; reasons: string[] } {
  const reasons: string[] = [];
  const required: [string, Evidence | null][] = [
    ['implementation checks', state.verification],
    ['example workflow checks', state.workflow],
    ['snapshot recovery checks', state.recovery],
  ];
  for (const [name, evidence] of required) {
    if (
      !evidence ||
      evidence.revision !== state.candidate.revision ||
      evidence.candidateKey !== candidateKey(state.candidate)
    ) {
      reasons.push(`Run the ${name} for candidate ${state.candidate.revision}.`);
    } else if (!evidence.passed) {
      reasons.push(`Resolve the failed ${name}.`);
    }
  }
  return { allowed: reasons.length === 0, reasons };
}

export function releaseCandidate(state: LabState): LabState {
  const decision = canRelease(state);
  if (!decision.allowed || !state.verification || !state.workflow || !state.recovery) {
    return { ...state, message: `The simulated release is held. ${decision.reasons.join(' ')}` };
  }
  const published: PublishedRelease = JSON.parse(
    JSON.stringify({
      revision: state.candidate.revision,
      candidate: state.candidate,
      session: runScenario(state.candidate, ['send', 'acknowledge']),
      verification: state.verification,
      workflow: state.workflow,
      recovery: state.recovery,
    })
  );
  return {
    ...state,
    published,
    message: `Version ${published.revision} is now in the example’s released view. Your next change starts a separate candidate.`,
  };
}

A product’s purpose changes the regulatory questions.

A health product needs an intended-purpose assessment before its regulatory pathway can be identified. Compare these proposed functions. The questions change even though each could appear in a similar interface.

What would the feature do?

Describe the whole intended use.

Does it only communicate information, or does it interpret the response, prioritise a clinical risk or make a medical claim? Assess the actual functions, users and claims against the relevant TGA definitions and exclusions.

Check every criterion for the specific CDSS exemption.

Current TGA guidance requires all five: recommendations to health professionals for the specified purposes; restrictions on medical-device images and signals; preservation of professional judgement; no clinical diagnosis or treatment decision by the software; and displayed logic that professionals can readily interpret and verify in context.

A clinician reviewing an output does not settle its status.

Software intended to make a clinical diagnosis or treatment decision does not meet that CDSS exemption criterion. The intended purpose, functions and consequences still need assessment to determine the applicable pathway and classification.

First establish whether the intended purpose makes the software a medical device and whether an exclusion applies. Excluded software is outside TGA regulation. The clinical decision-support exemption removes the requirement for inclusion in the Australian Register of Therapeutic Goods (ARTG), while other regulatory obligations remain. TGA: clinical decision-support regulation

Software evidence also has limits. IMDRF distinguishes clinical association, analytical or technical validation, and clinical validation. A passing software check cannot establish the whole clinical evidence case. IMDRF: clinical evaluation of software as a medical device

This comparison identifies assessment questions; it does not assign a class or permission to supply. Sources checked 21 November 2026. TGA guidance also covers verification, validation and change management throughout the software lifecycle.

A useful release leaves the team able to continue.

In the corrected example, the patient’s response becomes one task for the assigned team. The example connects that result to a visible defect, relevant checks, workflow questions and recovery. Each answers a different question about the proposed release.

For your next release

  1. Choose a complete user task and describe the result people need.
  2. Identify the important failures, then test them against the implementation.
  3. Review the workflow with intended users and resolve the applicable clinical and regulatory questions.
  4. Record the release decision, rehearse recovery and agree how the next change will be made.

What needs to work in your next release?

We help people turn an existing prototype or software product into something customers can actually use, with a clear plan and someone responsible for delivery.

We build the way you’ll keep improving and shipping it, so your team can make the next release with confidence.

Bring the prototype and one workflow you want people to use.

Discuss your software Software engineering for health products