{"openapi":"3.0.0","info":{"title":"Patient Care - FHIR API","version":"v1.44.0-beta","description":"\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/info.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\">This API is <a href=\"https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses\">in production, beta but internal</a>, meaning the API is not currently available for integration by external third parties. If you want to use it, <a href=\"https://digital.nhs.uk/developer/help-and-support\">contact us</a> and we'll look at making it available.</p></div>            \n        </div>\n    </div>\n</div>\n\n## Overview\n\nUse this API to retrieve referrals for a patient from the [e-Referral Service (e-RS)](https://digital.nhs.uk/services/e-referral-service) and, if applicable, retrieve service information for a referral that has a current appointment booking with a service or is currently deferred to a service.\n\nThis API is designed to be used by the [Patient Care Aggregator](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-fhir).\n\nAs an integrated system acting on behalf of a patient, you can:\n\n  - retrieve a patient's referrals\n  - retrieve information for a single service\n\nYou cannot use this API to:\n  - get patient personal demographic details – instead, use the [Personal Demographic Service (PDS)](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir)\n\nYou can access the following data:\n  - a summary of each active referral\n      \n### Access modes\n\nThis API has one access mode:\n\n| Access mode                   | Authentication via         | Functions               | Availability                    |\n| ----------------------------- | -------------------------- | ----------------------- | ------------------------------- |\n| [Patient access](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis)  | [NHS login](https://digital.nhs.uk/services/nhs-login/nhs-login-for-partners-and-developers)    | Get own details         | [In production, beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses)      |\n\n#### Patient, user-restricted access\nThis access mode allows integrated systems acting on behalf of a patient to access Patient Care FHIR API endpoints by authenticating users with [NHS login](https://digital.nhs.uk/services/nhs-login/nhs-login-for-partners-and-developers).\n\n## Who can use this API\n\nCurrently, this API is for [internal use only](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\n## Related APIs\n\nThe following APIs are related to this API:\n\n  - [e-Referral Service - FHIR API](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#top) - use this API to access the national service for creating and managing paperless referrals in primary and secondary care.\n  - [Personal Demographic Service (PDS)](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) - use this API to access patients' personal information such as name, address, date of birth, related people, registered GP and NHS number.\n  - [Patient Care Aggregator](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-fhir) - use this API to get an aggregated list of referrals and bookings for a patient from secondary care providers.\n\n## API status and roadmap\n\nThis API is [in production, beta but internal](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\n## Service level\nThis API is a gold service, meaning it is operational and supported 24 x 7 x 365.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\n\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest).\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/), except that it does not support the [capabilities](http://hl7.org/fhir/R4/http.html#capabilities) interaction.\n\nIt includes some country-specific FHIR extensions, which are built against [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core), specifically [fhir.r4.ukcore.stu1](https://simplifier.net/packages/fhir.r4.ukcore.stu1).\n\nYou do not need to know much about FHIR to use this API - FHIR APIs are just RESTful APIs that follow specific rules. In particular:\n\n  - resource names are capitalised and singular, for example `/ServiceRequest` not `/servicerequests`\n  - array names are singular, for example `line` not `lines` for address lines\n  - data items that are country-specific and thus not included in the FHIR global base resources are usually wrapped in an `extension` object\n\nThere are [libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) available to help with the FHIR API integration.\n\n## Network access\n\nThis API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n\n## Security and authorisation\n    \nThis access mode is [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nThe end user must be:\n- present\n- a patient\n- strongly authenticated and authorised by [NHS login](https://digital.nhs.uk/services/nhs-login/nhs-login-for-partners-and-developers)\n\nTo use this access mode, use one of the following security patterns:\n- [User-restricted RESTful API - NHS login separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-login-separate-authentication-and-authorisation)\n- [User-restricted RESTful API - NHS login combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-login-combined-authentication-and-authorisation)\n\n## Environments and testing\n\n| Environment       | Base URL                                                               |\n| ----------------- | ---------------------------------------------------------------------- |\n| Integration Test  | `https://int.api.service.nhs.uk/e-referrals-service-patient-care-api`  |\n| Production        | `https://api.service.nhs.uk/e-referrals-service-patient-care-api`      |\n\n## Onboarding\n\nCurrently new suppliers are not being onboarded onto this API.\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\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n","contact":{"name":"e-referrals-service-patient-care-api API Support","url":"https://digital.nhs.uk/developer/help-and-support","email":"api.management@nhs.net"}},"servers":[{"url":"https://int.api.service.nhs.uk/e-referrals-service-patient-care-api","description":"Integration test environment."},{"url":"https://api.service.nhs.uk/e-referrals-service-patient-care-api","description":"Production environment."}],"paths":{"/FHIR/R4/ServiceRequest":{"get":{"security":[{"bearerAuth":[]}],"summary":"Retrieve referral requests for a patient","description":"## Overview\n\nUse this endpoint to retrieve active e-RS referrals for an authenticated patient, including summary details relating to its current state.\n\nWhere the referral is currently being managed by a service provider, this endpoint will reference the Service ID for that service. This can then be used to retrieve the service information using [Retrieve heathcare service](#get-/FHIR/R4/HealthcareService/-id-).\n\nThe referrals that are returned by this endpoint are the same referrals that are accessible to the patient via [NHS Manage Your Referral](https://www.nhs.uk/nhs-services/hospitals/book-an-appointment/).\n\n## Pre-requisites\n\nIn order to use this endpoint the patient must be an authenticated user.\n\nThe patient needs to have authenticated via [NHS login](https://digital.nhs.uk/services/nhs-login/nhs-login-for-partners-and-developers) and meet the required [identity proofing level](https://nhsconnect.github.io/nhslogin/vectors-of-trust/) (currently this is \"P9\").\n\n## Use case\n\nAs an authenticated user\n\nI want to retrieve my referrals\n\nSo that I can view and manage my referrals\n\n## Related endpoints\n\nYou can retrieve the attributes of a single service via [Retrieve heathcare service](#get-/FHIR/R4/HealthcareService/-id-) using the Service ID\n","operationId":"a001-retrieve-referral-requests","parameters":[{"in":"query","name":"patient:identifier","description":"Parameter to supply a patient NHS Number.\n","required":true,"schema":{"type":"string"},"examples":{"nhsNumber":{"value":"9912003888","summary":"Searching by NHS number"},"systemWithNhsNumber":{"value":"https://fhir.nhs.uk/Id/nhs-number|9912003888","summary":"Searching by system with NHS number"}}},{"in":"query","name":"category","description":"Parameter to supply the category, defined as per http://snomed.info/sct. Supported only 'Patient referral', which is the value 3457005.\n","required":true,"schema":{"type":"string","enum":["3457005","http://snomed.info/sct|3457005"]},"examples":{"code":{"value":"3457005","summary":"Searching by code"},"systemWithCode":{"value":"http://snomed.info/sct|3457005","summary":"Searching by system with code"}}},{"in":"query","style":"form","explode":true,"name":"_revinclude","description":"A URL parameter that returns the active Appointment or Task to a ServiceRequest.\nPlease note that '_revinclude' query parameter can be supplied multiple times for example:\n\n`GET /ServiceRequest?patient:identifier=https://fhir.nhs.uk/Id/nhs-number|9912003888&category=http://snomed.info/sct|3457005&_revinclude=Appointment:based-on&_revinclude=Task:focus`\n","schema":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"string","enum":["Appointment:based-on","Task:focus"]},"example":"Appointment:based-on"}},{"in":"header","name":"X-Correlation-ID","description":"Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}],"responses":{"200":{"description":"The Response contains a FHIR 'Bundle' that, in turn, contains 'ServiceRequest' resources where each 'ServiceRequest' resource can include the latest 'Task' or 'Appointment' associated to the 'ServiceRequest'.\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"Bundle resource containing ServiceRequest resources","type":"object","required":["id","meta","timestamp","resourceType","type","total","link"],"properties":{"id":{"type":"string","example":"08acc887-6a7b-4b38-8f50-022e41319efe"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"],"example":"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2021-04-20T12:17:35.128Z"}}},"resourceType":{"type":"string","enum":["Bundle"],"example":"Bundle"},"timestamp":{"type":"string","format":"date-time","example":"2022-03-14T14:35:00.00Z"},"type":{"type":"string","enum":["searchset"],"example":"searchset"},"total":{"type":"integer","minimum":0,"format":"int32","example":3},"link":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["relation","url"],"properties":{"relation":{"type":"string","enum":["self"],"example":"self"},"url":{"type":"string","example":"_baseUrl_/ServiceRequest?patient%3Aidentifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C9912003888&category=http%3A%2F%2Fsnomed.info%2Fsct%7C3457005&_revinclude=Task%3Afocus&_revinclude=Appointment%3Abased-on&_revinclude=Task%3Afocus"}}}},"entry":{"type":"array","description":"\n| Field                  | Cardinality | Notes                                                                                       |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `ServiceRequest`       | `0..*`      | A ServiceRequest might have an Appointment or a Task related, but not both at the same time. If the ServiceRequest is unbooked then it will not have an Appointment or a Task.|\n| `Appointment`          | `0..*`      | If the ServiceRequest is booked then it will have one Appointment. Note that multiple Appointments can be returned, but each one will refer to a single ServiceRequest.      |\n| `Task`                 | `0..*`      | If the ServiceRequest has a deferral or a triage deferral. Note that multiple Tasks can be returned, but each one will refer to a single ServiceRequest.                     |\n","items":{"anyOf":[{"title":"ServiceRequest","description":"The details of an active ServiceRequest.\n","type":"object","required":["fullUrl","resource","search"],"properties":{"fullUrl":{"type":"string","example":"_baseUrl_/ServiceRequest/6c2a1f9b-2517-419d-9099-591ba63f176c"},"resource":{"type":"object","required":["id","meta","resourceType","identifier","extension","status","intent","category","requester","priority","subject","authoredOn"],"properties":{"id":{"type":"string","example":"6c2a1f9b-2517-419d-9099-591ba63f176c"},"meta":{"type":"object","required":["versionId","profile"],"properties":{"versionId":{"type":"string","example":"4"},"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"},"minItems":1,"maxItems":1}}},"resourceType":{"type":"string","enum":["ServiceRequest"],"example":"ServiceRequest"},"identifier":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","description":"Unique Booking Reference Number (known as \"Booking Reference\" Patient side) is a 12 digit number used as an internal and external identifier of the referral.","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/UBRN"],"example":"https://fhir.nhs.uk/Id/UBRN"},"value":{"type":"string","example":"000000072241"}}}},"extension":{"type":"array","minItems":3,"maxItems":3,"nullable":false,"description":"\n| Field                                      | Cardinality | Notes                                                                 |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------- |\n| `Extension-Portal-Link`                    | `1..1`      |  Deep Link into the specific landing page in MYR                      |\n| `Extension-ServiceRequest-Priority`        | `1..1`      |  Code for the priority of the referral set by the Referring Clinician |\n| `Extension-ServiceRequest-State`           | `1..1`      |  Code for the ServiceRequest state                                    |\n","items":{"anyOf":[{"title":"Extension-Portal-Link","description":"Extension to supply the deep Link into the specific landing page in MYR","type":"object","required":["url","valueUrl"],"properties":{"url":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link"],"example":"https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link"},"valueUrl":{"type":"string","example":"https://refer.nhs.uk/nhslogin?ubrn=111111111112"}}},{"title":"Extension-ServiceRequest-Priority","description":"Extension to supply the current priority of a ServiceRequest within e-RS","type":"object","required":["url","valueCoding"],"properties":{"url":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority"],"example":"https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority"},"valueCoding":{"type":"object","required":["system","code","display"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/eRS-Priority"],"example":"https://fhir.nhs.uk/CodeSystem/eRS-Priority"},"code":{"type":"string","enum":["ROUTINE","URGENT","TWO_WEEK_WAIT"],"example":"TWO_WEEK_WAIT"},"display":{"description":"display value of the priority as it is shown on e-RS.","type":"string","example":"2 Week Wait"}}}}},{"title":"Extension-ServiceRequest-State","description":"Extension to supply the e-RS representation of the state of the referral.","type":"object","required":["url","extension"],"properties":{"url":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State"],"example":"https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State"},"extension":{"type":"array","minItems":1,"maxItems":1,"items":{"anyOf":[{"type":"object","description":"e-RS representation of the state of the ServiceRequest.","required":["url","valueCoding"],"properties":{"url":{"type":"string","enum":["state"],"example":"state"},"valueCoding":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/eRS-ReferralState"],"example":"https://fhir.nhs.uk/CodeSystem/eRS-ReferralState"},"code":{"type":"string","enum":["REJECTED","TRIAGE_RESPONSE","AWAITING_TRIAGE","NOT_BOOKED","DEFER_TO_PROVIDER","BOOKED","APPOINTMENT_CANCELLED_BY_PATIENT","APPOINTMENT_CANCELLED_BY_PROVIDER","CARL","ARBL","CARBL_OR_ARL"],"example":"NOT_BOOKED"}}}}}]}}}}]}},"contained":{"type":"array","minItems":1,"maxItems":1,"nullable":false,"description":"\n| Field                                   | Cardinality | Notes                                      |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `PractitionerRole`                      | `1..1`      |                                            |  \n","items":{"anyOf":[{"title":"PractitionerRole","type":"object","required":["resourceType","id","practitioner","organization","meta"],"properties":{"resourceType":{"type":"string","enum":["PractitionerRole"],"example":"PractitionerRole"},"id":{"type":"string","example":"PractitionerRole-R69-000000000101"},"practitioner":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/sds-user-id"],"example":"https://fhir.nhs.uk/Id/sds-user-id"},"value":{"type":"string","example":"000000000101"}}}}},"organization":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"R69"}}}}},"meta":{"type":"object","required":["profile"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"},"minItems":1,"maxItems":1}}}}}]}},"status":{"description":"The status of the ServiceRequest.","type":"string","enum":["active"],"example":"active"},"priority":{"type":"string","enum":["routine","urgent","asap"],"example":"asap"},"intent":{"type":"string","enum":["order"],"example":"order"},"category":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["http://snomed.info/sct"],"example":"http://snomed.info/sct"},"code":{"type":"string","example":"3457005"}}}}}}},"subject":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/nhs-number"],"example":"https://fhir.nhs.uk/Id/nhs-number"},"value":{"type":"string","example":"9912003888"}}}}},"requester":{"type":"object","required":["reference"],"properties":{"reference":{"type":"string","example":"#PractitionerRole-R69-000000000101"}}},"performerType":{"description":"Specialty used to search for the shortlisted service(s) (if one was used).","type":"object","required":["coding"],"properties":{"coding":{"type":"array","minItems":1,"maxItems":1,"items":{"items":{"type":"object","required":["system","code","display"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/eRS-Specialty"],"example":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty"},"code":{"type":"string","example":"DERMATOLOGY"},"display":{"type":"string","example":"Dermatology"}}}}}}},"authoredOn":{"description":"Date the referral was initiated in e-RS","type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"search":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["match"],"example":"match"}}}}},{"title":"Appointment","description":"The current Appointment for a ServiceRequest.\n","type":"object","required":["fullUrl","resource","search"],"properties":{"fullUrl":{"type":"string","example":"_baseUrl_/Appointment/2c539951-0819-4ffb-ab77-b7cbdc5d9c9a"},"resource":{"type":"object","required":["id","resourceType","meta","status","basedOn","participant"],"properties":{"id":{"type":"string","example":"2c539951-0819-4ffb-ab77-b7cbdc5d9c9a"},"resourceType":{"type":"string","enum":["Appointment"],"example":"Appointment"},"meta":{"type":"object","required":["versionId","profile"],"properties":{"versionId":{"type":"string","example":"5"},"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-Appointment-PatientCare"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-Appointment-PatientCare"},"minItems":1,"maxItems":1}}},"status":{"type":"string","enum":["booked"],"example":"booked"},"basedOn":{"type":"array","items":{"type":"object","required":["reference"],"properties":{"reference":{"type":"string","example":"_baseUrl_/ServiceRequest/6c2a1f9b-2517-419d-9099-591ba63f176c"}}}},"start":{"description":"Date time of the current appointment booking.","type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"},"end":{"description":"The appointment end date time.","type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"},"slot":{"type":"array","minItems":1,"maxItems":1,"description":"When the Healthcare Service is directly bookable then there will be 1 slot, however when it's indirectly bookable then there are no slots.","items":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/unique-slot-reference-number"],"example":"https://fhir.nhs.uk/Id/unique-slot-reference-number"},"value":{"type":"string","example":"USRN-12000001"}}}}}},"participant":{"type":"array","minItems":2,"maxItems":2,"description":"\n| Field                                   | Cardinality | Notes                                      |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `HealthcareService`                     | `1..1`      |                                            |  \n| `Patient`                               | `1..1`      |                                            |  \n","items":{"anyOf":[{"title":"HealthcareParticipant","type":"object","required":["actor","status"],"properties":{"actor":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ers-service"],"example":"https://fhir.nhs.uk/Id/ers-service"},"value":{"type":"string","example":"11002"}}}}},"status":{"type":"string","enum":["accepted"],"example":"accepted"}}},{"title":"PatientParticipant","type":"object","required":["actor","status"],"properties":{"actor":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/nhs-number"],"example":"https://fhir.nhs.uk/Id/nhs-number"},"value":{"type":"string","example":"9912003888"}}}}},"status":{"type":"string","enum":["accepted"],"example":"accepted"}}}]}}}},"search":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["include"],"example":"include"}}}}},{"title":"Task","description":"The current Task for a ServiceRequest.\n","type":"object","required":["fullUrl","resource","search"],"properties":{"fullUrl":{"type":"string","example":"_baseUrl_/Task/9f7d3feb-5442-4df7-83ef-7afd2e99f0e5"},"resource":{"type":"object","required":["id","resourceType","meta","owner","status","intent","code","for","focus"],"properties":{"id":{"type":"string","example":"9f7d3feb-5442-4df7-83ef-7afd2e99f0e5"},"resourceType":{"type":"string","enum":["Task"],"example":"Task"},"status":{"type":"string","enum":["requested"],"example":"requested"},"intent":{"type":"string","enum":["order"],"example":"order"},"code":{"description":"Indicates what type of task this is. Will differentiate between an appointment deferral and a triage deferral.","type":"object","required":["coding"],"properties":{"coding":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/Workflow-Code"],"example":"https://fhir.nhs.uk/CodeSystem/Workflow-Code"},"code":{"type":"string","enum":["APPOINTMENT_DEFERRAL","TRIAGE_DEFERRAL"],"example":"APPOINTMENT_DEFERRAL"}}}}}},"focus":{"description":"Which ServiceRequest this Deferral is related to.","type":"object","required":["reference"],"properties":{"reference":{"type":"string","example":"_baseUrl_/ServiceRequest/eb13327f-e990-4667-b37a-89eb93a94c47"}}},"for":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/nhs-number"],"example":"https://fhir.nhs.uk/Id/nhs-number"},"value":{"type":"string","example":"9912003888"}}}}},"owner":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ers-service"],"example":"https://fhir.nhs.uk/Id/ers-service"},"value":{"type":"string","example":"11002"}}}}},"restriction":{"description":"Review Due Date. \nIf deferred to provider (because there were no appointments available for a directly bookable service) then this is the date by which the provider should resolve the appointment slot issue; or\nIf the ServiceRequest was sent to a triage service then this is the date by which the provider should have reviewed the ServiceRequest.\n","type":"object","required":["period"],"properties":{"period":{"type":"object","required":["end"],"properties":{"end":{"type":"string","format":"date","example":"2022-01-25"}}}}},"meta":{"type":"object","required":["versionId","profile"],"properties":{"versionId":{"type":"string","example":"2"},"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-PatientCare"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-PatientCare"},"minItems":1,"maxItems":1}}}}},"search":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["include"],"example":"include"}}}}}]}}}},"examples":{"multiple":{"summary":"ServiceRequest search response containing multiple ServiceRequest resources with an associated Task or Appointment","value":{"resourceType":"Bundle","type":"searchset","timestamp":"2022-03-23T08:14:07.422+00:00","meta":{"profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"],"lastUpdated":"2022-03-23T08:14:07.422+00:00"},"entry":[{"fullUrl":"_baseUrl_/ServiceRequest/r.6c2a1f9b-2517-419d-9099-591ba63f176c","search":{"mode":"match"},"resource":{"resourceType":"ServiceRequest","id":"r.6c2a1f9b-2517-419d-9099-591ba63f176c","meta":{"versionId":"1","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"]},"extension":[{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link","valueUrl":"https://refer.nhs.uk/nhslogin?ubrn=111111111111"},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State","extension":[{"url":"state","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-ReferralState","code":"BOOKED"}}]},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Priority","code":"TWO_WEEK_WAIT","display":"2 Week Wait"}}],"contained":[{"resourceType":"PractitionerRole","id":"PractitionerRole-R69-000000000101","meta":{"profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"]},"practitioner":{"identifier":{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"000000000101"}},"organization":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R69"}}}],"identifier":[{"system":"https://fhir.nhs.uk/Id/UBRN","value":"111111111111"}],"status":"active","intent":"order","category":[{"coding":[{"system":"http://snomed.info/sct","code":"3457005"}]}],"priority":"asap","subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9912003888"}},"authoredOn":"2022-01-11T16:40:00+00:00","requester":{"reference":"#PractitionerRole-R69-000000000101"},"performerType":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty","code":"DERMATOLOGY","display":"Dermatology"}]}}},{"fullUrl":"_baseUrl_/ServiceRequest/r.876f5a90-ca1d-4644-b830-376b821a917b","search":{"mode":"match"},"resource":{"resourceType":"ServiceRequest","id":"r.876f5a90-ca1d-4644-b830-376b821a917b","meta":{"versionId":"2","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"]},"extension":[{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link","valueUrl":"https://refer.nhs.uk/nhslogin?ubrn=111111111113"},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State","extension":[{"url":"state","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-ReferralState","code":"NOT_BOOKED"}}]},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Priority","code":"TWO_WEEK_WAIT","display":"2 Week Wait"}}],"contained":[{"resourceType":"PractitionerRole","id":"PractitionerRole-R69-000000000101","meta":{"profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"]},"practitioner":{"identifier":{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"000000000101"}},"organization":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R69"}}}],"identifier":[{"system":"https://fhir.nhs.uk/Id/UBRN","value":"111111111113"}],"status":"active","intent":"order","category":[{"coding":[{"system":"http://snomed.info/sct","code":"3457005"}]}],"priority":"asap","subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9912003888"}},"authoredOn":"2022-01-11T16:40:00+00:00","requester":{"reference":"#PractitionerRole-R69-000000000101"},"performerType":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty","code":"DERMATOLOGY","display":"Dermatology"}]}}},{"fullUrl":"_baseUrl_/ServiceRequest/r.eb13327f-e990-4667-b37a-89eb93a94c47","search":{"mode":"match"},"resource":{"resourceType":"ServiceRequest","id":"r.eb13327f-e990-4667-b37a-89eb93a94c47","meta":{"versionId":"3","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"]},"extension":[{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link","valueUrl":"https://refer.nhs.uk/nhslogin?ubrn=111111111112"},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State","extension":[{"url":"state","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-ReferralState","code":"TRIAGE_RESPONSE"}}]},{"url":"https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority","valueCoding":{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Priority","code":"TWO_WEEK_WAIT","display":"2 Week Wait"}}],"contained":[{"resourceType":"PractitionerRole","id":"PractitionerRole-R69-000000000101","meta":{"profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"]},"practitioner":{"identifier":{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"000000000101"}},"organization":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R69"}}}],"identifier":[{"system":"https://fhir.nhs.uk/Id/UBRN","value":"111111111112"}],"status":"active","intent":"order","category":[{"coding":[{"system":"http://snomed.info/sct","code":"3457005"}]}],"priority":"asap","subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9912003888"}},"authoredOn":"2022-01-11T16:40:00+00:00","requester":{"reference":"#PractitionerRole-R69-000000000101"},"performerType":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty","code":"DERMATOLOGY","display":"Dermatology"}]}}},{"fullUrl":"_baseUrl_/Appointment/2c539951-0819-4ffb-ab77-b7cbdc5d9c9a","search":{"mode":"include"},"resource":{"resourceType":"Appointment","id":"2c539951-0819-4ffb-ab77-b7cbdc5d9c9a","meta":{"versionId":"5","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-Appointment-PatientCare"]},"status":"booked","basedOn":[{"reference":"_baseUrl_/ServiceRequest/6c2a1f9b-2517-419d-9099-591ba63f176c"}],"start":"2021-06-13T12:30:00+00:00","end":"2021-06-13T12:45:00+00:00","slot":[{"identifier":{"system":"https://fhir.nhs.uk/Id/unique-slot-reference-number","value":"USRN-12000001"}}],"participant":[{"actor":{"identifier":{"system":"https://fhir.nhs.uk/Id/ers-service","value":"11002"}},"status":"accepted"},{"actor":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9912003888"}},"status":"accepted"}]}},{"fullUrl":"_baseUrl_/Task/9f7d3feb-5442-4df7-83ef-7afd2e99f0e5","search":{"mode":"include"},"resource":{"resourceType":"Task","status":"requested","intent":"order","meta":{"versionId":"2","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-PatientCare"]},"code":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/Workflow-Code","code":"TRIAGE_DEFERRAL"}]},"focus":{"reference":"_baseUrl_/ServiceRequest/r.eb13327f-e990-4667-b37a-89eb93a94c47"},"for":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9912003888"}},"owner":{"identifier":{"system":"https://fhir.nhs.uk/Id/ers-service","value":"11002"}},"restriction":{"period":{"end":"2022-01-25"}},"id":"9f7d3feb-5442-4df7-83ef-7afd2e99f0e5"}}],"total":3,"link":[{"relation":"self","url":"_baseUrl_/ServiceRequest?subject:identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C9912003888&category=http%3A%2F%2Fsnomed.info%2Fsct%7C3457005&_count=10&_skip=0&_revinclude=Appointment:based-on&_revinclude=Task:focus"}],"id":"5f821d90-94bc-4617-b530-d0c322b6f5b8"}},"empty":{"summary":"Empty ServiceRequest search response","value":{"resourceType":"Bundle","type":"searchset","timestamp":"2022-04-29T11:45:21.992+00:00","meta":{"lastUpdated":"2022-03-23T08:14:07.422+00:00","profile":["https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle"]},"total":0,"link":[{"relation":"self","url":"_baseUrl_/ServiceRequest?patient%3Aidentifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number%7C9912003888&category=http%3A%2F%2Fsnomed.info%2Fsct%7C3457005&_revinclude=Appointment%3Abased-on&_revinclude=Task%3Afocus"}],"id":"d9126546-3492-4086-a810-8ad91e788158"}}}}}},"400":{"description":"Where status code 400 (Bad Request) is returned then an OperationOutcome will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REC_BAD_REQUEST                    | The request is invalid, a required parameter is missing. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"401":{"description":"Status code 401 (Unauthorized) is returned when there is a failure on the authentication process. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED                      | Failure in the authentication process. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"403":{"description":"Where status code 403 (Forbidden) is returned then an OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REC_FORBIDDEN                      | The user cannot retrieve the requested data. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"429":{"description":"Status code 429 (Too Many Requests) is returned when too many requests are received in a given amount of time. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| TOO_MANY_REQUESTS                  | Too many requests received. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"500":{"description":"When status code 500 (Internal Server Error) is returned then an OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR                   | There was an error in the server. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"504":{"description":"Where status code 504 (Gateway Timeout) is returned then an OperationOutcome will be included in the body. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| GATEWAY_TIMEOUT                    | The API operation took too long. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}}}}},"/FHIR/R4/HealthcareService/{id}":{"get":{"security":[{"bearerAuth":[]}],"summary":"Retrieve healthcare service","description":"## Overview\n\nUse this endpoint to retrieve attributes about a single service.\n\n## Pre-requisites\n\nIn order to use this endpoint the patient must be an authenticated user.\n\nThe patient needs to have authenticated via [NHS login](https://digital.nhs.uk/services/nhs-login/nhs-login-for-partners-and-developers) and meet the required [identity proofing level](https://nhsconnect.github.io/nhslogin/vectors-of-trust/) (currently this is \"P9\").\n\nYou need to have identified one service ID to use this endpoint. \n\n## Use case\n\nAs an authenticated user\n\nI want to know more about a healthcare service  \n\nSo that I can make appropriate decisions about my care\n\n## Related endpoints\n\nIf a referral currently has an appointment booking to a service or is deferred to a service then [Retrieve referral requests for a patient](#get-/FHIR/R4/ServiceRequest) can be used to retrieve the Service ID of that service.\n","operationId":"a002-retrieve-healthcare-service","parameters":[{"name":"id","in":"path","description":"The ID of the healthcare service to be retrieved. It must be valid and relate to an existing Healthcare Service otherwise a HTTP 404 response will be returned.\n","required":true,"schema":{"type":"string","example":"1"}},{"in":"header","name":"X-Correlation-ID","description":"Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}],"responses":{"200":{"description":"The Response contains a Healthcare service.\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"A single Healthcare service.","type":"object","required":["id","meta","identifier","resourceType","name","specialty","location","providedBy"],"properties":{"id":{"type":"string","example":"123"},"meta":{"type":"object","required":["versionId","profile"],"properties":{"versionId":{"type":"string","example":"4"},"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-HealthcareService-PatientCare"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-HealthcareService-PatientCare"},"minItems":1,"maxItems":1}}},"identifier":{"type":"array","minItems":1,"maxItems":1,"items":{"anyOf":[{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ers-service"],"example":"https://fhir.nhs.uk/Id/ers-service"},"value":{"type":"string","example":"11002"}}}]}},"resourceType":{"type":"string","enum":["HealthcareService"],"example":"HealthcareService"},"providedBy":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ods-organization-code"],"example":"https://fhir.nhs.uk/Id/ods-organization-code"},"value":{"type":"string","example":"R69"}}}}},"specialty":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","minItems":1,"maxItems":1,"items":{"items":{"type":"object","required":["system","code","display"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/eRS-Specialty"],"example":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty"},"code":{"type":"string","example":"DERMATOLOGY"},"display":{"type":"string","example":"Dermatology"}}}}}}}},"type":{"type":"array","minItems":0,"maxItems":1,"items":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType"],"example":"https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType"},"code":{"type":"string","enum":["TELEPHONE_ASSESSMENT","OPHTHALMOLOGIST","NURSE_CLINIC","GPSI","FIRST_OUTPATIENT","DIAGNOSTIC","DAY_CASE","ASSESSMENT_SERVICE","AHP_CLINIC"],"example":"DAY_CASE"}}}}}}},"location":{"type":"array","items":{"type":"object","properties":{"identifier":{"description":"Reference detailing the location a service is based within.","type":"object","properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/ods-site-code"],"example":"https://fhir.nhs.uk/Id/ods-site-code"},"value":{"type":"string","example":"R6901"}}}}}},"name":{"description":"Name of the HealthcareService (as per e-RS Directory of Services).","type":"string","example":"Direct SVC 1"},"endpoint":{"description":"Slot Management Provider System Endpoint, only applicable if the HealtchareService is directly bookable.","type":"array","items":{"anyOf":[{"title":"NhsSpineASID","type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/nhsSpineASID"],"example":"https://fhir.nhs.uk/Id/nhsSpineASID"},"value":{"type":"string","example":"9912003888"}}}}},{"title":"NhsMhsPartyKey","type":"object","required":["identifier"],"properties":{"identifier":{"type":"object","required":["system","value"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/Id/nhsMhsPartyKey"],"example":"https://fhir.nhs.uk/Id/nhsMhsPartyKey"},"value":{"type":"string","example":"9912003888"}}}}}]}}}},"examples":{"minimal":{"summary":"Service containing the minimal attributes","value":{"id":"70000","meta":{"versionId":"1","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-HealthcareService-PatientCare"]},"resourceType":"HealthcareService","identifier":[{"system":"https://fhir.nhs.uk/Id/ers-service","value":"70000"}],"providedBy":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R69"}},"specialty":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty","code":"CARDIOLOGY","display":"Cardiology"}]}],"location":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-site-code","value":"R68"}}],"name":"Cardiology Triage Service"}},"maximul":{"summary":"Service containing the maximum attributes","value":{"id":"11002","meta":{"versionId":"0","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-HealthcareService-PatientCare"]},"resourceType":"HealthcareService","identifier":[{"system":"https://fhir.nhs.uk/Id/ers-service","value":"11002"}],"providedBy":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"R69"}},"type":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType","code":"DIAGNOSTIC"}]}],"specialty":[{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/eRS-Specialty","code":"CARDIOLOGY","display":"Cardiology"}]}],"location":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-site-code","value":"R69"}}],"name":"Cardiology Directly Bookable Service","endpoint":[{"identifier":{"system":"https://fhir.nhs.uk/Id/nhsSpineASID","value":"TESTPAS3110"}}]}}}}}},"401":{"description":"Status code 401 (Unauthorized) is returned when there is a failure on the authentication process. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED                      | Failure in the authentication process. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"404":{"description":"Where status code 404 (Resource Not Found) is returned then an OperationOutcome will be included in the body, as detailed below. \n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REC_NOT_FOUND                      | The healthcare service with the specified ID does not exist |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"429":{"description":"Status code 429 (Too Many Requests) is returned when too many requests are received in a given amount of time. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| TOO_MANY_REQUESTS                  | Too many requests received. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"500":{"description":"When status code 500 (Internal Server Error) is returned then an OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR                   | There was an error in the server. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}},"504":{"description":"Where status code 504 (Gateway Timeout) is returned then an OperationOutcome will be included in the body. An OperationOutcome will be included in the body, as detailed below.\n\n| Error code                         | Description                                                                                                                  |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| GATEWAY_TIMEOUT                    | The API operation took too long. |\n","headers":{"X-Correlation-ID":{"description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","required":false,"schema":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"description":"A unique, request specific identifier generated by the server, which is always present in the response.\n","required":false,"schema":{"type":"string","example":"58621d65-d5ad-4c3a-959f-0438e355990e-1"}},"Content-Type":{"description":"Indicates the media type of the associated resource.\n","required":true,"schema":{"type":"string","enum":["application/fhir+json"],"example":"application/fhir+json"}}},"content":{"application/fhir+json":{"schema":{"title":"OperationOutcome","type":"object","required":["resourceType","meta","issue"],"properties":{"resourceType":{"type":"string","enum":["OperationOutcome"],"example":"OperationOutcome"},"meta":{"type":"object","required":["profile","lastUpdated"],"properties":{"profile":{"type":"array","items":{"type":"string","enum":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"],"example":"https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"},"minItems":1,"maxItems":1},"lastUpdated":{"type":"string","format":"date-time","example":"2022-03-15T12:17:35.128Z"}}},"issue":{"type":"array","items":{"type":"object","required":["severity","code","details"],"properties":{"severity":{"type":"string","example":"error"},"code":{"type":"string","enum":["required","not-found","forbidden","exception"],"example":"required"},"diagnostics":{"type":"string","example":"Missing mandatory value"},"expression":{"type":"array","items":{"type":"string","example":"http.\"patient:identifer\""}},"details":{"type":"object","required":["coding"],"properties":{"coding":{"type":"array","items":{"type":"object","required":["system","code"],"properties":{"system":{"type":"string","enum":["https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"example":"https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode"},"code":{"type":"string","example":"ACCESS_DENIED"}}}}}}}}}}},"example":{"meta":{"lastUpdated":"2022-05-09T08:30:46.262Z","profile":["https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required","diagnostics":"Missing mandatory value","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"REC_BAD_REQUEST"}]},"expression":["http.\"category\""]}]}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-spec-publication":{"try-this-api":{"disabled":true}}}