Acknowledgement Framework

This guidance is under active development by NHS England and content may be added or updated on a regular basis.

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" />
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader" />
        <resource>
            <MessageHeader>
                <eventCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
                    <code value="notification" />
                    <display value="Event Notification" />
                </eventCoding>
                <destination>
                    <name value="Destination Org Ltd" />
                    <endpoint value="${DestinationMeshMailboxId}" />
                </destination>
                <source>
                    <endpoint value="${NhsMeshMailboxId}" />
                </source>
                <response>
                    <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": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
            "resource": {
                "resourceType": "MessageHeader",
                "eventCoding": {
                    "system": "https://fhir.nhs.uk/CodeSystem/message-event",
                    "code": "notification",
                    "display": "Event Notification"
                },
                "destination":  [
                    {
                        "name": "Destination Org Ltd",
                        "endpoint": "${DestinationMeshMailboxId}"
                    }
                ],
                "source": {
                    "endpoint": "${NhsMeshMailboxId}"
                },
                "response": {
                    "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" />
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader" />
        <resource>
            <MessageHeader>
                <eventCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
                    <code value="notification" />
                    <display value="Event Notification" />
                </eventCoding>
                <destination>
                    <name value="Destination Org Ltd" />
                    <endpoint value="${DestinationMeshMailboxId}" />
                </destination>
                <source>
                    <endpoint value="${NhsMeshMailboxId}" />
                </source>
                <response>
                    <identifier value="b4409d7c-b613-477c-b623-87e60406c2f0" />
                    <code value="ok" />
                </response>
            </MessageHeader>
        </resource>
    </entry>
</Bundle>
{
    "resourceType": "Bundle",
    "id": "ff09cccc-2c9b-4238-91d2-66fa6ee845d3",
    "type": "message",
    "entry":  [
        {
            "fullUrl": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
            "resource": {
                "resourceType": "MessageHeader",
                "eventCoding": {
                    "system": "https://fhir.nhs.uk/CodeSystem/message-event",
                    "code": "notification",
                    "display": "Event Notification"
                },
                "destination":  [
                    {
                        "name": "Destination Org Ltd",
                        "endpoint": "${DestinationMeshMailboxId}"
                    }
                ],
                "source": {
                    "endpoint": "${NhsMeshMailboxId}"
                },
                "response": {
                    "identifier": "b4409d7c-b613-477c-b623-87e60406c2f0",
                    "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" />
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader" />
        <resource>
            <MessageHeader>
                <eventCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
                    <code value="notification" />
                    <display value="Event Notification" />
                </eventCoding>
                <destination>
                    <name value="Destination Org Ltd" />
                    <endpoint value="${DestinationMeshMailboxId}" />
                </destination>
                <source>
                    <endpoint value="${NhsMeshMailboxId}" />
                </source>
                <response>
                    <identifier value="f50c58ea-543f-4530-99fa-ceb7b9dbbed5" />
                    <code value="fatal-error" />
                    <details>
                        <reference value="d9c93f48-abb9-4aa4-aa22-ef2f76485477" />
                    </details>
                </response>
            </MessageHeader>
        </resource>
    </entry>
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome" />
        <resource>
            <OperationOutcome>
                <id value="d9c93f48-abb9-4aa4-aa22-ef2f76485477" />
                <issue>
                    <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": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
            "resource": {
                "resourceType": "MessageHeader",
                "eventCoding": {
                    "system": "https://fhir.nhs.uk/CodeSystem/message-event",
                    "code": "notification",
                    "display": "Event Notification"
                },
                "destination":  [
                    {
                        "name": "Destination Org Ltd",
                        "endpoint": "${DestinationMeshMailboxId}"
                    }
                ],
                "source": {
                    "endpoint": "${NhsMeshMailboxId}"
                },
                "response": {
                    "identifier": "f50c58ea-543f-4530-99fa-ceb7b9dbbed5",
                    "code": "fatal-error",
                    "details": {
                        "reference": "d9c93f48-abb9-4aa4-aa22-ef2f76485477"
                    }
                }
            }
        },
        {
            "fullUrl": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome",
            "resource": {
                "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" />
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader" />
        <resource>
            <MessageHeader>
                <eventCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
                    <code value="notification" />
                    <display value="Event Notification" />
                </eventCoding>
                <destination>
                    <name value="Destination Org Ltd" />
                    <endpoint value="${DestinationMeshMailboxId}" />
                </destination>
                <source>
                    <endpoint value="${NhsMeshMailboxId}" />
                </source>
                <response>
                    <identifier value="f862ec24-e05a-42d1-aea5-d0a9c092e6ae" />
                    <code value="fatal-error" />
                    <details>
                        <reference value="e747c4e4-9228-4ba4-b3e0-6e34b928edac" />
                    </details>
                </response>
            </MessageHeader>
        </resource>
    </entry>
    <entry>
        <fullUrl value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome" />
        <resource>
            <OperationOutcome>
                <id value="e747c4e4-9228-4ba4-b3e0-6e34b928edac" />
                <issue>
                    <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": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
            "resource": {
                "resourceType": "MessageHeader",
                "eventCoding": {
                    "system": "https://fhir.nhs.uk/CodeSystem/message-event",
                    "code": "notification",
                    "display": "Event Notification"
                },
                "destination":  [
                    {
                        "name": "Destination Org Ltd",
                        "endpoint": "${DestinationMeshMailboxId}"
                    }
                ],
                "source": {
                    "endpoint": "${NhsMeshMailboxId}"
                },
                "response": {
                    "identifier": "f862ec24-e05a-42d1-aea5-d0a9c092e6ae",
                    "code": "fatal-error",
                    "details": {
                        "reference": "e747c4e4-9228-4ba4-b3e0-6e34b928edac"
                    }
                }
            }
        },
        {
            "fullUrl": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome",
            "resource": {
                "resourceType": "OperationOutcome",
                "id": "e747c4e4-9228-4ba4-b3e0-6e34b928edac",
                "issue":  [
                    {
                        "severity": "error",
                        "code": "required",
                        "diagnostics": "Element Bundle.type is missing",
                        "expression":  [
                            "Bundle.type"
                        ]
                    }
                ]
            }
        }
    ]
}
back to top