{"openapi":"3.0.3","info":{"title":"Gateway API","description":"<!-- markdownlint-disable first-line-heading -->\n## Overview\n\nUse this API to retrieve a patient's record from their registered GP practice for direct care.\n\nThe data is provided in a structured, machine-readable format, defined using the [FHIR STU3 standard](https://www.hl7.org/fhir/STU3/) and based on [GP Connect Access Record: Structured](https://digital.nhs.uk/developer/api-catalogue/gp-connect-access-record-structured-fhir).\n\nThe Clinical Data Gateway (CDG) API reduces the complexity for consumer systems accessing GP records through GP Connect. It enables access over the internet rather than the Health and Social Care Network (HSCN) and removes the need for consumer systems to perform certain lookups currently required by GP Connect.\n\n![Clinical Data Gateway FHIR API high-level diagram](https://digital.nhs.uk/binaries/content/gallery/website/developer/api-catalogue/clinical-data-gateway/cdg-api.png)\n\n<div class=\"nhsd-m-expander\" style=\"margin-bottom: 1rem;\">\n  <details>\n    <summary class=\"nhsd-m-expander__heading-container\" aria-label=\"How it works\" >\n      <div>\n        <span class=\"nhsd-m-expander__icon nhsd-!t-margin-right-1\">\n          <span class=\"nhsd-a-icon nhsd-a-icon--size-xs\" style=\"margin: 0;\">\n            <svg xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\" viewBox=\"0 0 16 16\">\n              <path d=\"M12,8l-6.5,7L4,13.5L9.2,8L4,2.5L5.5,1L12,8z\"/>\n            </svg>\n          </span>\n        </span>\n        <p class=\"nhsd-m-expander__heading nhsd-t-body\">How it works</p>\n      </div>\n    </summary>\n    <div class=\"nhsd-m-expander__content-container\">\n      <p><b>The consumer system:</b></p>\n      <ul>\n        <li>authenticates the end user using <a href=\"https://digital.nhs.uk/services/identity-and-access-management/nhs-care-identity-service-2/care-identity-authentication\">NHS Care Identity Service 2 (CIS2)</a></li>\n        <li>sends a request to the CDG API specifying the sections of the patient GP practice record requested, including the patient's NHS number, for the end user</li>\n      </ul>\n      <p><b>The CDG API:</b></p>\n      <ul>\n        <li>validates the request</li>\n        <li>performs a <a href=\"https://digital.nhs.uk/services/personal-demographics-service\">Personal Demographics Service (PDS)</a> lookup to identify the patient's registered GP practice</li>\n        <li>performs a <a href=\"https://digital.nhs.uk/services/spine-directory-service\">Spine Directory Service (SDS)</a> lookup to identify the patient's registered GP practice endpoint and Accredited System Identifier (ASID)</li>\n        <li>forwards the request to the registered GP practice</li>\n        <li>returns the response from the registered GP practice to the consumer system</li>\n      </ul>\n      <p><b>The consumer system:</b></p>\n      <ul>\n        <li>presents the response to the end user</li>\n      </ul>\n      <hr/>\n    </div>\n  </details>\n</div>\n\nYou can:\n\n- get a patient GP practice record\n\nYou cannot:\n\n- update a patient GP practice record\n\nYou can retrieve the following sections from the patient's GP practice record:\n\n- Medications\n- Allergies\n\nFurther sections of the record will be made available in future. See [API status and roadmap](#overview--api-status-and-roadmap). <!-- markdownlint-disable-line link-fragments -->\n\n## Who can use this API\n\nYou can use this API if you are a developer of a clinical system that supports clinicians delivering direct care.\n\nTo use this API you must:\n\n- have a legal basis to do so\n- ensure you have a valid use case\n- assure your solution with us before we grant access to live data\n\n## Related APIs\n\nThe following APIs are also related to this API:\n\n- [GP Connect Access Record: Structured – FHIR API](https://digital.nhs.uk/developer/api-catalogue/gp-connect-access-record-structured-fhir) – use this API to retrieve structured information from a patient's GP practice record over the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\n- [Personal Demographics Service – FHIR API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) – use this API to retrieve a patient's personal information such as name, address, date of birth, NHS number.\n\n## API status and roadmap\n\nThis API is currently in [development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\nWe will be building functionality into this product over time. We expect to include the following sections of the patient GP practice record in the future:\n\n- Immunisations\n- Consultations\n- Problems\n- Investigations\n- Outbound referrals\n- Diary entries\n- Uncategorised data (other clinically coded items that are present in the record)\n- Documents\n\n## Service level\n\nThis API is a bronze service, meaning it is operational 24 hours a day, 365 days a year. It is supported 8am to 6pm, Monday to Friday (excluding bank holidays).\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\n\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest). It conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir) global standard for health care data exchange, specifically to [FHIR Release 3 (STU)](https://www.hl7.org/fhir/STU3/).\n\n## Network access\n\nThe API is available on the internet.\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 has one access mode:\n\n- [User-restricted access](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis)\n\n### Healthcare worker, user-restricted access\n\nThis access mode is [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis), meaning an end user must be present, authenticated and authorised.\n\nThe end user must be:\n\n- present\n- a healthcare worker\n- strongly authenticated and authorised by [NHS Care Identity Service 2 (CIS2)](https://digital.nhs.uk/services/identity-and-access-management/nhs-care-identity-service-2/care-identity-authentication)\n\nIn order to successfully authenticate with CIS2, the CDG API requires end users to be authenticated to an:\n\n- [Identity Assurance Level (IAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/scopes-and-claims#claims) of IAL3\n- [Authenticator Assurance Level (AAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/acr-values#authentication-methods) of AAL2 or AAL3\n\nTo use this access mode, use the following security pattern:\n\n- [User-restricted RESTful API – using NHS CIS2 – combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)\n\n## Environments and testing\n\n| Environment | Base URL |\n| ----------- | -------- |\n| Integration (INT) | <https://int.api.service.nhs.uk/clinical-data-gateway> |\n\n## Onboarding\n\nBefore you can go live with this API, your software will need to complete onboarding and be approved for use in a live environment.\n\nThis API is currently in Alpha with restricted onboarding by invitation only.\n\n## Errors\n\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the following ranges:\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\nThis includes errors generated by the CDG API and errors mapped from upstream services.\n","contact":{"name":"API Support"},"version":"0.1.0"},"servers":[{"url":"http://localhost:5000","description":"Local development server"}],"paths":{"/patient/$gpc.getstructuredrecord":{"post":{"summary":"Get structured record","description":"Use this endpoint to retrieve structured data from the patient's GP practice record.\n\nAt present, this is limited to medications and allergies.\n","operationId":"getStructuredRecord","parameters":[{"name":"X-Correlation-ID","in":"header","description":"A unique identifier for the request. Must be a non-empty string. No format is enforced, but a UUID is recommended.","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"minLength":1,"type":"string","example":"17a448b6-a52f-4bb3-bdae-2ecbf0bf7641"}},{"name":"Content-Type","in":"header","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"enum":["application/fhir+json"],"type":"string","example":"application/fhir+json"}},{"name":"Ods-from","in":"header","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"minLength":1,"type":"string","example":"A12345"}}],"requestBody":{"content":{"application/fhir+json":{"schema":{"required":["resourceType","parameter"],"type":"object","properties":{"resourceType":{"enum":["Parameters"],"type":"string","example":"Parameters"},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time","example":"2026-01-12T10:00:00Z"},"versionId":{"type":"string","example":"1"}}},"parameter":{"minItems":2,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/nhsNumberParam"},{"$ref":"#/components/schemas/IdentityParam"},{"$ref":"#/components/schemas/allergyParam"},{"$ref":"#/components/schemas/medicationParam"}]},"description":"Array of FHIR parameters. The `patientNHSNumber` and `identity` parameters are always required.\n`includeAllergies` and `includeMedication` are optional.\n"}}},"examples":{"MinimalRecordRequest":{"$ref":"#/components/examples/MinimalRecordRequest"},"MediumRecordRequest":{"$ref":"#/components/examples/MediumRecordRequest"},"CompleteRecordRequest":{"$ref":"#/components/examples/CompleteRecordRequest"}}}},"required":true},"responses":{"200":{"description":"Successful response","headers":{"Content-Type":{"name":"","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"enum":["application/fhir+json"],"type":"string"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/getStructuredRecordResponse"},"examples":{"MinimalRecordResponse":{"$ref":"#/components/examples/MinimalRecordResponse"}}}}},"400":{"description":"Bad request - invalid input parameters","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"InvalidNHSNumber":{"$ref":"#/components/examples/invalidNhsNumber"}}}}},"401":{"description":"Unauthorized - authentication token is missing or invalid"},"403":{"description":"Either the organisation or patient does not allow sharing\n\n| Error code                 | Description                                                                |\n| -------------------------- | -------------------------------------------------------------------------- |\n| ACCESS_DENIED              | Insufficient privileges to access this resource                            |\n| NO_ORGANISATIONAL_CONSENT  | End user organisation has not provided consent to share data               |\n| NO_PATIENT_CONSENT         | Patient has not provided consent to share data                             |\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"accessDenied":{"$ref":"#/components/examples/accessDenied"},"noOrganisationalConsent":{"$ref":"#/components/examples/noOrganisationalConsent"},"noPatientConsent":{"$ref":"#/components/examples/noPatientConsent"}}}}},"404":{"description":"Patient or Organisation not found\n\n| Error code                 | Description                                       |\n| -------------------------- | ------------------------------------------------- |\n| ORGANISATION_NOT_FOUND     |\tCould not find patient's registered GP practice  |\n| PATIENT_NOT_FOUND          |\tPatient does not exist for given NHS number      |\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"organisationNotFound":{"$ref":"#/components/examples/organisationNotFound"},"patientNotFound":{"$ref":"#/components/examples/patientNotFound"}}}}},"415":{"description":"Unsupported Media Type - Content-Type header must be \"application/fhir+json\"","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"unsupportedMediaType":{"$ref":"#/components/examples/unsupportedMediaType"}}}}},"422":{"description":"Invalid parameter or resource\n\n| Error code                | Description                                      |\n| ------------------------- | ------------------------------------------------ |\n| INVALID_PARAMETER         |\tA field has failed validation                    |\n| INVALID_RESOURCE          |\tRequest body is invalid                          |\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"InvalidParameter":{"$ref":"#/components/examples/invalidParameter"},"InvalidResource":{"$ref":"#/components/examples/invalidResource"}}}}},"429":{"description":"Too many requests have been made to this API. Note that this includes rate limiting on the CDG API by a downstream service.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"tooManyRequests":{"$ref":"#/components/examples/tooManyRequests"}}}}},"500":{"description":"Internal server error","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"serverError":{"$ref":"#/components/examples/serverError"}}}}},"503":{"description":"Service unavailable","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"transient":{"$ref":"#/components/examples/unavailableTransient"},"processing":{"$ref":"#/components/examples/unavailableProcessing"}}}}},"504":{"description":"Timeout","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/operationOutcome"},"examples":{"timeout":{"$ref":"#/components/examples/timeout"}}}}}},"deprecated":false,"security":[{"nhs-cis2-aal2":[]}]}}},"components":{"schemas":{"nhsNumberParam":{"required":["name","valueIdentifier"],"type":"object","properties":{"name":{"enum":["patientNHSNumber"],"type":"string","example":"patientNHSNumber"},"valueIdentifier":{"required":["system","value"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/Id/nhs-number"],"type":"string","example":"https://fhir.nhs.uk/Id/nhs-number"},"value":{"pattern":"^[0-9]{10}$","type":"string","example":"9999999999"}}}}},"IdentityParam":{"required":["name","part"],"type":"object","properties":{"name":{"enum":["identity"],"type":"string","example":"identity"},"part":{"maxItems":4,"minItems":4,"type":"array","items":{"oneOf":[{"required":["name","valueString"],"type":"object","properties":{"name":{"enum":["issuer","requestingOrgName"],"type":"string","example":"issuer"},"valueString":{"minLength":1,"type":"string","example":"https://example.nhs.uk"}}},{"required":["name","resource"],"type":"object","properties":{"name":{"enum":["requestingDevice"],"type":"string","example":"requestingDevice"},"resource":{"required":["resourceType","identifier","model","version"],"type":"object","properties":{"resourceType":{"enum":["Device"],"type":"string","example":"Device"},"identifier":{"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"minLength":1,"type":"string","example":"https://orange.testlab.nhs.uk/gpconnect-demonstrator/Id/local-system-instance-id"},"value":{"minLength":1,"type":"string","example":"gpcdemonstrator-1-orange"}}}},"model":{"minLength":1,"type":"string","example":"GP Connect Demonstrator"},"version":{"minLength":1,"type":"string","example":"1.5.0"}}}}},{"required":["name","resource"],"type":"object","properties":{"name":{"enum":["requestingPractitioner"],"type":"string","example":"requestingPractitioner"},"resource":{"required":["resourceType","id","name","identifier"],"type":"object","properties":{"resourceType":{"enum":["Practitioner"],"type":"string","example":"Practitioner"},"id":{"minLength":1,"type":"string","example":"10019"},"name":{"minItems":1,"type":"array","items":{"required":["family","given"],"type":"object","properties":{"family":{"minLength":1,"type":"string","example":"Doe"},"given":{"minItems":1,"type":"array","items":{"minLength":1,"type":"string","example":"John"}},"prefix":{"type":"array","items":{"type":"string","example":"Mr"}}}}},"identifier":{"minItems":1,"type":"array","items":{"required":["system","value"],"type":"object","properties":{"system":{"minLength":1,"type":"string","example":"https://fhir.nhs.uk/Id/sds-user-id"},"value":{"minLength":1,"type":"string","example":"111222333444"}}}}}}}}]}}}},"allergyParam":{"required":["name","part"],"type":"object","properties":{"name":{"enum":["includeAllergies"],"type":"string","example":"includeAllergies"},"part":{"type":"array","items":{"required":["name","valueBoolean"],"type":"object","properties":{"name":{"enum":["includeResolvedAllergies"],"type":"string","example":"includeResolvedAllergies"},"valueBoolean":{"type":"boolean","example":false}}}}}},"medicationParam":{"required":["name"],"type":"object","properties":{"name":{"enum":["includeMedication"],"type":"string","example":"includeMedication"},"part":{"maxItems":2,"type":"array","items":{"oneOf":[{"required":["name","valueDate"],"type":"object","properties":{"name":{"enum":["medicationSearchFromDate"],"type":"string","example":"medicationSearchFromDate"},"valueDate":{"type":"string","format":"date","example":"2026-01-01"}}},{"required":["name","valueBoolean"],"type":"object","properties":{"name":{"enum":["includePrescriptionIssues"],"type":"string","example":"includePrescriptionIssues"},"valueBoolean":{"type":"boolean","example":false}}}]},"description":"Array of medication filter parameters. Each parameter type may appear at most once.\n"}}},"getStructuredRecordResponse":{"type":"object","properties":{"resourceType":{"type":"string","example":"Bundle"},"id":{"type":"string","example":"example-patient-bundle"},"type":{"type":"string","example":"collection"},"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"type":"string"}}}},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string","example":"urn:uuid:123e4567-e89b-12d3-a456-426614174000"},"resource":{"type":"object"}}}}}},"operationOutcome":{"type":"object","properties":{"meta":{"type":"object","properties":{"profile":{"type":"array","items":{"enum":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"],"type":"string"}}}},"resourceType":{"enum":["OperationOutcome"],"type":"string"},"issue":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["error"],"type":"string"},"code":{"type":"string"},"diagnostics":{"type":"string"},"details":{"required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"maxItems":1,"minItems":1,"required":["system","code"],"type":"object","properties":{"system":{"enum":["https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","https://fhir.nhs.uk/CodeSystem/http-error-codes"],"type":"string"},"code":{"type":"string"},"display":{"type":"string"}}}}}}}}}}}},"examples":{"MinimalRecordRequest":{"summary":"Request for minimal record test patient (NHS 9730147116, Debra Heber)","value":{"resourceType":"Parameters","parameter":[{"name":"patientNHSNumber","valueIdentifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730147116"}},{"name":"includeAllergies","part":[{"name":"includeResolvedAllergies","valueBoolean":true}]},{"name":"includeMedication","part":[{"name":"medicationSearchFromDate","valueDate":"2025-12-01"},{"name":"includePrescriptionIssues","valueBoolean":false}]},{"name":"identity","part":[{"name":"issuer","valueString":"https://your-url.nhs.uk"},{"name":"requestingOrgName","valueString":"Your Org Name"},{"name":"requestingDevice","resource":{"resourceType":"Device","identifier":[{"system":"https://your-url/Id/local-device-id","value":"device-1"}],"model":"Your model name","version":"Your version number"}},{"name":"requestingPractitioner","resource":{"resourceType":"Practitioner","id":"10019","name":[{"family":"Doe","given":["John"],"prefix":["Mr"]}],"identifier":[{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"111222333444"},{"system":"https://fhir.nhs.uk/Id/sds-role-profile-id","value":"444555666777"},{"system":"https://your-url/Id/local-id","value":"98ed4f78-814d-4266-8d5b-cde742f3093c"}]}}]}]}},"MediumRecordRequest":{"summary":"Request for medium record test patient (NHS 9730146942, Archie Boyce)","value":{"resourceType":"Parameters","parameter":[{"name":"patientNHSNumber","valueIdentifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730146942"}},{"name":"includeAllergies","part":[{"name":"includeResolvedAllergies","valueBoolean":true}]},{"name":"includeMedication","part":[{"name":"medicationSearchFromDate","valueDate":"2025-12-01"},{"name":"includePrescriptionIssues","valueBoolean":false}]},{"name":"identity","part":[{"name":"issuer","valueString":"https://your-url.nhs.uk"},{"name":"requestingOrgName","valueString":"Your Org Name"},{"name":"requestingDevice","resource":{"resourceType":"Device","identifier":[{"system":"https://your-url/Id/local-device-id","value":"device-1"}],"model":"Your model name","version":"Your version number"}},{"name":"requestingPractitioner","resource":{"resourceType":"Practitioner","id":"10019","name":[{"family":"Doe","given":["John"],"prefix":["Mr"]}],"identifier":[{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"111222333444"},{"system":"https://fhir.nhs.uk/Id/sds-role-profile-id","value":"444555666777"},{"system":"https://your-url/Id/local-id","value":"98ed4f78-814d-4266-8d5b-cde742f3093c"}]}}]}]}},"CompleteRecordRequest":{"summary":"Request for complete record test patient (NHS 9730147140, Janine Liston)","value":{"resourceType":"Parameters","parameter":[{"name":"patientNHSNumber","valueIdentifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730147140"}},{"name":"includeAllergies","part":[{"name":"includeResolvedAllergies","valueBoolean":true}]},{"name":"includeMedication","part":[{"name":"medicationSearchFromDate","valueDate":"2025-12-01"},{"name":"includePrescriptionIssues","valueBoolean":false}]},{"name":"identity","part":[{"name":"issuer","valueString":"https://your-url.nhs.uk"},{"name":"requestingOrgName","valueString":"Your Org Name"},{"name":"requestingDevice","resource":{"resourceType":"Device","identifier":[{"system":"https://your-url/Id/local-device-id","value":"device-1"}],"model":"Your model name","version":"Your version number"}},{"name":"requestingPractitioner","resource":{"resourceType":"Practitioner","id":"10019","name":[{"family":"Doe","given":["John"],"prefix":["Mr"]}],"identifier":[{"system":"https://fhir.nhs.uk/Id/sds-user-id","value":"111222333444"},{"system":"https://fhir.nhs.uk/Id/sds-role-profile-id","value":"444555666777"},{"system":"https://your-url/Id/local-id","value":"98ed4f78-814d-4266-8d5b-cde742f3093c"}]}}]}]}},"MinimalRecordResponse":{"summary":"Minimal record - one medication (NHS 9730147116, Debra Heber)","value":{"resourceType":"Bundle","id":"9d0c6b9b-a397-4f56-92de-ba4d161fe7a3","meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-StructuredRecord-Bundle-1"]},"type":"collection","entry":[{"resource":{"resourceType":"List","meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1"]},"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-ClinicalSetting-1","valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"1060971000000108","display":"General practice service"}]}}],"status":"current","mode":"snapshot","title":"Medications and medical devices","code":{"coding":[{"system":"http://snomed.info/sct","code":"933361000000108","display":"Medications and medical devices"}]},"subject":{"reference":"Patient/E2CB00B9-1CB1-4C6D-B539-036C5ED87761"},"date":"2026-05-21T13:32:49.568+00:00","orderedBy":{"coding":[{"system":"http://hl7.org/fhir/list-order","code":"event-date","display":"Sorted by Event Date"}]},"entry":[{"item":{"reference":"MedicationStatement/90431DFC-350E-4139-840B-551D742516B0-MS"}}]}},{"resource":{"resourceType":"Patient","id":"E2CB00B9-1CB1-4C6D-B539-036C5ED87761","meta":{"versionId":"5782080410329709511","profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"]},"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-RegistrationDetails-1","extension":[{"url":"preferredBranchSurgery","valueReference":{"reference":"Location/EB3994A6-5A87-4B53-A414-913137072F57"}}]}],"identifier":[{"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-NHSNumberVerificationStatus-1","valueCodeableConcept":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1","code":"01","display":"Number present and verified"}],"text":"Number present and verified"}}],"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9730147116"}],"name":[{"use":"official","family":"Heber","given":["Debra"],"prefix":["Miss"]}],"gender":"female","birthDate":"2023-07-29","address":[{"use":"home","type":"physical","line":["10 Millfield"],"city":"Brampton","district":"Cumbria","postalCode":"CA8 1TT"}],"generalPractitioner":[{"reference":"Practitioner/3F46407D-C0AA-4128-9352-5D220CE8A7C5"}],"managingOrganization":{"reference":"Organization/5E496953-065B-41F2-9577-BE8F2FBD0757"}}},{"resource":{"resourceType":"MedicationRequest","id":"90431DFC-350E-4139-840B-551D742516B0","meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1"]},"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescriptionType-1","valueCodeableConcept":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-PrescriptionType-1","code":"acute","display":"Acute"}]}}],"identifier":[{"system":"https://EMISWeb/A82038","value":"E2CB00B91CB14C6DB539036C5ED8776190431DFC350E4139840B551D742516B0"}],"groupIdentifier":{"value":"90431dfc-350e-4139-840b-551d742516b0"},"status":"completed","intent":"plan","medicationReference":{"reference":"Medication/F063D615-88EC-4AD9-AAC7-BF1CDF2CDC3D"},"subject":{"reference":"Patient/E2CB00B9-1CB1-4C6D-B539-036C5ED87761"},"authoredOn":"2024-06-10T14:13:38.327+01:00","recorder":{"reference":"Practitioner/6D340A1B-BC15-4D4E-93CF-BBCB5B74DF73"},"dosageInstruction":[{"text":"One To Be Taken Each Day"}],"dispenseRequest":{"validityPeriod":{"start":"2024-06-10","end":"2024-07-08"},"quantity":{"value":28,"unit":"tablet"},"expectedSupplyDuration":{"value":28,"unit":"day","system":"http://unitsofmeasure.org","code":"d"}}}},{"resource":{"resourceType":"MedicationStatement","id":"90431DFC-350E-4139-840B-551D742516B0-MS","meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationStatement-1"]},"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescribingAgency-1","valueCodeableConcept":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-PrescribingAgency-1","code":"prescribed-by-another-organisation","display":"Prescribed by another organisation"}]}},{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MedicationStatementLastIssueDate-1","valueDateTime":"2024-06-10T00:00:00+01:00"}],"identifier":[{"system":"https://EMISWeb/A82038","value":"E2CB00B91CB14C6DB539036C5ED8776190431DFC350E4139840B551D742516B0MS"}],"basedOn":[{"reference":"MedicationRequest/90431DFC-350E-4139-840B-551D742516B0"}],"status":"completed","medicationReference":{"reference":"Medication/F063D615-88EC-4AD9-AAC7-BF1CDF2CDC3D"},"effectivePeriod":{"start":"2024-06-10","end":"2024-07-08"},"dateAsserted":"2024-06-10T14:13:38.327+01:00","subject":{"reference":"Patient/E2CB00B9-1CB1-4C6D-B539-036C5ED87761"},"taken":"unk","dosage":[{"text":"One To Be Taken Each Day"}]}},{"resource":{"resourceType":"Organization","id":"5E496953-065B-41F2-9577-BE8F2FBD0757","meta":{"versionId":"1112974926854455048","profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"]},"extension":[{"url":"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MainLocation-1","valueReference":{"reference":"Location/EB3994A6-5A87-4B53-A414-913137072F57"}}],"identifier":[{"system":"https://fhir.nhs.uk/Id/ods-organization-code","value":"A82038"}],"type":[{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/GPConnect-OrganisationType-1","code":"gp-practice"}],"text":"GP Practice"}],"name":"TEMPLE SOWERBY MEDICAL PRACTICE","telecom":[{"system":"phone","value":1133800000,"use":"work","rank":1}],"address":[{"use":"work","type":"physical","line":["Fulford Grange","Micklefield Lane","Rawdon","Rawdon"],"city":"Leeds","district":"Yorkshire","postalCode":"LS19 6BA"}]}},{"resource":{"resourceType":"Practitioner","id":"3F46407D-C0AA-4128-9352-5D220CE8A7C5","meta":{"versionId":"3890143098868015599","profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"]},"name":[{"use":"official","family":"Fraser","given":["Stanley"],"prefix":["Dr"]}],"gender":"unknown"}},{"resource":{"resourceType":"Medication","id":"F063D615-88EC-4AD9-AAC7-BF1CDF2CDC3D","meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Medication-1"]},"code":{"coding":[{"system":"https://fhir.hl7.org.uk/Id/emis-drug-codes","code":"ASTA4609","display":"Aspirin 75mg tablets","userSelected":true},{"system":"http://snomed.info/sct","code":"42292011000001108","display":"Aspirin 75mg tablets"}]}}}]}},"invalidNhsNumber":{"summary":"Invalid NHS number","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","diagnostics":"Invalid NHS number format","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"INVALID_NHS_NUMBER"}]}}]}},"accessDenied":{"summary":"ACCESS_DENIED","description":"Insufficient privileges to access this resource","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"forbidden","diagnostics":"The Access Document capability is disabled at this practice.","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"ACCESS_DENIED","display":"Access denied"}]}}]}},"noOrganisationalConsent":{"summary":"NO_ORGANISATIONAL_CONSENT","description":"End user organisation has not provided consent to share data","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"forbidden","diagnostics":"Requesting practitioner's organisation has not provided consent to share data","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"NO_ORGANISATIONAL_CONSENT"}]}}]}},"noPatientConsent":{"summary":"NO_PATIENT_CONSENT","description":"Patient has not provided consent to share data","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"forbidden","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"NO_PATIENT_CONSENT","display":"Patient has not provided consent to share data"}]}}]}},"organisationNotFound":{"summary":"ORGANISATION_NOT_FOUND","description":"Could not find patient's registered GP practice","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"not-found","diagnostics":"Could not find registered GP practice ASID","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"ORGANISATION_NOT_FOUND"}]}}]}},"patientNotFound":{"summary":"PATIENT_NOT_FOUND","description":"Patient does not exist for given NHS number","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"not-found","diagnostics":"Patient does not exist for given NHS number","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"PATIENT_NOT_FOUND"}]}}]}},"unsupportedMediaType":{"summary":"UNSUPPORTED_MEDIA_TYPE","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"not-supported","diagnostics":"Unsupported \"Content-Type\". Expected \"application/fhir+json\"","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"UNSUPPORTED_MEDIA_TYPE"}]}}]}},"invalidParameter":{"summary":"INVALID_PARAMETER","description":"A field has failed validation","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","diagnostics":"Parameters.parameter[0].valueIdentifier.value: Field required","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"INVALID_PARAMETER"}]}}]}},"invalidResource":{"summary":"INVALID_RESOURCE","description":"Request body is invalid","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","diagnostics":"Invalid JSON body sent in request","details":{"coding":[{"system":"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1","code":"INVALID_RESOURCE"}]}}]}},"tooManyRequests":{"summary":"TOO_MANY_REQUESTS","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"throttled","diagnostics":"Too many requests have been made to this API. Please try again later.","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"TOO_MANY_REQUESTS"}]}}]}},"serverError":{"summary":"SERVER_ERROR","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"transient","diagnostics":"Internal Server Error","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"SERVER_ERROR"}]}}]}},"unavailableTransient":{"summary":"UNAVAILABLE - transient","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"transient","diagnostics":"The CDG API is temporarily unavailable. Please try again later.","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"UNAVAILABLE"}]}}]}},"unavailableProcessing":{"summary":"UNAVAILABLE - processing","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"The request could not be completed because an error occurred while calling a downstream service","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"UNAVAILABLE"}]}}]}},"timeout":{"summary":"TIMEOUT","value":{"meta":{"profile":["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]},"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"timeout","diagnostics":"The CDG API is temporarily unavailable. Please try again later.","details":{"coding":[{"system":"https://fhir.nhs.uk/CodeSystem/http-error-codes","code":"TIMEOUT"}]}}]}}},"securitySchemes":{"nhs-cis2-aal2":{"$ref":"https://proxygen.ptl.api.platform.nhs.uk/components/securitySchemes/nhs-cis2-aal2"}}}}