{
  "resourceType" : "Bundle",
  "id" : "ReferralOrderStatusAcceptMessage",
  "meta" : {
    "profile" : ["https://fhir.acmeexample.org.uk/PatientCareCoordination/StructureDefinition/BundleMessage"]
  },
  "language" : "en",
  "identifier" : {
    "system" : "https://fhir.mft.nhs.uk/Id/message",
    "value" : "MFT-MSG-778900"
  },
  "type" : "message",
  "timestamp" : "2026-09-05T09:30:00+01:00",
  "entry" : [{
    "fullUrl" : "https://fhir.example.nhs.uk/R4/MessageHeader/ReferralOrderStatusAcceptHeader",
    "resource" : {
      "resourceType" : "MessageHeader",
      "id" : "ReferralOrderStatusAcceptHeader",
      "meta" : {
        "lastUpdated" : "2026-09-05T09:30:00+01:00",
        "profile" : ["https://fhir.acmeexample.org.uk/PatientCareCoordination/StructureDefinition/MessageHeader"]
      },
      "language" : "en",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"MessageHeader_ReferralOrderStatusAcceptHeader\"> </a><p class=\"res-header-id\"><b>Generated Narrative: MessageHeader ReferralOrderStatusAcceptHeader</b></p><a name=\"ReferralOrderStatusAcceptHeader\"> </a><a name=\"hcReferralOrderStatusAcceptHeader\"> </a><div style=\"display: inline-block; background-color: #fbffeb; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Last updated: 2026-09-05 09:30:00+0100</p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-MessageHeader.html\">Document Message (MessageHeader)</a></p></div><p><b>event</b>: <a href=\"http://terminology.hl7.org/7.5.0/CodeSystem-v2-0003.html#v2-0003-O51\">event: O51</a> (OSU – Order Status Update)</p><h3>Destinations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Endpoint</b></td><td><b>Receiver</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"https://fhir.example-practice.nhs.uk/R4/$process-message\">https://fhir.example-practice.nhs.uk/R4/$process-message</a></td><td>Identifier: <a href=\"NamingSystem-ods-organization-code-namingsystem.html\" title=\"The identifier system for an Organisation registered with the Organisation Data Service (ODS).\">ODS Organisation Code</a>/P89020</td></tr></table><p><b>sender</b>: Identifier: <a href=\"NamingSystem-ods-organization-code-namingsystem.html\" title=\"The identifier system for an Organisation registered with the Organisation Data Service (ODS).\">ODS Organisation Code</a>/R0A</p><h3>Sources</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Endpoint</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"https://fhir.mft.nhs.uk/R4\">https://fhir.mft.nhs.uk/R4</a></td></tr></table><p><b>focus</b>: <a href=\"Task-CardiologyReferralAccepted.html\">Task Fulfill the focal request</a></p><p><b>definition</b>: <a href=\"MessageDefinition-referral-order-status.html\">Referral Order Status (O51)</a></p></div>"
      },
      "eventCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v2-0003",
        "code" : "O51"
      },
      "destination" : [{
        "endpoint" : "https://fhir.example-practice.nhs.uk/R4/$process-message",
        "receiver" : {
          "identifier" : {
            "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
            "value" : "P89020"
          }
        }
      }],
      "sender" : {
        "identifier" : {
          "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
          "value" : "R0A"
        }
      },
      "source" : {
        "endpoint" : "https://fhir.mft.nhs.uk/R4"
      },
      "focus" : [{
        "reference" : "Task/CardiologyReferralAccepted"
      }],
      "definition" : "https://fhir.acmeexample.org.uk/PatientCareCoordination/MessageDefinition/referral-order-status"
    }
  },
  {
    "fullUrl" : "https://fhir.example.nhs.uk/R4/Task/CardiologyReferralAccepted",
    "resource" : {
      "resourceType" : "Task",
      "id" : "CardiologyReferralAccepted",
      "meta" : {
        "profile" : ["https://fhir.acmeexample.org.uk/PatientCareCoordination/StructureDefinition/ReferralTask"]
      },
      "language" : "en",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Task_CardiologyReferralAccepted\"> </a><p class=\"res-header-id\"><b>Generated Narrative: Task CardiologyReferralAccepted</b></p><a name=\"CardiologyReferralAccepted\"> </a><a name=\"hcCardiologyReferralAccepted\"> </a><div style=\"display: inline-block; background-color: #fbffeb; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ReferralTask.html\">Referral Task</a></p></div><p><b>basedOn</b>: <a href=\"ServiceRequest-CardiologyReferral.html\">ServiceRequest Referral to cardiology service</a></p><p><b>status</b>: Accepted</p><p><b>businessStatus</b>: <span title=\"Codes:{https://fhir.acmeexample.org.uk/PatientCareCoordination/CodeSystem/referral-workflow-status accepted}\">Referral accepted</span></p><p><b>intent</b>: order</p><p><b>code</b>: <span title=\"Codes:{http://hl7.org/fhir/CodeSystem/task-code fulfill}\">Fulfill the focal request</span></p><p><b>focus</b>: <a href=\"ServiceRequest-CardiologyReferral.html\">ServiceRequest Referral to cardiology service</a></p><p><b>for</b>: <a href=\"Patient-Patient-Tameside.html\">Hodor TAMESIDE  Male, DoB: 1960-07-27 ( National Health Plan Identifier: NHS Number#9737383397)</a></p><p><b>authoredOn</b>: 2026-09-04 10:15:00+0100</p><p><b>lastModified</b>: 2026-09-05 09:30:00+0100</p><p><b>requester</b>: <a href=\"PractitionerRole-GPAllenRole.html\">Dr Allen, HT PRACTICE (P89020)</a></p><p><b>owner</b>: <a href=\"HealthcareService-CardiologyService.html\">General Cardiology Outpatients, Manchester University NHS Foundation Trust (R0A)</a></p></div>"
      },
      "basedOn" : [{
        "reference" : "ServiceRequest/CardiologyReferral",
        "identifier" : {
          "type" : {
            "coding" : [{
              "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
              "code" : "PLAC"
            }]
          },
          "system" : "https://fhir.example-practice.nhs.uk/Id/referral",
          "value" : "REF-2026-000123",
          "assigner" : {
            "identifier" : {
              "system" : "https://fhir.nhs.uk/Id/ods-organization-code",
              "value" : "P89020"
            }
          }
        }
      }],
      "status" : "accepted",
      "businessStatus" : {
        "coding" : [{
          "system" : "https://fhir.acmeexample.org.uk/PatientCareCoordination/CodeSystem/referral-workflow-status",
          "code" : "accepted"
        }]
      },
      "intent" : "order",
      "code" : {
        "coding" : [{
          "system" : "http://hl7.org/fhir/CodeSystem/task-code",
          "code" : "fulfill"
        }]
      },
      "focus" : {
        "reference" : "ServiceRequest/CardiologyReferral"
      },
      "for" : {
        "reference" : "Patient/Patient-Tameside",
        "identifier" : {
          "system" : "https://fhir.nhs.uk/Id/nhs-number",
          "value" : "9737383397"
        }
      },
      "authoredOn" : "2026-09-04T10:15:00+01:00",
      "lastModified" : "2026-09-05T09:30:00+01:00",
      "requester" : {
        "reference" : "PractitionerRole/GPAllenRole",
        "identifier" : {
          "system" : "https://fhir.hl7.org.uk/Id/gmp-number",
          "value" : "G1234567"
        },
        "display" : "Dr Allen, HT PRACTICE (P89020)"
      },
      "owner" : {
        "reference" : "HealthcareService/CardiologyService",
        "identifier" : {
          "system" : "http://fhir.nhs.net/Id/ers-service",
          "value" : "1234567"
        },
        "display" : "General Cardiology Outpatients, Manchester University NHS Foundation Trust (R0A)"
      }
    }
  }]
}