The overall architecture
How are the responsibility for medication order and external processing divided between modules and processes?
The local consistency rule determines the medication documentation API boundary. Reconciliation processing runs separately for deferred work. The modules prescription status, verification record, dispensing record, documentation completion structure responsibility within the API; they are not individually operated services. The clinical master system sends assigned prescription revisions to reconciliation processing. The medication documentation API checks roles and maintains orders, verification evidence and dispensing records in a relational datastore. Prescribers, verifiers, dispensers and documenting professionals have separate interface actions. Feedback goes to the master system after local storage. The diagram shows documentation flows and provides no control path to dosing devices or treatment calculations.
Starting point The actual action retains its own evidence.
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.
Runtime components and datastores
Runtime topology · processes, data stores and external systems
Medication documentation
The map shows documentation flows and separate specialist roles; it leads neither to dosing devices nor to therapy calculation.
Domain responsibilities within the API
Interior view · Medication documentation API
Process framework · Medication documentation API
These modules organize responsibilities within the API process and share its server boundary.
Map responsibilities to runtime components
| Domain task | Runtime | Responsibility |
|---|---|---|
| Prescription state | Medication documentation API | Maintains prescription content for which the prescriber is clinically responsible. |
| Verification record | Medication documentation API | Binds verification evidence to the exact prescription revision. |
| Dispensing record | Medication documentation API | Records evidenced dispensing against the specific revision. |
| Documentation closure | Medication documentation API | Links the actual action or omission to completion. |
| Reconciliation processing | Separate background process | Processes stored work and external feedback. |
| Clinical master system | External boundary | Provides or confirms the evidence agreed for this case. |
Prescription state
- Runtime
- Medication documentation API
- Responsibility
- Maintains prescription content for which the prescriber is clinically responsible.
Verification record
- Runtime
- Medication documentation API
- Responsibility
- Binds verification evidence to the exact prescription revision.
Dispensing record
- Runtime
- Medication documentation API
- Responsibility
- Records evidenced dispensing against the specific revision.
Documentation closure
- Runtime
- Medication documentation API
- Responsibility
- Links the actual action or omission to completion.
Reconciliation processing
- Runtime
- Separate background process
- Responsibility
- Processes stored work and external feedback.
Clinical master system
- Runtime
- External boundary
- Responsibility
- Provides or confirms the evidence agreed for this case.
Reconciliation runs outside the local verification transaction
Reconciliation runs outside the local verification transaction.
Dispensing and documentation reference the exact approved prescription revision; a new revision invalidates the old local dispensing approval.
Prescription revisions, check records, dispensing events, and documentation must represent the same valid state. Your exercise identifies the input and expected result.
- Alternative considered
- A separate service for each module distributes the promise “dispensing and documentation reference exactly the approved prescription revision; a new revision devalues the old local dispensing approval.” to additional network boundaries.
- Trade-off
- Common schema changes require coordinated releases.
- Reassess
- Significantly deviating burden of reconciliation processing or independent responsibility justifies a runtime boundary.
Try it yourself
Assign prescription status, reconciliation processing and clinical master system to the types module, process and external system. Justify the authoritative datastore.
A hint for your attempt
A domain responsibility becomes a process only when it has its own execution unit.
Compare with a possible solution
- Boundaries
- Prescription status is a module in Medication Documentation API; reconciliation processing is its own process; Clinical master system lies outside.
- Storage
- Prescription revisions, verification records, dispensing events and documentation holds the authoritative evidence. Dispensing and documentation reference the exact approved prescription revision; a new revision invalidates the old local dispensing approval. The joint transaction protects this connection; external responses remain separate evidence.
Apply to your project
Which planned service boundary would distribute a currently local guarantee across the network?