Test Results

Test Results & Appointments

Background

These are a collection of use case examples covering test results. This includes positive and negative acknowledgement responses. This is to illustrate how the generic and agnostic Acknowledgement Framework can support a specific project use case.

This use case uses the Messaging paradigm within FHIR.

Use Case Examples

As a results receiver
I can send an acknowledgement to the results provider
So that I can acknowledge receipt of test results

As an appointment fulfiller
I can send an acknowledgement to an appointment requester
So that I can acknowledge receipt of appointments

Positive Acknowledgement

Positive Acknowledgement of Appointment



An Example of a positive acknowledgement response

<Bundle xmlns="http://hl7.org/fhir">
<id value="aa09cccc-2c9b-4238-91d2-66fa6ee845e3" />
<type value="message" />
<fullUrl value="http://example.org/MessageHeader/ba09cccc-2c9b-4238-91d2-66fa6ee845f4" />
<MessageHeader>
<id value="ba09cccc-2c9b-4238-91d2-66fa6ee845f4" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="notification" />
<display value="Event Notification" />
</eventCoding>
<name value="Destination Org Ltd" />
<endpoint value="https://destination.nhs.uk/api" />
</destination>
<endpoint value="https://source.nhs.uk/api" />
</source>
<identifier value="6e7b1dbb-77d2-4ddd-ae0d-e4862a306c1c" />
<code value="ok" />
</response>
</MessageHeader>
</resource>
</entry>
</Bundle>
{
"resourceType": "Bundle",
"id": "aa09cccc-2c9b-4238-91d2-66fa6ee845e3",
"type": "message",
"entry": [
{
"fullUrl": "http://example.org/MessageHeader/ba09cccc-2c9b-4238-91d2-66fa6ee845f4",
"resourceType": "MessageHeader",
"id": "ba09cccc-2c9b-4238-91d2-66fa6ee845f4",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "notification",
"display": "Event Notification"
},
{
"name": "Destination Org Ltd",
"endpoint": "https://destination.nhs.uk/api"
}
],
"source": {
"endpoint": "https://source.nhs.uk/api"
},
"identifier": "6e7b1dbb-77d2-4ddd-ae0d-e4862a306c1c",
"code": "ok"
}
}
}
]
}

Positive Acknowledgement of Test Report



An Example of a positive test report acknowledgement response

<Bundle xmlns="http://hl7.org/fhir">
<id value="ff09cccc-2c9b-4238-91d2-66fa6ee845d3" />
<type value="message" />
<fullUrl value="http://example.org/MessageHeader/df09cezc-2c9b-4238-91d2-66fa6ee845d3" />
<MessageHeader>
<id value="df09cezc-2c9b-4238-91d2-66fa6ee845d3" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="notification" />
<display value="Event Notification" />
</eventCoding>
<name value="Destination Org Ltd" />
<endpoint value="https://destination.nhs.uk/api" />
</destination>
<endpoint value="https://source.nhs.uk/api" />
</source>
<identifier value="f862ec24-e05a-42d1-aea5-d0a9c092e6ae" />
<code value="ok" />
</response>
</MessageHeader>
</resource>
</entry>
</Bundle>
{
"resourceType": "Bundle",
"id": "ff09cccc-2c9b-4238-91d2-66fa6ee845d3",
"type": "message",
"entry": [
{
"fullUrl": "http://example.org/MessageHeader/df09cezc-2c9b-4238-91d2-66fa6ee845d3",
"resourceType": "MessageHeader",
"id": "df09cezc-2c9b-4238-91d2-66fa6ee845d3",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "notification",
"display": "Event Notification"
},
{
"name": "Destination Org Ltd",
"endpoint": "https://destination.nhs.uk/api"
}
],
"source": {
"endpoint": "https://source.nhs.uk/api"
},
"identifier": "f862ec24-e05a-42d1-aea5-d0a9c092e6ae",
"code": "ok"
}
}
}
]
}



Negative Acknowledgement

Negative Acknowledgement of Appointment - Incorrect Data Format

The appointment should be in a JSON format. However, the appointment message was sent in an XML format. So a negative acknowledgement is sent.



An Example of a Receive Negative acknowledgement response

<Bundle xmlns="http://hl7.org/fhir">
<id value="6e7b1dbb-77d2-4ddd-ae0d-e4862a306c1d" />
<type value="message" />
<fullUrl value="http://example.org/MessageHeader/6g7b1dbb-77d2-4ddd-ae0d-e4862a306c1b" />
<MessageHeader>
<id value="6g7b1dbb-77d2-4ddd-ae0d-e4862a306c1b" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="notification" />
<display value="Event Notification" />
</eventCoding>
<name value="Destination Org Ltd" />
<endpoint value="https://destination.nhs.uk/api" />
</destination>
<endpoint value="https://source.nhs.uk/api" />
</source>
<identifier value="f50c58ea-543f-4530-99fa-ceb7b9dbbed5" />
<code value="fatal-error" />
<reference value="OperationOutcome/d9c93f48-abb9-4aa4-aa22-ef2f76485477" />
</details>
</response>
</MessageHeader>
</resource>
</entry>
<fullUrl value="http://example.org/OperationOutcome/d9c93f48-abb9-4aa4-aa22-ef2f76485477" />
<OperationOutcome>
<id value="d9c93f48-abb9-4aa4-aa22-ef2f76485477" />
<severity value="fatal" />
<code value="structure" />
<diagnostics value="Unable to parse XML content." />
</issue>
</OperationOutcome>
</resource>
</entry>
</Bundle>
{
"resourceType": "Bundle",
"id": "6e7b1dbb-77d2-4ddd-ae0d-e4862a306c1d",
"type": "message",
"entry": [
{
"fullUrl": "http://example.org/MessageHeader/6g7b1dbb-77d2-4ddd-ae0d-e4862a306c1b",
"resourceType": "MessageHeader",
"id": "6g7b1dbb-77d2-4ddd-ae0d-e4862a306c1b",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "notification",
"display": "Event Notification"
},
{
"name": "Destination Org Ltd",
"endpoint": "https://destination.nhs.uk/api"
}
],
"source": {
"endpoint": "https://source.nhs.uk/api"
},
"identifier": "f50c58ea-543f-4530-99fa-ceb7b9dbbed5",
"code": "fatal-error",
"details": {
"reference": "OperationOutcome/d9c93f48-abb9-4aa4-aa22-ef2f76485477"
}
}
}
},
{
"fullUrl": "http://example.org/OperationOutcome/d9c93f48-abb9-4aa4-aa22-ef2f76485477",
"resourceType": "OperationOutcome",
"id": "d9c93f48-abb9-4aa4-aa22-ef2f76485477",
"issue": [
{
"severity": "fatal",
"code": "structure",
"diagnostics": "Unable to parse XML content."
}
]
}
}
]
}



Negative Acknowledgement of a Test Result - Missing Mandatory Element

The test result should include all FHIR elements that are mandatory (with a minimum cardinality of 1). However, the test result sent is missing a FHIR element that is mandatory. So a negative acknowledgement is sent.



An Example of a Test Report Negative acknowledgement response

<Bundle xmlns="http://hl7.org/fhir">
<id value="cf09cccc-2c9b-4238-91d2-66fa6ee845d3" />
<type value="message" />
<fullUrl value="http://example.org/MessageHeader/6g7b1dbb-77d2-4ddd-ae0d-e4862a306cb2" />
<MessageHeader>
<id value="6g7b1dbb-77d2-4ddd-ae0d-e4862a306cb2" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="notification" />
<display value="Event Notification" />
</eventCoding>
<name value="Destination Org Ltd" />
<endpoint value="https://destination.nhs.uk/api" />
</destination>
<endpoint value="https://source.nhs.uk/api" />
</source>
<identifier value="f862ec24-e05a-42d1-aea5-d0a9c092e6ae" />
<code value="fatal-error" />
<reference value="OperationOutcome/e747c4e4-9228-4ba4-b3e0-6e34b928edac" />
</details>
</response>
</MessageHeader>
</resource>
</entry>
<fullUrl value="http://example.org/OperationOutcome/e747c4e4-9228-4ba4-b3e0-6e34b928edac" />
<OperationOutcome>
<id value="e747c4e4-9228-4ba4-b3e0-6e34b928edac" />
<severity value="error" />
<code value="required" />
<diagnostics value="Element Bundle.type is missing" />
<expression value="Bundle.type" />
</issue>
</OperationOutcome>
</resource>
</entry>
</Bundle>
{
"resourceType": "Bundle",
"id": "cf09cccc-2c9b-4238-91d2-66fa6ee845d3",
"type": "message",
"entry": [
{
"fullUrl": "http://example.org/MessageHeader/6g7b1dbb-77d2-4ddd-ae0d-e4862a306cb2",
"resourceType": "MessageHeader",
"id": "6g7b1dbb-77d2-4ddd-ae0d-e4862a306cb2",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "notification",
"display": "Event Notification"
},
{
"name": "Destination Org Ltd",
"endpoint": "https://destination.nhs.uk/api"
}
],
"source": {
"endpoint": "https://source.nhs.uk/api"
},
"identifier": "f862ec24-e05a-42d1-aea5-d0a9c092e6ae",
"code": "fatal-error",
"details": {
"reference": "OperationOutcome/e747c4e4-9228-4ba4-b3e0-6e34b928edac"
}
}
}
},
{
"fullUrl": "http://example.org/OperationOutcome/e747c4e4-9228-4ba4-b3e0-6e34b928edac",
"resourceType": "OperationOutcome",
"id": "e747c4e4-9228-4ba4-b3e0-6e34b928edac",
"issue": [
{
"severity": "error",
"code": "required",
"diagnostics": "Element Bundle.type is missing",
"Bundle.type"
]
}
]
}
}
]
}