{"openapi":"3.0.0","info":{"description":"\n<section class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--important nhsd-!t-margin-bottom-6\" aria-label=\"Important Information\">\n<div class=\"nhsd-a-box nhsd-a-box--border-yellow\">\n  <div class=\"nhsd-m-emphasis-box__image-box\">\n  <figure class=\"nhsd-a-image\">\n    <picture class=\"nhsd-a-image__picture\">\n    <img src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIGlkPSJMYXllcl8xIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxNDAgMTQwOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMTQwIDE0MCIgeD0iMHB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB5PSIwcHgiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtkaXNwbGF5Om5vbmU7fQoJLnN0MXtkaXNwbGF5OmlubGluZTtmaWxsOiMyMzFmMjA7fQoJLnN0MntmaWxsOiMyMzFmMjA7fQoJLnN0M3tmaWxsOm5vbmU7c3Ryb2tlOiMyMzFmMjA7c3Ryb2tlLXdpZHRoOjEuOTI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDR7ZmlsbDojMjMxZjIwO30KCS5zdDV7ZmlsbDojMjMxZjIwO30KCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMjMxZjIwO3N0cm9rZS13aWR0aDo1O3N0cm9rZS1taXRlcmxpbWl0OjEwO30KPC9zdHlsZT4KPGcgY2xhc3M9InN0MCI+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNNzAsNi45NWw1NCwzMS41djYzLjExbC01NCwzMS41bC01NC0zMS41VjM4LjQ1TDcwLDYuOTUgTTcwLDBMMTAsMzV2NzBsNjAsMzVsNjAtMzVWMzVMNzAsMEw3MCwweiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTEwOS44NiwzOS44NXY1NUg4NS43Yy0zLjA2LDAtNS4xNCwzLjA2LTcuMDgsNWgtMTcuNWMtMS45NC0xLjk0LTQuMDMtNS03LjA4LTVIMjkuODd2LTU1aDI1ICAgYzUuMjgsMCwxMC44MywxLjMyLDE1LDQuNzljNC4xNy0zLjQ3LDkuNzItNC43OSwxNS00Ljc5SDEwOS44NnogTTY0Ljg2LDU0Ljg1YzAtMy44OS03LjIyLTUtMTAtNWgtMTV2MzVoMTMuNzUgICBjNS42MiwwLDcuNTcsMC42OSwxMS4yNSw1VjU0Ljg1eiBNOTkuODYsNDkuODVoLTE1Yy0yLjc4LDAtMTAsMS4xMS0xMCw1djM1YzMuNjgtNC4zMSw1LjYyLTUsMTEuMjUtNWgxMy43NVY0OS44NXoiLz4KPC9nPgo8L3N2Zz4K\" alt=\"\" style=\"object-fit:fill\">\n      </picture>\n    </figure>\n  </div>\n  <div class=\"nhsd-m-emphasis-box__content-box\">\n    <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\">\n    <p class=\"nhsd-t-body\">This API forms part of the &nbsp;<a href=\"https://simplifier.net/guide/nhsbookingandreferralstandard/Home/About-BaRS/About-BaRS?version=1.6.0\">Booking and Referral Standard (BaRS)</a>.<br>This API specification should be used in conjunction with the <a href=\"https://simplifier.net/guide/nhsbookingandreferralstandard\" class=\"nhsd-a-link\">BaRS implementation guide</a> for your use case.</p>\n    </div>\n  </div>\n  </div>\n</section>\n\n## Overview\n\n![BaRS FHIR API end-to-end process](https://raw.githubusercontent.com/NHSDigital/booking-and-referral-fhir-api/master/specification/images/BaRS-FHIR-API.svg)\n\nUse this API to send booking and referral information between NHS service providers.\n\nYou can:\n  * get a specific booking\n  * get bookings for a patient\n  * process a message, either a booking or a referral\n  * get message definition\n  * get capability statement\n  * get a specific referral\n  * get referrals for a patient\n  * get slots\n\nThe following describes the end-to-end process:\n1. Send a request from your sender application to this API, along with a service identifier header.\n2. This API redirects the request to the service associated with the service identifier header.\n3. The target backend handles the request and sends a response back to this API.\n4. This API returns the response to your sender application.\n5. In some [Applications](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-applications) the target may send a follow up request to indicate the outcome of a request.\n\n<section class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--important nhsd-!t-margin-bottom-6\" aria-label=\"Important Information\">\n<div class=\"nhsd-a-box nhsd-a-box--border-yellow\">\n  <div class=\"nhsd-m-emphasis-box__image-box\">\n    <figure class=\"nhsd-a-image\">\n      <picture class=\"nhsd-a-image__picture\">\n        <img src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIGlkPSJMYXllcl8xIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxNDAgMTQwOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMTQwIDE0MCIgeD0iMHB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB5PSIwcHgiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtkaXNwbGF5Om5vbmU7fQoJLnN0MXtkaXNwbGF5OmlubGluZTtmaWxsOiMyMzFmMjA7fQoJLnN0MntmaWxsOiMyMzFmMjA7fQoJLnN0M3tmaWxsOm5vbmU7c3Ryb2tlOiMyMzFmMjA7c3Ryb2tlLXdpZHRoOjEuOTI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDR7ZmlsbDojMjMxZjIwO30KCS5zdDV7ZmlsbDojMjMxZjIwO30KCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMjMxZjIwO3N0cm9rZS13aWR0aDo1O3N0cm9rZS1taXRlcmxpbWl0OjEwO30KPC9zdHlsZT4KPGcgY2xhc3M9InN0MCI+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNNzAsNi45NWw1NCwzMS41djYzLjExbC01NCwzMS41bC01NC0zMS41VjM4LjQ1TDcwLDYuOTUgTTcwLDBMMTAsMzV2NzBsNjAsMzVsNjAtMzVWMzVMNzAsMEw3MCwweiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTEwOS44NiwzOS44NXY1NUg4NS43Yy0zLjA2LDAtNS4xNCwzLjA2LTcuMDgsNWgtMTcuNWMtMS45NC0xLjk0LTQuMDMtNS03LjA4LTVIMjkuODd2LTU1aDI1ICAgYzUuMjgsMCwxMC44MywxLjMyLDE1LDQuNzljNC4xNy0zLjQ3LDkuNzItNC43OSwxNS00Ljc5SDEwOS44NnogTTY0Ljg2LDU0Ljg1YzAtMy44OS03LjIyLTUtMTAtNWgtMTV2MzVoMTMuNzUgICBjNS42MiwwLDcuNTcsMC42OSwxMS4yNSw1VjU0Ljg1eiBNOTkuODYsNDkuODVoLTE1Yy0yLjc4LDAtMTAsMS4xMS0xMCw1djM1YzMuNjgtNC4zMSw1LjYyLTUsMTEuMjUtNWgxMy43NVY0OS44NXoiLz4KPC9nPgo8L3N2Zz4K\" alt=\"\" style=\"object-fit:fill\">\n          </picture>\n      </figure>\n    </div>\n    <div class=\"nhsd-m-emphasis-box__content-box\">\n      <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\">\n        <p class=\"nhsd-t-body\">For a non-technical overview of how to build software that deals with referrals and bookings, see&nbsp;<a onclick=\"logGoogleAnalyticsEvent('Link click','General','/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings');\" href=\"/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings\" onkeyup=\"return vjsu.onKeyUp(event)\" class=\"nhsd-a-link\">Building healthcare software - referrals and bookings</a>.</p>\n      </div>\n    </div>\n  </div>\n</section>\n\n## Who can use this API\nThis API can only be used for the Booking and Referral Standard where there is a legal basis to do so. Make sure you have a valid use case before you go too far with your development. We'll ask you to demonstrate this as part of the digital onboarding process before your software goes live.\n\n##  Related APIs\nThe following APIs are related to this API:\n  * This API replaces the [NHS Booking - FHIR API](https://digital.nhs.uk/developer/api-catalogue/nhs-booking-fhir)\n\n## API status and roadmap\nThis version of the API is in [Production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses), meaning:\n  * it is available for testing in the integration environment\n  * it has availability in production \n  * it is NOT subject to breaking changes\n\nTo see our roadmap, or to suggest, comment or vote on features for this API, see our [interactive product backlog](https://nhs-digital-api-management.featureupvote.com/?order=popular&filter=allexceptdone&tag=booking-and-referral&deleted=0#controls).\nIf you have any other queries, please [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Service level\nThis API is a platinum service, meaning it is operational and supported 24 x 7 x 365.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest) and uses HTTP POST to submit data.\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/).\n\nIt includes:\n  * country-specific FHIR extensions, which are built against [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core), specifically [fhir.r4.ukcore.stu1 0.5.1](https://simplifier.net/packages/fhir.r4.ukcore.stu1/0.5.1)\n  * BaRS-specific FHIR extensions and ammendments, documented in the [BaRS FHIR project](https://simplifier.net/NHSBookingandReferrals)\n\n## Network access\nThis API is available on the internet and also indirectly via HSCN.\n\nFor more details, see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Security and authorisation\n\nThis API is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis),\nmeaning we authenticate the calling application but not the end user.\n\nTo use this access mode, use the following security pattern:\n* [application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\nFor more details, see [BaRS Core - Security and authorisation](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-core#Security-and-authorisation).\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nExample errors specific to each API are shown in the endpoints section, under Response. See the BaRS Core [Error Handling section](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-core#core-ErrorHandling) for further information on error handling within the BaRS Standard.\n\n\n## Environments and testing\n| Environment       | Base URL                                                               |\n| ----------------- | ---------------------------------------------------------------------- |\n| Sandbox           | `https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4`      | \n| Integration test  | `https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4`          |\n| Production        | `https://api.service.nhs.uk/booking-and-referral/FHIR/R4`              |\n\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing) is for early developer testing and covers a limited number of scenarios with predefined responses. Please not this environment is stateless.\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing) is for formal integration testing.\n\nFor more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).\n\n## Onboarding\nYou need to get your software approved by us before it can go live with this API. We call this onboarding. The onboarding process can sometimes be quite long, so it`s worth planning well ahead.\n\nAs part of this process, you need to demonstrate that you can manage risks and that your software conforms technically with the requirements for this API.\n\nInformation on this page might impact the design of your software. For details, see [Onboarding support information](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/onboarding-support-information).\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\n<div class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--emphasis nhsd-!t-margin-bottom-6\" aria-label=\"Highlighted Information\">\n    <div class=\"nhsd-a-box nhsd-a-box--border-blue\">\n        <div class=\"nhsd-m-emphasis-box__image-box\">\n            <figure class=\"nhsd-a-image\">\n                <picture class=\"nhsd-a-image__picture\">\n                    <img src=\"http://digital.nhs.uk/binaries/content/gallery/icons/play-circle.svg?colour=231f20\" alt=\"\" style=\"object-fit:fill\">\n                </picture>\n            </figure>\n        </div>\n        <div class=\"nhsd-m-emphasis-box__content-box\">\n            <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\"><p class=\"nhsd-t-body\">To get started, sign in or create a <a href=\"http://onboarding.prod.api.platform.nhs.uk/\">developer account</a>, then select 'product onboarding'.</p></div>            \n        </div>\n    </div>\n</div> \n","version":"1.0.0","title":"Booking and Referral API","termsOfService":"https://developer.nhs.uk/apis/uec-appointments","contact":{"email":"uec.appointmentbooking@nhs.net","url":"https://developer.nhs.uk/apis/uec-appointments","name":"NHS Digital"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4","description":"Sandbox Server"},{"url":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4","description":"Production"},{"url":"https://api.service.nhs.uk/booking-and-referral/FHIR/R4","description":"Integration Server"}],"security":[{"OAuth_Token":[]}],"tags":[{"name":"Booking"},{"name":"Message"},{"name":"Metadata"},{"name":"Referral"},{"name":"Slots"}],"paths":{"/metadata":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifierMeta_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Metadata"],"summary":"Get capability statement","description":"\n### Returns the target endpoints CapabilityStatement \n\nThe sender must initially request the receiver's [CapabilityStatement](https://www.hl7.org/fhir/capabilitystatement.html) (GET /metadata) to establish how to interact with the receivers API (its capabilities). If the receiver does not support BaRS functionality the BaRS API will provide an error response to indicate this and the sender will pursue an alternative workflow. \n\nA receiver may only implement a subset of the functionality within the standard and the CapabilityStatement will make this clear to a sender. \n\nWhat is returned is a server level response to indicate what functionality the target API supports and how to interact with it. This includes its Version, Security, Endpoints and their associated parameters as well as which MessageDefinitions are supported.\n\nAny given endpoint will describe its full capabilities as a client and as a server in response. As the Sender and Receiver roles are interchangeable in certain Application Workflows, all capabilities should be described. \n\nThe BaRS proxy will also respond with its own CapabilityStatement, which can be used as an example, by calling this endpoint and omitting the NHSD-Target-Identifier header.\n","operationId":"getMeta","responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Capability"},"example":{"resourceType":"CapabilityStatement","id":"45bcbe62-718b-4874-a68c-b0fe39a76cf5","url":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4'","name":"BaRS FHIR Server CapabilityStatement","status":"active","version":"1.0.0","experimental":false,"date":"2024-01-09","publisher":"NHS England","kind":"instance","contact":[{"name":"System Administrator","telecom":[{"system":"email","value":"interoperabilityteam@nhs.net"}]}],"description":"Sample capability statement showing new MessageDefinition structure, modify this Capability Statement to reflect what your system is capable of.","software":{"name":"NHS Digital","version":"1.2.0"},"implementation":{"description":"BaRS FHIR Server","url":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4"},"fhirVersion":"4.0.1","format":["xml","json"],"rest":[{"mode":"server","security":{"service":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/restful-security-service","code":"OAuth","display":"OAuth"}]}]},"resource":[{"type":"CapabilityStatement","interaction":[{"code":"read"},{"code":"vread"}],"versioning":"no-version"},{"type":"MessageDefinition","interaction":[{"code":"search-type"}],"versioning":"no-version","searchParam":[{"name":"useContext:identifier","type":"token","documentation":"The target service identifier. Allowing the ability to filter returned message definitions by the specified service id."}]},{"type":"Appointment","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"versioning":"no-version","searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for an appointment"},{"name":"date","type":"date","documentation":"Appointment start date"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"}]},{"type":"ServiceRequest","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"versioning":"no-version","searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for a ServiceRequest"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"}]},{"type":"Slot","interaction":[{"code":"search-type"}],"versioning":"no-version","searchInclude":["Slot:schedule","Schedule:actor:Practitioner","Schedule:actor:PractitionerRole","Schedule:actor:HealthcareService","HealthcareService.providedBy","HealthcareService:location"],"searchParam":[{"name":"start","type":"date"},{"name":"status","type":"token"},{"name":"Schedule.actor:HealthcareService","type":"token"}]}],"interaction":[{"code":"transaction"},{"code":"search-system"}],"operation":[{"name":"$process-message","definition":"http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message"}]},{"mode":"client","security":{"service":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/restful-security-service","code":"Certificates","display":"Certificates"}]}]},"resource":[{"type":"Appointment","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"versioning":"no-version","searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for an appointment"},{"name":"date","type":"date","documentation":"Appointment start date"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"}]},{"type":"ServiceRequest","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"versioning":"no-version","searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for a ServiceRequest"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"}]},{"type":"Slot","interaction":[{"code":"search-type"}],"versioning":"no-version","searchInclude":["Slot:schedule","Schedule:actor:Practitioner","Schedule:actor:PractitionerRole","Schedule:actor:HealthcareService","HealthcareService.providedBy","HealthcareService:location"],"searchParam":[{"name":"start","type":"date"},{"name":"status","type":"token"},{"name":"Schedule.actor:HealthcareService","type":"token"}]}],"interaction":[{"code":"transaction"},{"code":"search-system"}],"operation":[{"name":"$process-message","definition":"http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message"}]}],"messaging":[{"endpoint":[{"protocol":{"code":"http"},"address":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4"}],"supportedMessage":[{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-validation"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-validation-interim"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-validation-full"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-referral"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-referral"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-cancelled"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request-cancelled"},{"mode":"sender","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-referral-short"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-validation"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-validation-interim"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-validation-full"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-referral"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-referral"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-cancelled"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request-cancelled"},{"mode":"receiver","definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-response-referral-short"}]}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/Capability"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/MessageDefinition":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Metadata"],"summary":"Get Message Definition","description":"\n### Returns MessageDefinitions supported by the target endpoint\n\nThe Message Definition retrieval is required to inform a Sender on building the payload. A request is made using the Service Identifier and workflow type values, linking to the useContext and event elements, respectively, in the Message Definition resource, returning a list of FHIR resources. \n\nThe order of workflow beyond this point is relatively flexible, the only stipulation being responses occurring after requests.\n\n### Sender\n\nThe request for Message Definition is the next step for a Sender following the metadata acquisition. \nThe sender must request the Message Definition for the Service Identifier obtained previously, along with the type of workflow type e.g. booking-request, servicerequest-request. The Message Definition will contain a list of FHIR resources which the sender must include when making a booking or referral. \n\n### Receiver\n\nA receiver dictates what they need from a sender making a request and the MessageDefinition is the mechanism to support this. The Message Definition details what FHIR resources need to be included in the body (payload).\nThe receiver may support multiple services e.g. Out-of-Hours, Clinical Assessment Service under one organisation (on the same system) and consideration should be given to maintaining service identifiers and workflow type against Message Definitions.  It's advisable to make this a configurable option which providers can maintain themselves as new services come onboard.\n","operationId":"getMessageDefinition","parameters":[{"$ref":"#/components/parameters/context_QParam"}],"responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/MessageDefinition"},"example":{"resourceType":"Bundle","id":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"]},"type":"searchset","total":1,"timestamp":"2021-10-11T12:15:10+00:00","link":[{"relation":"self","url":"https://simplifier.net/nhsbookingandreferrals/MessageDefinition?context=2000099999"}],"entry":[{"resource":{"resourceType":"MessageDefinition","id":"11882ae2-211f-49ee-acbe-e319304d80cd","meta":{"profile":["https://fhir.nhs.uk/StructureDefinition/BARSMessageDefinition-ServiceRequest-Request"]},"url":"https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request","name":"BARS Message Definition ServiceRequest - Request CaseTransfer","title":"BARS Message Definition ServiceRequest - Request CaseTransfer","status":"active","date":"2021-12-08","eventCoding":{"system":"https://fhir.nhs.uk/CodeSystem/message-events-bars","code":"servicerequest-request"},"useContext":[{"code":[{"system":"https://fhir.nhs.uk/CodeSystem/dos-id","code":"2000099999"},{"system":"https://fhir.nhs.uk/CodeSystem/usecases-categories-bars","code":"referraltopharmacy"}],"valueCodeableConcept":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/variant-state","code":"positive"}]}}],"focus":[{"code":"Bundle","profile":"https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage","min":1,"max":"1"},{"code":"MessageHeader","profile":"https://fhir.nhs.uk/StructureDefinition/BARSMessageHeader-servicerequest-request","min":1,"max":"1"},{"code":"ServiceRequest","profile":"https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-casetransfer","min":1,"max":"1"},{"code":"Patient","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient","min":1,"max":"1"},{"code":"Encounter","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Encounter","min":1,"max":"1"},{"code":"Location","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location","min":1,"max":"1"},{"code":"Organization","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization","min":1,"max":"1"},{"code":"Practitioner","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner","min":1,"max":"1"},{"code":"PractitionerRole","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole","min":1,"max":"1"},{"code":"Observation","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation","min":1,"max":"1"},{"code":"Flag","profile":"http://hl7.org/fhir/StructureDefinition/Flag","min":1,"max":"1"},{"code":"MedicationStatement","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationStatement","min":1,"max":"1"},{"code":"AllergyIntolerance","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-AllergyIntolerance","min":1,"max":"1"},{"code":"QuestionnaireResponse","profile":"http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse","min":1,"max":"1"},{"code":"Consent","profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Consent","min":1,"max":"1"}]}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/MessageDefinition"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/$process-message":{"parameters":[{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"},{"$ref":"#/components/parameters/use-context_HParam"}],"post":{"tags":["Message"],"summary":"Process a message","description":"\n### Using $process-message\nThe inherent flexibility of the various workflows supported by BaRS is facilitated by the $process-message endpoint. The example in the \"Try this API\" feature for this endpoint is a referral request.\n\n### Function\n| Function| API Call|Description\n| ----                              | ----                   | ----                 |\n| Making a referral request         | POST /$process-message | The sender will POST a FHIR Bundle, including the FHIR resources defined in MessageDefinition requested previously, the 'focus' being a ServiceRequest resource, supported by Encounter, Observation, Flag etc. The MessageHeader resource will indicate the activity required through use of 'event', 'reason' and 'focus' data elements.<cr> The MessageHeader resource will indicate the activity required. An example of this can be found [here.](https://simplifier.net/NHSBookingandReferrals/79120f41-a431-4f08-bcc5-1e67006fcae0/~json)|\n| Respond to a referral             | POST /$process-message | A receiver wanting to respond to a request will direct their response to the Sender's $process-message endpoint, reversing the previous request/response roles. All implementers (senders or receivers) of BaRS must build a $process-message endpoint to be able to support the asynchronous workflows which involve such feedback responses. An example of this can be found [here.](https://simplifier.net/nhsbookingandreferrals/bc040878-cf51-4acf-9ede-7448fbb5be7c-duplicate-2)|\n| Cancelling a referral             | POST /$process-message | An updated payload request ensuring the status of the service request is set to 'revoked', as a minimum.An example of this can be found [here.](https://simplifier.net/nhsbookingandreferrals/a961e68a-50e9-4988-9b14-4bfa4629d761)|\n| Making a booking                  | POST /$process-message | Once a slot has been identified, the sender makes a request to book through the $process-message endpoint. The receivers MessageDefinition defines the required FHIR resources and must including reference to the service request, if applicable. The MessageHeader resource will indicate the activity required.An example of this can be found [here.](https://simplifier.net/nhsbookingandreferrals/777a156c-af3c-4748-a8a3-7e95e4b0df9a)|\n| Respond to a booking              | POST /$process-message | A sender may receive a response to a booking they've made, for example, where a patient fails to attend. The original receiver (now the sender, in effect) will respond to the original sender (now the receiver) with an updated payload to reflect the current state of the booking e.g. DNA.|\n| Cancelling a booking (and rebook) | POST /$process-message | An updated payload request ensuring the status of the appointment is set to 'cancelled', as a minimum.|\n\nfor more information on processing requests, please see the guidance within our [End-to-End Workflow](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Design/Design--Core#End-to-end-workflow) documentation.\n","operationId":"processMessage","requestBody":{"description":"Message Details","required":true,"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/MessageBundle"},"example":{"resourceType":"Bundle","id":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","meta":{"versionId":"1.0.0-alpha","lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage"]},"type":"message","timestamp":"2021-10-11T12:15:10+00:00","entry":[{"fullUrl":"urn:uuid:c5957fdd-097b-409d-a406-49c52ceef2cd","resource":{"resourceType":"MessageHeader","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.nhs.uk/StructureDefinition/BARSMessageHeader-booking-request"]},"eventCoding":{"system":"https://fhir.nhs.uk/CodeSystem/message-events-bars","code":"booking-request"},"destination":[{"endpoint":"http://fhir.nhs.uk/Id/dos-service-id|111111111","receiver":{"reference":"urn:uuid:43a42f7a-a6f2-42a5-a8f0-fc85abf8c3fa"}}],"sender":{"reference":"urn:uuid:6324587b-eb70-4333-9db2-22d48f64c9ba"},"source":{"name":"My organisation name","software":"My software name","version":"2.1.45","contact":{"system":"phone","value":"+44 (0113) 123 4567"},"endpoint":"http://fhir.nhs.uk/Id/dos-service-id|2222222222"},"reason":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/message-reason-bars","code":"new"}]},"focus":[{"reference":"urn:uuid:aca94bdb-2e38-4399-9ece-2ba083ce65b5"}],"definition":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request"}},{"fullUrl":"urn:uuid:aca94bdb-2e38-4399-9ece-2ba083ce65b5","resource":{"resourceType":"Appointment","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Appointment","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"booked","description":"Reason for calling-","start":"2021-10-12T12:30:30+00:00","end":"2021-10-12T12:40:30+00:00","slot":[{"reference":"urn:uuid:deb4c4b3-870b-4599-84df-5e54cef7afda"}],"created":"2021-10-11T15:01:30+00:00","participant":[{"actor":{"reference":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"},"status":"accepted"}]}},{"fullUrl":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2","resource":{"resourceType":"Patient","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient"]},"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-EthnicCategory","valueCodeableConcept":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategory","code":"A","display":"British, Mixed British"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/patient-religion","valueCodeableConcept":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ReligiousAffiliation","code":"1041","display":"Roman Catholic Church"}]}}],"identifier":[{"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus","valueCodeableConcept":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus","code":"number-present-and-verified","display":"Number present and verified"}]}}],"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9476719931"}],"name":[{"use":"official","text":"Mr Peter Chalmers","family":"Chalmers","given":["Peter"],"prefix":["Mr"]}],"gender":"male","birthDate":"1974-12-25","address":[{"use":"home","text":"123 High Street, Leeds LS1 4HR","line":["123 High Street","Leeds"],"city":"Leeds","postalCode":"LS1 4HR"}],"contact":[{"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactRank","valuePositiveInt":1}],"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"ONESELF"}]}],"telecom":[{"system":"phone","value":"01138698975","use":"home","rank":2},{"system":"phone","value":"07736312544","use":"mobile","rank":1},{"system":"email","value":"jjones@hotmail.co.uk","use":"home","rank":1}]},{"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactRank","valuePositiveInt":2}],"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"NEPHEW"}]}],"name":{"family":"Grayson","given":["Jack"]},"telecom":[{"system":"phone","value":"0789 1234567","rank":1}],"gender":"male"}],"communication":[{"language":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-HumanLanguage","code":"en","display":"English"}]},"preferred":true}],"generalPractitioner":[{"reference":"urn:uuid:c8c21609-cb27-4958-8eb2-37c76f3def85"}]}},{"fullUrl":"urn:uuid:c8c21609-cb27-4958-8eb2-37c76f3def85","resource":{"resourceType":"Organization","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"]},"identifier":[{"system":"https://fhir.nhs.uk/id/ods-organization-code","value":"G82080"}],"name":"Patient's Surgery"}},{"fullUrl":"urn:uuid:deb4c4b3-870b-4599-84df-5e54cef7afda","resource":{"resourceType":"Slot","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Slot","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Slot"]},"serviceCategory":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/service-category","code":"14","display":"Emergency Department"}]}],"appointmentType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0276","code":"EMERGENCY","display":"Emergency appointment"}]},"schedule":{"reference":"urn:uuid:3a62607b-df65-4932-940c-14262787f62d"},"status":"busy","start":"2021-10-06T10:00:00.000+00:00","end":"2021-10-06T11:00:00.000+00:00"}},{"fullUrl":"urn:uuid:3a62607b-df65-4932-940c-14262787f62d","resource":{"resourceType":"Schedule","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Schedule","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule"]},"identifier":[{"system":"https://system.supplier.co.uk/Diary/id","value":"8622dfdb-dc6a-47b6-b3a7-2eb2829db287"}],"actor":[{"reference":"urn:uuid:e5fd53eb-7b1d-496d-bbf8-5c9dc7bd761b"},{"reference":"urn:uuid:52428e73-0a5c-455d-8ff5-cd080e557082"},{"reference":"urn:uuid:6daaadd8-56e0-4d74-8350-1632331c5452"}]}},{"fullUrl":"urn:uuid:e5fd53eb-7b1d-496d-bbf8-5c9dc7bd761b","resource":{"resourceType":"HealthcareService","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"https://system.supplier.co.uk/My/Healthcare/Services","value":"100"}],"location":[{"reference":"urn:uuid:860e4c37-4e36-45fb-8fca-41132cd937a5"}],"name":"Healthcare Service Name"}},{"fullUrl":"urn:uuid:6daaadd8-56e0-4d74-8350-1632331c5452","resource":{"resourceType":"Practitioner","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"]},"name":[{"family":"Bloggs","given":["Joe"],"prefix":["Dr"]}]}},{"fullUrl":"urn:uuid:52428e73-0a5c-455d-8ff5-cd080e557082","resource":{"resourceType":"PractitionerRole","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"]},"code":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/practitioner-role","code":"doctor","display":"Doctor"}]}]}},{"fullUrl":"urn:uuid:860e4c37-4e36-45fb-8fca-41132cd937a5","resource":{"resourceType":"Location","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location"]},"name":"Healthcare Service Location","position":{"longitude":143.20196,"latitude":-37.22866}}},{"fullUrl":"urn:uuid:43a42f7a-a6f2-42a5-a8f0-fc85abf8c3fa","resource":{"resourceType":"Organization","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"]},"name":"ORIGINAL Receiving/performing Organization"}},{"fullUrl":"urn:uuid:6324587b-eb70-4333-9db2-22d48f64c9ba","resource":{"resourceType":"Organization","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"]},"name":"ORIGINAL Sender Organization"}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/MessageBundle"}}}},"responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/MessageBundle"},"example":{"resourceType":"Bundle","id":"99173438-ebba-453a-998d-8f1ef006d76e","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"]},"type":"message","timestamp":"2021-10-11T12:15:10+00:00","entry":[{"fullUrl":"urn:uuid:c5957fdd-097b-409d-a406-49c52ceef2cd","resource":{"resourceType":"MessageHeader","id":"19f6bf75-3cb3-4059-bf32-10d4666ec5c0","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader"]},"eventCoding":{"system":"https://fhir.nhs.uk/CodeSystem/message-event-servicerequest","code":"booking-request"},"destination":[{"receiver":{"reference":":uuid:43a42f7a-a6f2-42a5-a8f0-fc85abf8c3fa"},"endpoint":"[ODSCode]:[DoSId]"}],"sender":{"reference":"urn:uuid:6324587b-eb70-4333-9db2-22d48f64c9ba"},"source":{"name":"My organisation name","software":"My software name","endpoint":"[ODSCode]:[DoSId]"},"reason":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/message-reason-servicerequest","code":"new"}]},"focus":[{"reference":"urn:uuid:aca94bdb-2e38-4399-9ece-2ba083ce65b5","type":"Appointment"}]}},{"fullUrl":"urn:uuid:aca94bdb-2e38-4399-9ece-2ba083ce65b5","resource":{"resourceType":"Appointment","id":"e284470a-6695-4c95-b2ad-fa26b3a486c7","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"booked","description":"Reason for calling-","start":"2021-10-12T12:30:30+00:00","end":"2021-10-12T12:40:30+00:00","slot":[{"reference":"Slot/c3f6145e-1a26-4345-b3f2-dccbcba62049"}],"created":"2021-10-11T15:01:30+00:00","basedOn":[{"reference":"ServiceRequest/71d2b38e-b81c-4894-a522-6a65265b1d58","type":"serviceRequest"}],"participant":[{"actor":{"reference":"Patient/9476719931"}}]}},{"fullUrl":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2","resource":{"resourceType":"Patient","id":"39907365-9051-4108-b460-f657d4d5ff72","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient"]},"identifier":[{"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus","valueCodeableConcept":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus","code":"number-present-and-verified","display":"Number present and verified"}]}}],"use":"official","system":"https://fhir.nhs.uk/Id/nhs-number","value":"9476719931"}],"name":[{"use":"official","family":"Chalmers","given":["Peter"],"prefix":["Mr"]}],"telecom":[{"system":"phone","value":"01234 567 890","use":"home","rank":1}],"gender":"male","birthDate":"1974-12-25","address":[{"use":"home","text":"123 High Street, Leeds LS1 4HR","line":["123 High Street","Leeds"],"city":"Leeds","postalCode":"LS1 4HR"}]}},{"fullUrl":"urn:uuid:deb4c4b3-870b-4599-84df-5e54cef7afda","resource":{"resourceType":"Slot","id":"c3f6145e-1a26-4345-b3f2-dccbcba62049","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Slot"]},"serviceCategory":[{"coding":[{"code":"14","display":"Emergency Department"}]}],"appointmentType":{"coding":[{"code":"EMERGENCY","display":"Emergency appointment"}]},"Schedule":{"reference":"Schedule/{ScheduleItem}"},"status":"busy","start":"2021-10-06T10:00:00.000+00:00","end":"2021-10-06T11:00:00.000+00:00"}},{"fullUrl":"urn:uuid:3a62607b-df65-4932-940c-14262787f62d","resource":{"resourceType":"Schedule","id":"{ScheduleItem}","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule"]},"identifier":[{"system":"https://system.supplier.co.uk/Diary/id","value":"8622dfdb-dc6a-47b6-b3a7-2eb2829db287"}],"actor":[{"reference":"HealthcareService/{HealcareServiceid}"},{"reference":"PractitionerRole/{PractitionerRoleid}"},{"reference":"Practitioner/{Practitionerid}"}]}},{"fullUrl":"urn:uuid:e5fd53eb-7b1d-496d-bbf8-5c9dc7bd761b","resource":{"resourceType":"HealthcareService","id":"[HealcareServiceid]","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Healthservice"]},"identifier":[{"system":"https://system.supplier.co.uk/My/Healthcare/Services","value":"100"}],"location":[{"reference":"Location/Locationid"}],"name":"Healthcare Service Name"}},{"fullUrl":"urn:uuid:6daaadd8-56e0-4d74-8350-1632331c5452","resource":{"resourceType":"Practitioner","id":"[Practitionerid]","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"]},"name":[{"family":"Bloggs","given":["Joe"],"prefix":["Dr"]}]}},{"fullUrl":"urn:uuid:52428e73-0a5c-455d-8ff5-cd080e557082","resource":{"resourceType":"PractitionerRole","id":"[PractitionerRoleid]","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"]},"code":[{"coding":[{"system":"https://fhir.hl7.org.uk/ValueSet/UKCore-PractitionerRoleCode","version":"4.0.1","code":"doctor","display":"Doctor"}]}]}},{"fullUrl":"urn:uuid:860e4c37-4e36-45fb-8fca-41132cd937a5","resource":{"resourceType":"Location","id":"[Locationid]","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location"]},"name":"Healthcare Service Location","position":{"longitude":143.20196,"latitude":-37.22866}}},{"fullUrl":"urn:uuid:43a42f7a-a6f2-42a5-a8f0-fc85abf8c3fa","resource":{"resourceType":"Organization","id":"09017012-e82d-4cb0-9139-9159a77d25a6","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"]},"name":"ORIGINAL Receiving/performing Organization"}},{"fullUrl":"urn:uuid:6324587b-eb70-4333-9db2-22d48f64c9ba","resource":{"resourceType":"Organization","id":"adb0016f-976e-4568-8a8d-2bfe26254990","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"]},"name":"ORIGINAL Sender Organization"}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/MessageBundle"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/Slot":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Slots"],"summary":"Get slots","description":"\n### Get available slots\n\nA call to Slots is for querying a target endpoint for suitable slots to book a new Appointment into for a patient. \nA request for slots support various filter parameters but requires the service identifier, slot status(es) and a timeframe to limit the search. \n\nAs documented in the [NHS Booking Standard](https://developer.nhs.uk/apis/uec-appointments/fs_slotmanagement.html), a receiver assigns the service identifier to groups of slots, under a schedule, which ties schedules together for a particular service.\n","operationId":"getSlots","parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter. \n\nIf attempting to filter by multiple status' they must be separated with commas as opposed to defining the query parameter twice as defined in [FHIR Guidance](https://hl7.org/fhir/search.html#combining)\n\nFor example \"GET [base]/Slot?status=free,busy\".  \n","required":true,"explode":true,"schema":{"type":"array","items":{"type":"string","enum":["free","busy"],"default":"free"}}},{"name":"start","in":"query","required":true,"description":"Slot start date/time (yyyy-mm-ddThh:mm:ss+00:00).\nTo search for time windows within which Slots must start, use \"greater than\" and \"less than\" searching.\n\nFor example \"GET [base]/Slot?start=ge2022-03-01T12:00:00+00:00&start=le2022-03-01T13:30:00+00:00\". \nThe definition of the time window within which Slots are requested is provided by using this parameter twice.\nThe values must include an offset indicating UTC in the [FHIR dateTime format](https://www.hl7.org/fhir/datatypes.html#primitive). This is the case for all dateTimes in the BaRS standard.\n","schema":{"format":"datetime","type":"string","example":"2022-03-01T12:00:00+00:00"}},{"name":"Schedule.actor:HealthcareService","in":"query","required":false,"description":"A single service ID can be provided to indicate the service for which appointment slots are returned for.\n","schema":{"type":"string","example":"2000099999"}},{"name":"_include","in":"query","description":"Inclusions that drive the rescusive depth of the search. There is a minimum of the following _include parameters required for current Applications.\n* Slot:schedule\n* Schedule:actor:HealthcareService            \n\n**Note**: Both _include and _revinclude share the same syntax - up to three components, separated by colon characters (:). \nUnlike search queries, this is not a FHIRPath expression\nThe full list of applicable _includes are shown below. If any cannot be honored the Receiver will respond, ignoring the unsupported _include(s), with the url reflecting this omission in the responses Bundle.link.url. \n\n|Expression | Inclusion     |Description|\n|-------    |--------       |-------- |\n| Slot:schedule                    | Schedule           | Include Schedule Resources referenced within the  Slot Resources|\n| Schedule:actor:Practitioner      | Practitioner       | Include Practitioner Resources referenced within the  Schedule Resources|\n| Schedule:actor:PractitionerRole  | PractitionerRole   | Include Practitioner Role Resources referenced within the  Schedule Resources |\n| Schedule:actor:HealthcareService | HealthcareService  | Include HealthcareService Resources referenced within the  Schedule Resources|\n| HealthcareService:providedBy     | ProvidedBy         | Include Organization Resources referenced within the  HealthcareService Resources|\n| HealthcareService:location       | Location           | Include Location Resources referenced within the  HealthcareService Resources|\n","required":true,"explode":true,"schema":{"type":"array","items":{"type":"string","enum":["Slot:schedule","Schedule:actor:Practitioner","Schedule:actor:PractitionerRole","Schedule:actor:HealthcareService","HealthcareService:providedBy","HealthcareService:location","Slot:*"]}}}],"responses":{"200":{"description":"Success. A full example of a Slot Searchset response can be found [here](  https://simplifier.net/NHSBookingandReferrals/777a156c-af3c-4748-a8a3-7e95e4b0df9a-duplicate-2).","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/SearchBundleSlot"},"example":{"resourceType":"Bundle","id":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","meta":{"versionId":"1.0.0-alpha","lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"]},"type":"searchset","timestamp":"2021-10-11T12:15:10+00:00","total":8,"link":[{"relation":"self","url":"https://simplifier.net/nhsbookingandreferrals/777a156c-af3c-4748-a8a3-7e95e4b0df9a-duplicate-2"}],"entry":[{"fullUrl":"urn:uuid:73706f31-2578-4377-88c7-c8b8a5891c4a","resource":{"resourceType":"Slot","id":"slot001","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Slot","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Slot"]},"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DeliveryChannel","valueCode":"Telephone"}],"serviceCategory":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/service-category","code":"14","display":"Emergency Department"}]}],"appointmentType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0276","code":"EMERGENCY","display":"Emergency appointment"}]},"schedule":{"reference":"urn:uuid:a5fab26c-0dfd-424f-be1d-afc877c1afb0"},"status":"free","start":"2021-10-06T09:00:00.000+00:00","end":"2021-10-06T10:00:00.000+00:00"}},{"fullUrl":"urn:uuid:9f41ba91-d69a-4269-a558-54a20b79c4f2","resource":{"resourceType":"Slot","id":"slot002","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Slot","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Slot"]},"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DeliveryChannel","valueCode":"Telephone"}],"serviceCategory":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/service-category","code":"14","display":"Emergency Department"}]}],"appointmentType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0276","code":"EMERGENCY","display":"Emergency appointment"}]},"schedule":{"reference":"urn:uuid:a5fab26c-0dfd-424f-be1d-afc877c1afb0"},"status":"free","start":"2021-10-06T10:00:00.000+00:00","end":"2021-10-06T10:30:00.000+00:00"}},{"fullUrl":"urn:uuid:bb094130-c64f-43a8-b22b-d5b30e1b782f","resource":{"resourceType":"Slot","id":"slot003","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Slot","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Slot"]},"extension":[{"url":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DeliveryChannel","valueCode":"Telephone"}],"serviceCategory":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/service-category","code":"14","display":"Emergency Department"}]}],"appointmentType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0276","code":"EMERGENCY","display":"Emergency appointment"}]},"schedule":{"reference":"urn:uuid:a5fab26c-0dfd-424f-be1d-afc877c1afb0"},"status":"free","start":"2021-10-06T11:00:00.000+00:00","end":"2021-10-06T11:30:00.000+00:00"}},{"fullUrl":"urn:uuid:a5fab26c-0dfd-424f-be1d-afc877c1afb0","resource":{"resourceType":"Schedule","id":"sched1111","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Schedule","https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule"]},"identifier":[{"system":"https://system.supplier.co.uk/Diary/id","value":"8622dfdb-dc6a-47b6-b3a7-2eb2829db287"}],"serviceCategory":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/service-category","code":"14","display":"Emergency Department"}]}],"serviceType":[{"coding":[{"system":"http://hl7.org/fhir/ValueSet/service-type","code":"117","display":"Emergency Medical"}]}],"actor":[{"reference":"urn:uuid:7dfe2de5-abbe-4a3c-911f-1482e6fb34c3"},{"reference":"urn:uuid:9e895580-e649-4194-96f8-4a8a8d305fef"},{"reference":"urn:uuid:782bef0c-c90b-41bc-87c1-80f03c0046a5"}]}},{"fullUrl":"urn:uuid:7dfe2de5-abbe-4a3c-911f-1482e6fb34c3","resource":{"id":"2000099999","resourceType":"HealthcareService","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"https://system.supplier.co.uk/My/Healthcare/Services","value":"100"}],"location":[{"reference":"urn:uuid:b3a27952-657e-49ab-9650-fc99094bfb1a"}],"name":"Healthcare Service Name"}},{"fullUrl":"urn:uuid:782bef0c-c90b-41bc-87c1-80f03c0046a5","resource":{"resourceType":"Practitioner","id":"ABCD123456","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"]},"identifier":[{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"ABCD123456"},{"system":"https://fhir.nhs.uk/Id/sds-role-profile-id","value":"R0260"}],"name":[{"family":"Bloggs","given":["Joe"],"prefix":["Dr"]}]}},{"fullUrl":"urn:uuid:9e895580-e649-4194-96f8-4a8a8d305fef","resource":{"resourceType":"PractitionerRole","id":"R0260","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"]},"practitioner":{"reference":"urn:uuid:782bef0c-c90b-41bc-87c1-80f03c0046a5"},"code":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/practitioner-role","code":"doctor","display":"Doctor"}]}]}},{"fullUrl":"urn:uuid:b3a27952-657e-49ab-9650-fc99094bfb1a","resource":{"resourceType":"Location","id":"loc1111","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location"]},"name":"Healthcare Service Location","position":{"longitude":143.20196,"latitude":-37.22866}}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/SearchBundleSlot"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/Appointment":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Booking"],"summary":"Get bookings for a patient","description":"\n### Returns bookings for a specified patient\nUse this endpoint to get all bookings for a given patient. All bookings for the specified patient at the specified target endpoint will be returned. \n\nIf a sender wants to cancel a particular booking, they must perform a read first, comparing and amending the details prior to performing the update.\n","operationId":"getBookingByPatient","parameters":[{"$ref":"#/components/parameters/PatientId_QParam"}],"responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/SearchBundleAppt"},"example":{"resourceType":"Bundle","type":"searchset","total":2,"link":[{"relation":"self","url":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Appointment"}],"entry":[{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Appointment/c3f6145e-1a26-4345-b3f2-dccbcba62049","resource":{"resourceType":"Appointment","id":"c3f6145e-1a26-4345-b3f2-dccbcba62049","meta":{"lastUpdated":"2021-11-11T12:11:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"booked","description":"Reason for calling","start":"2021-10-12T12:30:30+00:00","end":"2021-10-12T12:40:30+00:00","slot":[{"reference":"Slot/95CA8891-5CB2-4AFC-A6E4-2D20645FDE60"}],"created":"2021-10-11T15:01:30+00:00","basedOn":[{"reference":"ServiceRequest/136bb75d-90ef-461f-4773-fde7f899803d","type":"ServiceRequest"}],"participant":[{"actor":{"reference":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"},"status":"accepted","type":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType","code":"ATND","display":"attender"}]}]}]},"search":{"mode":"match"}},{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Appointment/91607239-b002-470a-8709-6b25bd50fdd1","resource":{"resourceType":"Appointment","id":"91607239-b002-470a-8709-6b25bd50fdd1","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"booked","description":"Reason for calling","start":"2021-10-12T12:30:30+00:00","end":"2021-10-12T12:40:30+00:00","slot":[{"reference":"Slot/deb4c4b3-870b-4599-84df-5e54cef7afda"}],"created":"2021-10-11T15:01:30+00:00","basedOn":[{"reference":"ServiceRequest/236bb75d-90ef-461f-b71e-fde7f899802c","type":"ServiceRequest"}],"participant":[{"actor":{"reference":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"},"status":"accepted","type":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType","code":"ATND","display":"attender"}]}]}]},"search":{"mode":"match"}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/SearchBundleAppt"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/Appointment/{id}":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RegistryId_Param"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Booking"],"summary":"Get a specific booking","description":"\n### Returns specific booking by id\nUse this endpoint to get a specific booking by its unique id. A booking with the specified identifier at the specified target endpoint will be returned, should it exist. \n\nIf a sender wants to cancel a booking, they must perform a read first, comparing and amending the details prior to performing the update.\n","operationId":"getBooking","responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Appointment"},"example":{"resourceType":"Appointment","id":"91607239-b002-470a-8709-6b25bd50fdd1","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"booked","description":"Reason for calling","start":"2021-10-12T12:30:30+00:00","end":"2021-10-12T12:40:30+00:00","slot":[{"reference":"urn:uuid:deb4c4b3-870b-4599-84df-5e54cef7afda"}],"created":"2021-10-11T15:01:30+00:00","basedOn":[{"reference":"ServiceRequest/236bb75d-90ef-461f-b71e-fde7f899802c","type":"serviceRequest"}],"participant":[{"actor":{"reference":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"},"status":"accepted"}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/Appointment"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/ServiceRequest":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Referral"],"summary":"Get referral/s for a patient","description":"\n### Returns service requests for a specified patient\n\nUse this endpoint to get all service requests for a given patient. All service requests for the specified patient at the specified target endpoint will be returned. \n\nIf a sender wants to cancel a service request, they must perform a read first and amend the response version when updating.\n","operationId":"getReferralByPatient","parameters":[{"$ref":"#/components/parameters/PatientId_QParam"},{"$ref":"#/components/parameters/ServiceRequestId_QParam"}],"responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/SearchBundleRef"},"example":{"resourceType":"Bundle","type":"searchset","total":1,"link":[{"relation":"self","url":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/ServiceRequest"}],"entry":[{"resourceType":"ServiceRequest","id":"71d2b38e-b81c-4894-a522-6a65265b1d58","meta":{"lastUpdated":"2021-11-26T15:00:00+00:00","profile":["https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-validation"]},"basedOn":{"reference":"urn:uuid:9f748662-afde-540e-a6d5-8cd6ae63cd56"},"status":"active","intent":"plan","category":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/message-category-servicerequest","code":"referral","display":"Transfer of Care"}]}],"subject":{"reference":"urn:uuid:9589fb37-87a2-48d8-968f-b371429208a8"},"encounter":{"reference":"urn:uuid:8c63d621-4d86-4f57-8699-e8e22d49935d"},"occurrencePeriod":{"start":"2021-11-26T15:00:00+00:00","end":"2021-11-26T15:20:00+00:00"},"authoredOn":"2021-11-26T15:00:00+00:00","requester":{"reference":"urn:uuid:7d948662-bade-450e-b6c5-9bb6ee39cb56"},"performer":[{"reference":"d5ffd0cd-ec7e-48a1-84f1-91f4c0eb8fc5"}],"locationReference":[{"reference":"urn:uuid:2ec99e82-a0af-4b70-bd53-1869d84b2ad1"}],"supportingInfo":[{"reference":"urn:uuid:d877b820-e72b-44d1-a627-195f54bfc606","display":"Rejected Services - Patient Choice in Service Selection - Details"}],"PatientInstruction":"ADVICE GIVEN: If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns","search":{"mode":"match"}}]}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/SearchBundleRef"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/ServiceRequest/{id}":{"parameters":[{"$ref":"#/components/parameters/RegistryId_Param"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/RequestingPractitioner_HParam"},{"$ref":"#/components/parameters/RequestingDevice_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"get":{"tags":["Referral"],"summary":"Get a specific referral","description":"\n### Returns specific service request by id\nUse this endpoint to get a specific service request by its unique id. A service request with the specified identifier at the specified target endpoint will be returned, should it exist. \n\nIf a sender wants to cancel a service request, they must perform a read first, comparing and amending the details prior to performing the update.\n","operationId":"getReferral","responses":{"200":{"description":"Success","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/ServiceRequest"},"example":{"resourceType":"ServiceRequest","id":"71d2b38e-b81c-4894-a522-6a65265b1d58","meta":{"lastUpdated":"2021-11-26T15:00:00+00:00","profile":["https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-validation"]},"basedOn":{"reference":"urn:uuid:9f748662-afde-540e-a6d5-8cd6ae63cd56"},"status":"active","intent":"plan","category":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/message-category-servicerequest","code":"referral","display":"Transfer of Care"}]}],"subject":{"reference":"urn:uuid:9589fb37-87a2-48d8-968f-b371429208a8"},"encounter":{"reference":"urn:uuid:8c63d621-4d86-4f57-8699-e8e22d49935d"},"occurrencePeriod":{"start":"2021-11-26T15:00:00+00:00","end":"2021-11-26T15:20:00+00:00"},"authoredOn":"2021-11-26T15:00:00+00:00","requester":{"reference":"urn:uuid:7d948662-bade-450e-b6c5-9bb6ee39cb56"},"performer":[{"reference":"d5ffd0cd-ec7e-48a1-84f1-91f4c0eb8fc5"}],"locationReference":[{"reference":"urn:uuid:2ec99e82-a0af-4b70-bd53-1869d84b2ad1"}],"supportingInfo":[{"reference":"urn:uuid:d877b820-e72b-44d1-a627-195f54bfc606","display":"Rejected Services - Patient Choice in Service Selection - Details"}],"PatientInstruction":"ADVICE GIVEN: If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns"}},"application/fhir+xml":{"schema":{"$ref":"#/components/schemas/ServiceRequest"}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}}},"components":{"parameters":{"RegistryId_Param":{"name":"id","description":"The identifier of the registry object.","in":"path","schema":{"type":"string","format":"uuid","example":"c3f6145e-1a26-4345-b3f2-dccbcba62049"},"required":true,"allowEmptyValue":false},"context_QParam":{"name":"context","description":"The target service identifier. Allowing the ability to filter returned message definitions by the specified service id. In this example a DoS id. The preferred format is system|value however a value should be accepted and honoured as per [FHIR guidance](https://www.hl7.org/fhir/search.html#token).\n","required":true,"in":"query","schema":{"type":"string","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fdos-service-id%7C2000099999"}},"PatientId_QParam":{"name":"patient:identifier","description":"The patient's NHS number. The primary identifier of a patient across systems, unique to NHS England and Wales.\n\n|Type           |Expression|\n|-------             | --------|\n|[token](https://hl7.org/implement/standards/FHIR/search.html#token) |Appointment.participant.actor:identifier |\n","required":true,"in":"query","schema":{"type":"string","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C4857773456"}},"ServiceRequestId_QParam":{"name":"ServiceRequest.identifier","description":"The unique booking reference number of the refferal, or the Unique GUID/UUID of the referral request. This is not the same as ServiceRequest.id. The preferred format is system|value however a value should be accepted and honoured as per [FHIR guidance](https://www.hl7.org/fhir/search.html#token).\n     \n|Type           |Expression|\n|-------             | --------|\n|[token](https://hl7.org/fhir/R4/servicerequest.html#search) |ServiceRequest.identifier |\n","required":false,"in":"query","schema":{"type":"string","example":"http%3A%2F%2Fservicerequest.system%7C10000000000"}},"TargetIdentifier_HParam":{"name":"NHSD-Target-Identifier","description":"The identifier of the Target system. A Base64 encoded object containing value and system properties.","required":true,"in":"header","schema":{"$ref":"#/components/schemas/TargetIdentifier"}},"TargetIdentifierMeta_HParam":{"name":"NHSD-Target-Identifier","description":"The identifier of the Target system. A Base64 encoded object containing value and system properties.","required":false,"in":"header","schema":{"$ref":"#/components/schemas/TargetIdentifier"}},"RequestingDevice_HParam":{"name":"NHSD-Requesting-Software","description":"Requesting Software described in an object based on a FHIR 'Device' resource (Standard Base64 encoded JSON).\nDifferent BaRS Applications may have different standards and requirements for the Access Control which these headers are used for. \n\nThe identifier used, though arbitrary, should be consistent across instances of a product, the name and version of the product should also be accurate and consistent.\n","required":true,"in":"header","schema":{"$ref":"#/components/schemas/RequestingSoftware"}},"RequestingOrganisation_HParam":{"name":"NHSD-End-User-Organisation","description":"Requesting Organization described in an object based on a FHIR 'Organization' resource (Standard Base64 encoded JSON).\nDifferent BaRS Applications may have different standards and requirements for the Access Control which these headers are used for. \nIn the example given an ODS code and the Organisation name is provided. Other identifiers are permitted if required. \n","required":true,"in":"header","schema":{"$ref":"#/components/schemas/RequestingOrganisation"}},"RequestingPractitioner_HParam":{"name":"NHSD-Requesting-Practitioner","description":"Requesting Practitioner described in an object based on a FHIR 'PractitionerRole' resource (Standard Base64 encoded JSON).\n\nThis item is not mandatory, however if the information is available it must be included in the request. Only in the event that it is not available, should it be omitted.\n\nThe example given shows a General Practitioner and their SDS Role profile Id.\n","required":false,"in":"header","schema":{"$ref":"#/components/schemas/RequestingPractitioner"}},"RequestId_HParam":{"name":"X-Request-Id","description":"The X-Request-Id for the request header, when supplied, mirrored back by the receiver.","required":true,"in":"header","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}},"CorrelationId_HParam":{"name":"X-Correlation-Id","description":"The X-Correlation-Id for the request header, when supplied, mirrored back by the receiver.","required":true,"in":"header","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"Accept_HParam":{"name":"Accept","description":"The Accept Header must also contain the version of the API required.","in":"header","required":true,"schema":{"type":"string","example":"'application/fhir+json; version=1.0.0'        \n"}},"use-context_HParam":{"name":"use-context","description":"This header is for usage statistics for the BaRS Proxy for NHS England.","in":"header","required":true,"schema":{"type":"string","example":"a4t2|validation|servicerequest-response|new  \n"}}},"responses":{"4XX-BARS":{"description":"Below are examples of potential HTTP status codes and their associated error codes, which could be returned in the event of a fault. \nGuidance on error handling within BaRS can be found [here](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Design/Design--Core#Error-handling).\n\n| HTTP status | Error code                 | Description |\n| ----------- | -------------------------- | --------------------------------------------- |\n| 400         | SEND_BAD_REQUEST           | The API was unable to process the request. |\n| 400         | REC_BAD_REQUEST            | The Receiver has responded stating the message was malformed. |\n| 401         | SEND_UNAUTHORIZED          | The API deemed you unauthorized to make this request. |\n| 401         | REC_UNAUTHORIZED           | The receiver deemed you unauthorized to make request. |\n| 403         | SEND_FORBIDDEN             | Missing or Expired Token. |\n| 404         | PROXY_NOT_FOUND            | No related people exist for given NHS number. |\n| 404         | REC_NOT_FOUND              | Patient record for given NHS number has been invalidated and not superseded by another NHS number. |\n| 405         | SEND_METHOD_NOT_ALLOWED    | HTTP Verb is not correct for this scenario.|\n| 405         | REC_METHOD_NOT_ALLOWED     | Receiver does not allow this.|\n| 405         | PROXY_METHOD_NOT_ALLOWED   | Proxy does not allow this.|\n| 406         | SEND_NOT_ACCEPTABLE        | Senders message had an incorrect content type defined for a response.|\n| 408         | REC_TIMEOUT                | The downstream domain processing has not completed within the configured timeout period. |\n| 409         | SEND_CONFLICT              |  |\n| 409         | REC_CONFLICT               |  |\n| 409         | PROXY_CONFLICT             |  |\n| 422         | SEND_UNPROCESSABLE_ENTITY  | Message was not malformed but deemed unprocessable. |\n| 422         | REC_UNPROCESSABLE_ENTITY   | Message was not malformed but deemed unprocessable. |         \n| 422         | PROXY_UNPROCESSABLE_ENTITY | Message was not malformed but deemed unprocessable. |         \n| 429         | SEND_TOO_MANY_REQUESTS     | The user has sent too many requests in a given amount of time|\n| 429         | REC_TOO_MANY_REQUESTS      | The user has sent too many requests in a given amount of time|\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationalOutcome"},"example":{"resourceType":"OperationOutcome","id":"531e073a-3295-4e67-ae90-e00bd96a9cdd","meta":{"profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome"]},"issue":[{"severity":"error","code":"invariant","details":{"coding":[{"system":"https://fhir.nhs.uk/Codesystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"diagnostics":"Attempts to Validate the message have failed."}]}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}},"5XX-BARS":{"description":"Below are examples of potential HTTP status codes and their associated error codes, which could be returned in the event of a fault. \nGuidance on error handling within BaRS can be found [here](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Design/Design--Core#Error-handling).\n\n| HTTP status | Error code                 | Description |\n| ----------- | -------------------------- | --------------------------------------------- |\n| 500         | REC_SERVER_ERROR           | The receiver server has encountered an Error processing the request. |\n| 500         | PROXY_SERVER_ERROR         | Proxy Error. |\n| 501         | SEND_NOT_IMPLEMENTED       | The Request was not recognized. |\n| 501         | REC_NOT_IMPLEMENTED        | The Receiver did not recognize the request. |\n| 501         | PROXY_NOT_IMPLEMENTED      | The Proxy did not recognize the request. |\n| 503         | REC_UNAVAILABLE            | The Receiver was unavailable to service the request.|\n| 503         | PROXY_UNAVAILABLE          | The Proxy was unavailable to service the request. |\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationalOutcome"},"example":{"resourceType":"OperationOutcome","id":"531e073a-3295-4e67-ae90-e00bd96a9cdd","meta":{"profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome"]},"issue":[{"severity":"error","code":"exception","details":{"coding":[{"system":"https://fhir.nhs.uk/Codesystem/http-error-codes","code":"REC_SERVER_ERROR"}]},"diagnostics":"Too many requests have been made by this source in a given amount of time: <further diagnostics information, error message/error text>"}]}}},"headers":{"X-Correlation-Id":{"description":"The X-Correlation-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"9562466f-c982-4bd5-bb0e-255e9f5e6689"}},"X-Request-Id":{"description":"The X-Request-Id from the request header, if supplied, mirrored back.","schema":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"}}}}},"schemas":{"Capability":{"type":"object","properties":{"resourceType":{"type":"string","example":"CapabilityStatement"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/45bcbe62-718b-4874-a68c-b0fe39a76cf5"}}}},"fhirVersion":{"type":"string","example":"4.0.1"},"status":{"type":"string","example":"active"}}},"TargetIdentifier":{"title":"Identifier","type":"string","format":"byte","example":"eyJ2YWx1ZSI6ICJOSFMwMDAxIiwgInN5c3RlbSI6ICJ0ZXN0cyJ9","description":"Identifier"},"Appointment":{"type":"object","properties":{"resourceType":{"type":"string","example":"Appointment"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/HL7FHIRUKCoreR4/UKCoreAppointment"}}}}}},"SearchBundleAppt":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BaRSBundleMessage"}}}},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":2},"timestamp":{"type":"string"},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"Appointment"},"id":{"type":"string"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/nhsbookingandreferrals/barsservicerequestrequestcasetransfer"}}}}}}}}}}},"ServiceRequest":{"type":"object","properties":{"resourceType":{"type":"string","example":"ServiceRequest"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BARSServiceRequestRequestCaseTransfer"}}}}}},"SearchBundleRef":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BaRSBundleMessage"}}}},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":2},"timestamp":{"type":"string"},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"ServiceRequest"},"id":{"type":"string"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/nhsbookingandreferrals/barsservicerequestrequestcasetransfer"}}}}}}}}}}},"SearchBundleSlot":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BaRSBundleMessage"}}}},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":2},"timestamp":{"type":"string"},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"Slot"},"id":{"type":"string"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string"}}}}}}}}}}},"MessageBundle":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BaRSBundleMessage"}},"type":{"type":"string","example":"message"}}}}},"MessageDefinition":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"696cfcd2-6425-459d-b2ad-91e34a6a1b9c"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/NHSBookingandReferrals/BaRSBundleMessage"}}}},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":2},"timestamp":{"type":"string"},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"MessageDefinition"},"id":{"type":"string"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string"},"example":["https://simplifier.net/NHSBookingandReferrals/BARS-MessageDefinition-ServiceRequest-Request-Referral","https://simplifier.net/nhsbookingandreferrals/bars-messagedefinition-servicerequest-response-referral","https://simplifier.net/nhsbookingandreferrals/bars-messagedefinition-booking-request"]}}}}}}}}}},"OperationalOutcome":{"type":"object","properties":{"resourceType":{"type":"string","example":"OperationalOutcome"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","example":"https://simplifier.net/hl7fhirukcorer4/ukcoreoperationoutcome"}}}}}},"RequestingOrganisation":{"title":"NHSD-End-User-Organisation","description":"Requesting Organization described in an object based on a FHIR 'Organization' resource (Standard Base64 encoded JSON).\nDifferent BaRS Applications may have different standards and requirements for the Access Control which these headers are used for. \n\nIn this example an ODS code and the Organisation name is provided. Other identifiers are permitted if required. \n","type":"string","format":"byte","example":"eyJyZXNvdXJjZVR5cGUiOiJPcmdhbml6YXRpb24iLCJpZGVudGlmaWVyIjpbeyJ2YWx1ZSI6IkExMDAxIiwic3lzdGVtIjoiaHR0cHM6Ly9maGlyLm5ocy51ay9JZC9vZHMtb3JnYW5pemF0aW9uLWNvZGUifV0sIm5hbWUiOiJNeSBzZXJ2aWNlIHByb3ZpZGVyIG5hbWUifQo="},"RequestingPractitioner":{"title":"NHSD-Requesting-Practitioner","description":"Requesting Practitioner described in an object based on a FHIR 'PractitionerRole' resource (Standard Base64 encoded JSON).\n\nThis item is not mandatory, however if the information is available it must be included in the request. Only in the event that it is not available, should it be omitted.\n\nThe Base64 encoded example below shows a General Practitioner and their SDS Role profile Id.\n","type":"string","format":"byte","example":"eyJyZXNvdXJjZVR5cGUiOiJzdHJpbmciLCJpZGVudGlmaWVyIjpbeyJ2YWx1ZSI6InN0cmluZyIsInN5c3RlbSI6InN0cmluZyJ9XSwiY29kZSI6W3siY29kaW5nIjpbeyJzeXN0ZW0iOiJzdHJpbmciLCJjb2RlIjoic3RyaW5nIiwiZGlzcGxheSI6InN0cmluZyJ9XX1dfQo="},"RequestingSoftware":{"title":"NHSD-Requesting-software","type":"string","format":"byte","description":"Requesting Software described in an object based on a FHIR 'Device' resource (Standard Base64 encoded JSON).\nDifferent BaRS Applications may have different standards and requirements for the Access Control which these headers are used for. \n\nThe identifier used here, though arbitrary, should be consistent across instances of a product, the name and version of the product should also be accurate and consistent.\n","example":"eyJyZXNvdXJjZVR5cGUiOiJEZXZpY2UiLCJpZGVudGlmaWVyIjpbeyJzeXN0ZW0iOiJodHRwczovL2NvbnN1bWVyc3VwcGxpZXIuY29tL0lkL2RldmljZS1pZGVudGlmaWVyIiwidmFsdWUiOiJTVVBQLUFQUC0xIn1dLCJkZXZpY2VOYW1lIjp7Im5hbWUiOiJTdXBwbGllciBwcm9kdWN0IG5hbWUiLCJ0eXBlIjoibWFudWZhY3R1cmVyLW5hbWUifSwidmVyc2lvbiI6eyJ2YWx1ZSI6IjEuMC4wIn19Cg=="}},"securitySchemes":{"OAuth_Token":{"type":"http","scheme":"bearer"}}}}