Stage 6 — DISPATCH
What happens
Dispatch runs asynchronously after the FHIR write succeeds. Three things happen concurrently:
- FHIR subscription fan-out —
SubscriptionEventDispatcherevaluates 17 seeded subscriptions - JamConnect POST_WRITE — clinical intelligence event routing
- DHIS2 push — for notifiable disease LOINC codes (optional)
FHIR subscriptions
JamBridge ships with 17 seeded FHIR subscriptions that cover common hospital chain scenarios:
| # | Criteria | Channel | Purpose |
|---|---|---|---|
| 1–3 | Patient? | MLLP to other branches | Cross-branch patient sync |
| 4–6 | Encounter? | FHIR REST | Encounter propagation |
| 7–9 | Observation?code=CBC | FHIR REST | Critical lab result routing |
| 10–12 | MedicationRequest? | FHIR REST | Pharmacy notification |
| 13–14 | DiagnosticReport? | SMS | CHW alerts |
| 15–17 | Condition? | FHIR REST | Disease surveillance |
Custom subscriptions can be added via the JamBridge admin API.
JamConnect POST_WRITE
After every successful FHIR write, JamBridge fires a POST_WRITE event to JamConnect:
POST /jamconnect/events
Host: jamconnect:8091
{
"eventType": "POST_WRITE",
"resourceType": "Patient",
"patientGoldenId": "GOLDEN-00441",
"facilityCode": "BRANCH-01",
"transactionId": "BR01-26060612-001"
}
JamConnect evaluates its rule engine (5 rules per event in virtual threads):
- IPS cache invalidation in JamSHR
- CDS Hooks dispatch to clinician portals
- Critical value alerts to clinical staff
- Escalation timer start
- DHIS2 surveillance triggers
DHIS2 surveillance
When an ORU message contains a notifiable LOINC code (dengue, malaria, TB, cholera), JamBridge pushes a data value to DHIS2:
POST /api/dataValueSets
Host: dhis2
{
"dataValues": [{
"dataElement": "DE_DENGUE_NS1",
"period": "20260612",
"orgUnit": "OU_BRANCH_01",
"value": "positive"
}]
}
This is non-blocking — a DHIS2 failure does not affect the pipeline or the ACK.