NHS Booking and Referral Standard

Guide v1.5.0 | Core v1.2.1 | Package v1.30.0

Standard Patterns for BaRS Operations

Most implementations of the BaRS that are applying the standard to support a particular use case or operational workflow will follow the same basic set of foundational operations with little deviation.

In order to establish a guarantee of compatibility between different solutions compliant with the standard, all implementations must support all the underlying foundational operations and patterns.



Standard Pattern For Composites

The majority of BaRS operations utilise a single standard approach. Since most BaRS operations involve composites of FHIR resources supporting a particular workflow they all utilise a single type of endpoint designed for processing and consuming of composite resources. This is the $process-message endpoint from the FHIR operations framework. The resource being transmitted in the body of the http request is a FHIR "Bundle" resource. This request payload needs to support two purposes, both the transmission of information as well as an indicator to direct the recieving system to how this particular bundle of resources is to be processed and what workflow should be triggered as a result of its consumption.

These core functions are:

  • making a referral
  • cancelling/amending a referral
  • making a booking
  • cancelling/amending a booking
  • providing a response/feedback communication

At the highest level this pattern follows the following key steps:

  • Sender GET the message definition for the payload/workflow being attempted
  • Sender composes the bundle (as defined by the message definition) ready for POST-ing.
  • Sender does a POST request to the receivers' /$process-message endpoint.
  • Receiver inspects the request header and the bundle MessageHeader resource for the core workflow variables indicating how to process and consume the bundle.
  • Receiver send http response message back to the sender.

Below is a pseudo code example, showing the above process in detail, illustrating how a message could be interpreted using core workflow variables for a message sent to POST /$process-message.

Each Application will have a tailored example of the below pseudo code.

> Click here to show example
Receive_Request
{
	initialise_variable "messageType" 
	initialise_variable "MessageReason" 
	initialise_variable "RequestType"
	
	//HTTP_Headers
	{
		if (HttpHeaders is null || HttpHeaders not Guid )
			OperationOutcome.issue.code = "invalid"
			throw exception with "REC_BAD_REQUEST"
			then return with HTTP.ResponseCode 400
		else if (HttpHeaders.RequestId == RequestId.AlreadyReceived)
			OperationOutcome.issue.code = "duplicate"
			throw exception with "REC_CONFLICT"
			then return with HTTP.ResponseCode 409
	}
	//Bundle
	{
		if(Bundle.meta.versionID is null)
			OperationOutcome.issue.code = "invariant"
			throw exception with "REC_BAD_REQUEST"
			then return with HTTP.ResponseCode 422
		else if!(Bundle.meta.versionID in versionID.supported)
			OperationOutcome.issue.code = "not-supported"
			throw exception with "REC_UNPROCESSABLE_ENTITY"
			then return with HTTP.ResponseCode 422
	}
	//Contents;
	{
		switch(MessageHeader.eventCoding)
		{
			case "servicerequest-request":
				if (MessageHeader.reason.code == "new" && ServiceRequest.status == "active")
					{
						switch(ServiceRequest.Category)
						{
							case "Validation":
								if (CarePlan.status != "active")
									{							
										RequestType = "unknown";
										OperationOutcome.issue.code = "invariant";//A content validation rule failed
										throw exception with "REC_BAD_REQUEST";
										then return  HTTP.ResponseCode 400;
									}
								else if(Encounter.Status.In("triaged","in-progress")
									{RequestType = "Im Receiving a new Validation Request";}
								else
									{
										RequestType = "unknown";
										OperationOutcome.issue.code = "invariant";//A content validation rule failed
										throw exception with "REC_BAD_REQUEST";
										then return  HTTP.ResponseCode 400;
									}
								break;
							case "Referral":
								if (Careplan.status != "completed")
								{
									RequestType = "unknown"
									OperationOutcome.issue.code = "invariant"//A content validation rule failed
									throw exception with "REC_BAD_REQUEST"
									then return  HTTP.ResponseCode 400
								}
								else if(Encounter.Status.In("triaged","finished"))
									RequestType = "Im Receiving a new Referral"
								else
									RequestType = "unknown"
									OperationOutcome.issue.code = "invariant"//A content validation rule failed
									throw exception with "REC_BAD_REQUEST"
									then return  HTTP.ResponseCode 400
								break;
							default:
								RequestType = "unknown"
								OperationOutcome.issue.code = "invariant"//A content validation rule failed
								throw exception with "REC_BAD_REQUEST"
								then return  HTTP.ResponseCode 400;
						}
					}
				else if (MessageHeader.reason.code == "update")
					{
						switch(ServiceRequest.category)
						{
							case "Validation":
								if(ServiceRequest.status.In("entered-in-error","revoked"))
									{RequestType = "im receiving a cancelled validation request";}
								else if(ServiceRequest.status.In("active","on-hold"))
									{RequestType = "im receiving an update to a validation request";} 
								else
								{
									RequestType = "unknown"
									OperationOutcome.issue.code = "invariant"//A content validation rule failed
									throw exception with "REC_BAD_REQUEST"
									then return  HTTP.ResponseCode 400								
								}
								break;
							case "Referral":
								if(ServiceRequest.status.In("entered-in-error","revoked"))
								{RequestType = "im receiving a cancelled referral"}
								else
								{
									RequestType = "unknown"
									OperationOutcome.issue.code = "invariant"//A content validation rule failed
									throw exception with "REC_BAD_REQUEST"
									then return  HTTP.ResponseCode 400								
								}
								break;
							default:
								RequestType = "unknown"
								OperationOutcome.issue.code = "invariant"//A content validation rule failed
								throw exception with "REC_BAD_REQUEST"
								then return  HTTP.ResponseCode 400;
						}

					}
				else
				{
					RequestType = "unknown"
					OperationOutcome.issue.code = "invariant"//A content validation rule failed
					throw exception with "REC_BAD_REQUEST"
					then return  HTTP.ResponseCode 400}
				break;
			case "servicerequest-response":
				if (MessageHeader.Response is null )
				{
						RequestType = "Invalid servicerequest-response"
						OperationOutcome.issue.code = "invariant"//A content validation rule failed
						throw exception with "REC_BAD_REQUEST"
						then return  HTTP.ResponseCode 400;
				}
				else if ( !Message.Response.identifier.existsLocally())
				{
						RequestType = "none or invalid response ID"
						OperationOutcome.issue.code = "not-found"//A content validation rule failed
						throw exception with "REC_NOT_FOUND"
						then return  HTTP.ResponseCode 404;
				}
				switch (ServiceRequest.Category)
					{
						case "Referral":
							if (ServiceRequest.status == "revoked" && MessageHeader.reason.code == "new")
							{ RequestType = "im receiving a Safeguarding DNA response (noshow)" } 
							else
							{
								RequestType = "unknown"
								OperationOutcome.issue.code = "invariant"//A content validation rule failed
								throw exception with "REC_BAD_REQUEST"
								then return  HTTP.ResponseCode 400;
							}
							break;
						case "Validation":
							if(!AnyEncounter.Originates.Local && Encount.Count()<=3)
							{
								if (MessageHeader.Reason.code == "new" && ServiceRequest.status == "active" && MessageHeader.FocusEncounter.status=="in-progress")
								{Request Type = "im receiving a Validation Response interim update" }
								else if (MessageHeader.Reason.code.In ("new","update") && ServiceRequest.status == "completed" && MessageHeader.FocusEncounter.status.In("triaged","complete")
								{Request Type = "im receiving a final Validation Response" }
								else
								{
									RequestType = "unknown"
									OperationOutcome.issue.code = "invariant"//A content validation rule failed
									throw exception with "REC_BAD_REQUEST"
									then return  HTTP.ResponseCode 400;
								}
							}
							else if(MessageHeader.FocusEncounter.status = "triaged" && ServiceRequest.status == "revoked" && MessageHeader.Reason.code.In("new","update"))
							{ RequestType = "im receiving  a Rejected validation response" } // a new encounter here is an edge case.
							else
							{
								RequestType = "unknown"
								OperationOutcome.issue.code = "invariant"//A content validation rule failed
								throw exception with "REC_BAD_REQUEST"
								then return  HTTP.ResponseCode 400;
							}
						default:
							RequestType = "unknown"
							OperationOutcome.issue.code = "invariant"//A content validation rule failed
							throw exception with "REC_BAD_REQUEST"
							then return  HTTP.ResponseCode 400;
					}
			case "booking-request":
				if (MessageHeader.Reason.code== "new" && Appointment.Status == "booked")
					if(slot.IsFree())
					{RequestType = "Im Receiving a new booking.";}
					else
					{
						OperationOutcome.issue.code = "conflict"
						throw exception with "REC_CONFLICT"
						then return with HTTP.ResponseCode 409
					}
				else if (MessageHeader.Reason.code == "update")
					MessageHeaderIsUpdate = true;
					switch (Appointment.Status)
					{
						case "cancelled":
							RequestType = "Im Receiving a booking cancellation."
							break						
						case "entered-in-error":
							RequestType = "Im Receiving a booking cancellation."
							break
						case "booked":
							RequestType = "Im Receiving an update to a booking."
							break
						default:
							OperationOutcome.issue.code = "invariant"//A content validation rule failed
							throw exception with "REC_BAD_REQUEST"
							then return with HTTP.ResponseCode 400;
							break;
					}
				else
				{
					OperationOutcome.issue.code = "invariant"//A content validation rule failed
					throw exception with "REC_BAD_REQUEST"
					then return with HTTP.ResponseCode 400;
				}
				break;
			case "booking-response":
					OperationOutcome.issue.code = "invariant"//A content validation rule failed
					throw exception with 'REC_BAD_REQUEST'
					then return with HTTP.ResponseCode 400
					break;
			default:
				OperationOutcome.issue.code = "invariant"//A content validation rule failed
				throw exception with 'REC_BAD_REQUEST'
				then return with HTTP.ResponseCode 400
				break;
		}
		
	}
	//Submit
	{
		
		if (Message == "update")
		{
			if (currentLocalData.LastUpdated > originaRequest.ReceivedDate)
			{
				OperationOutcome.issue.code = "conflict"
				throw exception with 'REC_CONFLICT'
				then return with HTTP.ResponseCode 409
				break;
			}		
			foreach (Entry in Bundle)
			{
				if (currentLocalData.Item.exists)
				{
					if (currentLocalData.LastUpdated > originaRequest.Received)
					{
						OperationOutcome.issue.code = "conflict"
						throw exception with 'REC_CONFLICT'
						then return with HTTP.ResponseCode 409
						break;
					}
					if(Entry.LastUpdated > currentLocalData.Item.meta.LastUpdated && Entry.fullUrl = currentLocalData.Item.fullUrl)
						currentLocalData.Item = Entry.Item
						Entry.SubmitWith(currentLocalData.Item.meta.LastUpdated == Entry.LastUpdated )
					else
						ignore
				}
				else
					Entry.SubmitWith(currentLocalData.Item.meta.LastUpdated == Entry.LastUpdated )					
			}
			Submit(currentLocalData.Bundle.meta.LastUpdated = Bundle.Meta.LastUpdated)
			return HTTP.ResponseCode 200 'OK'
		}
		else
			{
				foreach(Entry in Bundle)
				{
					Entry.SubmitWith(currentLocalData.Item.meta.LastUpdated == Entry.LastUpdated )
					Submit(currentLocalData.Bundle.meta.LastUpdated = Bundle.Meta.LastUpdated)
					return HTTP.ResponseCode 200 'OK'
				}
			}
	}	
}	



Message Headers

MessageHeader Resource

BaRS payloads (FHIR message bundles) require a MessageHeader FHIR resource which provides key information to drive workflow and start interpreting the data contained within. This resource is central to making a request or asynchronous response and must be present in all payloads.

The MessageHeader resource contains the following element which must be used as outlined:

  • MessageHeader.source - stipulates where the payload originated. The Sender must, under MessageHeader.source.endpoint, include a valid URI which could be used as a NHSD-Target-Identifier (their reference on the Endpoint Catalogue) for the Receiver to send an asynchronous response.
  • MessageHeader.destination - designates who the payload is intended for, including reference to an Organisation resource and a valid URI (MessageHeader.destination.endpoint) which is the NHSD-Target-Identifier (their reference on the Endpoint Catalogue) the payload is being sent to.
  • MessageHeader.eventCoding - determines the 'type' of payload, whether booking, referral, request or asynchronousus response. The value must be populated from this CodeSystem. In referrals, this value, combined with the ServiceRequest.category element, allows supports for different styles of referral to support various use-cases. The value must be populated from CodeSystems for specific type and use-case.
  • MessageHeader.reason.code - indicates whether the message is 'new' or an 'update' to something the Receiver is already aware of. The value must be populated from this CodeSystem.
  • MessageHeader.focus - specifies the root resource through which to start interpreting the payload.
  • MessageHeader.definition - cites the MessageDefinition the payload must adhere to and must be rejected by the Receiver if it fails to do so. Note: payload conformance to MessageDefinitions is not checked as part of FHIR validation.

When a Receiver begins to process the payload, they must initially ensure it is for them and they know who it is from:

  • check the MessageHeader.destination and verify the MessageHeader.destination.receiver.reference refers to their Organisation.
  • check the MessageHeader.destination.endpoint is the Service ID they are expected to be processing the request on behalf of.
  • Store MessageHeader.source.endpoint as NHSD-Target-Identifier to enable an asynchronous response back to the Sender. Not all workflows will require this type of response but this data must be stored for audit purposes.

Certain elements in MessageHeader explicitly drive workflow, check MessageHeader.eventCoding to determine whether a booking or referral payload is being sent, and whether this is an initial or update request or an asynchronous response to a pre-existing request. There are various styles of referral too, a request could be made for a simple 'transfer of care' or, currently, something termed a 'validation', where one service requests another to validate the assessment outcome they have reached. The intention of supporting gradation of referral is to provide BaRS the malleability to support further subtlety of referrals for future use cases. Combining the MessageHeader.eventCoding with the ServiceRequest.cateory provides this functionality and, with the addition of use-case categories (again populated under ServiceRequest.category) specific services are pinpointed through every BaRS workflow.

Once the above checks have been made, the detail of the payload can start to be unpacked and processed. The structure of the payload must be checked first to ensure it adheres to the MessageHeader.definition it claims to. The MessageDefinitions will principally be defined by BaRS, at a national level (although bespoke definitions can be used through BaRS), and the Receiver is checking to ensure all mandatory FHIR resources are present and meet their assigned cardinality. This is a manual, business logic, check and not something which is supported through standard FHIR validation of the payload (bundle). Next, MessageHeader.focus is the root resource through which the payload is intended to be understood. In an initial referral request, this will typically be the ServiceRequest FHIR resource. This root will link to other resources to build a narrative for the payload, for example, the ServiceRequest will link to the Encounter which led to the referral being made and the Careplan detailing next actions. The Entity Relationship Diagrams (included in each Application) are used as a visual representation of the FHIR resource links in the payloads.



Asynchronous Response Workflows

For certain Applications, an initial request by a Sender expects an asynchronous response (as opposed to an HTTP synchronous response (200) message). These responses are defined by the workflow of the Application and may be consistently returned or conditional. When an asynchronous response is initiated, the original Sender and Receiver roles are switched, the Sender becoming the Receiver and vice versa. This allows BaRS to support complex workflows through support for multiple requests (initial and update) and, potentially, multiple asynchronous responses, for example, an initial status update followed by a more detailed final outcome (as defined in Application 4). The asynchronous response should be thought of as merely another payload, adhering to all the same rules as an initial request or update. Similarly, Sender and Receiver roles are intended to be interchangeable in BaRS and, in most BaRS Applications a supplier is expected to build both Sender and Receiver functionality, something which is reflected in the assurance process, especially BaRS Core.

Where the workflow dictates an asynchronous response is to be sent, the Sender (originally the Receiver) must populate:

  • MessageHeader.response.identifier with the Bundle.Id of the original request payload and set the MessageHeader.response.code value to 'ok'.
  • Additionally, they must follow the above guidance on populating the MessageHeader.

Cancellation

The ability to reverse a digital request, by performing a cancellation, whether booking or referral, is a core workflow within BaRS. It completes the digital workflow, supports genuine interoperability and removes the need for manual intervention by service providers.

Cancellation, for any referral type or booking, is a stripped back request, containing only the specific resources a Receiver requires to the fulfil the request. There are separate MessageDefinitions involved when engaged in referral and booking cancellation workflows.

A prerequisite when performing a cancellation of any request is to perform a read (GET) of either the booking or referral to be cancelled. The Sender must only make a cancellation request if the entity has a status which means it is still current; 'active' in the case of a referral (ServiceRequest) and 'booked' for a booking (Appointment). This ensures the Sender has the latest version of the entity they are about to change or, if it is no longer current (because its been actioned by the Receiver), allows the Sender to advise the end user so an alternative (often manual) workflow can be started. The Receiver must not process a cancellation request for a booking or referral which is not current, instead they must return an appropriate error response.

Cancellation Referral Request Payload

MessageHeader Resource

Standard Patterns for BaRS Operations explains in detail how the MessageHeader resource must be used.

When cancelling a referral, in conjunction with the guidance provided under the Standard Patterns, the three important elements which drive workflow must be used as follows:

  • eventCoding - this must be the same code as used in the request.
  • reasonCode - a cancellation follows an initial request, therefore, this must always be 'update' for cancellation.
  • definition - cancellation has a unique MessageDefinition the request must adhere to.
  • focus - must point to the ServiceRequest resource.

ServiceRequest Resource

The 'focus' resource in a cancellation referral request is the ServiceRequest resource. When the payload is created by the Sender and processed by the Receiver, this is the starting point from which it (the bundle) is understood and provides either the detail or references to all key FHIR resources, for example, the Patient. The guidance for this resource below provides more granular, element level, detail.

When a Receiver processes the cancellation referral request, the two key elements used are the ServiceRequest.id and ServiceRequest.status. The .id must already exist as an 'active' (status) ServiceRequest on the Receiver system (this must have been confirmed by a prior read (GET) by the Sender) and the .status, in the request, must either be 'revoked' or 'entered-in-error'. There is a distinct difference between these two ServiceRequest.status(es). 'Revoked' should be used to denote the original request was intentional but, due to a change in circumstances, is no longer valid, whereas, 'entered-in-error' should be used when original request was in error. The purpose of this differentiation is to allow service providers to accurately report the reason for cancellations.

Patient Resource

Key patient demographics should be cross-referenced between the current 'active' referral and incoming cancellation referral request to ensure validity.

Payload for Referral Cancellation Request

This payload is used to transmit all the necessary information that is required to transmit the cancellation of a Referral.



> Bundle

The Bundle resource is the container for the event message.

useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
typeΣ1..1codeBindingFixed Value
timestampΣ1..1instant
totalΣ I0..1unsignedInt
relationΣ1..1string
urlΣ1..1uri
fullUrlΣ0..1uri
resourceΣ0..1Resource
modeΣ0..1codeBinding
scoreΣ0..1decimal
methodΣ1..1codeBinding
urlΣ1..1uri
ifNoneMatchΣ0..1string
ifModifiedSinceΣ0..1instant
ifMatchΣ0..1string
ifNoneExistΣ0..1string
statusΣ1..1string
locationΣ0..1uri
etagΣ0..1string
lastModifiedΣ0..1instant
outcomeΣ0..1Resource
typeΣ1..*CodingBinding
whenΣ1..1instant
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
targetFormat0..1codeBinding
sigFormat0..1codeBinding
data0..1base64Binary

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Bundle The Bundle resource is the container for the event message  https://simplifier.net/nhsbookingandreferrals/barsbundlemessage 1..1
Bundle.id This id is generated by the originating sender of the message, retained in subsequent messages.. MUST 1..1 79120f41-a431-4f08-bcc5-1e67006fcae0
Bundle.meta https://www.hl7.org/fhir/resource.html#Meta MUST 0..1
Bundle.meta.profile This MUST be populated with the structure definition for BaRSBundleMessage : 'https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage
Bundle.meta.lastUpdated All resources MUST include 'lastUpdated' value, under meta section which must be the same timestamp for each resource when created from new, but must be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Bundle.type This must be populated with 'message' - FIXED VALUE MUST 1..1 message
Bundle.timestamp the date that the content of the message was assembled. This date is not changed by middleware engines unless they add additional data that changes the meaning of the time of the message MUST 0..1 2023-03-08T12:01:08.4677672+00:00
Bundle.entry(s) Follow BaRS profile guidance for populating this element MUST 1..*
Bundle.entry.fullUrl unique identifier for the resource entry. Transient id relative to the bundle MUST 0..1 urn:uuid:1cbdfb97-5859-48a4-8301-d54eab818d68
Bundle.entry.resourceType Resources detailed in the message definition. MUST 0..1 MessageHeader,Patient, Encounter

> Message Header

A resource that describes the BaRS message being exchanged between two systems.

messageHeaderInstructionI0..*Extension(Coding)
system1..
code1..
eventCodingCoding
eventUriuri
nameΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
endpointΣ1..1url
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
referenceΣ I1..1string
typeΣ0..1uriBinding
identifierΣ0..1Identifier
displayΣ0..1string
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
myExtensionI0..*Extension(Complex)
nameΣ0..1string
softwareΣ0..1string
versionΣ0..1string
contactΣ I0..1ContactPoint
endpointΣ1..1url
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
systemΣ0..1uriFixed Value
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
identifierΣ1..1id
codeΣ1..1codeBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
definitionΣ0..1canonical(MessageDefinition)

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
MessageHeader A resource that describes the BaRS message being exchanged between two systems https://simplifier.net/nhsbookingandreferrals/barsmessageheaderservicerequestrequest 1..1
MessageHeader.meta https://www.hl7.org/fhir/resource.html#Meta MUST 0..1
MessageHeader.meta.profile This MUST be populated with the structure definition for BaRSMessageHeader-servicerequest-request. MUST 0..1 https://fhir.nhs.uk/StructureDefinition/BARSMEssageHeader-servicerequest-request
MessageHeader.meta.lastUpdated All resources MUST include 'lastUpdated' value, under the meta section which MUST be the same timestamp for each resource when created from new, but MUST be a later timestamp on updates to resources, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 0..1 2023-03-08T12:01:08.4677672+00:00
MessageHeader.extension This MUST be populated with details of the Clinical Decision Support System used MUST 0..*
MessageHeader.extension.url This MUST be populated with 'https://fhir.nhs.uk/StructureDefinition/CDSSExtension' - FIXED VALUE MUST 1..1 https://fhir.nhs.uk/StructureDefinition/CDSSExtension
MessageHeader.extension.extension MUST 0..*
MessageHeader.extension.extension.url This MUST be populated with the pre-defined Clinical Decision Support System software URL - FIXED VALUE MUST 1..1 requesterCDSSSoftware
MessageHeader.extension.extension.valueString This MUST be populated with the Clinical Decision Support System software name e.g. Pathways MUST 0..1 Pathways
MessageHeader.extension.extension MUST 0..*
MessageHeader.extension.extension.url This MUST be populated with the pre-defined Clinical Decision Support System software Version URL - FIXED VALUE MUST 1..1 requesterCDSSVersion
MessageHeader.extension.extension.valueString This MUST be populated with the Clinical Decision Support System software Version name e.g. 30.2.0 MUST 0..1 30.2.0
MessageHeader.eventcoding MUST 1..1
MessageHeader.eventcoding.system This MUST be populated with CodeSystem 'https://fhir.nhs.uk/CodeSystem/message-events-bars' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/CodeSystem/message-events-bars
MessageHeader.eventcoding.code The status MUST be populated with 'servicerequest-request'. See CodeSystem: 'https://fhir.nhs.uk/CodeSystem/message-events-bars' - FIXED VALUE MUST 0..1 servicerequest-request
MessageHeader.destination MUST 0..1
MessageHeader.destination.receiver MUST 0..1
MessageHeader.destination.receiver.reference This MUST be populated with the full URL to the Receiving Organisation resource. MUST 0..1 urn:uuid:10397afd-479c-42ea-9d5d-e4024481e0f8
MessageHeader.destination.endpoint This MUST be populated with the system and Service ID separated by a pipe. for example https://fhir.nhs.uk/id/dos-service-id\|11111111, this is to ensure the receiver knows the intended destination. MUST 1..1 https://fhir.nhs.uk/id/dos-service-id\|1122334455
MessageHeader.sender MUST 0..1
MessageHeader.sender.reference This MUST be populated. Follow BaRS profile guidance for populating this element MUST 0..1 urn:uuid:07939a0c-2854-46ff-9282-ad906bc93679
MessageHeader.source MUST 1..1
MessageHeader.source.name This MUST be populated with the sending system supplier name MUST 0..1 NHS Trust
MessageHeader.source.software This SHOULD be populated with the sending software application name SHOULD 0..1 Supplier Software
MessageHeader.source.version This SHOULD be populated with the sending software version SHOULD 0..1 V1.0.0
MessageHeader.source.contact SHOULD 0..1
MessageHeader.source.contact.system This SHOULD be populated with the Contact Type - phone | fax | email | pager | url | sms | other SHOULD 0..1 phone
MessageHeader.source.contact.value This SHOULD be populated with the Contact Type value SHOULD 0..1 +44 (0123) 123 4567
MessageHeader.source.endpoint This MUST be populated with the system and Service ID separated by a pipe. for example https://fhir.nhs.uk/id/dos-service-id\|11111111, this is to ensure the receiver knows where any response messages SHOULD be addressed. MUST 1..1 https://fhir.nhs.uk/id/dos-service-id\|5566778899
MessageHeader.reason MUST 0..1
MessageHeader.reason.coding MUST 0..1
MessageHeader.reason.coding.system This MUST be populated with 'https://fhir.nhs.uk/CodeSystem/message-reason-bars' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/CodeSystem/message-reason-bars
MessageHeader.reason.coding.code This MUST be populated with "delete" for an cancellation. See CodeSystem: 'https://fhir.nhs.uk/CodeSystem/message-events-bars' MUST 0..1 delete
MessageHeader.reason.coding.display This MUST be populated with 'Delete' when cancelling a Service Request. SHOULD 0..1 Delete
MessageHeader.focus MUST 0..*
MessageHeader.focus.reference This MUST be populated with a reference to the ServiceRequest MUST 0..1 urn:uuid:236bb75d-90ef-461f-b71e-fde7f899802c
MessageHeader.definition This MUST be populated with the MessageDefinition the bundle is based on. This will be used for validation. Value - https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-cancelled MUST 0..1 https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-cancelled

> Service Request

A resource to carry a request for a service to be performed, in this case a Validation. This Resource is the focus of the Validation Request interaction.

sourceOfServiceRequestI0..1Extension(CodeableConcept)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
instantiatesCanonicalΣ0..*canonical(ActivityDefinition | PlanDefinition)
instantiatesUriΣ0..*uri
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
statusΣ ?!1..1codeBinding
intentΣ ?!1..1codeBindingFixed Value
categoryΣ1..1CodeableConcept
priorityΣ0..1codeBinding
doNotPerformΣ ?!0..1boolean
codeΣ0..1CodeableConceptBinding
orderDetailΣ I0..*CodeableConcept
quantityQuantityQuantity
quantityRatioRatio
quantityRangeRange
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
occurrencePeriodPeriod
asNeededBooleanboolean
asNeededCodeableConceptCodeableConcept
authoredOnΣ1..1dateTime
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
performerTypeΣ0..1CodeableConcept
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
locationCodeΣ0..*CodeableConcept
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
reasonCodeΣ0..*CodeableConceptBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
bodySiteΣ0..*CodeableConceptBinding
note0..*Annotation
patientInstructionΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
ServiceRequest A resource to carry a request for a service to be performed, in this case a Validation. This Resource is the focus of the Validation Request interaction https://simplifier.net/nhsbookingandreferrals/barsservicerequest-request-validation 1..1
ServiceRequest.id MUST only be generated by the Receiver as the id for the resource in the synchronous HTTP response. MUST 0..1 236bb75d-90ef-461f-b71e-fde7f899802c
ServiceRequest.meta https://www.hl7.org/fhir/resource.html#Meta MUST 0..1
ServiceRequest.meta.profile https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-validation MUST 0..1 https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-validation
ServiceRequest.meta.lastUpdated All resources MUST include 'lastUpdated' value, under meta section which must be the same timestamp for each resource when created from new, but must be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 0..1 2023-03-08T12:01:08.4677672+00:00
ServiceRequest.basedOn MUST 0..*
ServiceRequest.basedOnreference This MUST be populated with a reference to the CarePlan resource MUST 0..1 urn:uuid:236bb75d-90ef-461f-b71e-fde7f899802c
ServiceRequest.status Only use the following 2 values, as appropriate: revoked is used when a SR is legitimately cancelled, entered-in-error is used when sent to the by mistake and needs to be removed. MUST 1..1 entered-in-error
ServiceRequest.intent This MUST be populated with 'plan' - Fixed Value MUST 1..1 plan
ServiceRequest.category MUST 0..1
ServiceRequest.category.coding MUST 0..*
ServiceRequest.category.coding.system This MUST be populated with CodeSystem 'https://fhir.nhs.uk/CodeSystem/message-category-servicerequest' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/CodeSystem/message-category-servicerequest
ServiceRequest.category.coding.code This MUST be populated with code value appropriate for the Application employed. MUST 0..1 validation
ServiceRequest.category.coding.display This MUST be populated with display value appropriate for the Application employed. MUST 0..1 For Validation
ServiceRequest.subject Follow BaRS profile guidance for populating this element MUST 1..1
ServiceRequest.subjectreference This MUST be populated with a Reference to the Patient resource MUST 0..1 urn:uuid:9589fb37-87a2-48d8-968f-b371429208a8
ServiceRequest.encounter MUST 0..1
ServiceRequest.encounter.reference This MUST be populated with a Reference to the Encounter MUST 0..1 urn:uuid:8c63d621-4d86-4f57-8699-e8e22d49935d
ServiceRequest.occurrencePeriod Validation Breach time MUST 0..1
ServiceRequest.occurrencePeriod.start The start of the period must be ‘now’. MUST 0..1 2023-03-08T12:01:08.4677672+00:00
ServiceRequest.occurrencePeriod.end The time by which the validation must be complete (validation breach time) MUST 0..1 2023-03-08T12:01:08.4677672+00:00
ServiceRequest.reasonCode This will ONLY be populated in a cancellation message with the reason for cancellation SHOULD 0..*
ServiceRequest.reasonCode.text This SHOULD be populated. This will ONLY be populated in a cancellation message with the reason for cancellation and SHOULD only be used in conjunction with a corresponding status - revoked or entered-in-error SHOULD 0..1 Revoked as patient has been dealt with.

> Patient

This resource is used to communicate details about the patient who is the subject of the referral.
It also includes contact information for third parties when required.

url1..1System.StringFixed Value
valueAddressAddress
birthSexI0..1Extension(code)
url1..1System.StringFixed Value
valueBooleanboolean
contactPreferenceI0..1Extension(Complex)
deathNotificationStatusI0..1Extension(Complex)
ethnicCategoryI0..1Extension(CodeableConcept)
residentialStatusI0..1Extension(CodeableConcept)
url1..1System.StringFixed Value
valueCodeableConceptCodeableConcept
url1..1System.StringFixed Value
valueBooleanboolean
nhsNumberVerificationStatusI0..1Extension(CodeableConcept)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
nameΣ0..*HumanName
otherContactSystemI0..1Extension(Coding)
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
genderΣ0..1codeBinding
url1..1System.StringFixed Value
valueDateTimedateTime
deceasedBooleanboolean
deceasedDateTimedateTime
addressKeyI0..*Extension(Complex)
useΣ ?!0..1codeBinding
typeΣ0..1codeBinding
textΣ0..1string
lineΣ0..*string
cityΣ0..1string
districtΣ0..1string
stateΣ0..1string
postalCodeΣ0..1string
countryΣ0..1string
periodΣ I0..1Period
maritalStatus0..1CodeableConceptBinding
multipleBirthBooleanboolean
multipleBirthIntegerinteger
photoI0..*Attachment
contactRankI0..1Extension(positiveInt)
copyCorrespondenceIndicatorI0..1Extension(boolean)
relationship0..*CodeableConceptBinding
name0..1HumanName
otherContactSystemI0..1Extension(Coding)
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
address0..1Address
gender0..1codeBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
periodI0..1Period
url1..1uriFixed Value
valueCodingCoding
url1..1uriFixed Value
valueCodingCoding
url1..1System.StringFixed Value
language1..1CodeableConceptBinding
preferred0..1boolean
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
typeΣ1..1codeBinding

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Patient This resource is used to communicate details about the patient who is the subject of the referral.
It also includes contact information for third parties when required.

https://simplifier.net/hl7fhirukcorer4/ukcore-patient
1..1
Patient.id It also includes contact information for third parties when required. MUST 0..1 9589fb37-87a2-48d8-968f-b371429208a8
Patient.meta https://simplifier.net/hl7fhirukcorer4/ukcore-patient MUST 1..1
Patient.meta.profile This MUST be populated. Follow UK Core guidance for populating this element MUST 1..1 https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient
Patient.meta.LastUpdate All resources MUST include 'lastUpdated' value, under meta section which must be the same timestamp for each resource when created from new, but must be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Patient.identifier This is a human readable patient identifier. This MUST be populated with the NHS number when available. Additionally a Local Patient Identifier Should be populated where available. If no NHS number is available this Should be populated with the Local patient identifier. SHOULD 0..*
Patient.identifier.system https://simplifier.net/hl7fhirukcorer4/ukcore-nhsnumberverificationstatus-duplicate-2 SHOULD 1..1 https://fhir.nhs.uk/Id/nhs-number
Patient.identifier.value This SHOULD be populated with a human readable patient identifier. When used this MUST be populated with the NHS number when available.If no NHS number is available this SHOULD be populated with the Local patient identifier. SHOULD 1..1 3478526985
Patient.identifier.extension This extension is used to record the NHS number Verification status SHOULD 0..*
Patient.identifier.extension.url This SHOULD be populated. Where used this MUST be populated with Structure Definition 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus' - FIXED VALUE SHOULD 1..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus
Patient.identifier.extension.valueCodeableConcept SHOULD 0..1
Patient.identifier.extension.valueCodeableConcept.coding SHOULD 0..1
Patient.identifier.extension.valueCodeableConcept.coding.system https://simplifier.net/hl7fhirukcorer4/extensionukcorenhsnumberverificationstatus SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus
Patient.identifier.extension.valueCodeableConcept.coding.code Follow UK Core guidance for populating this element SHOULD 0..1 number-present-and-verified
Patient.identifier.extension.valueCodeableConcept.coding.display Follow UK Core guidance for populating this element SHOULD 0..1 Number present and verified
Patient.name SHOULD 0..*
Patient.name.use Follow UK Core guidance for populating this element SHOULD 0..1 official
Patient.name.text Follow UK Core guidance for populating this element SHOULD 0..1 Mrs Julie Jones
Patient.name.family Follow UK Core guidance for populating this element SHOULD 0..1 Jones
Patient.name.given Follow UK Core guidance for populating this element SHOULD 0..1 Julie
Patient.name.prefix Follow UK Core guidance for populating this element SHOULD 0..1 Mrs
Patient.gender Follow UK Core guidance for populating this element SHOULD 0..1 female
Patient.birthDate Follow UK Core guidance for populating this element SHOULD 0..1 1959-05-04
Patient.address Follow UK Core guidance for populating this element SHOULD 0..*
Patient.address.use Follow UK Core guidance for populating this element SHOULD 0..1 home
Patient.address.type Follow UK Core guidance for populating this element SHOULD 0..1 both
Patient.address.text Follow UK Core guidance for populating this element SHOULD 0..1 22 Brightside Crescent, Overtown, West Yorkshire, LS10 4YU
Patient.address.line Follow UK Core guidance for populating this element SHOULD 0..* 22 Brightside Crescent
Patient.address.city Follow UK Core guidance for populating this element SHOULD 0..1 Overtown
Patient.address.district Follow UK Core guidance for populating this element SHOULD 0..1 West Yorkshire
Patient.address.postalCode Follow UK Core guidance for populating this element SHOULD 0..1 LS10 4YU
Patient.contact This should be used to record telecom information for the patient and/or the patient's representative for the encounter MUST 0..*
Patient.contact.extension MUST 0..*
Patient.contact.extension.url This MUST be populated with Structure Definition 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactRank' - FIXED VALUE MUST 0..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactPreference
Patient.contact.extension.urlvaluePositiveInt This MUST be populated with the rank of the whole contact and MUST be populated with the value '1' for the primary person to contact for referral. There MUST be at least one contact for the referral. MUST 0..1 1
Patient.contact.relationship MUST 0..*
Patient.contact.relationship.coding MUST 0..*
Patient.contact.relationship.coding.system This MUST be populated with the CodeSystem from the ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'.
Where the contact details relate to the patient this relationship MUST be populated with the value 'self'.
Where the contact details relate to a patient's representative this SHOULD be populated with their relationship to the patient.
If the relationship is not known this SHOULD be populated with the value 'Unknown'
MUST 0..1 https://simplifier.net/hl7fhirukcorer4/ukcore-personrelationshiptype-110
Patient.contact.relationship.coding.code This MUST be populated with Code of CodeSystem value. See ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'. MUST 0..1 EP
Patient.contact.relationship.coding.display This MUST be populated with Display of CodeSystem value. See ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'. MUST 0..1 EP
Patient.contact.name SHOULD 0..1
Patient.contact.name.family This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 Grayson
Patient.contact.name.given This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 Jack
Patient.contact.telecom MUST 0..*
Patient.contact.telecom.system This MUST be populated for the rank 1 contact. There MUST be at least one contact phone number for the referral MUST 0..1 phone
Patient.contact.telecom.value This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 0789 1234567
Patient.contact.gender This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 male
Patient.Communication SHOULD 0..*
Patient.Communication.Language MUST 1..1
Patient.Communication.Language.coding MUST 1..1
Patient.Communication.Language.coding.code This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 en
Patient.Communication.Language.coding.system This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-HumanLanguage
Patient.Communication.Language.coding.display This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 English
Patient.Communication.Language.preferred This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 TRUE
Patient.extension This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..*
Patient.extension.url This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory
Patient.extension.url.valueCodeableConcept This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1
Patient.extension.url.valueCodeableConcept.coding This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1
Patient.extension.url.valueCodeableConcept.coding.system This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategory
Patient.extension.url.valueCodeableConcept.coding.code This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 A
Patient.extension.url.valueCodeableConcept.coding.display This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 British, Mixed British
Patient.generalPractitioner This SHOULD be populated with a reference to the GP Surgery ONLY rather than a specific practitioner SHOULD 0..*
Patient.generalPractitioner.reference This SHOULD be populated. Where populated this MUST reference to an Organisation resource SHOULD 0..1 urn:uuid:b83d13e2-8c2e-422c-88ac-63b8e86a4411

> Organization

This resource is used to communicate details about the sender and receiver organisations.

mainLocationI0..*Extension(Reference(UK Core Location))
url1..1System.StringFixed Value
valuePeriodPeriod
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
typeΣ0..*CodeableConcept
nameΣ I0..1string
alias0..*string
telecomI0..*ContactPoint
addressI0..*Address
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
purpose0..1CodeableConceptBinding
name0..1HumanName
telecomI0..*ContactPoint
address0..1Address
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Organization This resource is used to communicate details about the sender organisations.

https://simplifier.net/hl7fhirukcorer4/ukcore-organization
2..*
Organization.id This MUST only be populated with an id generated by the Receiver in the synchronous HTTP response. MUST 0..1 5d897313-c62d-4e7e-92b7-b2199804fed3
Organization.meta https://www.hl7.org/fhir/resource.html#Meta MUST 1..1
Organization.meta.profile This MUST be populated. Follow UK Core guidance for populating this element MUST 1..1 https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization
Organization.meta.lastUpdated This MUST be populated. All resources MUST include 'lastUpdated' value, under meta section which MUST be the same timestamp for each resource when created from new, but MUST be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Organization.identifier This MUST be populated with an organisation identifier e.g. ODS code MUST 0..*
Organization.identifier.system This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 https://fhir.nhs.uk/id/ods-organization-code
Organization.identifier.value This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 ABD01
Organization.name This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 Organisation name


Entity Relationship Diagram - Cancellation Referral Request



The below diagram details the Cancellation Referral Request



Cancellation Booking Request Payload

MessageHeader Resource

Standard Patterns for BaRS Operations explains in detail how the MessageHeader resource must be used.

When cancelling a booking, in conjunction with the guidance provided under the Standard Patterns, the three important elements which drive workflow must be used as follows:

  • eventCoding - this must be the same code as used in the request.
  • reasonCode - a cancellation follows an initial request, therefore, this must always be 'update' for cancellation.
  • definition - cancellation has a unique MessageDefinition the request must adhere to.
  • focus - must point to the Appointment resource.

Appointment Resource

The 'focus' resource in a cancellation booking request is the Appointment resource. When the payload is created by the Sender and processed by the Receiver, this is the starting point from which it (the bundle) is understood and provides either the detail or references to all key FHIR resources, for example, the Patient. The guidance for this resource below provides more granular, element level, detail.

When a Receiver processes the cancellation booking request, the two key elements used are the Appointment.id and Appointment.status. The .id must already exist as a 'booked' (status) booking on the Receiver system (this must have been confirmed by a prior read (GET) by the Sender) and the .status, in the request, must be 'cancelled'. No other status is valid in the cancellation booking request.

Patient Resource

Key patient demographics should be cross-referenced between the current 'booked' (status) booking and incoming cancellation booking request to ensure validity.

Payload for Booking Cancellation Request

This payload is used to transmit all the necessary information that is required to transmit the cancellation of a Booking.



> Bundle

The Bundle resource is the container for the event message.

useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
typeΣ1..1codeBindingFixed Value
timestampΣ1..1instant
totalΣ I0..1unsignedInt
relationΣ1..1string
urlΣ1..1uri
fullUrlΣ0..1uri
resourceΣ0..1Resource
modeΣ0..1codeBinding
scoreΣ0..1decimal
methodΣ1..1codeBinding
urlΣ1..1uri
ifNoneMatchΣ0..1string
ifModifiedSinceΣ0..1instant
ifMatchΣ0..1string
ifNoneExistΣ0..1string
statusΣ1..1string
locationΣ0..1uri
etagΣ0..1string
lastModifiedΣ0..1instant
outcomeΣ0..1Resource
typeΣ1..*CodingBinding
whenΣ1..1instant
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
targetFormat0..1codeBinding
sigFormat0..1codeBinding
data0..1base64Binary

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Bundle The Bundle resource is the container for the event message  https://simplifier.net/nhsbookingandreferrals/barsbundlemessage 1..1
Bundle.id This id is generated by the originating sender of the message, retained in subsequent messages.. MUST 1..1 79120f41-a431-4f08-bcc5-1e67006fcae0
Bundle.meta https://www.hl7.org/fhir/resource.html#Meta MUST 0..1
Bundle.meta.profile This MUST be populated with the structure definition for BaRSBundleMessage : 'https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage
Bundle.meta.lastUpdated All resources MUST include 'lastUpdated' value, under meta section which must be the same timestamp for each resource when created from new, but must be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Bundle.type This must be populated with 'message' - FIXED VALUE MUST 1..1 message
Bundle.timestamp the date that the content of the message was assembled. This date is not changed by middleware engines unless they add additional data that changes the meaning of the time of the message MUST 0..1 2023-03-08T12:01:08.4677672+00:00
Bundle.entry(s) Follow BaRS profile guidance for populating this element MUST 1..*
Bundle.entry.fullUrl unique identifier for the resource entry. Transient id relative to the bundle MUST 0..1 urn:uuid:1cbdfb97-5859-48a4-8301-d54eab818d68
Bundle.entry.resourceType Resources detailed in the message definition. MUST 0..1 MessageHeader,Patient, Encounter

> Message Header

A resource that describes the BaRS message being exchanged between two systems.

messageHeaderInstructionI0..*Extension(Coding)
system1..
code1..
eventCodingCoding
eventUriuri
nameΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
endpointΣ1..1url
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
referenceΣ I1..1string
typeΣ0..1uriBinding
identifierΣ0..1Identifier
displayΣ0..1string
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
myExtensionI0..*Extension(Complex)
nameΣ0..1string
softwareΣ0..1string
versionΣ0..1string
contactΣ I0..1ContactPoint
endpointΣ1..1url
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
systemΣ0..1uriFixed Value
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
identifierΣ1..1id
codeΣ1..1codeBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I1..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
definitionΣ0..1canonical(MessageDefinition)

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
MessageHeader A resource that describes the BaRS message being exchanged between two systems https://simplifier.net/nhsbookingandreferrals/barsmessageheaderservicerequestrequest 1..1
MessageHeader.meta https://www.hl7.org/fhir/resource.html#Meta MUST 0..1
MessageHeader.meta.profile This MUST be populated with the structure definition for BARSMessageHeader-booking-request MUST 0..1 https://fhir.nhs.uk/StructureDefinition/BARSMessageHeader-booking-request
MessageHeader.meta.lastUpdated All resources MUST include 'lastUpdated' value, under the meta section which MUST be the same timestamp for each resource when created from new, but MUST be a later timestamp on updates to resources, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 0..1 2023-03-08T12:01:08.4677672+00:00
MessageHeader.eventcoding MUST 1..1
MessageHeader.eventcoding.system This MUST be populated with CodeSystem 'https://fhir.nhs.uk/CodeSystem/message-events-bars' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/CodeSystem/message-events-bars
MessageHeader.eventcoding.code The status MUST be populated with 'booking-request'. See CodeSystem: 'https://fhir.nhs.uk/CodeSystem/message-events-bars' - FIXED VALUE MUST 0..1 booking-request
MessageHeader.destination MUST 0..1
MessageHeader.destination.receiver MUST 0..1
MessageHeader.destination.receiver.reference This MUST be populated with the full URL to the Receiving Organisation resource. MUST 0..1 urn:uuid:10397afd-479c-42ea-9d5d-e4024481e0f8
MessageHeader.destination.endpoint This MUST be populated with the system and Service ID separated by a pipe. for example https://fhir.nhs.uk/id/dos-service-id\|11111111, this is to ensure the receiver knows the intended destination. MUST 1..1 https://fhir.nhs.uk/id/dos-service-id\|1122334455
MessageHeader.sender MUST 0..1
MessageHeader.sender.reference This MUST be populated. Follow BaRS profile guidance for populating this element MUST 0..1 urn:uuid:07939a0c-2854-46ff-9282-ad906bc93679
MessageHeader.source MUST 1..1
MessageHeader.source.name This MUST be populated with the sending system supplier name MUST 0..1 NHS Trust
MessageHeader.source.software This SHOULD be populated with the sending software application name SHOULD 0..1 Supplier Software
MessageHeader.source.version This SHOULD be populated with the sending software version SHOULD 0..1 V1.0.0
MessageHeader.source.contact SHOULD 0..1
MessageHeader.source.contact.system This SHOULD be populated with the Contact Type - phone | fax | email | pager | url | sms | other SHOULD 0..1 phone
MessageHeader.source.contact.value This SHOULD be populated with the Contact Type value SHOULD 0..1 +44 (0123) 123 4567
MessageHeader.source.endpoint This MUST be populated with the system and Service ID separated by a pipe. for example https://fhir.nhs.uk/id/dos-service-id\|11111111, this is to ensure the receiver knows where any response messages SHOULD be addressed. MUST 1..1 https://fhir.nhs.uk/id/dos-service-id\|5566778899
MessageHeader.reason MUST 0..1
MessageHeader.reason.coding MUST 0..1
MessageHeader.reason.coding.system This MUST be populated with 'https://fhir.nhs.uk/CodeSystem/message-reason-bars' - FIXED VALUE MUST 0..1 https://fhir.nhs.uk/CodeSystem/message-reason-bars
MessageHeader.reason.coding.code This MUST be populated with "delete" for an cancellation. See CodeSystem: 'https://fhir.nhs.uk/CodeSystem/message-events-bars' MUST 0..1 delete
MessageHeader.reason.coding.display This MUST be populated with 'Delete' when cancelling a Booking. SHOULD 0..1 Delete
MessageHeader.focus MUST 0..*
MessageHeader.focus.reference This MUST be populated with a reference to the ServiceRequest MUST 0..1 urn:uuid:236bb75d-90ef-461f-b71e-fde7f899802c
MessageHeader.definition This MUST be populated with the MessageDefinition the bundle is based on. This will be used for validation. Value - hhttps://fhir.nhs.uk/MessageDefinition/bars-message-booking-request-cancelled MUST 0..1 https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request-cancelled

> Appointment

This resource will be used to communicate information about an Appointment and is the focus of the Booking interation.

bookingOrganizationI0..1Extension(Reference(UK Core Organization))
deliveryChannelI0..1Extension(code)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
statusΣ ?!1..1codeBinding
cancelationReasonΣ0..1CodeableConcept
serviceCategoryΣ0..*CodeableConcept
serviceTypeΣ0..*CodeableConcept
specialtyΣ0..*CodeableConceptBinding
appointmentTypeΣ0..1CodeableConceptBinding
reasonCodeΣ0..*CodeableConceptBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
priority0..1unsignedInt
description0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
startΣ0..1instant
endΣ0..1instant
minutesDuration0..1positiveInt
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
created0..1dateTime
comment0..1string
patientInstruction0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
typeΣ0..*CodeableConceptBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
requiredΣ0..1codeBinding
statusΣ1..1codeBinding
periodI0..1Period
requestedPeriodI0..*Period

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Appointment https://simplifier.net/hl7fhirukcorer4/ukcoreappointment

This resource will be used to communicate information about an appointment.
1..1
Appointment.id This MUST only be populated with an id generated by the Receiver in the synchronous HTTP response. MUST 0..1 3713c8fc-dbcf-4f90-bacf-89d99e434e9b
Appointment.meta https://www.hl7.org/fhir/resource.html#Meta MUST 1..1
Appointment.meta.profile This MUST be populated. Follow UK Core guidance for populating this element MUST 1..1 https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment
Appointment.meta.lastupdated This MUST be populated. All resources MUST include 'lastUpdated' value, under meta section which MUST be the same timestamp for each resource when created from new, but MUST be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Appointment.status This MUST be populated with 'booked' MUST 1..1 cencelled
Appointment.description This SHOULD be populated. It is the human readable description of the booking SHOULD 0..1 Reason for calling
Appointment.start This MUST be populated with the Start time of the booking MUST 0..1 2021-10-12T12:30:00+00:00
Appointment.end This MUST be populated with the End time of the booking MUST 0..1 2021-10-12T12:30:00+00:00
Appointment.slot MUST 0..*
Appointment.slot.reference This MUST be populated with the local logical bundle reference to the Slot resource MUST 0..1 urn:uuid:c3f6145e-1a26-4345-b3f2-dccbcba62049
Appointment.created This MUST only be populated with the date/time the booking was generated by the Receiver in the synchronous HTTP response. MUST 0..1 2021-10-11T15:01:30+00:00"
Appointment.basedOn This MAY be populated. When the Service Request is made before the booking in the workflow this MUST be populated. MAY 0..*
Appointment.basedOn.reference This MAY be populated. This is MUST be the relative reference to the Service Request when referral is made before booking in the workflow MAY 0..1 ServiceRequest/236bb75d-90ef-461f-b71e-fde7f899802c
Appointment.participant MUST 1..1
Appointment.participant.actor This MUST be populated with reference to the patient MUST 0..1
Appointment.participant.actor.reference This MUST be populated with the local logical bundle reference to the Patient resource MUST 0..1 urn:uuid:3a62607b-df65-4932-940c-14262787f62d
Appointment.participant.actor.status This MUST be populated with 'accepted' - FIXED VALUE MUST 1..1 accepted

> Patient

This resource is used to communicate details about the patient who is the subject of the referral.
It also includes contact information for third parties when required.

url1..1System.StringFixed Value
valueAddressAddress
birthSexI0..1Extension(code)
url1..1System.StringFixed Value
valueBooleanboolean
contactPreferenceI0..1Extension(Complex)
deathNotificationStatusI0..1Extension(Complex)
ethnicCategoryI0..1Extension(CodeableConcept)
residentialStatusI0..1Extension(CodeableConcept)
url1..1System.StringFixed Value
valueCodeableConceptCodeableConcept
url1..1System.StringFixed Value
valueBooleanboolean
nhsNumberVerificationStatusI0..1Extension(CodeableConcept)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
nameΣ0..*HumanName
otherContactSystemI0..1Extension(Coding)
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
genderΣ0..1codeBinding
url1..1System.StringFixed Value
valueDateTimedateTime
deceasedBooleanboolean
deceasedDateTimedateTime
addressKeyI0..*Extension(Complex)
useΣ ?!0..1codeBinding
typeΣ0..1codeBinding
textΣ0..1string
lineΣ0..*string
cityΣ0..1string
districtΣ0..1string
stateΣ0..1string
postalCodeΣ0..1string
countryΣ0..1string
periodΣ I0..1Period
maritalStatus0..1CodeableConceptBinding
multipleBirthBooleanboolean
multipleBirthIntegerinteger
photoI0..*Attachment
contactRankI0..1Extension(positiveInt)
copyCorrespondenceIndicatorI0..1Extension(boolean)
relationship0..*CodeableConceptBinding
name0..1HumanName
otherContactSystemI0..1Extension(Coding)
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
address0..1Address
gender0..1codeBinding
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
periodI0..1Period
url1..1uriFixed Value
valueCodingCoding
url1..1uriFixed Value
valueCodingCoding
url1..1System.StringFixed Value
language1..1CodeableConceptBinding
preferred0..1boolean
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
typeΣ1..1codeBinding

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Patient This resource is used to communicate details about the patient who is the subject of the referral.
It also includes contact information for third parties when required.

https://simplifier.net/hl7fhirukcorer4/ukcore-patient
1..1
Patient.id It also includes contact information for third parties when required. MUST 0..1 9589fb37-87a2-48d8-968f-b371429208a8
Patient.meta https://simplifier.net/hl7fhirukcorer4/ukcore-patient MUST 1..1
Patient.meta.profile This MUST be populated. Follow UK Core guidance for populating this element MUST 1..1 https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient
Patient.meta.LastUpdate All resources MUST include 'lastUpdated' value, under meta section which must be the same timestamp for each resource when created from new, but must be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Patient.identifier This is a human readable patient identifier. This MUST be populated with the NHS number when available. Additionally a Local Patient Identifier Should be populated where available. If no NHS number is available this Should be populated with the Local patient identifier. SHOULD 0..*
Patient.identifier.system https://simplifier.net/hl7fhirukcorer4/ukcore-nhsnumberverificationstatus-duplicate-2 SHOULD 1..1 https://fhir.nhs.uk/Id/nhs-number
Patient.identifier.value This SHOULD be populated with a human readable patient identifier. When used this MUST be populated with the NHS number when available.If no NHS number is available this SHOULD be populated with the Local patient identifier. SHOULD 1..1 3478526985
Patient.identifier.extension This extension is used to record the NHS number Verification status SHOULD 0..*
Patient.identifier.extension.url This SHOULD be populated. Where used this MUST be populated with Structure Definition 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus' - FIXED VALUE SHOULD 1..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus
Patient.identifier.extension.valueCodeableConcept SHOULD 0..1
Patient.identifier.extension.valueCodeableConcept.coding SHOULD 0..1
Patient.identifier.extension.valueCodeableConcept.coding.system https://simplifier.net/hl7fhirukcorer4/extensionukcorenhsnumberverificationstatus SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus
Patient.identifier.extension.valueCodeableConcept.coding.code Follow UK Core guidance for populating this element SHOULD 0..1 number-present-and-verified
Patient.identifier.extension.valueCodeableConcept.coding.display Follow UK Core guidance for populating this element SHOULD 0..1 Number present and verified
Patient.name SHOULD 0..*
Patient.name.use Follow UK Core guidance for populating this element SHOULD 0..1 official
Patient.name.text Follow UK Core guidance for populating this element SHOULD 0..1 Mrs Julie Jones
Patient.name.family Follow UK Core guidance for populating this element SHOULD 0..1 Jones
Patient.name.given Follow UK Core guidance for populating this element SHOULD 0..1 Julie
Patient.name.prefix Follow UK Core guidance for populating this element SHOULD 0..1 Mrs
Patient.gender Follow UK Core guidance for populating this element SHOULD 0..1 female
Patient.birthDate Follow UK Core guidance for populating this element SHOULD 0..1 1959-05-04
Patient.address Follow UK Core guidance for populating this element SHOULD 0..*
Patient.address.use Follow UK Core guidance for populating this element SHOULD 0..1 home
Patient.address.type Follow UK Core guidance for populating this element SHOULD 0..1 both
Patient.address.text Follow UK Core guidance for populating this element SHOULD 0..1 22 Brightside Crescent, Overtown, West Yorkshire, LS10 4YU
Patient.address.line Follow UK Core guidance for populating this element SHOULD 0..* 22 Brightside Crescent
Patient.address.city Follow UK Core guidance for populating this element SHOULD 0..1 Overtown
Patient.address.district Follow UK Core guidance for populating this element SHOULD 0..1 West Yorkshire
Patient.address.postalCode Follow UK Core guidance for populating this element SHOULD 0..1 LS10 4YU
Patient.contact This should be used to record telecom information for the patient and/or the patient's representative for the encounter MUST 0..*
Patient.contact.extension MUST 0..*
Patient.contact.extension.url This MUST be populated with Structure Definition 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactRank' - FIXED VALUE MUST 0..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactPreference
Patient.contact.extension.urlvaluePositiveInt This MUST be populated with the rank of the whole contact and MUST be populated with the value '1' for the primary person to contact for referral. There MUST be at least one contact for the referral. MUST 0..1 1
Patient.contact.relationship MUST 0..*
Patient.contact.relationship.coding MUST 0..*
Patient.contact.relationship.coding.system This MUST be populated with the CodeSystem from the ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'.
Where the contact details relate to the patient this relationship MUST be populated with the value 'self'.
Where the contact details relate to a patient's representative this SHOULD be populated with their relationship to the patient.
If the relationship is not known this SHOULD be populated with the value 'Unknown'
MUST 0..1 https://simplifier.net/hl7fhirukcorer4/ukcore-personrelationshiptype-110
Patient.contact.relationship.coding.code This MUST be populated with Code of CodeSystem value. See ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'. MUST 0..1 EP
Patient.contact.relationship.coding.display This MUST be populated with Display of CodeSystem value. See ValueSet 'https://fhir.hl7.org.uk/ValueSet/UKCore-PersonRelationshipType'. MUST 0..1 EP
Patient.contact.name SHOULD 0..1
Patient.contact.name.family This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 Grayson
Patient.contact.name.given This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 Jack
Patient.contact.telecom MUST 0..*
Patient.contact.telecom.system This MUST be populated for the rank 1 contact. There MUST be at least one contact phone number for the referral MUST 0..1 phone
Patient.contact.telecom.value This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 0789 1234567
Patient.contact.gender This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 male
Patient.Communication SHOULD 0..*
Patient.Communication.Language MUST 1..1
Patient.Communication.Language.coding MUST 1..1
Patient.Communication.Language.coding.code This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 en
Patient.Communication.Language.coding.system This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-HumanLanguage
Patient.Communication.Language.coding.display This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 English
Patient.Communication.Language.preferred This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 TRUE
Patient.extension This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..*
Patient.extension.url This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory
Patient.extension.url.valueCodeableConcept This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1
Patient.extension.url.valueCodeableConcept.coding This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1
Patient.extension.url.valueCodeableConcept.coding.system This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategory
Patient.extension.url.valueCodeableConcept.coding.code This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 A
Patient.extension.url.valueCodeableConcept.coding.display This SHOULD be populated. Follow UK Core guidance for populating this element SHOULD 0..1 British, Mixed British
Patient.generalPractitioner This SHOULD be populated with a reference to the GP Surgery ONLY rather than a specific practitioner SHOULD 0..*
Patient.generalPractitioner.reference This SHOULD be populated. Where populated this MUST reference to an Organisation resource SHOULD 0..1 urn:uuid:b83d13e2-8c2e-422c-88ac-63b8e86a4411

> Organization

This resource is used to communicate details about the sender and receiver organisations.

mainLocationI0..*Extension(Reference(UK Core Location))
url1..1System.StringFixed Value
valuePeriodPeriod
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
typeΣ0..*CodeableConcept
nameΣ I0..1string
alias0..*string
telecomI0..*ContactPoint
addressI0..*Address
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
purpose0..1CodeableConceptBinding
name0..1HumanName
telecomI0..*ContactPoint
address0..1Address
referenceΣ I0..1string
typeΣ0..1uriBinding
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string

Data Item Implementation Guidance Necessity Profile Cardinality Example Value(s)
Organization This resource is used to communicate details about the sender organisations.

https://simplifier.net/hl7fhirukcorer4/ukcore-organization
2..*
Organization.id This MUST only be populated with an id generated by the Receiver in the synchronous HTTP response. MUST 0..1 5d897313-c62d-4e7e-92b7-b2199804fed3
Organization.meta https://www.hl7.org/fhir/resource.html#Meta MUST 1..1
Organization.meta.profile This MUST be populated. Follow UK Core guidance for populating this element MUST 1..1 https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization
Organization.meta.lastUpdated This MUST be populated. All resources MUST include 'lastUpdated' value, under meta section which MUST be the same timestamp for each resource when created from new, but MUST be a later timestamp on updates, if the content of a particular resource contains updated info for subsequent updates. Otherwise, maintain the timestamp originally sent. MUST 1..1 2023-03-08T12:01:08.4677672+00:00
Organization.identifier This MUST be populated with an organisation identifier e.g. ODS code MUST 0..*
Organization.identifier.system This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 https://fhir.nhs.uk/id/ods-organization-code
Organization.identifier.value This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 ABD01
Organization.name This MUST be populated. Follow UK Core guidance for populating this element MUST 0..1 Organisation name


Entity Relationship Diagram - Cancellation Booking Request



The below diagram details the Cancellation Booking Request




Use Case Categories

One important factor, when making a request of another service, is ensuring the type (or category) of referral being requested is discrete, and sufficiently granular enough, to avoid overlap with other services. For example, a Pharmacy, may support numerous services such as Blood Pressure, New Medicine Service, Oral Contraception, etc.. The Receiver, during the processing of the referral request, will depend upon referral type (among other key information in the request payload) to direct to an appropriate clinical professional or queue etc., dictating the next workflow steps.

The 'type' of referral is categorised at the service level, rather than organisation or system. This service provider level is where BaRS works to define the use-case, to digitise workflow. For example, within the AST (Ambulance Service Trust) referring to AST Service (CAD to CAD), Application6, there are three use-cases defined; Out of Area, Mutual Aid and Call Assist. All of these referral request 'types' will end up within the same AST system but the workflows for them differ. These differences could include whether a request is accepted automatically or not, the timeframes an action must be dealt within and the skillset required to undertake the request. A use-case will only ever fit into one BaRS Application, but a BaRS Application may encompass several use-cases, as is the case with Application6. A list of use-case categories have been defined in a specific BaRS CodeSystem which indicate the supported use-cases, and all BaRS compliant solutions must adopt.

The use-case category is referenced in the initial negotation phase, when a Sender makes a request for MessageDefinitions, and in the subsequent referral request made to the Receiver. The MessageDefinition(s) returned by the Receiver will contain a use-case category code (from the 'use-case-categories' CodeSystem above) under MessageDefintion.useContext.code. The Sender must read this field to verify the Receiver supports the use-case workflow they intend to engage with. For example, in Application6, certain AST may not support Mutual Aid or Call Assist, therefore, it would be inappropriate to send a referral request to them for either of these use-cases. The Receiver will be able to make this distinction because the Sender's request will include the use-case category code value, under ServiceRequest.category and, if it is something they do not support, they will respond with an error (Operation Outcome).

The sequence of events occurs as follows:

  • the Sender requests the MessageDefintions (which indicate the use-case categories supported)
  • the Sender reads and only engages in the use-case workflows supported
  • the Sender's request includes the use-case category code (the same code they read from the MessageDefinition), under ServiceRequest.category
  • the Receiver processes accordingly
back to top