{"openapi":"3.0.3","info":{"title":"National Document Repository - FHIR API","description":"## Overview\n\nThe National Document Repository (NDR) is a central place where digital patient documents can be accessed and stored by frontline services. Use this API to access, store and manage digital Lloyd George patient records.\n\nThis API has different access modes, which give you access to different functionalities.\n\nDepending on your access mode you can:\n* retrieve for a patient’s Lloyd George record\n\n*Note: The ability to use these functions will vary depending on the access mode you use.*\n\nYou cannot: \n* upload a patient’s Lloyd George record\n* edit patient information within a record\n* redact information within a record\n\nThe National Document Repository is developing use cases on an ongoing basis. Currently the API can show data associated with the following SNOMED CT codes:\n\n* [Lloyd George record folder](http://snomed.info/sct/16521000000101)\n\n## Who can use this API\n\nThis API can only be used where there is a legal basis to do so. Make sure you have a valid use case before you go\ntoo far with your development.\n\nYou must demonstrate you have a valid use case as part of digital onboarding before you can go live (see ‘[Onboarding](#api-description__onboarding)’ below).\n\n### Pre-requisites\n\n- onboarded to the [National Record Locator](https://digital.nhs.uk/services/national-record-locator) (as a [Consumer](https://digital.nhs.uk/developer/api-catalogue/national-record-locator-fhir/v3/consumer))\n- the API is only accessible using a valid NHS Smartcard for all users\nor a system that uses an authentication method supported by\n[NHS Care Identity Service 2 (NHS CIS2)](https://digital.nhs.uk/services/identity-and-access-management/nhs-care-identity-service-2)\n\n## Related APIs\n \n- [National Record Locator - FHIR API v3 - Consumer](https://digital.nhs.uk/developer/api-catalogue/national-record-locator-fhir/v3/consumer)\n\n## API status and roadmap\n\nThis API is [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\nIf you have any other queries, [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Service level\n\nThis API is a bronze service, meaning it is operational and supported 8am to 6pm, Monday to Friday excluding bank holidays.\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/our-api-technologies#basic-rest).\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir)\nglobal standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/), except\nthat it does not support the [capabilities](http://hl7.org/fhir/R4/http.html#capabilities) interaction.\n\nIt includes some country-specific FHIR extensions, which conform to\n[FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core), specifically\n[UK.core.r4 1.0.0](https://simplifier.net/packages/uk.core.r4/1.0.0).\n\nIn particular:\n\n* resource names are capitalised and singular, and use US spellings, for example `Organization` not `organisations`\n* array names are singular, for example `entry` not `entries` 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 available](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) to help with 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\nTo use this API with [NHS smartcards](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers), the end user needs an HSCN connection, although internet-facing alternatives to smartcards are available.\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 uses the following access modes:\n\n* [User-restricted RESTful API - using NHS CIS2 - separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-separate-authentication-and-authorisation)\n\n## Errors\n\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 \nYour API-calling application should have a mechanism to automatically try again, for example by giving status information to your end user, before giving up. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#error-handling) for more information about error handling.\n\n## Open source\n\nYou might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:\n\n| Resource                  | Description                                               | Links                                                                      |\n|---------------------------|-----------------------------------------------------------|----------------------------------------------------------------------------|\n| NDR                | Source code for the core API and sandbox                 | [GitHub repo](https://github.com/nhsconnect/national-document-repository)                          |\n| NDR Infrastructure                | Source code for the cloud infrastructure | [GitHub repo](https://github.com/nhsconnect/national-document-repository-infrastructure)                          |\n\nWe currently don't have any open source client libraries or sample code for this API.\n\n## Environments and testing\n\n| Environment       | Base URL                                                               |\n| ----------------- | ---------------------------------------------------------------------- |\n| Sandbox           | `https://sandbox.api.service.nhs.uk/national-document-repository/FHIR/R4/`  |\n| Integration test  | `https://int.api.service.nhs.uk/national-document-repository/FHIR/R4/`      |\n| Production        | `https://api.service.nhs.uk/national-document-repository/FHIR/R4/`          |\n\n### Sandbox testing\n\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):\n* is for early developer testing\n* only covers a limited set of scenarios\n* is open access, so does not allow you to test authorisation\n\nFor details of sandbox test scenarios, or to try out the sandbox using our 'Try this API' feature, see the\ndocumentation for each endpoint.\n\n### Integration testing\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n\n* is for formal integration testing\n* includes authorisation\n\nIt also includes ready-to-use test data and scenarios.  For details [contact us](https://digital.nhs.uk/services/access-and-store-digital-patient-documents#contact-us).\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\n\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 your technical conformance to the requirements for this API and that you can manage risks. This might impact the design of your software.\n \nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding#using-the-digital-onboarding-portal).\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","contact":{"name":"NHS Digital API Management","url":"https://digital.nhs.uk/developer/help-and-support","email":"api.management@nhs.net"},"version":"1.0.0"},"servers":[{"url":"https://sandbox.api.service.nhs.uk/national-document-repository/FHIR/R4","description":"Sandbox environment."},{"url":"https://int.api.service.nhs.uk/national-document-repository/FHIR/R4","description":"Integration test environment."},{"url":"https://api.service.nhs.uk/national-document-repository/FHIR/R4","description":"Production environment."}],"paths":{"/DocumentReference/{id}":{"get":{"summary":"Get a single document reference","description":"Get a single document by specifying the `DocumentReference.id` and optional `type`.\nImplementation notes:\n* If the response payload is 8mb or less then the document will return as a binary attachment.\n* If the response payload is 8mb or more then the document will return as a link to a pre-signed URL.\n","operationId":"readDocumentReference","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/type"},{"$ref":"#/components/parameters/requestId"},{"$ref":"#/components/parameters/correlationId"}],"responses":{"200":{"description":"Get patient document reference operation successful","content":{"application/fhir+json;version=1":{"schema":{"$ref":"#/components/schemas/DocumentReference"},"example":{"id":"16521000000101~60E0B220f9ed81db-f90a-42d4-b7e4-d554d8f338fd","resourceType":"DocumentReference","status":"current","docStatus":"final","type":{"coding":[{"system":"http://snomed.info/sct","code":"16521000000101","display":"Lloyd George record folder"}]},"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9000000009"}},"date":"2022-12-22T11:45:41+11:00","author":[{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"Y05868"}}],"custodian":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"Y05868"}},"content":[{"attachment":{"contentType":"application/pdf","language":"en-GB","url":"https://pre-sign-url.co.uk","size":100,"title":"1_of_1[example].pdf","creation":"2022-12-22T09:45:41+11:00"}}]}}}},"400":{"description":"Invalid request, missing id path parameter","content":{"application/fhir+json;verson=1":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode","code":"MISSING_VALUE","display":"Missing value"}]},"diagnostics":"Missing request parameters"}]}}}},"401":{"description":"User has no auth, missing token","content":{"application/fhir+json;verson=1":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode","code":"ACCESS_DENIED","display":"Access has been denied to process this request"}]},"diagnostics":"The user was not able to be authenticated"}]}}}},"403":{"description":"User is unauthorised to view record","content":{"application/fhir+json;verson=1":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode","code":"ACCESS_DENIED","display":"Access has been denied to process this request"}]},"diagnostics":"You do not have access to this patient's record"}]}}}},"404":{"description":"ID provided does not match any document held","headers":{"X-Correlation-Id":{"name":"","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"$ref":"#/components/headers/CorrelationId"},"X-Request-Id":{"name":"","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"$ref":"#/components/headers/RequestId"}},"content":{"application/fhir+json;verson=1":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode","code":"RESOURCE_NOT_FOUND","display":"Resource not found"}]},"diagnostics":"Document reference not found"}]}}}},"4XX":{"description":"An error occurred as follows:\n\n| HTTP status | Error code                 | Description                                                                          |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------ |\n| 400         | MISSING_VALUE              | Missing value                                                                        |\n| 400         | VALIDATION_ERROR           | Validation error                                                                     |\n| 400         | INVALID_VALUE              | Invalid value                                                                        |\n| 401         | ACCESS_DENIED              | Access has been denied to process this request                                       |\n| 403         | ACCESS_DENIED              | Access has been denied to process this request                                       |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                   |\n\nThe Error Code comes from https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode\n","content":{"application/fhir+json;version=1":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode","version":"1","code":"ACCESS_DENIED","display":"Access has been denied to process this request"}]},"diagnostics":"You do not have access to this patient's record"}]}}}}},"deprecated":false}}},"components":{"schemas":{"Identifier":{"type":"object","properties":{"use":{"enum":["usual","official","temp","secondary","old"],"type":"string","description":"The purpose of this identifier.","example":"official"},"type":{"$ref":"#/components/schemas/CodeableConcept"},"system":{"pattern":"\\S*","type":"string","description":"Establishes the namespace for the value – that is, a URL that describes a set values that are unique","format":"uri"},"value":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"The portion of the identifier typically relevant to the user and which is unique within the context of the system."},"period":{"$ref":"#/components/schemas/Period"},"assigner":{"$ref":"#/components/schemas/Reference"}},"description":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."},"Coding":{"type":"object","properties":{"system":{"pattern":"\\S*","type":"string","description":"The identification of the code system that defines the meaning of the symbol in the code.","format":"uri"},"code":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post–coordination)."},"display":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A representation of the meaning of the code in the system, following the rules of the system."},"version":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"The version of the code system which was used when choosing this code. Note that a well–maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."},"userSelected":{"type":"boolean","description":"Indicates that this coding was chosen by a user directly – e.g. off a pick list of available items (codes or displays)."}},"description":"A code defined by a terminology system."},"CodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"$ref":"#/components/schemas/Coding"}},"text":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."}},"description":"A concept that may be defined by a formal reference to a terminology or text."},"Reference":{"type":"object","properties":{"reference":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with ''#'') refer to contained resources."},"type":{"type":"string","description":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","format":"uri","example":"Patient"},"identifier":{"$ref":"#/components/schemas/Identifier"},"display":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Plain text narrative that identifies the resource in addition to the resource reference."}},"description":"A reference to another resource."},"Attachment":{"required":["contentType","title"],"type":"object","properties":{"contentType":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.","example":"application/pdf"},"language":{"type":"string","description":"The human language of the content. The value can be any valid value according to BCP 47.","example":"en-GB"},"data":{"pattern":"(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+","type":"string","description":"The actual data of the attachment – a sequence of bytes, base64 encoded.","format":"byte"},"url":{"pattern":"\\S*","type":"string","description":"A location where the data can be accessed.","format":"uri","example":"/Binary/1"},"size":{"type":"integer","description":"The number of bytes of data that make up this attachment (before base64 encoding).","format":"int32","example":104284},"hash":{"pattern":"(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+","type":"string","description":"The calculated hash of the data using SHA–1. Represented using base64.","format":"byte"},"title":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A label or set of text to display in place of the data.","example":"Discharge Summary"},"creation":{"pattern":"([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?","type":"string","description":"The date that the attachment was first created.","format":"date-time","example":"2025-08-07T05:01:46+00:00"}},"description":"Content of a document. This is the complete definition."},"Period":{"type":"object","properties":{"start":{"type":"string","description":"The start of the period. The boundary is inclusive.","format":"date-time"},"end":{"type":"string","description":"The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.","format":"date-time"}},"description":"A time period defined by a start and end date/time."},"DocumentReference":{"required":["resourceType","content","type","subject"],"type":"object","properties":{"resourceType":{"enum":["DocumentReference"],"type":"string","description":"The type of the FHIR resource.","example":"DocumentReference"},"id":{"pattern":"16521000000101~[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.","example":"16521000000101~f9ed81db-f90a-42d4-b7e4-d554d8f338fd"},"status":{"enum":["current","superseded","entered-in-error"],"type":"string","description":"he status of this document reference.","example":"current"},"docStatus":{"enum":["preliminary","final","cancelled","entered-in-error","deprecated"],"type":"string","description":"The status of the underlying document.","example":"final"},"type":{"allOf":[{"description":"Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced."},{"$ref":"#/components/schemas/CodeableConcept"}]},"subject":{"allOf":[{"$ref":"#/components/schemas/Reference"},{"description":"Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).","example":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9000000009"}}}]},"date":{"pattern":"([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))","type":"string","description":"When the document reference was created.","format":"date-time","example":"2023-08-10T10:57:34+01:00"},"author":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Reference"},{"description":"Identifies the Organisation or group who is responsible for adding the information to the document.","example":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"Y05868"}}}]}},"custodian":{"allOf":[{"$ref":"#/components/schemas/Reference"},{"description":"Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.","example":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"Y05868"}}}]},"content":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attachment":{"$ref":"#/components/schemas/Attachment"}}},"description":"The document and format referenced. There may be multiple content element repetitions, each with a different format."},"context":{"type":"object","properties":{"encounter":{"type":"array","items":{"$ref":"#/components/schemas/Reference"},"description":"Describes the clinical encounter or type of care that the document content is associated with."},"period":{"$ref":"#/components/schemas/Period"}},"description":"The clinical context in which the document was prepared."}},"description":"A reference to a document"},"OperationOutcome":{"required":["severity","code"],"type":"object","properties":{"resourceType":{"type":"string","example":"OperationOutcome"},"issue":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["fatal","error","warning","information"],"type":"string","example":"error"},"code":{"type":"string","description":"Error or warning code from the IssueType value set.","example":"not-found"},"diagnostics":{"type":"string","description":"Additional details about the error."},"details":{"$ref":"#/components/schemas/CodeableConcept"}}}}},"description":"A FHIR resource for reporting errors and warnings."},"DocumentId":{"pattern":"16521000000101~[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}","type":"string"},"RequestPathParams":{"required":["id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/DocumentId"}}},"RequestParams":{"required":["subject:identifier"],"type":"object","properties":{"subject:identifier":{"$ref":"#/components/schemas/RequestQuerySubject"},"custodian:identifier":{"$ref":"#/components/schemas/RequestQueryCustodian"},"type":{"$ref":"#/components/schemas/RequestQueryType"}}},"RequestQuerySubject":{"pattern":"^https\\:\\/\\/fhir\\.nhs\\.uk\\/Id\\/nhs-number\\|(\\d+)$","type":"string","example":"https://fhir.nhs.uk/Id/nhs-number|9000000009"},"RequestQueryCustodian":{"pattern":"^https\\:\\/\\/fhir\\.nhs\\.uk\\/Id\\/ods-organization-code\\|(\\w+)$","type":"string","example":"https://fhir.nhs.uk/Id/ods-organization-code|Y05868"},"RequestQueryType":{"type":"string","example":"http://snomed.info/sct|16521000000101"},"RequestHeaderRequestId":{"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","type":"string","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"},"RequestHeaderCorrelationId":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"parameters":{"id":{"name":"id","in":"path","description":"logical identifier","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/DocumentId"},"examples":{"valid":{"summary":"valid ID, document held, user has correct auth (200)","value":"16521000000101~f9ed81db-f90a-42d4-b7e4-d554d8f338fd"}}},"type":{"name":"type:identifier","in":"query","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestQueryType"},"examples":{"none":{"summary":"None","value":""},"SNOMED_CODES_LLOYD_GEORGE_RECORD_FOLDER":{"summary":"Lloyd George record folder","value":"http://snomed.info/sct|16521000000101"},"invalid":{"summary":"unsupported type","value":"http://snomed.info/sct|410970009"}}},"subject":{"name":"subject:identifier","in":"query","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestQuerySubject"},"examples":{"valid_1":{"summary":"Valid #1","value":"https://fhir.nhs.uk/Id/nhs-number|9000000009"},"invalid":{"summary":"invalid","value":"https://fhir.nhs.uk/Id/nhs-number|349556001"}}},"custodian":{"name":"custodian:identifier","in":"query","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestQueryCustodian"},"examples":{"valid":{"summary":"Valid","value":"https://fhir.nhs.uk/Id/ods-organization-code|Y05868"},"invalid":{"summary":"Unknown","value":"https://fhir.nhs.uk/Id/another-code|XYZ"}}},"requestId":{"name":"X-Request-ID","in":"header","description":"A universally unique identifier (UUID) for the request, which can be used to trace the request if you contact our helpdesk.\nMust be a universally unique identifier (UUID).\nMirrored in the response.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestHeaderRequestId"}},"correlationId":{"name":"X-Correlation-ID","in":"header","description":"An optional ID which you can use to track transactions across multiple systems, and we use to de-duplicate repeated requests and to trace the request if you contact our helpdesk.\nIf you re-send a failed request please re-send this ID in the header.\nIt can take any value, but we recommend avoiding `.` characters.\nMirrored in the response.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestHeaderCorrelationId"}}},"requestBodies":{"DocumentReference":{"content":{"application/fhir+json;version=1":{"schema":{"$ref":"#/components/schemas/DocumentReference"}}},"required":true}},"headers":{"CorrelationId":{"name":"","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","description":"The X-Correlation-ID from the request header, if supplied, mirrored back.\n","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"RequestId":{"name":"","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","type":"string","description":"The X-Request-ID from the request header mirrored back.\n","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}}},"x-spec-publication":{"try-this-api":{"disabled":true}}}