<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="NHSEngland-Bundle-Genomics" />
  <url value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-Bundle-Genomics" />
  <version value="0.3.0" />
  <name value="NHSEngland_Bundle_Genomics" />
  <title value="NHSEngland Bundle Genomics" />
  <status value="active" />
  <date value="2026-04-16" />
  <publisher value="NHS England" />
  <contact>
    <name value="NHS England" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This profile defines the Genomics constraints and extensions on the International FHIR resource [Bundle](http://hl7.org/fhir/StructureDefinition/Bundle)." />
  <purpose value="Bundles within Genomics will be limited to Transactions for Test orders and updates; Transaction-responses for responses to transactions (housing sets of OperationOutcomes); or Searchsets, returned in response to search queries." />
  <copyright value="Copyright © 2026+ NHS England Licensed under the Apache License, Version 2.0 (the \\\&quot;License\\\&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\&quot;AS IS\\\&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Bundle" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  <derivation value="constraint" />
  <differential>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <definition value="SHALL be present. The type of Bundle. This is expected to be `transaction` for Bundles POSTed to the central broker, `transaction-response` for responses to transaction Bundles returned by the broker and `searchset` for collections of resources returned in response to search (GET) requests, as per standard HTTP FHIR rules." />
    </element>
    <element id="Bundle.total">
      <path value="Bundle.total" />
      <definition value="Only relevant for searchset Bundles. Details the number of resources in the bundle matching the search criteria, not including resources included via the _include criteria." />
    </element>
    <element id="Bundle.link">
      <path value="Bundle.link" />
      <definition value="Only relevant for searchset bundles. Details the query string that resulted in the searchset (to allow future queries using the same parameters). `&quot;relation&quot;: &quot;self&quot;` will only ever be used.&#xD;&#xA;Links related to response pagination such as next/prev are pending Non-Functional Requirements finalisation for the order management central broker." />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <definition value="Transactions&#xD;&#xA;&#xD;&#xA;An entry in the bundle. For transaction Bundles, each entry SHOULD contain a fullURL to ensure resources in the Bundle can reference each other, these can be the locations within the source system or urn:uuids.&#xD;&#xA;&#xD;&#xA;Resources are expected to contain ids to allow referencing within Bundles, though these will be replaced by server assigned ids when saved by the central broker. If additional identifiers need to be persisted e.g. NHS Number, these should be captured within the identifier field.&#xD;&#xA;&#xD;&#xA;Transaction Bundle entries also SHALL contain a request object, specifying the method (either PUT for updates or POST for creates) and the url to send the resource to (equivalent to the resource type for the resource).&#xD;&#xA;&#xD;&#xA;Reference to the associated Patient. This MAY be through a resource reference if the ID on the central service is known (or provided within the transaction bundle) or through NHS number where this is known and has been traced through PDS&#xD;&#xA;&#xD;&#xA;Transaction Responses&#xD;&#xA;&#xD;&#xA;These Bundles are returned in response to transaction requests. These will only contain OperationOutcome resources (one for each recource contained in the transaction request). See Acknowledgements and responses for more information.&#xD;&#xA;&#xD;&#xA;These entries will contain a response object detailing the response status of the individual resource operation and an OperationOutcome detailing any relevant diagnostics, such as validation messages.&#xD;&#xA;&#xD;&#xA;Entries will also contain a location element, detailing the relative path of the resource, where the operation has resulted in a resource being created or updated. These URLs will be version specific (using the _history suffix to denote the version number of the resource) if the resource has been updated.&#xD;&#xA;&#xD;&#xA;Searchsets&#xD;&#xA;&#xD;&#xA;These Bundles are returned in response to GET requests without an ID. entries within these bundles will depend on the endpoint queried and the search parameters included.&#xD;&#xA;&#xD;&#xA;Each entry is expected to include a fullUrl identifying the URL that can be used to retrieve the resource on the server; the resource itself; and a search element detailing whether the resource was included in the search response due to it matching the query parameters, &quot;mode&quot;: &quot;match&quot;, or whether it was included via the _include parameter, &quot;mode&quot;: &quot;include&quot;." />
    </element>
  </differential>
</StructureDefinition>