Skip to main content

JamReferral

v1.0 · Spring Boot · Apache 2.0 · Port 8093

JamReferral manages cross-branch referrals using a FHIR ServiceRequest (the clinical order) + Task (the workflow tracker) state machine.

States

DRAFT ──► SENT ──► ACCEPTED ──► IN_PROGRESS ──► COMPLETED

DECLINED

Creating a referral

POST /fhir/ServiceRequest
Host: jamreferral:8093

{
"resourceType": "ServiceRequest",
"status": "active",
"intent": "referral",
"code": {"coding": [{"system": "http://snomed.info/sct", "code": "306206005", "display": "Referral to cardiology"}]},
"subject": {"reference": "Patient/GOLDEN-00441"},
"requester": {"reference": "Organization/org-br01-001"},
"performer": [{"reference": "Organization/org-br05-cardio"}]
}

JamReferral creates a linked Task in requested status and notifies the receiving facility.

Accept timeout

If the receiving facility does not accept within 48 hours (configurable), the Task status changes to on-hold and JamConnect fires an escalation alert. After 72 hours, the referral is automatically returned to DRAFT for re-routing.

Before dispatching the referral notification to the receiving facility, JamReferral checks consent:

  • Actor: receiving Organization
  • Resource: ServiceRequest
  • Purpose: TREAT

If consent is denied, the referral cannot be sent to that facility.