System Design Atlas

Social care case coordination across organisations

10 / 10Worked example

Final design

Which evidence protects withdrawal when receipt is unknown, through to terminal closure?

The conclusion retains the full topology from step 6. Inside the boundary: interface → coordination API → support plan revisions, permissions and receipt evidence; handover processing reads durable work from this store. The partner organisation is external. Processing exchanges domain messages; results reach the interface through the API. The evidence plan tests concurrency, retries, boundaries and terminal closure for support plan H-29. Table entries are expected outcomes, not executed tests. Permission, receipt and investigation/deletion tasks are separate authoritative records in the same store. Store empfang_unbekannt before releasing bytes; partner acknowledgements and handling evidence return through handover processing. Withdrawal blocks new retrievals while investigation is open.

Starting point Permissions follow the case and approved extract.

Assumptions for the example case

Own fictitious example design. A fictitious voluntary exchange of a specific section of the aid plan between two organisations. A release granted for 3600 seconds in the example is only valid for age < 3600 seconds. All figures and test goals are illustrative assumptions.

Overall architecture with checks and review loops

Runtime topology · External entities, processes and datastores

  1. 1 · Supported person → Coordination API
  2. 2 · Coordination API → Protected master plan
  3. 3 · Protected full plan → Permission check
  4. 4 · Permission check → Handover store
  5. 5 · Handover store → Handover processing
  6. 6 · Handover processing → Partner organization
Partner organisationReceive extract and send evidence
Supported personView permission status and withdraw permission

Leading case coordination

Coordination APIManage full plan, permission and investigation
Protected master planAuthoritative relational datastore
Authorisation checkExamine purpose, recipient, age and revocation
Handover storeU-29, receipt and investigation/deletion task
Handover processingProvide bytes and accept receipts
Supported person → Coordination APIGrant or withdraw permission
Coordination API → Protected master planWrite permission synchronously
Protected master plan → Authorisation checkCurrent permission version
Authorisation check → Handover storeCommit U-29 as empfang_unbekannt
Handover store → Handover processingProvide only after committing
Handover processing → Partner organisationRelease extract bytes
Partner organisation → Handover processingReceipt or deletion document
Handover processing → Handover storeStore evidence with deduplication
Coordination API → Handover storeOpen investigation/deletion task after withdrawal
Concurrency / Replay4 · 5 · 7
BoundaryRelease is valid for age < 3,600 s · 2

Every new partner access requires current permission for the specified purpose and recipient.

The lead organisation’s coordination API stores the full plan in a protected relational datastore. A separate permission-check path produces a minimal versioned extract. Handover processing supplies it to the partner and receives acknowledgement. Partner access always checks current permission and never exposes the full plan. The supported person and case coordinator see permission status; withdrawal updates the same authoritative store synchronously. Already received copies are outside this access boundary. The same components and arrows as step 6. Test markers: API/commit → concurrency and replay (4/5/7); boundary check → exact limit (2); domain role/closure → terminal evidence (9). The disclosure path commits empfang_unbekannt before bytes; partner acknowledgement and investigation/deletion evidence return to the API. Withdrawal remains independently effective.

Test plan for the complete design

ComponentTest and expected resultReturn to an earlier step
Coordination APIDisclosure and withdrawal both expect version 3. Withdrawal first blocks disclosure without releasing data. Disclosure commit first stores empfang_unbekannt before transmitting bytes. Subsequent withdrawal blocks new retrievals and opens klärfall even without partner acknowledgement: a copy may already exist. A later acknowledgement supplements the evidence but reactivates no permission.Steps 3 and 5
Command journalIdentical retries take effect once; changed content produces a conflict.Steps 4 and 7
Domain boundary checkCheck values 3599, 3600 and 3601 seconds. Oracle: A release given for 3600 seconds in the example is only valid for age < 3600 seconds.Step 2
Support plan revisions, sharing permissions and receipt evidenceWiderrufen is terminal only when disclosure has not started. After possible or confirmed receipt, klärfall stays open until case coordination confirms the actual outcome and data protection officers confirm the agreed handling. Required deletion needs authenticated partner evidence; explicitly agreed further retention needs its own documented scope and completion. Old replay results permit no new retrieval. Late conflicting evidence after abgeschlossen creates a linked investigation.Steps 5 and 9
Handover processingAt the disclosure commit, the API checks permission and version and stores U-29 as empfang_unbekannt before transmitting extract bytes. The partner may receive content while its acknowledgement is lost. Withdrawal blocks access and moves U-29 to klärfall. Handover processing queries the same receipt reference instead of sending data again. A later acknowledgement records existing copies; case coordination and data protection officers follow up the agreed handling until it is evidenced.Steps 6 and 7

Coordination API

Test and expected result
Disclosure and withdrawal both expect version 3. Withdrawal first blocks disclosure without releasing data. Disclosure commit first stores empfang_unbekannt before transmitting bytes. Subsequent withdrawal blocks new retrievals and opens klärfall even without partner acknowledgement: a copy may already exist. A later acknowledgement supplements the evidence but reactivates no permission.
Return to an earlier step
Steps 3 and 5

Command journal

Test and expected result
Identical retries take effect once; changed content produces a conflict.
Return to an earlier step
Steps 4 and 7

Domain boundary check

Test and expected result
Check values 3599, 3600 and 3601 seconds. Oracle: A release given for 3600 seconds in the example is only valid for age < 3600 seconds.
Return to an earlier step
Step 2

Support plan revisions, sharing permissions and receipt evidence

Test and expected result
Widerrufen is terminal only when disclosure has not started. After possible or confirmed receipt, klärfall stays open until case coordination confirms the actual outcome and data protection officers confirm the agreed handling. Required deletion needs authenticated partner evidence; explicitly agreed further retention needs its own documented scope and completion. Old replay results permit no new retrieval. Late conflicting evidence after abgeschlossen creates a linked investigation.
Return to an earlier step
Steps 5 and 9

Handover processing

Test and expected result
At the disclosure commit, the API checks permission and version and stores U-29 as empfang_unbekannt before transmitting extract bytes. The partner may receive content while its acknowledgement is lost. Withdrawal blocks access and moves U-29 to klärfall. Handover processing queries the same receipt reference instead of sending data again. A later acknowledgement records existing copies; case coordination and data protection officers follow up the agreed handling until it is evidenced.
Return to an earlier step
Steps 6 and 7

First end-to-end test and outstanding evidence

End-to-end path
Test handover against withdrawal end to end. At the disclosure commit, the API checks permission and version and stores U-29 as empfang_unbekannt before transmitting extract bytes. The partner may receive content while its acknowledgement is lost. Withdrawal blocks access and moves U-29 to klärfall. Handover processing queries the same receipt reference instead of sending data again. A later acknowledgement records existing copies; case coordination and data protection officers follow up the agreed handling until it is evidenced.
Clarify before extending the scope
Agree the real partner contract, retention, recovery targets and roles before extending the scope. All limits here are design assumptions. This evidence table specifies tests to run; integration, browser checks and reader comprehension tests follow separately.

Test handover against withdrawal end to end

Test handover against withdrawal end to end

Test handover against withdrawal end to end.

An approved support plan extract is about to be shared when the supported person withdraws permission. Closure requires both technical and domain evidence.

Disclosure and withdrawal both expect version 3. Withdrawal first blocks disclosure without releasing data. Disclosure commit first stores empfang_unbekannt before transmitting bytes. Subsequent withdrawal blocks new retrievals and opens klärfall even without partner acknowledgement: a copy may already exist. A later acknowledgement supplements the evidence but reactivates no permission. Your test defines the input and expected result.

Alternative considered
An initial end-to-end path limited to lists and forms postpones the critical state checks.
Trade-off
The first end-to-end path needs controlled concurrency and failure points.
Reassess
Passing the counterexample tests and checks with readers provides grounds for extending the case.

Try it yourself

Define two tests with expected outcomes and steps to revisit: withdrawal racing with first-byte release, and lost acknowledgement followed by deletion evidence.

A hint for your attempt

Link the markers of the overall architecture with the associated design steps.

Compare with a possible solution
First test part
Withdrawal first: no released bytes. Disclosure first: empfang_unbekannt, then blocked access and an investigation after withdrawal. Failures lead back to steps 4/5.
Test completion and retries
Start: the approved extract was disclosed, its acknowledgement is missing and handover is empfang_unbekannt. Withdraw permission, deliver the same authenticated acknowledgement twice, then attempt closure without required deletion evidence. Expected: retrieval stays blocked, exactly one receipt record, an open investigation and a closure conflict. Then record matching deletion evidence and confirmations from case coordination and data protection officers: exactly one terminal closure; replay permits no content retrieval. Failures lead back to step 9 for ownership and step 7 for the failure sequence.

Apply to your project

Which two counterexample tests will you run first in your own end-to-end implementation?

Transfer the architecture and counterexamples to the editable Markdown design template.

Start your own design

Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.

Download design template (.md)
Compare the ten tasks with the example case
  1. Purpose and boundary

    Which evidence about a support plan would originate outside the application in your own project?

    In the example: Share a support plan extract for a defined purpose. A fictional voluntary exchange of a specific support plan extract between two organisations.

  2. Requirements

    Which rule of your project remains binding even with slow processing?

    In the example: Permission applies to the recipient and the current access. Permission granted for 3600 seconds in this example is valid only at age < 3600 seconds.

  3. Scale estimates

    Which individual object concentrates load more strongly than the daily average in support coordination?

    In the example: Concurrent withdrawal determines the critical load test. An average of 0.05 events/s says little about simultaneous handover and withdrawal of permission for a support plan.

  4. Interfaces

    Which input fields make two change intentions different in your project?

    In the example: Handover binds the exact extract hash. The support plan revision, extract hash, recipient, purpose and permission reference must remain identical on replay.

  5. Data and states

    Which states must remain protected in your model against late replay?

    In the example: Check current permission before each new retrieval of content. The atomic boundary precedes the start of disclosure; a later withdrawal cannot reliably recover transfers already started or copies already received. Therefore, every started disclosure remains empfang_unbekannt until the matching acknowledgement. Withdrawal in empfang_unbekannt or übergeben always opens an investigation/deletion task with outstanding evidence. A missing ACK or timeout does not prove non-receipt.

  6. Overall architecture

    Which planned service boundary would distribute a currently local guarantee across the network?

    In the example: The partner boundary has its own delivery contract. Support plan revisions, sharing permissions and receipt evidence must express the same valid state.

  7. Critical flow

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

    In the example: Check withdrawal before every new disclosure. Every new external read permission requires currently valid authorisation bound to the purpose and recipient; existing receipt evidence remains traceable.

  8. Bottlenecks and trade-offs

    Which similar display could have two different causes in your project?

    In the example: Human acceptance remains a separate waiting state. Long handover times may reflect absent human acceptance or technical delivery failures. Receipt status and processing status are displayed separately.

  9. Operations and security

    Which open state in your project needs a domain specialist as well as technical operations?

    In the example: Permissions follow the case and approved extract. Widerrufen is terminal only when disclosure has not started. After possible or confirmed receipt, klärfall remains open until case coordination confirms the actual outcome and privacy officers confirm the agreed handling. Required deletion needs authenticated evidence from the partner; explicitly agreed further retention needs its own documented scope and completion. Old replay results do not permit renewed content retrieval. Late conflicting evidence after abgeschlossen creates a linked investigation case.

  10. Final design

    Which two counterexample tests will you run first in your own end-to-end implementation?

    In the example: Test handover against withdrawal end to end. Disclosure and withdrawal both expect version 3. Withdrawal first blocks disclosure without releasing data. Disclosure commit first stores empfang_unbekannt before transmitting the first bytes. Subsequent withdrawal blocks new retrievals and opens klärfall even without partner acknowledgement: a copy may already exist. A later acknowledgement supplements the evidence but reactivates no permission.