Skip to main content

Outreach Referral Events

Outreach Referral Events (technical design)

This is a technical design document for Outreach Referral (OR) events. The target audiences are those working on OR task events publisher (FHIR Task Service), Placer and Filler service applications, and NEMS implementation of these task events.


Background

The Outreach Referral FHIR Task Service will be the central integration point to connect different services utilising the outreach capability by Whaihua. Together with the support of NEMS on task events, the FHIR workflow pattern H will be implemented to support the communications between the task placers and task fillers, see Outreach Referral FHIR Task Solution Architecture Document.


Process View

Outreach Referral solution is based on the events triggered by the state changes of the outreach referral requests. These events will be routed to the interested parties to enable the system to react on the request state changes and initiate the adequate downstream process.

ServiceRequest state diagram:

@startuml
active : The request is in force and ready to be acted upon.
onHold : The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.
revoked : The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions. No further activity should occur.
completed : The activity described by the request has been fully performed. No further activity will occur.
[*] --> active : created
active --> active : claimed
active --> onHold : paused
active --> revoked : revoked
active --> active : updated
active --> completed: complete
onHold --> active : resumed
onHold --> revoked : revoked
onHold --> onHold : updated
revoked --> [*]
completed --> [*]
@enduml

Topic Taxonomy

For outreach referral task events, the topic taxonomy structure follows the overall topic taxonomy structure:

careadmin/servicerequest/outreachreferral/{verb}/v1/{code}/{actioned-by}/{request-status}

Table:

#Event Topic FieldField TypeValueDescription
1service-domainRootcareadmin“careadmin” is the service domain of outreach referral request events
2resourceRootservicerequestAligned with FHIR ServiceRequest resource
3event categoryRootoutreachreferralEvent category (outreach referral)
4verb (past tense)Root[created, claimed, updated, paused, resumed, revoked, completed]Event action, one of the values
5versionRootv1Starting version
6codeEvent PropertyString value of intent code (e.g., “CervicalScreening”, “Immunization”, “BreastScreening”)Specifies the intent subject type. FHIR ValueSet
7actioned-byEvent PropertyString value of service/system which caused the event action (e.g., “whaihua”, “csr”, “bsa”)The service/system took the action and caused this event.
8service-request-statusEvent PropertyString value of the current status of the service request (e.g., “active”, “on-hold”, “completed”, “revoked”)The status of the service request after the action.

Message Header (Event Metadata)

HeaderKey LiteralDescriptionRequiredFormat/ValuesExample
IDsolace-user-property-idMessage id, unique for each publisherGUID correlation ID987298dd-c484-462f-a15d-f18a97267959
Sourcesolace-user-property-sourcePublisher URI reference- UAT
- Prod
Timesolace-user-property-timeUTC time when the message is publishedYYYY-MM-DDTHH:MM:SS2024-11-30T18:54:43Z
Spec VersionversionVersion of the CloudEvents specOptional{major}.{minor}1.0
Typesolace-user-property-typeSubstring of the topic taxonomy{root}/{version}careadmin/servicerequest/outreachreferral/created/v1
Subjectsolace-user-property-subjectServiceRequest Idservicerequest idservicerequest id
Content typecontent-type / solace-user-property-datacontenttypeContent type of event dataapplication/jsonapplication/json

Message Payload

ServiceRequest created

Schema:

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"serviceRequestId": { "type": "string", "description": "ServiceRequest ID" },
"NHI": { "type": "string", "description": "NHI ID" },
"performer": { "type": "string", "description": "assigned performer display value" },
"eventTime": { "type": "string", "description": "time of eventing", "format": "date-time" }
},
"required": ["serviceRequestId", "NHI", "eventTime", "performer"]
}

Example:

{
"serviceRequestId": "xyz1234",
"NHI": "ZGT56KB",
"eventTime": "2025-04-23T18:25:43.511Z",
"performer": "air"
}