System Design Atlas

Clinical studies with consent and visits

07 / 10Worked example

Critical flow

What proof remains for study participation after the lost result, and what may happen afterwards?

Now the architecture is tested at its critical failure point. Data collection and withdrawal compete on the same participation record. The commit point sets the local order. A capture result lost after commit is read from the command journal; a withdrawal is neither deleted nor backdated.

Starting point Personally identifying data stays outside the study API.

Assumptions for the example case

Own fictitious example design. Fictitious documentation of an observational study with a pseudonymized participant, a visit and a versioned protocol. The example visit window covers seconds from the planned start: 0 inclusive to 86400 exclusive. All figures and test goals are illustrative assumptions.

Critical flow with commit and failure point

Critical flow · Commit, failure point and replay

Visit and withdrawal both expect version 4. The commit determines their order.

Study team
Study API
Relational participation state
Study interface
  1. 01 Study team → Study APICapture V-25 with version 4
  2. 02 Study API → Relational participation stateCheck active participation P-25 and commit V-25
  3. 03 Relational participation state → Study APICommit as version 5
  4. 04 Study API · Local processingResponse to study surface is lost
  5. 05 Study team → Study APIRevocation with old version 4
  6. 06 Study API → Study teamVersion Conflict · Re-read
  7. 07 Study team → Study APIRevocation with version 5
  8. 08 Study API → Relational participation stateCommit withdrawal · block new data collection
  9. 09 Study interface → Study APIRe-request V-25 with the same key
  10. 10 Study API → Study interfaceDeliver a stored V-25 receipt

Result: The accepted visit remains documented; withdrawal blocks all subsequent new data collection.

New collection requires active participation of the same protocol version when committing.

Data collection and withdrawal compete on the same participation record. The commit point sets the local order. A capture result lost after commit is read from the command journal; a withdrawal is neither deleted nor backdated.

Ordering and failure outcomes

Required order
Data collection and withdrawal compete on the same participation record. The commit point sets the local order. A capture result lost after commit is read from the command journal; a withdrawal is neither deleted nor backdated.
Crash before commit
For study participation T-25 there is still no new permanent proof. The same command may be re-examined; unconfirmed intermediate work does not give a business guarantee.
Crash after commit, before response
The command journal entry records the original result. Identical replay returns that evidence; a fresh view of the current state comes from the read contract.
External uncertainty
A lack of feedback from the protocol archive remains unknown. Confirmed acceptance, definite rejection and lack of proof are given distinct states; the responsible role clarifies using the same reference.

Order withdrawal and visit updates on the same record

Order withdrawal and visit updates on the same record

Order withdrawal and visit updates on the same record.

Data collection and withdrawal compete on the same participation record. The commit point sets the local order. A capture result lost after commit is read from the command journal; a withdrawal is neither deleted nor backdated.

New study data collection requires active participation for the same protocol version at the atomic acceptance point; withdrawal ends permission for new collection. The exercise specifies the input and expected result.

Alternative considered
Submitting a new request after a response is lost can execute the same business operation again.
Trade-off
Open evidence from the protocol archive requires a work list.
Reassess
Frequent unresolved outcomes require a more reliable contract for external reconciliation.

Try it yourself

Mark the commit point, failure point and next permitted action. Explain the effect of an identical retry.

A hint for your attempt

Trace the same request through the datastore and response path.

Compare with a possible solution
Flow and failure
Data collection and withdrawal compete on the same participation record. The commit point sets the local order. A capture result lost after commit is read from the command journal; a withdrawal is neither deleted nor backdated.
Commit and replay
The domain change and command result are stored together before response. Loss of response after commit leads to reading this result. For study participation T-25, this does not have a second effect.

Apply to your project

What feedback could be missing even though the underlying action has already taken place?

Next, checklists show missing origins instead of estimating them.