{"openapi":"3.0.3","info":{"title":"Related Person Network - FHIR API","description":"## Overview\n\nThe Related Person Network  API replaces the\n[Related Person Search](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir#get-/Patient/-id-/RelatedPerson)\non the [Personal Demographics Service - FHIR API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir).\n\nConsumers can use this API to:\n\n* search for RelatedPerson for a given patient\n* read a specific RelatedPerson\n* read a specific Provenance\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. You must demonstrate you have a valid use case as part of [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\nYou must have the capability to verify NHS numbers by either:\n\n  * full PDS Spine compliant system\n  * Spine Mini Service PDS (SMSP)\n\nYou must do this before you can go live (see ‘[Onboarding](#api-description__onboarding)’ below).\n\n## API status and roadmap\n\nThis API is [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\n## Service level\n\nThis API is a bronze service, meaning it is operational and supported only Monday to Friday, 8am to 6pm, excluding Bank Holidays.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Rate limits\n\nThe default rate limit is 10TPS (Transactions Per Second), per app. If you require a higher rate limit please [contact us](https://digital.nhs.uk/developer/help-and-support), or raise this during the onboarding process.\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](https://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[fhir.r4.ukcore.stu1 0.5.1](https://simplifier.net/packages/fhir.r4.ukcore.stu1/0.5.1).\n\nYou do not need to know much about FHIR to use this API - FHIR APIs are just RESTful APIs that follow specific rules.\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\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* [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n* [User-restricted RESTful API - CIS2 separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-cis2-separate-authentication-and-authorisation)\n\n### Application restricted access\n\nThis API supports application-restricted access via signed JWT authentication, meaning we authenticate and authorise the calling application but not the end user.\n\nUse this access mode to:\n* get a patient's related persons\n* read a specific related person\n* read a specific related person's provenance\n\nFor more details see [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication).\n\nThis access mode is in production ([beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses)).\n\n### User restricted access\n\nThis API supports user-restricted access via CIS2 separate authentication and authorisation, meaning an end user must be present and authenticated to use it.\n\nUse this access mode to:\n* get a patient's related persons\n* read a specific related person\n* read a specific related person's provenance\n* update a specific related person's status\n\nThe end user must be:\n* a healthcare worker\n* strongly authenticated, using either an NHS [smartcard](https://digital.nhs.uk/services/care-identity-service/registration-authority-users) or a [modern alternative](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication)\n* authorised, using [national role-based access control (RBAC)](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/national-rbac-for-developers)\n\nFor more details see [User-restricted RESTful API - CIS2 separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-cis2-separate-authentication-and-authorisation).\n\nThis access mode is in development and not yet available.\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\n## Environments and testing\n\n| Environment       | Base URL                                                               |\n| ----------------- | ---------------------------------------------------------------------- |\n| Integration test  | `https://int.api.service.nhs.uk/related-person-network/FHIR/R4/`       |\n| Production        | `https://api.service.nhs.uk/related-person-network/FHIR/R4/`           |\n\n### Sandbox testing\n\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing) is in development and therefore not currently available.\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/developer/help-and-support).\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## Related APIs\n\nThe following APIs are related to this API:\n\n* [Personal Demographics Service - FHIR API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) - use this API to access the Personal Demographics Service (PDS) - the national electronic database of NHS patient details such as name, address, date of birth, related people, registered GP practice and NHS number.\n* [Personal Demographics Service - HL7 V3 API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-hl7-v3) - use this API to access the Personal Demographics Service (PDS), the national electronic database of NHS patient details such as name, address, date of birth, related people, registered GP and NHS number.\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 that you can manage risks and that your software conforms technically with the requirements for this API.\n\nInformation on this page might impact the design of your software. For details, see [Onboarding support information](https://digital.nhs.uk/developer/api-catalogue/national-record-locator-consumer-fhir/onboarding-support-information).\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding#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=\"http://onboarding.prod.api.platform.nhs.uk/\">developer account</a>, then select 'product onboarding'.</p></div>\n        </div>\n    </div>\n</div>\n\n## Contact us\n\nFor help and support connecting to our APIs and to join our developer community visit the [Help and support building healthcare software](https://digital.nhs.uk/developer/help-and-support) page.\n","contact":{"name":"NHS Digital API Management","url":"https://digital.nhs.uk/developer/help-and-support","email":"api.management@nhs.net"},"version":"1.1.5"},"servers":[{"url":"/fhir-server/api/v4"}],"paths":{"/RelatedPerson/_search":{"post":{"tags":["Get RelatedPerson"],"summary":"Retrieve patient's related persons (POST)","description":"Retrieve the related persons for a single patient.\n\nThis operation is also available as a http GET for convenience (see below), but POST is preferred for the\nfollowing reasons.\n\n* query string parameters are visible on the network and in logs, and may have privacy implications for consumers.\n* GET operations can be cached by intermediary network infrastructure, such as CDNs, routers and proxies.\n* URLs have a maximum length of 2,048 characters which complex searches can exceed.\n","operationId":"searchViaPostRelatedPerson","parameters":[{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis). ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedPersonSearch"},"examples":{"search-without-provenance":{"summary":"Search without Provenance","value":{"patient:identifier":"https://fhir.nhs.uk/Id/nhs-number|9730676577"}},"search-with-provenance":{"summary":"Search with Provenance","value":{"patient:identifier":"https://fhir.nhs.uk/Id/nhs-number|9730676577","_revinclude":"Provenance:target"}}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/RelatedPersonSearch"},"examples":{"search-without-provenance":{"summary":"Search without Provenance","value":{"patient:identifier":"https://fhir.nhs.uk/Id/nhs-number|9730676577"}},"search-with-provenance":{"summary":"Search with Provenance","value":{"patient:identifier":"https://fhir.nhs.uk/Id/nhs-number|9730676577","_revinclude":"Provenance:target"}}}}},"required":false},"responses":{"200":{"description":"Search successful response","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"},"examples":{"example-single-record-without-provenance":{"summary":"Single Record without Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T10:52:25.142230+00:00","total":1,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/_search"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}}]}},"example-multiple-records-with-provenance":{"summary":"Multiple records with Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T14:10:53.675277+00:00","total":2,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/_search"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345677","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9243622730"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2010-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/Provenance/9730676577-12345677","resource":{"resourceType":"Provenance","id":"9730676577-12345677","target":[{"reference":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677"}],"recorded":"2023-10-01T12:00:00Z","agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"assembler"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"W7V6T"},"display":"Related Person Network"}}],"entity":[{"role":"source","what":{"identifier":{"system":"http://id.esd.org.uk/service","value":"319"},"display":"Birth Registration"},"agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"custodian"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"XDC"},"display":"Office for National Statistics (ONS)"}}]}]},"search":{"mode":"include"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/Provenance/9730676577-12345678","resource":{"resourceType":"Provenance","id":"9730676577-12345678","target":[{"reference":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678"}],"recorded":"2023-10-01T12:00:00Z","agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"assembler"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"W7V6T"},"display":"Related Person Network"}}],"entity":[{"role":"source","what":{"identifier":{"system":"http://id.esd.org.uk/service","value":"319"},"display":"Birth Registration"},"agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"custodian"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"XDC"},"display":"Office for National Statistics (ONS)"}}]}]},"search":{"mode":"include"}}]}},"example-multiple-records-without-provenance":{"summary":"Multiple records without Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T14:12:03.988587+00:00","total":2,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/_search"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345677","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9243622730"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2010-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}}]}},"example-empty-bundle":{"summary":"No Relationships found","value":{"resourceType":"Bundle","id":"7a26cdf8-776b-4a3b-ace1-6b02e07a96ba","type":"searchset","timestamp":"2026-03-10T11:39:06.837469+00:00","total":0,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/_search"}]}}}}}},"400":{"description":"An error occurred as follows:\n\n| HTTP status | Error code                 | Description                                                                                                                                |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| 400         | BAD_REQUEST\t               | Bad Request                                                                                                                                |\n| 400         | VALIDATION_ERROR           | A parameter or value has resulted in a validation error                                                                                    |\n| 401         | ACCESS_DENIED              | Access Denied                                                                                                                              |\n| 403         | ACCESS_DENIED              | Forbidden                                                                                                                                  |\n| 403         | ACCESS_DENIED_LEVEL        | Access has been denied because you need higher level permissions                                                                           |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                                                                         |\n| 409         | INVALID_VALUE              | Invalid value                                                                                                                              |\n| 429         | TOO_MANY_REQUESTS          | You have exceeded your application's [rate limit.](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)  |\n\nThe Error Code is sourced from the [NHS Spine Error or Warning Code Sytem](https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1).\n","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"examples":{"example":{"summary":"Validation Error","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","version":"1","code":"VALIDATION_ERROR","display":"A parameter or value has resulted in a validation error"}]},"diagnostics":"The requested document pointer cannot be read because it belongs to another organisation"}]}}}}}}},"deprecated":false,"security":[{"app-level3":[]},{"nhs-cis2-aal3":[]}]}},"/RelatedPerson":{"get":{"tags":["Get RelatedPerson"],"summary":"Retrieve patient's related persons (GET)","description":"Retrieve the related persons for a single patient.\n\nThis operation is also available as a http POST, which is the preferred method (see above).\n","operationId":"searchRelatedPerson","parameters":[{"$ref":"#/components/parameters/patient"},{"$ref":"#/components/parameters/provenance"},{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis). ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}}],"responses":{"200":{"description":"Successful response","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"},"examples":{"example-single-record-without-provenance":{"summary":"Single Record without Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T10:52:25.142230+00:00","total":1,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson?patient:identifier=https://fhir.nhs.uk/Id/nhs-number%7C9730676577"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-2"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}}]}},"example-multiple-records-with-provenance":{"summary":"Multiple records with Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T14:10:53.675277+00:00","total":2,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson?_revinclude=Provenance:target&patient:identifier=https://fhir.nhs.uk/Id/nhs-number%7C9730676577"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345677","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9243622730"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2010-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/Provenance/9730676577-12345677","resource":{"resourceType":"Provenance","id":"9730676577-12345677","target":[{"reference":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677"}],"recorded":"2023-10-01T12:00:00Z","agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"assembler"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"W7V6T"},"display":"Related Person Network"}}],"entity":[{"role":"source","what":{"identifier":{"system":"http://id.esd.org.uk/service","value":"319"},"display":"Birth Registration"},"agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"custodian"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"XDC"},"display":"Office for National Statistics (ONS)"}}]}]},"search":{"mode":"include"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/Provenance/9730676577-12345678","resource":{"resourceType":"Provenance","id":"9730676577-12345678","target":[{"reference":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678"}],"recorded":"2023-10-01T12:00:00Z","agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"assembler"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"W7V6T"},"display":"Related Person Network"}}],"entity":[{"role":"source","what":{"identifier":{"system":"http://id.esd.org.uk/service","value":"319"},"display":"Birth Registration"},"agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"custodian"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"XDC"},"display":"Office for National Statistics (ONS)"}}]}]},"search":{"mode":"include"}}]}},"example-multiple-records-without-provenance":{"summary":"Multiple records without Provenance","value":{"resourceType":"Bundle","id":"9221c56d-cf36-40c6-8be3-69b5e6a54b6a","type":"searchset","timestamp":"2025-11-26T14:12:03.988587+00:00","total":2,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson?patient:identifier=https://fhir.nhs.uk/Id/nhs-number%7C9730676577"}],"entry":[{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345677","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345677","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9243622730"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2010-12-26"}},"search":{"mode":"match"}},{"fullUrl":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson/9730676577-12345678","resource":{"resourceType":"RelatedPerson","id":"9730676577-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676046"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730676577"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"2018-12-26"}},"search":{"mode":"match"}}]}},"example-empty-bundle":{"summary":"No Relationships found","value":{"resourceType":"Bundle","id":"ca097396-f3ef-4088-93ba-b1f97fda9470","type":"searchset","timestamp":"2026-03-10T11:40:48.196858+00:00","total":0,"link":[{"relation":"self","url":"https://api.service.nhs.uk/related-person-network/FHIR/R4/RelatedPerson?patient:identifier=https://fhir.nhs.uk/Id/nhs-number%7C9730676578"}]}}}}}},"400":{"description":"An error occurred as follows:\n\n| HTTP status | Error code                 | Description                                                                                                                                |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| 400         | BAD_REQUEST\t               | Bad Request                                                                                                                                |\n| 400         | VALIDATION_ERROR           | A parameter or value has resulted in a validation error                                                                                    |\n| 401         | ACCESS_DENIED              | Access Denied                                                                                                                              |\n| 403         | ACCESS_DENIED              | Forbidden                                                                                                                                  |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                                                                         |\n| 409         | INVALID_VALUE              | Invalid value                                                                                                                              |\n| 429         | TOO_MANY_REQUESTS          | You have exceeded your application's [rate limit.](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)  |\n\nThe Error Code is sourced from the [NHS Spine Error or Warning Code Sytem](https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1).\n","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"examples":{"validation-error":{"summary":"Validation Error","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","version":"1","code":"VALIDATION_ERROR","display":"A parameter or value has resulted in a validation error"}]},"diagnostics":"The requested document pointer cannot be read because it belongs to another organisation"}]}}}}}}},"deprecated":false,"security":[{"app-level3":[]},{"nhs-cis2-aal3":[]}]}},"/RelatedPerson/{id}":{"get":{"tags":["Get RelatedPerson"],"summary":"Get a single related person (GET)","description":"Read a single related person record by specifying the `id`.\n","operationId":"readRelatedPerson","parameters":[{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis). ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},{"name":"id","in":"path","description":"logical identifier","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","headers":{"ETag":{"name":"","in":"header","description":"Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"28047520-1\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^W/\"[0-9]+-[0-9]+\"$","type":"string","example":"W/\"28047520-1\""}},"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/RelatedPerson"},"examples":{"example":{"summary":"Related Person resource example","value":{"resourceType":"RelatedPerson","id":"4745308000-12345678","meta":{"versionId":"33411975-1"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"4745308000"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"8862566387"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"1995-05-25"}}}}}}},"400":{"description":"An error occurred as follows:\n| HTTP status | Error code                 | Description                                                                                                                                |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| 400         | BAD_REQUEST\t               | Bad Request                                                                                                                                |\n| 400         | VALIDATION_ERROR           | A parameter or value has resulted in a validation error                                                                                    |\n| 401         | ACCESS_DENIED              | Access Denied                                                                                                                              |\n| 403         | ACCESS_DENIED              | Forbidden                                                                                                                                  |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                                                                         |\n| 409         | INVALID_VALUE              | Invalid value                                                                                                                              |\n| 429         | TOO_MANY_REQUESTS          | You have exceeded your application's [rate limit.](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)  |\n\nThe Error Code is sourced from the [NHS Spine Error or Warning Code Sytem](https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1).\n","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"examples":{"example":{"summary":"Validation Error","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","version":"1","code":"VALIDATION_ERROR","display":"A parameter or value has resulted in a validation error"}]},"diagnostics":"The requested document pointer cannot be read because it belongs to another organisation"}]}}}}}}},"deprecated":false,"security":[{"app-level3":[]},{"nhs-cis2-aal3":[]}]},"patch":{"tags":["Update RelatedPerson"],"summary":"Update a single related person (PATCH)","description":"Update the status of a single related person record by specifying the `id`.\n\n## Status Transitions\n\nA RelatedPerson resource can exist in one of three statuses, controlled by the `active` and `period.end` fields:\n\n| Status    | active | period.end |\n|-----------|--------|------------|\n| Current   | true   | null       |\n| Historic  | true   | NOT null   |\n| Hidden    | false  | NOT null   |\n\n**Valid Status Flow:** Current → Historic → Hidden\n\n- **Current to Historic**: Set `period.end` to a date (keeps `active: true`)\n- **Historic to Hidden**: Set `active` to `false` (requires `period.end` to already be set)\n- **Hidden to Historic**: Set `active` to `true` (keeps `period.end` as is)\n\nPatching other fields is not supported.\n","parameters":[{"name":"If-Match","in":"header","description":"The version of the resource to be updated\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^W\\/\\\"[0-9]+-[0-9]+\\\"$","type":"string","description":"The version of the resource to be updated.","example":"W/\"28047520-1\""}},{"name":"Content-Type","in":"header","description":"The content type of the patch request body. ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"enum":["application/json-patch+json"],"type":"string"}},{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis). ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},{"name":"id","in":"path","description":"logical identifier","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/RelationshipUpdate"},"examples":{"Current-to-Historic":{"summary":"Current to Historic status update example","value":[{"op":"add","path":"/period/end","value":"2025-11-27"}]},"Historic-to-Hidden":{"summary":"Historic to Hidden status update example","value":[{"op":"replace","path":"/active","value":false}]},"Hidden-to-Historic":{"summary":"Hidden to Historic status update example","value":[{"op":"replace","path":"/active","value":true}]}}}},"required":true},"responses":{"200":{"description":"Successful response","headers":{"ETag":{"name":"","in":"header","description":"Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"28047520-1\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^W/\"[0-9]+-[0-9]+\"$","type":"string","example":"W/\"28047520-1\""}},"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/RelatedPerson"},"examples":{"relatedperson-historic":{"summary":"Related Person Historic resource example","value":{"resourceType":"RelatedPerson","id":"4745308000-12345678","meta":{"versionId":"73711775-2"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"4745308000"}],"active":true,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"8862566387"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"1995-05-25","end":"2020-12-31"}}},"relatedperson-hidden":{"summary":"Related Person Hidden resource example","value":{"resourceType":"RelatedPerson","id":"4745308000-12345678","meta":{"versionId":"53311775-3"},"identifier":[{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"4745308000"}],"active":false,"patient":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"8862566387"}},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"PRN","display":"parent"}]}],"period":{"start":"1995-05-25","end":"2020-12-31"}}}}}}},"400":{"description":"An error occurred as follows:\n| HTTP status | Error code                 | Description                                                                                                                                |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| 400         | BAD_REQUEST\t               | Bad Request                                                                                                                                |\n| 400         | VALIDATION_ERROR           | A parameter or value has resulted in a validation error                                                                                    |\n| 401         | ACCESS_DENIED              | Access Denied                                                                                                                              |\n| 403         | ACCESS_DENIED              | Forbidden                                                                                                                                  |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                                                                         |\n| 409         | INVALID_VALUE              | Invalid value                                                                                                                              |\n| 412         | PRECONDITION_FAILED        | The If-Match header precondition has failed                                                                                                |\n| 429         | TOO_MANY_REQUESTS          | You have exceeded your application's [rate limit.](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)  |\n\nThe Error Code is sourced from the [NHS Spine Error or Warning Code Sytem](https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1).\n","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"examples":{"example":{"summary":"Validation Error","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","version":"1","code":"VALIDATION_ERROR","display":"A parameter or value has resulted in a validation error"}]},"diagnostics":"The requested document pointer cannot be read because it belongs to another organisation"}]}}}}}}},"deprecated":false,"security":[{"nhs-cis2-aal3":[]}]}},"/Provenance/{id}":{"get":{"tags":["Provenance"],"summary":"Get a single related person's provenance (GET)","description":"Read provenance by specifying the 'id'.\n","operationId":"readProvenance","parameters":[{"name":"Authorization","in":"header","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis). ","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},{"name":"X-Correlation-ID","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},{"name":"id","in":"path","description":"logical identifier","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Read Provenance operation successful","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/ProvenanceResourceType"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"target":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ProvenanceReference","description":"The Reference(s) that were generated or updated by  the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity."}},"recorded":{"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 instant of time at which the activity was recorded."},"agent":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ProvenanceAgent","description":"An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place."}},"entity":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceEntity","description":"An entity used in this activity."}}}},"examples":{"provenance-example":{"summary":"Provenance resource example","value":{"resourceType":"Provenance","id":"4745308000-12345678","meta":{"versionId":"10058667-1"},"target":[{"reference":"RelatedPerson/4745308000-12345678"}],"recorded":"1995-05-25T00:00:00Z","agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"assembler"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"W7V6T"},"display":"Related Person Network"}}],"entity":[{"role":"source","what":{"identifier":{"system":"http://id.esd.org.uk/service","value":"319"},"display":"Birth registration"},"agent":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/provenance-participant-type","code":"custodian"}]},"who":{"identifier":{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"XDC"},"display":"Office for National Statistics (ONS)"}}]}]}}}}}},"400":{"description":"An error occurred as follows:\n\n| HTTP status | Error code                 | Description                                                                                                                                |\n| ----------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| 400         | BAD_REQUEST\t               | Bad Request                                                                                                                                |\n| 400         | VALIDATION_ERROR           | A parameter or value has resulted in a validation error                                                                                    |\n| 401         | ACCESS_DENIED              | Access Denied                                                                                                                              |\n| 403         | ACCESS_DENIED              | Forbidden                                                                                                                                  |\n| 404         | RESOURCE_NOT_FOUND         | Resource not found                                                                                                                         |\n| 409         | INVALID_VALUE              | Invalid value                                                                                                                              |\n| 429         | TOO_MANY_REQUESTS          | You have exceeded your application's [rate limit.](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)  |\n\nThe Error Code is sourced from the [NHS Spine Error or Warning Code Sytem](https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1).\n","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.\nMirrored back in a response header.","required":true,"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"}},"X-Request-ID":{"name":"","in":"header","description":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.\n","required":true,"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"content":{"application/fhir+json":{"schema":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"examples":{"example":{"summary":"Validation Error","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"value","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","version":"1","code":"VALIDATION_ERROR","display":"A parameter or value has resulted in a validation error"}]},"diagnostics":"The requested document pointer cannot be read because it belongs to another organisation"}]}}}}}}},"deprecated":false,"security":[{"app-level3":[]},{"nhs-cis2-aal3":[]}]}}},"components":{"schemas":{"Address":{"type":"object","properties":{"use":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"The purpose of this address."},"type":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care&ndash;of addresses). Most addresses are both."},"text":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts."},"line":{"type":"array","items":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information."}},"city":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"The name of the city, town, suburb, village or other community or delivery center."},"district":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"The name of the administrative area (county)."},"state":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Sub&ndash;unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)."},"postalCode":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A postal code designating a region defined by the postal service."},"country":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Country &ndash; a nation as commonly understood or generally accepted."},"period":{"$ref":"#/components/schemas/Period","description":"Time period when address was/is in use."}}},"AgentCoding":{"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.","example":"http://terminology.hl7.org/CodeSystem/provenance-participant-type"},"code":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"A code from the specified system that defines the participation role of an agent or entity in the recorded provenance activity.","example":"assembler"}}},"AgentReference":{"type":"object","properties":{"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."}}},"Bundle":{"required":["type","resourceType"],"properties":{"resourceType":{"$ref":"#/components/schemas/BundleResourceType"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"type":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Indicates the purpose of this bundle &ndash; how it is intended to be used.","example":"searchset"},"total":{"type":"integer","description":"If a set of search matches, this is the total number of entries of type 'match' across all pages in the search.  It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.","format":"int32"},"link":{"type":"array","items":{"$ref":"#/components/schemas/BundleLink","description":"A series of links that provide context to this bundle."}},"entry":{"type":"array","items":{"$ref":"#/components/schemas/BundleEntry","description":"An entry in a bundle resource &ndash; will either contain a resource or information about a resource (transactions and history only)."}}}},"BundleEntry":{"type":"object","properties":{"fullUrl":{"pattern":"\\S*","type":"string","description":"The Absolute URL for the resource.  The fullUrl SHALL NOT disagree with the id in the resource &ndash; i.e. if the fullUrl is not a urn:uuid, the URL shall be version&ndash;independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: \n* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)\n* Results from operations might involve resources that are not identified."},"resource":{"anyOf":[{"$ref":"#/components/schemas/RelatedPerson"},{"$ref":"#/components/schemas/Provenance"},{"$ref":"#/components/schemas/OperationOutcome"}],"description":"The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type."},"search":{"$ref":"#/components/schemas/BundleEntrySearch","description":"Information about the search process that lead to the creation of this entry."}}},"BundleLink":{"required":["relation","url"],"type":"object","properties":{"relation":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A name which details the functional use for this link &ndash; see [http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1](http://www.iana.org/assignments/link&ndash;relations/link&ndash;relations.xhtml#link&ndash;relations&ndash;1)."},"url":{"pattern":"\\S*","type":"string","description":"The reference details for the link."}}},"BundleEntrySearch":{"type":"object","properties":{"mode":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Why this entry is in the result set &ndash; whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.","example":"match"}}},"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."}}},"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."},"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&ndash;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."},"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&ndash;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."},"userSelected":{"type":"boolean","description":"Indicates that this coding was chosen by a user directly &ndash; e.g. off a pick list of available items (codes or displays)."}}},"ErrorCode":{"type":"object","properties":{"coding":{"type":"array","items":{"type":"object","properties":{"system":{"type":"string","description":"URI of the coding system specification.","example":"https://fhir.nhs.uk/R4/CodeSystem/Spine-ErrorOrWarningCode"},"version":{"type":"string","description":"Version of the coding system in use.","example":"1"},"code":{"type":"string","description":"Symbol in syntax defined by the system.","example":"INVALID_VALUE"},"display":{"type":"string","description":"Representation defined by the system.","example":"Provided value is invalid"}}}}},"description":"Internal error code."},"Extension":{"required":["url"],"type":"object","properties":{"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."},"extension":{"type":"array","items":{"$ref":"#/components/schemas/Extension","description":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."},"example":[{"url":"http://example.com","valueString":"text value"}]},"url":{"pattern":"\\S*","type":"string","description":"Source of the definition for the extension code &ndash; a logical name or a URL."},"valueBase64Binary":{"pattern":"(\\s*([0-9a-zA-Z\\+/=]){4}\\s*)+","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueBoolean":{"type":"boolean","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueCanonical":{"pattern":"\\S*","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueCode":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueDate":{"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]))?)?","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueDateTime":{"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":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueDecimal":{"type":"number","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueId":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueInstant":{"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":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueInteger":{"type":"integer","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list).","format":"int32"},"valueMarkdown":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueOid":{"pattern":"urn:oid:[0-2](\\.(0|[1-9][0-9]*))+","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valuePositiveInt":{"type":"integer","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list).","format":"int32"},"valueString":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueTime":{"pattern":"([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueUnsignedInt":{"type":"integer","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list).","format":"int32"},"valueUri":{"pattern":"\\S*","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueUrl":{"pattern":"\\S*","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueUuid":{"pattern":"urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}","type":"string","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueAddress":{"$ref":"#/components/schemas/Address","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueCodeableConcept":{"$ref":"#/components/schemas/CodeableConcept","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueCoding":{"$ref":"#/components/schemas/Coding","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueHumanName":{"$ref":"#/components/schemas/HumanName","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valuePeriod":{"$ref":"#/components/schemas/Period","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueReference":{"$ref":"#/components/schemas/Reference","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."},"valueMeta":{"$ref":"#/components/schemas/Meta","description":"Value of extension &ndash; must be one of a constrained set of the data types (see [Extensibility](https://www.hl7.org/fhir/R4/extensibility.html) for a list)."}}},"HumanName":{"type":"object","properties":{"use":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Identifies the purpose for this name.","example":"usual"},"family":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."},"given":{"type":"array","items":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Given name."}},"prefix":{"type":"array","items":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.","example":"Mr"}},"suffix":{"type":"array","items":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.","example":"MBE"}},"period":{"$ref":"#/components/schemas/Period","description":"Indicates the period of time when this name was valid for the named person."}}},"Identifier":{"type":"object","properties":{"system":{"pattern":"\\S*","type":"string","description":"Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."},"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."}}},"IncludeProvenance":{"enum":["Provenance:target",""],"type":"string"},"Meta":{"type":"object","properties":{"versionId":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."},"lastUpdated":{"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 resource last changed &ndash; e.g. when the version changed."}}},"OperationOutcome":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/OperationOutcomeResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"issue":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OperationOutcomeIssue"},"description":"List of issues that have occurred."}}},"OperationOutcomeIssue":{"required":["severity","code"],"type":"object","properties":{"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."},"severity":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Indicates whether the issue indicates a variation from successful processing."},"code":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."},"details":{"$ref":"#/components/schemas/CodeableConcept","description":"Additional details about the error. This may be a text description of the error or a system code that identifies the error."},"diagnostics":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Additional diagnostic information about the issue."},"expression":{"type":"array","items":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"A [simple subset of FHIRPath](https://hl7.org/fhir/R4/fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."}}}},"Period":{"type":"object","properties":{"start":{"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 start of the period. The boundary is inclusive.","example":"2024-05-15"},"end":{"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 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.","example":"2025-04-31"}}},"Provenance":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/ProvenanceResourceType"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"target":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ProvenanceReference","description":"The Reference(s) that were generated or updated by  the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity."}},"recorded":{"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 instant of time at which the activity was recorded."},"agent":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ProvenanceAgent","description":"An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place."}},"entity":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceEntity","description":"An entity used in this activity."}}}},"ProvenanceAgent":{"required":["who"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProvenanceCodeableConcept","description":"The participation the agent had with respect to the activity."},"who":{"$ref":"#/components/schemas/ProvenanceReference","description":"The individual, device or organization that participated in the event."},"display":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Plain text narrative that identifies the resource in addition to the resource reference."}}},"ProvenanceEntity":{"required":["role","what"],"type":"object","properties":{"role":{"pattern":"[^\\s]+(\\s[^\\s]+)*","type":"string","description":"How the entity was used during the activity.","example":"source"},"what":{"$ref":"#/components/schemas/ProvenanceReference","description":"Identity of the  Entity used. May be a logical or physical uri and maybe absolute or relative."},"agent":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceAgent","description":"The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity."}}}},"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"},"type":{"pattern":"\\S*","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.\\n\\nThe 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)."},"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."}}},"RelatedPerson":{"required":["patient"],"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/RelatedPersonResourceType"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/PatientIdentifier"},"description":"A human identifier for this person."},"active":{"type":"boolean","description":"Whether this related person record is in active use."},"patient":{"$ref":"#/components/schemas/PatientReference","description":"The patient this person is related to."},"relationship":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipCodeableConcept","description":"The nature of the relationship between a patient and the related person."}},"period":{"$ref":"#/components/schemas/Period","description":"The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown."}}},"RelatedPersonSearch":{"required":["patient:identifier"],"type":"object","properties":{"patient:identifier":{"$ref":"#/components/schemas/RequestQueryPatient"},"_revinclude":{"$ref":"#/components/schemas/IncludeProvenance"}}},"RelationshipUpdate":{"type":"array","items":{"oneOf":[{"required":["op","path","value"],"type":"object","properties":{"op":{"enum":["replace"],"type":"string"},"path":{"enum":["/active"],"type":"string"},"value":{"type":"boolean","description":"Whether the resource is active"}}},{"required":["op","path","value"],"type":"object","properties":{"op":{"enum":["add"],"type":"string"},"path":{"enum":["/period/end"],"type":"string"},"value":{"type":"string","description":"The end date of the period","format":"date"}}}]}},"RequestQueryPatient":{"pattern":"^https\\:\\/\\/fhir\\.nhs\\.uk\\/Id\\/nhs-number\\|(\\d{10})$","type":"string"},"PostSearchRequestHeaders":{"allOf":[{"$ref":"#/components/schemas/BaseRequestHeaders"},{"required":["x-correlation-id","x-request-id","content-type"],"type":"object","properties":{"content-type":{"enum":["application/json","application/x-www-form-urlencoded"],"type":"string","description":"The content type of the request body."}}}]},"Resource":{"required":["resourceType"],"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/ResourceType","type":"string"},"id":{"pattern":"[A-Za-z0-9\\-\\.]{1,64}","type":"string","description":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."},"meta":{"$ref":"#/components/schemas/Meta","description":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."}}},"ResourceType":{"enum":["Bundle","Provenance","RelatedPerson","OperationOutcome","AuditEvent","Resource"]},"ResponseHeaders":{"required":["X-Correlation-ID","X-Request-ID"],"type":"object","properties":{"X-Correlation-ID":{"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"},"X-Request-ID":{"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"},"ETag":{"pattern":"^W\\/\\\"[0-9]+-[0-9]+\\\"$","type":"string","description":"Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"28047520-1\"`. This Weak ETag corresponds to `meta.versionId` attribute in the resource body.","example":"W/\"28047520-1\""}}},"PatchRequestHeaders":{"allOf":[{"$ref":"#/components/schemas/BaseRequestHeaders"},{"required":["x-correlation-id","x-request-id","if-match","content-type"],"type":"object","properties":{"if-match":{"$ref":"#/components/schemas/IfMatch"},"content-type":{"$ref":"#/components/schemas/PatchContentType"}}}]},"ProvenanceIdentifier":{"type":"object","properties":{"system":{"pattern":"\\S*","type":"string","description":"Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique.","example":"https://fhir.nhs.uk/Id/ods-organization-code"},"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.","example":"XDC"}}},"ProvenanceReference":{"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"},"type":{"pattern":"\\S*","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.\\n\\nThe 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)."},"identifier":{"$ref":"#/components/schemas/ProvenanceIdentifier"},"display":{"pattern":"[ \\r\\n\\t\\S]+","type":"string","description":"Plain text narrative that identifies the resource in addition to the resource reference."}}},"RelationshipCoding":{"required":["system","code"],"type":"object","properties":{"system":{"$ref":"#/components/schemas/TerminologyCodeSystem"},"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&ndash;coordination).","example":"PRN"},"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.","example":"parent"}}},"ProvenanceCodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"$ref":"#/components/schemas/AgentCoding"}}}},"PatientReference":{"required":["identifier"],"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/PatientIdentifier"}}},"PatientIdentifier":{"required":["system","value"],"type":"object","properties":{"system":{"$ref":"#/components/schemas/FhirNhsNumberSystem"},"value":{"pattern":"^[0-9]{10}$","type":"string","description":"An NHS number. The primary identifier of a patient, unique within NHS England and Wales. Always 10 digits and must be a valid NHS number.","example":9100000009}}},"RelationshipCodeableConcept":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipCoding"}}}},"FhirNhsNumberSystem":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string","description":"Establishes the namespace for the value &ndash; that is, a URL that describes a set values that are unique."},"TerminologyCodeSystem":{"enum":["http://terminology.hl7.org/CodeSystem/v3-RoleCode"],"type":"string","description":"The identification of the code system that defines the meaning of the symbol in the code."},"BundleResourceType":{"enum":["Bundle"],"type":"string"},"ProvenanceResourceType":{"enum":["Provenance"],"type":"string"},"RelatedPersonResourceType":{"enum":["RelatedPerson"],"type":"string"},"OperationOutcomeResourceType":{"enum":["OperationOutcome"],"type":"string"},"BaseRequestHeaders":{"required":["x-correlation-id","x-request-id"],"type":"object","properties":{"x-correlation-id":{"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"},"x-request-id":{"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}}},"PatchContentType":{"enum":["application/json-patch+json"],"type":"string"},"IfMatch":{"pattern":"^W\\/\\\"[0-9]+-[0-9]+\\\"$","type":"string","description":"The version of the resource to be updated.","example":"W/\"28047520-1\""},"RequestId":{"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":"A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"},"CorrelationId":{"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":"An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters. Mirrored back in a response header.","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"},"BearerAuthorization":{"pattern":"^Bearer\\ [-a-zA-Z0-9._~+/]+=*$","type":"string","description":"An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).","example":"Bearer mtl0K7NbYobXodHfXD0n9TRqmGka"}},"parameters":{"_sortParam":{"name":"_sort","in":"query","description":"Sort the returned data using one of three options: \r\n\r\n* -_lastUpdated: [Default] Decreasing time - most recent changes first\r\n* _lastUpdated: Increasing time - oldest changes first\r\n* none: Increasing id order - oldest changes first\r\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"enum":["-_lastUpdated","_lastUpdated","none"],"type":"string"}},"_sinceParam":{"name":"_since","in":"query","description":"Return changes since a known timestamp","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},"_beforeParam":{"name":"_before","in":"query","description":"Return changes before a known timestamp","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},"_countParam":{"name":"_count","in":"query","description":"Specifies a maximum number of results that are required","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"integer","default":100}},"_typeParam":{"name":"_type","in":"query","description":"Limit which resource types are returned","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},"patient":{"name":"patient:identifier","in":"query","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/RequestQueryPatient"},"examples":{"none":{"summary":"None","value":""},"valid_1":{"summary":"Valid #1","value":"https://fhir.nhs.uk/Id/nhs-number|4409815415"},"valid_2":{"summary":"Valid #2","value":"https://fhir.nhs.uk/Id/nhs-number|3495456481"},"invalid":{"summary":"Unknown","value":"https://fhir.nhs.uk/Id/nhs-number|3495456001"}}},"provenance":{"name":"_revinclude","in":"query","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/IncludeProvenance"}}},"requestBodies":{"Provenance":{"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Provenance"}}},"required":true},"RelatedPerson":{"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/RelatedPerson"}}},"required":true}},"securitySchemes":{"app-level3":{"$ref":"https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/app-level3"},"nhs-cis2-aal3":{"$ref":"https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/nhs-cis2-aal3"}}},"security":[{"app-level3":[]},{"nhs-cis2-aal3":[]}],"tags":[{"name":"Get RelatedPerson"},{"name":"Update RelatedPerson"},{"name":"Provenance"}],"x-spec-publication":{"try-this-api":{"disabled":true}}}