{"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  * manage reference pointers to either a booking or a referral\n  \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/applications/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\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 version is in [development](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 no availability in production \n  * it is subject to breaking changes based on developer feedback\n\n## Service level\nThis API is a platinum service, meaning it is operational and supported 24 hours a day, 365 days a year.\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/Core/1.4.0/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/Core/1.4.0/Error-Handling) for further information on error handling within the BaRS Standard.\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\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=\"https://onboarding.prod.api.platform.nhs.uk/\">developer account</a>, then select 'product onboarding'.</p></div>            \n        </div>\n    </div>\n</div> \n\n## Contact us\nFor help and support connecting to our APIs and to join our developer community, see [Help and support building healthcare software](https://digital.nhs.uk/developer/help-and-support).\n   \n","version":"1.4.0-alpha","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":"DocumentReference"},{"name":"Endpoint"},{"name":"HealthcareService"},{"name":"Message"},{"name":"Metadata"},{"name":"Organization"},{"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":"BaRS-FHIR-Server","url":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4","name":"BaRS FHIR Server CapabilityStatement","status":"active","version":"1.2.0","experimental":false,"date":"2022-09-16T15:00:00+01:00","publisher":"NHS Digital","contact":[{"name":"NHS Booking and Referral Standard","telecom":[{"system":"email","value":"bookingandreferralstandard@nhs.net"}]}],"kind":"instance","software":{"name":"BaRS API","version":"1.1.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","interaction":[{"code":"transaction"},{"code":"search-system"}],"security":[{"service":{"coding":[{"code":"OAuth","system":"http://terminology.hl7.org/CodeSystem/restful-security-service","display":"OAuth"}]}}],"resource":[{"type":"CapabilityStatement","interaction":[{"code":"read"},{"code":"vread"}],"versioning":"no-version"},{"type":"MessageDefinition","interaction":[{"code":"search-type"}],"searchParam":[{"name":"useContext:identifier","type":"token","documentation":"The target service identifier. Allowing the ability to filter returned message definitions by the specified service id."}],"versioning":"no-version"},{"type":"Appointment","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"},{"code":"create"},{"code":"update"},{"code":"delete"}],"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)"}],"versioning":"no-version"},{"type":"DocumentReference","interaction":[{"code":"read"},{"code":"search-type"},{"code":"create"},{"code":"update"},{"code":"delete"}],"searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for a DocumentReference"},{"name":"type","type":"token","documentation":"The specified type of pointers to be returned."},{"name":"custodian:identifier","type":"token","documentation":"The custodian of the DocumentReference"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"},{"name":"next-page-token","type":"token","documentation":"A token that can be sent as either a query parameter or in the post body parameter to retrieve the next set of 20 records"}],"versioning":"no-version"},{"type":"ServiceRequest","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"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)"}],"versioning":"no-version"},{"type":"Slot","interaction":[{"code":"search-type"}],"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"}],"versioning":"no-version"}],"operation":[{"name":"$process-message","definition":"http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message"}]},{"mode":"client","interaction":[{"code":"transaction"},{"code":"search-system"}],"security":[{"service":{"coding":[{"code":"Certificates","system":"http://terminology.hl7.org/CodeSystem/restful-security-service","display":"Certificates"}]}}],"resource":[{"type":"Appointment","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"},{"code":"create"},{"code":"update"},{"code":"delete"}],"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)"}],"versioning":"no-version"},{"type":"DocumentReference","interaction":[{"code":"read"},{"code":"search-type"},{"code":"create"},{"code":"update"},{"code":"delete"}],"searchParam":[{"name":"_id","type":"token","documentation":"Unique identifier for a DocumentReference"},{"name":"type","type":"token","documentation":"The specified type of pointers to be returned."},{"name":"custodian:identifier","type":"token","documentation":"The custodian of the DocumentReference"},{"name":"patient:identifier","type":"token","documentation":"NHS Number (system must be https://fhir.nhs.uk/Id/nhs-number)"},{"name":"next-page-token","type":"token","documentation":"A token that can be sent as either a query parameter or in the post body parameter to retrieve the next set of 20 records"}],"versioning":"no-version"},{"type":"ServiceRequest","interaction":[{"code":"read"},{"code":"vread"},{"code":"search-type"}],"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)"}],"versioning":"no-version"},{"type":"Slot","versioning":"no-version","interaction":[{"code":"search-type"}],"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"}]}],"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":"receiver","definition":"MessageDefinition/bars-message-booking-request"},{"mode":"receiver","definition":"MessageDefinition/bars-message-servicerequest-request-referral"},{"mode":"receiver","definition":"MessageDefinition/bars-message-servicerequest-request-validation"},{"mode":"receiver","definition":"MessageDefinition/bars-message-servicerequest-response-validation-full"},{"mode":"receiver","definition":"MessageDefinition/bars-message-servicerequest-response-validation-interim"},{"mode":"receiver","definition":"MessageDefinition/bars-message-servicerequest-response-referral"},{"mode":"sender","definition":"MessageDefinition/bars-message-booking-request"},{"mode":"sender","definition":"MessageDefinition/bars-message-servicerequest-request-referral"},{"mode":"sender","definition":"MessageDefinition/bars-message-servicerequest-request-validation"},{"mode":"sender","definition":"MessageDefinition/bars-message-servicerequest-response-validation-full"},{"mode":"sender","definition":"MessageDefinition/bars-message-servicerequest-response-validation-interim"},{"mode":"sender","definition":"MessageDefinition/bars-message-servicerequest-response-referral"}]}]}},"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;version=1.0.0":{"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/ca337cfa-f564-4948-97bf-4134968caba6)|\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. Example [here.](https://simplifier.net/nhsbookingandreferrals/777a156c-af3c-4748-a8a3-7e95e4b0df9a-duplicate-2)\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/Core/1.4.0/End-to-end-workflow) documentation, examples of other bundle types can be found [here.](https://simplifier.net/nhsbookingandreferrals/~resources?category=Example&exampletype=Bundle&sortBy=DisplayName)\n","operationId":"processMessage","requestBody":{"description":"Message Details","required":true,"content":{"application/fhir+json;version=1.0.0":{"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\n\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;version=1.0.0":{"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:deb4c4b3-870b-4599-84df-5e54cef7afda","resource":{"resourceType":"Slot","id":"deb4c4b3-870b-4599-84df-5e54cef7afda","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 in a FHIR searchset Bundle containing Appointment resources. \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"},{"$ref":"#/components/parameters/PatientName_QParam"},{"$ref":"#/components/parameters/PatientDoB_QParam"},{"$ref":"#/components/parameters/PatientPostcode_QParam"}],"responses":{"200":{"description":"Success","content":{"application/fhir+json;version=1.0.0":{"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"}}},"post":{"tags":["Booking"],"summary":"Create an Appointment resource","description":"Update a single Appointment resource.     \n","operationId":"createAppointment","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/Appointment"}}},"/Appointment/{id}":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/ResourceId_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 in the format of a FHIR Appointment resource, 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":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}}},"put":{"tags":["Booking"],"summary":"Update an Appointment resource by id","description":"Update a single Appointment resource.     \n","operationId":"updateAppointment","parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/ResourceId_Param"},{"$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"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/Appointment"}},"patch":{"tags":["Booking"],"summary":"Partially update a specific Appointment","description":"Partially update a single Appointment resource.\n","operationId":"patchAppointment","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/AppointmentPatch"}},"delete":{"tags":["Booking"],"summary":"Delete or Cancel a Appointment resource by id","description":"Delete or Cancel a single Appointment resource.     \n","operationId":"deleteAppointment","parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/TargetIdentifier_HParam"},{"$ref":"#/components/parameters/ResourceId_Param"},{"$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"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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":"information","code":"informational","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/NRLF-SuccessCode","code":"RESOURCE_UPDATED","display":"Resource updated"}]},"diagnostics":"Resource updated"}]}}},"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/PatientName_QParam"},{"$ref":"#/components/parameters/PatientDoB_QParam"},{"$ref":"#/components/parameters/PatientPostcode_QParam"},{"$ref":"#/components/parameters/ServiceRequestId_QParam"}],"responses":{"200":{"description":"Success","content":{"application/fhir+json;version=1.0.0":{"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"}}},"post":{"tags":["Referral"],"summary":"Create a Referral","description":"Update a single ServiceRequest resource.  \n","operationId":"createReferral","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/ServiceRequest"}}},"/ServiceRequest/{id}":{"parameters":[{"$ref":"#/components/parameters/ResourceId_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":"Successful","content":{"application/fhir+json;version=1.0.0":{"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"}}},"put":{"tags":["Referral"],"summary":"Update a specific referral","description":"Update a single ServiceRequest resource.  \n","operationId":"putReferral","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/ServiceRequest"}},"patch":{"tags":["Referral"],"summary":"Partially update a specific referral","description":"Update a single ServiceRequest resource.  \n","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"operationId":"patchReferral","responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.0.0":{"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"}},"requestBody":{"$ref":"#/components/requestBodies/ServiceRequestPatch"}},"delete":{"tags":["Referral"],"summary":"Cancel a specific referral","description":"Cancel a specific referral\n","parameters":[{"$ref":"#/components/parameters/use-context_HParam"}],"operationId":"deleteReferral","responses":{"200":{"description":"Successful deletion response","content":{"application/fhir+json;version=1.0.0":{"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":"information","code":"informational","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/NRLF-SuccessCode","code":"RESOURCE_REMOVED","display":"Resource removed"}]},"diagnostics":"Resource removed"}]}}},"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"}}}},"/DocumentReference":{"get":{"tags":["DocumentReference"],"summary":"Retrieve patient's document pointers (GET)","operationId":"searchDocumentReference","parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/subject_QParam"},{"$ref":"#/components/parameters/custodian_QParam"},{"$ref":"#/components/parameters/type_QParam"},{"$ref":"#/components/parameters/nextPageToken_QParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/DocumentReferenceBundle"}}},"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"}},"description":"Retrieve the document pointers for a single patient.  Your request is constrained by the document pointer types\nagreed during onboarding.  The results can also be filtered to return documents by a given `type` and/or created\nby a given producer (`custodian`).\n"},"post":{"tags":["DocumentReference"],"summary":"Create new or update existing document pointer","operationId":"createDocumentReference","parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/Accept_HParam"},{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"201":{"description":"Create / Supersede successful response","content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/OperationalOutcome"},"example":{"resourceType":"DocumentReference","meta":{"profile":["https://simplifier.net/guide/UKCoreDevelopment2/ProfileUKCore-DocumentReference"]}}}},"headers":{"location":{"description":"The location of the created resource.","schema":{"type":"string","format":"uri","example":"/producer/FHIR/R4/DocumentReference/V4T0L-3aeb90b0-7ffa-408a-babf-f20b80ce2c27"}},"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"}},"requestBody":{"$ref":"#/components/requestBodies/DocumentReference"},"description":"Create new pointers.\n\nTo create a document pointer you must ensure:\n\n* the body must be a valid [FHIR R4 DocumentReference](http://hl7.org/fhir/documentreference.html)\n* `subject` MUST be a `Patient` reference using a valid NHS number. e.g.\n  ```json\n  \"subject\": {\n    \"identifier\": {\n      \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n      \"value\": \"3495456481\"\n    }\n  },\n  ```\n* `custodian` MUST contain an `Organization` reference using a valid ODS code, agreed during onboarding. e.g.\n  ```json\n  \"custodian\": {\n    \"identifier\": {\n      \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n      \"value\": \"Y05868\"\n    }\n  }\n  ```\n* `type` MUST match one of the Document Types defined for BaRS, this is either a Appointment (booking) or a Patient referral.\n  ```json\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"749001000000101\",\n        \"display\": \"Appointment (record artifact)\"\n      }\n    ]\n  }\n  ```\n* `category` MUST indicate the broader class of the Document Type as agreed during onboarding, e.g.\n  ```json\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/document-reference-category\",\n          \"code\": \"clinical\",\n          \"display\": \"Clinical\"\n        }\n      ]\n    }\n  ]\n  ```\n* `content` MUST have at least one entry.\n* `content[].format[]` SHOULD indicate the document is structured or not, e.g.\n  ```json\n  \"format\": [\n    {\n      \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode\",\n      \"code\": \"urn:nhs-ic:structured\",\n      \"display\": \"Structured Document\"\n    }\n  ]\n  ```\n* `content[].attachment.url`  MUST contain the direct URL, e.g.\n  ```json\n  \"attachment\": \n    {\n      \"url\": \"https://server.fire.ly/r4/Appointment/GL0-DZOqD39\"\n    }\n  ```\n* `author` SHOULD contain an `Organization` reference using a valid ODS code, agreed during onboarding. e.g.\n  ```json\n  \"author\": [\n    {\n      \"identifier\": {\n        \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n        \"value\": \"Y05868\"\n      }\n    }\n  ]\n  ```\n* `context.period`  SHOULD indicate Appointment date and time, e.g.\n  ```json\n  \"context\": {\n    \"period\": {\n      \"start\": \"2025-02-01T06:45:00+00:00\",\n      \"end\": \"2025-02-01T07:00:00+00:00\"\n    },\n  ```\n* `identifier.[]`  MUST contain the correct identifiers for BaRS including service-id AND product-id, e.g.\n  ```json\n  {\n    \"system\": \"https://fhir.nhs.uk/Id/BaRS-Identifier\",\n    \"value\": \"GL0-DZOqD39\"\n  },\n  {\n    \"system\": \"https://fhir.nhs.uk/Id/dos-service-id\",\n    \"value\": \"2000072491\"\n  },\n  {\n    \"system\": \"https://fhir.nhs.uk/id/product-id\",\n    \"value\": \"P.GH7-4TY\"\n  }\n  ```\n"}},"/DocumentReference/{id}":{"get":{"tags":["DocumentReference"],"summary":"Get a single document pointer","operationId":"readDocumentReference","parameters":[{"$ref":"#/components/parameters/RegistryId_Param"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/Accept_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/DocumentReference"},"example":{"resourceType":"DocumentReference","meta":{"lastUpdated":"2021-10-11T15:01:30+00:00","profile":["https://fhir.nhs.uk/R4/StructureDefinition/UKCore-DocumentReference"]},"identifier":[{"system":"https://fhir.nhs.uk/Id/BaRS-Identifier","value":"8c63d621-4d86-4f57-8699-e8e22d49935d"},{"value":"2000072491","system":"https://fhir.nhs.uk/Id/dos-service-id"},{"system":"https://fhir.nhs.uk/id/product-id","value":"0B475C"}],"id":"Yorkshire Ambulance Service|423456781055","masterIdentifier":[{"system":"urn:ietf:rfc:3986","value":"urn:uuid:27e2b1c8-ecd8-48f8-9958-8e614cc7ad73"}],"date":"2005-12-24T09:35:00.0000000+00:00","status":"current","type":{"coding":[{"system":"https://snomed.info/ict","code":"749001000000101","display":"Appointment (booking)"}]},"category":[{"coding":[{"system":"http://ihe.net/xds/connectathon/classCodes","code":"History and Physical","display":"History and Physical"}]}],"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"$nhs-number"}},"custodian":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"$ods-code"}},"relatesTo":[{"code":"replaces","target":{"type":"DocumentReference","identifier":{"value":"Yorkshire Ambulance Service|42345678105"}}}],"securityLabel":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-Confidentiality","code":"R","display":"restricted"}]}],"content":[{"attachment":{"language":"en-UK","url":"http://fhir.nhs.uk/Id/dos-service-id|111111111","creation":"2005-12-24T09:35:00+11:00"},"format":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/message-events-bars","code":"booking-request"},{"system":"https://fhir.nhs.uk/CodeSystem/message-category-servicerequest","code":"referral","display":"Transfer of Care"}]}]}],"context":{"period":{"start":"2020-11-10T19:57:26.961Z","end":"2021-11-20T19:57:26.961Z"}}}}},"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"}},"description":"Read a single document pointer by specifying a `DocumentReference.id`.  Note that you will only be able to\nretrieve document pointers that have been created by the organisation specified in the `ODS-End-User-Organisation`\nheader, and agreed during [onboarding](#onbaroding).\n"},"put":{"tags":["DocumentReference"],"summary":"Update a single document pointer","description":"Update a single pointer you created.\n\nNote that the following fields are immutable:\n* `id`\n* `subject`\n* `custodian`\n* `type`\n\nNote that unlike NRL STU3 changing the `status` field does NOT delete document pointers.  To delete document\npointers please use the `DELETE` endpoint.   \n","operationId":"updateDocumentReference","parameters":[{"$ref":"#/components/parameters/RegistryId_Param"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/Accept_HParam"},{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/OperationalOutcome"},"example":{"resourceType":"DocumentReference","meta":{"profile":["https://simplifier.net/guide/UKCoreDevelopment2/ProfileUKCore-DocumentReference"]}}}},"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"}},"requestBody":{"$ref":"#/components/requestBodies/DocumentReference"}},"delete":{"tags":["DocumentReference"],"summary":"Delete a single document pointer","operationId":"deleteDocumentReference","parameters":[{"$ref":"#/components/parameters/RegistryId_Param"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/Accept_HParam"},{"$ref":"#/components/parameters/use-context_HParam"}],"responses":{"200":{"description":"Successful response","content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/OperationalOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"information","code":"informational","details":{"coding":[{"system":"https://fhir.nhs.uk/ValueSet/NRL-ResponseCode","code":"RESOURCE_DELETED","display":"Resource deleted"}]},"diagnostics":"The requested DocumentReference has been deleted"}]}}},"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"}},"description":"Delete a single document pointer that you created. \n"}},"/HealthcareService":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"get":{"tags":["HealthcareService"],"summary":"Get the HealthcareService for an identifier","description":"Get the HealthcareService for an identifier","operationId":"findHealthcareServiceByOrg","parameters":[{"$ref":"#/components/parameters/HCProvidedBy_QParam"},{"$ref":"#/components/parameters/HealthcareServiceIdentifier_QParam"}],"responses":{"200":{"$ref":"#/components/responses/200-HealthcareServiceBundle"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"post":{"tags":["HealthcareService"],"summary":"Create a HealthcareService","description":"Create a single HealthcareService resource.  \n","operationId":"createHealthcareService","responses":{"200":{"$ref":"#/components/responses/200-AtomicHealthcareService"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}},"requestBody":{"$ref":"#/components/requestBodies/HealthcareService"}}},"/HealthcareService/{id}":{"parameters":[{"$ref":"#/components/parameters/HealthcareServiceIdentifier_PParam"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"get":{"tags":["HealthcareService"],"summary":"Get a specific HealthcareService","description":"Read operation for a Specific HealthcareService","operationId":"getHealthcareService","responses":{"200":{"$ref":"#/components/responses/200-AtomicHealthcareService"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"put":{"tags":["HealthcareService"],"summary":"Update a Specific HealthcareService","description":"Creates a new current version for an existing resource [(update)](https://www.hl7.org/fhir/http.html#update) or creates an initial version if no resource already exists for the given id [(new)](https://www.hl7.org/fhir/http.html#upsert).","operationId":"replaceHealthcareService","responses":{"200":{"$ref":"#/components/responses/200-AtomicHealthcareService"},"201":{"$ref":"#/components/responses/201-AtomicHealthcareService"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"delete":{"tags":["HealthcareService"],"summary":"Delete a Specific HealthcareService","description":"Delete a Specific HealthcareService","operationId":"deleteHealthcareService","responses":{"200":{"$ref":"#/components/responses/200-Delete"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/Endpoint":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"get":{"tags":["Endpoint"],"summary":"Get the Endpoints based on an Organization, HealthcareService and Endpoint identifiers","description":"Get the Endpoint for an identifier, its address will be omitted if it the Endpoint.header set to private unless the requestor is the owner.","operationId":"findEndpointByOrg","parameters":[{"$ref":"#/components/parameters/EndpointHas_Qparam"},{"$ref":"#/components/parameters/EndpointIdentifier_QParam"}],"responses":{"200":{"$ref":"#/components/responses/200-EndpointBundle"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"post":{"tags":["Endpoint"],"summary":"Create an Endpoint","description":"Create a single Endpoint resource.  \n","operationId":"createEndpoint","responses":{"200":{"$ref":"#/components/responses/200-AtomicEndpoint"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}},"requestBody":{"$ref":"#/components/requestBodies/Endpoint"}}},"/Endpoint/$template":{"parameters":[{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"get":{"tags":["Endpoint"],"summary":"Get the Endpoint template based on an Organization, Endpoint, ConnectionType and PayloadType identifiers","description":"Get the Endpoint template for an identifier. Its address will be omitted if the Endpoint.header is set to private, unless the requestor is the owner.","operationId":"getEndpointTemplate","parameters":[{"$ref":"#/components/parameters/EndpointIdentifier_QParam"},{"$ref":"#/components/parameters/ConnectionType_QParam"},{"$ref":"#/components/parameters/PayloadType_QParam"}],"responses":{"200":{"$ref":"#/components/responses/200-EndpointTemplate"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"post":{"tags":["Endpoint"],"summary":"Create an Endpoint template","description":"Create a single Endpoint template resource.  \n","operationId":"createEndpointTemplate","responses":{"200":{"$ref":"#/components/responses/200-EndpointTemplate"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}},"requestBody":{"$ref":"#/components/requestBodies/EndpointTemplate"}}},"/Endpoint/{id}":{"parameters":[{"$ref":"#/components/parameters/EndpointIdentifier_PParam"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"get":{"tags":["Endpoint"],"summary":"Get a Specific Endpoint","description":"Read operation for a specific Endpoint","operationId":"getEndpoint","responses":{"200":{"$ref":"#/components/responses/200-AtomicEndpoint"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"put":{"tags":["Endpoint"],"summary":"Update a Specific Endpoint","description":"Creates a new current version for an existing resource ([update](https://www.hl7.org/fhir/http.html#update)) or creates an initial version if no resource already exists for the given id ([new](https://www.hl7.org/fhir/http.html#upsert)).\n\nOnly the owner of an Endpoint can modify it. \n","operationId":"replaceEndpoint","responses":{"200":{"$ref":"#/components/responses/200-AtomicEndpoint"},"201":{"$ref":"#/components/responses/201-AtomicEndpoint"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"delete":{"tags":["Endpoint"],"summary":"Delete a Specific Endpoint","description":"Delete a Specific Endpoint.\n\nOnly the owner of an Endpoint can delete it. \n","operationId":"deleteEndpoint","responses":{"200":{"$ref":"#/components/responses/200-Delete"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}},"/Endpoint/{id}/$template":{"parameters":[{"$ref":"#/components/parameters/EndpointIdentifier_PParam"},{"$ref":"#/components/parameters/RequestId_HParam"},{"$ref":"#/components/parameters/CorrelationId_HParam"},{"$ref":"#/components/parameters/AcceptEPC_HParam"},{"$ref":"#/components/parameters/RequestingOrganisation_HParam"}],"put":{"tags":["Endpoint"],"summary":"Update a Specific Endpoint template","description":"Creates a new current version for an existing resource ([update](https://www.hl7.org/fhir/http.html#update)) or creates an initial version if no resource already exists for the given id ([new](https://www.hl7.org/fhir/http.html#upsert)).\n\nOnly the owner of an Endpoint can modify its template. \n","operationId":"replaceEndpointTemplate","responses":{"200":{"$ref":"#/components/responses/200-EndpointTemplate"},"201":{"$ref":"#/components/responses/201-EndpointTemplate"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}},"delete":{"tags":["Endpoint"],"summary":"Delete a Specific Endpoint","description":"Delete a Specific Endpoint template.\n\nOnly the owner of an Endpoint can delete its template. \n","operationId":"deleteEndpointTemplate","responses":{"200":{"$ref":"#/components/responses/200-Delete"},"4XX":{"$ref":"#/components/responses/4XX-BARS"},"5XX":{"$ref":"#/components/responses/5XX-BARS"}}}}},"components":{"requestBodies":{"DocumentReference":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/DocumentReferenceBundle"}}}},"Appointment":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/Appointment"},"examples":{"successExample":{"value":{"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"}]}}}}}},"AppointmentPatch":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/Appointment"},"examples":{"successExample":{"value":{"resourceType":"Appointment","meta":{"lastUpdated":"2021-11-11T12:11:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"id":"91607239-b002-470a-8709-6b25bd50fdd1","status":"booked"}}}}}},"Endpoint":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/Endpoint"},"examples":{"successExample":{"value":{"resourceType":"Endpoint","id":"0cb21027-a246-43e6-9c7a-35b17163eab1","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"value":"1000099999","system":"https://fhir.nhs.uk/Id/dos-service-id","display":"Directory of Services (DOS)"},{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Service Endpoint Name","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-msg","display":"HL7 FHIR Messaging"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public","Period":{"Start":"2021-10-11T15:23:30+00:00","End":"2021-10-11T15:23:30+00:00"}}}}}}},"EndpointTemplate":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/EndpointTemplate"},"examples":{"successExample":{"value":{"resourceType":"Endpoint","id":"5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Example Template","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-rest","display":"HL7 FHIR"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public"}}}}}},"HealthcareService":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/HealthcareService"},"examples":{"successExample":{"value":{"resourceType":"HealthcareService","id":"7ded9440-3543-4809-b834-25c9be211195","meta":{"lastUpdated":"2021-11-26T15:00:00.8185338+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"http://fhir.nhs.uk/Id/dos-service-id","value":"111111111"},{"system":"http://fhir.nhs.uk/Id/product-id","value":"AAA000"}],"active":true,"providedBy":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R778"}}],"name":"Example Healthcare Service","endpoint":[{"reference":"Endpoint/4e958d43-ad80-40c9-85ff-2be003d1ea86"}]}}}}},"required":true},"ServiceRequest":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/ServiceRequest"},"examples":{"successExample":{"value":{"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"}}}}}},"ServiceRequestPatch":{"content":{"application/fhir+json;version=1.4.0":{"schema":{"$ref":"#/components/schemas/ServiceRequest"},"examples":{"successExample":{"value":{"resourceType":"ServiceRequest","id":"71d2b38e-b81c-4894-a522-6a65265b1d58","meta":{"lastUpdated":"2021-11-11T12:11:30+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"]},"status":"inactive","intent":"plan","PatientInstruction":"NEW ADVICE GIVEN: If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns"}}}}},"required":true}},"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},"ResourceId_Param":{"name":"id","description":"The identifier of the resource.","in":"path","schema":{"type":"string","format":"uuid","example":"91607239-b002-470a-8709-6b25bd50fdd1"},"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. \nThis is must be coupled with the [BaRS use case category](https://simplifier.net/nhsbookingandreferrals/usecases-categories-bars). \nThe 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**Example query without encoding** \n\n  *https://fhir.nhs.uk/Id/dos-service-id|2000099999&context=https://fhir.nhs.uk/CodeSystem/usecases-categories-bars|a1t1*\n","required":true,"in":"query","schema":{"type":"string","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fdos-service-id%7C2000099999%26context%3Dhttps%3A%2F%2Ffhir.nhs.uk%2FCodeSystem%2Fusecases-categories-bars%7Ca1t1"}},"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. It can be used without reference to Name, Date of Birth or Postcode parameters.\n\n|Type           |Expression|\n|-------             | --------|\n|[token](https://hl7.org/implement/standards/FHIR/search.html#token) |Appointment.participant.actor:identifier |\n\n**Example query without encoding** \n*https://fhir.nhs.uk/Id/nhs-number|4857773456*\n","required":false,"in":"query","schema":{"type":"string","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C4857773456"}},"PatientName_QParam":{"name":"patient:name","description":"The patient's name, including family, given, prefix, suffix and/or text. The Receiving system will check against any patient name fields they hold to establish a match. It is expected this parameter is used in conjunction with Date of Birth and Postcode to ensure a unique match.\n","required":false,"in":"query","schema":{"type":"string","example":"John%20Smith%0A"}},"PatientDoB_QParam":{"name":"patient:birthdate","description":"The patient's Date of Birth. The Receiving system will check against the patient Date of Birth to establish a match. It is expected this parameter is used in conjunction with Name and Postcode to ensure a unique match.\n","required":false,"in":"query","schema":{"type":"string","example":"eq20%2F01%2F1995%0A"}},"PatientPostcode_QParam":{"name":"patient:address-postalcode","description":"The patient's Home address Postcode. The Receiving system will check against the patient 'Home' address Postcode to establish a match. It is expected this parameter is used in conjunction with Name and Date of Birth to ensure a unique match.\n","required":false,"in":"query","schema":{"type":"string","example":"LS1%204AP%0A"}},"ServiceRequestId_QParam":{"name":"ServiceRequest.identifier","description":"The unique booking reference number of the referral, 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**Example query without encoding** \n*https://servicerequest.system|10000000000*\n","required":false,"in":"query","schema":{"type":"string","example":"https%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. \nMore information for this can be found in our [implementation guidance](https://simplifier.net/guide/nhsbookingandreferralstandard/Home/Core/1.4.0/End-to-end-workflow).\n\n**Example object before encoding** \n```json\n{\n  \"value\": \"2000011147\",\n  \"system\": \"https://fhir.nhs.uk/Id/dos-service-id\"\n}\n","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. \n More information for this can be found in our [implementation guidance](https://simplifier.net/guide/nhsbookingandreferralstandard/home/core/1.4.0/End-to-end-workflow).\n  \n**Example object before encoding** \n```json\n{\n  \"value\": \"NHS0001\",\n  \"system\": \"tests\"\n}\n","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\n**Example object before encoding**\n```json\n{\n  \"resourceType\": \"Device\",\n  \"identifier\": [\n    {\n      \"system\": \"https://consumersupplier.com/Id/device-identifier\",\n      \"value\": \"SUPP-APP-1\"\n    }\n  ],\n  \"deviceName\": {\n    \"name\": \"Supplier product name\",\n    \"type\": \"manufacturer-name\"\n  },\n  \"version\": {\n    \"value\": \"1.0.0\"\n  }\n}\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\n**Example object before encoding** \n  ```json\n  {\n    \"resourceType\": \"Organization\",\n    \"identifier\": [\n      {\n        \"value\": \"A1001\",\n        \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"\n      }\n    ],\n    \"name\": \"My service provider name\"\n  }\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\n\n**Example object before encoding** \n```json\n{\n  \"resourceType\": \"PractitionerRole\",\n  \"identifier\": [\n    {\n      \"system\": \"https://fhir.nhs.uk/Id/sds-role-profile-id\",\n      \"value\": \"100334993514\"\n    }\n  ],\n  \"code\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"62247001\",\n          \"display\": \"General practitioner\"\n        }\n      ]\n    }\n  ]\n}\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 version of BaRS Core the Sender is expecting to interoperate on.","in":"header","required":true,"schema":{"type":"string","example":"application/fhir+json; version=1.4.0"}},"AcceptEPC_HParam":{"name":"Accept","description":"The Accept header must specify the type of content the requester can process.","in":"header","required":true,"schema":{"type":"string","example":"application/fhir+json;"}},"ConnectionType_QParam":{"name":"ConnectionType","description":"The technical protocol (e.g., hl7-fhir-rest).\n\n**Example object before encoding** \n```json\n\"connectionType\": {\n  \"coding\": [\n    {\n      \"system\": \"http://terminology.hl7.org/CodeSystem/endpoint-connection-type\",\n      \"code\": \"hl7-fhir-rest\",\n      \"display\": \"HL7 FHIR\"\n    }\n  ]\n}\n","in":"query","schema":{"$ref":"#/components/schemas/ConnectionType"}},"PayloadType_QParam":{"name":"PayloadType","description":"Defines the specific message standard used (e.g., BaRS).\n\n**Example object before encoding** \n```json\n\"payloadType\": [\n  {\n    \"coding\": [\n      {\n      \"system\": \"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc\",\n      \"code\": \"bars\",\n      \"display\": \"BaRS\"\n      }\n    ]\n  }\n]\n","in":"query","schema":{"$ref":"#/components/schemas/PayloadType"}},"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"}},"subject_QParam":{"name":"subject:identifier","description":"The Url encoded patient's NHS number. The primary identifier of a patient across systems, unique to NHS England and Wales. \nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n\n|Type           |Expression|\n|-------             | --------|\n|[token](https://hl7.org/implement/standards/FHIR/search.html#token) |Appointment.participant.actor:identifier |\n\n**Example before encoding**\n*https://fhir.nhs.uk/Id/nhs-number|4857773456*\n","required":true,"in":"query","schema":{"type":"string","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C4857773456"}},"custodian_QParam":{"description":"The custodian of the pointer\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n\n**Endpoint without encoding**\n*https://fhir.nhs.uk/Id/ods-organization-code|Y05868*\n","name":"custodian:identifier","in":"query","schema":{"$ref":"#/components/schemas/RequestQueryCustodian"}},"type_QParam":{"name":"type","description":"The specified type of pointers to be returned.\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n\n**Example query without encoding**\n*http://snomed.info/sct|749001000000101*\n","in":"query","schema":{"$ref":"#/components/schemas/RequestQueryType"},"examples":{"none":{"summary":"None","value":""},"BOOKING":{"summary":"Appointment (booking)","value":"http%3A%2F%2Fsnomed.info%2Fsct%7C749001000000101"},"REFERRAL":{"summary":"Patient referral","value":"http%3A%2F%2Fsnomed.info%2Fsct%7C3457005"}}},"nextPageToken_QParam":{"name":"next-page-token","description":"A token that can be sent as either a query parameter or in the post body parameter to retrieve the next set of 20 records.\n\nThis token is returned in the meta.tag field.\n","in":"query","schema":{"$ref":"#/components/schemas/NextPageToken"}},"HealthcareServiceIdentifier_QParam":{"name":"HealthcareService.identifier","description":"The identifier of the HealthcareService.\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n","in":"query","required":false,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/Service"}},"HCProvidedBy_QParam":{"name":"HealthcareService.providedBy","description":"The identifier of the organization that is managing the endpoint(s).\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n","in":"query","required":false,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/ODS"}},"HealthcareServiceIdentifier_PParam":{"name":"id","description":"The identifier of the HealthcareService.","in":"path","required":true,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/GUID"}},"EndpointIdentifier_QParam":{"name":"Endpoint.identifier","description":"The identifier of the *type* of Endpoint, usually the identifier set by the organisation/supplier that created the Endpoint. \nIt is important to note that this is **not** the same as **Endpoint.id**, which is the unique identifier for the Endpoint resource. The Endpoint.identifier can be shared across multiple Endpoint resources.\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n","in":"query","required":false,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/EndpointIdentifier"}},"EndpointHas_Qparam":{"name":"_has","description":"The healthcareService you want the Endpoints returned for.\nThis needs to be Url Encoded as its passed as a query parameter and part of the url.\n\n|HealthcareService Property| Example|\n|-------             | --------|\n|HealthcareService.Identifier| `_has:HealthcareService.Identifier=https://fhir.nhs.uk/Id/dos-service-id\\|1000099999`|\n|HealthcareService.Id| `_has:HealthcareService.Id=95852b93-d1ab-4c51-8e7d-c24cf9b257a9`|\n","in":"query","required":false,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/Has"}},"EndpointIdentifier_PParam":{"name":"id","description":"The unique identifier of the endpoint.","in":"path","required":true,"allowEmptyValue":false,"schema":{"$ref":"#/components/schemas/GUID"}}},"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/Core/1.4.0/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/Core/1.4.0/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"}}}},"200-Delete":{"description":"The resource was successfully delete.","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":"information","code":"informational","details":{"coding":[{"system":"https://fhir.nhs.uk/Codesystem/http-error-codes","code":"OK"}]},"diagnostics":"Resource deleted successfully."}]}}},"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"}}}},"200-AtomicEndpoint":{"description":"The Operation was Successful","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Endpoint"},"example":{"resourceType":"Endpoint","id":"0cb21027-a246-43e6-9c7a-35b17163eab1","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"value":"1000099999","system":"https://fhir.nhs.uk/Id/dos-service-id","display":"Directory of Services (DOS)"},{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Service Endpoint Name","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-msg","display":"HL7 FHIR Messaging"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public","Period":{"Start":"2021-10-11T15:23:30+00:00","End":"2021-10-11T15:23:30+00:00"}}}},"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"}}}},"201-AtomicEndpoint":{"description":"Resource Created Successfully","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Endpoint"},"example":{"resourceType":"Endpoint","id":"0cb21027-a246-43e6-9c7a-35b17163eab1","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"value":"1000099999","system":"https://fhir.nhs.uk/Id/dos-service-id","display":"Directory of Services (DOS)"},{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Service Endpoint Name","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-msg","display":"HL7 FHIR Messaging"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public","Period":{"Start":"2021-10-11T15:23:30+00:00","End":"2021-10-11T15:23:30+00:00"}}}},"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"}}}},"200-EndpointTemplate":{"description":"The Operation was Successful","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/EndpointTemplate"},"example":{"resourceType":"Endpoint","id":"5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Example Template","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-rest","display":"HL7 FHIR"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public"}}},"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"}}}},"201-EndpointTemplate":{"description":"Resource Created Successfully","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/EndpointTemplate"},"example":{"resourceType":"Endpoint","id":"5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Example Template","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-rest","display":"HL7 FHIR"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public"}}},"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"}}}},"200-AtomicHealthcareService":{"description":"The Operation was Successful","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/HealthcareService"},"example":{"resourceType":"HealthcareService","id":"7ded9440-3543-4809-b834-25c9be211195","meta":{"lastUpdated":"2021-11-26T15:00:00.8185338+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"http://fhir.nhs.uk/Id/dos-service-id","value":"111111111"},{"system":"http://fhir.nhs.uk/Id/product-id","value":"AAA000"}],"active":true,"providedBy":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R778"}}],"name":"Example Healthcare Service","endpoint":[{"reference":"Endpoint/4e958d43-ad80-40c9-85ff-2be003d1ea86"}]}}},"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"}}}},"201-AtomicHealthcareService":{"description":"Resource Created Successfully","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/HealthcareService"},"example":{"resourceType":"HealthcareService","id":"7ded9440-3543-4809-b834-25c9be211195","meta":{"lastUpdated":"2021-11-26T15:00:00.8185338+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"http://fhir.nhs.uk/Id/dos-service-id","value":"111111111"},{"system":"http://fhir.nhs.uk/Id/product-id","value":"AAA000"}],"active":true,"providedBy":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R778"}}],"name":"Example Healthcare Service","endpoint":[{"reference":"Endpoint/4e958d43-ad80-40c9-85ff-2be003d1ea86"}]}}},"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"}}}},"200-EndpointBundle":{"description":"The operation was successful","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/EndpointBundle"},"example":{"resourceType":"Bundle","id":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","type":"searchset","total":2,"timestamp":"2026-03-26T10:30:00Z","link":[{"relation":"self","url":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Endpoint?organization=org-123"}],"entry":[{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Endpoint/5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","resource":{"resourceType":"Endpoint","id":"5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"value":"1000099999","system":"https://fhir.nhs.uk/Id/dos-service-id","display":"Directory of Services (DOS)"},{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Service Endpoint Name","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-msg","display":"HL7 FHIR Messaging"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public","Period":{"Start":"2021-10-11T15:23:30+00:00","End":"2021-10-11T15:23:30+00:00"}}},{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Endpoint/c3f6145e-1a26-4345-b3f2-dccbcba62049","resource":{"resourceType":"Endpoint","id":"c3f6145e-1a26-4345-b3f2-dccbcba62049","meta":{"lastUpdated":"2021-10-11T15:23:30+00:00","profile":["http://hl7.org/fhir/StructureDefinition/Endpoint"]},"identifier":[{"value":"1000099999","system":"https://fhir.nhs.uk/Id/dos-service-id","display":"Directory of Services (DOS)"},{"system":"https://fhir.nhs.uk/id/product-id","value":"SupplierProduct-v2024.12.12"}],"status":"active","name":"Service Endpoint Name","connectionType":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-connection-type","code":"hl7-fhir-msg","display":"HL7 FHIR Messaging"}]},"payloadType":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type-epc","code":"bars","display":"BaRS"}]}],"managingOrganization":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"X254"}}],"address":"https://myService.nhs.uk/Base/Address","header":"public","Period":{"Start":"2021-10-11T15:23:30+00:00","End":"2021-10-11T15:23:30+00:00"}}}]}}},"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"}}}},"200-HealthcareServiceBundle":{"description":"The operation was successful","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/HealthcareServiceBundle"},"example":{"resourceType":"Bundle","id":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","type":"searchset","total":2,"timestamp":"2026-03-26T10:30:00Z","link":[{"relation":"self","url":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/HealthcareService?organization=org-123"}],"entry":[{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/HealthcareService/5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","resource":{"resourceType":"HealthcareService","id":"5fce3e6a-ba37-4289-84d1-cc3ebdb992f5","meta":{"lastUpdated":"2021-11-26T15:00:00.8185338+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"http://fhir.nhs.uk/Id/dos-service-id","value":"111111111"},{"system":"http://fhir.nhs.uk/Id/product-id","value":"AAA000"}],"active":true,"providedBy":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R778"}}],"name":"Example Healthcare Service","endpoint":[{"reference":"Endpoint/4e958d43-ad80-40c9-85ff-2be003d1ea86"}]}},{"fullUrl":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/HealthcareService/c3f6145e-1a26-4345-b3f2-dccbcba62049","resource":{"resourceType":"HealthcareService","id":"c3f6145e-1a26-4345-b3f2-dccbcba62049","meta":{"lastUpdated":"2021-11-26T15:00:00.8185338+00:00","profile":["http://hl7.org/fhir/StructureDefinition/HealthcareService","https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"]},"identifier":[{"system":"http://fhir.nhs.uk/Id/dos-service-id","value":"111111111"},{"system":"http://fhir.nhs.uk/Id/product-id","value":"AAA000"}],"active":true,"providedBy":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R778"}}],"name":"Example Healthcare Service","endpoint":[{"reference":"Endpoint/4e958d43-ad80-40c9-85ff-2be003d1ea86"}]}}]}}},"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"},"id":{"type":"string","example":"BaRS-FHIR-Server"},"url":{"type":"string","example":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4","format":"url"},"name":{"type":"string","example":"BaRS FHIR Server CapabilityStatement"},"status":{"type":"string","example":"active"},"version":{"type":"string","example":"1.2.0"},"experimental":{"type":"boolean","example":false},"date":{"type":"string","example":"2022-09-16T15:00:00+01:00","format":"date-time"},"publisher":{"type":"string","example":"NHS Digital"},"contact":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"NHS Booking and Referral Standard"},"telecom":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","example":"email"},"value":{"type":"string","example":"bookingandreferralstandard@nhs.net"}}}}},"additionalProperties":false}},"kind":{"type":"string","example":"instance"},"software":{"type":"object","properties":{"name":{"type":"string","example":"BaRS API"},"version":{"type":"string","example":"1.1.0"}},"additionalProperties":false},"implementation":{"type":"object","properties":{"description":{"type":"string","example":"BaRS FHIR Server"},"url":{"type":"string","example":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4","format":"url"}},"additionalProperties":false},"fhirVersion":{"type":"string","example":"4.0.1"},"format":{"type":"array","items":{"type":"string","example":"xml"}},"rest":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","example":"server"},"interaction":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"transaction"}}}},"security":{"type":"array","items":{"type":"object","properties":{"service":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"service":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"system":{"type":"string","format":"url"},"display":{"type":"string"}}}}}}}}}}}}}},"resource":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","example":"CapabilityStatement"},"interaction":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"}}}},"versioning":{"type":"string","example":"no-version"},"searchParam":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"start"},"type":{"type":"string","example":"date"}}}},"searchInclude":{"type":"array","items":{"type":"string","example":"Slot:schedule"}}}}},"operation":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"$process-message"},"definition":{"type":"string","format":"url","example":"http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message"}}}}},"additionalProperties":false}},"messaging":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"array","items":{"type":"object","properties":{"protocol":{"type":"object","properties":{"code":{"type":"string","example":"http"}}},"address":{"type":"string","format":"url","example":"https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4"}}}},"supportedMessage":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","example":"receiver"},"definition":{"type":"string","example":"MessageDefinition/bars-message-booking-request"}}}}},"additionalProperties":false}}},"additionalProperties":false},"TargetIdentifier":{"title":"Identifier","type":"string","format":"byte","example":"eyJzeXN0ZW0iOiJodHRwczovL2ZoaXIubmhzLnVrL0lkL2Rvcy1zZXJ2aWNlLWlkIiwidmFsdWUiOiIyMDAwMDExMTQ3In0=","description":"Identifier"},"Appointment":{"type":"object","properties":{"resourceType":{"type":"string","example":"Appointment"},"id":{"type":"string","example":"91607239-b002-470a-8709-6b25bd50fdd1","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"}}}},"status":{"type":"string","example":"booked"},"description":{"type":"string","example":"Reason for calling"},"start":{"type":"string","example":"2021-10-12T12:30:30+00:00","format":"date-time"},"end":{"type":"string","example":"2021-10-12T12:40:30+00:00","format":"date-time"},"slot":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:deb4c4b3-870b-4599-84df-5e54cef7afda"}}}},"created":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"basedOn":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"ServiceRequest/236bb75d-90ef-461f-b71e-fde7f899802c"},"type":{"type":"string","example":"serviceRequest"}}}},"participant":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"}}},"status":{"type":"string","example":"accepted"}}}}}},"Endpoint":{"type":"object","properties":{"resourceType":{"type":"string","example":"Endpoint"},"id":{"type":"string","example":"91607239-b002-470a-8709-6b25bd50fdd1","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"http://hl7.org/fhir/structuredefinition/endpoint"}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}},"status":{"type":"string","example":"active"},"name":{"type":"string","example":"Service Endpoint name"},"connectionType":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"hl7-fhir-msg"},"display":{"type":"string","example":"HL7 FHIR Messaging"}}}}}},"payloadType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"bars"},"display":{"type":"string","example":"BaRS"}}}}}}},"managingOrganization":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"X254"}}}}}},"address":{"type":"string","format":"url","example":"https://myService.nhs.uk/Base/Address"},"header":{"type":"string","example":"public"},"Period":{"type":"object","properties":{"Start":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"End":{"type":"string","example":"2021-10-12T15:01:30+00:00","format":"date-time"}}}}},"EndpointTemplate":{"type":"object","properties":{"resourceType":{"type":"string","example":"Endpoint"},"id":{"type":"string","example":"91607239-b002-470a-8709-6b25bd50fdd1","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"http://hl7.org/fhir/structuredefinition/endpoint"}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}},"status":{"type":"string","example":"active"},"name":{"type":"string","example":"Service Endpoint name"},"connectionType":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"hl7-fhir-msg"},"display":{"type":"string","example":"HL7 FHIR Messaging"}}}}}},"payloadType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"bars"},"display":{"type":"string","example":"BaRS"}}}}}}},"managingOrganization":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"X254"}}}}}},"address":{"type":"string","format":"url","example":"https://myService.nhs.uk/Base/Address"},"header":{"type":"string","example":"public"}}},"HealthcareService":{"type":"object","properties":{"resourceType":{"type":"string","example":"HealthcareService"},"id":{"type":"string","example":"7ded9440-3543-4809-b834-25c9be211195","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}},"active":{"type":"boolean","example":true},"name":{"type":"string","example":"Example Healthcare Service"},"providedBy":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}}}},"endpoint":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"Endpoint/7ded9440-3543-4809-b834-25c9be211195"}}}}},"x-examples":{"example":{"resourceType":"Endpoint","meta":{"profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"}}}},"Organization":{"type":"object","properties":{"Endpoint":{"description":"This **MUST** be an **Organization** resource","type":"object","properties":{"resourceType":{"type":"string"},"meta":{"type":"object","properties":{"profile":{"type":"string"}}}}}},"x-examples":{"example":{"resourceType":"Endpoint","meta":{"profile":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"}}}},"SearchBundleAppt":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":2},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string","example":"self"},"url":{"type":"string","format":"url","example":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Appointment"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string","format":"url","example":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Appointment/c3f6145e-1a26-4345-b3f2-dccbcba62049"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"Appointment"},"id":{"type":"string","format":"uuid","example":"c3f6145e-1a26-4345-b3f2-dccbcba62049"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2021-11-11T12:11:30+00:00"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Appointment"}}}},"status":{"type":"string","example":"booked"},"description":{"type":"string","example":"Reason for calling"},"start":{"type":"string","format":"date-time","example":"2021-10-12T12:30:30+00:00"},"end":{"type":"string","format":"date-time","example":"2021-10-12T12:40:30+00:00"},"slot":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"Slot/95CA8891-5CB2-4AFC-A6E4-2D20645FDE60"}}}},"created":{"type":"string","format":"date-time","example":"2021-10-11T15:01:30+00:00"},"basedOn":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"ServiceRequest/136bb75d-90ef-461f-4773-fde7f899803d"},"type":{"type":"string","example":"ServiceRequest"}}}},"participant":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:788660eb-d2c9-4773-abd4-318484673fb2"}}},"status":{"type":"string","example":"accepted"},"type":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType"},"code":{"type":"string","example":"ATND"},"display":{"type":"string","example":"attender"}}}}}}}}}}}},"search":{"type":"object","properties":{"mode":{"type":"string","example":"match"}}}}}}}},"ServiceRequest":{"type":"object","properties":{"resourceType":{"type":"string","example":"ServiceRequest"},"id":{"type":"string","example":"71d2b38e-b81c-4894-a522-6a65265b1d58","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-11-26T15:00:00+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-validation"}}},"additionalProperties":false},"basedOn":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:9f748662-afde-540e-a6d5-8cd6ae63cd56"}},"additionalProperties":false},"status":{"type":"string","example":"active"},"intent":{"type":"string","example":"plan"},"category":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false}},"subject":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:9589fb37-87a2-48d8-968f-b371429208a8"}},"additionalProperties":false},"encounter":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:8c63d621-4d86-4f57-8699-e8e22d49935d"}},"additionalProperties":false},"occurrencePeriod":{"type":"object","properties":{"start":{"type":"string","example":"2021-11-26T15:00:00+00:00","format":"date-time"},"end":{"type":"string","example":"2021-11-26T15:20:00+00:00","format":"date-time"}},"additionalProperties":false},"authoredOn":{"type":"string","example":"2021-11-26T15:00:00+00:00","format":"date-time"},"requester":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:7d948662-bade-450e-b6c5-9bb6ee39cb56"}},"additionalProperties":false},"performer":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","format":"uuid","example":"d5ffd0cd-ec7e-48a1-84f1-91f4c0eb8fc5"}},"additionalProperties":false}},"locationReference":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:2ec99e82-a0af-4b70-bd53-1869d84b2ad1"}},"additionalProperties":false}},"supportingInfo":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:d877b820-e72b-44d1-a627-195f54bfc606"},"display":{"type":"string","example":"Rejected Services - Patient Choice in Service Selection - Details"}},"additionalProperties":false}},"PatientInstruction":{"type":"string","example":"ADVICE GIVEN: If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns"}}},"SearchBundleRef":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":1},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string","example":"self"},"url":{"type":"string","format":"url","example":"https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/ServiceRequest"}},"additionalProperties":false}},"entry":{"type":"array","items":{"type":"object","properties":{"resourceType":{"type":"string","example":"ServiceRequest"},"id":{"type":"string","format":"uuid","example":"71d2b38e-b81c-4894-a522-6a65265b1d58"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2021-11-26T15:00:00+00:00"},"profile":{"type":"array","items":{"type":"string","format":"url"}}},"additionalProperties":false},"basedOn":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:9f748662-afde-540e-a6d5-8cd6ae63cd56"}},"additionalProperties":false},"status":{"type":"string","example":"active"},"intent":{"type":"string","example":"plan"},"category":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}},"subject":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:9589fb37-87a2-48d8-968f-b371429208a8"}},"additionalProperties":false},"encounter":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:8c63d621-4d86-4f57-8699-e8e22d49935d"}},"additionalProperties":false},"occurrencePeriod":{"type":"object","properties":{"start":{"type":"string","format":"date-time","example":"2021-11-26T15:00:00+00:00"},"end":{"type":"string","format":"date-time","example":"2021-11-26T15:20:00+00:00"}},"additionalProperties":false},"authoredOn":{"type":"string","format":"date-time","example":"2021-11-26T15:00:00+00:00"},"requester":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:7d948662-bade-450e-b6c5-9bb6ee39cb56"}},"additionalProperties":false},"performer":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","format":"uuid"}}}},"locationReference":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"supportingInfo":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"},"display":{"type":"string"}}}},"PatientInstruction":{"type":"string","example":"ADVICE GIVEN: If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns"},"search":{"type":"object","properties":{"mode":{"type":"string","example":"match"}}}}}}}},"SearchBundleSlot":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","format":"uuid"},"meta":{"type":"object","properties":{"versionId":{"type":"string","example":"1.0.0-alpha"},"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"}}}},"type":{"type":"string","example":"searchset"},"timestamp":{"type":"string","example":"2021-10-11T12:15:10+00:00","format":"date-time"},"total":{"type":"integer","example":8},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string","example":"self"},"url":{"type":"string","format":"url","example":"https://simplifier.net/nhsbookingandreferrals/777a156c-af3c-4748-a8a3-7e95e4b0df9a-duplicate-2"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string","example":"urn:uuid:73706f31-2578-4377-88c7-c8b8a5891c4a"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"Slot"},"id":{"type":"string","example":"slot001"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2021-10-11T15:01:30+00:00"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"http://hl7.org/fhir/StructureDefinition/Slot"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-DeliveryChannel"},"valueCode":{"type":"string","example":"Telephone"}}}},"serviceCategory":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/service-category"},"code":{"type":"string","example":"14"},"display":{"type":"string","example":"Emergency Department"}}}}}}},"appointmentType":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/v2-0276"},"code":{"type":"string","example":"EMERGENCY"},"display":{"type":"string","example":"Emergency appointment"}}}}}},"schedule":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:a5fab26c-0dfd-424f-be1d-afc877c1afb0"}}},"status":{"type":"string","example":"free"},"start":{"type":"string","format":"date-time","example":"2021-10-06T09:00:00.000+00:00"},"end":{"type":"string","format":"date-time","example":"2021-10-06T10:00:00.000+00:00"},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"value":{"type":"string","format":"uuid"}}}},"serviceType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}},"actor":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"location":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"name":{"anyOf":[{"type":"string","example":"Healthcare Service Name"},{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"given":{"type":"array","items":{"type":"string"}},"prefix":{"type":"array","items":{"type":"string"}}}}}]},"practitioner":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:782bef0c-c90b-41bc-87c1-80f03c0046a5"}}},"code":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}},"position":{"type":"object","properties":{"longitude":{"type":"number","example":143.20196},"latitude":{"type":"number","example":-37.22866}}}}}}}}}},"MessageBundle":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a","format":"uuid"},"meta":{"type":"object","properties":{"versionId":{"type":"string","example":"1.0.0-alpha"},"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage"}}},"additionalProperties":false},"type":{"type":"string","example":"message"},"timestamp":{"type":"string","example":"2021-10-11T12:15:10+00:00","format":"date-time"},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string","example":"urn:uuid:c5957fdd-097b-409d-a406-49c52ceef2cd"},"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"MessageHeader"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2021-10-11T15:01:30+00:00"},"profile":{"type":"array","items":{"type":"string","format":"url"}}},"additionalProperties":false},"eventCoding":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/CodeSystem/message-events-bars"},"code":{"type":"string","example":"booking-request"}},"additionalProperties":false},"destination":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string","format":"url"},"receiver":{"type":"object","properties":{"reference":{"type":"string"}}}}}},"sender":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:6324587b-eb70-4333-9db2-22d48f64c9ba"}},"additionalProperties":false},"source":{"type":"object","properties":{"name":{"type":"string","example":"My organisation name"},"software":{"type":"string","example":"My software name"},"version":{"type":"string","example":"2.1.45"},"contact":{"type":"object","properties":{"system":{"type":"string","example":"phone"},"value":{"type":"string","example":"+44 (0113) 123 4567"}},"additionalProperties":false},"endpoint":{"type":"string","format":"url","example":"http://fhir.nhs.uk/Id/dos-service-id|2222222222"}},"additionalProperties":false},"reason":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}}}},"additionalProperties":false},"focus":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"definition":{"type":"string","format":"url","example":"https://fhir.nhs.uk/MessageDefinition/bars-message-booking-request"},"status":{"type":"string","example":"booked"},"description":{"type":"string","example":"Reason for calling-"},"start":{"type":"string","format":"date-time","example":"2021-10-12T12:30:30+00:00"},"end":{"type":"string","format":"date-time","example":"2021-10-12T12:40:30+00:00"},"slot":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"created":{"type":"string","format":"date-time","example":"2021-10-11T15:01:30+00:00"},"participant":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"object","properties":{"reference":{"type":"string"}}},"status":{"type":"string"}}}},"extension":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"url"},"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"extension":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"url"},"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}}}},"system":{"type":"string","format":"url"},"value":{"type":"string"}}}},"name":{"anyOf":[{"type":"array"},{"type":"string","example":"Patient's Surgery"}]},"gender":{"type":"string","example":"male"},"birthDate":{"type":"string","format":"date","example":"1974-12-25"},"address":{"type":"array","items":{"type":"object","properties":{"use":{"type":"string"},"text":{"type":"string"},"line":{"type":"array","items":{"type":"string"}},"city":{"type":"string"},"postalCode":{"type":"string"}}}},"contact":{"type":"array","items":{"type":"object","properties":{"extension":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"url"},"valuePositiveInt":{"type":"integer"}}}},"relationship":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}}}}}},"telecom":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"value":{"type":"string"},"use":{"type":"string"},"rank":{"type":"integer"}}}}}}},"communication":{"type":"array","items":{"type":"object","properties":{"language":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}},"preferred":{"type":"boolean"}}}},"generalPractitioner":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"serviceCategory":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}},"appointmentType":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false},"schedule":{"type":"object","properties":{"reference":{"type":"string","example":"urn:uuid:3a62607b-df65-4932-940c-14262787f62d"}},"additionalProperties":false},"actor":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"location":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string"}}}},"code":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}}}},"position":{"type":"object","properties":{"longitude":{"type":"number","example":143.20196},"latitude":{"type":"number","example":-37.22866}}}}}}}}}},"MessageDefinition":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url"}}}},"type":{"type":"string"},"total":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string","format":"url"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","format":"uuid"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","format":"url"}}}},"url":{"type":"string","format":"url"},"name":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"date":{"type":"string","format":"date"},"eventCoding":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}},"useContext":{"type":"array","items":{"type":"object","properties":{"code":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}}},"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}}},"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"}}}}}}}}}}},"focus":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"profile":{"type":"string","format":"url"},"min":{"type":"integer"},"max":{"type":"string"}}}}}}}}}}},"OperationalOutcome":{"type":"object","properties":{"resourceType":{"type":"string","example":"OperationOutcome"},"id":{"type":"string","example":"531e073a-3295-4e67-ae90-e00bd96a9cdd","format":"uuid"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-OperationOutcome"}}},"additionalProperties":false},"issue":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","example":"information"},"code":{"type":"string","example":"informational"},"details":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false},"diagnostics":{"type":"string","example":"Resource updated"}}}}}},"RequestingOrganisationToken":{"$ref":"#/components/schemas/RequestingOrganisation"},"RequestingPractitionerToken":{"$ref":"#/components/schemas/RequestingPractitioner"},"ConnectionType":{"type":"object","properties":{"connectionType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false}}}},"PayloadType":{"type":"object","properties":{"payloadType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false}}}},"RequestingSoftwareToken":{"$ref":"#/components/schemas/RequestingSoftware"},"DocumentReferenceBundle":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"type":{"type":"string","example":"searchset"},"total":{"type":"integer","example":3},"link":{"type":"array","items":{"type":"object","properties":{"relation":{"type":"string","example":"self"},"url":{"type":"string","format":"url","example":"https://int.api.service.nhs.uk/record-locator/consumer/FHIR/R4/DocumentReference?subject:identifier=https://fhir.nhs.uk/Id/nhs-number|9693893123&type=http://snomed.info/sct|749001000000101&category=http://snomed.info/sct|419891008"}},"additionalProperties":false}},"entry":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"object","properties":{"resourceType":{"type":"string","example":"DocumentReference"},"id":{"type":"string","example":"V4T0L-3aeb90b0-7ffa-408a-babf-f20b80ce2c27"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2025-02-18T17:04:53.948Z"}},"additionalProperties":false},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"value":{"type":"string"}}}},"status":{"type":"string","example":"current"},"type":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://snomed.info/sct"},"code":{"type":"string","example":"749001000000101"},"display":{"type":"string","example":"Appointment (record artifact)"}}}}},"additionalProperties":false},"category":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://snomed.info/sct"},"code":{"type":"string","example":"419891008"},"display":{"type":"string","example":"Clinical notes"}}}}}}},"subject":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/nhs-number"},"value":{"type":"string","example":"9693893123"}},"additionalProperties":false}},"additionalProperties":false},"date":{"type":"string","format":"date-time","example":"2025-02-18T17:04:53.948Z"},"author":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string"},"value":{"type":"string"}},"required":["system","value"]}}}},"custodian":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"RGT"}},"additionalProperties":false}},"additionalProperties":false},"content":{"type":"array","items":{"type":"object","properties":{"extension":{"type":"array","items":{"type":"object","properties":{"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"code":{"type":"string"},"display":{"type":"string"}},"required":["system","code","display"]}}},"required":["coding"]},"url":{"type":"string"}}}},"attachment":{"type":"object","properties":{"contentType":{"type":"string"},"url":{"type":"string"}},"required":["contentType","url"]},"format":{"type":"object","properties":{"system":{"type":"string"},"code":{"type":"string"},"display":{"type":"string"}}}}}},"context":{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time","example":"2025-02-01T06:45:00+00:00"},"end":{"type":"string","format":"date-time","example":"2025-02-01T07:00:00+00:00"}},"additionalProperties":false},"practiceSetting":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"code":{"type":"string"},"display":{"type":"string"}}}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false},"DocumentReference":{"type":"object","properties":{"resourceType":{"type":"string","example":"DocumentReference"},"identifier":{"type":"array","minItems":3,"items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/BaRS-Identifier"},"value":{"type":"string","example":"GL0-DZOqD39"}},"additionalProperties":false,"required":["system","value"]}},"status":{"type":"string","example":"current"},"type":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://snomed.info/sct"},"code":{"type":"string","example":"749001000000101"},"display":{"type":"string","example":"Appointment (record artifact)"}},"additionalProperties":false,"required":["system","code"]}}},"additionalProperties":false,"required":["coding"]},"category":{"type":"array","minItems":1,"items":{"type":"object","properties":{"coding":{"type":"array","minItems":1,"items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://snomed.info/sct"},"code":{"type":"string","example":"419891008"},"display":{"type":"string","example":"Clinical notes"}},"additionalProperties":false,"required":["system","code"]}}},"additionalProperties":false,"required":["coding"]}},"subject":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","example":"https://fhir.nhs.uk/Id/nhs-number","format":"url","pattern":"^https:\\/\\/fhir\\.nhs\\.uk\\/Id\\/nhs-number$"},"value":{"type":"string","example":"3495456481","pattern":"^\\d{10}$"}},"additionalProperties":false,"required":["system","value"]}},"required":["identifier"]},"date":{"type":"string","example":"2025-02-05T08:25:13.136693+00:00","format":"date-time"},"author":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"RGT"}},"additionalProperties":false,"required":["system","value"]}},"additionalProperties":false}},"custodian":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","example":"https://fhir.nhs.uk/Id/ods-organization-code","format":"url","pattern":"^https:\\/\\/fhir\\.nhs\\.uk\\/Id\\/ods-organization-code$"},"value":{"type":"string","example":"RGT"}},"additionalProperties":false,"required":["system","value"]}},"required":["identifier"]},"content":{"type":"array","minItems":1,"items":{"type":"object","properties":{"extension":{"type":"array","items":{"type":"object","properties":{"valueCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string"},"code":{"type":"string"},"display":{"type":"string"}},"required":["system","code"]}}}},"url":{"type":"string"}}}},"attachment":{"type":"object","properties":{"contentType":{"type":"string","example":"application/fhir+json"},"url":{"type":"string","format":"url","example":"https://server.fire.ly/r4/Appointment/GL0-DZOqD39"}},"required":["url"]},"format":{"type":"array","minItems":1,"items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/CodeSystem/message-events-bars"},"code":{"type":"string","example":"referral"},"display":{"type":"string"}},"required":["system","code"]}}}}}},"required":["attachment","format"]}},"context":{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","example":"2025-02-01T06:45:00+00:00","format":"date-time"},"end":{"type":"string","example":"2025-02-01T07:00:00+00:00","format":"date-time"}},"required":["start","end"],"additionalProperties":false},"practiceSetting":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://snomed.info/sct"},"code":{"type":"string","example":"394802001"},"display":{"type":"string","example":"General medicine (qualifier value)"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"required":["subject","type","custodian","content","identifier","category"]},"RequestQueryCustodian":{"type":"string","pattern":"^(?:https:\\/\\/fhir\\.nhs\\.uk\\/Id\\/ods-organization-code\\|(\\w+)|https%3A%2F%2Ffhir\\.nhs\\.uk%2FId%2Fods-organization-code%7C(\\w+))$","example":"https%3A%2F%2Ffhir.nhs.uk%2FId%2Fods-organization-code%7CY05868"},"RequestQueryType":{"type":"string","example":"http%3A%2F%2Fsnomed.info%2Fsct%7C749001000000101"},"NextPageToken":{"type":"string"},"ODS":{"type":"string","example":"https://fhir.nhs.uk/Id/ods-organization-code|A001"},"EndpointBundle":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"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":"Endpoint"},"id":{"type":"string","example":"91607239-b002-470a-8709-6b25bd50fdd1","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"http://hl7.org/fhir/structuredefinition/endpoint"}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}},"status":{"type":"string","example":"active"},"name":{"type":"string","example":"Service Endpoint name"},"connectionType":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"hl7-fhir-msg"},"display":{"type":"string","example":"HL7 FHIR Messaging"}}}}}},"payloadType":{"type":"array","items":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"http://terminology.hl7.org/CodeSystem/endpoint-payload-type"},"code":{"type":"string","example":"bars"},"display":{"type":"string","example":"BaRS"}}}}}}},"managingOrganization":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"X254"}}}}}},"address":{"type":"string","format":"url","example":"https://myService.nhs.uk/Base/Address"},"header":{"type":"string","example":"public"},"Period":{"type":"object","properties":{"Start":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"End":{"type":"string","example":"2021-10-12T15:01:30+00:00","format":"date-time"}}}}}}}}}},"HealthcareServiceBundle":{"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"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":"HealthcareService"},"id":{"type":"string","example":"7ded9440-3543-4809-b834-25c9be211195","format":"uuid"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","example":"2021-10-11T15:01:30+00:00","format":"date-time"},"profile":{"type":"array","items":{"type":"string","format":"url","example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService"}}}},"identifier":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}},"active":{"type":"boolean","example":true},"name":{"type":"string","example":"Example Healthcare Service"},"providedBy":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"system":{"type":"string","format":"url","example":"https://fhir.nhs.uk/Id/dos-service-id"},"value":{"type":"string","example":"1000099999"},"display":{"type":"string","example":"Directory of Services (DOS)"}}}}}},"endpoint":{"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","example":"Endpoint/7ded9440-3543-4809-b834-25c9be211195"}}}}}}}}}}},"OrganizationBundle":{"type":"object","x-stoplight":{"id":"vscbj7npfhw3e"},"properties":{"resourceType":{"type":"string"},"id":{"type":"string","example":"777a156c-af3c-4748-a8a3-7e95e4b0df9a"},"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":"Organization"},"id":{"type":"string"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string"},"profile":{"type":"array","items":{"type":"string","example":"https://www.hl7.org/fhir/endpoint.html"}}}}}}}}}}},"Service":{"type":"string","example":"https://fhir.nhs.uk/Id/dos-service-id|1000099999"},"GUID":{"type":"string","format":"uuid","example":"c1ab3fba-6bae-4ba4-b257-5a87c44d4a91"},"EndpointIdentifier":{"type":"string","example":"https://fhir.nhs.uk/Id/EndpointSystem|EndpointValue"},"Has":{"type":"string","enum":["HealthcareService.Identifier","HealthcareService.Id"]},"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 example below shows a General Practitioner and their SDS Role profile Id.\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"}}}}