How to explain the hot path
“A new message or lab should update the patient in seconds. EventBridge routes it, SQS absorbs bursts, deterministic workers normalize it, PostgreSQL commits the state and an outbox reliably notifies Temporal.”
- 01
Validate intake
Verify source, tenant, schema and access policy.
- 02
Resolve patient
Match identity; quarantine uncertain or conflicting matches.
- 03
Deduplicate
Use event ID, source version and content hashes for idempotency.
- 04
Route by type
Structured facts use deterministic parsers; documents use text extraction or OCR.
- 05
Normalize & validate
Map units and terminology while preserving confidence and provenance.
- 06
Update patient state
Write the current operational projection to PostgreSQL transactionally.
- 07
Publish change
An outbox emits PatientStateChanged and starts or signals Temporal.